qairt-visualizer 0.5.1__py3-none-win_amd64.whl → 0.6.0__py3-none-win_amd64.whl
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.
- qairt_visualizer/core/helpers/version.py +23 -0
- qairt_visualizer/core/launchers/base_ui_launcher_context.py +28 -7
- qairt_visualizer/core/launchers/electron_launcher_context.py +72 -3
- qairt_visualizer/core/parsers/dlc_parser/dlc_parser.py +105 -33
- qairt_visualizer/core/parsers/dlc_parser/get_source_topology.py +47 -0
- qairt_visualizer/core/parsers/dlc_parser/libDlModelToolsPy.pyd +0 -0
- qairt_visualizer/core/parsers/dlc_parser/libDlModelToolsPy.so +0 -0
- qairt_visualizer/core/parsers/dlc_parser/libPyIrGraph.pyd +0 -0
- qairt_visualizer/core/parsers/dlc_parser/libPyIrGraph.so +0 -0
- qairt_visualizer/core/parsers/dlc_parser/models/op_tensor_mappings.py +8 -4
- qairt_visualizer/core/ui/dist/browser/__init__.py +47 -0
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/acuity.js → acuity.js} +3 -3
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/app.js → app.js} +63 -57
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/armnn-schema.js → armnn-schema.js} +590 -5
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/armnn.js → armnn.js} +3 -5
- qairt_visualizer/core/ui/dist/browser/assets/i18n/common/en.json +8 -2
- qairt_visualizer/core/ui/dist/browser/assets/i18n/graph/en.json +32 -36
- qairt_visualizer/core/ui/dist/browser/assets/i18n/panels/en.json +9 -3
- qairt_visualizer/core/ui/dist/browser/assets/i18n/panels/model-diff/en.json +6 -0
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/barracuda.js → barracuda.js} +3 -3
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/base.js → base.js} +20 -16
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/bigdl.js → bigdl.js} +2 -2
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/browser.js → browser.js} +59 -49
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/caffe.js → caffe.js} +3 -3
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/caffe2-proto.js → caffe2-proto.js} +26 -26
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/caffe2.js → caffe2.js} +113 -114
- qairt_visualizer/core/ui/dist/browser/chunk-3SMGFPTN.js +11 -0
- qairt_visualizer/core/ui/dist/browser/chunk-43LQFSHA.js +1 -0
- qairt_visualizer/core/ui/dist/browser/chunk-447NKSFT.js +1 -0
- qairt_visualizer/core/ui/dist/browser/chunk-5MAR72QP.js +1 -0
- qairt_visualizer/core/ui/dist/browser/chunk-7PTY53DS.js +5 -0
- qairt_visualizer/core/ui/dist/browser/chunk-GAUD627J.js +1 -0
- qairt_visualizer/core/ui/dist/browser/chunk-H7TLLCSI.js +1 -0
- qairt_visualizer/core/ui/dist/browser/chunk-HISUA6LZ.js +4 -0
- qairt_visualizer/core/ui/dist/browser/chunk-HXB7IAZI.js +1 -0
- qairt_visualizer/core/ui/dist/browser/chunk-L3QJ7DR2.js +1 -0
- qairt_visualizer/core/ui/dist/browser/chunk-M7SD7HRU.js +129 -0
- qairt_visualizer/core/ui/dist/browser/{chunk-HBP6TEQ6.js → chunk-MCR4N53U.js} +1 -1
- qairt_visualizer/core/ui/dist/browser/chunk-QD7PA2I4.js +19 -0
- qairt_visualizer/core/ui/dist/browser/chunk-TKZG6FLW.js +12 -0
- qairt_visualizer/core/ui/dist/browser/chunk-WFAVWONI.js +5 -0
- qairt_visualizer/core/ui/dist/browser/chunk-WRMDGTCT.js +35 -0
- qairt_visualizer/core/ui/dist/browser/chunk-X25J6H7V.js +1 -0
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/circle-schema.js → circle-schema.js} +17 -0
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/circle.js → circle.js} +3 -3
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/cntk.js → cntk.js} +1 -1
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/coreml-proto.js → coreml-proto.js} +1 -0
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/coreml.js → coreml.js} +24 -21
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/dagre.js → dagre.js} +5 -5
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/darknet-metadata.json → darknet-metadata.json} +0 -1
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/darknet.js → darknet.js} +3 -3
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/electron.mjs → desktop.mjs} +44 -131
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/dl4j.js → dl4j.js} +5 -2
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/dlc-schema.js → dlc-schema.js} +8 -8
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/dlc.js → dlc.js} +110 -29
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/dnn.js → dnn.js} +2 -4
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/dot.js → dot.js} +1 -1
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/espresso.js → espresso.js} +1 -1
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/executorch-schema.js → executorch-schema.js} +363 -42
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/executorch.js → executorch.js} +108 -40
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/flatbuffers.js → flatbuffers.js} +1 -1
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/flax.js → flax.js} +1 -1
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/flux.js → flux.js} +2 -2
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/gguf.js → gguf.js} +44 -24
- qairt_visualizer/core/ui/dist/browser/grapher.css +145 -0
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/grapher.js → grapher.js} +24 -48
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/hailo.js → hailo.js} +1 -1
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/hickle.js → hickle.js} +1 -1
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/imgdnn.js → imgdnn.js} +1 -1
- qairt_visualizer/core/ui/dist/browser/index.html +15 -16
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/index.js → index.js} +2 -24
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/json.js → json.js} +28 -3
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/kann.js → kann.js} +1 -1
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/keras-metadata.json → keras-metadata.json} +15 -7
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/keras.js → keras.js} +13 -7
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/kmodel.js → kmodel.js} +3 -3
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/lasagne.js → lasagne.js} +2 -2
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/lightgbm.js → lightgbm.js} +1 -1
- qairt_visualizer/core/ui/dist/browser/main-VGWU2273.js +1 -0
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/mediapipe.js → mediapipe.js} +1 -1
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/megengine.js → megengine.js} +1 -1
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/message.js → message.js} +3 -2
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/mlir.js → mlir.js} +53 -17
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/mlnet.js → mlnet.js} +2 -3
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/mnn-schema.js → mnn-schema.js} +9 -6
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/mnn.js → mnn.js} +2 -2
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/mslite.js → mslite.js} +3 -3
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/mxnet.js → mxnet.js} +2 -2
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/ncnn.js → ncnn.js} +3 -2
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/nnabla.js → nnabla.js} +4 -4
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/nnef.js → nnef.js} +1 -1
- qairt_visualizer/core/ui/dist/browser/node.js +102 -0
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/numpy.js → numpy.js} +9 -9
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/om.js → om.js} +2 -2
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/onednn.js → onednn.js} +1 -1
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/onnx-metadata.json → onnx-metadata.json} +3500 -233
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/onnx-proto.js → onnx-proto.js} +436 -4
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/onnx.js → onnx.js} +284 -199
- qairt_visualizer/core/ui/dist/browser/onnx.py +231 -0
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/openvino.js → openvino.js} +36 -31
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/paddle-proto.js → paddle-proto.js} +54 -54
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/paddle.js → paddle.js} +22 -3
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/pickle.js → pickle.js} +3 -3
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/python.js → python.js} +743 -325
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/pytorch-metadata.json → pytorch-metadata.json} +3217 -2934
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/pytorch-proto.js → pytorch-proto.js} +4 -4
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/pytorch.js → pytorch.js} +172 -86
- qairt_visualizer/core/ui/dist/browser/pytorch.py +304 -0
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/qnn.js → qnn.js} +6 -2
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/rknn.js → rknn.js} +3 -3
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/safetensors.js → safetensors.js} +2 -2
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/sentencepiece.js → sentencepiece.js} +1 -1
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/server.py → server.py} +95 -103
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/sklearn-metadata.json → sklearn-metadata.json} +15 -10
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/sklearn.js → sklearn.js} +5 -5
- qairt_visualizer/core/ui/dist/browser/{styles-MRR6DOT2.css → styles-52VQCFP5.css} +1 -1
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/tar.js → tar.js} +18 -1
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/tengine.js → tengine.js} +1 -1
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/tensorrt.js → tensorrt.js} +1 -1
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/tf-metadata.json → tf-metadata.json} +1255 -163
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/tf-proto.js → tf-proto.js} +46 -12
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/tf.js → tf.js} +36 -13
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/tflite.js → tflite.js} +18 -21
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/tnn.js → tnn.js} +1 -3
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/torch.js → torch.js} +1 -1
- qairt_visualizer/core/ui/dist/browser/transformers.js +171 -0
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/tvm.js → tvm.js} +2 -2
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/uff.js → uff.js} +2 -2
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/view.js → view.js} +1405 -1115
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/weka.js → weka.js} +3 -4
- qairt_visualizer/core/ui/dist/browser/worker-CECUQ4FG.js +1 -0
- qairt_visualizer/core/ui/dist/browser/worker-IGSZ74QJ.js +4 -0
- qairt_visualizer/core/ui/dist/browser/xgboost.js +59 -0
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/xml.js → xml.js} +2 -2
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/xmodel.js → xmodel.js} +1 -1
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/zip.js → zip.js} +38 -41
- qairt_visualizer/core/ui/dist/qairt_visualizer.exe +0 -0
- qairt_visualizer/core/ui/dist/resources/app.asar +0 -0
- {qairt_visualizer-0.5.1.dist-info → qairt_visualizer-0.6.0.dist-info}/METADATA +1 -1
- qairt_visualizer-0.6.0.dist-info/RECORD +264 -0
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/CITATION.cff +0 -10
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/CONTRIBUTING.md +0 -29
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/LICENSE +0 -21
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/README.md +0 -36
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/jenkins/Jenkinsfile +0 -69
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/package-lock.json +0 -5743
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/package.js +0 -689
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/package.json +0 -53
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/package.py +0 -87
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/publish/background.png +0 -0
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/publish/background.svg +0 -5
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/publish/background@2x.png +0 -0
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/publish/electron-builder.json +0 -109
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/publish/eslint.config.js +0 -231
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/publish/forge.config.js +0 -87
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/publish/icon.html +0 -27
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/publish/icon.icns +0 -0
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/publish/icon.icns.svg +0 -175
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/publish/icon.ico +0 -0
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/publish/icon.png +0 -0
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/publish/icon.svg +0 -179
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/publish/notarize.cjs +0 -24
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/publish/pyproject.toml +0 -63
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/publish/setup.py +0 -43
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/resolve_upgrade_merge.sh +0 -10
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/source/__init__.py +0 -41
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/source/cambricon.js +0 -32
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/source/favicon.ico +0 -0
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/source/grapher.css +0 -602
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/source/index.html +0 -2222
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/source/modular.js +0 -81
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/source/onnx.py +0 -227
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/source/pytorch.py +0 -298
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/source/qais/qcontrol.js +0 -207
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/source/qais/qgraph-toolkit.js +0 -123
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/source/qais/qsubgraph.js +0 -226
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/source/qais/qsummary-panel.js +0 -89
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/source/server.js +0 -250
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/test/backend.py +0 -80
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/test/measures.py +0 -27
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/test/models.js +0 -359
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/test/models.json +0 -8523
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/test/worker.js +0 -859
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/armnn +0 -33
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/bigdl +0 -33
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/caffe +0 -37
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/caffe-script.js +0 -12
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/circle +0 -43
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/circle-script.js +0 -87
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/circle_script.js +0 -73
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/cntk +0 -33
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/coreml +0 -49
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/dlc +0 -20
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/dlc.fbs +0 -165
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/dnn +0 -20
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/dnn.proto +0 -79
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/executorch +0 -41
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/flatc.js +0 -1315
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/gguf +0 -22
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/kann +0 -33
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/keras +0 -62
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/keras_metadata.py +0 -205
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/keras_script.py +0 -204
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/mediapipe +0 -72
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/megengine +0 -47
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/megengine-script.js +0 -113
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/megengine_script.js +0 -112
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/mnn +0 -40
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/mslite +0 -45
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/mslite-script.js +0 -83
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/mslite_metadata.js +0 -82
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/nnabla +0 -79
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/nnabla_script.py +0 -145
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/om +0 -26
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/om.proto +0 -204
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/onnx +0 -135
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/onnx_metadata.py +0 -233
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/onnx_script.py +0 -332
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/paddle +0 -38
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/protoc.js +0 -1609
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/pytorch +0 -85
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/pytorch_metadata.py +0 -166
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/pytorch_script.py +0 -404
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/rknn +0 -20
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/rknn.fbs +0 -78
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/sentencepiece +0 -39
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/sklearn +0 -65
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/sklearn_metadata.py +0 -126
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/sklearn_script.py +0 -129
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/tf +0 -97
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/tf_metadata.py +0 -403
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/tf_script.py +0 -422
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/tflite-script.js +0 -87
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/tflite_metadata.js +0 -73
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/uff +0 -20
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/uff.proto +0 -127
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/xmodel +0 -36
- qairt_visualizer/core/ui/dist/browser/chunk-3NAQCYEU.js +0 -1
- qairt_visualizer/core/ui/dist/browser/chunk-NFKTPX3Z.js +0 -11
- qairt_visualizer/core/ui/dist/browser/chunk-OMI6HJ5Y.js +0 -19
- qairt_visualizer/core/ui/dist/browser/chunk-TTZXMRJ5.js +0 -34
- qairt_visualizer/core/ui/dist/browser/main-NXPVOKMG.js +0 -1
- qairt_visualizer/core/ui/dist/browser/worker-5VPKG2GV.js +0 -4
- qairt_visualizer/core/ui/dist/browser/worker-UVGWDZ5K.js +0 -1
- qairt_visualizer-0.5.1.dist-info/RECORD +0 -337
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/acuity-metadata.json → acuity-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/armnn-metadata.json → armnn-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/bigdl-metadata.json → bigdl-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/bigdl-proto.js → bigdl-proto.js} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/caffe-metadata.json → caffe-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/caffe-proto.js → caffe-proto.js} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/caffe2-metadata.json → caffe2-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/catboost.js → catboost.js} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/circle-metadata.json → circle-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/cntk-metadata.json → cntk-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/cntk-proto.js → cntk-proto.js} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/coreml-metadata.json → coreml-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/dl4j-metadata.json → dl4j-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/dlc-metadata.json → dlc-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/dnn-metadata.json → dnn-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/dnn-proto.js → dnn-proto.js} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/espresso-metadata.json → espresso-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/flexbuffers.js → flexbuffers.js} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/flux-metadata.json → flux-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/hailo-metadata.json → hailo-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/hdf5.js → hdf5.js} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/icon.png → icon.png} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/kann-metadata.json → kann-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/kann-schema.js → kann-schema.js} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/keras-proto.js → keras-proto.js} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/lasagne-metadata.json → lasagne-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/megengine-metadata.json → megengine-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/megengine-schema.js → megengine-schema.js} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/mlnet-metadata.json → mlnet-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/mnn-metadata.json → mnn-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/mslite-metadata.json → mslite-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/mslite-schema.js → mslite-schema.js} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/mxnet-metadata.json → mxnet-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/ncnn-metadata.json → ncnn-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/nnabla-metadata.json → nnabla-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/nnabla-proto.js → nnabla-proto.js} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/nnc.js → nnc.js} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/om-metadata.json → om-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/om-proto.js → om-proto.js} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/onednn-metadata.json → onednn-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/onnx-schema.js → onnx-schema.js} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/openvino-metadata.json → openvino-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/paddle-metadata.json → paddle-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/paddle-schema.js → paddle-schema.js} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/protobuf.js → protobuf.js} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/pytorch-schema.js → pytorch-schema.js} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/qnn-metadata.json → qnn-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/rknn-metadata.json → rknn-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/rknn-schema.js → rknn-schema.js} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/sentencepiece-proto.js → sentencepiece-proto.js} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/tengine-metadata.json → tengine-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/text.js → text.js} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/tflite-metadata.json → tflite-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/tflite-schema.js → tflite-schema.js} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/tnn-metadata.json → tnn-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/torch-metadata.json → torch-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/uff-metadata.json → uff-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/uff-proto.js → uff-proto.js} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/worker.js → worker.js} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/xmodel-proto.js → xmodel-proto.js} +0 -0
- {qairt_visualizer-0.5.1.dist-info → qairt_visualizer-0.6.0.dist-info}/LICENSE.pdf +0 -0
- {qairt_visualizer-0.5.1.dist-info → qairt_visualizer-0.6.0.dist-info}/WHEEL +0 -0
- {qairt_visualizer-0.5.1.dist-info → qairt_visualizer-0.6.0.dist-info}/entry_points.txt +0 -0
- {qairt_visualizer-0.5.1.dist-info → qairt_visualizer-0.6.0.dist-info}/top_level.txt +0 -0
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import{$ as ha,$a as Te,$b as ga,$c as c_,$d as Z_,$e as _v,A as br,Aa as Fe,Ab as nc,Ac as Un,Ad as P_,Ae as ri,Af as Oh,B as Pg,Ba as Pi,Bb as vo,Bc as i_,Bd as O_,Be as Yt,Bf as Av,C as Og,Ca as L,Cb as yh,Cc as Sh,Cd as I_,Ce as Lt,Cf as kv,D as Ig,Da as Cr,Db as rs,Dc as ps,Dd as D_,De as Ft,Df as Ce,E as xi,Ea as gn,Eb as bo,Ec as Eh,Ed as M_,Ee as Wo,Ef as Nv,F as Vo,Fa as Pe,Fb as Gn,Fc as mc,Fd as R_,Fe as Ve,Ff as Ac,G as Dg,Ga as Oe,Gb as oi,Gc as n_,Gd as A_,Ge as fs,Gf as Lv,H as ye,Ha as f,Hb as ss,Hc as o_,Hd as k_,He as mv,I as pa,Ia as g,Ib as Sr,Ic as Th,Id as N_,Ie as st,J as Mg,Ja as M,Jb as mt,Jc as nn,Jd as L_,Je as Le,K as Ze,Ka as Vi,Kb as as,Kc as Qt,Kd as F_,Ke as Oc,L as vh,La as Bi,Lb as jg,Lc as fc,Ld as V_,Le as Qo,M as ne,Ma as He,Mb as fa,Mc as r_,Md as B_,Me as zi,N as dt,Na as Z,Nb as Nt,Nc as _a,Nd as H_,Ne as Qn,O as pt,Oa as Fg,Ob as Ho,Oc as ji,Od as j_,Oe as Ci,P as D,Pa as I,Pb as Oi,Pc as gc,Pd as Tc,Pe as Mi,Q as je,Qa as v,Qb as Er,Qc as s_,Qd as q_,Qe as Yn,R as F,Ra as It,Rb as qg,Rc as _c,Rd as z_,Re as Xn,S as ht,Sa as ct,Sb as oc,Sc as vc,Sd as G_,Se as Yo,T as Se,Ta as tt,Tb as rc,Tc as a_,Td as xc,Te as Gi,U as Rg,Ua as Vg,Ub as jo,Uc as _t,Ud as $_,Ue as fv,V as Kl,Va as bi,Vb as Ch,Vc as zo,Vd as U_,Ve as gv,W as $e,Wa as Ee,Wb as Hi,Wc as l_,Wd as W_,We as Xo,X as R,Xa as me,Xb as zg,Xc as bc,Xd as Q_,Xe as Ko,Y as A,Ya as fe,Yb as sc,Yc as yc,Yd as Y_,Ye as Ic,Z as Zl,Za as ue,Zb as ac,Zc as Cc,Zd as X_,Ze as Dc,_ as ti,_a as q,_b as Gg,_c as hs,_d as K_,_e as si,a as gi,aa as Wt,ab as le,ac as lc,ad as us,ae as J_,af as vv,b as fn,ba as de,bb as Bg,bc as $g,bd as wc,be as ev,bf as bv,c as X,ca as Je,cb as jn,cc,cd as d_,ce as Pc,cf as yv,d as it,da as Vn,db as qn,dc,dd as Go,de as tv,df as Cv,e as Ln,ea as Ot,eb as zn,ec as Ug,ed as p_,ee as iv,ef as wv,f as _g,fa as Ae,fb as ze,fc as $n,fd as h_,fe as va,ff as Sv,g as vg,ga as en,gb as B,gc as qo,gd as u_,ge as nv,gf as Ev,h as bg,ha as Jl,hb as Ye,hc as pc,hd as m_,he as ov,hf as Mc,i as yg,ia as u,ib as ut,ic as Wg,id as f_,ie as rv,if as Tv,j as _i,ja as _,jb as Bo,jc as vn,jd as g_,je as sv,jf as xv,k as Cg,ka as ii,kb as ec,kc as ls,kd as Wn,ke as av,kf as Rc,l as wg,la as ua,lb as z,lc as Qg,ld as Ne,le as lv,m as Sg,ma as Ag,mb as G,mc as Yg,md as be,me as cv,mf as on,n as Kt,na as yr,nb as bh,nc as hc,nd as __,ne as ms,nf as zt,o as _o,oa as ni,ob as ke,oc as uc,od as v_,oe as dv,p as is,pa as kg,pb as tc,pc as Xg,pd as b_,pe as pv,pf as Pv,q as Ql,qa as se,qb as ic,qc as Kg,qd as Sc,qe as hv,qf as Ov,r as Yl,ra as ot,rb as tn,rc as cs,rd as y_,re as Ph,rf as Iv,s as Eg,sa as Ng,sb as os,sc as Zg,sd as C_,se as Tr,sf as Dv,t as Tg,ta as Tt,tb as qe,tc as Jg,td as w_,te as $o,tf as Mv,u as Zt,ua as T,ub as ma,uc as ds,ud as S_,ue as uv,uf as xr,v as vi,va as Lg,vb as Ie,vc as e_,vd as E_,ve as Uo,vf as $i,w as Xl,wa as Bn,wb as wr,wc as yi,wd as xh,we as qi,wf as Xe,x as ns,xa as et,xb as _n,xc as t_,xd as Ec,xe as Ii,xf as Ge,y as Fn,ya as b,yb as Hg,yc as wh,yd as T_,ye as Di,yf as Rv,z as xg,za as Hn,zb as wt,zc as Ue,zd as x_,ze as Dt,zf as Kn}from"./chunk-OMI6HJ5Y.js";import{a as E,b as ee,c as _h,d as da,e as N1,f as Nn,g as Y}from"./chunk-3NAQCYEU.js";function e0(t){let i=t.cloneNode(!0),e=i.querySelectorAll("[id]"),n=t.nodeName.toLowerCase();i.removeAttribute("id");for(let o=0;o<e.length;o++)e[o].removeAttribute("id");return n==="canvas"?Bv(t,i):(n==="input"||n==="select"||n==="textarea")&&Vv(t,i),Fv("canvas",t,i,Bv),Fv("input, textarea, select",t,i,Vv),i}function Fv(t,i,e,n){let o=i.querySelectorAll(t);if(o.length){let r=e.querySelectorAll(t);for(let s=0;s<o.length;s++)n(o[s],r[s])}}var L1=0;function Vv(t,i){i.type!=="file"&&(i.value=t.value),i.type==="radio"&&i.name&&(i.name=`mat-clone-${i.name}-${L1++}`)}function Bv(t,i){let e=i.getContext("2d");if(e)try{e.drawImage(t,0,0)}catch{}}function Lh(t){let i=t.getBoundingClientRect();return{top:i.top,right:i.right,bottom:i.bottom,left:i.left,width:i.width,height:i.height,x:i.x,y:i.y}}function Dh(t,i,e){let{top:n,bottom:o,left:r,right:s}=t;return e>=n&&e<=o&&i>=r&&i<=s}function ya(t,i,e){t.top+=i,t.bottom=t.top+t.height,t.left+=e,t.right=t.left+t.width}function Hv(t,i,e,n){let{top:o,right:r,bottom:s,left:a,width:l,height:c}=t,d=l*i,p=c*i;return n>o-p&&n<s+p&&e>a-d&&e<r+d}var Fc=class{constructor(i){this._document=i,this.positions=new Map}clear(){this.positions.clear()}cache(i){this.clear(),this.positions.set(this._document,{scrollPosition:this.getViewportScrollPosition()}),i.forEach(e=>{this.positions.set(e,{scrollPosition:{top:e.scrollTop,left:e.scrollLeft},clientRect:Lh(e)})})}handleScroll(i){let e=jo(i),n=this.positions.get(e);if(!n)return null;let o=n.scrollPosition,r,s;if(e===this._document){let c=this.getViewportScrollPosition();r=c.top,s=c.left}else r=e.scrollTop,s=e.scrollLeft;let a=o.top-r,l=o.left-s;return this.positions.forEach((c,d)=>{c.clientRect&&e!==d&&e.contains(d)&&ya(c.clientRect,a,l)}),o.top=r,o.left=s,{top:a,left:l}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}};function t0(t,i){let e=t.rootNodes;if(e.length===1&&e[0].nodeType===i.ELEMENT_NODE)return e[0];let n=i.createElement("div");return e.forEach(o=>n.appendChild(o)),n}function Fh(t,i,e){for(let n in i)if(i.hasOwnProperty(n)){let o=i[n];o?t.setProperty(n,o,e?.has(n)?"important":""):t.removeProperty(n)}return t}function gs(t,i){let e=i?"":"none";Fh(t.style,{"touch-action":i?"":"none","-webkit-user-drag":i?"":"none","-webkit-tap-highlight-color":i?"":"transparent","user-select":e,"-ms-user-select":e,"-webkit-user-select":e,"-moz-user-select":e})}function jv(t,i,e){Fh(t.style,{position:i?"":"fixed",top:i?"":"0",opacity:i?"":"0",left:i?"":"-999em"},e)}function Vc(t,i){return i&&i!="none"?t+" "+i:t}function qv(t,i){t.style.width=`${i.width}px`,t.style.height=`${i.height}px`,t.style.transform=Bc(i.left,i.top)}function Bc(t,i){return`translate3d(${Math.round(t)}px, ${Math.round(i)}px, 0)`}function zv(t){let i=t.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(t)*i}function F1(t){let i=getComputedStyle(t),e=Ih(i,"transition-property"),n=e.find(a=>a==="transform"||a==="all");if(!n)return 0;let o=e.indexOf(n),r=Ih(i,"transition-duration"),s=Ih(i,"transition-delay");return zv(r[o])+zv(s[o])}function Ih(t,i){return t.getPropertyValue(i).split(",").map(n=>n.trim())}var V1=new Set(["position"]),Mh=class{get element(){return this._preview}constructor(i,e,n,o,r,s,a,l,c){this._document=i,this._rootElement=e,this._direction=n,this._initialDomRect=o,this._previewTemplate=r,this._previewClass=s,this._pickupPositionOnPage=a,this._initialTransform=l,this._zIndex=c}attach(i){this._preview=this._createPreview(),i.appendChild(this._preview),Gv(this._preview)&&this._preview.showPopover()}destroy(){this._preview.remove(),this._previewEmbeddedView?.destroy(),this._preview=this._previewEmbeddedView=null}setTransform(i){this._preview.style.transform=i}getBoundingClientRect(){return this._preview.getBoundingClientRect()}addClass(i){this._preview.classList.add(i)}getTransitionDuration(){return F1(this._preview)}addEventListener(i,e){this._preview.addEventListener(i,e)}removeEventListener(i,e){this._preview.removeEventListener(i,e)}_createPreview(){let i=this._previewTemplate,e=this._previewClass,n=i?i.template:null,o;if(n&&i){let r=i.matchSize?this._initialDomRect:null,s=i.viewContainer.createEmbeddedView(n,i.context);s.detectChanges(),o=t0(s,this._document),this._previewEmbeddedView=s,i.matchSize?qv(o,r):o.style.transform=Bc(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else o=e0(this._rootElement),qv(o,this._initialDomRect),this._initialTransform&&(o.style.transform=this._initialTransform);return Fh(o.style,{"pointer-events":"none",margin:Gv(o)?"0 auto 0 0":"0",position:"fixed",top:"0",left:"0","z-index":this._zIndex+""},V1),gs(o,!1),o.classList.add("cdk-drag-preview"),o.setAttribute("popover","manual"),o.setAttribute("dir",this._direction),e&&(Array.isArray(e)?e.forEach(r=>o.classList.add(r)):o.classList.add(e)),o}};function Gv(t){return"showPopover"in t}var $v=Er({passive:!0}),kc=Er({passive:!1}),Uv=Er({passive:!1,capture:!0}),B1=800,Wv=new Set(["position"]),Rh=class{get disabled(){return this._disabled||!!(this._dropContainer&&this._dropContainer.disabled)}set disabled(i){i!==this._disabled&&(this._disabled=i,this._toggleNativeDragInteractions(),this._handles.forEach(e=>gs(e,i)))}constructor(i,e,n,o,r,s){this._config=e,this._document=n,this._ngZone=o,this._viewportRuler=r,this._dragDropRegistry=s,this._passiveTransform={x:0,y:0},this._activeTransform={x:0,y:0},this._hasStartedDragging=se(!1),this._moveEvents=new X,this._pointerMoveSubscription=gi.EMPTY,this._pointerUpSubscription=gi.EMPTY,this._scrollSubscription=gi.EMPTY,this._resizeSubscription=gi.EMPTY,this._boundaryElement=null,this._nativeInteractionsEnabled=!0,this._handles=[],this._disabledHandles=new Set,this._direction="ltr",this.dragStartDelay=0,this.scale=1,this._disabled=!1,this.beforeStarted=new X,this.started=new X,this.released=new X,this.ended=new X,this.entered=new X,this.exited=new X,this.dropped=new X,this.moved=this._moveEvents,this._pointerDown=a=>{if(this.beforeStarted.next(),this._handles.length){let l=this._getTargetHandle(a);l&&!this._disabledHandles.has(l)&&!this.disabled&&this._initializeDragSequence(l,a)}else this.disabled||this._initializeDragSequence(this._rootElement,a)},this._pointerMove=a=>{let l=this._getPointerPositionOnPage(a);if(!this._hasStartedDragging()){let d=Math.abs(l.x-this._pickupPositionOnPage.x),p=Math.abs(l.y-this._pickupPositionOnPage.y);if(d+p>=this._config.dragStartThreshold){let m=Date.now()>=this._dragStartTime+this._getDragStartDelay(a),S=this._dropContainer;if(!m){this._endDragSequence(a);return}(!S||!S.isDragging()&&!S.isReceiving())&&(a.cancelable&&a.preventDefault(),this._hasStartedDragging.set(!0),this._ngZone.run(()=>this._startDragSequence(a)))}return}a.cancelable&&a.preventDefault();let c=this._getConstrainedPointerPosition(l);if(this._hasMoved=!0,this._lastKnownPointerPosition=l,this._updatePointerDirectionDelta(c),this._dropContainer)this._updateActiveDropContainer(c,l);else{let d=this.constrainPosition?this._initialDomRect:this._pickupPositionOnPage,p=this._activeTransform;p.x=c.x-d.x+this._passiveTransform.x,p.y=c.y-d.y+this._passiveTransform.y,this._applyRootElementTransform(p.x,p.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:c,event:a,distance:this._getDragDistance(c),delta:this._pointerDirectionDelta})})},this._pointerUp=a=>{this._endDragSequence(a)},this._nativeDragStart=a=>{if(this._handles.length){let l=this._getTargetHandle(a);l&&!this._disabledHandles.has(l)&&!this.disabled&&a.preventDefault()}else this.disabled||a.preventDefault()},this.withRootElement(i).withParent(e.parentDragRef||null),this._parentPositions=new Fc(n),s.registerDragItem(this)}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(i){this._handles=i.map(n=>Ho(n)),this._handles.forEach(n=>gs(n,this.disabled)),this._toggleNativeDragInteractions();let e=new Set;return this._disabledHandles.forEach(n=>{this._handles.indexOf(n)>-1&&e.add(n)}),this._disabledHandles=e,this}withPreviewTemplate(i){return this._previewTemplate=i,this}withPlaceholderTemplate(i){return this._placeholderTemplate=i,this}withRootElement(i){let e=Ho(i);return e!==this._rootElement&&(this._rootElement&&this._removeRootElementListeners(this._rootElement),this._ngZone.runOutsideAngular(()=>{e.addEventListener("mousedown",this._pointerDown,kc),e.addEventListener("touchstart",this._pointerDown,$v),e.addEventListener("dragstart",this._nativeDragStart,kc)}),this._initialTransform=void 0,this._rootElement=e),typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(i){return this._boundaryElement=i?Ho(i):null,this._resizeSubscription.unsubscribe(),i&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(i){return this._parentDragRef=i,this}dispose(){this._removeRootElementListeners(this._rootElement),this.isDragging()&&this._rootElement?.remove(),this._anchor?.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeListeners(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._anchor=this._parentDragRef=null}isDragging(){return this._hasStartedDragging()&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}disableHandle(i){!this._disabledHandles.has(i)&&this._handles.indexOf(i)>-1&&(this._disabledHandles.add(i),gs(i,!0))}enableHandle(i){this._disabledHandles.has(i)&&(this._disabledHandles.delete(i),gs(i,this.disabled))}withDirection(i){return this._direction=i,this}_withDropContainer(i){this._dropContainer=i}getFreeDragPosition(){let i=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:i.x,y:i.y}}setFreeDragPosition(i){return this._activeTransform={x:0,y:0},this._passiveTransform.x=i.x,this._passiveTransform.y=i.y,this._dropContainer||this._applyRootElementTransform(i.x,i.y),this}withPreviewContainer(i){return this._previewContainer=i,this}_sortFromLastPointerPosition(){let i=this._lastKnownPointerPosition;i&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(i),i)}_removeListeners(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe(),this._getShadowRoot()?.removeEventListener("selectstart",Yv,Uv)}_destroyPreview(){this._preview?.destroy(),this._preview=null}_destroyPlaceholder(){this._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._placeholderRef=null}_endDragSequence(i){if(this._dragDropRegistry.isDragging(this)&&(this._removeListeners(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),!!this._hasStartedDragging()))if(this.released.next({source:this,event:i}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(i),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;let e=this._getPointerPositionOnPage(i);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(e),dropPoint:e,event:i})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(i){ba(i)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();let e=this._getShadowRoot(),n=this._dropContainer;if(e&&this._ngZone.runOutsideAngular(()=>{e.addEventListener("selectstart",Yv,Uv)}),n){let o=this._rootElement,r=o.parentNode,s=this._placeholder=this._createPlaceholderElement(),a=this._anchor=this._anchor||this._document.createComment("");r.insertBefore(a,o),this._initialTransform=o.style.transform||"",this._preview=new Mh(this._document,this._rootElement,this._direction,this._initialDomRect,this._previewTemplate||null,this.previewClass||null,this._pickupPositionOnPage,this._initialTransform,this._config.zIndex||1e3),this._preview.attach(this._getPreviewInsertionPoint(r,e)),jv(o,!1,Wv),this._document.body.appendChild(r.replaceChild(s,o)),this.started.next({source:this,event:i}),n.start(),this._initialContainer=n,this._initialIndex=n.getItemIndex(this)}else this.started.next({source:this,event:i}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(n?n.getScrollableParents():[])}_initializeDragSequence(i,e){this._parentDragRef&&e.stopPropagation();let n=this.isDragging(),o=ba(e),r=!o&&e.button!==0,s=this._rootElement,a=jo(e),l=!o&&this._lastTouchEventTime&&this._lastTouchEventTime+B1>Date.now(),c=o?Kg(e):Xg(e);if(a&&a.draggable&&e.type==="mousedown"&&e.preventDefault(),n||r||l||c)return;if(this._handles.length){let h=s.style;this._rootElementTapHighlight=h.webkitTapHighlightColor||"",h.webkitTapHighlightColor="transparent"}this._hasMoved=!1,this._hasStartedDragging.set(this._hasMoved),this._removeListeners(),this._initialDomRect=this._rootElement.getBoundingClientRect(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(h=>this._updateOnScroll(h)),this._boundaryElement&&(this._boundaryRect=Lh(this._boundaryElement));let d=this._previewTemplate;this._pickupPositionInElement=d&&d.template&&!d.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialDomRect,i,e);let p=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(e);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:p.x,y:p.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,e)}_cleanupDragArtifacts(i){jv(this._rootElement,!0,Wv),this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._initialDomRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{let e=this._dropContainer,n=e.getItemIndex(this),o=this._getPointerPositionOnPage(i),r=this._getDragDistance(o),s=e._isOverContainer(o.x,o.y);this.ended.next({source:this,distance:r,dropPoint:o,event:i}),this.dropped.next({item:this,currentIndex:n,previousIndex:this._initialIndex,container:e,previousContainer:this._initialContainer,isPointerOverContainer:s,distance:r,dropPoint:o,event:i}),e.drop(this,n,this._initialIndex,this._initialContainer,s,r,o,i),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:i,y:e},{x:n,y:o}){let r=this._initialContainer._getSiblingContainerFromPosition(this,i,e);!r&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(i,e)&&(r=this._initialContainer),r&&r!==this._dropContainer&&this._ngZone.run(()=>{this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._dropContainer=r,this._dropContainer.enter(this,i,e,r===this._initialContainer&&r.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:r,currentIndex:r.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(n,o),this._dropContainer._sortItem(this,i,e,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(i,e):this._applyPreviewTransform(i-this._pickupPositionInElement.x,e-this._pickupPositionInElement.y))}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();let i=this._placeholder.getBoundingClientRect();this._preview.addClass("cdk-drag-animating"),this._applyPreviewTransform(i.left,i.top);let e=this._preview.getTransitionDuration();return e===0?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(n=>{let o=s=>{(!s||this._preview&&jo(s)===this._preview.element&&s.propertyName==="transform")&&(this._preview?.removeEventListener("transitionend",o),n(),clearTimeout(r))},r=setTimeout(o,e*1.5);this._preview.addEventListener("transitionend",o)}))}_createPlaceholderElement(){let i=this._placeholderTemplate,e=i?i.template:null,n;return e?(this._placeholderRef=i.viewContainer.createEmbeddedView(e,i.context),this._placeholderRef.detectChanges(),n=t0(this._placeholderRef,this._document)):n=e0(this._rootElement),n.style.pointerEvents="none",n.classList.add("cdk-drag-placeholder"),n}_getPointerPositionInElement(i,e,n){let o=e===this._rootElement?null:e,r=o?o.getBoundingClientRect():i,s=ba(n)?n.targetTouches[0]:n,a=this._getViewportScrollPosition(),l=s.pageX-r.left-a.left,c=s.pageY-r.top-a.top;return{x:r.left-i.left+l,y:r.top-i.top+c}}_getPointerPositionOnPage(i){let e=this._getViewportScrollPosition(),n=ba(i)?i.touches[0]||i.changedTouches[0]||{pageX:0,pageY:0}:i,o=n.pageX-e.left,r=n.pageY-e.top;if(this._ownerSVGElement){let s=this._ownerSVGElement.getScreenCTM();if(s){let a=this._ownerSVGElement.createSVGPoint();return a.x=o,a.y=r,a.matrixTransform(s.inverse())}}return{x:o,y:r}}_getConstrainedPointerPosition(i){let e=this._dropContainer?this._dropContainer.lockAxis:null,{x:n,y:o}=this.constrainPosition?this.constrainPosition(i,this,this._initialDomRect,this._pickupPositionInElement):i;if(this.lockAxis==="x"||e==="x"?o=this._pickupPositionOnPage.y-(this.constrainPosition?this._pickupPositionInElement.y:0):(this.lockAxis==="y"||e==="y")&&(n=this._pickupPositionOnPage.x-(this.constrainPosition?this._pickupPositionInElement.x:0)),this._boundaryRect){let{x:r,y:s}=this.constrainPosition?{x:0,y:0}:this._pickupPositionInElement,a=this._boundaryRect,{width:l,height:c}=this._getPreviewRect(),d=a.top+s,p=a.bottom-(c-s),h=a.left+r,m=a.right-(l-r);n=Qv(n,h,m),o=Qv(o,d,p)}return{x:n,y:o}}_updatePointerDirectionDelta(i){let{x:e,y:n}=i,o=this._pointerDirectionDelta,r=this._pointerPositionAtLastDirectionChange,s=Math.abs(e-r.x),a=Math.abs(n-r.y);return s>this._config.pointerDirectionChangeThreshold&&(o.x=e>r.x?1:-1,r.x=e),a>this._config.pointerDirectionChangeThreshold&&(o.y=n>r.y?1:-1,r.y=n),o}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;let i=this._handles.length>0||!this.isDragging();i!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=i,gs(this._rootElement,i))}_removeRootElementListeners(i){i.removeEventListener("mousedown",this._pointerDown,kc),i.removeEventListener("touchstart",this._pointerDown,$v),i.removeEventListener("dragstart",this._nativeDragStart,kc)}_applyRootElementTransform(i,e){let n=1/this.scale,o=Bc(i*n,e*n),r=this._rootElement.style;this._initialTransform==null&&(this._initialTransform=r.transform&&r.transform!="none"?r.transform:""),r.transform=Vc(o,this._initialTransform)}_applyPreviewTransform(i,e){let n=this._previewTemplate?.template?void 0:this._initialTransform,o=Bc(i,e);this._preview.setTransform(Vc(o,n))}_getDragDistance(i){let e=this._pickupPositionOnPage;return e?{x:i.x-e.x,y:i.y-e.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:i,y:e}=this._passiveTransform;if(i===0&&e===0||this.isDragging()||!this._boundaryElement)return;let n=this._rootElement.getBoundingClientRect(),o=this._boundaryElement.getBoundingClientRect();if(o.width===0&&o.height===0||n.width===0&&n.height===0)return;let r=o.left-n.left,s=n.right-o.right,a=o.top-n.top,l=n.bottom-o.bottom;o.width>n.width?(r>0&&(i+=r),s>0&&(i-=s)):i=0,o.height>n.height?(a>0&&(e+=a),l>0&&(e-=l)):e=0,(i!==this._passiveTransform.x||e!==this._passiveTransform.y)&&this.setFreeDragPosition({y:e,x:i})}_getDragStartDelay(i){let e=this.dragStartDelay;return typeof e=="number"?e:ba(i)?e.touch:e?e.mouse:0}_updateOnScroll(i){let e=this._parentPositions.handleScroll(i);if(e){let n=jo(i);this._boundaryRect&&n!==this._boundaryElement&&n.contains(this._boundaryElement)&&ya(this._boundaryRect,e.top,e.left),this._pickupPositionOnPage.x+=e.left,this._pickupPositionOnPage.y+=e.top,this._dropContainer||(this._activeTransform.x-=e.left,this._activeTransform.y-=e.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){return this._parentPositions.positions.get(this._document)?.scrollPosition||this._parentPositions.getViewportScrollPosition()}_getShadowRoot(){return this._cachedShadowRoot===void 0&&(this._cachedShadowRoot=oc(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(i,e){let n=this._previewContainer||"global";if(n==="parent")return i;if(n==="global"){let o=this._document;return e||o.fullscreenElement||o.webkitFullscreenElement||o.mozFullScreenElement||o.msFullscreenElement||o.body}return Ho(n)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialDomRect),this._previewRect}_getTargetHandle(i){return this._handles.find(e=>i.target&&(i.target===e||e.contains(i.target)))}};function Qv(t,i,e){return Math.max(i,Math.min(e,t))}function ba(t){return t.type[0]==="t"}function Yv(t){t.preventDefault()}function jc(t,i,e){let n=Xv(i,t.length-1),o=Xv(e,t.length-1);if(n===o)return;let r=t[n],s=o<n?-1:1;for(let a=n;a!==o;a+=s)t[a]=t[a+s];t[o]=r}function Xv(t,i){return Math.max(0,Math.min(i,t))}var Hc=class{constructor(i){this._dragDropRegistry=i,this._itemPositions=[],this.orientation="vertical",this._previousSwap={drag:null,delta:0,overlaps:!1}}start(i){this.withItems(i)}sort(i,e,n,o){let r=this._itemPositions,s=this._getItemIndexFromPointerPosition(i,e,n,o);if(s===-1&&r.length>0)return null;let a=this.orientation==="horizontal",l=r.findIndex(w=>w.drag===i),c=r[s],d=r[l].clientRect,p=c.clientRect,h=l>s?1:-1,m=this._getItemOffsetPx(d,p,h),S=this._getSiblingOffsetPx(l,r,h),y=r.slice();return jc(r,l,s),r.forEach((w,x)=>{if(y[x]===w)return;let N=w.drag===i,k=N?m:S,C=N?i.getPlaceholderElement():w.drag.getRootElement();w.offset+=k;let Q=Math.round(w.offset*(1/w.drag.scale));a?(C.style.transform=Vc(`translate3d(${Q}px, 0, 0)`,w.initialTransform),ya(w.clientRect,0,k)):(C.style.transform=Vc(`translate3d(0, ${Q}px, 0)`,w.initialTransform),ya(w.clientRect,k,0))}),this._previousSwap.overlaps=Dh(p,e,n),this._previousSwap.drag=c.drag,this._previousSwap.delta=a?o.x:o.y,{previousIndex:l,currentIndex:s}}enter(i,e,n,o){let r=o==null||o<0?this._getItemIndexFromPointerPosition(i,e,n):o,s=this._activeDraggables,a=s.indexOf(i),l=i.getPlaceholderElement(),c=s[r];if(c===i&&(c=s[r+1]),!c&&(r==null||r===-1||r<s.length-1)&&this._shouldEnterAsFirstChild(e,n)&&(c=s[0]),a>-1&&s.splice(a,1),c&&!this._dragDropRegistry.isDragging(c)){let d=c.getRootElement();d.parentElement.insertBefore(l,d),s.splice(r,0,i)}else this._element.appendChild(l),s.push(i);l.style.transform="",this._cacheItemPositions()}withItems(i){this._activeDraggables=i.slice(),this._cacheItemPositions()}withSortPredicate(i){this._sortPredicate=i}reset(){this._activeDraggables?.forEach(i=>{let e=i.getRootElement();if(e){let n=this._itemPositions.find(o=>o.drag===i)?.initialTransform;e.style.transform=n||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(i){return(this.orientation==="horizontal"&&this.direction==="rtl"?this._itemPositions.slice().reverse():this._itemPositions).findIndex(n=>n.drag===i)}updateOnScroll(i,e){this._itemPositions.forEach(({clientRect:n})=>{ya(n,i,e)}),this._itemPositions.forEach(({drag:n})=>{this._dragDropRegistry.isDragging(n)&&n._sortFromLastPointerPosition()})}withElementContainer(i){this._element=i}_cacheItemPositions(){let i=this.orientation==="horizontal";this._itemPositions=this._activeDraggables.map(e=>{let n=e.getVisibleElement();return{drag:e,offset:0,initialTransform:n.style.transform||"",clientRect:Lh(n)}}).sort((e,n)=>i?e.clientRect.left-n.clientRect.left:e.clientRect.top-n.clientRect.top)}_getItemOffsetPx(i,e,n){let o=this.orientation==="horizontal",r=o?e.left-i.left:e.top-i.top;return n===-1&&(r+=o?e.width-i.width:e.height-i.height),r}_getSiblingOffsetPx(i,e,n){let o=this.orientation==="horizontal",r=e[i].clientRect,s=e[i+n*-1],a=r[o?"width":"height"]*n;if(s){let l=o?"left":"top",c=o?"right":"bottom";n===-1?a-=s.clientRect[l]-r[c]:a+=r[l]-s.clientRect[c]}return a}_shouldEnterAsFirstChild(i,e){if(!this._activeDraggables.length)return!1;let n=this._itemPositions,o=this.orientation==="horizontal";if(n[0].drag!==this._activeDraggables[0]){let s=n[n.length-1].clientRect;return o?i>=s.right:e>=s.bottom}else{let s=n[0].clientRect;return o?i<=s.left:e<=s.top}}_getItemIndexFromPointerPosition(i,e,n,o){let r=this.orientation==="horizontal",s=this._itemPositions.findIndex(({drag:a,clientRect:l})=>{if(a===i)return!1;if(o){let c=r?o.x:o.y;if(a===this._previousSwap.drag&&this._previousSwap.overlaps&&c===this._previousSwap.delta)return!1}return r?e>=Math.floor(l.left)&&e<Math.floor(l.right):n>=Math.floor(l.top)&&n<Math.floor(l.bottom)});return s===-1||!this._sortPredicate(s,i)?-1:s}},Ah=class{constructor(i,e){this._document=i,this._dragDropRegistry=e,this._previousSwap={drag:null,deltaX:0,deltaY:0,overlaps:!1},this._relatedNodes=[]}start(i){let e=this._element.childNodes;this._relatedNodes=[];for(let n=0;n<e.length;n++){let o=e[n];this._relatedNodes.push([o,o.nextSibling])}this.withItems(i)}sort(i,e,n,o){let r=this._getItemIndexFromPointerPosition(i,e,n),s=this._previousSwap;if(r===-1||this._activeItems[r]===i)return null;let a=this._activeItems[r];if(s.drag===a&&s.overlaps&&s.deltaX===o.x&&s.deltaY===o.y)return null;let l=this.getItemIndex(i),c=i.getPlaceholderElement(),d=a.getRootElement();r>l?d.after(c):d.before(c),jc(this._activeItems,l,r);let p=this._getRootNode().elementFromPoint(e,n);return s.deltaX=o.x,s.deltaY=o.y,s.drag=a,s.overlaps=d===p||d.contains(p),{previousIndex:l,currentIndex:r}}enter(i,e,n,o){let r=o==null||o<0?this._getItemIndexFromPointerPosition(i,e,n):o;r===-1&&(r=this._getClosestItemIndexToPointer(i,e,n));let s=this._activeItems[r],a=this._activeItems.indexOf(i);a>-1&&this._activeItems.splice(a,1),s&&!this._dragDropRegistry.isDragging(s)?(this._activeItems.splice(r,0,i),s.getRootElement().before(i.getPlaceholderElement())):(this._activeItems.push(i),this._element.appendChild(i.getPlaceholderElement()))}withItems(i){this._activeItems=i.slice()}withSortPredicate(i){this._sortPredicate=i}reset(){let i=this._element,e=this._previousSwap;for(let n=this._relatedNodes.length-1;n>-1;n--){let[o,r]=this._relatedNodes[n];o.parentNode===i&&o.nextSibling!==r&&(r===null?i.appendChild(o):r.parentNode===i&&i.insertBefore(o,r))}this._relatedNodes=[],this._activeItems=[],e.drag=null,e.deltaX=e.deltaY=0,e.overlaps=!1}getActiveItemsSnapshot(){return this._activeItems}getItemIndex(i){return this._activeItems.indexOf(i)}updateOnScroll(){this._activeItems.forEach(i=>{this._dragDropRegistry.isDragging(i)&&i._sortFromLastPointerPosition()})}withElementContainer(i){i!==this._element&&(this._element=i,this._rootNode=void 0)}_getItemIndexFromPointerPosition(i,e,n){let o=this._getRootNode().elementFromPoint(Math.floor(e),Math.floor(n)),r=o?this._activeItems.findIndex(s=>{let a=s.getRootElement();return o===a||a.contains(o)}):-1;return r===-1||!this._sortPredicate(r,i)?-1:r}_getRootNode(){return this._rootNode||(this._rootNode=oc(this._element)||this._document),this._rootNode}_getClosestItemIndexToPointer(i,e,n){if(this._activeItems.length===0)return-1;if(this._activeItems.length===1)return 0;let o=1/0,r=-1;for(let s=0;s<this._activeItems.length;s++){let a=this._activeItems[s];if(a!==i){let{x:l,y:c}=a.getRootElement().getBoundingClientRect(),d=Math.hypot(e-l,n-c);d<o&&(o=d,r=s)}}return r}},Kv=.05,i0=.05,rn=function(t){return t[t.NONE=0]="NONE",t[t.UP=1]="UP",t[t.DOWN=2]="DOWN",t}(rn||{}),wi=function(t){return t[t.NONE=0]="NONE",t[t.LEFT=1]="LEFT",t[t.RIGHT=2]="RIGHT",t}(wi||{}),kh=class{constructor(i,e,n,o,r){this._dragDropRegistry=e,this._ngZone=o,this._viewportRuler=r,this.disabled=!1,this.sortingDisabled=!1,this.autoScrollDisabled=!1,this.autoScrollStep=2,this.enterPredicate=()=>!0,this.sortPredicate=()=>!0,this.beforeStarted=new X,this.entered=new X,this.exited=new X,this.dropped=new X,this.sorted=new X,this.receivingStarted=new X,this.receivingStopped=new X,this._isDragging=!1,this._draggables=[],this._siblings=[],this._activeSiblings=new Set,this._viewportScrollSubscription=gi.EMPTY,this._verticalScrollDirection=rn.NONE,this._horizontalScrollDirection=wi.NONE,this._stopScrollTimers=new X,this._cachedShadowRoot=null,this._scrollableElements=[],this._direction="ltr",this._startScrollInterval=()=>{this._stopScrolling(),Tg(0,vg).pipe(ye(this._stopScrollTimers)).subscribe(()=>{let a=this._scrollNode,l=this.autoScrollStep;this._verticalScrollDirection===rn.UP?a.scrollBy(0,-l):this._verticalScrollDirection===rn.DOWN&&a.scrollBy(0,l),this._horizontalScrollDirection===wi.LEFT?a.scrollBy(-l,0):this._horizontalScrollDirection===wi.RIGHT&&a.scrollBy(l,0)})};let s=this.element=Ho(i);this._document=n,this.withOrientation("vertical").withElementContainer(s),e.registerDropContainer(this),this._parentPositions=new Fc(n)}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this.receivingStarted.complete(),this.receivingStopped.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(i,e,n,o){this._draggingStarted(),o==null&&this.sortingDisabled&&(o=this._draggables.indexOf(i)),this._sortStrategy.enter(i,e,n,o),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:i,container:this,currentIndex:this.getItemIndex(i)})}exit(i){this._reset(),this.exited.next({item:i,container:this})}drop(i,e,n,o,r,s,a,l={}){this._reset(),this.dropped.next({item:i,currentIndex:e,previousIndex:n,container:this,previousContainer:o,isPointerOverContainer:r,distance:s,dropPoint:a,event:l})}withItems(i){let e=this._draggables;return this._draggables=i,i.forEach(n=>n._withDropContainer(this)),this.isDragging()&&(e.filter(o=>o.isDragging()).every(o=>i.indexOf(o)===-1)?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(i){return this._direction=i,this._sortStrategy instanceof Hc&&(this._sortStrategy.direction=i),this}connectedTo(i){return this._siblings=i.slice(),this}withOrientation(i){if(i==="mixed")this._sortStrategy=new Ah(this._document,this._dragDropRegistry);else{let e=new Hc(this._dragDropRegistry);e.direction=this._direction,e.orientation=i,this._sortStrategy=e}return this._sortStrategy.withElementContainer(this._container),this._sortStrategy.withSortPredicate((e,n)=>this.sortPredicate(e,n,this)),this}withScrollableParents(i){let e=this._container;return this._scrollableElements=i.indexOf(e)===-1?[e,...i]:i.slice(),this}withElementContainer(i){if(i===this._container)return this;let e=Ho(this.element),n=this._scrollableElements.indexOf(this._container),o=this._scrollableElements.indexOf(i);return n>-1&&this._scrollableElements.splice(n,1),o>-1&&this._scrollableElements.splice(o,1),this._sortStrategy&&this._sortStrategy.withElementContainer(i),this._cachedShadowRoot=null,this._scrollableElements.unshift(i),this._container=i,this}getScrollableParents(){return this._scrollableElements}getItemIndex(i){return this._isDragging?this._sortStrategy.getItemIndex(i):this._draggables.indexOf(i)}isReceiving(){return this._activeSiblings.size>0}_sortItem(i,e,n,o){if(this.sortingDisabled||!this._domRect||!Hv(this._domRect,Kv,e,n))return;let r=this._sortStrategy.sort(i,e,n,o);r&&this.sorted.next({previousIndex:r.previousIndex,currentIndex:r.currentIndex,container:this,item:i})}_startScrollingIfNecessary(i,e){if(this.autoScrollDisabled)return;let n,o=rn.NONE,r=wi.NONE;if(this._parentPositions.positions.forEach((s,a)=>{a===this._document||!s.clientRect||n||Hv(s.clientRect,Kv,i,e)&&([o,r]=H1(a,s.clientRect,this._direction,i,e),(o||r)&&(n=a))}),!o&&!r){let{width:s,height:a}=this._viewportRuler.getViewportSize(),l={width:s,height:a,top:0,right:s,bottom:a,left:0};o=n0(l,e),r=o0(l,i),n=window}n&&(o!==this._verticalScrollDirection||r!==this._horizontalScrollDirection||n!==this._scrollNode)&&(this._verticalScrollDirection=o,this._horizontalScrollDirection=r,this._scrollNode=n,(o||r)&&n?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){let i=this._container.style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=i.msScrollSnapType||i.scrollSnapType||"",i.scrollSnapType=i.msScrollSnapType="none",this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){this._parentPositions.cache(this._scrollableElements),this._domRect=this._parentPositions.positions.get(this._container).clientRect}_reset(){this._isDragging=!1;let i=this._container.style;i.scrollSnapType=i.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(e=>e._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_isOverContainer(i,e){return this._domRect!=null&&Dh(this._domRect,i,e)}_getSiblingContainerFromPosition(i,e,n){return this._siblings.find(o=>o._canReceive(i,e,n))}_canReceive(i,e,n){if(!this._domRect||!Dh(this._domRect,e,n)||!this.enterPredicate(i,this))return!1;let o=this._getShadowRoot().elementFromPoint(e,n);return o?o===this._container||this._container.contains(o):!1}_startReceiving(i,e){let n=this._activeSiblings;!n.has(i)&&e.every(o=>this.enterPredicate(o,this)||this._draggables.indexOf(o)>-1)&&(n.add(i),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:i,receiver:this,items:e}))}_stopReceiving(i){this._activeSiblings.delete(i),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:i,receiver:this})}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(i=>{if(this.isDragging()){let e=this._parentPositions.handleScroll(i);e&&this._sortStrategy.updateOnScroll(e.top,e.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){let i=oc(this._container);this._cachedShadowRoot=i||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){let i=this._sortStrategy.getActiveItemsSnapshot().filter(e=>e.isDragging());this._siblings.forEach(e=>e._startReceiving(this,i))}};function n0(t,i){let{top:e,bottom:n,height:o}=t,r=o*i0;return i>=e-r&&i<=e+r?rn.UP:i>=n-r&&i<=n+r?rn.DOWN:rn.NONE}function o0(t,i){let{left:e,right:n,width:o}=t,r=o*i0;return i>=e-r&&i<=e+r?wi.LEFT:i>=n-r&&i<=n+r?wi.RIGHT:wi.NONE}function H1(t,i,e,n,o){let r=n0(i,o),s=o0(i,n),a=rn.NONE,l=wi.NONE;if(r){let c=t.scrollTop;r===rn.UP?c>0&&(a=rn.UP):t.scrollHeight-c>t.clientHeight&&(a=rn.DOWN)}if(s){let c=t.scrollLeft;e==="rtl"?s===wi.RIGHT?c<0&&(l=wi.RIGHT):t.scrollWidth+c>t.clientWidth&&(l=wi.LEFT):s===wi.LEFT?c>0&&(l=wi.LEFT):t.scrollWidth-c>t.clientWidth&&(l=wi.RIGHT)}return[a,l]}var Nc=Er({passive:!1,capture:!0}),Lc=new Set,j1=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=F({type:t,selectors:[["ng-component"]],hostAttrs:["cdk-drag-resets-container",""],standalone:!0,features:[B],decls:0,vars:0,template:function(n,o){},styles:["@layer cdk-resets{.cdk-drag-preview{background:none;border:none;padding:0;color:inherit;inset:auto}}.cdk-drag-placeholder *,.cdk-drag-preview *{pointer-events:none !important}"],encapsulation:2,changeDetection:0})}}return t})(),q1=(()=>{class t{constructor(e,n){this._ngZone=e,this._appRef=je(ic),this._environmentInjector=je(Kl),this._dropInstances=new Set,this._dragInstances=new Set,this._activeDragInstances=se([]),this._globalListeners=new Map,this._draggingPredicate=o=>o.isDragging(),this.pointerMove=new X,this.pointerUp=new X,this.scroll=new X,this._preventDefaultWhileDragging=o=>{this._activeDragInstances().length>0&&o.preventDefault()},this._persistentTouchmoveListener=o=>{this._activeDragInstances().length>0&&(this._activeDragInstances().some(this._draggingPredicate)&&o.preventDefault(),this.pointerMove.next(o))},this._document=n}registerDropContainer(e){this._dropInstances.has(e)||this._dropInstances.add(e)}registerDragItem(e){this._dragInstances.add(e),this._dragInstances.size===1&&this._ngZone.runOutsideAngular(()=>{this._document.addEventListener("touchmove",this._persistentTouchmoveListener,Nc)})}removeDropContainer(e){this._dropInstances.delete(e)}removeDragItem(e){this._dragInstances.delete(e),this.stopDragging(e),this._dragInstances.size===0&&this._document.removeEventListener("touchmove",this._persistentTouchmoveListener,Nc)}startDragging(e,n){if(!(this._activeDragInstances().indexOf(e)>-1)&&(this._loadResets(),this._activeDragInstances.update(o=>[...o,e]),this._activeDragInstances().length===1)){let o=n.type.startsWith("touch");this._globalListeners.set(o?"touchend":"mouseup",{handler:r=>this.pointerUp.next(r),options:!0}).set("scroll",{handler:r=>this.scroll.next(r),options:!0}).set("selectstart",{handler:this._preventDefaultWhileDragging,options:Nc}),o||this._globalListeners.set("mousemove",{handler:r=>this.pointerMove.next(r),options:Nc}),this._ngZone.runOutsideAngular(()=>{this._globalListeners.forEach((r,s)=>{this._document.addEventListener(s,r.handler,r.options)})})}}stopDragging(e){this._activeDragInstances.update(n=>{let o=n.indexOf(e);return o>-1?(n.splice(o,1),[...n]):n}),this._activeDragInstances().length===0&&this._clearGlobalListeners()}isDragging(e){return this._activeDragInstances().indexOf(e)>-1}scrolled(e){let n=[this.scroll];return e&&e!==this._document&&n.push(new fn(o=>this._ngZone.runOutsideAngular(()=>{let s=a=>{this._activeDragInstances().length&&o.next(a)};return e.addEventListener("scroll",s,!0),()=>{e.removeEventListener("scroll",s,!0)}}))),Zt(...n)}ngOnDestroy(){this._dragInstances.forEach(e=>this.removeDragItem(e)),this._dropInstances.forEach(e=>this.removeDropContainer(e)),this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_clearGlobalListeners(){this._globalListeners.forEach((e,n)=>{this._document.removeEventListener(n,e.handler,e.options)}),this._globalListeners.clear()}_loadResets(){if(!Lc.has(this._appRef)){Lc.add(this._appRef);let e=Hg(j1,{environmentInjector:this._environmentInjector});this._appRef.onDestroy(()=>{Lc.delete(this._appRef),Lc.size===0&&e.destroy()})}}static{this.\u0275fac=function(n){return new(n||t)(D(Je),D(wt))}}static{this.\u0275prov=ne({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})(),z1={dragStartThreshold:5,pointerDirectionChangeThreshold:5},Vh=(()=>{class t{constructor(e,n,o,r){this._document=e,this._ngZone=n,this._viewportRuler=o,this._dragDropRegistry=r}createDrag(e,n=z1){return new Rh(e,n,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry)}createDropList(e){return new kh(e,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}static{this.\u0275fac=function(n){return new(n||t)(D(wt),D(Je),D($n),D(q1))}}static{this.\u0275prov=ne({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})(),Zv=new pt("CDK_DRAG_PARENT");var G1=new pt("CdkDragHandle");var r0=new pt("CDK_DRAG_CONFIG"),$1="cdk-drag",s0=new pt("CdkDropList"),a0=(()=>{class t{static{this._dragInstances=[]}get disabled(){return this._disabled||this.dropContainer&&this.dropContainer.disabled}set disabled(e){this._disabled=e,this._dragRef.disabled=this._disabled}constructor(e,n,o,r,s,a,l,c,d,p,h){this.element=e,this.dropContainer=n,this._ngZone=r,this._viewContainerRef=s,this._dir=l,this._changeDetectorRef=d,this._selfHandle=p,this._parentDrag=h,this._destroyed=new X,this._handles=new it([]),this.scale=1,this.started=new de,this.released=new de,this.ended=new de,this.entered=new de,this.exited=new de,this.dropped=new de,this.moved=new fn(m=>{let S=this._dragRef.moved.pipe(Kt(y=>({source:this,pointerPosition:y.pointerPosition,event:y.event,delta:y.delta,distance:y.distance}))).subscribe(m);return()=>{S.unsubscribe()}}),this._injector=je(Wt),this._dragRef=c.createDrag(e,{dragStartThreshold:a&&a.dragStartThreshold!=null?a.dragStartThreshold:5,pointerDirectionChangeThreshold:a&&a.pointerDirectionChangeThreshold!=null?a.pointerDirectionChangeThreshold:5,zIndex:a?.zIndex}),this._dragRef.data=this,t._dragInstances.push(this),a&&this._assignDefaults(a),n&&(this._dragRef._withDropContainer(n._dropListRef),n.addItem(this),n._dropListRef.beforeStarted.pipe(ye(this._destroyed)).subscribe(()=>{this._dragRef.scale=this.scale})),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}getPlaceholderElement(){return this._dragRef.getPlaceholderElement()}getRootElement(){return this._dragRef.getRootElement()}reset(){this._dragRef.reset()}getFreeDragPosition(){return this._dragRef.getFreeDragPosition()}setFreeDragPosition(e){this._dragRef.setFreeDragPosition(e)}ngAfterViewInit(){Bn(()=>{this._updateRootElement(),this._setupHandlesListener(),this._dragRef.scale=this.scale,this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)},{injector:this._injector})}ngOnChanges(e){let n=e.rootElementSelector,o=e.freeDragPosition;n&&!n.firstChange&&this._updateRootElement(),this._dragRef.scale=this.scale,o&&!o.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this);let e=t._dragInstances.indexOf(this);e>-1&&t._dragInstances.splice(e,1),this._ngZone.runOutsideAngular(()=>{this._handles.complete(),this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()})}_addHandle(e){let n=this._handles.getValue();n.push(e),this._handles.next(n)}_removeHandle(e){let n=this._handles.getValue(),o=n.indexOf(e);o>-1&&(n.splice(o,1),this._handles.next(n))}_setPreviewTemplate(e){this._previewTemplate=e}_resetPreviewTemplate(e){e===this._previewTemplate&&(this._previewTemplate=null)}_setPlaceholderTemplate(e){this._placeholderTemplate=e}_resetPlaceholderTemplate(e){e===this._placeholderTemplate&&(this._placeholderTemplate=null)}_updateRootElement(){let e=this.element.nativeElement,n=e;this.rootElementSelector&&(n=e.closest!==void 0?e.closest(this.rootElementSelector):e.parentElement?.closest(this.rootElementSelector)),this._dragRef.withRootElement(n||e)}_getBoundaryElement(){let e=this.boundaryElement;return e?typeof e=="string"?this.element.nativeElement.closest(e):Ho(e):null}_syncInputs(e){e.beforeStarted.subscribe(()=>{if(!e.isDragging()){let n=this._dir,o=this.dragStartDelay,r=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,s=this._previewTemplate?{template:this._previewTemplate.templateRef,context:this._previewTemplate.data,matchSize:this._previewTemplate.matchSize,viewContainer:this._viewContainerRef}:null;e.disabled=this.disabled,e.lockAxis=this.lockAxis,e.scale=this.scale,e.dragStartDelay=typeof o=="object"&&o?o:as(o),e.constrainPosition=this.constrainPosition,e.previewClass=this.previewClass,e.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(r).withPreviewTemplate(s).withPreviewContainer(this.previewContainer||"global"),n&&e.withDirection(n.value)}}),e.beforeStarted.pipe(Fn(1)).subscribe(()=>{if(this._parentDrag){e.withParent(this._parentDrag._dragRef);return}let n=this.element.nativeElement.parentElement;for(;n;){if(n.classList.contains($1)){e.withParent(t._dragInstances.find(o=>o.element.nativeElement===n)?._dragRef||null);break}n=n.parentElement}})}_handleEvents(e){e.started.subscribe(n=>{this.started.emit({source:this,event:n.event}),this._changeDetectorRef.markForCheck()}),e.released.subscribe(n=>{this.released.emit({source:this,event:n.event})}),e.ended.subscribe(n=>{this.ended.emit({source:this,distance:n.distance,dropPoint:n.dropPoint,event:n.event}),this._changeDetectorRef.markForCheck()}),e.entered.subscribe(n=>{this.entered.emit({container:n.container.data,item:this,currentIndex:n.currentIndex})}),e.exited.subscribe(n=>{this.exited.emit({container:n.container.data,item:this})}),e.dropped.subscribe(n=>{this.dropped.emit({previousIndex:n.previousIndex,currentIndex:n.currentIndex,previousContainer:n.previousContainer.data,container:n.container.data,isPointerOverContainer:n.isPointerOverContainer,item:this,distance:n.distance,dropPoint:n.dropPoint,event:n.event})})}_assignDefaults(e){let{lockAxis:n,dragStartDelay:o,constrainPosition:r,previewClass:s,boundaryElement:a,draggingDisabled:l,rootElementSelector:c,previewContainer:d}=e;this.disabled=l??!1,this.dragStartDelay=o||0,n&&(this.lockAxis=n),r&&(this.constrainPosition=r),s&&(this.previewClass=s),a&&(this.boundaryElement=a),c&&(this.rootElementSelector=c),d&&(this.previewContainer=d)}_setupHandlesListener(){this._handles.pipe(pa(e=>{let n=e.map(o=>o.element);this._selfHandle&&this.rootElementSelector&&n.push(this.element),this._dragRef.withHandles(n)}),Vo(e=>Zt(...e.map(n=>n._stateChanges.pipe(xi(n))))),ye(this._destroyed)).subscribe(e=>{let n=this._dragRef,o=e.element.nativeElement;e.disabled?n.disableHandle(o):n.enableHandle(o)})}static{this.\u0275fac=function(n){return new(n||t)(_(Ae),_(s0,12),_(wt),_(Je),_(ni),_(r0,8),_(Hi,8),_(Vh),_(tn),_(G1,10),_(Zv,12))}}static{this.\u0275dir=Se({type:t,selectors:[["","cdkDrag",""]],hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(n,o){n&2&&Fe("cdk-drag-disabled",o.disabled)("cdk-drag-dragging",o._dragRef.isDragging())},inputs:{data:[0,"cdkDragData","data"],lockAxis:[0,"cdkDragLockAxis","lockAxis"],rootElementSelector:[0,"cdkDragRootElement","rootElementSelector"],boundaryElement:[0,"cdkDragBoundary","boundaryElement"],dragStartDelay:[0,"cdkDragStartDelay","dragStartDelay"],freeDragPosition:[0,"cdkDragFreeDragPosition","freeDragPosition"],disabled:[2,"cdkDragDisabled","disabled",qe],constrainPosition:[0,"cdkDragConstrainPosition","constrainPosition"],previewClass:[0,"cdkDragPreviewClass","previewClass"],previewContainer:[0,"cdkDragPreviewContainer","previewContainer"],scale:[2,"cdkDragScale","scale",ma]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],standalone:!0,features:[ze([{provide:Zv,useExisting:t}]),Tt,$e]})}}return t})(),Jv=new pt("CdkDropListGroup");var U1=0,l0=(()=>{class t{static{this._dropLists=[]}get disabled(){return this._disabled||!!this._group&&this._group.disabled}set disabled(e){this._dropListRef.disabled=this._disabled=e}constructor(e,n,o,r,s,a,l){this.element=e,this._changeDetectorRef=o,this._scrollDispatcher=r,this._dir=s,this._group=a,this._destroyed=new X,this.connectedTo=[],this.id=`cdk-drop-list-${U1++}`,this.enterPredicate=()=>!0,this.sortPredicate=()=>!0,this.dropped=new de,this.entered=new de,this.exited=new de,this.sorted=new de,this._unsortedItems=new Set,this._dropListRef=n.createDropList(e),this._dropListRef.data=this,l&&this._assignDefaults(l),this._dropListRef.enterPredicate=(c,d)=>this.enterPredicate(c.data,d.data),this._dropListRef.sortPredicate=(c,d,p)=>this.sortPredicate(c,d.data,p.data),this._setupInputSyncSubscription(this._dropListRef),this._handleEvents(this._dropListRef),t._dropLists.push(this),a&&a._items.add(this)}addItem(e){this._unsortedItems.add(e),this._dropListRef.isDragging()&&this._syncItemsWithRef()}removeItem(e){this._unsortedItems.delete(e),this._dropListRef.isDragging()&&this._syncItemsWithRef()}getSortedItems(){return Array.from(this._unsortedItems).sort((e,n)=>e._dragRef.getVisibleElement().compareDocumentPosition(n._dragRef.getVisibleElement())&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)}ngOnDestroy(){let e=t._dropLists.indexOf(this);e>-1&&t._dropLists.splice(e,1),this._group&&this._group._items.delete(this),this._unsortedItems.clear(),this._dropListRef.dispose(),this._destroyed.next(),this._destroyed.complete()}_setupInputSyncSubscription(e){this._dir&&this._dir.change.pipe(xi(this._dir.value),ye(this._destroyed)).subscribe(n=>e.withDirection(n)),e.beforeStarted.subscribe(()=>{let n=fa(this.connectedTo).map(o=>{if(typeof o=="string"){let r=t._dropLists.find(s=>s.id===o);return r}return o});if(this._group&&this._group._items.forEach(o=>{n.indexOf(o)===-1&&n.push(o)}),!this._scrollableParentsResolved){let o=this._scrollDispatcher.getAncestorScrollContainers(this.element).map(r=>r.getElementRef().nativeElement);this._dropListRef.withScrollableParents(o),this._scrollableParentsResolved=!0}if(this.elementContainerSelector){let o=this.element.nativeElement.querySelector(this.elementContainerSelector);e.withElementContainer(o)}e.disabled=this.disabled,e.lockAxis=this.lockAxis,e.sortingDisabled=this.sortingDisabled,e.autoScrollDisabled=this.autoScrollDisabled,e.autoScrollStep=as(this.autoScrollStep,2),e.connectedTo(n.filter(o=>o&&o!==this).map(o=>o._dropListRef)).withOrientation(this.orientation)})}_handleEvents(e){e.beforeStarted.subscribe(()=>{this._syncItemsWithRef(),this._changeDetectorRef.markForCheck()}),e.entered.subscribe(n=>{this.entered.emit({container:this,item:n.item.data,currentIndex:n.currentIndex})}),e.exited.subscribe(n=>{this.exited.emit({container:this,item:n.item.data}),this._changeDetectorRef.markForCheck()}),e.sorted.subscribe(n=>{this.sorted.emit({previousIndex:n.previousIndex,currentIndex:n.currentIndex,container:this,item:n.item.data})}),e.dropped.subscribe(n=>{this.dropped.emit({previousIndex:n.previousIndex,currentIndex:n.currentIndex,previousContainer:n.previousContainer.data,container:n.container.data,item:n.item.data,isPointerOverContainer:n.isPointerOverContainer,distance:n.distance,dropPoint:n.dropPoint,event:n.event}),this._changeDetectorRef.markForCheck()}),Zt(e.receivingStarted,e.receivingStopped).subscribe(()=>this._changeDetectorRef.markForCheck())}_assignDefaults(e){let{lockAxis:n,draggingDisabled:o,sortingDisabled:r,listAutoScrollDisabled:s,listOrientation:a}=e;this.disabled=o??!1,this.sortingDisabled=r??!1,this.autoScrollDisabled=s??!1,this.orientation=a||"vertical",n&&(this.lockAxis=n)}_syncItemsWithRef(){this._dropListRef.withItems(this.getSortedItems().map(e=>e._dragRef))}static{this.\u0275fac=function(n){return new(n||t)(_(Ae),_(Vh),_(tn),_(dc),_(Hi,8),_(Jv,12),_(r0,8))}}static{this.\u0275dir=Se({type:t,selectors:[["","cdkDropList",""],["cdk-drop-list"]],hostAttrs:[1,"cdk-drop-list"],hostVars:7,hostBindings:function(n,o){n&2&&(et("id",o.id),Fe("cdk-drop-list-disabled",o.disabled)("cdk-drop-list-dragging",o._dropListRef.isDragging())("cdk-drop-list-receiving",o._dropListRef.isReceiving()))},inputs:{connectedTo:[0,"cdkDropListConnectedTo","connectedTo"],data:[0,"cdkDropListData","data"],orientation:[0,"cdkDropListOrientation","orientation"],id:"id",lockAxis:[0,"cdkDropListLockAxis","lockAxis"],disabled:[2,"cdkDropListDisabled","disabled",qe],sortingDisabled:[2,"cdkDropListSortingDisabled","sortingDisabled",qe],enterPredicate:[0,"cdkDropListEnterPredicate","enterPredicate"],sortPredicate:[0,"cdkDropListSortPredicate","sortPredicate"],autoScrollDisabled:[2,"cdkDropListAutoScrollDisabled","autoScrollDisabled",qe],autoScrollStep:[0,"cdkDropListAutoScrollStep","autoScrollStep"],elementContainerSelector:[0,"cdkDropListElementContainer","elementContainerSelector"]},outputs:{dropped:"cdkDropListDropped",entered:"cdkDropListEntered",exited:"cdkDropListExited",sorted:"cdkDropListSorted"},exportAs:["cdkDropList"],standalone:!0,features:[ze([{provide:Jv,useValue:void 0},{provide:s0,useExisting:t}]),Tt]})}}return t})();var c0=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275mod=ht({type:t})}static{this.\u0275inj=dt({providers:[Vh],imports:[Wg]})}}return t})();var Ca=class{attach(i){return this._attachedHost=i,i.attach(this)}detach(){let i=this._attachedHost;i!=null&&(this._attachedHost=null,i.detach())}get isAttached(){return this._attachedHost!=null}setAttachedHost(i){this._attachedHost=i}},_s=class extends Ca{constructor(i,e,n,o,r){super(),this.component=i,this.viewContainerRef=e,this.injector=n,this.componentFactoryResolver=o,this.projectableNodes=r}},vs=class extends Ca{constructor(i,e,n,o){super(),this.templateRef=i,this.viewContainerRef=e,this.context=n,this.injector=o}get origin(){return this.templateRef.elementRef}attach(i,e=this.context){return this.context=e,super.attach(i)}detach(){return this.context=void 0,super.detach()}},Bh=class extends Ca{constructor(i){super(),this.element=i instanceof Ae?i.nativeElement:i}},bs=class{constructor(){this._isDisposed=!1,this.attachDomPortal=null}hasAttached(){return!!this._attachedPortal}attach(i){if(i instanceof _s)return this._attachedPortal=i,this.attachComponentPortal(i);if(i instanceof vs)return this._attachedPortal=i,this.attachTemplatePortal(i);if(this.attachDomPortal&&i instanceof Bh)return this._attachedPortal=i,this.attachDomPortal(i)}detach(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}dispose(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}setDisposeFn(i){this._disposeFn=i}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}};var qc=class extends bs{constructor(i,e,n,o,r){super(),this.outletElement=i,this._componentFactoryResolver=e,this._appRef=n,this._defaultInjector=o,this.attachDomPortal=s=>{this._document;let a=s.element;a.parentNode;let l=this._document.createComment("dom-portal");a.parentNode.insertBefore(l,a),this.outletElement.appendChild(a),this._attachedPortal=s,super.setDisposeFn(()=>{l.parentNode&&l.parentNode.replaceChild(a,l)})},this._document=r}attachComponentPortal(i){let n=(i.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(i.component),o;return i.viewContainerRef?(o=i.viewContainerRef.createComponent(n,i.viewContainerRef.length,i.injector||i.viewContainerRef.injector,i.projectableNodes||void 0),this.setDisposeFn(()=>o.destroy())):(o=n.create(i.injector||this._defaultInjector||Wt.NULL),this._appRef.attachView(o.hostView),this.setDisposeFn(()=>{this._appRef.viewCount>0&&this._appRef.detachView(o.hostView),o.destroy()})),this.outletElement.appendChild(this._getComponentRootNode(o)),this._attachedPortal=i,o}attachTemplatePortal(i){let e=i.viewContainerRef,n=e.createEmbeddedView(i.templateRef,i.context,{injector:i.injector});return n.rootNodes.forEach(o=>this.outletElement.appendChild(o)),n.detectChanges(),this.setDisposeFn(()=>{let o=e.indexOf(n);o!==-1&&e.remove(o)}),this._attachedPortal=i,n}dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(i){return i.hostView.rootNodes[0]}};var wa=(()=>{class t extends bs{constructor(e,n,o){super(),this._componentFactoryResolver=e,this._viewContainerRef=n,this._isInitialized=!1,this.attached=new de,this.attachDomPortal=r=>{this._document;let s=r.element;s.parentNode;let a=this._document.createComment("dom-portal");r.setAttachedHost(this),s.parentNode.insertBefore(a,s),this._getRootNode().appendChild(s),this._attachedPortal=r,super.setDisposeFn(()=>{a.parentNode&&a.parentNode.replaceChild(s,a)})},this._document=o}get portal(){return this._attachedPortal}set portal(e){this.hasAttached()&&!e&&!this._isInitialized||(this.hasAttached()&&super.detach(),e&&super.attach(e),this._attachedPortal=e||null)}get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedRef=this._attachedPortal=null}attachComponentPortal(e){e.setAttachedHost(this);let n=e.viewContainerRef!=null?e.viewContainerRef:this._viewContainerRef,r=(e.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(e.component),s=n.createComponent(r,n.length,e.injector||n.injector,e.projectableNodes||void 0);return n!==this._viewContainerRef&&this._getRootNode().appendChild(s.hostView.rootNodes[0]),super.setDisposeFn(()=>s.destroy()),this._attachedPortal=e,this._attachedRef=s,this.attached.emit(s),s}attachTemplatePortal(e){e.setAttachedHost(this);let n=this._viewContainerRef.createEmbeddedView(e.templateRef,e.context,{injector:e.injector});return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=e,this._attachedRef=n,this.attached.emit(n),n}_getRootNode(){let e=this._viewContainerRef.element.nativeElement;return e.nodeType===e.ELEMENT_NODE?e:e.parentNode}static{this.\u0275fac=function(n){return new(n||t)(_(ua),_(ni),_(wt))}}static{this.\u0275dir=Se({type:t,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:[0,"cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],standalone:!0,features:[ot]})}}return t})();var Or=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275mod=ht({type:t})}static{this.\u0275inj=dt({})}}return t})();var d0=qg(),Hh=class{constructor(i,e){this._viewportRuler=i,this._previousHTMLStyles={top:"",left:""},this._isEnabled=!1,this._document=e}attach(){}enable(){if(this._canBeEnabled()){let i=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=i.style.left||"",this._previousHTMLStyles.top=i.style.top||"",i.style.left=Nt(-this._previousScrollPosition.left),i.style.top=Nt(-this._previousScrollPosition.top),i.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){let i=this._document.documentElement,e=this._document.body,n=i.style,o=e.style,r=n.scrollBehavior||"",s=o.scrollBehavior||"";this._isEnabled=!1,n.left=this._previousHTMLStyles.left,n.top=this._previousHTMLStyles.top,i.classList.remove("cdk-global-scrollblock"),d0&&(n.scrollBehavior=o.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),d0&&(n.scrollBehavior=r,o.scrollBehavior=s)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;let e=this._document.body,n=this._viewportRuler.getViewportSize();return e.scrollHeight>n.height||e.scrollWidth>n.width}};var jh=class{constructor(i,e,n,o){this._scrollDispatcher=i,this._ngZone=e,this._viewportRuler=n,this._config=o,this._scrollSubscription=null,this._detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}}attach(i){this._overlayRef,this._overlayRef=i}enable(){if(this._scrollSubscription)return;let i=this._scrollDispatcher.scrolled(0).pipe(vi(e=>!e||!this._overlayRef.overlayElement.contains(e.getElementRef().nativeElement)));this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=i.subscribe(()=>{let e=this._viewportRuler.getViewportScrollPosition().top;Math.abs(e-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=i.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}},zc=class{enable(){}disable(){}attach(){}};function qh(t,i){return i.some(e=>{let n=t.bottom<e.top,o=t.top>e.bottom,r=t.right<e.left,s=t.left>e.right;return n||o||r||s})}function p0(t,i){return i.some(e=>{let n=t.top<e.top,o=t.bottom>e.bottom,r=t.left<e.left,s=t.right>e.right;return n||o||r||s})}var zh=class{constructor(i,e,n,o){this._scrollDispatcher=i,this._viewportRuler=e,this._ngZone=n,this._config=o,this._scrollSubscription=null}attach(i){this._overlayRef,this._overlayRef=i}enable(){if(!this._scrollSubscription){let i=this._config?this._config.scrollThrottle:0;this._scrollSubscription=this._scrollDispatcher.scrolled(i).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){let e=this._overlayRef.overlayElement.getBoundingClientRect(),{width:n,height:o}=this._viewportRuler.getViewportSize();qh(e,[{width:n,height:o,bottom:o,right:n,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}})}}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}},W1=(()=>{class t{constructor(e,n,o,r){this._scrollDispatcher=e,this._viewportRuler=n,this._ngZone=o,this.noop=()=>new zc,this.close=s=>new jh(this._scrollDispatcher,this._ngZone,this._viewportRuler,s),this.block=()=>new Hh(this._viewportRuler,this._document),this.reposition=s=>new zh(this._scrollDispatcher,this._viewportRuler,this._ngZone,s),this._document=r}static{this.\u0275fac=function(n){return new(n||t)(D(dc),D($n),D(Je),D(wt))}}static{this.\u0275prov=ne({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})(),Sa=class{constructor(i){if(this.scrollStrategy=new zc,this.panelClass="",this.hasBackdrop=!1,this.backdropClass="cdk-overlay-dark-backdrop",this.disposeOnNavigation=!1,i){let e=Object.keys(i);for(let n of e)i[n]!==void 0&&(this[n]=i[n])}}};var Gh=class{constructor(i,e){this.connectionPair=i,this.scrollableViewProperties=e}};var _0=(()=>{class t{constructor(e){this._attachedOverlays=[],this._document=e}ngOnDestroy(){this.detach()}add(e){this.remove(e),this._attachedOverlays.push(e)}remove(e){let n=this._attachedOverlays.indexOf(e);n>-1&&this._attachedOverlays.splice(n,1),this._attachedOverlays.length===0&&this.detach()}static{this.\u0275fac=function(n){return new(n||t)(D(wt))}}static{this.\u0275prov=ne({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})(),Q1=(()=>{class t extends _0{constructor(e,n){super(e),this._ngZone=n,this._keydownListener=o=>{let r=this._attachedOverlays;for(let s=r.length-1;s>-1;s--)if(r[s]._keydownEvents.observers.length>0){let a=r[s]._keydownEvents;this._ngZone?this._ngZone.run(()=>a.next(o)):a.next(o);break}}}add(e){super.add(e),this._isAttached||(this._ngZone?this._ngZone.runOutsideAngular(()=>this._document.body.addEventListener("keydown",this._keydownListener)):this._document.body.addEventListener("keydown",this._keydownListener),this._isAttached=!0)}detach(){this._isAttached&&(this._document.body.removeEventListener("keydown",this._keydownListener),this._isAttached=!1)}static{this.\u0275fac=function(n){return new(n||t)(D(wt),D(Je,8))}}static{this.\u0275prov=ne({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})(),Y1=(()=>{class t extends _0{constructor(e,n,o){super(e),this._platform=n,this._ngZone=o,this._cursorStyleIsSet=!1,this._pointerDownListener=r=>{this._pointerDownEventTarget=jo(r)},this._clickListener=r=>{let s=jo(r),a=r.type==="click"&&this._pointerDownEventTarget?this._pointerDownEventTarget:s;this._pointerDownEventTarget=null;let l=this._attachedOverlays.slice();for(let c=l.length-1;c>-1;c--){let d=l[c];if(d._outsidePointerEvents.observers.length<1||!d.hasAttached())continue;if(h0(d.overlayElement,s)||h0(d.overlayElement,a))break;let p=d._outsidePointerEvents;this._ngZone?this._ngZone.run(()=>p.next(r)):p.next(r)}}}add(e){if(super.add(e),!this._isAttached){let n=this._document.body;this._ngZone?this._ngZone.runOutsideAngular(()=>this._addEventListeners(n)):this._addEventListeners(n),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=n.style.cursor,n.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0}}detach(){if(this._isAttached){let e=this._document.body;e.removeEventListener("pointerdown",this._pointerDownListener,!0),e.removeEventListener("click",this._clickListener,!0),e.removeEventListener("auxclick",this._clickListener,!0),e.removeEventListener("contextmenu",this._clickListener,!0),this._platform.IOS&&this._cursorStyleIsSet&&(e.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1}}_addEventListeners(e){e.addEventListener("pointerdown",this._pointerDownListener,!0),e.addEventListener("click",this._clickListener,!0),e.addEventListener("auxclick",this._clickListener,!0),e.addEventListener("contextmenu",this._clickListener,!0)}static{this.\u0275fac=function(n){return new(n||t)(D(wt),D(Oi),D(Je,8))}}static{this.\u0275prov=ne({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function h0(t,i){let e=typeof ShadowRoot<"u"&&ShadowRoot,n=i;for(;n;){if(n===t)return!0;n=e&&n instanceof ShadowRoot?n.host:n.parentNode}return!1}var Cs=(()=>{class t{constructor(e,n){this._platform=n,this._document=e}ngOnDestroy(){this._containerElement?.remove()}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let e="cdk-overlay-container";if(this._platform.isBrowser||Ch()){let o=this._document.querySelectorAll(`.${e}[platform="server"], .${e}[platform="test"]`);for(let r=0;r<o.length;r++)o[r].remove()}let n=this._document.createElement("div");n.classList.add(e),Ch()?n.setAttribute("platform","test"):this._platform.isBrowser||n.setAttribute("platform","server"),this._document.body.appendChild(n),this._containerElement=n}static{this.\u0275fac=function(n){return new(n||t)(D(wt),D(Oi))}}static{this.\u0275prov=ne({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})(),yo=class{constructor(i,e,n,o,r,s,a,l,c,d=!1,p){this._portalOutlet=i,this._host=e,this._pane=n,this._config=o,this._ngZone=r,this._keyboardDispatcher=s,this._document=a,this._location=l,this._outsideClickDispatcher=c,this._animationsDisabled=d,this._injector=p,this._backdropElement=null,this._backdropClick=new X,this._attachments=new X,this._detachments=new X,this._locationChanges=gi.EMPTY,this._backdropClickHandler=h=>this._backdropClick.next(h),this._backdropTransitionendHandler=h=>{this._disposeBackdrop(h.target)},this._keydownEvents=new X,this._outsidePointerEvents=new X,this._renders=new X,o.scrollStrategy&&(this._scrollStrategy=o.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=o.positionStrategy,this._afterRenderRef=wr(()=>Lg(()=>{this._renders.next()},{injector:this._injector}))}get overlayElement(){return this._pane}get backdropElement(){return this._backdropElement}get hostElement(){return this._host}attach(i){!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host);let e=this._portalOutlet.attach(i);return this._positionStrategy&&this._positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._afterNextRenderRef?.destroy(),this._afterNextRenderRef=Bn(()=>{this.hasAttached()&&this.updatePosition()},{injector:this._injector}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher.add(this),typeof e?.onDestroy=="function"&&e.onDestroy(()=>{this.hasAttached()&&this._ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>this.detach()))}),e}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();let i=this._portalOutlet.detach();return this._detachments.next(),this._keyboardDispatcher.remove(this),this._detachContentWhenEmpty(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),i}dispose(){let i=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this._disposeBackdrop(this._backdropElement),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),this._host?.remove(),this._afterNextRenderRef?.destroy(),this._previousHostParent=this._pane=this._host=null,i&&this._detachments.next(),this._detachments.complete(),this._afterRenderRef.destroy(),this._renders.complete()}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(i){i!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=i,this.hasAttached()&&(i.attach(this),this.updatePosition()))}updateSize(i){this._config=E(E({},this._config),i),this._updateElementSize()}setDirection(i){this._config=ee(E({},this._config),{direction:i}),this._updateElementDirection()}addPanelClass(i){this._pane&&this._toggleClasses(this._pane,i,!0)}removePanelClass(i){this._pane&&this._toggleClasses(this._pane,i,!1)}getDirection(){let i=this._config.direction;return i?typeof i=="string"?i:i.value:"ltr"}updateScrollStrategy(i){i!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=i,this.hasAttached()&&(i.attach(this),i.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;let i=this._pane.style;i.width=Nt(this._config.width),i.height=Nt(this._config.height),i.minWidth=Nt(this._config.minWidth),i.minHeight=Nt(this._config.minHeight),i.maxWidth=Nt(this._config.maxWidth),i.maxHeight=Nt(this._config.maxHeight)}_togglePointerEvents(i){this._pane.style.pointerEvents=i?"":"none"}_attachBackdrop(){let i="cdk-overlay-backdrop-showing";this._backdropElement=this._document.createElement("div"),this._backdropElement.classList.add("cdk-overlay-backdrop"),this._animationsDisabled&&this._backdropElement.classList.add("cdk-overlay-backdrop-noop-animation"),this._config.backdropClass&&this._toggleClasses(this._backdropElement,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropElement,this._host),this._backdropElement.addEventListener("click",this._backdropClickHandler),!this._animationsDisabled&&typeof requestAnimationFrame<"u"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{this._backdropElement&&this._backdropElement.classList.add(i)})}):this._backdropElement.classList.add(i)}_updateStackingOrder(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){let i=this._backdropElement;if(i){if(this._animationsDisabled){this._disposeBackdrop(i);return}i.classList.remove("cdk-overlay-backdrop-showing"),this._ngZone.runOutsideAngular(()=>{i.addEventListener("transitionend",this._backdropTransitionendHandler)}),i.style.pointerEvents="none",this._backdropTimeout=this._ngZone.runOutsideAngular(()=>setTimeout(()=>{this._disposeBackdrop(i)},500))}}_toggleClasses(i,e,n){let o=fa(e||[]).filter(r=>!!r);o.length&&(n?i.classList.add(...o):i.classList.remove(...o))}_detachContentWhenEmpty(){this._ngZone.runOutsideAngular(()=>{let i=this._renders.pipe(ye(Zt(this._attachments,this._detachments))).subscribe(()=>{(!this._pane||!this._host||this._pane.children.length===0)&&(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._host.remove()),i.unsubscribe())})})}_disposeScrollStrategy(){let i=this._scrollStrategy;i&&(i.disable(),i.detach&&i.detach())}_disposeBackdrop(i){i&&(i.removeEventListener("click",this._backdropClickHandler),i.removeEventListener("transitionend",this._backdropTransitionendHandler),i.remove(),this._backdropElement===i&&(this._backdropElement=null)),this._backdropTimeout&&(clearTimeout(this._backdropTimeout),this._backdropTimeout=void 0)}},u0="cdk-overlay-connected-position-bounding-box",X1=/([A-Za-z%]+)$/,$h=class{get positions(){return this._preferredPositions}constructor(i,e,n,o,r){this._viewportRuler=e,this._document=n,this._platform=o,this._overlayContainer=r,this._lastBoundingBoxSize={width:0,height:0},this._isPushed=!1,this._canPush=!0,this._growAfterOpen=!1,this._hasFlexibleDimensions=!0,this._positionLocked=!1,this._viewportMargin=0,this._scrollables=[],this._preferredPositions=[],this._positionChanges=new X,this._resizeSubscription=gi.EMPTY,this._offsetX=0,this._offsetY=0,this._appliedPanelClasses=[],this.positionChanges=this._positionChanges,this.setOrigin(i)}attach(i){this._overlayRef&&this._overlayRef,this._validatePositions(),i.hostElement.classList.add(u0),this._overlayRef=i,this._boundingBox=i.hostElement,this._pane=i.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition){this.reapplyLastPosition();return}this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let i=this._originRect,e=this._overlayRect,n=this._viewportRect,o=this._containerRect,r=[],s;for(let a of this._preferredPositions){let l=this._getOriginPoint(i,o,a),c=this._getOverlayPoint(l,e,a),d=this._getOverlayFit(c,e,n,a);if(d.isCompletelyWithinViewport){this._isPushed=!1,this._applyPosition(a,l);return}if(this._canFitWithFlexibleDimensions(d,c,n)){r.push({position:a,origin:l,overlayRect:e,boundingBoxRect:this._calculateBoundingBoxRect(l,a)});continue}(!s||s.overlayFit.visibleArea<d.visibleArea)&&(s={overlayFit:d,overlayPoint:c,originPoint:l,position:a,overlayRect:e})}if(r.length){let a=null,l=-1;for(let c of r){let d=c.boundingBoxRect.width*c.boundingBoxRect.height*(c.position.weight||1);d>l&&(l=d,a=c)}this._isPushed=!1,this._applyPosition(a.position,a.origin);return}if(this._canPush){this._isPushed=!0,this._applyPosition(s.position,s.originPoint);return}this._applyPosition(s.position,s.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&Ir(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(u0),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(this._isDisposed||!this._platform.isBrowser)return;let i=this._lastPosition;if(i){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let e=this._getOriginPoint(this._originRect,this._containerRect,i);this._applyPosition(i,e)}else this.apply()}withScrollableContainers(i){return this._scrollables=i,this}withPositions(i){return this._preferredPositions=i,i.indexOf(this._lastPosition)===-1&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(i){return this._viewportMargin=i,this}withFlexibleDimensions(i=!0){return this._hasFlexibleDimensions=i,this}withGrowAfterOpen(i=!0){return this._growAfterOpen=i,this}withPush(i=!0){return this._canPush=i,this}withLockedPosition(i=!0){return this._positionLocked=i,this}setOrigin(i){return this._origin=i,this}withDefaultOffsetX(i){return this._offsetX=i,this}withDefaultOffsetY(i){return this._offsetY=i,this}withTransformOriginOn(i){return this._transformOriginSelector=i,this}_getOriginPoint(i,e,n){let o;if(n.originX=="center")o=i.left+i.width/2;else{let s=this._isRtl()?i.right:i.left,a=this._isRtl()?i.left:i.right;o=n.originX=="start"?s:a}e.left<0&&(o-=e.left);let r;return n.originY=="center"?r=i.top+i.height/2:r=n.originY=="top"?i.top:i.bottom,e.top<0&&(r-=e.top),{x:o,y:r}}_getOverlayPoint(i,e,n){let o;n.overlayX=="center"?o=-e.width/2:n.overlayX==="start"?o=this._isRtl()?-e.width:0:o=this._isRtl()?0:-e.width;let r;return n.overlayY=="center"?r=-e.height/2:r=n.overlayY=="top"?0:-e.height,{x:i.x+o,y:i.y+r}}_getOverlayFit(i,e,n,o){let r=f0(e),{x:s,y:a}=i,l=this._getOffset(o,"x"),c=this._getOffset(o,"y");l&&(s+=l),c&&(a+=c);let d=0-s,p=s+r.width-n.width,h=0-a,m=a+r.height-n.height,S=this._subtractOverflows(r.width,d,p),y=this._subtractOverflows(r.height,h,m),w=S*y;return{visibleArea:w,isCompletelyWithinViewport:r.width*r.height===w,fitsInViewportVertically:y===r.height,fitsInViewportHorizontally:S==r.width}}_canFitWithFlexibleDimensions(i,e,n){if(this._hasFlexibleDimensions){let o=n.bottom-e.y,r=n.right-e.x,s=m0(this._overlayRef.getConfig().minHeight),a=m0(this._overlayRef.getConfig().minWidth),l=i.fitsInViewportVertically||s!=null&&s<=o,c=i.fitsInViewportHorizontally||a!=null&&a<=r;return l&&c}return!1}_pushOverlayOnScreen(i,e,n){if(this._previousPushAmount&&this._positionLocked)return{x:i.x+this._previousPushAmount.x,y:i.y+this._previousPushAmount.y};let o=f0(e),r=this._viewportRect,s=Math.max(i.x+o.width-r.width,0),a=Math.max(i.y+o.height-r.height,0),l=Math.max(r.top-n.top-i.y,0),c=Math.max(r.left-n.left-i.x,0),d=0,p=0;return o.width<=r.width?d=c||-s:d=i.x<this._viewportMargin?r.left-n.left-i.x:0,o.height<=r.height?p=l||-a:p=i.y<this._viewportMargin?r.top-n.top-i.y:0,this._previousPushAmount={x:d,y:p},{x:i.x+d,y:i.y+p}}_applyPosition(i,e){if(this._setTransformOrigin(i),this._setOverlayElementStyles(e,i),this._setBoundingBoxStyles(e,i),i.panelClass&&this._addPanelClasses(i.panelClass),this._positionChanges.observers.length){let n=this._getScrollVisibility();if(i!==this._lastPosition||!this._lastScrollVisibility||!K1(this._lastScrollVisibility,n)){let o=new Gh(i,n);this._positionChanges.next(o)}this._lastScrollVisibility=n}this._lastPosition=i,this._isInitialRender=!1}_setTransformOrigin(i){if(!this._transformOriginSelector)return;let e=this._boundingBox.querySelectorAll(this._transformOriginSelector),n,o=i.overlayY;i.overlayX==="center"?n="center":this._isRtl()?n=i.overlayX==="start"?"right":"left":n=i.overlayX==="start"?"left":"right";for(let r=0;r<e.length;r++)e[r].style.transformOrigin=`${n} ${o}`}_calculateBoundingBoxRect(i,e){let n=this._viewportRect,o=this._isRtl(),r,s,a;if(e.overlayY==="top")s=i.y,r=n.height-s+this._viewportMargin;else if(e.overlayY==="bottom")a=n.height-i.y+this._viewportMargin*2,r=n.height-a+this._viewportMargin;else{let m=Math.min(n.bottom-i.y+n.top,i.y),S=this._lastBoundingBoxSize.height;r=m*2,s=i.y-m,r>S&&!this._isInitialRender&&!this._growAfterOpen&&(s=i.y-S/2)}let l=e.overlayX==="start"&&!o||e.overlayX==="end"&&o,c=e.overlayX==="end"&&!o||e.overlayX==="start"&&o,d,p,h;if(c)h=n.width-i.x+this._viewportMargin*2,d=i.x-this._viewportMargin;else if(l)p=i.x,d=n.right-i.x;else{let m=Math.min(n.right-i.x+n.left,i.x),S=this._lastBoundingBoxSize.width;d=m*2,p=i.x-m,d>S&&!this._isInitialRender&&!this._growAfterOpen&&(p=i.x-S/2)}return{top:s,left:p,bottom:a,right:h,width:d,height:r}}_setBoundingBoxStyles(i,e){let n=this._calculateBoundingBoxRect(i,e);!this._isInitialRender&&!this._growAfterOpen&&(n.height=Math.min(n.height,this._lastBoundingBoxSize.height),n.width=Math.min(n.width,this._lastBoundingBoxSize.width));let o={};if(this._hasExactPosition())o.top=o.left="0",o.bottom=o.right=o.maxHeight=o.maxWidth="",o.width=o.height="100%";else{let r=this._overlayRef.getConfig().maxHeight,s=this._overlayRef.getConfig().maxWidth;o.height=Nt(n.height),o.top=Nt(n.top),o.bottom=Nt(n.bottom),o.width=Nt(n.width),o.left=Nt(n.left),o.right=Nt(n.right),e.overlayX==="center"?o.alignItems="center":o.alignItems=e.overlayX==="end"?"flex-end":"flex-start",e.overlayY==="center"?o.justifyContent="center":o.justifyContent=e.overlayY==="bottom"?"flex-end":"flex-start",r&&(o.maxHeight=Nt(r)),s&&(o.maxWidth=Nt(s))}this._lastBoundingBoxSize=n,Ir(this._boundingBox.style,o)}_resetBoundingBoxStyles(){Ir(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){Ir(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(i,e){let n={},o=this._hasExactPosition(),r=this._hasFlexibleDimensions,s=this._overlayRef.getConfig();if(o){let d=this._viewportRuler.getViewportScrollPosition();Ir(n,this._getExactOverlayY(e,i,d)),Ir(n,this._getExactOverlayX(e,i,d))}else n.position="static";let a="",l=this._getOffset(e,"x"),c=this._getOffset(e,"y");l&&(a+=`translateX(${l}px) `),c&&(a+=`translateY(${c}px)`),n.transform=a.trim(),s.maxHeight&&(o?n.maxHeight=Nt(s.maxHeight):r&&(n.maxHeight="")),s.maxWidth&&(o?n.maxWidth=Nt(s.maxWidth):r&&(n.maxWidth="")),Ir(this._pane.style,n)}_getExactOverlayY(i,e,n){let o={top:"",bottom:""},r=this._getOverlayPoint(e,this._overlayRect,i);if(this._isPushed&&(r=this._pushOverlayOnScreen(r,this._overlayRect,n)),i.overlayY==="bottom"){let s=this._document.documentElement.clientHeight;o.bottom=`${s-(r.y+this._overlayRect.height)}px`}else o.top=Nt(r.y);return o}_getExactOverlayX(i,e,n){let o={left:"",right:""},r=this._getOverlayPoint(e,this._overlayRect,i);this._isPushed&&(r=this._pushOverlayOnScreen(r,this._overlayRect,n));let s;if(this._isRtl()?s=i.overlayX==="end"?"left":"right":s=i.overlayX==="end"?"right":"left",s==="right"){let a=this._document.documentElement.clientWidth;o.right=`${a-(r.x+this._overlayRect.width)}px`}else o.left=Nt(r.x);return o}_getScrollVisibility(){let i=this._getOriginRect(),e=this._pane.getBoundingClientRect(),n=this._scrollables.map(o=>o.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:p0(i,n),isOriginOutsideView:qh(i,n),isOverlayClipped:p0(e,n),isOverlayOutsideView:qh(e,n)}}_subtractOverflows(i,...e){return e.reduce((n,o)=>n-Math.max(o,0),i)}_getNarrowedViewportRect(){let i=this._document.documentElement.clientWidth,e=this._document.documentElement.clientHeight,n=this._viewportRuler.getViewportScrollPosition();return{top:n.top+this._viewportMargin,left:n.left+this._viewportMargin,right:n.left+i-this._viewportMargin,bottom:n.top+e-this._viewportMargin,width:i-2*this._viewportMargin,height:e-2*this._viewportMargin}}_isRtl(){return this._overlayRef.getDirection()==="rtl"}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(i,e){return e==="x"?i.offsetX==null?this._offsetX:i.offsetX:i.offsetY==null?this._offsetY:i.offsetY}_validatePositions(){}_addPanelClasses(i){this._pane&&fa(i).forEach(e=>{e!==""&&this._appliedPanelClasses.indexOf(e)===-1&&(this._appliedPanelClasses.push(e),this._pane.classList.add(e))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(i=>{this._pane.classList.remove(i)}),this._appliedPanelClasses=[])}_getOriginRect(){let i=this._origin;if(i instanceof Ae)return i.nativeElement.getBoundingClientRect();if(i instanceof Element)return i.getBoundingClientRect();let e=i.width||0,n=i.height||0;return{top:i.y,bottom:i.y+n,left:i.x,right:i.x+e,height:n,width:e}}};function Ir(t,i){for(let e in i)i.hasOwnProperty(e)&&(t[e]=i[e]);return t}function m0(t){if(typeof t!="number"&&t!=null){let[i,e]=t.split(X1);return!e||e==="px"?parseFloat(i):null}return t||null}function f0(t){return{top:Math.floor(t.top),right:Math.floor(t.right),bottom:Math.floor(t.bottom),left:Math.floor(t.left),width:Math.floor(t.width),height:Math.floor(t.height)}}function K1(t,i){return t===i?!0:t.isOriginClipped===i.isOriginClipped&&t.isOriginOutsideView===i.isOriginOutsideView&&t.isOverlayClipped===i.isOverlayClipped&&t.isOverlayOutsideView===i.isOverlayOutsideView}var g0="cdk-global-overlay-wrapper",Uh=class{constructor(){this._cssPosition="static",this._topOffset="",this._bottomOffset="",this._alignItems="",this._xPosition="",this._xOffset="",this._width="",this._height="",this._isDisposed=!1}attach(i){let e=i.getConfig();this._overlayRef=i,this._width&&!e.width&&i.updateSize({width:this._width}),this._height&&!e.height&&i.updateSize({height:this._height}),i.hostElement.classList.add(g0),this._isDisposed=!1}top(i=""){return this._bottomOffset="",this._topOffset=i,this._alignItems="flex-start",this}left(i=""){return this._xOffset=i,this._xPosition="left",this}bottom(i=""){return this._topOffset="",this._bottomOffset=i,this._alignItems="flex-end",this}right(i=""){return this._xOffset=i,this._xPosition="right",this}start(i=""){return this._xOffset=i,this._xPosition="start",this}end(i=""){return this._xOffset=i,this._xPosition="end",this}width(i=""){return this._overlayRef?this._overlayRef.updateSize({width:i}):this._width=i,this}height(i=""){return this._overlayRef?this._overlayRef.updateSize({height:i}):this._height=i,this}centerHorizontally(i=""){return this.left(i),this._xPosition="center",this}centerVertically(i=""){return this.top(i),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;let i=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement.style,n=this._overlayRef.getConfig(),{width:o,height:r,maxWidth:s,maxHeight:a}=n,l=(o==="100%"||o==="100vw")&&(!s||s==="100%"||s==="100vw"),c=(r==="100%"||r==="100vh")&&(!a||a==="100%"||a==="100vh"),d=this._xPosition,p=this._xOffset,h=this._overlayRef.getConfig().direction==="rtl",m="",S="",y="";l?y="flex-start":d==="center"?(y="center",h?S=p:m=p):h?d==="left"||d==="end"?(y="flex-end",m=p):(d==="right"||d==="start")&&(y="flex-start",S=p):d==="left"||d==="start"?(y="flex-start",m=p):(d==="right"||d==="end")&&(y="flex-end",S=p),i.position=this._cssPosition,i.marginLeft=l?"0":m,i.marginTop=c?"0":this._topOffset,i.marginBottom=this._bottomOffset,i.marginRight=l?"0":S,e.justifyContent=y,e.alignItems=c?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;let i=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement,n=e.style;e.classList.remove(g0),n.justifyContent=n.alignItems=i.marginTop=i.marginBottom=i.marginLeft=i.marginRight=i.position="",this._overlayRef=null,this._isDisposed=!0}},Z1=(()=>{class t{constructor(e,n,o,r){this._viewportRuler=e,this._document=n,this._platform=o,this._overlayContainer=r}global(){return new Uh}flexibleConnectedTo(e){return new $h(e,this._viewportRuler,this._document,this._platform,this._overlayContainer)}static{this.\u0275fac=function(n){return new(n||t)(D($n),D(wt),D(Oi),D(Cs))}}static{this.\u0275prov=ne({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})(),J1=0,bn=(()=>{class t{constructor(e,n,o,r,s,a,l,c,d,p,h,m){this.scrollStrategies=e,this._overlayContainer=n,this._componentFactoryResolver=o,this._positionBuilder=r,this._keyboardDispatcher=s,this._injector=a,this._ngZone=l,this._document=c,this._directionality=d,this._location=p,this._outsideClickDispatcher=h,this._animationsModuleType=m}create(e){let n=this._createHostElement(),o=this._createPaneElement(n),r=this._createPortalOutlet(o),s=new Sa(e);return s.direction=s.direction||this._directionality.value,new yo(r,n,o,s,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher,this._animationsModuleType==="NoopAnimations",this._injector.get(Kl))}position(){return this._positionBuilder}_createPaneElement(e){let n=this._document.createElement("div");return n.id=`cdk-overlay-${J1++}`,n.classList.add("cdk-overlay-pane"),e.appendChild(n),n}_createHostElement(){let e=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(e),e}_createPortalOutlet(e){return this._appRef||(this._appRef=this._injector.get(ic)),new qc(e,this._componentFactoryResolver,this._appRef,this._injector,this._document)}static{this.\u0275fac=function(n){return new(n||t)(D(W1),D(Cs),D(ua),D(Z1),D(Q1),D(Wt),D(Je),D(wt),D(Hi),D(nc),D(Y1),D(en,8))}}static{this.\u0275prov=ne({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var eT=new pt("cdk-connected-overlay-scroll-strategy",{providedIn:"root",factory:()=>{let t=je(bn);return()=>t.scrollStrategies.reposition()}});function tT(t){return()=>t.scrollStrategies.reposition()}var iT={provide:eT,deps:[bn],useFactory:tT},Gc=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275mod=ht({type:t})}static{this.\u0275inj=dt({providers:[bn,iT],imports:[zg,Or,vn,vn]})}}return t})();function nT(t,i){}var Dr=class{constructor(){this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.data=null,this.ariaDescribedBy=null,this.ariaLabelledBy=null,this.ariaLabel=null,this.ariaModal=!0,this.autoFocus="first-tabbable",this.restoreFocus=!0,this.closeOnNavigation=!0,this.closeOnDestroy=!0,this.closeOnOverlayDetachments=!0}};var Xh=(()=>{class t extends bs{constructor(e,n,o,r,s,a,l,c){super(),this._elementRef=e,this._focusTrapFactory=n,this._config=r,this._interactivityChecker=s,this._ngZone=a,this._overlayRef=l,this._focusMonitor=c,this._platform=je(Oi),this._focusTrap=null,this._elementFocusedBeforeDialogWasOpened=null,this._closeInteractionType=null,this._ariaLabelledByQueue=[],this._changeDetectorRef=je(tn),this._injector=je(Wt),this._isDestroyed=!1,this.attachDomPortal=d=>{this._portalOutlet.hasAttached();let p=this._portalOutlet.attachDomPortal(d);return this._contentAttached(),p},this._document=o,this._config.ariaLabelledBy&&this._ariaLabelledByQueue.push(this._config.ariaLabelledBy)}_addAriaLabelledBy(e){this._ariaLabelledByQueue.push(e),this._changeDetectorRef.markForCheck()}_removeAriaLabelledBy(e){let n=this._ariaLabelledByQueue.indexOf(e);n>-1&&(this._ariaLabelledByQueue.splice(n,1),this._changeDetectorRef.markForCheck())}_contentAttached(){this._initializeFocusTrap(),this._handleBackdropClicks(),this._captureInitialFocus()}_captureInitialFocus(){this._trapFocus()}ngOnDestroy(){this._isDestroyed=!0,this._restoreFocus()}attachComponentPortal(e){this._portalOutlet.hasAttached();let n=this._portalOutlet.attachComponentPortal(e);return this._contentAttached(),n}attachTemplatePortal(e){this._portalOutlet.hasAttached();let n=this._portalOutlet.attachTemplatePortal(e);return this._contentAttached(),n}_recaptureFocus(){this._containsFocus()||this._trapFocus()}_forceFocus(e,n){this._interactivityChecker.isFocusable(e)||(e.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{let o=()=>{e.removeEventListener("blur",o),e.removeEventListener("mousedown",o),e.removeAttribute("tabindex")};e.addEventListener("blur",o),e.addEventListener("mousedown",o)})),e.focus(n)}_focusByCssSelector(e,n){let o=this._elementRef.nativeElement.querySelector(e);o&&this._forceFocus(o,n)}_trapFocus(){this._isDestroyed||Bn(()=>{let e=this._elementRef.nativeElement;switch(this._config.autoFocus){case!1:case"dialog":this._containsFocus()||e.focus();break;case!0:case"first-tabbable":this._focusTrap?.focusInitialElement()||this._focusDialogContainer();break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]');break;default:this._focusByCssSelector(this._config.autoFocus);break}},{injector:this._injector})}_restoreFocus(){let e=this._config.restoreFocus,n=null;if(typeof e=="string"?n=this._document.querySelector(e):typeof e=="boolean"?n=e?this._elementFocusedBeforeDialogWasOpened:null:e&&(n=e),this._config.restoreFocus&&n&&typeof n.focus=="function"){let o=rc(),r=this._elementRef.nativeElement;(!o||o===this._document.body||o===r||r.contains(o))&&(this._focusMonitor?(this._focusMonitor.focusVia(n,this._closeInteractionType),this._closeInteractionType=null):n.focus())}this._focusTrap&&this._focusTrap.destroy()}_focusDialogContainer(){this._elementRef.nativeElement.focus&&this._elementRef.nativeElement.focus()}_containsFocus(){let e=this._elementRef.nativeElement,n=rc();return e===n||e.contains(n)}_initializeFocusTrap(){this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=rc()))}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}static{this.\u0275fac=function(n){return new(n||t)(_(Ae),_(uc),_(wt,8),_(Dr),_(hc),_(Je),_(yo),_(cs))}}static{this.\u0275cmp=F({type:t,selectors:[["cdk-dialog-container"]],viewQuery:function(n,o){if(n&1&&Ee(wa,7),n&2){let r;me(r=fe())&&(o._portalOutlet=r.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(n,o){n&2&&et("id",o._config.id||null)("role",o._config.role)("aria-modal",o._config.ariaModal)("aria-labelledby",o._config.ariaLabel?null:o._ariaLabelledByQueue[0])("aria-label",o._config.ariaLabel)("aria-describedby",o._config.ariaDescribedBy||null)},standalone:!0,features:[ot,B],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(n,o){n&1&&T(0,nT,0,0,"ng-template",0)},dependencies:[wa],styles:[".cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}"],encapsulation:2})}}return t})(),Ea=class{constructor(i,e){this.overlayRef=i,this.config=e,this.closed=new X,this.disableClose=e.disableClose,this.backdropClick=i.backdropClick(),this.keydownEvents=i.keydownEvents(),this.outsidePointerEvents=i.outsidePointerEvents(),this.id=e.id,this.keydownEvents.subscribe(n=>{n.keyCode===27&&!this.disableClose&&!ls(n)&&(n.preventDefault(),this.close(void 0,{focusOrigin:"keyboard"}))}),this.backdropClick.subscribe(()=>{this.disableClose||this.close(void 0,{focusOrigin:"mouse"})}),this._detachSubscription=i.detachments().subscribe(()=>{e.closeOnOverlayDetachments!==!1&&this.close()})}close(i,e){if(this.containerInstance){let n=this.closed;this.containerInstance._closeInteractionType=e?.focusOrigin||"program",this._detachSubscription.unsubscribe(),this.overlayRef.dispose(),n.next(i),n.complete(),this.componentInstance=this.containerInstance=null}}updatePosition(){return this.overlayRef.updatePosition(),this}updateSize(i="",e=""){return this.overlayRef.updateSize({width:i,height:e}),this}addPanelClass(i){return this.overlayRef.addPanelClass(i),this}removePanelClass(i){return this.overlayRef.removePanelClass(i),this}},oT=new pt("DialogScrollStrategy",{providedIn:"root",factory:()=>{let t=je(bn);return()=>t.scrollStrategies.block()}}),rT=new pt("DialogData"),sT=new pt("DefaultDialogConfig");var aT=0,Kh=(()=>{class t{get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}constructor(e,n,o,r,s,a){this._overlay=e,this._injector=n,this._defaultOptions=o,this._parentDialog=r,this._overlayContainer=s,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new X,this._afterOpenedAtThisLevel=new X,this._ariaHiddenElements=new Map,this.afterAllClosed=is(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(xi(void 0))),this._scrollStrategy=a}open(e,n){let o=this._defaultOptions||new Dr;n=E(E({},o),n),n.id=n.id||`cdk-dialog-${aT++}`,n.id&&this.getDialogById(n.id);let r=this._getOverlayConfig(n),s=this._overlay.create(r),a=new Ea(s,n),l=this._attachContainer(s,a,n);return a.containerInstance=l,this._attachDialogContent(e,a,l,n),this.openDialogs.length||this._hideNonDialogContentFromAssistiveTechnology(),this.openDialogs.push(a),a.closed.subscribe(()=>this._removeOpenDialog(a,!0)),this.afterOpened.next(a),a}closeAll(){Qh(this.openDialogs,e=>e.close())}getDialogById(e){return this.openDialogs.find(n=>n.id===e)}ngOnDestroy(){Qh(this._openDialogsAtThisLevel,e=>{e.config.closeOnDestroy===!1&&this._removeOpenDialog(e,!1)}),Qh(this._openDialogsAtThisLevel,e=>e.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(e){let n=new Sa({positionStrategy:e.positionStrategy||this._overlay.position().global().centerHorizontally().centerVertically(),scrollStrategy:e.scrollStrategy||this._scrollStrategy(),panelClass:e.panelClass,hasBackdrop:e.hasBackdrop,direction:e.direction,minWidth:e.minWidth,minHeight:e.minHeight,maxWidth:e.maxWidth,maxHeight:e.maxHeight,width:e.width,height:e.height,disposeOnNavigation:e.closeOnNavigation});return e.backdropClass&&(n.backdropClass=e.backdropClass),n}_attachContainer(e,n,o){let r=o.injector||o.viewContainerRef?.injector,s=[{provide:Dr,useValue:o},{provide:Ea,useValue:n},{provide:yo,useValue:e}],a;o.container?typeof o.container=="function"?a=o.container:(a=o.container.type,s.push(...o.container.providers(o))):a=Xh;let l=new _s(a,o.viewContainerRef,Wt.create({parent:r||this._injector,providers:s}),o.componentFactoryResolver);return e.attach(l).instance}_attachDialogContent(e,n,o,r){if(e instanceof ii){let s=this._createInjector(r,n,o,void 0),a={$implicit:r.data,dialogRef:n};r.templateContext&&(a=E(E({},a),typeof r.templateContext=="function"?r.templateContext():r.templateContext)),o.attachTemplatePortal(new vs(e,null,a,s))}else{let s=this._createInjector(r,n,o,this._injector),a=o.attachComponentPortal(new _s(e,r.viewContainerRef,s,r.componentFactoryResolver));n.componentRef=a,n.componentInstance=a.instance}}_createInjector(e,n,o,r){let s=e.injector||e.viewContainerRef?.injector,a=[{provide:rT,useValue:e.data},{provide:Ea,useValue:n}];return e.providers&&(typeof e.providers=="function"?a.push(...e.providers(n,e,o)):a.push(...e.providers)),e.direction&&(!s||!s.get(Hi,null,{optional:!0}))&&a.push({provide:Hi,useValue:{value:e.direction,change:_i()}}),Wt.create({parent:s||r,providers:a})}_removeOpenDialog(e,n){let o=this.openDialogs.indexOf(e);o>-1&&(this.openDialogs.splice(o,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((r,s)=>{r?s.setAttribute("aria-hidden",r):s.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),n&&this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(){let e=this._overlayContainer.getContainerElement();if(e.parentElement){let n=e.parentElement.children;for(let o=n.length-1;o>-1;o--){let r=n[o];r!==e&&r.nodeName!=="SCRIPT"&&r.nodeName!=="STYLE"&&!r.hasAttribute("aria-live")&&(this._ariaHiddenElements.set(r,r.getAttribute("aria-hidden")),r.setAttribute("aria-hidden","true"))}}}_getAfterAllClosed(){let e=this._parentDialog;return e?e._getAfterAllClosed():this._afterAllClosedAtThisLevel}static{this.\u0275fac=function(n){return new(n||t)(D(bn),D(Wt),D(sT,8),D(t,12),D(Cs),D(oT))}}static{this.\u0275prov=ne({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function Qh(t,i){let e=t.length;for(;e--;)i(t[e])}var y0=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275mod=ht({type:t})}static{this.\u0275inj=dt({providers:[Kh],imports:[Gc,Or,Zg,Or]})}}return t})();function lT(t,i){}var Ta=class{constructor(){this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.data=null,this.ariaDescribedBy=null,this.ariaLabelledBy=null,this.ariaLabel=null,this.ariaModal=!0,this.autoFocus="first-tabbable",this.restoreFocus=!0,this.delayFocusTrap=!0,this.closeOnNavigation=!0}},Zh="mdc-dialog--open",C0="mdc-dialog--opening",w0="mdc-dialog--closing",cT=150,dT=75,pT=(()=>{class t extends Xh{constructor(e,n,o,r,s,a,l,c,d){super(e,n,o,r,s,a,l,d),this._animationMode=c,this._animationStateChanged=new de,this._animationsEnabled=this._animationMode!=="NoopAnimations",this._actionSectionCount=0,this._hostElement=this._elementRef.nativeElement,this._enterAnimationDuration=this._animationsEnabled?E0(this._config.enterAnimationDuration)??cT:0,this._exitAnimationDuration=this._animationsEnabled?E0(this._config.exitAnimationDuration)??dT:0,this._animationTimer=null,this._finishDialogOpen=()=>{this._clearAnimationClasses(),this._openAnimationDone(this._enterAnimationDuration)},this._finishDialogClose=()=>{this._clearAnimationClasses(),this._animationStateChanged.emit({state:"closed",totalTime:this._exitAnimationDuration})}}_contentAttached(){super._contentAttached(),this._startOpenAnimation()}_startOpenAnimation(){this._animationStateChanged.emit({state:"opening",totalTime:this._enterAnimationDuration}),this._animationsEnabled?(this._hostElement.style.setProperty(S0,`${this._enterAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(C0,Zh)),this._waitForAnimationToComplete(this._enterAnimationDuration,this._finishDialogOpen)):(this._hostElement.classList.add(Zh),Promise.resolve().then(()=>this._finishDialogOpen()))}_startExitAnimation(){this._animationStateChanged.emit({state:"closing",totalTime:this._exitAnimationDuration}),this._hostElement.classList.remove(Zh),this._animationsEnabled?(this._hostElement.style.setProperty(S0,`${this._exitAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(w0)),this._waitForAnimationToComplete(this._exitAnimationDuration,this._finishDialogClose)):Promise.resolve().then(()=>this._finishDialogClose())}_updateActionSectionCount(e){this._actionSectionCount+=e,this._changeDetectorRef.markForCheck()}_clearAnimationClasses(){this._hostElement.classList.remove(C0,w0)}_waitForAnimationToComplete(e,n){this._animationTimer!==null&&clearTimeout(this._animationTimer),this._animationTimer=setTimeout(n,e)}_requestAnimationFrame(e){this._ngZone.runOutsideAngular(()=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(e):e()})}_captureInitialFocus(){this._config.delayFocusTrap||this._trapFocus()}_openAnimationDone(e){this._config.delayFocusTrap&&this._trapFocus(),this._animationStateChanged.next({state:"opened",totalTime:e})}ngOnDestroy(){super.ngOnDestroy(),this._animationTimer!==null&&clearTimeout(this._animationTimer)}attachComponentPortal(e){let n=super.attachComponentPortal(e);return n.location.nativeElement.classList.add("mat-mdc-dialog-component-host"),n}static{this.\u0275fac=function(n){return new(n||t)(_(Ae),_(uc),_(wt,8),_(Ta),_(hc),_(Je),_(yo),_(en,8),_(cs))}}static{this.\u0275cmp=F({type:t,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-mdc-dialog-container","mdc-dialog"],hostVars:10,hostBindings:function(n,o){n&2&&(Fg("id",o._config.id),et("aria-modal",o._config.ariaModal)("role",o._config.role)("aria-labelledby",o._config.ariaLabel?null:o._ariaLabelledByQueue[0])("aria-label",o._config.ariaLabel)("aria-describedby",o._config.ariaDescribedBy||null),Fe("_mat-animation-noopable",!o._animationsEnabled)("mat-mdc-dialog-container-with-actions",o._actionSectionCount>0))},standalone:!0,features:[ot,B],decls:3,vars:0,consts:[[1,"mat-mdc-dialog-inner-container","mdc-dialog__container"],[1,"mat-mdc-dialog-surface","mdc-dialog__surface"],["cdkPortalOutlet",""]],template:function(n,o){n&1&&(f(0,"div",0)(1,"div",1),T(2,lT,0,0,"ng-template",2),g()())},dependencies:[wa],styles:['.mat-mdc-dialog-container{width:100%;height:100%;display:block;box-sizing:border-box;max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit;outline:0}.cdk-overlay-pane.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-max-width, 80vw);min-width:var(--mat-dialog-container-min-width, 0)}@media(max-width: 599px){.cdk-overlay-pane.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-small-max-width, 80vw)}}.mat-mdc-dialog-inner-container{display:flex;flex-direction:row;align-items:center;justify-content:space-around;box-sizing:border-box;height:100%;opacity:0;transition:opacity linear var(--mat-dialog-transition-duration, 0ms);max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit}.mdc-dialog--closing .mat-mdc-dialog-inner-container{transition:opacity 75ms linear;transform:none}.mdc-dialog--open .mat-mdc-dialog-inner-container{opacity:1}._mat-animation-noopable .mat-mdc-dialog-inner-container{transition:none}.mat-mdc-dialog-surface{display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;box-sizing:border-box;width:100%;height:100%;position:relative;overflow-y:auto;outline:0;transform:scale(0.8);transition:transform var(--mat-dialog-transition-duration, 0ms) cubic-bezier(0, 0, 0.2, 1);max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit;box-shadow:var(--mat-dialog-container-elevation-shadow, 0px 11px 15px -7px rgba(0, 0, 0, 0.2), 0px 24px 38px 3px rgba(0, 0, 0, 0.14), 0px 9px 46px 8px rgba(0, 0, 0, 0.12));border-radius:var(--mdc-dialog-container-shape, var(--mat-app-corner-extra-large, 4px));background-color:var(--mdc-dialog-container-color, var(--mat-app-surface, white))}[dir=rtl] .mat-mdc-dialog-surface{text-align:right}.mdc-dialog--open .mat-mdc-dialog-surface,.mdc-dialog--closing .mat-mdc-dialog-surface{transform:none}._mat-animation-noopable .mat-mdc-dialog-surface{transition:none}.mat-mdc-dialog-surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:2px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}.mat-mdc-dialog-title{display:block;position:relative;flex-shrink:0;box-sizing:border-box;margin:0 0 1px;padding:var(--mat-dialog-headline-padding, 0 24px 9px)}.mat-mdc-dialog-title::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}[dir=rtl] .mat-mdc-dialog-title{text-align:right}.mat-mdc-dialog-container .mat-mdc-dialog-title{color:var(--mdc-dialog-subhead-color, var(--mat-app-on-surface, rgba(0, 0, 0, 0.87)));font-family:var(--mdc-dialog-subhead-font, var(--mat-app-headline-small-font, inherit));line-height:var(--mdc-dialog-subhead-line-height, var(--mat-app-headline-small-line-height, 1.5rem));font-size:var(--mdc-dialog-subhead-size, var(--mat-app-headline-small-size, 1rem));font-weight:var(--mdc-dialog-subhead-weight, var(--mat-app-headline-small-weight, 400));letter-spacing:var(--mdc-dialog-subhead-tracking, var(--mat-app-headline-small-tracking, 0.03125em))}.mat-mdc-dialog-content{display:block;flex-grow:1;box-sizing:border-box;margin:0;overflow:auto;max-height:65vh}.mat-mdc-dialog-content>:first-child{margin-top:0}.mat-mdc-dialog-content>:last-child{margin-bottom:0}.mat-mdc-dialog-container .mat-mdc-dialog-content{color:var(--mdc-dialog-supporting-text-color, var(--mat-app-on-surface-variant, rgba(0, 0, 0, 0.6)));font-family:var(--mdc-dialog-supporting-text-font, var(--mat-app-body-medium-font, inherit));line-height:var(--mdc-dialog-supporting-text-line-height, var(--mat-app-body-medium-line-height, 1.5rem));font-size:var(--mdc-dialog-supporting-text-size, var(--mat-app-body-medium-size, 1rem));font-weight:var(--mdc-dialog-supporting-text-weight, var(--mat-app-body-medium-weight, 400));letter-spacing:var(--mdc-dialog-supporting-text-tracking, var(--mat-app-body-medium-tracking, 0.03125em))}.mat-mdc-dialog-container .mat-mdc-dialog-content{padding:var(--mat-dialog-content-padding, 20px 24px)}.mat-mdc-dialog-container-with-actions .mat-mdc-dialog-content{padding:var(--mat-dialog-with-actions-content-padding, 20px 24px)}.mat-mdc-dialog-container .mat-mdc-dialog-title+.mat-mdc-dialog-content{padding-top:0}.mat-mdc-dialog-actions{display:flex;position:relative;flex-shrink:0;flex-wrap:wrap;align-items:center;justify-content:flex-end;box-sizing:border-box;min-height:52px;margin:0;padding:8px;border-top:1px solid rgba(0,0,0,0);padding:var(--mat-dialog-actions-padding, 8px);justify-content:var(--mat-dialog-actions-alignment, start)}.cdk-high-contrast-active .mat-mdc-dialog-actions{border-top-color:CanvasText}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-start,.mat-mdc-dialog-actions[align=start]{justify-content:start}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-center,.mat-mdc-dialog-actions[align=center]{justify-content:center}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-end,.mat-mdc-dialog-actions[align=end]{justify-content:flex-end}.mat-mdc-dialog-actions .mat-button-base+.mat-button-base,.mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-mdc-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}.mat-mdc-dialog-component-host{display:contents}'],encapsulation:2})}}return t})(),S0="--mat-dialog-transition-duration";function E0(t){return t==null?null:typeof t=="number"?t:t.endsWith("ms")?as(t.substring(0,t.length-2)):t.endsWith("s")?as(t.substring(0,t.length-1))*1e3:t==="0"?0:null}var ws=function(t){return t[t.OPEN=0]="OPEN",t[t.CLOSING=1]="CLOSING",t[t.CLOSED=2]="CLOSED",t}(ws||{}),Zo=class{constructor(i,e,n){this._ref=i,this._containerInstance=n,this._afterOpened=new X,this._beforeClosed=new X,this._state=ws.OPEN,this.disableClose=e.disableClose,this.id=i.id,i.addPanelClass("mat-mdc-dialog-panel"),n._animationStateChanged.pipe(vi(o=>o.state==="opened"),Fn(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),n._animationStateChanged.pipe(vi(o=>o.state==="closed"),Fn(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),i.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),Zt(this.backdropClick(),this.keydownEvents().pipe(vi(o=>o.keyCode===27&&!this.disableClose&&!ls(o)))).subscribe(o=>{this.disableClose||(o.preventDefault(),hT(this,o.type==="keydown"?"keyboard":"mouse"))})}close(i){this._result=i,this._containerInstance._animationStateChanged.pipe(vi(e=>e.state==="closing"),Fn(1)).subscribe(e=>{this._beforeClosed.next(i),this._beforeClosed.complete(),this._ref.overlayRef.detachBackdrop(),this._closeFallbackTimeout=setTimeout(()=>this._finishDialogClose(),e.totalTime+100)}),this._state=ws.CLOSING,this._containerInstance._startExitAnimation()}afterOpened(){return this._afterOpened}afterClosed(){return this._ref.closed}beforeClosed(){return this._beforeClosed}backdropClick(){return this._ref.backdropClick}keydownEvents(){return this._ref.keydownEvents}updatePosition(i){let e=this._ref.config.positionStrategy;return i&&(i.left||i.right)?i.left?e.left(i.left):e.right(i.right):e.centerHorizontally(),i&&(i.top||i.bottom)?i.top?e.top(i.top):e.bottom(i.bottom):e.centerVertically(),this._ref.updatePosition(),this}updateSize(i="",e=""){return this._ref.updateSize(i,e),this}addPanelClass(i){return this._ref.addPanelClass(i),this}removePanelClass(i){return this._ref.removePanelClass(i),this}getState(){return this._state}_finishDialogClose(){this._state=ws.CLOSED,this._ref.close(this._result,{focusOrigin:this._closeInteractionType}),this.componentInstance=null}};function hT(t,i,e){return t._closeInteractionType=i,t.close(e)}var xa=new pt("MatMdcDialogData"),uT=new pt("mat-mdc-dialog-default-options"),mT=new pt("mat-mdc-dialog-scroll-strategy",{providedIn:"root",factory:()=>{let t=je(bn);return()=>t.scrollStrategies.block()}});var fT=0,Zn=(()=>{class t{get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}_getAfterAllClosed(){let e=this._parentDialog;return e?e._getAfterAllClosed():this._afterAllClosedAtThisLevel}constructor(e,n,o,r,s,a,l,c){this._overlay=e,this._defaultOptions=r,this._scrollStrategy=s,this._parentDialog=a,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new X,this._afterOpenedAtThisLevel=new X,this.dialogConfigClass=Ta,this.afterAllClosed=is(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(xi(void 0))),this._dialog=n.get(Kh),this._dialogRefConstructor=Zo,this._dialogContainerType=pT,this._dialogDataToken=xa}open(e,n){let o;n=E(E({},this._defaultOptions||new Ta),n),n.id=n.id||`mat-mdc-dialog-${fT++}`,n.scrollStrategy=n.scrollStrategy||this._scrollStrategy();let r=this._dialog.open(e,ee(E({},n),{positionStrategy:this._overlay.position().global().centerHorizontally().centerVertically(),disableClose:!0,closeOnDestroy:!1,closeOnOverlayDetachments:!1,container:{type:this._dialogContainerType,providers:()=>[{provide:this.dialogConfigClass,useValue:n},{provide:Dr,useValue:n}]},templateContext:()=>({dialogRef:o}),providers:(s,a,l)=>(o=new this._dialogRefConstructor(s,n,l),o.updatePosition(n?.position),[{provide:this._dialogContainerType,useValue:l},{provide:this._dialogDataToken,useValue:a.data},{provide:this._dialogRefConstructor,useValue:o}])}));return o.componentRef=r.componentRef,o.componentInstance=r.componentInstance,this.openDialogs.push(o),this.afterOpened.next(o),o.afterClosed().subscribe(()=>{let s=this.openDialogs.indexOf(o);s>-1&&(this.openDialogs.splice(s,1),this.openDialogs.length||this._getAfterAllClosed().next())}),o}closeAll(){this._closeDialogs(this.openDialogs)}getDialogById(e){return this.openDialogs.find(n=>n.id===e)}ngOnDestroy(){this._closeDialogs(this._openDialogsAtThisLevel),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete()}_closeDialogs(e){let n=e.length;for(;n--;)e[n].close()}static{this.\u0275fac=function(n){return new(n||t)(D(bn),D(Wt),D(nc,8),D(uT,8),D(mT),D(t,12),D(Cs),D(en,8))}}static{this.\u0275prov=ne({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var gT=(()=>{class t{constructor(e,n,o){this._dialogRef=e,this._elementRef=n,this._dialog=o}ngOnInit(){this._dialogRef||(this._dialogRef=_T(this._elementRef,this._dialog.openDialogs)),this._dialogRef&&Promise.resolve().then(()=>{this._onAdd()})}ngOnDestroy(){this._dialogRef?._containerInstance&&Promise.resolve().then(()=>{this._onRemove()})}static{this.\u0275fac=function(n){return new(n||t)(_(Zo,8),_(Ae),_(Zn))}}static{this.\u0275dir=Se({type:t,standalone:!0})}}return t})();var $c=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275dir=Se({type:t,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-mdc-dialog-content","mdc-dialog__content"],standalone:!0,features:[Ng([Ug])]})}}return t})(),Uc=(()=>{class t extends gT{_onAdd(){this._dialogRef._containerInstance?._updateActionSectionCount?.(1)}_onRemove(){this._dialogRef._containerInstance?._updateActionSectionCount?.(-1)}static{this.\u0275fac=(()=>{let e;return function(o){return(e||(e=ti(t)))(o||t)}})()}static{this.\u0275dir=Se({type:t,selectors:[["","mat-dialog-actions",""],["mat-dialog-actions"],["","matDialogActions",""]],hostAttrs:[1,"mat-mdc-dialog-actions","mdc-dialog__actions"],hostVars:6,hostBindings:function(n,o){n&2&&Fe("mat-mdc-dialog-actions-align-start",o.align==="start")("mat-mdc-dialog-actions-align-center",o.align==="center")("mat-mdc-dialog-actions-align-end",o.align==="end")},inputs:{align:"align"},standalone:!0,features:[ot]})}}return t})();function _T(t,i){let e=t.nativeElement.parentElement;for(;e&&!e.classList.contains("mat-mdc-dialog-container");)e=e.parentElement;return e?i.find(n=>n.id===e.id):null}var Ss=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275mod=ht({type:t})}static{this.\u0275inj=dt({providers:[Zn],imports:[y0,Gc,Or,yi,yi]})}}return t})();var T0=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275mod=ht({type:t})}static{this.\u0275inj=dt({imports:[yi,yi]})}}return t})();var Jh=class{constructor(i){this._box=i,this._destroyed=new X,this._resizeSubject=new X,this._elementObservables=new Map,typeof ResizeObserver<"u"&&(this._resizeObserver=new ResizeObserver(e=>this._resizeSubject.next(e)))}observe(i){return this._elementObservables.has(i)||this._elementObservables.set(i,new fn(e=>{let n=this._resizeSubject.subscribe(e);return this._resizeObserver?.observe(i,{box:this._box}),()=>{this._resizeObserver?.unobserve(i),n.unsubscribe(),this._elementObservables.delete(i)}}).pipe(vi(e=>e.some(n=>n.target===i)),Og({bufferSize:1,refCount:!0}),ye(this._destroyed))),this._elementObservables.get(i)}destroy(){this._destroyed.next(),this._destroyed.complete(),this._resizeSubject.complete(),this._elementObservables.clear()}},x0=(()=>{class t{constructor(){this._observers=new Map,this._ngZone=je(Je),typeof ResizeObserver<"u"}ngOnDestroy(){for(let[,e]of this._observers)e.destroy();this._observers.clear(),typeof ResizeObserver<"u"}observe(e,n){let o=n?.box||"content-box";return this._observers.has(o)||this._observers.set(o,new Jh(o)),this._observers.get(o).observe(e)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=ne({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var nu=["*"];var vT=["tabListContainer"],bT=["tabList"],yT=["tabListInner"],CT=["nextPaginator"],wT=["previousPaginator"];var ST=["mat-tab-nav-bar",""],ET=["mat-tab-link",""];var eu="mdc-tab-indicator--active",P0="mdc-tab-indicator--no-transition",iu=class{constructor(i){this._items=i}hide(){this._items.forEach(i=>i.deactivateInkBar())}alignToElement(i){let e=this._items.find(o=>o.elementRef.nativeElement===i),n=this._currentItem;if(e!==n&&(n?.deactivateInkBar(),e)){let o=n?.elementRef.nativeElement.getBoundingClientRect?.();e.activateInkBar(o),this._currentItem=e}}},TT=(()=>{class t{constructor(){this._elementRef=je(Ae),this._fitToContent=!1}get fitInkBarToContent(){return this._fitToContent}set fitInkBarToContent(e){this._fitToContent!==e&&(this._fitToContent=e,this._inkBarElement&&this._appendInkBarElement())}activateInkBar(e){let n=this._elementRef.nativeElement;if(!e||!n.getBoundingClientRect||!this._inkBarContentElement){n.classList.add(eu);return}let o=n.getBoundingClientRect(),r=e.width/o.width,s=e.left-o.left;n.classList.add(P0),this._inkBarContentElement.style.setProperty("transform",`translateX(${s}px) scaleX(${r})`),n.getBoundingClientRect(),n.classList.remove(P0),n.classList.add(eu),this._inkBarContentElement.style.setProperty("transform","")}deactivateInkBar(){this._elementRef.nativeElement.classList.remove(eu)}ngOnInit(){this._createInkBarElement()}ngOnDestroy(){this._inkBarElement?.remove(),this._inkBarElement=this._inkBarContentElement=null}_createInkBarElement(){let e=this._elementRef.nativeElement.ownerDocument||document,n=this._inkBarElement=e.createElement("span"),o=this._inkBarContentElement=e.createElement("span");n.className="mdc-tab-indicator",o.className="mdc-tab-indicator__content mdc-tab-indicator__content--underline",n.appendChild(this._inkBarContentElement),this._appendInkBarElement()}_appendInkBarElement(){this._inkBarElement;let e=this._fitToContent?this._elementRef.nativeElement.querySelector(".mdc-tab__content"):this._elementRef.nativeElement;e.appendChild(this._inkBarElement)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275dir=Se({type:t,inputs:{fitInkBarToContent:[2,"fitInkBarToContent","fitInkBarToContent",qe]},features:[Tt]})}}return t})();var O0=Er({passive:!0}),xT=650,PT=100,OT=(()=>{class t{get selectedIndex(){return this._selectedIndex}set selectedIndex(e){let n=isNaN(e)?0:e;this._selectedIndex!=n&&(this._selectedIndexChanged=!0,this._selectedIndex=n,this._keyManager&&this._keyManager.updateActiveItem(n))}constructor(e,n,o,r,s,a,l){this._elementRef=e,this._changeDetectorRef=n,this._viewportRuler=o,this._dir=r,this._ngZone=s,this._platform=a,this._animationMode=l,this._scrollDistance=0,this._selectedIndexChanged=!1,this._destroyed=new X,this._showPaginationControls=!1,this._disableScrollAfter=!0,this._disableScrollBefore=!0,this._stopScrolling=new X,this.disablePagination=!1,this._selectedIndex=0,this.selectFocusedIndex=new de,this.indexFocused=new de,this._sharedResizeObserver=je(x0),this._injector=je(Wt),s.runOutsideAngular(()=>{Yl(e.nativeElement,"mouseleave").pipe(ye(this._destroyed)).subscribe(()=>{this._stopInterval()})})}ngAfterViewInit(){Yl(this._previousPaginator.nativeElement,"touchstart",O0).pipe(ye(this._destroyed)).subscribe(()=>{this._handlePaginatorPress("before")}),Yl(this._nextPaginator.nativeElement,"touchstart",O0).pipe(ye(this._destroyed)).subscribe(()=>{this._handlePaginatorPress("after")})}ngAfterContentInit(){let e=this._dir?this._dir.change:_i("ltr"),n=this._sharedResizeObserver.observe(this._elementRef.nativeElement).pipe(ns(32),ye(this._destroyed)),o=this._viewportRuler.change(150).pipe(ye(this._destroyed)),r=()=>{this.updatePagination(),this._alignInkBarToSelectedTab()};this._keyManager=new Yg(this._items).withHorizontalOrientation(this._getLayoutDirection()).withHomeAndEnd().withWrap().skipPredicate(()=>!1),this._keyManager.updateActiveItem(this._selectedIndex),Bn(r,{injector:this._injector}),Zt(e,o,n,this._items.changes,this._itemsResized()).pipe(ye(this._destroyed)).subscribe(()=>{this._ngZone.run(()=>{Promise.resolve().then(()=>{this._scrollDistance=Math.max(0,Math.min(this._getMaxScrollDistance(),this._scrollDistance)),r()})}),this._keyManager.withHorizontalOrientation(this._getLayoutDirection())}),this._keyManager.change.subscribe(s=>{this.indexFocused.emit(s),this._setTabFocus(s)})}_itemsResized(){return typeof ResizeObserver!="function"?bg:this._items.changes.pipe(xi(this._items),Vo(e=>new fn(n=>this._ngZone.runOutsideAngular(()=>{let o=new ResizeObserver(r=>n.next(r));return e.forEach(r=>o.observe(r.elementRef.nativeElement)),()=>{o.disconnect()}}))),Ig(1),vi(e=>e.some(n=>n.contentRect.width>0&&n.contentRect.height>0)))}ngAfterContentChecked(){this._tabLabelCount!=this._items.length&&(this.updatePagination(),this._tabLabelCount=this._items.length,this._changeDetectorRef.markForCheck()),this._selectedIndexChanged&&(this._scrollToLabel(this._selectedIndex),this._checkScrollingControls(),this._alignInkBarToSelectedTab(),this._selectedIndexChanged=!1,this._changeDetectorRef.markForCheck()),this._scrollDistanceChanged&&(this._updateTabScrollPosition(),this._scrollDistanceChanged=!1,this._changeDetectorRef.markForCheck())}ngOnDestroy(){this._keyManager?.destroy(),this._destroyed.next(),this._destroyed.complete(),this._stopScrolling.complete()}_handleKeydown(e){if(!ls(e))switch(e.keyCode){case 13:case 32:if(this.focusIndex!==this.selectedIndex){let n=this._items.get(this.focusIndex);n&&!n.disabled&&(this.selectFocusedIndex.emit(this.focusIndex),this._itemSelected(e))}break;default:this._keyManager.onKeydown(e)}}_onContentChanges(){let e=this._elementRef.nativeElement.textContent;e!==this._currentTextContent&&(this._currentTextContent=e||"",this._ngZone.run(()=>{this.updatePagination(),this._alignInkBarToSelectedTab(),this._changeDetectorRef.markForCheck()}))}updatePagination(){this._checkPaginationEnabled(),this._checkScrollingControls(),this._updateTabScrollPosition()}get focusIndex(){return this._keyManager?this._keyManager.activeItemIndex:0}set focusIndex(e){!this._isValidIndex(e)||this.focusIndex===e||!this._keyManager||this._keyManager.setActiveItem(e)}_isValidIndex(e){return this._items?!!this._items.toArray()[e]:!0}_setTabFocus(e){if(this._showPaginationControls&&this._scrollToLabel(e),this._items&&this._items.length){this._items.toArray()[e].focus();let n=this._tabListContainer.nativeElement;this._getLayoutDirection()=="ltr"?n.scrollLeft=0:n.scrollLeft=n.scrollWidth-n.offsetWidth}}_getLayoutDirection(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}_updateTabScrollPosition(){if(this.disablePagination)return;let e=this.scrollDistance,n=this._getLayoutDirection()==="ltr"?-e:e;this._tabList.nativeElement.style.transform=`translateX(${Math.round(n)}px)`,(this._platform.TRIDENT||this._platform.EDGE)&&(this._tabListContainer.nativeElement.scrollLeft=0)}get scrollDistance(){return this._scrollDistance}set scrollDistance(e){this._scrollTo(e)}_scrollHeader(e){let n=this._tabListContainer.nativeElement.offsetWidth,o=(e=="before"?-1:1)*n/3;return this._scrollTo(this._scrollDistance+o)}_handlePaginatorClick(e){this._stopInterval(),this._scrollHeader(e)}_scrollToLabel(e){if(this.disablePagination)return;let n=this._items?this._items.toArray()[e]:null;if(!n)return;let o=this._tabListContainer.nativeElement.offsetWidth,{offsetLeft:r,offsetWidth:s}=n.elementRef.nativeElement,a,l;this._getLayoutDirection()=="ltr"?(a=r,l=a+s):(l=this._tabListInner.nativeElement.offsetWidth-r,a=l-s);let c=this.scrollDistance,d=this.scrollDistance+o;a<c?this.scrollDistance-=c-a:l>d&&(this.scrollDistance+=Math.min(l-d,a-c))}_checkPaginationEnabled(){if(this.disablePagination)this._showPaginationControls=!1;else{let e=this._tabListInner.nativeElement.scrollWidth,n=this._elementRef.nativeElement.offsetWidth,o=e-n>=5;o||(this.scrollDistance=0),o!==this._showPaginationControls&&(this._showPaginationControls=o,this._changeDetectorRef.markForCheck())}}_checkScrollingControls(){this.disablePagination?this._disableScrollAfter=this._disableScrollBefore=!0:(this._disableScrollBefore=this.scrollDistance==0,this._disableScrollAfter=this.scrollDistance==this._getMaxScrollDistance(),this._changeDetectorRef.markForCheck())}_getMaxScrollDistance(){let e=this._tabListInner.nativeElement.scrollWidth,n=this._tabListContainer.nativeElement.offsetWidth;return e-n||0}_alignInkBarToSelectedTab(){let e=this._items&&this._items.length?this._items.toArray()[this.selectedIndex]:null,n=e?e.elementRef.nativeElement:null;n?this._inkBar.alignToElement(n):this._inkBar.hide()}_stopInterval(){this._stopScrolling.next()}_handlePaginatorPress(e,n){n&&n.button!=null&&n.button!==0||(this._stopInterval(),Eg(xT,PT).pipe(ye(Zt(this._stopScrolling,this._destroyed))).subscribe(()=>{let{maxScrollDistance:o,distance:r}=this._scrollHeader(e);(r===0||r>=o)&&this._stopInterval()}))}_scrollTo(e){if(this.disablePagination)return{maxScrollDistance:0,distance:0};let n=this._getMaxScrollDistance();return this._scrollDistance=Math.max(0,Math.min(n,e)),this._scrollDistanceChanged=!0,this._checkScrollingControls(),{maxScrollDistance:n,distance:this._scrollDistance}}static{this.\u0275fac=function(n){return new(n||t)(_(Ae),_(tn),_($n),_(Hi,8),_(Je),_(Oi),_(en,8))}}static{this.\u0275dir=Se({type:t,inputs:{disablePagination:[2,"disablePagination","disablePagination",qe],selectedIndex:[2,"selectedIndex","selectedIndex",ma]},outputs:{selectFocusedIndex:"selectFocusedIndex",indexFocused:"indexFocused"},features:[Tt]})}}return t})();var IT=new pt("MAT_TABS_CONFIG");var D0=0,ou=(()=>{class t extends OT{get fitInkBarToContent(){return this._fitInkBarToContent.value}set fitInkBarToContent(e){this._fitInkBarToContent.next(e),this._changeDetectorRef.markForCheck()}get animationDuration(){return this._animationDuration}set animationDuration(e){let n=e+"";this._animationDuration=/^\d+$/.test(n)?e+"ms":n}get backgroundColor(){return this._backgroundColor}set backgroundColor(e){let n=this._elementRef.nativeElement.classList;n.remove("mat-tabs-with-background",`mat-background-${this.backgroundColor}`),e&&n.add("mat-tabs-with-background",`mat-background-${e}`),this._backgroundColor=e}constructor(e,n,o,r,s,a,l,c){super(e,r,s,n,o,a,l),this._fitInkBarToContent=new it(!1),this.stretchTabs=!0,this.disableRipple=!1,this.color="primary",this.disablePagination=c&&c.disablePagination!=null?c.disablePagination:!1,this.fitInkBarToContent=c&&c.fitInkBarToContent!=null?c.fitInkBarToContent:!1,this.stretchTabs=c&&c.stretchTabs!=null?c.stretchTabs:!0}_itemSelected(){}ngAfterContentInit(){this._inkBar=new iu(this._items),this._items.changes.pipe(xi(null),ye(this._destroyed)).subscribe(()=>{this.updateActiveLink()}),super.ngAfterContentInit()}ngAfterViewInit(){this.tabPanel,super.ngAfterViewInit()}updateActiveLink(){if(!this._items)return;let e=this._items.toArray();for(let n=0;n<e.length;n++)if(e[n].active){this.selectedIndex=n,this._changeDetectorRef.markForCheck(),this.tabPanel&&(this.tabPanel._activeTabId=e[n].id);return}this.selectedIndex=-1,this._inkBar.hide()}_getRole(){return this.tabPanel?"tablist":this._elementRef.nativeElement.getAttribute("role")}static{this.\u0275fac=function(n){return new(n||t)(_(Ae),_(Hi,8),_(Je),_(tn),_($n),_(Oi),_(en,8),_(IT,8))}}static{this.\u0275cmp=F({type:t,selectors:[["","mat-tab-nav-bar",""]],contentQueries:function(n,o,r){if(n&1&&bi(r,DT,5),n&2){let s;me(s=fe())&&(o._items=s)}},viewQuery:function(n,o){if(n&1&&(Ee(vT,7),Ee(bT,7),Ee(yT,7),Ee(CT,5),Ee(wT,5)),n&2){let r;me(r=fe())&&(o._tabListContainer=r.first),me(r=fe())&&(o._tabList=r.first),me(r=fe())&&(o._tabListInner=r.first),me(r=fe())&&(o._nextPaginator=r.first),me(r=fe())&&(o._previousPaginator=r.first)}},hostAttrs:[1,"mat-mdc-tab-nav-bar","mat-mdc-tab-header"],hostVars:17,hostBindings:function(n,o){n&2&&(et("role",o._getRole()),Hn("--mat-tab-animation-duration",o.animationDuration),Fe("mat-mdc-tab-header-pagination-controls-enabled",o._showPaginationControls)("mat-mdc-tab-header-rtl",o._getLayoutDirection()=="rtl")("mat-mdc-tab-nav-bar-stretch-tabs",o.stretchTabs)("mat-primary",o.color!=="warn"&&o.color!=="accent")("mat-accent",o.color==="accent")("mat-warn",o.color==="warn")("_mat-animation-noopable",o._animationMode==="NoopAnimations"))},inputs:{fitInkBarToContent:[2,"fitInkBarToContent","fitInkBarToContent",qe],stretchTabs:[2,"mat-stretch-tabs","stretchTabs",qe],animationDuration:"animationDuration",backgroundColor:"backgroundColor",disableRipple:[2,"disableRipple","disableRipple",qe],color:"color",tabPanel:"tabPanel"},exportAs:["matTabNavBar","matTabNav"],standalone:!0,features:[Tt,ot,B],attrs:ST,ngContentSelectors:nu,decls:13,vars:6,consts:[["previousPaginator",""],["tabListContainer",""],["tabList",""],["tabListInner",""],["nextPaginator",""],["mat-ripple","",1,"mat-mdc-tab-header-pagination","mat-mdc-tab-header-pagination-before",3,"click","mousedown","touchend","matRippleDisabled"],[1,"mat-mdc-tab-header-pagination-chevron"],[1,"mat-mdc-tab-link-container",3,"keydown"],[1,"mat-mdc-tab-list",3,"cdkObserveContent"],[1,"mat-mdc-tab-links"],["mat-ripple","",1,"mat-mdc-tab-header-pagination","mat-mdc-tab-header-pagination-after",3,"mousedown","click","touchend","matRippleDisabled"]],template:function(n,o){if(n&1){let r=Z();It(),f(0,"div",5,0),I("click",function(){return R(r),A(o._handlePaginatorClick("before"))})("mousedown",function(a){return R(r),A(o._handlePaginatorPress("before",a))})("touchend",function(){return R(r),A(o._stopInterval())}),M(2,"div",6),g(),f(3,"div",7,1),I("keydown",function(a){return R(r),A(o._handleKeydown(a))}),f(5,"div",8,2),I("cdkObserveContent",function(){return R(r),A(o._onContentChanges())}),f(7,"div",9,3),ct(9),g()()(),f(10,"div",10,4),I("mousedown",function(a){return R(r),A(o._handlePaginatorPress("after",a))})("click",function(){return R(r),A(o._handlePaginatorClick("after"))})("touchend",function(){return R(r),A(o._stopInterval())}),M(12,"div",6),g()}n&2&&(Fe("mat-mdc-tab-header-pagination-disabled",o._disableScrollBefore),b("matRippleDisabled",o._disableScrollBefore||o.disableRipple),u(10),Fe("mat-mdc-tab-header-pagination-disabled",o._disableScrollAfter),b("matRippleDisabled",o._disableScrollAfter||o.disableRipple))},dependencies:[wh,Qg],styles:[".mdc-tab{min-width:90px;padding:0 24px;display:flex;flex:1 0 auto;justify-content:center;box-sizing:border-box;border:none;outline:none;text-align:center;white-space:nowrap;cursor:pointer;z-index:1}.mdc-tab__content{display:flex;align-items:center;justify-content:center;height:inherit;pointer-events:none}.mdc-tab__text-label{transition:150ms color linear;display:inline-block;line-height:1;z-index:2}.mdc-tab--active .mdc-tab__text-label{transition-delay:100ms}._mat-animation-noopable .mdc-tab__text-label{transition:none}.mdc-tab-indicator{display:flex;position:absolute;top:0;left:0;justify-content:center;width:100%;height:100%;pointer-events:none;z-index:1}.mdc-tab-indicator__content{transition:var(--mat-tab-animation-duration, 250ms) transform cubic-bezier(0.4, 0, 0.2, 1);transform-origin:left;opacity:0}.mdc-tab-indicator__content--underline{align-self:flex-end;box-sizing:border-box;width:100%;border-top-style:solid}.mdc-tab-indicator--active .mdc-tab-indicator__content{opacity:1}._mat-animation-noopable .mdc-tab-indicator__content,.mdc-tab-indicator--no-transition .mdc-tab-indicator__content{transition:none}.mat-mdc-tab-ripple{position:absolute;top:0;left:0;bottom:0;right:0;pointer-events:none}.mat-mdc-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mdc-tab-indicator .mdc-tab-indicator__content{transition-duration:var(--mat-tab-animation-duration, 250ms)}.mat-mdc-tab-header-pagination{-webkit-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2;-webkit-tap-highlight-color:rgba(0,0,0,0);touch-action:none;box-sizing:content-box;outline:0}.mat-mdc-tab-header-pagination::-moz-focus-inner{border:0}.mat-mdc-tab-header-pagination .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-header-inactive-ripple-color, var(--mat-app-on-surface))}.mat-mdc-tab-header-pagination-controls-enabled .mat-mdc-tab-header-pagination{display:flex}.mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after{padding-left:4px}.mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(-135deg)}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-pagination-after{padding-right:4px}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(45deg)}.mat-mdc-tab-header-pagination-chevron{border-style:solid;border-width:2px 2px 0 0;height:8px;width:8px;border-color:var(--mat-tab-header-pagination-icon-color, var(--mat-app-on-surface))}.mat-mdc-tab-header-pagination-disabled{box-shadow:none;cursor:default;pointer-events:none}.mat-mdc-tab-header-pagination-disabled .mat-mdc-tab-header-pagination-chevron{opacity:.4}.mat-mdc-tab-list{flex-grow:1;position:relative;transition:transform 500ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable .mat-mdc-tab-list{transition:none}.mat-mdc-tab-links{display:flex;flex:1 0 auto}[mat-align-tabs=center]>.mat-mdc-tab-link-container .mat-mdc-tab-links{justify-content:center}[mat-align-tabs=end]>.mat-mdc-tab-link-container .mat-mdc-tab-links{justify-content:flex-end}.cdk-drop-list .mat-mdc-tab-links,.mat-mdc-tab-links.cdk-drop-list{min-height:var(--mdc-secondary-navigation-tab-container-height)}.mat-mdc-tab-link-container{display:flex;flex-grow:1;overflow:hidden;z-index:1;border-bottom-style:solid;border-bottom-width:var(--mat-tab-header-divider-height);border-bottom-color:var(--mat-tab-header-divider-color, var(--mat-app-surface-variant))}.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination{background-color:var(--mat-tab-header-with-background-background-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background.mat-primary>.mat-mdc-tab-link-container .mat-mdc-tab-link .mdc-tab__text-label{color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background.mat-primary>.mat-mdc-tab-link-container .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-link-container .mat-mdc-tab-link:not(.mdc-tab--active) .mdc-tab__text-label{color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-link-container .mat-mdc-tab-link:not(.mdc-tab--active) .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container .mat-mdc-focus-indicator::before,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-focus-indicator::before{border-color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container .mat-ripple-element,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container .mdc-tab__ripple::before,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-ripple-element,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mdc-tab__ripple::before{background-color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron{color:var(--mat-tab-header-with-background-foreground-color)}"],encapsulation:2})}}return t})(),DT=(()=>{class t extends TT{get active(){return this._isActive}set active(e){e!==this._isActive&&(this._isActive=e,this._tabNavBar.updateActiveLink())}get rippleDisabled(){return this.disabled||this.disableRipple||this._tabNavBar.disableRipple||!!this.rippleConfig.disabled}constructor(e,n,o,r,s,a){super(),this._tabNavBar=e,this.elementRef=n,this._focusMonitor=s,this._destroyed=new X,this._isActive=!1,this.disabled=!1,this.disableRipple=!1,this.tabIndex=0,this.id=`mat-tab-link-${D0++}`,this.rippleConfig=o||{},this.tabIndex=parseInt(r)||0,a==="NoopAnimations"&&(this.rippleConfig.animation={enterDuration:0,exitDuration:0}),e._fitInkBarToContent.pipe(ye(this._destroyed)).subscribe(l=>{this.fitInkBarToContent=l})}focus(){this.elementRef.nativeElement.focus()}ngAfterViewInit(){this._focusMonitor.monitor(this.elementRef)}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete(),super.ngOnDestroy(),this._focusMonitor.stopMonitoring(this.elementRef)}_handleFocus(){this._tabNavBar.focusIndex=this._tabNavBar._items.toArray().indexOf(this)}_handleKeydown(e){(e.keyCode===32||e.keyCode===13)&&(this.disabled?e.preventDefault():this._tabNavBar.tabPanel&&(e.keyCode===32&&e.preventDefault(),this.elementRef.nativeElement.click()))}_getAriaControls(){return this._tabNavBar.tabPanel?this._tabNavBar.tabPanel?.id:this.elementRef.nativeElement.getAttribute("aria-controls")}_getAriaSelected(){return this._tabNavBar.tabPanel?this.active?"true":"false":this.elementRef.nativeElement.getAttribute("aria-selected")}_getAriaCurrent(){return this.active&&!this._tabNavBar.tabPanel?"page":null}_getRole(){return this._tabNavBar.tabPanel?"tab":this.elementRef.nativeElement.getAttribute("role")}_getTabIndex(){return this._tabNavBar.tabPanel?this._isActive&&!this.disabled?0:-1:this.disabled?-1:this.tabIndex}static{this.\u0275fac=function(n){return new(n||t)(_(ou),_(Ae),_(t_,8),ha("tabindex"),_(cs),_(en,8))}}static{this.\u0275cmp=F({type:t,selectors:[["","mat-tab-link",""],["","matTabLink",""]],hostAttrs:[1,"mdc-tab","mat-mdc-tab-link","mat-mdc-focus-indicator"],hostVars:11,hostBindings:function(n,o){n&1&&I("focus",function(){return o._handleFocus()})("keydown",function(s){return o._handleKeydown(s)}),n&2&&(et("aria-controls",o._getAriaControls())("aria-current",o._getAriaCurrent())("aria-disabled",o.disabled)("aria-selected",o._getAriaSelected())("id",o.id)("tabIndex",o._getTabIndex())("role",o._getRole()),Fe("mat-mdc-tab-disabled",o.disabled)("mdc-tab--active",o.active))},inputs:{active:[2,"active","active",qe],disabled:[2,"disabled","disabled",qe],disableRipple:[2,"disableRipple","disableRipple",qe],tabIndex:[2,"tabIndex","tabIndex",e=>e==null?0:ma(e)],id:"id"},exportAs:["matTabLink"],standalone:!0,features:[Tt,ot,B],attrs:ET,ngContentSelectors:nu,decls:5,vars:2,consts:[[1,"mdc-tab__ripple"],["mat-ripple","",1,"mat-mdc-tab-ripple",3,"matRippleTrigger","matRippleDisabled"],[1,"mdc-tab__content"],[1,"mdc-tab__text-label"]],template:function(n,o){n&1&&(It(),M(0,"span",0)(1,"div",1),f(2,"span",2)(3,"span",3),ct(4),g()()),n&2&&(u(),b("matRippleTrigger",o.elementRef.nativeElement)("matRippleDisabled",o.rippleDisabled))},dependencies:[wh],styles:['.mat-mdc-tab-link{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none;background:none;height:var(--mdc-secondary-navigation-tab-container-height);font-family:var(--mat-tab-header-label-text-font, var(--mat-app-title-small-font));font-size:var(--mat-tab-header-label-text-size, var(--mat-app-title-small-size));letter-spacing:var(--mat-tab-header-label-text-tracking, var(--mat-app-title-small-tracking));line-height:var(--mat-tab-header-label-text-line-height, var(--mat-app-title-small-line-height));font-weight:var(--mat-tab-header-label-text-weight, var(--mat-app-title-small-weight))}.mat-mdc-tab-link.mdc-tab{flex-grow:0}.mat-mdc-tab-link .mdc-tab-indicator__content--underline{border-color:var(--mdc-tab-indicator-active-indicator-color, var(--mat-app-primary));border-top-width:var(--mdc-tab-indicator-active-indicator-height);border-radius:var(--mdc-tab-indicator-active-indicator-shape)}.mat-mdc-tab-link:hover .mdc-tab__text-label{color:var(--mat-tab-header-inactive-hover-label-text-color, var(--mat-app-on-surface))}.mat-mdc-tab-link:focus .mdc-tab__text-label{color:var(--mat-tab-header-inactive-focus-label-text-color, var(--mat-app-on-surface))}.mat-mdc-tab-link.mdc-tab--active .mdc-tab__text-label{color:var(--mat-tab-header-active-label-text-color, var(--mat-app-on-surface))}.mat-mdc-tab-link.mdc-tab--active .mdc-tab__ripple::before,.mat-mdc-tab-link.mdc-tab--active .mat-ripple-element{background-color:var(--mat-tab-header-active-ripple-color, var(--mat-app-on-surface))}.mat-mdc-tab-link.mdc-tab--active:hover .mdc-tab__text-label{color:var(--mat-tab-header-active-hover-label-text-color, var(--mat-app-on-surface))}.mat-mdc-tab-link.mdc-tab--active:hover .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-header-active-hover-indicator-color, var(--mat-app-primary))}.mat-mdc-tab-link.mdc-tab--active:focus .mdc-tab__text-label{color:var(--mat-tab-header-active-focus-label-text-color, var(--mat-app-on-surface))}.mat-mdc-tab-link.mdc-tab--active:focus .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-header-active-focus-indicator-color, var(--mat-app-primary))}.mat-mdc-tab-link.mat-mdc-tab-disabled{opacity:.4;pointer-events:none}.mat-mdc-tab-link.mat-mdc-tab-disabled .mdc-tab__content{pointer-events:none}.mat-mdc-tab-link.mat-mdc-tab-disabled .mdc-tab__ripple::before,.mat-mdc-tab-link.mat-mdc-tab-disabled .mat-ripple-element{background-color:var(--mat-tab-header-disabled-ripple-color)}.mat-mdc-tab-link .mdc-tab__ripple::before{content:"";display:block;position:absolute;top:0;left:0;right:0;bottom:0;opacity:0;pointer-events:none;background-color:var(--mat-tab-header-inactive-ripple-color, var(--mat-app-on-surface))}.mat-mdc-tab-link .mdc-tab__text-label{color:var(--mat-tab-header-inactive-label-text-color, var(--mat-app-on-surface));display:inline-flex;align-items:center}.mat-mdc-tab-link .mdc-tab__content{position:relative;pointer-events:auto}.mat-mdc-tab-link:hover .mdc-tab__ripple::before{opacity:.04}.mat-mdc-tab-link.cdk-program-focused .mdc-tab__ripple::before,.mat-mdc-tab-link.cdk-keyboard-focused .mdc-tab__ripple::before{opacity:.12}.mat-mdc-tab-link .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-header-inactive-ripple-color, var(--mat-app-on-surface))}.mat-mdc-tab-header.mat-mdc-tab-nav-bar-stretch-tabs .mat-mdc-tab-link{flex-grow:1}.mat-mdc-tab-link::before{margin:5px}@media(max-width: 599px){.mat-mdc-tab-link{min-width:72px}}'],encapsulation:2,changeDetection:0})}}return t})(),M0=(()=>{class t{constructor(){this.id=`mat-tab-nav-panel-${D0++}`}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=F({type:t,selectors:[["mat-tab-nav-panel"]],hostAttrs:["role","tabpanel",1,"mat-mdc-tab-nav-panel"],hostVars:2,hostBindings:function(n,o){n&2&&et("aria-labelledby",o._activeTabId)("id",o.id)},inputs:{id:"id"},exportAs:["matTabNavPanel"],standalone:!0,features:[B],ngContentSelectors:nu,decls:1,vars:0,template:function(n,o){n&1&&(It(),ct(0))},encapsulation:2,changeDetection:0})}}return t})(),Ts=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275mod=ht({type:t})}static{this.\u0275inj=dt({imports:[yi,yi]})}}return t})();var RT=["*",[["mat-toolbar-row"]]],AT=["*","mat-toolbar-row"],kT=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275dir=Se({type:t,selectors:[["mat-toolbar-row"]],hostAttrs:[1,"mat-toolbar-row"],exportAs:["matToolbarRow"],standalone:!0})}}return t})(),xs=(()=>{class t{constructor(e,n,o){this._elementRef=e,this._platform=n,this._document=o}ngAfterViewInit(){this._platform.isBrowser&&(this._checkToolbarMixedModes(),this._toolbarRows.changes.subscribe(()=>this._checkToolbarMixedModes()))}_checkToolbarMixedModes(){this._toolbarRows.length}static{this.\u0275fac=function(n){return new(n||t)(_(Ae),_(Oi),_(wt))}}static{this.\u0275cmp=F({type:t,selectors:[["mat-toolbar"]],contentQueries:function(n,o,r){if(n&1&&bi(r,kT,5),n&2){let s;me(s=fe())&&(o._toolbarRows=s)}},hostAttrs:[1,"mat-toolbar"],hostVars:6,hostBindings:function(n,o){n&2&&(Pi(o.color?"mat-"+o.color:""),Fe("mat-toolbar-multiple-rows",o._toolbarRows.length>0)("mat-toolbar-single-row",o._toolbarRows.length===0))},inputs:{color:"color"},exportAs:["matToolbar"],standalone:!0,features:[B],ngContentSelectors:AT,decls:2,vars:0,template:function(n,o){n&1&&(It(RT),ct(0),ct(1,1))},styles:[".mat-toolbar{background:var(--mat-toolbar-container-background-color, var(--mat-app-surface));color:var(--mat-toolbar-container-text-color, var(--mat-app-on-surface))}.mat-toolbar,.mat-toolbar h1,.mat-toolbar h2,.mat-toolbar h3,.mat-toolbar h4,.mat-toolbar h5,.mat-toolbar h6{font-family:var(--mat-toolbar-title-text-font, var(--mat-app-title-large-font));font-size:var(--mat-toolbar-title-text-size, var(--mat-app-title-large-size));line-height:var(--mat-toolbar-title-text-line-height, var(--mat-app-title-large-line-height));font-weight:var(--mat-toolbar-title-text-weight, var(--mat-app-title-large-weight));letter-spacing:var(--mat-toolbar-title-text-tracking, var(--mat-app-title-large-tracking));margin:0}.cdk-high-contrast-active .mat-toolbar{outline:solid 1px}.mat-toolbar .mat-form-field-underline,.mat-toolbar .mat-form-field-ripple,.mat-toolbar .mat-focused .mat-form-field-ripple{background-color:currentColor}.mat-toolbar .mat-form-field-label,.mat-toolbar .mat-focused .mat-form-field-label,.mat-toolbar .mat-select-value,.mat-toolbar .mat-select-arrow,.mat-toolbar .mat-form-field.mat-focused .mat-select-arrow{color:inherit}.mat-toolbar .mat-input-element{caret-color:currentColor}.mat-toolbar .mat-mdc-button-base.mat-mdc-button-base.mat-unthemed{--mdc-text-button-label-text-color:var(--mat-toolbar-container-text-color, var(--mat-app-on-surface));--mdc-outlined-button-label-text-color:var(--mat-toolbar-container-text-color, var(--mat-app-on-surface))}.mat-toolbar-row,.mat-toolbar-single-row{display:flex;box-sizing:border-box;padding:0 16px;width:100%;flex-direction:row;align-items:center;white-space:nowrap;height:var(--mat-toolbar-standard-height)}@media(max-width: 599px){.mat-toolbar-row,.mat-toolbar-single-row{height:var(--mat-toolbar-mobile-height)}}.mat-toolbar-multiple-rows{display:flex;box-sizing:border-box;flex-direction:column;width:100%;min-height:var(--mat-toolbar-standard-height)}@media(max-width: 599px){.mat-toolbar-multiple-rows{min-height:var(--mat-toolbar-mobile-height)}}"],encapsulation:2,changeDetection:0})}}return t})();var sn=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275mod=ht({type:t})}static{this.\u0275inj=dt({imports:[yi,yi]})}}return t})();function R0(t){return new Ze(3e3,!1)}function NT(){return new Ze(3100,!1)}function LT(){return new Ze(3101,!1)}function FT(t){return new Ze(3001,!1)}function VT(t){return new Ze(3003,!1)}function BT(t){return new Ze(3004,!1)}function HT(t,i){return new Ze(3005,!1)}function jT(){return new Ze(3006,!1)}function qT(){return new Ze(3007,!1)}function zT(t,i){return new Ze(3008,!1)}function GT(t){return new Ze(3002,!1)}function $T(t,i,e,n,o){return new Ze(3010,!1)}function UT(){return new Ze(3011,!1)}function WT(){return new Ze(3012,!1)}function QT(){return new Ze(3200,!1)}function YT(){return new Ze(3202,!1)}function XT(){return new Ze(3013,!1)}function KT(t){return new Ze(3014,!1)}function ZT(t){return new Ze(3015,!1)}function JT(t){return new Ze(3016,!1)}function ex(t,i){return new Ze(3404,!1)}function tx(t){return new Ze(3502,!1)}function ix(t){return new Ze(3503,!1)}function nx(){return new Ze(3300,!1)}function ox(t){return new Ze(3504,!1)}function rx(t){return new Ze(3301,!1)}function sx(t,i){return new Ze(3302,!1)}function ax(t){return new Ze(3303,!1)}function lx(t,i){return new Ze(3400,!1)}function cx(t){return new Ze(3401,!1)}function dx(t){return new Ze(3402,!1)}function px(t,i){return new Ze(3505,!1)}function Jo(t){switch(t.length){case 0:return new ps;case 1:return t[0];default:return new Eh(t)}}function U0(t,i,e=new Map,n=new Map){let o=[],r=[],s=-1,a=null;if(i.forEach(l=>{let c=l.get("offset"),d=c==s,p=d&&a||new Map;l.forEach((h,m)=>{let S=m,y=h;if(m!=="offset")switch(S=t.normalizePropertyName(S,o),y){case mc:y=e.get(m);break;case Un:y=n.get(m);break;default:y=t.normalizeStyleValue(m,S,y,o);break}p.set(S,y)}),d||r.push(p),a=p,s=c}),o.length)throw tx(o);return r}function Ou(t,i,e,n){switch(i){case"start":t.onStart(()=>n(e&&su(e,"start",t)));break;case"done":t.onDone(()=>n(e&&su(e,"done",t)));break;case"destroy":t.onDestroy(()=>n(e&&su(e,"destroy",t)));break}}function su(t,i,e){let n=e.totalTime,o=!!e.disabled,r=Iu(t.element,t.triggerName,t.fromState,t.toState,i||t.phaseName,n??t.totalTime,o),s=t._data;return s!=null&&(r._data=s),r}function Iu(t,i,e,n,o="",r=0,s){return{element:t,triggerName:i,fromState:e,toState:n,phaseName:o,totalTime:r,disabled:!!s}}function Wi(t,i,e){let n=t.get(i);return n||t.set(i,n=e),n}function A0(t){let i=t.indexOf(":"),e=t.substring(1,i),n=t.slice(i+1);return[e,n]}var hx=typeof document>"u"?null:document.documentElement;function Du(t){let i=t.parentNode||t.host||null;return i===hx?null:i}function ux(t){return t.substring(1,6)=="ebkit"}var Mr=null,k0=!1;function mx(t){Mr||(Mr=fx()||{},k0=Mr.style?"WebkitAppearance"in Mr.style:!1);let i=!0;return Mr.style&&!ux(t)&&(i=t in Mr.style,!i&&k0&&(i="Webkit"+t.charAt(0).toUpperCase()+t.slice(1)in Mr.style)),i}function fx(){return typeof document<"u"?document.body:null}function W0(t,i){for(;i;){if(i===t)return!0;i=Du(i)}return!1}function Q0(t,i,e){if(e)return Array.from(t.querySelectorAll(i));let n=t.querySelector(i);return n?[n]:[]}var Mu=(()=>{class t{validateStyleProperty(e){return mx(e)}containsElement(e,n){return W0(e,n)}getParentElement(e){return Du(e)}query(e,n,o){return Q0(e,n,o)}computeStyle(e,n,o){return o||""}animate(e,n,o,r,s,a=[],l){return new ps(o,r)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=ne({token:t,factory:t.\u0275fac})}}return t})(),kr=class{static{this.NOOP=new Mu}},Nr=class{};var gx=1e3,Y0="{{",_x="}}",X0="ng-enter",hu="ng-leave",Wc="ng-trigger",Zc=".ng-trigger",N0="ng-animating",uu=".ng-animating";function Co(t){if(typeof t=="number")return t;let i=t.match(/^(-?[\.\d]+)(m?s)/);return!i||i.length<2?0:mu(parseFloat(i[1]),i[2])}function mu(t,i){switch(i){case"s":return t*gx;default:return t}}function Jc(t,i,e){return t.hasOwnProperty("duration")?t:vx(t,i,e)}function vx(t,i,e){let n=/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i,o,r=0,s="";if(typeof t=="string"){let a=t.match(n);if(a===null)return i.push(R0(t)),{duration:0,delay:0,easing:""};o=mu(parseFloat(a[1]),a[2]);let l=a[3];l!=null&&(r=mu(parseFloat(l),a[4]));let c=a[5];c&&(s=c)}else o=t;if(!e){let a=!1,l=i.length;o<0&&(i.push(NT()),a=!0),r<0&&(i.push(LT()),a=!0),a&&i.splice(l,0,R0(t))}return{duration:o,delay:r,easing:s}}function bx(t){return t.length?t[0]instanceof Map?t:t.map(i=>new Map(Object.entries(i))):[]}function Jn(t,i,e){i.forEach((n,o)=>{let r=Ru(o);e&&!e.has(o)&&e.set(o,t.style[r]),t.style[r]=n})}function Ar(t,i){i.forEach((e,n)=>{let o=Ru(n);t.style[o]=""})}function Pa(t){return Array.isArray(t)?t.length==1?t[0]:i_(t):t}function yx(t,i,e){let n=i.params||{},o=K0(t);o.length&&o.forEach(r=>{n.hasOwnProperty(r)||e.push(FT(r))})}var fu=new RegExp(`${Y0}\\s*(.+?)\\s*${_x}`,"g");function K0(t){let i=[];if(typeof t=="string"){let e;for(;e=fu.exec(t);)i.push(e[1]);fu.lastIndex=0}return i}function Ia(t,i,e){let n=`${t}`,o=n.replace(fu,(r,s)=>{let a=i[s];return a==null&&(e.push(VT(s)),a=""),a.toString()});return o==n?t:o}var Cx=/-+([a-z0-9])/g;function Ru(t){return t.replace(Cx,(...i)=>i[1].toUpperCase())}function wx(t,i){return t===0||i===0}function Sx(t,i,e){if(e.size&&i.length){let n=i[0],o=[];if(e.forEach((r,s)=>{n.has(s)||o.push(s),n.set(s,r)}),o.length)for(let r=1;r<i.length;r++){let s=i[r];o.forEach(a=>s.set(a,Au(t,a)))}}return i}function Ui(t,i,e){switch(i.type){case Ue.Trigger:return t.visitTrigger(i,e);case Ue.State:return t.visitState(i,e);case Ue.Transition:return t.visitTransition(i,e);case Ue.Sequence:return t.visitSequence(i,e);case Ue.Group:return t.visitGroup(i,e);case Ue.Animate:return t.visitAnimate(i,e);case Ue.Keyframes:return t.visitKeyframes(i,e);case Ue.Style:return t.visitStyle(i,e);case Ue.Reference:return t.visitReference(i,e);case Ue.AnimateChild:return t.visitAnimateChild(i,e);case Ue.AnimateRef:return t.visitAnimateRef(i,e);case Ue.Query:return t.visitQuery(i,e);case Ue.Stagger:return t.visitStagger(i,e);default:throw BT(i.type)}}function Au(t,i){return window.getComputedStyle(t)[i]}var Ex=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]),ed=class extends Nr{normalizePropertyName(i,e){return Ru(i)}normalizeStyleValue(i,e,n,o){let r="",s=n.toString().trim();if(Ex.has(e)&&n!==0&&n!=="0")if(typeof n=="number")r="px";else{let a=n.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&a[1].length==0&&o.push(HT(i,n))}return s+r}};var td="*";function Tx(t,i){let e=[];return typeof t=="string"?t.split(/\s*,\s*/).forEach(n=>xx(n,e,i)):e.push(t),e}function xx(t,i,e){if(t[0]==":"){let l=Px(t,e);if(typeof l=="function"){i.push(l);return}t=l}let n=t.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(n==null||n.length<4)return e.push(ZT(t)),i;let o=n[1],r=n[2],s=n[3];i.push(L0(o,s));let a=o==td&&s==td;r[0]=="<"&&!a&&i.push(L0(s,o))}function Px(t,i){switch(t){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(e,n)=>parseFloat(n)>parseFloat(e);case":decrement":return(e,n)=>parseFloat(n)<parseFloat(e);default:return i.push(JT(t)),"* => *"}}var Qc=new Set(["true","1"]),Yc=new Set(["false","0"]);function L0(t,i){let e=Qc.has(t)||Yc.has(t),n=Qc.has(i)||Yc.has(i);return(o,r)=>{let s=t==td||t==o,a=i==td||i==r;return!s&&e&&typeof o=="boolean"&&(s=o?Qc.has(t):Yc.has(t)),!a&&n&&typeof r=="boolean"&&(a=r?Qc.has(i):Yc.has(i)),s&&a}}var Z0=":self",Ox=new RegExp(`s*${Z0}s*,?`,"g");function J0(t,i,e,n){return new gu(t).build(i,e,n)}var F0="",gu=class{constructor(i){this._driver=i}build(i,e,n){let o=new _u(e);return this._resetContextStyleTimingState(o),Ui(this,Pa(i),o)}_resetContextStyleTimingState(i){i.currentQuerySelector=F0,i.collectedStyles=new Map,i.collectedStyles.set(F0,new Map),i.currentTime=0}visitTrigger(i,e){let n=e.queryCount=0,o=e.depCount=0,r=[],s=[];return i.name.charAt(0)=="@"&&e.errors.push(jT()),i.definitions.forEach(a=>{if(this._resetContextStyleTimingState(e),a.type==Ue.State){let l=a,c=l.name;c.toString().split(/\s*,\s*/).forEach(d=>{l.name=d,r.push(this.visitState(l,e))}),l.name=c}else if(a.type==Ue.Transition){let l=this.visitTransition(a,e);n+=l.queryCount,o+=l.depCount,s.push(l)}else e.errors.push(qT())}),{type:Ue.Trigger,name:i.name,states:r,transitions:s,queryCount:n,depCount:o,options:null}}visitState(i,e){let n=this.visitStyle(i.styles,e),o=i.options&&i.options.params||null;if(n.containsDynamicStyles){let r=new Set,s=o||{};n.styles.forEach(a=>{a instanceof Map&&a.forEach(l=>{K0(l).forEach(c=>{s.hasOwnProperty(c)||r.add(c)})})}),r.size&&e.errors.push(zT(i.name,[...r.values()]))}return{type:Ue.State,name:i.name,style:n,options:o?{params:o}:null}}visitTransition(i,e){e.queryCount=0,e.depCount=0;let n=Ui(this,Pa(i.animation),e),o=Tx(i.expr,e.errors);return{type:Ue.Transition,matchers:o,animation:n,queryCount:e.queryCount,depCount:e.depCount,options:Rr(i.options)}}visitSequence(i,e){return{type:Ue.Sequence,steps:i.steps.map(n=>Ui(this,n,e)),options:Rr(i.options)}}visitGroup(i,e){let n=e.currentTime,o=0,r=i.steps.map(s=>{e.currentTime=n;let a=Ui(this,s,e);return o=Math.max(o,e.currentTime),a});return e.currentTime=o,{type:Ue.Group,steps:r,options:Rr(i.options)}}visitAnimate(i,e){let n=Rx(i.timings,e.errors);e.currentAnimateTimings=n;let o,r=i.styles?i.styles:Sh({});if(r.type==Ue.Keyframes)o=this.visitKeyframes(r,e);else{let s=i.styles,a=!1;if(!s){a=!0;let c={};n.easing&&(c.easing=n.easing),s=Sh(c)}e.currentTime+=n.duration+n.delay;let l=this.visitStyle(s,e);l.isEmptyStep=a,o=l}return e.currentAnimateTimings=null,{type:Ue.Animate,timings:n,style:o,options:null}}visitStyle(i,e){let n=this._makeStyleAst(i,e);return this._validateStyleAst(n,e),n}_makeStyleAst(i,e){let n=[],o=Array.isArray(i.styles)?i.styles:[i.styles];for(let a of o)typeof a=="string"?a===Un?n.push(a):e.errors.push(GT(a)):n.push(new Map(Object.entries(a)));let r=!1,s=null;return n.forEach(a=>{if(a instanceof Map&&(a.has("easing")&&(s=a.get("easing"),a.delete("easing")),!r)){for(let l of a.values())if(l.toString().indexOf(Y0)>=0){r=!0;break}}}),{type:Ue.Style,styles:n,easing:s,offset:i.offset,containsDynamicStyles:r,options:null}}_validateStyleAst(i,e){let n=e.currentAnimateTimings,o=e.currentTime,r=e.currentTime;n&&r>0&&(r-=n.duration+n.delay),i.styles.forEach(s=>{typeof s!="string"&&s.forEach((a,l)=>{let c=e.collectedStyles.get(e.currentQuerySelector),d=c.get(l),p=!0;d&&(r!=o&&r>=d.startTime&&o<=d.endTime&&(e.errors.push($T(l,d.startTime,d.endTime,r,o)),p=!1),r=d.startTime),p&&c.set(l,{startTime:r,endTime:o}),e.options&&yx(a,e.options,e.errors)})})}visitKeyframes(i,e){let n={type:Ue.Keyframes,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push(UT()),n;let o=1,r=0,s=[],a=!1,l=!1,c=0,d=i.steps.map(x=>{let N=this._makeStyleAst(x,e),k=N.offset!=null?N.offset:Mx(N.styles),C=0;return k!=null&&(r++,C=N.offset=k),l=l||C<0||C>1,a=a||C<c,c=C,s.push(C),N});l&&e.errors.push(WT()),a&&e.errors.push(QT());let p=i.steps.length,h=0;r>0&&r<p?e.errors.push(YT()):r==0&&(h=o/(p-1));let m=p-1,S=e.currentTime,y=e.currentAnimateTimings,w=y.duration;return d.forEach((x,N)=>{let k=h>0?N==m?1:h*N:s[N],C=k*w;e.currentTime=S+y.delay+C,y.duration=C,this._validateStyleAst(x,e),x.offset=k,n.styles.push(x)}),n}visitReference(i,e){return{type:Ue.Reference,animation:Ui(this,Pa(i.animation),e),options:Rr(i.options)}}visitAnimateChild(i,e){return e.depCount++,{type:Ue.AnimateChild,options:Rr(i.options)}}visitAnimateRef(i,e){return{type:Ue.AnimateRef,animation:this.visitReference(i.animation,e),options:Rr(i.options)}}visitQuery(i,e){let n=e.currentQuerySelector,o=i.options||{};e.queryCount++,e.currentQuery=i;let[r,s]=Ix(i.selector);e.currentQuerySelector=n.length?n+" "+r:r,Wi(e.collectedStyles,e.currentQuerySelector,new Map);let a=Ui(this,Pa(i.animation),e);return e.currentQuery=null,e.currentQuerySelector=n,{type:Ue.Query,selector:r,limit:o.limit||0,optional:!!o.optional,includeSelf:s,animation:a,originalSelector:i.selector,options:Rr(i.options)}}visitStagger(i,e){e.currentQuery||e.errors.push(XT());let n=i.timings==="full"?{duration:0,delay:0,easing:"full"}:Jc(i.timings,e.errors,!0);return{type:Ue.Stagger,animation:Ui(this,Pa(i.animation),e),timings:n,options:null}}};function Ix(t){let i=!!t.split(/\s*,\s*/).find(e=>e==Z0);return i&&(t=t.replace(Ox,"")),t=t.replace(/@\*/g,Zc).replace(/@\w+/g,e=>Zc+"-"+e.slice(1)).replace(/:animating/g,uu),[t,i]}function Dx(t){return t?E({},t):null}var _u=class{constructor(i){this.errors=i,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles=new Map,this.options=null,this.unsupportedCSSPropertiesFound=new Set}};function Mx(t){if(typeof t=="string")return null;let i=null;if(Array.isArray(t))t.forEach(e=>{if(e instanceof Map&&e.has("offset")){let n=e;i=parseFloat(n.get("offset")),n.delete("offset")}});else if(t instanceof Map&&t.has("offset")){let e=t;i=parseFloat(e.get("offset")),e.delete("offset")}return i}function Rx(t,i){if(t.hasOwnProperty("duration"))return t;if(typeof t=="number"){let r=Jc(t,i).duration;return au(r,0,"")}let e=t;if(e.split(/\s+/).some(r=>r.charAt(0)=="{"&&r.charAt(1)=="{")){let r=au(0,0,"");return r.dynamic=!0,r.strValue=e,r}let o=Jc(e,i);return au(o.duration,o.delay,o.easing)}function Rr(t){return t?(t=E({},t),t.params&&(t.params=Dx(t.params))):t={},t}function au(t,i,e){return{duration:t,delay:i,easing:e}}function ku(t,i,e,n,o,r,s=null,a=!1){return{type:1,element:t,keyframes:i,preStyleProps:e,postStyleProps:n,duration:o,delay:r,totalTime:o+r,easing:s,subTimeline:a}}var Da=class{constructor(){this._map=new Map}get(i){return this._map.get(i)||[]}append(i,e){let n=this._map.get(i);n||this._map.set(i,n=[]),n.push(...e)}has(i){return this._map.has(i)}clear(){this._map.clear()}},Ax=1,kx=":enter",Nx=new RegExp(kx,"g"),Lx=":leave",Fx=new RegExp(Lx,"g");function eb(t,i,e,n,o,r=new Map,s=new Map,a,l,c=[]){return new vu().buildKeyframes(t,i,e,n,o,r,s,a,l,c)}var vu=class{buildKeyframes(i,e,n,o,r,s,a,l,c,d=[]){c=c||new Da;let p=new bu(i,e,c,o,r,d,[]);p.options=l;let h=l.delay?Co(l.delay):0;p.currentTimeline.delayNextStep(h),p.currentTimeline.setStyles([s],null,p.errors,l),Ui(this,n,p);let m=p.timelines.filter(S=>S.containsAnimation());if(m.length&&a.size){let S;for(let y=m.length-1;y>=0;y--){let w=m[y];if(w.element===e){S=w;break}}S&&!S.allowOnlyTimelineStyles()&&S.setStyles([a],null,p.errors,l)}return m.length?m.map(S=>S.buildKeyframes()):[ku(e,[],[],[],0,h,"",!1)]}visitTrigger(i,e){}visitState(i,e){}visitTransition(i,e){}visitAnimateChild(i,e){let n=e.subInstructions.get(e.element);if(n){let o=e.createSubContext(i.options),r=e.currentTimeline.currentTime,s=this._visitSubInstructions(n,o,o.options);r!=s&&e.transformIntoNewTimeline(s)}e.previousNode=i}visitAnimateRef(i,e){let n=e.createSubContext(i.options);n.transformIntoNewTimeline(),this._applyAnimationRefDelays([i.options,i.animation.options],e,n),this.visitReference(i.animation,n),e.transformIntoNewTimeline(n.currentTimeline.currentTime),e.previousNode=i}_applyAnimationRefDelays(i,e,n){for(let o of i){let r=o?.delay;if(r){let s=typeof r=="number"?r:Co(Ia(r,o?.params??{},e.errors));n.delayNextStep(s)}}}_visitSubInstructions(i,e,n){let r=e.currentTimeline.currentTime,s=n.duration!=null?Co(n.duration):null,a=n.delay!=null?Co(n.delay):null;return s!==0&&i.forEach(l=>{let c=e.appendInstructionToTimeline(l,s,a);r=Math.max(r,c.duration+c.delay)}),r}visitReference(i,e){e.updateOptions(i.options,!0),Ui(this,i.animation,e),e.previousNode=i}visitSequence(i,e){let n=e.subContextCount,o=e,r=i.options;if(r&&(r.params||r.delay)&&(o=e.createSubContext(r),o.transformIntoNewTimeline(),r.delay!=null)){o.previousNode.type==Ue.Style&&(o.currentTimeline.snapshotCurrentStyles(),o.previousNode=id);let s=Co(r.delay);o.delayNextStep(s)}i.steps.length&&(i.steps.forEach(s=>Ui(this,s,o)),o.currentTimeline.applyStylesToKeyframe(),o.subContextCount>n&&o.transformIntoNewTimeline()),e.previousNode=i}visitGroup(i,e){let n=[],o=e.currentTimeline.currentTime,r=i.options&&i.options.delay?Co(i.options.delay):0;i.steps.forEach(s=>{let a=e.createSubContext(i.options);r&&a.delayNextStep(r),Ui(this,s,a),o=Math.max(o,a.currentTimeline.currentTime),n.push(a.currentTimeline)}),n.forEach(s=>e.currentTimeline.mergeTimelineCollectedStyles(s)),e.transformIntoNewTimeline(o),e.previousNode=i}_visitTiming(i,e){if(i.dynamic){let n=i.strValue,o=e.params?Ia(n,e.params,e.errors):n;return Jc(o,e.errors)}else return{duration:i.duration,delay:i.delay,easing:i.easing}}visitAnimate(i,e){let n=e.currentAnimateTimings=this._visitTiming(i.timings,e),o=e.currentTimeline;n.delay&&(e.incrementTime(n.delay),o.snapshotCurrentStyles());let r=i.style;r.type==Ue.Keyframes?this.visitKeyframes(r,e):(e.incrementTime(n.duration),this.visitStyle(r,e),o.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=i}visitStyle(i,e){let n=e.currentTimeline,o=e.currentAnimateTimings;!o&&n.hasCurrentStyleProperties()&&n.forwardFrame();let r=o&&o.easing||i.easing;i.isEmptyStep?n.applyEmptyStep(r):n.setStyles(i.styles,r,e.errors,e.options),e.previousNode=i}visitKeyframes(i,e){let n=e.currentAnimateTimings,o=e.currentTimeline.duration,r=n.duration,a=e.createSubContext().currentTimeline;a.easing=n.easing,i.styles.forEach(l=>{let c=l.offset||0;a.forwardTime(c*r),a.setStyles(l.styles,l.easing,e.errors,e.options),a.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(a),e.transformIntoNewTimeline(o+r),e.previousNode=i}visitQuery(i,e){let n=e.currentTimeline.currentTime,o=i.options||{},r=o.delay?Co(o.delay):0;r&&(e.previousNode.type===Ue.Style||n==0&&e.currentTimeline.hasCurrentStyleProperties())&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=id);let s=n,a=e.invokeQuery(i.selector,i.originalSelector,i.limit,i.includeSelf,!!o.optional,e.errors);e.currentQueryTotal=a.length;let l=null;a.forEach((c,d)=>{e.currentQueryIndex=d;let p=e.createSubContext(i.options,c);r&&p.delayNextStep(r),c===e.element&&(l=p.currentTimeline),Ui(this,i.animation,p),p.currentTimeline.applyStylesToKeyframe();let h=p.currentTimeline.currentTime;s=Math.max(s,h)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(s),l&&(e.currentTimeline.mergeTimelineCollectedStyles(l),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=i}visitStagger(i,e){let n=e.parentContext,o=e.currentTimeline,r=i.timings,s=Math.abs(r.duration),a=s*(e.currentQueryTotal-1),l=s*e.currentQueryIndex;switch(r.duration<0?"reverse":r.easing){case"reverse":l=a-l;break;case"full":l=n.currentStaggerTime;break}let d=e.currentTimeline;l&&d.delayNextStep(l);let p=d.currentTime;Ui(this,i.animation,e),e.previousNode=i,n.currentStaggerTime=o.currentTime-p+(o.startTime-n.currentTimeline.startTime)}},id={},bu=class t{constructor(i,e,n,o,r,s,a,l){this._driver=i,this.element=e,this.subInstructions=n,this._enterClassName=o,this._leaveClassName=r,this.errors=s,this.timelines=a,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=id,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new nd(this._driver,e,0),a.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(i,e){if(!i)return;let n=i,o=this.options;n.duration!=null&&(o.duration=Co(n.duration)),n.delay!=null&&(o.delay=Co(n.delay));let r=n.params;if(r){let s=o.params;s||(s=this.options.params={}),Object.keys(r).forEach(a=>{(!e||!s.hasOwnProperty(a))&&(s[a]=Ia(r[a],s,this.errors))})}}_copyOptions(){let i={};if(this.options){let e=this.options.params;if(e){let n=i.params={};Object.keys(e).forEach(o=>{n[o]=e[o]})}}return i}createSubContext(i=null,e,n){let o=e||this.element,r=new t(this._driver,o,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(o,n||0));return r.previousNode=this.previousNode,r.currentAnimateTimings=this.currentAnimateTimings,r.options=this._copyOptions(),r.updateOptions(i),r.currentQueryIndex=this.currentQueryIndex,r.currentQueryTotal=this.currentQueryTotal,r.parentContext=this,this.subContextCount++,r}transformIntoNewTimeline(i){return this.previousNode=id,this.currentTimeline=this.currentTimeline.fork(this.element,i),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(i,e,n){let o={duration:e??i.duration,delay:this.currentTimeline.currentTime+(n??0)+i.delay,easing:""},r=new yu(this._driver,i.element,i.keyframes,i.preStyleProps,i.postStyleProps,o,i.stretchStartingKeyframe);return this.timelines.push(r),o}incrementTime(i){this.currentTimeline.forwardTime(this.currentTimeline.duration+i)}delayNextStep(i){i>0&&this.currentTimeline.delayNextStep(i)}invokeQuery(i,e,n,o,r,s){let a=[];if(o&&a.push(this.element),i.length>0){i=i.replace(Nx,"."+this._enterClassName),i=i.replace(Fx,"."+this._leaveClassName);let l=n!=1,c=this._driver.query(this.element,i,l);n!==0&&(c=n<0?c.slice(c.length+n,c.length):c.slice(0,n)),a.push(...c)}return!r&&a.length==0&&s.push(KT(e)),a}},nd=class t{constructor(i,e,n,o){this._driver=i,this.element=e,this.startTime=n,this._elementTimelineStylesLookup=o,this.duration=0,this.easing=null,this._previousKeyframe=new Map,this._currentKeyframe=new Map,this._keyframes=new Map,this._styleSummary=new Map,this._localTimelineStyles=new Map,this._pendingStyles=new Map,this._backFill=new Map,this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(e),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(e,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(i){let e=this._keyframes.size===1&&this._pendingStyles.size;this.duration||e?(this.forwardTime(this.currentTime+i),e&&this.snapshotCurrentStyles()):this.startTime+=i}fork(i,e){return this.applyStylesToKeyframe(),new t(this._driver,i,e||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=Ax,this._loadKeyframe()}forwardTime(i){this.applyStylesToKeyframe(),this.duration=i,this._loadKeyframe()}_updateStyle(i,e){this._localTimelineStyles.set(i,e),this._globalTimelineStyles.set(i,e),this._styleSummary.set(i,{time:this.currentTime,value:e})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(i){i&&this._previousKeyframe.set("easing",i);for(let[e,n]of this._globalTimelineStyles)this._backFill.set(e,n||Un),this._currentKeyframe.set(e,Un);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(i,e,n,o){e&&this._previousKeyframe.set("easing",e);let r=o&&o.params||{},s=Vx(i,this._globalTimelineStyles);for(let[a,l]of s){let c=Ia(l,r,n);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??Un),this._updateStyle(a,c)}}applyStylesToKeyframe(){this._pendingStyles.size!=0&&(this._pendingStyles.forEach((i,e)=>{this._currentKeyframe.set(e,i)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((i,e)=>{this._currentKeyframe.has(e)||this._currentKeyframe.set(e,i)}))}snapshotCurrentStyles(){for(let[i,e]of this._localTimelineStyles)this._pendingStyles.set(i,e),this._updateStyle(i,e)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){let i=[];for(let e in this._currentKeyframe)i.push(e);return i}mergeTimelineCollectedStyles(i){i._styleSummary.forEach((e,n)=>{let o=this._styleSummary.get(n);(!o||e.time>o.time)&&this._updateStyle(n,e.value)})}buildKeyframes(){this.applyStylesToKeyframe();let i=new Set,e=new Set,n=this._keyframes.size===1&&this.duration===0,o=[];this._keyframes.forEach((a,l)=>{let c=new Map([...this._backFill,...a]);c.forEach((d,p)=>{d===mc?i.add(p):d===Un&&e.add(p)}),n||c.set("offset",l/this.duration),o.push(c)});let r=[...i.values()],s=[...e.values()];if(n){let a=o[0],l=new Map(a);a.set("offset",0),l.set("offset",1),o=[a,l]}return ku(this.element,o,r,s,this.duration,this.startTime,this.easing,!1)}},yu=class extends nd{constructor(i,e,n,o,r,s,a=!1){super(i,e,s.delay),this.keyframes=n,this.preStyleProps=o,this.postStyleProps=r,this._stretchStartingKeyframe=a,this.timings={duration:s.duration,delay:s.delay,easing:s.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let i=this.keyframes,{delay:e,duration:n,easing:o}=this.timings;if(this._stretchStartingKeyframe&&e){let r=[],s=n+e,a=e/s,l=new Map(i[0]);l.set("offset",0),r.push(l);let c=new Map(i[0]);c.set("offset",V0(a)),r.push(c);let d=i.length-1;for(let p=1;p<=d;p++){let h=new Map(i[p]),m=h.get("offset"),S=e+m*n;h.set("offset",V0(S/s)),r.push(h)}n=s,e=0,o="",i=r}return ku(this.element,i,this.preStyleProps,this.postStyleProps,n,e,o,!0)}};function V0(t,i=3){let e=Math.pow(10,i-1);return Math.round(t*e)/e}function Vx(t,i){let e=new Map,n;return t.forEach(o=>{if(o==="*"){n??=i.keys();for(let r of n)e.set(r,Un)}else for(let[r,s]of o)e.set(r,s)}),e}function B0(t,i,e,n,o,r,s,a,l,c,d,p,h){return{type:0,element:t,triggerName:i,isRemovalTransition:o,fromState:e,fromStyles:r,toState:n,toStyles:s,timelines:a,queriedElements:l,preStyleProps:c,postStyleProps:d,totalTime:p,errors:h}}var lu={},od=class{constructor(i,e,n){this._triggerName=i,this.ast=e,this._stateStyles=n}match(i,e,n,o){return Bx(this.ast.matchers,i,e,n,o)}buildStyles(i,e,n){let o=this._stateStyles.get("*");return i!==void 0&&(o=this._stateStyles.get(i?.toString())||o),o?o.buildStyles(e,n):new Map}build(i,e,n,o,r,s,a,l,c,d){let p=[],h=this.ast.options&&this.ast.options.params||lu,m=a&&a.params||lu,S=this.buildStyles(n,m,p),y=l&&l.params||lu,w=this.buildStyles(o,y,p),x=new Set,N=new Map,k=new Map,C=o==="void",Q={params:tb(y,h),delay:this.ast.options?.delay},$=d?[]:eb(i,e,this.ast.animation,r,s,S,w,Q,c,p),ie=0;return $.forEach(re=>{ie=Math.max(re.duration+re.delay,ie)}),p.length?B0(e,this._triggerName,n,o,C,S,w,[],[],N,k,ie,p):($.forEach(re=>{let we=re.element,ge=Wi(N,we,new Set);re.preStyleProps.forEach(_e=>ge.add(_e));let te=Wi(k,we,new Set);re.postStyleProps.forEach(_e=>te.add(_e)),we!==e&&x.add(we)}),B0(e,this._triggerName,n,o,C,S,w,$,[...x.values()],N,k,ie))}};function Bx(t,i,e,n,o){return t.some(r=>r(i,e,n,o))}function tb(t,i){let e=E({},i);return Object.entries(t).forEach(([n,o])=>{o!=null&&(e[n]=o)}),e}var Cu=class{constructor(i,e,n){this.styles=i,this.defaultParams=e,this.normalizer=n}buildStyles(i,e){let n=new Map,o=tb(i,this.defaultParams);return this.styles.styles.forEach(r=>{typeof r!="string"&&r.forEach((s,a)=>{s&&(s=Ia(s,o,e));let l=this.normalizer.normalizePropertyName(a,e);s=this.normalizer.normalizeStyleValue(a,l,s,e),n.set(a,s)})}),n}};function Hx(t,i,e){return new wu(t,i,e)}var wu=class{constructor(i,e,n){this.name=i,this.ast=e,this._normalizer=n,this.transitionFactories=[],this.states=new Map,e.states.forEach(o=>{let r=o.options&&o.options.params||{};this.states.set(o.name,new Cu(o.style,r,n))}),H0(this.states,"true","1"),H0(this.states,"false","0"),e.transitions.forEach(o=>{this.transitionFactories.push(new od(i,o,this.states))}),this.fallbackTransition=jx(i,this.states,this._normalizer)}get containsQueries(){return this.ast.queryCount>0}matchTransition(i,e,n,o){return this.transitionFactories.find(s=>s.match(i,e,n,o))||null}matchStyles(i,e,n){return this.fallbackTransition.buildStyles(i,e,n)}};function jx(t,i,e){let n=[(s,a)=>!0],o={type:Ue.Sequence,steps:[],options:null},r={type:Ue.Transition,animation:o,matchers:n,options:null,queryCount:0,depCount:0};return new od(t,r,i)}function H0(t,i,e){t.has(i)?t.has(e)||t.set(e,t.get(i)):t.has(e)&&t.set(i,t.get(e))}var qx=new Da,Su=class{constructor(i,e,n){this.bodyNode=i,this._driver=e,this._normalizer=n,this._animations=new Map,this._playersById=new Map,this.players=[]}register(i,e){let n=[],o=[],r=J0(this._driver,e,n,o);if(n.length)throw ix(n);o.length&&void 0,this._animations.set(i,r)}_buildPlayer(i,e,n){let o=i.element,r=U0(this._normalizer,i.keyframes,e,n);return this._driver.animate(o,r,i.duration,i.delay,i.easing,[],!0)}create(i,e,n={}){let o=[],r=this._animations.get(i),s,a=new Map;if(r?(s=eb(this._driver,e,r,X0,hu,new Map,new Map,n,qx,o),s.forEach(d=>{let p=Wi(a,d.element,new Map);d.postStyleProps.forEach(h=>p.set(h,null))})):(o.push(nx()),s=[]),o.length)throw ox(o);a.forEach((d,p)=>{d.forEach((h,m)=>{d.set(m,this._driver.computeStyle(p,m,Un))})});let l=s.map(d=>{let p=a.get(d.element);return this._buildPlayer(d,new Map,p)}),c=Jo(l);return this._playersById.set(i,c),c.onDestroy(()=>this.destroy(i)),this.players.push(c),c}destroy(i){let e=this._getPlayer(i);e.destroy(),this._playersById.delete(i);let n=this.players.indexOf(e);n>=0&&this.players.splice(n,1)}_getPlayer(i){let e=this._playersById.get(i);if(!e)throw rx(i);return e}listen(i,e,n,o){let r=Iu(e,"","","");return Ou(this._getPlayer(i),n,r,o),()=>{}}command(i,e,n,o){if(n=="register"){this.register(i,o[0]);return}if(n=="create"){let s=o[0]||{};this.create(i,e,s);return}let r=this._getPlayer(i);switch(n){case"play":r.play();break;case"pause":r.pause();break;case"reset":r.reset();break;case"restart":r.restart();break;case"finish":r.finish();break;case"init":r.init();break;case"setPosition":r.setPosition(parseFloat(o[0]));break;case"destroy":this.destroy(i);break}}},j0="ng-animate-queued",zx=".ng-animate-queued",cu="ng-animate-disabled",Gx=".ng-animate-disabled",$x="ng-star-inserted",Ux=".ng-star-inserted",Wx=[],ib={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},Qx={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},yn="__ng_removed",Ma=class{get params(){return this.options.params}constructor(i,e=""){this.namespaceId=e;let n=i&&i.hasOwnProperty("value"),o=n?i.value:i;if(this.value=Xx(o),n){let r=i,{value:s}=r,a=da(r,["value"]);this.options=a}else this.options={};this.options.params||(this.options.params={})}absorbOptions(i){let e=i.params;if(e){let n=this.options.params;Object.keys(e).forEach(o=>{n[o]==null&&(n[o]=e[o])})}}},Oa="void",du=new Ma(Oa),Eu=class{constructor(i,e,n){this.id=i,this.hostElement=e,this._engine=n,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+i,an(e,this._hostClassName)}listen(i,e,n,o){if(!this._triggers.has(e))throw sx(n,e);if(n==null||n.length==0)throw ax(e);if(!Kx(n))throw lx(n,e);let r=Wi(this._elementListeners,i,[]),s={name:e,phase:n,callback:o};r.push(s);let a=Wi(this._engine.statesByElement,i,new Map);return a.has(e)||(an(i,Wc),an(i,Wc+"-"+e),a.set(e,du)),()=>{this._engine.afterFlush(()=>{let l=r.indexOf(s);l>=0&&r.splice(l,1),this._triggers.has(e)||a.delete(e)})}}register(i,e){return this._triggers.has(i)?!1:(this._triggers.set(i,e),!0)}_getTrigger(i){let e=this._triggers.get(i);if(!e)throw cx(i);return e}trigger(i,e,n,o=!0){let r=this._getTrigger(e),s=new Ra(this.id,e,i),a=this._engine.statesByElement.get(i);a||(an(i,Wc),an(i,Wc+"-"+e),this._engine.statesByElement.set(i,a=new Map));let l=a.get(e),c=new Ma(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(e,c),l||(l=du),!(c.value===Oa)&&l.value===c.value){if(!eP(l.params,c.params)){let y=[],w=r.matchStyles(l.value,l.params,y),x=r.matchStyles(c.value,c.params,y);y.length?this._engine.reportError(y):this._engine.afterFlush(()=>{Ar(i,w),Jn(i,x)})}return}let h=Wi(this._engine.playersByElement,i,[]);h.forEach(y=>{y.namespaceId==this.id&&y.triggerName==e&&y.queued&&y.destroy()});let m=r.matchTransition(l.value,c.value,i,c.params),S=!1;if(!m){if(!o)return;m=r.fallbackTransition,S=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:i,triggerName:e,transition:m,fromState:l,toState:c,player:s,isFallbackTransition:S}),S||(an(i,j0),s.onStart(()=>{Ps(i,j0)})),s.onDone(()=>{let y=this.players.indexOf(s);y>=0&&this.players.splice(y,1);let w=this._engine.playersByElement.get(i);if(w){let x=w.indexOf(s);x>=0&&w.splice(x,1)}}),this.players.push(s),h.push(s),s}deregister(i){this._triggers.delete(i),this._engine.statesByElement.forEach(e=>e.delete(i)),this._elementListeners.forEach((e,n)=>{this._elementListeners.set(n,e.filter(o=>o.name!=i))})}clearElementCache(i){this._engine.statesByElement.delete(i),this._elementListeners.delete(i);let e=this._engine.playersByElement.get(i);e&&(e.forEach(n=>n.destroy()),this._engine.playersByElement.delete(i))}_signalRemovalForInnerTriggers(i,e){let n=this._engine.driver.query(i,Zc,!0);n.forEach(o=>{if(o[yn])return;let r=this._engine.fetchNamespacesByElement(o);r.size?r.forEach(s=>s.triggerLeaveAnimation(o,e,!1,!0)):this.clearElementCache(o)}),this._engine.afterFlushAnimationsDone(()=>n.forEach(o=>this.clearElementCache(o)))}triggerLeaveAnimation(i,e,n,o){let r=this._engine.statesByElement.get(i),s=new Map;if(r){let a=[];if(r.forEach((l,c)=>{if(s.set(c,l.value),this._triggers.has(c)){let d=this.trigger(i,c,Oa,o);d&&a.push(d)}}),a.length)return this._engine.markElementAsRemoved(this.id,i,!0,e,s),n&&Jo(a).onDone(()=>this._engine.processLeaveNode(i)),!0}return!1}prepareLeaveAnimationListeners(i){let e=this._elementListeners.get(i),n=this._engine.statesByElement.get(i);if(e&&n){let o=new Set;e.forEach(r=>{let s=r.name;if(o.has(s))return;o.add(s);let l=this._triggers.get(s).fallbackTransition,c=n.get(s)||du,d=new Ma(Oa),p=new Ra(this.id,s,i);this._engine.totalQueuedPlayers++,this._queue.push({element:i,triggerName:s,transition:l,fromState:c,toState:d,player:p,isFallbackTransition:!0})})}}removeNode(i,e){let n=this._engine;if(i.childElementCount&&this._signalRemovalForInnerTriggers(i,e),this.triggerLeaveAnimation(i,e,!0))return;let o=!1;if(n.totalAnimations){let r=n.players.length?n.playersByQueriedElement.get(i):[];if(r&&r.length)o=!0;else{let s=i;for(;s=s.parentNode;)if(n.statesByElement.get(s)){o=!0;break}}}if(this.prepareLeaveAnimationListeners(i),o)n.markElementAsRemoved(this.id,i,!1,e);else{let r=i[yn];(!r||r===ib)&&(n.afterFlush(()=>this.clearElementCache(i)),n.destroyInnerAnimations(i),n._onRemovalComplete(i,e))}}insertNode(i,e){an(i,this._hostClassName)}drainQueuedTransitions(i){let e=[];return this._queue.forEach(n=>{let o=n.player;if(o.destroyed)return;let r=n.element,s=this._elementListeners.get(r);s&&s.forEach(a=>{if(a.name==n.triggerName){let l=Iu(r,n.triggerName,n.fromState.value,n.toState.value);l._data=i,Ou(n.player,a.phase,l,a.callback)}}),o.markedForDestroy?this._engine.afterFlush(()=>{o.destroy()}):e.push(n)}),this._queue=[],e.sort((n,o)=>{let r=n.transition.ast.depCount,s=o.transition.ast.depCount;return r==0||s==0?r-s:this._engine.driver.containsElement(n.element,o.element)?1:-1})}destroy(i){this.players.forEach(e=>e.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,i)}},Tu=class{_onRemovalComplete(i,e){this.onRemovalComplete(i,e)}constructor(i,e,n){this.bodyNode=i,this.driver=e,this._normalizer=n,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(o,r)=>{}}get queuedPlayers(){let i=[];return this._namespaceList.forEach(e=>{e.players.forEach(n=>{n.queued&&i.push(n)})}),i}createNamespace(i,e){let n=new Eu(i,e,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,e)?this._balanceNamespaceList(n,e):(this.newHostElements.set(e,n),this.collectEnterElement(e)),this._namespaceLookup[i]=n}_balanceNamespaceList(i,e){let n=this._namespaceList,o=this.namespacesByHostElement;if(n.length-1>=0){let s=!1,a=this.driver.getParentElement(e);for(;a;){let l=o.get(a);if(l){let c=n.indexOf(l);n.splice(c+1,0,i),s=!0;break}a=this.driver.getParentElement(a)}s||n.unshift(i)}else n.push(i);return o.set(e,i),i}register(i,e){let n=this._namespaceLookup[i];return n||(n=this.createNamespace(i,e)),n}registerTrigger(i,e,n){let o=this._namespaceLookup[i];o&&o.register(e,n)&&this.totalAnimations++}destroy(i,e){i&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{let n=this._fetchNamespace(i);this.namespacesByHostElement.delete(n.hostElement);let o=this._namespaceList.indexOf(n);o>=0&&this._namespaceList.splice(o,1),n.destroy(e),delete this._namespaceLookup[i]}))}_fetchNamespace(i){return this._namespaceLookup[i]}fetchNamespacesByElement(i){let e=new Set,n=this.statesByElement.get(i);if(n){for(let o of n.values())if(o.namespaceId){let r=this._fetchNamespace(o.namespaceId);r&&e.add(r)}}return e}trigger(i,e,n,o){if(Xc(e)){let r=this._fetchNamespace(i);if(r)return r.trigger(e,n,o),!0}return!1}insertNode(i,e,n,o){if(!Xc(e))return;let r=e[yn];if(r&&r.setForRemoval){r.setForRemoval=!1,r.setForMove=!0;let s=this.collectedLeaveElements.indexOf(e);s>=0&&this.collectedLeaveElements.splice(s,1)}if(i){let s=this._fetchNamespace(i);s&&s.insertNode(e,n)}o&&this.collectEnterElement(e)}collectEnterElement(i){this.collectedEnterElements.push(i)}markElementAsDisabled(i,e){e?this.disabledNodes.has(i)||(this.disabledNodes.add(i),an(i,cu)):this.disabledNodes.has(i)&&(this.disabledNodes.delete(i),Ps(i,cu))}removeNode(i,e,n){if(Xc(e)){let o=i?this._fetchNamespace(i):null;o?o.removeNode(e,n):this.markElementAsRemoved(i,e,!1,n);let r=this.namespacesByHostElement.get(e);r&&r.id!==i&&r.removeNode(e,n)}else this._onRemovalComplete(e,n)}markElementAsRemoved(i,e,n,o,r){this.collectedLeaveElements.push(e),e[yn]={namespaceId:i,setForRemoval:o,hasAnimation:n,removedBeforeQueried:!1,previousTriggersValues:r}}listen(i,e,n,o,r){return Xc(e)?this._fetchNamespace(i).listen(e,n,o,r):()=>{}}_buildInstruction(i,e,n,o,r){return i.transition.build(this.driver,i.element,i.fromState.value,i.toState.value,n,o,i.fromState.options,i.toState.options,e,r)}destroyInnerAnimations(i){let e=this.driver.query(i,Zc,!0);e.forEach(n=>this.destroyActiveAnimationsForElement(n)),this.playersByQueriedElement.size!=0&&(e=this.driver.query(i,uu,!0),e.forEach(n=>this.finishActiveQueriedAnimationOnElement(n)))}destroyActiveAnimationsForElement(i){let e=this.playersByElement.get(i);e&&e.forEach(n=>{n.queued?n.markedForDestroy=!0:n.destroy()})}finishActiveQueriedAnimationOnElement(i){let e=this.playersByQueriedElement.get(i);e&&e.forEach(n=>n.finish())}whenRenderingDone(){return new Promise(i=>{if(this.players.length)return Jo(this.players).onDone(()=>i());i()})}processLeaveNode(i){let e=i[yn];if(e&&e.setForRemoval){if(i[yn]=ib,e.namespaceId){this.destroyInnerAnimations(i);let n=this._fetchNamespace(e.namespaceId);n&&n.clearElementCache(i)}this._onRemovalComplete(i,e.setForRemoval)}i.classList?.contains(cu)&&this.markElementAsDisabled(i,!1),this.driver.query(i,Gx,!0).forEach(n=>{this.markElementAsDisabled(n,!1)})}flush(i=-1){let e=[];if(this.newHostElements.size&&(this.newHostElements.forEach((n,o)=>this._balanceNamespaceList(n,o)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let n=0;n<this.collectedEnterElements.length;n++){let o=this.collectedEnterElements[n];an(o,$x)}if(this._namespaceList.length&&(this.totalQueuedPlayers||this.collectedLeaveElements.length)){let n=[];try{e=this._flushAnimations(n,i)}finally{for(let o=0;o<n.length;o++)n[o]()}}else for(let n=0;n<this.collectedLeaveElements.length;n++){let o=this.collectedLeaveElements[n];this.processLeaveNode(o)}if(this.totalQueuedPlayers=0,this.collectedEnterElements.length=0,this.collectedLeaveElements.length=0,this._flushFns.forEach(n=>n()),this._flushFns=[],this._whenQuietFns.length){let n=this._whenQuietFns;this._whenQuietFns=[],e.length?Jo(e).onDone(()=>{n.forEach(o=>o())}):n.forEach(o=>o())}}reportError(i){throw dx(i)}_flushAnimations(i,e){let n=new Da,o=[],r=new Map,s=[],a=new Map,l=new Map,c=new Map,d=new Set;this.disabledNodes.forEach(P=>{d.add(P);let O=this.driver.query(P,zx,!0);for(let V=0;V<O.length;V++)d.add(O[V])});let p=this.bodyNode,h=Array.from(this.statesByElement.keys()),m=G0(h,this.collectedEnterElements),S=new Map,y=0;m.forEach((P,O)=>{let V=X0+y++;S.set(O,V),P.forEach(H=>an(H,V))});let w=[],x=new Set,N=new Set;for(let P=0;P<this.collectedLeaveElements.length;P++){let O=this.collectedLeaveElements[P],V=O[yn];V&&V.setForRemoval&&(w.push(O),x.add(O),V.hasAnimation?this.driver.query(O,Ux,!0).forEach(H=>x.add(H)):N.add(O))}let k=new Map,C=G0(h,Array.from(x));C.forEach((P,O)=>{let V=hu+y++;k.set(O,V),P.forEach(H=>an(H,V))}),i.push(()=>{m.forEach((P,O)=>{let V=S.get(O);P.forEach(H=>Ps(H,V))}),C.forEach((P,O)=>{let V=k.get(O);P.forEach(H=>Ps(H,V))}),w.forEach(P=>{this.processLeaveNode(P)})});let Q=[],$=[];for(let P=this._namespaceList.length-1;P>=0;P--)this._namespaceList[P].drainQueuedTransitions(e).forEach(V=>{let H=V.player,K=V.element;if(Q.push(H),this.collectedEnterElements.length){let Be=K[yn];if(Be&&Be.setForMove){if(Be.previousTriggersValues&&Be.previousTriggersValues.has(V.triggerName)){let Pt=Be.previousTriggersValues.get(V.triggerName),Bt=this.statesByElement.get(V.element);if(Bt&&Bt.has(V.triggerName)){let qt=Bt.get(V.triggerName);qt.value=Pt,Bt.set(V.triggerName,qt)}}H.destroy();return}}let ce=!p||!this.driver.containsElement(p,K),oe=k.get(K),Re=S.get(K),he=this._buildInstruction(V,n,Re,oe,ce);if(he.errors&&he.errors.length){$.push(he);return}if(ce){H.onStart(()=>Ar(K,he.fromStyles)),H.onDestroy(()=>Jn(K,he.toStyles)),o.push(H);return}if(V.isFallbackTransition){H.onStart(()=>Ar(K,he.fromStyles)),H.onDestroy(()=>Jn(K,he.toStyles)),o.push(H);return}let lt=[];he.timelines.forEach(Be=>{Be.stretchStartingKeyframe=!0,this.disabledNodes.has(Be.element)||lt.push(Be)}),he.timelines=lt,n.append(K,he.timelines);let kt={instruction:he,player:H,element:K};s.push(kt),he.queriedElements.forEach(Be=>Wi(a,Be,[]).push(H)),he.preStyleProps.forEach((Be,Pt)=>{if(Be.size){let Bt=l.get(Pt);Bt||l.set(Pt,Bt=new Set),Be.forEach((qt,Li)=>Bt.add(Li))}}),he.postStyleProps.forEach((Be,Pt)=>{let Bt=c.get(Pt);Bt||c.set(Pt,Bt=new Set),Be.forEach((qt,Li)=>Bt.add(Li))})});if($.length){let P=[];$.forEach(O=>{P.push(px(O.triggerName,O.errors))}),Q.forEach(O=>O.destroy()),this.reportError(P)}let ie=new Map,re=new Map;s.forEach(P=>{let O=P.element;n.has(O)&&(re.set(O,O),this._beforeAnimationBuild(P.player.namespaceId,P.instruction,ie))}),o.forEach(P=>{let O=P.element;this._getPreviousPlayers(O,!1,P.namespaceId,P.triggerName,null).forEach(H=>{Wi(ie,O,[]).push(H),H.destroy()})});let we=w.filter(P=>$0(P,l,c)),ge=new Map;z0(ge,this.driver,N,c,Un).forEach(P=>{$0(P,l,c)&&we.push(P)});let _e=new Map;m.forEach((P,O)=>{z0(_e,this.driver,new Set(P),l,mc)}),we.forEach(P=>{let O=ge.get(P),V=_e.get(P);ge.set(P,new Map([...O?.entries()??[],...V?.entries()??[]]))});let pe=[],U=[],W={};s.forEach(P=>{let{element:O,player:V,instruction:H}=P;if(n.has(O)){if(d.has(O)){V.onDestroy(()=>Jn(O,H.toStyles)),V.disabled=!0,V.overrideTotalTime(H.totalTime),o.push(V);return}let K=W;if(re.size>1){let oe=O,Re=[];for(;oe=oe.parentNode;){let he=re.get(oe);if(he){K=he;break}Re.push(oe)}Re.forEach(he=>re.set(he,K))}let ce=this._buildAnimation(V.namespaceId,H,ie,r,_e,ge);if(V.setRealPlayer(ce),K===W)pe.push(V);else{let oe=this.playersByElement.get(K);oe&&oe.length&&(V.parentPlayer=Jo(oe)),o.push(V)}}else Ar(O,H.fromStyles),V.onDestroy(()=>Jn(O,H.toStyles)),U.push(V),d.has(O)&&o.push(V)}),U.forEach(P=>{let O=r.get(P.element);if(O&&O.length){let V=Jo(O);P.setRealPlayer(V)}}),o.forEach(P=>{P.parentPlayer?P.syncPlayerEvents(P.parentPlayer):P.destroy()});for(let P=0;P<w.length;P++){let O=w[P],V=O[yn];if(Ps(O,hu),V&&V.hasAnimation)continue;let H=[];if(a.size){let ce=a.get(O);ce&&ce.length&&H.push(...ce);let oe=this.driver.query(O,uu,!0);for(let Re=0;Re<oe.length;Re++){let he=a.get(oe[Re]);he&&he.length&&H.push(...he)}}let K=H.filter(ce=>!ce.destroyed);K.length?Zx(this,O,K):this.processLeaveNode(O)}return w.length=0,pe.forEach(P=>{this.players.push(P),P.onDone(()=>{P.destroy();let O=this.players.indexOf(P);this.players.splice(O,1)}),P.play()}),pe}afterFlush(i){this._flushFns.push(i)}afterFlushAnimationsDone(i){this._whenQuietFns.push(i)}_getPreviousPlayers(i,e,n,o,r){let s=[];if(e){let a=this.playersByQueriedElement.get(i);a&&(s=a)}else{let a=this.playersByElement.get(i);if(a){let l=!r||r==Oa;a.forEach(c=>{c.queued||!l&&c.triggerName!=o||s.push(c)})}}return(n||o)&&(s=s.filter(a=>!(n&&n!=a.namespaceId||o&&o!=a.triggerName))),s}_beforeAnimationBuild(i,e,n){let o=e.triggerName,r=e.element,s=e.isRemovalTransition?void 0:i,a=e.isRemovalTransition?void 0:o;for(let l of e.timelines){let c=l.element,d=c!==r,p=Wi(n,c,[]);this._getPreviousPlayers(c,d,s,a,e.toState).forEach(m=>{let S=m.getRealPlayer();S.beforeDestroy&&S.beforeDestroy(),m.destroy(),p.push(m)})}Ar(r,e.fromStyles)}_buildAnimation(i,e,n,o,r,s){let a=e.triggerName,l=e.element,c=[],d=new Set,p=new Set,h=e.timelines.map(S=>{let y=S.element;d.add(y);let w=y[yn];if(w&&w.removedBeforeQueried)return new ps(S.duration,S.delay);let x=y!==l,N=Jx((n.get(y)||Wx).map(ie=>ie.getRealPlayer())).filter(ie=>{let re=ie;return re.element?re.element===y:!1}),k=r.get(y),C=s.get(y),Q=U0(this._normalizer,S.keyframes,k,C),$=this._buildPlayer(S,Q,N);if(S.subTimeline&&o&&p.add(y),x){let ie=new Ra(i,a,y);ie.setRealPlayer($),c.push(ie)}return $});c.forEach(S=>{Wi(this.playersByQueriedElement,S.element,[]).push(S),S.onDone(()=>Yx(this.playersByQueriedElement,S.element,S))}),d.forEach(S=>an(S,N0));let m=Jo(h);return m.onDestroy(()=>{d.forEach(S=>Ps(S,N0)),Jn(l,e.toStyles)}),p.forEach(S=>{Wi(o,S,[]).push(m)}),m}_buildPlayer(i,e,n){return e.length>0?this.driver.animate(i.element,e,i.duration,i.delay,i.easing,n):new ps(i.duration,i.delay)}},Ra=class{constructor(i,e,n){this.namespaceId=i,this.triggerName=e,this.element=n,this._player=new ps,this._containsRealPlayer=!1,this._queuedCallbacks=new Map,this.destroyed=!1,this.parentPlayer=null,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(i){this._containsRealPlayer||(this._player=i,this._queuedCallbacks.forEach((e,n)=>{e.forEach(o=>Ou(i,n,void 0,o))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(i.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(i){this.totalTime=i}syncPlayerEvents(i){let e=this._player;e.triggerCallback&&i.onStart(()=>e.triggerCallback("start")),i.onDone(()=>this.finish()),i.onDestroy(()=>this.destroy())}_queueEvent(i,e){Wi(this._queuedCallbacks,i,[]).push(e)}onDone(i){this.queued&&this._queueEvent("done",i),this._player.onDone(i)}onStart(i){this.queued&&this._queueEvent("start",i),this._player.onStart(i)}onDestroy(i){this.queued&&this._queueEvent("destroy",i),this._player.onDestroy(i)}init(){this._player.init()}hasStarted(){return this.queued?!1:this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(i){this.queued||this._player.setPosition(i)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(i){let e=this._player;e.triggerCallback&&e.triggerCallback(i)}};function Yx(t,i,e){let n=t.get(i);if(n){if(n.length){let o=n.indexOf(e);n.splice(o,1)}n.length==0&&t.delete(i)}return n}function Xx(t){return t??null}function Xc(t){return t&&t.nodeType===1}function Kx(t){return t=="start"||t=="done"}function q0(t,i){let e=t.style.display;return t.style.display=i??"none",e}function z0(t,i,e,n,o){let r=[];e.forEach(l=>r.push(q0(l)));let s=[];n.forEach((l,c)=>{let d=new Map;l.forEach(p=>{let h=i.computeStyle(c,p,o);d.set(p,h),(!h||h.length==0)&&(c[yn]=Qx,s.push(c))}),t.set(c,d)});let a=0;return e.forEach(l=>q0(l,r[a++])),s}function G0(t,i){let e=new Map;if(t.forEach(a=>e.set(a,[])),i.length==0)return e;let n=1,o=new Set(i),r=new Map;function s(a){if(!a)return n;let l=r.get(a);if(l)return l;let c=a.parentNode;return e.has(c)?l=c:o.has(c)?l=n:l=s(c),r.set(a,l),l}return i.forEach(a=>{let l=s(a);l!==n&&e.get(l).push(a)}),e}function an(t,i){t.classList?.add(i)}function Ps(t,i){t.classList?.remove(i)}function Zx(t,i,e){Jo(e).onDone(()=>t.processLeaveNode(i))}function Jx(t){let i=[];return nb(t,i),i}function nb(t,i){for(let e=0;e<t.length;e++){let n=t[e];n instanceof Eh?nb(n.players,i):i.push(n)}}function eP(t,i){let e=Object.keys(t),n=Object.keys(i);if(e.length!=n.length)return!1;for(let o=0;o<e.length;o++){let r=e[o];if(!i.hasOwnProperty(r)||t[r]!==i[r])return!1}return!0}function $0(t,i,e){let n=e.get(t);if(!n)return!1;let o=i.get(t);return o?n.forEach(r=>o.add(r)):i.set(t,n),e.delete(t),!0}var Os=class{constructor(i,e,n){this._driver=e,this._normalizer=n,this._triggerCache={},this.onRemovalComplete=(o,r)=>{},this._transitionEngine=new Tu(i.body,e,n),this._timelineEngine=new Su(i.body,e,n),this._transitionEngine.onRemovalComplete=(o,r)=>this.onRemovalComplete(o,r)}registerTrigger(i,e,n,o,r){let s=i+"-"+o,a=this._triggerCache[s];if(!a){let l=[],c=[],d=J0(this._driver,r,l,c);if(l.length)throw ex(o,l);c.length&&void 0,a=Hx(o,d,this._normalizer),this._triggerCache[s]=a}this._transitionEngine.registerTrigger(e,o,a)}register(i,e){this._transitionEngine.register(i,e)}destroy(i,e){this._transitionEngine.destroy(i,e)}onInsert(i,e,n,o){this._transitionEngine.insertNode(i,e,n,o)}onRemove(i,e,n){this._transitionEngine.removeNode(i,e,n)}disableAnimations(i,e){this._transitionEngine.markElementAsDisabled(i,e)}process(i,e,n,o){if(n.charAt(0)=="@"){let[r,s]=A0(n),a=o;this._timelineEngine.command(r,e,s,a)}else this._transitionEngine.trigger(i,e,n,o)}listen(i,e,n,o,r){if(n.charAt(0)=="@"){let[s,a]=A0(n);return this._timelineEngine.listen(s,e,a,r)}return this._transitionEngine.listen(i,e,n,o,r)}flush(i=-1){this._transitionEngine.flush(i)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(i){this._transitionEngine.afterFlushAnimationsDone(i)}};function tP(t,i){let e=null,n=null;return Array.isArray(i)&&i.length?(e=pu(i[0]),i.length>1&&(n=pu(i[i.length-1]))):i instanceof Map&&(e=pu(i)),e||n?new xu(t,e,n):null}var xu=class t{static{this.initialStylesByElement=new WeakMap}constructor(i,e,n){this._element=i,this._startStyles=e,this._endStyles=n,this._state=0;let o=t.initialStylesByElement.get(i);o||t.initialStylesByElement.set(i,o=new Map),this._initialStyles=o}start(){this._state<1&&(this._startStyles&&Jn(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(Jn(this._element,this._initialStyles),this._endStyles&&(Jn(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(t.initialStylesByElement.delete(this._element),this._startStyles&&(Ar(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(Ar(this._element,this._endStyles),this._endStyles=null),Jn(this._element,this._initialStyles),this._state=3)}};function pu(t){let i=null;return t.forEach((e,n)=>{iP(n)&&(i=i||new Map,i.set(n,e))}),i}function iP(t){return t==="display"||t==="position"}var rd=class{constructor(i,e,n,o){this.element=i,this.keyframes=e,this.options=n,this._specialStyles=o,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this._originalOnDoneFns=[],this._originalOnStartFns=[],this.time=0,this.parentPlayer=null,this.currentSnapshot=new Map,this._duration=n.duration,this._delay=n.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(i=>i()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;let i=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,i,this.options),this._finalKeyframe=i.length?i[i.length-1]:new Map;let e=()=>this._onFinish();this.domPlayer.addEventListener("finish",e),this.onDestroy(()=>{this.domPlayer.removeEventListener("finish",e)})}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(i){let e=[];return i.forEach(n=>{e.push(Object.fromEntries(n))}),e}_triggerWebAnimation(i,e,n){return i.animate(this._convertKeyframesToObject(e),n)}onStart(i){this._originalOnStartFns.push(i),this._onStartFns.push(i)}onDone(i){this._originalOnDoneFns.push(i),this._onDoneFns.push(i)}onDestroy(i){this._onDestroyFns.push(i)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(i=>i()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(i=>i()),this._onDestroyFns=[])}setPosition(i){this.domPlayer===void 0&&this.init(),this.domPlayer.currentTime=i*this.time}getPosition(){return+(this.domPlayer.currentTime??0)/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){let i=new Map;this.hasStarted()&&this._finalKeyframe.forEach((n,o)=>{o!=="offset"&&i.set(o,this._finished?n:Au(this.element,o))}),this.currentSnapshot=i}triggerCallback(i){let e=i==="start"?this._onStartFns:this._onDoneFns;e.forEach(n=>n()),e.length=0}},sd=class{validateStyleProperty(i){return!0}validateAnimatableStyleProperty(i){return!0}containsElement(i,e){return W0(i,e)}getParentElement(i){return Du(i)}query(i,e,n){return Q0(i,e,n)}computeStyle(i,e,n){return Au(i,e)}animate(i,e,n,o,r,s=[]){let a=o==0?"both":"forwards",l={duration:n,delay:o,fill:a};r&&(l.easing=r);let c=new Map,d=s.filter(m=>m instanceof rd);wx(n,o)&&d.forEach(m=>{m.currentSnapshot.forEach((S,y)=>c.set(y,S))});let p=bx(e).map(m=>new Map(m));p=Sx(i,p,c);let h=tP(i,p);return new rd(i,p,l,h)}};var Kc="@",ob="@.disabled",ad=class{constructor(i,e,n,o){this.namespaceId=i,this.delegate=e,this.engine=n,this._onDestroy=o,this.\u0275type=0}get data(){return this.delegate.data}destroyNode(i){this.delegate.destroyNode?.(i)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),this._onDestroy?.()}createElement(i,e){return this.delegate.createElement(i,e)}createComment(i){return this.delegate.createComment(i)}createText(i){return this.delegate.createText(i)}appendChild(i,e){this.delegate.appendChild(i,e),this.engine.onInsert(this.namespaceId,e,i,!1)}insertBefore(i,e,n,o=!0){this.delegate.insertBefore(i,e,n),this.engine.onInsert(this.namespaceId,e,i,o)}removeChild(i,e,n){this.parentNode(e)&&this.engine.onRemove(this.namespaceId,e,this.delegate)}selectRootElement(i,e){return this.delegate.selectRootElement(i,e)}parentNode(i){return this.delegate.parentNode(i)}nextSibling(i){return this.delegate.nextSibling(i)}setAttribute(i,e,n,o){this.delegate.setAttribute(i,e,n,o)}removeAttribute(i,e,n){this.delegate.removeAttribute(i,e,n)}addClass(i,e){this.delegate.addClass(i,e)}removeClass(i,e){this.delegate.removeClass(i,e)}setStyle(i,e,n,o){this.delegate.setStyle(i,e,n,o)}removeStyle(i,e,n){this.delegate.removeStyle(i,e,n)}setProperty(i,e,n){e.charAt(0)==Kc&&e==ob?this.disableAnimations(i,!!n):this.delegate.setProperty(i,e,n)}setValue(i,e){this.delegate.setValue(i,e)}listen(i,e,n){return this.delegate.listen(i,e,n)}disableAnimations(i,e){this.engine.disableAnimations(i,e)}},Pu=class extends ad{constructor(i,e,n,o,r){super(e,n,o,r),this.factory=i,this.namespaceId=e}setProperty(i,e,n){e.charAt(0)==Kc?e.charAt(1)=="."&&e==ob?(n=n===void 0?!0:!!n,this.disableAnimations(i,n)):this.engine.process(this.namespaceId,i,e.slice(1),n):this.delegate.setProperty(i,e,n)}listen(i,e,n){if(e.charAt(0)==Kc){let o=nP(i),r=e.slice(1),s="";return r.charAt(0)!=Kc&&([r,s]=oP(r)),this.engine.listen(this.namespaceId,o,r,s,a=>{let l=a._data||-1;this.factory.scheduleListenerCallback(l,n,a)})}return this.delegate.listen(i,e,n)}};function nP(t){switch(t){case"body":return document.body;case"document":return document;case"window":return window;default:return t}}function oP(t){let i=t.indexOf("."),e=t.substring(0,i),n=t.slice(i+1);return[e,n]}var ld=class{constructor(i,e,n){this.delegate=i,this.engine=e,this._zone=n,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,e.onRemovalComplete=(o,r)=>{r?.removeChild(null,o)}}createRenderer(i,e){let n="",o=this.delegate.createRenderer(i,e);if(!i||!e?.data?.animation){let c=this._rendererCache,d=c.get(o);if(!d){let p=()=>c.delete(o);d=new ad(n,o,this.engine,p),c.set(o,d)}return d}let r=e.id,s=e.id+"-"+this._currentId;this._currentId++,this.engine.register(s,i);let a=c=>{Array.isArray(c)?c.forEach(a):this.engine.registerTrigger(r,s,i,c.name,c)};return e.data.animation.forEach(a),new Pu(this,s,o,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(i,e,n){if(i>=0&&i<this._microtaskId){this._zone.run(()=>e(n));return}let o=this._animationCallbacksBuffer;o.length==0&&queueMicrotask(()=>{this._zone.run(()=>{o.forEach(r=>{let[s,a]=r;s(a)}),this._animationCallbacksBuffer=[]})}),o.push([e,n])}end(){this._cdRecurDepth--,this._cdRecurDepth==0&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}};var sP=(()=>{class t extends Os{constructor(e,n,o){super(e,n,o)}ngOnDestroy(){this.flush()}static{this.\u0275fac=function(n){return new(n||t)(D(wt),D(kr),D(Nr))}}static{this.\u0275prov=ne({token:t,factory:t.\u0275fac})}}return t})();function aP(){return new ed}function lP(t,i,e){return new ld(t,i,e)}var rb=[{provide:Nr,useFactory:aP},{provide:Os,useClass:sP},{provide:Ag,useFactory:lP,deps:[n_,Os,Je]}],cP=[{provide:kr,useFactory:()=>new sd},{provide:en,useValue:"BrowserAnimations"},...rb],E5=[{provide:kr,useClass:Mu},{provide:en,useValue:"NoopAnimations"},...rb];function sb(){return kg("NgEagerAnimations"),[...cP]}function ab(t){let i=!1;return()=>{if(i)throw new Error("Unable to override warnings twice. Consolidate the warnings in a single call");i=!0;let e=console.warn;console.warn=function(...n){let o=n[0];typeof o=="string"&&t.some(r=>o.includes(r))||e.apply(console,n)}}}var Nu=(()=>{class t{constructor(e){this.router=e,this.firstNavigation=new it(!0)}initialize(){this.router.events.pipe(vi(e=>e instanceof us),xi(void 0),Pg()).subscribe(([e,n])=>{e===void 0&&this.firstNavigation.next(!1)})}get isFirstNavigation(){return this.firstNavigation.value}goHome(){return Y(this,null,function*(){yield this.router.navigate([""])})}static{this.\u0275fac=function(n){return new(n||t)(D(Go))}}static{this.\u0275prov=ne({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var lb={ui:{showHome:!0,showCloseOnlyInMenuBar:!1,showClosePanel:!0,showWorkspaces:!0,showSubtabs:!1,showAddFiles:!0,workspaces:{showAddEmptyWorkspace:!0},showEmptyWorkspaceFileDropper:!0},featureFlags:{useTemporaryWorkspaces:!1,storeWorkspaceTabs:!0,workspaces:{allowDragAndDropOntoExistingWindows:!1},enableOpTensorMappings:!1},environment:{platform:"web"}},St=new pt("APP_CONFIG");var cb={File:B_,Home:z_,Minus:K_,Square:sv,X:ms,Check:E_,Download:R_,Trash:lv,HelpCircle:I_,Copy:M_,Server:ov,ServerOff:nv,Edit2:Pc,Box:w_,ChevronRight:Ec,Plus:tv,ArrowRight:b_,Layers:$_,FilePlus2:V_,MoreVertical:A_,CheckCircle2:O_,Files:H_,AlertTriangle:cv,UploadCloud:D_,Folder:j_,Import:G_,ZoomIn:dv,ZoomOut:pv,Scaling:iv,SidebarOpen:ev,SidebarClose:J_,Settings2:rv,GitFork:q_,BarChart:C_,LocateFixed:W_,LucideGauge:Tc,Minimize2:X_,Maximize2:Y_,ArrowDown:v_,ArrowUp:Sc,Search:va,FileCheckIcon:L_,Info:xc,List:U_,Pen:Pc};var ae=function(t){return t.ACCURACY_SUMMARY="accuracy_summary",t.GRAPH="graph",t.OPTRACE_SUMMARY="optrace_summary",t.OP_TENSOR_MAPPINGS="op_tensor_mappings",t.PERF_SUMMARY="perf_summary",t.QHAS_REPORT="qhas",t}(ae||{});var Qi={GRAPH_ACTION:"panels.graph.actions",GRAPH_INFO:"panels.graph.info",GRAPH_LABEL:"panels.graph.label",OPTRACE_INFO:"panels.optrace.info",OPTRACE_LABEL:"panels.optrace.label",PERFORMANCE_INFO:"panels.performance.info",PERFORMANCE_LABEL:"panels.performance.label",QHAS_INFO:"panels.qhas.info",QHAS_LABEL:"panels.qhas.label",OP_TENSOR_MAPPINGS_INFO:"panels.opTensorMappings.info",OP_TENSOR_MAPPINGS_LABEL:"panels.opTensorMappings.label"};var Mt=(()=>{class t{setItem(e,n,o=console.error){try{if(e==null)throw new Error("'undefined' is not a valid key");localStorage.setItem(e,n)}catch(r){o(r)}}getItem(e,n=console.error){try{return JSON.parse(localStorage.getItem(e))}catch(o){n(o)}}getItemsByPrefix(e,n=console.error){let o=[];try{for(let r=0;r<localStorage.length;r++){let s=localStorage.key(r);if(s.startsWith(e)){let a=JSON.parse(localStorage.getItem(s)||"[]");o.push(...a)}}return o}catch(r){n(r)}}getKeysByPrefix(e,n=console.error){let o=[];try{for(let r=0;r<localStorage.length;r++){let s=localStorage.key(r);s.startsWith(e)&&o.push(s)}return o}catch(r){n(r)}}removeItem(e,n=console.error){try{localStorage.removeItem(e)}catch(o){n(o)}}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=ne({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var dP={version:"Version",clientCommit:"Client Commit",agentCommit:"Agent Commit",date:"Date",electron:"Electron",chromium:"Chromium",node:"Node.js",v8:"V8",os:"OS"},db="displayedPanels",Ht=(()=>{class t{constructor(e,n){this.electronService=e,this.localStorageService=n,this.systemData$=new X,this.displayedPanels=new Set(Object.values(ae)),this.displayedPanels$=new X,this.systemDataHandler=r=>{let s=Object.entries(r).map(([a,l])=>({label:dP[a],value:l}));this.systemData$.next(s)},this.displayedPanels$.subscribe(r=>{this.displayedPanels=r,this.localStorageService.setItem(db,JSON.stringify([...r]))});let o=this.localStorageService.getItem(db);o&&this.displayedPanels$.next(new Set(o))}registerMenuHandlers(){this.electronService.isRunningElectron()&&(this.registerElectronMenuHandlers(),this.registerElectronWindowControlHandlers())}registerElectronMenuHandlers(){this.electronService.registerEventHandler("onShortcuts",()=>console.log("Shortcut Menu Activated!")),this.electronService.registerEventHandler("onFetchSystemData",this.systemDataHandler),this.electronService.registerEventHandler("onQairtVizInfo",this.systemDataHandler)}registerElectronWindowControlHandlers(){this.electronService.registerEventHandler("onResize",()=>this.isMaximized=!1),this.electronService.registerEventHandler("onMaximize",()=>this.isMaximized=!0),this.electronService.registerEventHandler("onUnmaximize",()=>this.isMaximized=!1)}static{this.\u0275fac=function(n){return new(n||t)(D(Xe),D(Mt))}}static{this.\u0275prov=ne({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var pb=[{panelType:ae.GRAPH,icon:Z_,dismissable:!1,translationKey:Qi.GRAPH_LABEL,infoTranslationKey:Qi.GRAPH_INFO},{panelType:ae.OPTRACE_SUMMARY,icon:Tc,dismissable:!1,translationKey:Qi.OPTRACE_LABEL,infoTranslationKey:Qi.OPTRACE_INFO},{panelType:ae.PERF_SUMMARY,icon:y_,dismissable:!1,translationKey:Qi.PERFORMANCE_LABEL,infoTranslationKey:Qi.PERFORMANCE_INFO},{panelType:ae.QHAS_REPORT,icon:F_,dismissable:!1,translationKey:Qi.QHAS_LABEL,infoTranslationKey:Qi.QHAS_INFO},{panelType:ae.OP_TENSOR_MAPPINGS,icon:S_,dismissable:!1,translationKey:Qi.OP_TENSOR_MAPPINGS_LABEL,infoTranslationKey:Qi.OP_TENSOR_MAPPINGS_INFO}],li=(()=>{class t{constructor(e,n){this.localStorageService=e,this.menuService=n,this.subtabs=[],this._activeSubtabIndex=0}setWorkspace(e,n){this.workspaceId=e;let r=this.localStorageService.getItem(e)?.[n];r?(this.subtabs=r.subtabs,this._activeSubtabIndex=r.activeSubtabIndex):this.setDefaultPanelState()}setDefaultPanelState(){this.subtabs=[],this.setActiveSubtabIndex(0)}get activeSubtabIndex(){return this._activeSubtabIndex}setActiveSubtabIndex(e){this._activeSubtabIndex=e}get activeSubtab(){return this.subtabs[this.activeSubtabIndex]}createSubtab(e,n,o,r){let s={panelType:e,label:n,id:o.id,resource:o,data:r};return this.subtabs.push(s),this.setActiveSubtabIndex(this.subtabs.length-1),this.openPanel(e),s}togglePanel(e){let n=new Set(this.menuService.displayedPanels);n.has(e)?n.delete(e):n.add(e),this.menuService.displayedPanels$.next(n)}openPanel(e){if(!this.menuService.displayedPanels.has(e)){let n=new Set(this.menuService.displayedPanels);n.add(e),this.menuService.displayedPanels$.next(n)}}removeSubtab(e){return this.subtabs.splice(e,1)[0]}updateLocalStorage(e){let n=this.localStorageService.getItem(this.workspaceId);if(!n)return;let o=JSON.parse(JSON.stringify(this.subtabs));this.subtabs.forEach((s,a)=>{o[a].resource.fileData=this.getSerializableFileResource(s.resource.fileData)});let r=ee(E({},n),{[e]:{subtabs:o,activeSubtabIndex:this.activeSubtabIndex}});this.localStorageService.setItem(this.workspaceId,JSON.stringify(r))}getSerializableFileResource(e){return{lastModified:e.lastModified,name:e.name,path:e.path,size:e.size}}static{this.\u0275fac=function(n){return new(n||t)(D(Mt),D(Ht))}}static{this.\u0275prov=ne({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Vt={ACCURACY_SUMMARY:"accuracy_summary",MODEL:"model",OPTRACE_SUMMARY:"OP_TRACE",PERF_SUMMARY:"QNN_PROFILE",QHAS:"QHAS"};var vt={FILE_NOT_FOUND:"file_not_found",MODEL_PLOTTED:"model_plotted",MODEL:"model",NODE:"node",SHOW_LOADER:"show_loader",SOURCE_LOADED:"source_loaded",INVALID:"Invalid"},ka={nodeProperties:[],modelProperties:[],searchResults:[],performanceMetrics:void 0,accuracyMetrics:void 0,isSidePanelOpen:!0,isModelPropertiesRequested:!1,isNodePropertiesRequested:!1,isModelPlotted:!1,isFileNotFound:!1,propertyToShow:Vt.MODEL,activeSidePanelTab:0},Na={NODE_NAME:"node-name-",NODE_ID:"node-id-"};var at={INFO_CONTROL:"info_control",PROPERTY_REQUEST:"property_request",EVENT_CONTROL:"event_control",SEARCH:"search",HIGHLIGHT:"highlight_search",ZOOM:"zoom_controls",THEME_CONTROL:"theme_control",LOAD_GRAPH:"load_graph",SUBGRAPH_DIALOG:{SHOW:"subgraph_dialog_show",SUBMIT:"subgraph_dialog_submit"},UPDATE_PANEL_STATES:"update_context_menu",OUTPUT_TO_NODE_MAP:"output_to_node_map",MODEL_GENERATED:"model_generated"},Lr={SOURCE_LOADED:"source_loaded",MODEL_GENERATED:"model_generated",MODEL_ERROR:"model_error",THEME_CONTROL:"theme_control"};var cd=class{constructor(i){this.cache=new Map,this.capacity=i}get(i){if(this.cache.has(i)){let e=this.cache.get(i);return this.cache.delete(i),this.cache.set(i,e),e}}getByPredicate(i){let e=[];return this.cache.forEach(n=>{i(n)&&e.push(n)}),e}put(i,e){let n;if(this.cache.has(i))this.cache.delete(i);else if(this.cache.size>=this.capacity){let o=this.cache.keys().next().value;n=this.cache.get(o),this.cache.delete(o)}return this.cache.set(i,e),n}delete(i){this.cache.delete(i)}clear(){this.cache.clear()}};var hb="graphPanelState",bt=(()=>{class t extends li{constructor(e,n,o,r,s){super(s,r),this.dataHandlerService=e,this.http=n,this.electronService=o,this.CAPACITY=10,this.workspaceToGraphState={},this.cachedIframes=new cd(this.CAPACITY),this.workspaceToModelMap=new Map,this.modelFetched$=new Ln(1),this.isNetronModuleFound=!0}removeGraphState(e){delete this.workspaceToGraphState[e]}setGraphState(e,n){this.workspaceToGraphState[e]=n}getGraphState(e){return this.workspaceToGraphState[e]}setWorkspace(e){return Y(this,null,function*(){if(Nn(t.prototype,this,"setWorkspace").call(this,e,hb),this.activeSubtab){let n=this.activeSubtab.id,o=this.activeSubtab.resource.fileData.path,r=this.workspaceToModelMap.get(e)?.[0].file??(yield this.electronService.createStreamingFileFromPath(o));this.updateFileMap([{file:r,id:n,name:r.name}])}})}updateFileMap(e){this.workspaceToModelMap.set(this.workspaceId,e),e[0]&&this.modelFetched$.next(this.workspaceId)}get activeIframe(){let e=this.subtabs[this.activeSubtabIndex];if(e)return this.getCachedIframe(e.id)?.iframe}addSubtab(e,n,o){let r=super.createSubtab(ae.GRAPH,e,n,{optraceId:o});return this.updateLocalStorage(),r}removeSubtab(e){this.workspaceToModelMap.delete(this.subtabs[e].id);let n=super.removeSubtab(e);return this.removeCachedIframe(n.id),this.updateLocalStorage(),n}updateLocalStorage(){super.updateLocalStorage(hb)}checkIfModuleExists(e){return Y(this,null,function*(){try{yield Sg(this.http.get(e,{responseType:"text"})),this.isNetronModuleFound=!0}catch{this.isNetronModuleFound=!1}})}triggerModelLoadInNetron(e){this.dataHandlerService.triggerEvent(at.LOAD_GRAPH,this.workspaceToModelMap.get(this.workspaceId),e)}createIframe(e){let n=document.createElement("iframe");return n.style.position="fixed",n.style.zIndex="10",n.style.visibility="hidden",n.id=`iframe-${e}`,n}cacheGraph(e,n){let o=this.cachedIframes.put(e,{iframe:n,graphState:ka,fileId:e});o&&this.iframeContainer.removeChild(o.iframe)}updateCachedGraphs(e,n){let o=this.cachedIframes.get(e);o&&this.cachedIframes.put(e,E(E({},o),n))}removeCachedIframe(e){let n=this.cachedIframes.get(e);n&&(this.removeIframe(n.iframe),this.cachedIframes.delete(e))}removeUnplottedIframe(e,n){this.getCachedIframe(n)||this.removeIframe(e)}removeIframe(e){try{this.iframeContainer.removeChild(e)}catch{}}getCachedIframe(e){return this.cachedIframes.get(e)}setSubtabData(e,n=this.activeSubtab){n.data=E(E({},n.data),e),this.updateLocalStorage()}handleModelFile(e,n){this.addSubtab(n.name,{id:e,name:n.name,fileData:n}),this.setSubtabData({report:{fileId:e,type:Vt.MODEL}}),this.updateFileMap([{id:e,name:n.name,file:n}])}static{this.\u0275fac=function(n){return new(n||t)(D(Kn),D(ds),D(Xe),D(Ht),D(Mt))}}static{this.\u0275prov=ne({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var hP="windowState",uP={[ae.GRAPH]:{targetPanelToSplit:ae.OPTRACE_SUMMARY,positionWithinSplit:"start",direction:"vertical"},[ae.OPTRACE_SUMMARY]:{targetPanelToSplit:ae.GRAPH,positionWithinSplit:"end",direction:"vertical"}},Si=(()=>{class t{constructor(e,n,o){this.translate=e,this.localStorageService=n,this.graphPanelService=o,this._workspaceId=se(void 0),this._rootPane=se(void 0),this._activeExpandedPanel=se(void 0),this._displayedPanels=se(new Set),this._collapsedPanels=se(new Set),this._expandedPanels=se(new Set),this.MIN_WIDTH=250,this.MIN_HEIGHT=200,this.panelTabs={},this.workspaceId=this._workspaceId.asReadonly(),this.rootPane=this._rootPane.asReadonly(),this.activeExpandedPanel=this._activeExpandedPanel.asReadonly(),this.displayedPanels=Ie(()=>Array.from(this._displayedPanels())),this.collapsedPanels=Ie(()=>Array.from(this._collapsedPanels())),this.expandedPanels=Ie(()=>Array.from(this._expandedPanels())),this.isEmptyWorkspace=Ie(()=>!this.displayedPanels().length&&!this.collapsedPanels().length)}translateTabs(){pb.forEach(e=>{this.panelTabs[e.panelType]=ee(E({},e),{label:this.translate.instant(e.translationKey),info:this.translate.instant(e.infoTranslationKey)})})}setWorkspace(e){e&&(this._workspaceId.set(e),this.setDisplayState(),this.updatePanelDisplay())}setDisplayState(){let e=this.localStorageService.getItem(this.workspaceId());this._rootPane.set(e?.windowState?.rootPane??this.createDefaultRootPane()),this._displayedPanels.set(new Set(e?.displayedPanels||[])),this._collapsedPanels.set(new Set(e?.collapsedPanels||[])),this._expandedPanels.set(new Set(e?.expandedPanels||[])),this._activeExpandedPanel.set(e?.activeExpandedPanel)}createDefaultRootPane(){return{width:100,height:100,isDisplayed:!0,panelTabs:[],split:{direction:"horizontal",panes:[]}}}updatePanelDisplay(){this.addMissingPanels(this._displayedPanels()),this.updatePaneVisibility(this.rootPane(),this._displayedPanels()),this.updateMinDimensions(this.rootPane()),this.updateLocalStorage()}addMissingPanels(e){e.forEach(n=>{this.isPanelOpen(n)||this.addPane(n,uP[n])})}updatePaneVisibility(e,n,o){if(e){if(e.split){for(let r of e.split.panes)this.updatePaneVisibility(r,n,e);this.updateNextDisplayedPanes(e.split.panes)}e.isDisplayed&&this.shouldHidePane(e,n)?(e.isDisplayed=!1,this.resizePanes(o?.split)):!e.isDisplayed&&!this.shouldHidePane(e,n)?(e.isDisplayed=!0,this.resizePanes(o?.split)):e.isDisplayed&&(e.panelTabs=e.panelTabs.filter(r=>n.has(r.panelType)))}}updateNextDisplayedPanes(e=[]){e.forEach((n,o)=>{n.isDisplayed&&(n.nextDisplayedPane=this.findNextDisplayedPane(e,o))})}findNextDisplayedPane(e,n){return e.slice(n+1).find(o=>o.isDisplayed)}shouldHidePane(e,n){return e.split?e.split.panes.every(o=>!o.isDisplayed):e.panelTabs.every(o=>!n.has(o.panelType))}resizePanes(e){if(!e)return;let n=e.panes.filter(o=>o.isDisplayed).length;for(let o of e.panes)o.isDisplayed&&(e.direction==="horizontal"?o.width=100/n:o.height=100/n)}isPanelOpen(e,n=this.rootPane()){if(!n)return!1;if(n.panelTabs.some(o=>o.panelType===e))return!0;if(n.split){for(let o of n.split.panes)if(this.isPanelOpen(e,o))return!0}return!1}setActiveTab(e,n){e&&(e.activeTabIndex=n,this.updateLocalStorage())}addTab(e,n){e.panelTabs.push(this.panelTabs[n]),this.updateLocalStorage()}addPane(e,n={direction:"horizontal"}){let o=this.findPane(n.targetPanelToSplit,this.rootPane());o||(o=this.rootPane(),n={direction:"horizontal"}),o.split?this.addPaneToSplitContainer(e,o):this.splitPane(e,o,n),this.updateLocalStorage()}findPane(e,n){if(e){if(n.panelTabs.some(o=>o.panelType===e))return n;if(n.split)for(let o of n.split.panes){let r=this.findPane(e,o);if(r)return r}}}addPaneToSplitContainer(e,n){n.split.panes.push({panelTabs:[this.panelTabs[e]],activeTabIndex:0,isDisplayed:!0}),this.resizePanes(n.split),this.updateMinDimensions(this.rootPane())}splitPane(e,n,o){let r={panelTabs:[...n.panelTabs],activeTabIndex:n.activeTabIndex,isDisplayed:n.isDisplayed},s={panelTabs:[this.panelTabs[e]],activeTabIndex:0,isDisplayed:!0};n.split={direction:o.direction,panes:this.getOrderedPanes(r,s,o)},n.panelTabs=[],this.resizePanes(n.split),this.updateMinDimensions(this.rootPane())}getOrderedPanes(e,n,o){return o.positionWithinSplit==="start"?[n,e]:[e,n]}updateMinDimensions(e){let n=0,o=0;if(e.split){for(let r of e.split.panes.filter(s=>s.isDisplayed))this.updateMinDimensions(r),e.split.direction==="horizontal"?(n+=r.minWidth,o=Math.max(r.minHeight,o)):(n=Math.max(r.minWidth,n),o+=r.minHeight);e.minWidth=n,e.minHeight=o}else e.minWidth=this.MIN_WIDTH,e.minHeight=this.MIN_HEIGHT}addToPanelSet(e,n){e.update(o=>{let r=new Set(o);return r.add(n),r})}removeFromPanelSet(e,n){e.update(o=>{let r=new Set(o);return r.delete(n),r})}updateIframeVisibility(e){let n=this.graphPanelService.activeIframe;n&&e!==ae.GRAPH&&(n.style.visibility=e===this.activeExpandedPanel()?"hidden":"visible")}collapsePanel({panelType:e}){this.removeFromPanelSet(this._displayedPanels,e),this.addToPanelSet(this._collapsedPanels,e),this.activeExpandedPanel()===e&&this._activeExpandedPanel.set(void 0),this.updateIframeVisibility(e),this.updatePanelDisplay()}restorePanel({panelType:e}){this.removeFromPanelSet(this._collapsedPanels,e),this.addToPanelSet(this._displayedPanels,e),this._expandedPanels().has(e)&&this._activeExpandedPanel.set(e),this.updateIframeVisibility(e),this.updatePanelDisplay()}closePanel({panelType:e}){this.removeFromPanelSet(this._collapsedPanels,e),this.removeFromPanelSet(this._displayedPanels,e),this.removeFromPanelSet(this._expandedPanels,e),this._activeExpandedPanel.set(void 0),this.updateIframeVisibility(e),this.updatePanelDisplay()}toggleExpand({panelType:e}){this._expandedPanels().has(e)?(this.removeFromPanelSet(this._expandedPanels,e),this._activeExpandedPanel.set(void 0)):(this.addToPanelSet(this._expandedPanels,e),this._activeExpandedPanel.set(e)),this.updateIframeVisibility(e),this.updateLocalStorage()}updateLocalStorage(){let e=this.localStorageService.getItem(this.workspaceId()),n=ee(E({},e),{displayedPanels:this.displayedPanels(),collapsedPanels:this.collapsedPanels(),expandedPanels:this.expandedPanels(),activeExpandedPanel:this.activeExpandedPanel(),[hP]:{rootPane:this.rootPane}});this.localStorageService.setItem(this.workspaceId(),JSON.stringify(n))}static{this.\u0275fac=function(n){return new(n||t)(D(Ge),D(Mt),D(bt))}}static{this.\u0275prov=ne({token:t,factory:t.\u0275fac})}}return t})();var er={defaultMerge:Symbol("deepmerge-ts: default merge"),skip:Symbol("deepmerge-ts: skip")},a$={defaultMerge:er.defaultMerge};function mP(t,i){return i}function ub(t){return typeof t!="object"||t===null?0:Array.isArray(t)?2:_P(t)?1:t instanceof Set?3:t instanceof Map?4:5}function fP(t){let i=new Set;for(let e of t)for(let n of[...Object.keys(e),...Object.getOwnPropertySymbols(e)])i.add(n);return i}function gP(t,i){return typeof t=="object"&&Object.prototype.propertyIsEnumerable.call(t,i)}function fb(t){return{*[Symbol.iterator](){for(let i of t)for(let e of i)yield e}}}var mb=new Set(["[object Object]","[object Module]"]);function _P(t){if(!mb.has(Object.prototype.toString.call(t)))return!1;let{constructor:i}=t;if(i===void 0)return!0;let e=i.prototype;return!(e===null||typeof e!="object"||!mb.has(Object.prototype.toString.call(e))||!e.hasOwnProperty("isPrototypeOf"))}function vP(t,i,e){let n={};for(let o of fP(t)){let r=[];for(let l of t)gP(l,o)&&r.push(l[o]);if(r.length===0)continue;let s=i.metaDataUpdater(e,{key:o,parents:t}),a=_b(r,i,s);a!==er.skip&&(o==="__proto__"?Object.defineProperty(n,o,{value:a,configurable:!0,enumerable:!0,writable:!0}):n[o]=a)}return n}function bP(t){return t.flat()}function yP(t){return new Set(fb(t))}function CP(t){return new Map(fb(t))}function gb(t){return t.at(-1)}var Vu=Object.freeze({__proto__:null,mergeArrays:bP,mergeMaps:CP,mergeOthers:gb,mergeRecords:vP,mergeSets:yP});function dd(...t){return wP({})(...t)}function wP(t,i){let e=SP(t,n);function n(...o){return _b(o,e,i)}return n}function SP(t,i){return{defaultMergeFunctions:Vu,mergeFunctions:E(E({},Vu),Object.fromEntries(Object.entries(t).filter(([e,n])=>Object.hasOwn(Vu,e)).map(([e,n])=>n===!1?[e,gb]:[e,n]))),metaDataUpdater:t.metaDataUpdater??mP,deepmerge:i,useImplicitDefaultMerging:t.enableImplicitDefaultMerging??!1,actions:er}}function _b(t,i,e){if(t.length===0)return;if(t.length===1)return Bu(t,i,e);let n=ub(t[0]);if(n!==0&&n!==5){for(let o=1;o<t.length;o++)if(ub(t[o])!==n)return Bu(t,i,e)}switch(n){case 1:return EP(t,i,e);case 2:return TP(t,i,e);case 3:return xP(t,i,e);case 4:return PP(t,i,e);default:return Bu(t,i,e)}}function EP(t,i,e){let n=i.mergeFunctions.mergeRecords(t,i,e);return n===er.defaultMerge||i.useImplicitDefaultMerging&&n===void 0&&i.mergeFunctions.mergeRecords!==i.defaultMergeFunctions.mergeRecords?i.defaultMergeFunctions.mergeRecords(t,i,e):n}function TP(t,i,e){let n=i.mergeFunctions.mergeArrays(t,i,e);return n===er.defaultMerge||i.useImplicitDefaultMerging&&n===void 0&&i.mergeFunctions.mergeArrays!==i.defaultMergeFunctions.mergeArrays?i.defaultMergeFunctions.mergeArrays(t):n}function xP(t,i,e){let n=i.mergeFunctions.mergeSets(t,i,e);return n===er.defaultMerge||i.useImplicitDefaultMerging&&n===void 0&&i.mergeFunctions.mergeSets!==i.defaultMergeFunctions.mergeSets?i.defaultMergeFunctions.mergeSets(t):n}function PP(t,i,e){let n=i.mergeFunctions.mergeMaps(t,i,e);return n===er.defaultMerge||i.useImplicitDefaultMerging&&n===void 0&&i.mergeFunctions.mergeMaps!==i.defaultMergeFunctions.mergeMaps?i.defaultMergeFunctions.mergeMaps(t):n}function Bu(t,i,e){let n=i.mergeFunctions.mergeOthers(t,i,e);return n===er.defaultMerge||i.useImplicitDefaultMerging&&n===void 0&&i.mergeFunctions.mergeOthers!==i.defaultMergeFunctions.mergeOthers?i.defaultMergeFunctions.mergeOthers(t):n}var pd=class{constructor(i,e){this._handler=i,this._resourcesPrefix=e}getTranslation(i){let e=this._resourcesPrefix.map(n=>{let o;return n.prefix?o=`${n.prefix}${i}${n.suffix||".json"}`:o=`${n}${i}.json`,new ds(this._handler).get(o).pipe(Xl(r=>(n.optional||(console.group(),console.error("Something went wrong for the following translation file:",o),console.error(r),console.groupEnd()),_i({}))))});return Ql(e).pipe(Kt(n=>dd(...n)))}};var ei=[];for(let t=0;t<256;++t)ei.push((t+256).toString(16).slice(1));function vb(t,i=0){return(ei[t[i+0]]+ei[t[i+1]]+ei[t[i+2]]+ei[t[i+3]]+"-"+ei[t[i+4]]+ei[t[i+5]]+"-"+ei[t[i+6]]+ei[t[i+7]]+"-"+ei[t[i+8]]+ei[t[i+9]]+"-"+ei[t[i+10]]+ei[t[i+11]]+ei[t[i+12]]+ei[t[i+13]]+ei[t[i+14]]+ei[t[i+15]]).toLowerCase()}var Hu,OP=new Uint8Array(16);function ju(){if(!Hu){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Hu=crypto.getRandomValues.bind(crypto)}return Hu(OP)}var IP=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),qu={randomUUID:IP};function DP(t,i,e){if(qu.randomUUID&&!i&&!t)return qu.randomUUID();t=t||{};let n=t.random??t.rng?.()??ju();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,i){if(e=e||0,e<0||e+16>i.length)throw new RangeError(`UUID byte range ${e}:${e+15} is out of buffer bounds`);for(let o=0;o<16;++o)i[e+o]=n[o];return i}return vb(n)}var Rt=DP;var hd=class{constructor(i){this.options=i,this.id=Rt()}};var bb=(()=>{class t{constructor(){this.subject$=new X}get alert$(){return this.subject$.asObservable()}notify(e){this.subject$.next(new hd(e))}clear(){this.subject$.next(void 0)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=ne({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var RP=(t,i,e,n)=>({id:t,label:i,subtleLabel:e,color:n,dismissable:!0});function AP(t,i){if(t&1){let e=Z();f(0,"q-notification-content",2),I("closeHandler",function(o){R(e);let r=v();return A(r.onClose(o))}),g()}if(t&2){let e=i.$implicit;b("notification",ec(1,RP,e.id,e.options.label,e.options.subtleLabel,e.options.color))}}var ud=(()=>{class t{constructor(e,n){this.router=e,this.alertService=n,this.id="default-alert",this.fade=!0,this.close=ms,this.alerts=[],this.destroy$=new X}ngOnInit(){this.alertService.alert$.pipe(ye(this.destroy$)).subscribe(e=>{if(!e){this.alerts=[];return}this.alerts.push(e)}),this.router.events.subscribe(e=>{e instanceof c_&&this.alertService.clear()})}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.unsubscribe()}onClose(e){this.alerts=this.alerts.filter(n=>n.id!==e.id)}static{this.\u0275fac=function(n){return new(n||t)(_(Go),_(bb))}}static{this.\u0275cmp=F({type:t,selectors:[["app-alert"]],inputs:{id:"id",fade:"fade"},standalone:!0,features:[B],decls:2,vars:1,consts:[[1,"d-flex","col-gap","justify-content-between","flex-column","w-100","align-items-flex-start"],["data-testid","q-notification-content","inline","",3,"notification","closeHandler",4,"ngFor","ngForOf"],["data-testid","q-notification-content","inline","",3,"closeHandler","notification"]],template:function(n,o){n&1&&(f(0,"div",0),T(1,AP,1,6,"q-notification-content",1),g()),n&2&&(u(),b("ngForOf",o.alerts))},dependencies:[rs,vv,_v],styles:[".col-gap[_ngcontent-%COMP%]{gap:1rem}q-notification-content[_ngcontent-%COMP%]{width:100%} .q-notification--root.q-placement-inline{max-width:none}"]})}}return t})();var yb=(()=>{class t{constructor(e){this.iconService=e}static{this.\u0275fac=function(n){return new(n||t)(_(Ce))}}static{this.\u0275cmp=F({type:t,selectors:[["app-tooltip-icon"]],inputs:{tooltipPosition:"tooltipPosition",tooltipClasses:"tooltipClasses",tooltipContent:"tooltipContent"},standalone:!0,features:[B],decls:1,vars:4,consts:[["size","s","qTooltipPosition","fixed",3,"icon","qTooltip","ngClass","qTooltipPlacement"]],template:function(n,o){n&1&&M(0,"q-icon",0),n&2&&b("icon",o.iconService.info)("qTooltip",o.tooltipContent)("ngClass",o.tooltipClasses)("qTooltipPlacement",o.tooltipPosition)},dependencies:[mt,vo,Dt,qi,Le,st],encapsulation:2})}}return t})();var ci=(()=>{class t{constructor(e){this.viewContainerRef=e}ngOnInit(){this.addInfoIconWithTooltip()}addInfoIconWithTooltip(){let e=this.viewContainerRef.createComponent(yb);e.instance.tooltipClasses=this.tooltipClasses?.join(" "),e.instance.tooltipContent=this.tooltipContent,e.instance.tooltipPosition=this.tooltipPosition}static{this.\u0275fac=function(n){return new(n||t)(_(ni))}}static{this.\u0275dir=Se({type:t,selectors:[["","appTooltipInfo",""]],inputs:{tooltipContent:[0,"appTooltipInfo","tooltipContent"],tooltipPosition:"tooltipPosition",tooltipClasses:"tooltipClasses"},standalone:!0})}}return t})();var kP=()=>["d-flex","info-icon-color"],NP=()=>({standalone:!0});function LP(t,i){if(t&1){let e=Z();f(0,"q-icon-button",6),I("click",function(){R(e);let o=v();return A(o.modalActionClose(!1))}),g()}if(t&2){let e=v();b("icon",e.iconService.x)}}function FP(t,i){if(t&1&&(f(0,"div",7),q(1),z(2,"translate"),g()),t&2){let e,n=v(2);u(),Te(G(2,1,(e=n.modalData.title)!==null&&e!==void 0?e:n.defaultTitle))}}function VP(t,i){if(t&1&&(f(0,"div",8)(1,"div",9),q(2),z(3,"translate"),g()()),t&2){let e,n=v(2);u(),b("appTooltipInfo",n.modalData.titleIconOptions.tooltip)("tooltipPosition",n.modalData.titleIconOptions.tooltipPlacement)("tooltipClasses",Ye(6,kP)),u(),Te(G(3,4,(e=n.modalData.title)!==null&&e!==void 0?e:n.defaultTitle))}}function BP(t,i){if(t&1&&T(0,FP,3,3,"div",7)(1,VP,4,7,"div",8),t&2){let e=v();L(e.modalData.titleIconOptions?1:0)}}function HP(t,i){if(t&1&&(f(0,"div",3),q(1),z(2,"translate"),g()),t&2){let e=v();u(),Te(G(2,1,e.modalData.description))}}function jP(t,i){if(t&1){let e=Z();f(0,"div")(1,"p"),q(2),z(3,"translate"),g(),f(4,"q-checkbox",10),z(5,"translate"),zn("ngModelChange",function(o){R(e);let r=v();return qn(r.confirmationCheckboxValue,o)||(r.confirmationCheckboxValue=o),A(o)}),g()()}if(t&2){let e,n=v();u(2),Te(G(3,5,(e=n.modalData.confirmationCheckbox.description)!==null&&e!==void 0?e:"")),u(2),tt("label",G(5,7,n.modalData.confirmationCheckbox.label)),jn("ngModel",n.confirmationCheckboxValue),b("ngModelOptions",Ye(9,NP))("disabled",n.modalData.confirmationCheckbox.disabledEditing)}}function qP(t,i){t&1&&He(0)}function zP(t,i){if(t&1){let e=Z();f(0,"q-button",13),I("click",function(){R(e);let o=v(2);return A(o.modalActionClose(!1))}),q(1),z(2,"translate"),g()}if(t&2){let e,n=v(2);b("disabled",n.disableCancel),u(),le(" ",G(2,2,(e=n.modalData.cancelButtonText)!==null&&e!==void 0?e:n.defaultCancelButtonText)," ")}}function GP(t,i){if(t&1){let e=Z();f(0,"mat-dialog-actions",5),T(1,zP,3,4,"q-button",11),f(2,"q-button",12),I("click",function(){R(e);let o=v();return A(o.modalActionClose(!0))}),q(3),z(4,"translate"),g()()}if(t&2){let e,n=v();u(),L(n.modalData.removeCancelButton?-1:1),u(),b("color",n.modalData.isAcceptButtonPositive?"primary":"negative")("disabled",n.disableSubmit),u(),le(" ",G(4,4,(e=n.modalData.acceptButtonText)!==null&&e!==void 0?e:n.defaultAcceptButtonText)," ")}}var io=(()=>{class t{constructor(e,n,o,r){this.dialogRef=e,this.modalData=n,this.translate=o,this.iconService=r,this.defaultCancelButtonText="CANCEL",this.defaultAcceptButtonText="ACCEPT",this.confirmationCheckboxValue=!this.modalData?.confirmationCheckbox?.defaultValue,this.disableSubmit=this.modalData.disableSubmit??!1}modalActionClose(e){return Y(this,null,function*(){let n={accepted:e,data:this.modalData.componentData};if(this.modalData.dialogAcceptedClosedCallback){let o=this.disableSubmit;try{this.disableSubmit=!0,this.disableCancel=!0,yield this.modalData.dialogAcceptedClosedCallback(n),!this.modalData.keepOpen?.(n)&&this.dialogRef.getState()===ws.OPEN&&this.dialogRef.close(n)}finally{this.disableSubmit=o,this.disableCancel=!1}}else this.dialogRef.close(n)})}static{this.\u0275fac=function(n){return new(n||t)(_(Zo),_(xa),_(Ge),_(Ce))}}static{this.\u0275cmp=F({type:t,selectors:[["app-legacy-modal-dialog"]],inputs:{modalContentTemplate:"modalContentTemplate",disableSubmit:"disableSubmit"},standalone:!0,features:[B],decls:9,vars:12,consts:[[1,"modal-dialog-background"],["size","s",1,"close-button",3,"icon"],["id","dialog-content"],[1,"description","mb-24"],[4,"ngTemplateOutlet"],[1,"pt-0"],["size","s",1,"close-button",3,"click","icon"],[1,"q-font-heading-xs","title"],[1,"d-flex","align-items-center","gap-8","title"],["id","title-with-icon",1,"q-font-heading-xs",3,"appTooltipInfo","tooltipPosition","tooltipClasses"],[3,"ngModelChange","label","ngModel","ngModelOptions","disabled"],["data-testid","btn-legacy-modal-dialog-cancel","variant","outline",1,"button-margin-right",3,"disabled"],["data-testid","btn-legacy-modal-dialog-accept","variant","fill",3,"click","color","disabled"],["data-testid","btn-legacy-modal-dialog-cancel","variant","outline",1,"button-margin-right",3,"click","disabled"]],template:function(n,o){if(n&1&&(f(0,"div",0),T(1,LP,1,1,"q-icon-button",1)(2,BP,2,1),f(3,"mat-dialog-content",2),M(4,"app-alert"),T(5,HP,3,3,"div",3)(6,jP,6,10,"div")(7,qP,1,0,"ng-container",4),g(),T(8,GP,5,6,"mat-dialog-actions",5),g()),n&2){let r,s;u(),L(!((r=o.modalData.dismissable)!==null&&r!==void 0)||r?1:-1),u(),L(o.modalData.title||o.defaultTitle?2:-1),u(),Hn("min-height",o.modalData.minHeight)("padding-bottom",o.modalData.paddingBottom),Fe("position-relative",o.modalData.scrollContent),u(2),L(o.modalData.description?5:-1),u(),L(o.modalData.confirmationCheckbox?6:-1),u(),b("ngTemplateOutlet",o.modalContentTemplate),u(),L(!((s=o.modalData.showDialogActions)!==null&&s!==void 0)||s?8:-1)}},dependencies:[Ve,Ft,Ss,Uc,$c,oi,Lt,Yt,ud,ci,be,Ne,Qo,Oc,_t,Qt,ji],styles:[".q-button--root[_ngcontent-%COMP%]{width:6rem}.button-margin-right[_ngcontent-%COMP%]{margin-right:.5rem}.title[_ngcontent-%COMP%]{padding:1.5rem;color:var(--qds-text-primary-1)}#dialog-content[_ngcontent-%COMP%]{padding:0 1.5rem 1.5rem;min-width:400px;font-size:var(--q-font-size-body-s);display:flex;flex-direction:column}.description[_ngcontent-%COMP%]{white-space:pre-wrap}.mat-mdc-dialog-title[_ngcontent-%COMP%]{padding-bottom:1.5rem;font-weight:var(--q-font-weight-bold);font-size:var(--q-font-size-heading-xs);line-height:var(--q-line-height-heading-xs);font-stretch:var(--q-font-stretch-heading)}.close-button[_ngcontent-%COMP%]{position:absolute;right:.5rem;top:.5rem;z-index:10}mat-dialog-actions[_ngcontent-%COMP%]{padding:.5rem 1.5rem 1.5rem}"]})}}return t})();function md(t){return Y(this,null,function*(){let i="text/plain",e=new Blob([t],{type:i}),n=[new ClipboardItem({[i]:e})];yield navigator.clipboard.write(n)})}var fd=t=>Y(void 0,null,function*(){let i=t.map(e=>`${e.label}: ${e.value}`).join(`
|
|
2
|
-
`);yield md(i)});function $P(t,i){t&1&&(f(0,"div",3),M(1,"q-progress-circle"),g())}function UP(t,i){if(t&1&&(f(0,"div")(1,"div",6)(2,"div",7),q(3),g(),f(4,"div",8),q(5),g()(),M(6,"q-divider"),g()),t&2){let e=i.$implicit;u(3),Te(e.label),u(2),Te(e.value)}}function WP(t,i){if(t&1&&(f(0,"div",4),T(1,UP,7,2,"div",5),g()),t&2){let e=v();u(),b("ngForOf",e.systemData)}}var Cb=(()=>{class t{constructor(e,n){this.menuService=e,this.iconService=n,this.isLoading=!0,this.isCopied=!1,this.destroy$=new X}ngOnInit(){this.menuService.systemData$.pipe(ye(this.destroy$)).subscribe(e=>{this.systemData=e,this.isLoading=!1})}onCopy(){return Y(this,null,function*(){this.isCopied=!0,yield fd(this.systemData)})}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.unsubscribe()}static{this.\u0275fac=function(n){return new(n||t)(_(Ht),_(Ce))}}static{this.\u0275cmp=F({type:t,selectors:[["app-about-dialog"]],standalone:!0,features:[B],decls:5,vars:8,consts:[["class","d-flex justify-content-center align-items-center loader-container",4,"ngIf"],["class","info-container",4,"ngIf"],["variant","fill",1,"copy-btn",3,"click","disabled","color","startIcon"],[1,"d-flex","justify-content-center","align-items-center","loader-container"],[1,"info-container"],[4,"ngFor","ngForOf"],[1,"d-flex","align-items-center","about-entry"],[1,"entry-label","q-font-body-sm-strong"],[1,"entry-value"]],template:function(n,o){n&1&&(T(0,$P,2,0,"div",0)(1,WP,2,1,"div",1),f(2,"q-button",2),I("click",function(){return o.onCopy()}),q(3),z(4,"translate"),g()),n&2&&(b("ngIf",o.isLoading),u(),b("ngIf",!o.isLoading),u(),b("disabled",o.isLoading)("color",o.isCopied?"positive":"primary")("startIcon",o.isCopied?o.iconService.check:o.iconService.copy),u(),le(" ",G(4,6,o.isCopied?"COPIED":"COPY"),`
|
|
3
|
-
`))},dependencies:[bo,Ci,zi,rs,Xn,Yn,Lt,Yt,be,Ne],styles:[".loader-container[_ngcontent-%COMP%]{height:8rem}.about-entry[_ngcontent-%COMP%]{color:var(--qds-text-primary-1);height:2.5rem}.about-entry[_ngcontent-%COMP%] .entry-label[_ngcontent-%COMP%]{padding:0 1rem;width:40%}.info-container[_ngcontent-%COMP%]{padding-bottom:2rem}"]})}}return t})();function QP(t,i){t&1&&M(0,"q-progress-circle",6)}var wb=(()=>{class t{constructor(e,n,o){this.menuService=e,this.iconService=n,this.electronService=o,this.isCopied=!1,this.isLoading=!1,this.copyBtnText="Copy System Data",this.destroy$=new X}ngOnInit(){this.menuService.systemData$.pipe(ye(this.destroy$)).subscribe(e=>Y(this,null,function*(){yield fd(e),this.isCopied=!0,this.isLoading=!1}))}onCopy(){this.isLoading=!0,this.electronService.send("fetchSystemData")}onClickLink(e){this.electronService.send("openExternal",e)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.unsubscribe()}static{this.\u0275fac=function(n){return new(n||t)(_(Ht),_(Ce),_(Xe))}}static{this.\u0275cmp=F({type:t,selectors:[["app-report-an-issue-dialog"]],standalone:!0,features:[B],decls:14,vars:6,consts:[[1,"dialog-body"],[1,"d-flex","flex-column","links-container"],["qLink","","variant","primary","target","_blank",3,"click"],[1,"d-flex","align-items-center"],["variant","fill",1,"copy-btn",3,"click","disabled","color","startIcon"],["size","s",4,"ngIf"],["size","s"]],template:function(n,o){n&1&&(f(0,"div",0)(1,"p"),q(2,"If you have encountered an issue while using QAIRT Visualizer, or you would like to make a feature request, please visit:"),g(),f(3,"div",1)(4,"a",2),I("click",function(){return o.onClickLink("https://jira-dc.qualcomm.com/jira/secure/CreateIssueDetails!init.jspa?pid=41511&issuetype=1&priority=3&customfield_33220=203642")}),q(5," QAIRT Visualizer File Bug "),g(),f(6,"a",2),I("click",function(){return o.onClickLink("https://jira-dc.qualcomm.com/jira/secure/CreateIssueDetails!init.jspa?pid=41511&issuetype=7&priority=3&customfield_33220=203642")}),q(7," QAIRT Visualizer Request Feature "),g()(),f(8,"p"),q(9),g()(),f(10,"div",3)(11,"q-button",4),I("click",function(){return o.onCopy()}),q(12),g(),T(13,QP,1,0,"q-progress-circle",5),g()),n&2&&(u(9),le("Please provide only the summary and description in the ticket and include specific system information by clicking '",o.copyBtnText,"' below."),u(2),b("disabled",o.isLoading)("color",o.isCopied?"positive":"primary")("startIcon",o.isCopied?o.iconService.check:o.iconService.copy),u(),le(" ",o.isCopied?"Copied!":o.copyBtnText," "),u(),b("ngIf",o.isLoading))},dependencies:[Dc,Ic,Lt,Yt,bo,Ci,zi],styles:[".dialog-body[_ngcontent-%COMP%]{color:var(--qds-text-primary-1);padding-bottom:2rem}.dialog-body[_ngcontent-%COMP%] .links-container[_ngcontent-%COMP%]{padding-bottom:.8rem}.dialog-body[_ngcontent-%COMP%] .links-container[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer}.copy-btn[_ngcontent-%COMP%]{margin-right:1rem}"]})}}return t})();var Sb=(()=>{class t{constructor(e,n){this.electronService=e,this.iconService=n,this.isCopied=se(!1),this.DISCORD_LINK="https://discord.com/invite/qualcommdevelopernetwork",this.SUPPORT_EMAIL="qairt.visualizer.support@quicinc.com",this.copyTextToClipboard=md}onCopyEmail(){return Y(this,null,function*(){yield this.copyTextToClipboard(this.SUPPORT_EMAIL),this.isCopied.set(!0),setTimeout(()=>{this.isCopied.set(!1)},2e3)})}static{this.\u0275fac=function(n){return new(n||t)(_(Xe),_(Ce))}}static{this.\u0275cmp=F({type:t,selectors:[["app-support-dialog"]],standalone:!0,features:[B],decls:17,vars:16,consts:[[1,"support-dialog-wrapper"],[1,"support-section"],[1,"q-font-heading-xxs"],["data-testid","link-discord","q-link","",3,"click","endIcon"],[1,"d-flex","align-items-center","gap-12"],["data-testid","btn-copy-support-email","size","s",3,"click","color","startIcon"]],template:function(n,o){n&1&&(f(0,"div",0)(1,"div",1)(2,"div",2),q(3),z(4,"translate"),g(),f(5,"a",3),I("click",function(){return o.electronService.send("openExternal",o.DISCORD_LINK)}),q(6),z(7,"translate"),g()(),f(8,"div",1)(9,"div",2),q(10),z(11,"translate"),g(),f(12,"div",4),q(13),f(14,"q-button",5),I("click",function(){return o.onCopyEmail()}),q(15),z(16,"translate"),g()()()()),n&2&&(u(3),Te(G(4,8,"SUPPORT.QUALCOMM_DEVELOPER_NETWORK")),u(2),b("endIcon",o.iconService.chevronRight),u(),le(" ",G(7,10,"SUPPORT.ASK_A_QUESTION")," "),u(4),Te(G(11,12,"SUPPORT.SUPPORT_EMAIL")),u(3),le(" ",o.SUPPORT_EMAIL," "),u(),b("color",o.isCopied()?"positive":"primary")("startIcon",o.isCopied()?o.iconService.check:o.iconService.copy),u(),le(" ",G(16,14,o.isCopied()?"COPIED":"COPY")," "))},dependencies:[Dc,Ic,Le,be,Ne,Lt,Yt],styles:[".support-dialog-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}"]})}}return t})();var YP=["aboutDialog"],XP=["reportAnIssueDialog"],KP=["supportDialog"];function ZP(t,i){if(t&1){let e=Z();f(0,"div",10)(1,"div",15),I("click",function(o){R(e);let r=ue(3);return A(r.toggle(o))}),M(2,"q-menu",16,3),f(4,"q-button"),q(5),z(6,"translate"),g()(),f(7,"div",15),I("click",function(o){R(e);let r=ue(9);return A(r.toggle(o))}),M(8,"q-menu",16,4),f(10,"q-button"),q(11),z(12,"translate"),g()()()}if(t&2){let e=v();u(2),b("items",e.file),u(3),le(" ",G(6,4,"FILE")," "),u(3),b("items",e.helpList),u(3),le(" ",G(12,6,"MENU.HELP")," ")}}function JP(t,i){if(t&1){let e=Z();f(0,"q-icon-button",12),I("click",function(){R(e);let o=v();return A(o.onWindowControl("maximize"))}),g()}if(t&2){let e=v();b("icon",e.iconService.square)("dense",!0)}}function eO(t,i){if(t&1){let e=Z();f(0,"button",17),I("click",function(){R(e);let o=v();return A(o.onWindowControl("unmaximize"))}),Zl(),f(1,"svg",18),M(2,"rect",19)(3,"rect",20),g()()}t&2&&b("dense",!0)}function tO(t,i){t&1&&M(0,"app-about-dialog")}function iO(t,i){t&1&&M(0,"app-report-an-issue-dialog")}function nO(t,i){t&1&&M(0,"app-support-dialog")}var Eb="panel-submenu",Tb=(()=>{class t{constructor(e,n,o,r,s,a,l){this.translate=e,this.electronService=n,this.menuService=o,this.iconService=r,this.dialog=s,this.panelService=a,this.documentationService=l,this.showCloseOnly=!1,this.windowClosed=Vn(),this.destroyed$=new X,this.FILE_MENU=[{translationKey:"MENU.EXIT",command:()=>this.onWindowControl("closeWindow")}],this.VIEW_MENU=[{id:Eb,translationKey:"MENU.PANEL",endIcon:this.iconService.chevronRight,items:[{data:ae.GRAPH,translationKey:"GRAPH_PANEL.TITLE",command:()=>this.panelService.togglePanel(ae.GRAPH),endIcon:this.getPanelCheckIcon(ae.GRAPH,this.menuService.displayedPanels)}]}],this.HELP_MENU=[{translationKey:"MENU.ABOUT",command:()=>{this.electronService.send("onQairtVizInfo"),this.openAboutDialog()}},{translationKey:"MENU.SUPPORT",command:()=>this.openSupportDialog()},{translationKey:"MENU.OPEN_DEV_TOOLS",command:()=>this.electronService.send("openTools")}]}ngOnInit(){this.menuService.displayedPanels$.pipe(ye(this.destroyed$)).subscribe(e=>{this.viewList.find(o=>o.id===Eb).items.forEach(o=>{o.endIcon=this.getPanelCheckIcon(o.data,e)})})}translateMenuItems(){this.file=this.translateMenu(this.FILE_MENU),this.helpList=this.translateMenu(this.HELP_MENU)}translateMenu(e){return e?e.map(n=>({id:n.id,command:n.command,endIcon:n.endIcon,data:n.data,label:this.translate.instant(n.translationKey),items:this.translateMenu(n.items)})):[]}getPanelCheckIcon(e,n){if(n.has(e))return this.iconService.check}openAboutDialog(){let e=this.dialog.open(io,{data:{title:"QAIRT Visualizer",showDialogActions:!1,dismissable:!0},width:"35rem"});e.componentInstance.modalContentTemplate=this.aboutDialog}openSupportDialog(){let e=this.dialog.open(io,{data:{title:this.translate.instant("MENU.SUPPORT"),showDialogActions:!1,dismissable:!0},width:"35rem"});e.componentInstance.modalContentTemplate=this.supportDialog}openReportIssueDialog(){let e=this.dialog.open(io,{data:{title:"Report an Issue",showDialogActions:!1,dismissable:!0},width:"35rem"});e.componentInstance.modalContentTemplate=this.reportAnIssueDialog}onWindowControl(e){e==="closeWindow"?this.windowClosed.emit():this.electronService.send(e)}ngOnDestroy(){this.destroyed$.next(!0),this.destroyed$.unsubscribe()}static{this.\u0275fac=function(n){return new(n||t)(_(Ge),_(Xe),_(Ht),_(Ce),_(Zn),_(li),_(Nv))}}static{this.\u0275cmp=F({type:t,selectors:[["app-menu-bar"]],viewQuery:function(n,o){if(n&1&&(Ee(YP,5),Ee(XP,5),Ee(KP,5)),n&2){let r;me(r=fe())&&(o.aboutDialog=r.first),me(r=fe())&&(o.reportAnIssueDialog=r.first),me(r=fe())&&(o.supportDialog=r.first)}},inputs:{showCloseOnly:"showCloseOnly"},outputs:{windowClosed:"windowClosed"},standalone:!0,features:[B],decls:19,vars:10,consts:[["aboutDialog",""],["reportAnIssueDialog",""],["supportDialog",""],["menu",""],["help",""],["id","menuToolbar",1,"justify-content-between"],[1,"d-flex","align-items-center","menu-section"],[1,"d-flex","align-items-center","q-heading-xxs","app-title"],[1,"d-flex","align-items-center","justify-content-center","logo-wrapper"],["src","./assets/images/icon.png","alt","Logo"],[1,"d-flex","menu-items"],[1,"d-flex","align-items-center","window-controls"],["iconSize","s",1,"d-flex",3,"click","icon","dense"],["class","d-flex","iconSize","s",3,"icon","dense","click",4,"ngIf"],["q-icon-button","","class","d-flex restore-down-btn","iconSize","s",3,"dense","click",4,"ngIf"],[3,"click"],["appendTo","portal",3,"items"],["q-icon-button","","iconSize","s",1,"d-flex","restore-down-btn",3,"click","dense"],["width","12","height","12","viewBox","0 0 12 12","fill","none","xmlns","http://www.w3.org/2000/svg"],["x","2.5","y","0.5","width","9","height","9","rx","0.5"],["x","0.5","y","2.5","width","9","height","9","rx","0.5"]],template:function(n,o){if(n&1){let r=Z();f(0,"mat-toolbar",5)(1,"div",6)(2,"div",7)(3,"div",8),M(4,"img",9),g(),q(5),z(6,"translate"),g(),T(7,ZP,13,8,"div",10),g(),f(8,"div",11)(9,"q-icon-button",12),I("click",function(){return R(r),A(o.onWindowControl("minimize"))}),g(),T(10,JP,1,2,"q-icon-button",13)(11,eO,4,1,"button",14),f(12,"q-icon-button",12),I("click",function(){return R(r),A(o.onWindowControl("closeWindow"))}),g()()(),T(13,tO,1,0,"ng-template",null,0,ke)(15,iO,1,0,"ng-template",null,1,ke)(17,nO,1,0,"ng-template",null,2,ke)}n&2&&(u(5),le(" ",G(6,8,"QAIRT_VISUALIZER")," "),u(2),L(o.showCloseOnly?-1:7),u(2),b("icon",o.iconService.minus)("dense",!0),u(),b("ngIf",!o.menuService.isMaximized),u(),b("ngIf",o.menuService.isMaximized),u(),b("icon",o.iconService.x)("dense",!0))},dependencies:[sn,xs,Gi,Yo,Lt,Yt,Ve,Ft,Wo,bo,Cb,wb,be,Ne,Sb],styles:["#menuToolbar[_ngcontent-%COMP%]{background-color:var(--qds-background-neutral-2);border-bottom:1px solid var(--qds-border-default-1);font-size:.8rem;height:2.5rem;-webkit-app-region:drag}#menuToolbar[_ngcontent-%COMP%] .menu-section[_ngcontent-%COMP%], #menuToolbar[_ngcontent-%COMP%] .window-controls[_ngcontent-%COMP%]{-webkit-app-region:no-drag}.logo-wrapper[_ngcontent-%COMP%]{width:1.65rem;height:1.65rem;margin-right:.8rem}.logo-wrapper[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%}.app-title[_ngcontent-%COMP%]{height:1.3rem;border-right:1px solid var(--qds-border-default-1);padding-right:1rem}.menu-items[_ngcontent-%COMP%]{padding-left:.25rem;gap:.5rem}.window-controls[_ngcontent-%COMP%]{gap:1.5rem}.restore-down-btn[_ngcontent-%COMP%]{stroke:var(--qds-text-primary-1)}"]})}}return t})();var Fa=function(t){return t[t.XX_SMALL=12]="XX_SMALL",t[t.X_SMALL=16]="X_SMALL",t[t.SMALL=20]="SMALL",t[t.MEDIUM=24]="MEDIUM",t[t.MEDIUM_LARGE=28]="MEDIUM_LARGE",t[t.LARGE=32]="LARGE",t[t.X_LARGE=40]="X_LARGE",t}(Fa||{});var oO=["containerEl"],rO=()=>["info-icon-color"];function sO(t,i){if(t&1&&(f(0,"div",5),M(1,"q-icon",9),g()),t&2){let e,n=v().$implicit;u(),b("icon",n.icon)("size",(e=n.iconSize)!==null&&e!==void 0?e:"xs")}}function aO(t,i){if(t&1&&(f(0,"div",6)(1,"span",10),q(2),g()()),t&2){let e=v().$implicit;u(),b("appTooltipInfo",e.info)("tooltipClasses",Ye(3,rO)),u(),Te(e.label)}}function lO(t,i){if(t&1&&(f(0,"span",7),q(1),g()),t&2){let e=v().$implicit;u(),Te(e.label)}}function cO(t,i){if(t&1){let e=Z();f(0,"button",11),I("click",function(o){return R(e),ue(2).toggle(o),A(o.stopPropagation())}),g(),M(1,"q-menu",12,1)}if(t&2){let e=v().$implicit,n=v();b("icon",n.iconService.moreVertical)("dense",!0),u(),b("items",e.contextMenuActions)}}function dO(t,i){if(t&1){let e=Z();f(0,"button",13),I("click",function(){R(e);let o=v().$implicit,r=v();return A(r.closeTab(o))}),g()}if(t&2){let e=v(2);b("icon",e.iconService.x)("dense",!0)}}function pO(t,i){if(t&1){let e=Z();f(0,"div",4),I("click",function(){let o=R(e).index,r=v();return A(r.setActiveTab(o))})("cdkDragStarted",function(){let o=R(e).$implicit,r=v();return A(r.dragStart(o))})("cdkDragEnded",function(){R(e);let o=v();return A(o.dragEnd())}),T(1,sO,2,2,"div",5)(2,aO,3,4,"div",6)(3,lO,2,1,"span",7)(4,cO,3,3)(5,dO,1,2,"button",8),g()}if(t&2){let e,n=i.$implicit,o=i.index,r=v();Fe("active",r.activeTabIndex===o)("underlined",r.showUnderline)("divider",r.showDivider)("large",r.size===r.sizes.LARGE)("primary",n.tabType===r.tabTypes.PRIMARY),tt("tabindex",o+1),b("cdkDragData",n)("cdkDragDisabled",n.isPinned)("qTooltip",n.label)("qTooltipDisabled",!!n.info),u(),L(n.icon?1:-1),u(),L(n.info?2:3),u(2),L(n.contextMenuActions!=null&&n.contextMenuActions.length?4:-1),u(),L(!((e=n.dismissable)!==null&&e!==void 0)||e?5:-1)}}var Is={MEDIUM:"Medium",LARGE:"Large"},Va={PRIMARY:"Primary"},Ds=(()=>{class t{get nativeElement(){return this.containerRef.nativeElement}constructor(e,n){this.iconService=e,this.electronService=n,this.tabData=Ot([]),this.showUnderline=!1,this.showDivider=!0,this.size=Is.MEDIUM,this.sortPredicate=()=>!0,this.activeTabUpdated=new de,this.tabClosed=new de,this.tabDroppedOutsideBoundary=Vn(),this.tabDragging=Vn(),this.sizes=Is,this.tabTypes=Va,this.lucideIconSizes=Fa,this.tabBeingDragged=se(void 0)}setActiveTab(e){this.activeTabUpdated.emit(e)}drop(e){jc(this.tabData(),e.previousIndex,e.currentIndex),this.setActiveTab(e.currentIndex)}closeTab(e){let n=this.tabData().findIndex(o=>o===e);this.tabClosed.emit(n),this.tabData().splice(n,1),this.tabData().length&&this.setActiveTab(this.getNextActiveTab(n))}getNextActiveTab(e){return e===this.activeTabIndex?e===this.tabData().length?e-1:e:e<this.activeTabIndex?this.activeTabIndex-1:this.activeTabIndex}dragStart(e){this.tabBeingDragged.set(e),this.tabDragging.emit(e)}dragEnd(){return Y(this,null,function*(){if(this.tabBeingDragged()){if(this.electronService.isRunningElectron()){let e=yield this.electronService.sendAndReceive("get-cursor-position","cursor-position"),n=this.getBoundaries(e.window);(e.cursor.x<n.left||e.cursor.x>n.right||e.cursor.y<n.top||e.cursor.y>n.bottom)&&this.tabDroppedOutsideBoundary.emit(this.tabBeingDragged())}this.tabBeingDragged.set(void 0)}})}getBoundaries(e){let{top:n,bottom:o,right:r,left:s}=this.containerRef.nativeElement.getBoundingClientRect(),a=window.devicePixelRatio;return{top:e.y+n*a,bottom:e.y+o*a,left:e.x+s*a,right:e.x+r*a}}static{this.\u0275fac=function(n){return new(n||t)(_(Ce),_(Xe))}}static{this.\u0275cmp=F({type:t,selectors:[["app-draggable-tabs"]],viewQuery:function(n,o){if(n&1&&Ee(oO,7),n&2){let r;me(r=fe())&&(o.containerRef=r.first)}},inputs:{tabData:[1,"tabData"],activeTabIndex:"activeTabIndex",showUnderline:"showUnderline",showDivider:"showDivider",size:"size",sortPredicate:"sortPredicate"},outputs:{activeTabUpdated:"activeTabUpdated",tabClosed:"tabClosed",tabDroppedOutsideBoundary:"tabDroppedOutsideBoundary",tabDragging:"tabDragging"},standalone:!0,features:[B],decls:3,vars:2,consts:[["containerEl",""],["menu",""],["cdkDropList","","cdkDropListOrientation","horizontal",1,"d-flex","h-100","drop-list-container",3,"cdkDropListDropped","cdkDropListSortPredicate"],["cdkDrag","","qTooltipPlacement","top","role","tab","class","tab d-flex position-relative align-items-center q-font-body-xs-strong",3,"cdkDragData","cdkDragDisabled","qTooltip","qTooltipDisabled","tabindex","active","underlined","divider","large","primary","click","cdkDragStarted","cdkDragEnded",4,"ngFor","ngForOf"],["cdkDrag","","qTooltipPlacement","top","role","tab",1,"tab","d-flex","position-relative","align-items-center","q-font-body-xs-strong",3,"click","cdkDragStarted","cdkDragEnded","cdkDragData","cdkDragDisabled","qTooltip","qTooltipDisabled","tabindex"],[1,"icon-wrapper","d-flex","align-items-center","justify-content-center"],[1,"d-flex","w-100","align-items-center","gap-8"],[1,"tab-label","text-ellipsis"],["q-icon-button","","variant","ghost","size","xs",1,"close-button",3,"icon","dense"],[3,"icon","size"],["tooltipPosition","right",1,"tab-label","text-ellipsis",3,"appTooltipInfo","tooltipClasses"],["q-icon-button","","variant","ghost","size","xs",1,"menu-button",3,"click","icon","dense"],["appendTo","portal",3,"items"],["q-icon-button","","variant","ghost","size","xs",1,"close-button",3,"click","icon","dense"]],template:function(n,o){if(n&1){let r=Z();f(0,"div",2,0),I("cdkDropListDropped",function(a){return R(r),A(o.drop(a))}),T(2,pO,6,19,"div",3),g()}n&2&&(b("cdkDropListSortPredicate",o.sortPredicate),u(2),b("ngForOf",o.tabData()))},dependencies:[mt,rs,l0,a0,Le,st,Dt,qi,Ve,Wo,Gi,Yo,be,ci],styles:[".drop-list-container[_ngcontent-%COMP%]{min-width:0}.tab[_ngcontent-%COMP%]{cursor:pointer;transition-property:background-color,color,opacity;transition-duration:.2s;transition-timing-function:ease;white-space:nowrap;flex-shrink:1;min-width:0;min-height:2.3rem;color:var(--qds-text-accent-1);padding:.3rem .7rem}.tab.large[_ngcontent-%COMP%]{padding:.5rem .9rem}.tab[_ngcontent-%COMP%]:hover .close-button[_ngcontent-%COMP%]{visibility:visible}.tab[_ngcontent-%COMP%] .icon-wrapper[_ngcontent-%COMP%]{transition-property:background-color,color,opacity;transition-duration:.2s;transition-timing-function:ease;width:1rem;height:1rem;border-radius:1px;margin-right:.25rem;padding:.1rem}.tab[_ngcontent-%COMP%] .tab-label[_ngcontent-%COMP%]{max-width:8rem}.tab.divider[_ngcontent-%COMP%]{border-right:1px solid var(--qds-border-subtle-1)}.tab.active[_ngcontent-%COMP%]{color:var(--qds-text-primary-1);background:var(--qds-background-neutral-2)}.tab.active.underlined[_ngcontent-%COMP%]{border-bottom:1px solid var(--qds-text-primary-1)}.tab[_ngcontent-%COMP%]:hover{color:var(--qds-text-primary-1)}.tab.primary[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:first-child{margin-right:.5rem}.tab.primary[_ngcontent-%COMP%]{border-bottom:solid .125rem var(--qds-border-subtle-1)}.tab.primary.active[_ngcontent-%COMP%] .icon-wrapper[_ngcontent-%COMP%]{background:var(--qds-status-informative);color:var(--qds-text-primary-2)}.tab.primary[_ngcontent-%COMP%]:not(.active) .icon-wrapper[_ngcontent-%COMP%]{background:var(--qds-status-informative);color:var(--qds-text-accent-2);opacity:.5}.tab.primary[_ngcontent-%COMP%]:hover .icon-wrapper[_ngcontent-%COMP%]{background:var(--qds-status-informative);color:var(--qds-text-primary-2);opacity:1}.tab[_ngcontent-%COMP%] .menu-button[_ngcontent-%COMP%]{margin-left:.125rem}.tab[_ngcontent-%COMP%] .close-button[_ngcontent-%COMP%]{visibility:hidden;margin-left:.3rem}"]})}}return t})();function xb(){return(...t)=>t}var Ba=function(t){return t.TENSORFLOW="pb",t.TF_LITE="tflite",t.ONNX="onnx",t.PYTORCH="pt",t.PYTORCH2="pt2",t.EXECUTORCH="pte",t.QCOM_AISW_CPP="cpp",t.QCOM_AISW_BIN="bin",t.QCOM_AISW_JSON="json",t.QCOM_AISW_SO="so",t.CSV="csv",t.JSON="json",t.PNG="png",t.DLC="dlc",t}(Ba||{});var Z4=xb()("COLLECTION","DATA_COLLECTION","ONNX_MODEL","QTI_AISW_QUANT_ENCODINGS","PYTORCH_MODEL","TENSORFLOW_MODEL","TFLITE_MODEL","QTI_AISW_BIN","QTI_AISW_CPP","QTI_AISW_JSON","CUSTOM_OP_SO","DLC_FP32_MODEL","DLC_FP16_MODEL","DLC_QUANT_MODEL","CSV","JSON","LOG","TXT","YAML","JPEG","PNG","RAW","ZIP"),zu=[".json"],Ha=[".onnx",".pb",".pt",".pt2",".pte",".json",".tflite",".dlc"],gd=`${zu.join(",")},${Ha.join(",")}`;var hO=()=>["d-flex","info-icon-color"],uO=()=>({standalone:!0});function mO(t,i){if(t&1){let e=Z();f(0,"q-icon-button",6),I("click",function(){R(e);let o=v();return A(o.modalActionClose(!1))}),g()}if(t&2){let e=v();b("icon",e.iconService.x)}}function fO(t,i){if(t&1&&(f(0,"div",7),q(1),z(2,"translate"),g()),t&2){let e,n=v(2);u(),Te(G(2,1,(e=n.modalData.title)!==null&&e!==void 0?e:n.defaultTitle))}}function gO(t,i){if(t&1&&(f(0,"div",8)(1,"div",9),q(2),z(3,"translate"),g()()),t&2){let e,n=v(2);u(),b("appTooltipInfo",n.modalData.titleIconOptions.tooltip)("tooltipPosition",n.modalData.titleIconOptions.tooltipPlacement)("tooltipClasses",Ye(6,hO)),u(),Te(G(3,4,(e=n.modalData.title)!==null&&e!==void 0?e:n.defaultTitle))}}function _O(t,i){if(t&1&&T(0,fO,3,3,"div",7)(1,gO,4,7,"div",8),t&2){let e=v();L(e.modalData.titleIconOptions?1:0)}}function vO(t,i){if(t&1&&(f(0,"div",3),q(1),z(2,"translate"),g()),t&2){let e=v();u(),Te(G(2,1,e.modalData.description))}}function bO(t,i){if(t&1){let e=Z();f(0,"div")(1,"p"),q(2),z(3,"translate"),g(),f(4,"q-checkbox",10),z(5,"translate"),zn("ngModelChange",function(o){R(e);let r=v();return qn(r.confirmationCheckboxValue,o)||(r.confirmationCheckboxValue=o),A(o)}),g()()}if(t&2){let e,n=v();u(2),Te(G(3,5,(e=n.modalData.confirmationCheckbox.description)!==null&&e!==void 0?e:"")),u(2),tt("label",G(5,7,n.modalData.confirmationCheckbox.label)),jn("ngModel",n.confirmationCheckboxValue),b("ngModelOptions",Ye(9,uO))("disabled",n.modalData.confirmationCheckbox.disabledEditing)}}function yO(t,i){t&1&&He(0)}function CO(t,i){if(t&1){let e=Z();f(0,"q-button",13),I("click",function(){R(e);let o=v(2);return A(o.modalActionClose(!1))}),q(1),z(2,"translate"),g()}if(t&2){let e,n=v(2);b("disabled",n.disableCancel),u(),le(" ",G(2,2,(e=n.modalData.cancelButtonText)!==null&&e!==void 0?e:n.defaultCancelButtonText)," ")}}function wO(t,i){if(t&1){let e=Z();f(0,"mat-dialog-actions",5),T(1,CO,3,4,"q-button",11),f(2,"q-button",12),I("click",function(){R(e);let o=v();return A(o.modalActionClose(!0))}),q(3),z(4,"translate"),g()()}if(t&2){let e,n=v();u(),L(n.modalData.removeCancelButton?-1:1),u(),b("color",n.modalData.isAcceptButtonPositive?"primary":"negative")("disabled",n.disableSubmit),u(),le(" ",G(4,4,(e=n.modalData.acceptButtonText)!==null&&e!==void 0?e:n.defaultAcceptButtonText)," ")}}var Pb=(()=>{class t extends io{constructor(e,n,o,r){super(e,n,o,r),this.dialogRef=e,this.modalData=n,this.translate=o,this.iconService=r,this.defaultTitle="CONFIRM",this.defaultAcceptButtonText="CONFIRM",e.disableClose=!0}modalActionClose(e){return Y(this,null,function*(){let n={isConfirmed:e,isSubActionConfirmed:this.confirmationCheckboxValue};this.dialogRef.close(n)})}static{this.\u0275fac=function(n){return new(n||t)(_(Zo),_(xa),_(Ge),_(Ce))}}static{this.\u0275cmp=F({type:t,selectors:[["app-confirm-dialog"]],standalone:!0,features:[ot,B],decls:9,vars:12,consts:[[1,"modal-dialog-background"],["size","s",1,"close-button",3,"icon"],["id","dialog-content"],[1,"description","mb-24"],[4,"ngTemplateOutlet"],[1,"pt-0"],["size","s",1,"close-button",3,"click","icon"],[1,"q-font-heading-xs","title"],[1,"d-flex","align-items-center","gap-8","title"],["id","title-with-icon",1,"q-font-heading-xs",3,"appTooltipInfo","tooltipPosition","tooltipClasses"],[3,"ngModelChange","label","ngModel","ngModelOptions","disabled"],["data-testid","btn-legacy-modal-dialog-cancel","variant","outline",1,"button-margin-right",3,"disabled"],["data-testid","btn-legacy-modal-dialog-accept","variant","fill",3,"click","color","disabled"],["data-testid","btn-legacy-modal-dialog-cancel","variant","outline",1,"button-margin-right",3,"click","disabled"]],template:function(n,o){if(n&1&&(f(0,"div",0),T(1,mO,1,1,"q-icon-button",1)(2,_O,2,1),f(3,"mat-dialog-content",2),M(4,"app-alert"),T(5,vO,3,3,"div",3)(6,bO,6,10,"div")(7,yO,1,0,"ng-container",4),g(),T(8,wO,5,6,"mat-dialog-actions",5),g()),n&2){let r,s;u(),L(!((r=o.modalData.dismissable)!==null&&r!==void 0)||r?1:-1),u(),L(o.modalData.title||o.defaultTitle?2:-1),u(),Hn("min-height",o.modalData.minHeight)("padding-bottom",o.modalData.paddingBottom),Fe("position-relative",o.modalData.scrollContent),u(2),L(o.modalData.description?5:-1),u(),L(o.modalData.confirmationCheckbox?6:-1),u(),b("ngTemplateOutlet",o.modalContentTemplate),u(),L(!((s=o.modalData.showDialogActions)!==null&&s!==void 0)||s?8:-1)}},dependencies:[Ve,Ft,Ss,Uc,$c,Lt,Yt,be,Ne,Qo,Oc,_t,Qt,ji,ci,ud,oi],styles:[".q-button--root[_ngcontent-%COMP%]{width:6rem}.button-margin-right[_ngcontent-%COMP%]{margin-right:.5rem}.title[_ngcontent-%COMP%]{padding:1.5rem;color:var(--qds-text-primary-1)}#dialog-content[_ngcontent-%COMP%]{padding:0 1.5rem 1.5rem;min-width:400px;font-size:var(--q-font-size-body-s);display:flex;flex-direction:column}.description[_ngcontent-%COMP%]{white-space:pre-wrap}.mat-mdc-dialog-title[_ngcontent-%COMP%]{padding-bottom:1.5rem;font-weight:var(--q-font-weight-bold);font-size:var(--q-font-size-heading-xs);line-height:var(--q-line-height-heading-xs);font-stretch:var(--q-font-stretch-heading)}.close-button[_ngcontent-%COMP%]{position:absolute;right:.5rem;top:.5rem;z-index:10}mat-dialog-actions[_ngcontent-%COMP%]{padding:.5rem 1.5rem 1.5rem}"]})}}return t})();function Ob(t,i){if(!t)return"0 Bytes";let e=1024,n=i<=0?0:i||2,o=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],r=Math.floor(Math.log(t)/Math.log(e));return parseFloat((t/Math.pow(e,r)).toFixed(n))+" "+o[r]}function Ib(t){return t.split(".").pop().toLowerCase()}function Db(t){return Y(this,null,function*(){let i=t.stream().getReader(),{value:e}=yield i.read(),n=new TextDecoder("utf-8").decode(e,{stream:!0});yield i.cancel();let o=n.match(/"artifact_type":\s*"([^"]+)"/);if(o)return SO[o[1]];try{let r=JSON.parse(yield t.text());return r=r.traceEvents??r,EO(r)?ae.OPTRACE_SUMMARY:void 0}catch{return}})}var SO={[Vt.ACCURACY_SUMMARY]:ae.ACCURACY_SUMMARY,[Vt.PERF_SUMMARY]:ae.PERF_SUMMARY,[Vt.OPTRACE_SUMMARY]:ae.OPTRACE_SUMMARY,[Vt.QHAS]:ae.QHAS_REPORT};function EO(t){try{if(!Array.isArray(t)||!t.length)return!1;let i=Math.min(5,t.length);return t.slice(0,i).every(e=>e&&e.hasOwnProperty("ph")&&e.hasOwnProperty("pid"))}catch{return!1}}function Mb(t){return Ib(t)===Ba.JSON}function Rb(t){let i=`.${Ib(t)}`;return Ha.includes(i)}var no={WORKSPACE_ERROR_COULD_NOT_OPEN:"workspaces.error.couldNotOpen",WORKSPACE_ERROR_COULD_NOT_UNDOCK:"workspaces.error.couldNotUndock",WORKSPACE_MENU_OPTION_UNDOCK:"workspaces.menu.undock.label",WORKSPACE_MENU_OPTION_RENAME:"workspaces.menu.rename.label",WORKSPACE_NAME_DEFAULT:"workspaces.name.default"};var Ab="performancePanelState",wo=(()=>{class t extends li{constructor(e,n,o){super(n,e),this.electronService=o,this.fileMap=se(new Map)}setWorkspace(e){return Y(this,null,function*(){if(Nn(t.prototype,this,"setWorkspace").call(this,e,Ab),this.activeSubtab){let n=this.activeSubtab.id,o=this.activeSubtab.resource.fileData.path,r=this.fileMap().get(n)??(yield this.electronService.createStreamingFileFromPath(o));this.updateFileMap(n,r)}})}updateFileMap(e,n){this.fileMap.update(o=>(o.set(e,n),o))}addSubtab(e,n){let o=super.createSubtab(ae.PERF_SUMMARY,e,n);return this.updateLocalStorage(),o}removeSubtab(e){let n=super.removeSubtab(e);return this.updateLocalStorage(),n}setSubtabData(e,n=this.activeSubtab){n.data=E(E({},n.data),e),this.updateLocalStorage()}updateLocalStorage(){super.updateLocalStorage(Ab)}handlePerfFile(e,n){this.addSubtab(n.name,{id:e,name:n.name,fileData:n}),this.setSubtabData({report:{fileId:e,type:Vt.PERF_SUMMARY}}),this.updateFileMap(e,n)}static{this.\u0275fac=function(n){return new(n||t)(D(Ht),D(Mt),D(Xe))}}static{this.\u0275prov=ne({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var kb="optracePanelState",So=(()=>{class t extends li{constructor(e,n,o){super(n,e),this.electronService=o,this.fileMap=se(new Map)}setWorkspace(e){return Y(this,null,function*(){if(Nn(t.prototype,this,"setWorkspace").call(this,e,kb),this.activeSubtab){let n=this.activeSubtab.id,o=this.activeSubtab.resource.fileData.path,r=this.fileMap().get(n)??(yield this.electronService.createStreamingFileFromPath(o));this.updateFileMap(n,r)}})}updateFileMap(e,n){this.fileMap.update(o=>(o.set(e,n),o))}addSubtab(e,n){let o=super.createSubtab(ae.OPTRACE_SUMMARY,e,n);return this.updateLocalStorage(),o}removeSubtab(e){let n=super.removeSubtab(e);return this.updateLocalStorage(),n}setSubtabData(e,n=this.activeSubtab){n.data=E(E({},n.data),e),this.updateLocalStorage()}updateLocalStorage(){super.updateLocalStorage(kb)}handleOptraceFile(e,n){this.addSubtab(n.name,{id:e,name:n.name,fileData:n}),this.setSubtabData({optraceId:e,report:{fileId:e,type:Vt.OPTRACE_SUMMARY}}),this.updateFileMap(e,n)}static{this.\u0275fac=function(n){return new(n||t)(D(Ht),D(Mt),D(Xe))}}static{this.\u0275prov=ne({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var ja="global";var Ms=(()=>{class t{constructor(e){this.electronService=e,this.loadingContexts={},this.loadingContextMessages={},this.loadingCount={},this.electronService.isRunningElectron()&&this.electronService.registerEventHandler("spinner",(n,o,...r)=>{this[o](...r)})}getLoadingStatus(e=ja,n=!1){return this.loadingContexts[e]||(this.loadingContexts[e]=new it(n)),this.loadingContexts[e].asObservable()}getLoadingMessage(e=ja){return this.loadingContextMessages[e]||(this.loadingContextMessages[e]=new it("")),this.loadingContextMessages[e].asObservable()}wait(e=ja,n=""){this.loadingContexts[e]||(this.loadingContexts[e]=new it(!1)),this.loadingContextMessages[e]||(this.loadingContextMessages[e]=new it(n)),this.loadingCount[e]||(this.loadingCount[e]=0),this.loadingCount[e]++,this.loadingContexts[e].next(!0),this.loadingContextMessages[e].next(n)}stop(e=ja){this.loadingContexts[e]||(this.loadingContexts[e]=new it(!1),this.loadingContextMessages[e].next("")),this.loadingCount[e]&&this.loadingCount[e]--,this.loadingCount[e]||(this.loadingContexts[e].next(!1),this.loadingContextMessages[e]?.next(""))}static{this.\u0275fac=function(n){return new(n||t)(D(Xe))}}static{this.\u0275prov=ne({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var _d=(()=>{class t{constructor(){}allFileSizesValid(e){return!e.some(n=>n.size>16e9)}saveUrlToClient(e,n){let o=document.createElement("a");o.href=e,o.download=n,o.click(),o.remove()}saveToClient(e,n){let o=URL.createObjectURL(e);this.saveUrlToClient(o,n),URL.revokeObjectURL(o)}createFileObject(e,n){let o=new Blob([e]);return new File([o],n)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=ne({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var wn=Object.create(null);wn.open="0";wn.close="1";wn.ping="2";wn.pong="3";wn.message="4";wn.upgrade="5";wn.noop="6";var qa=Object.create(null);Object.keys(wn).forEach(t=>{qa[wn[t]]=t});var za={type:"error",data:"parser error"};var Vb=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Bb=typeof ArrayBuffer=="function",Hb=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,Ga=({type:t,data:i},e,n)=>Vb&&i instanceof Blob?e?n(i):Lb(i,n):Bb&&(i instanceof ArrayBuffer||Hb(i))?e?n(i):Lb(new Blob([i]),n):n(wn[t]+(i||"")),Lb=(t,i)=>{let e=new FileReader;return e.onload=function(){let n=e.result.split(",")[1];i("b"+(n||""))},e.readAsDataURL(t)};function Fb(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}var Wu;function jb(t,i){if(Vb&&t.data instanceof Blob)return t.data.arrayBuffer().then(Fb).then(i);if(Bb&&(t.data instanceof ArrayBuffer||Hb(t.data)))return i(Fb(t.data));Ga(t,!1,e=>{Wu||(Wu=new TextEncoder),i(Wu.encode(e))})}var qb="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",$a=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<qb.length;t++)$a[qb.charCodeAt(t)]=t;var zb=t=>{let i=t.length*.75,e=t.length,n,o=0,r,s,a,l;t[t.length-1]==="="&&(i--,t[t.length-2]==="="&&i--);let c=new ArrayBuffer(i),d=new Uint8Array(c);for(n=0;n<e;n+=4)r=$a[t.charCodeAt(n)],s=$a[t.charCodeAt(n+1)],a=$a[t.charCodeAt(n+2)],l=$a[t.charCodeAt(n+3)],d[o++]=r<<2|s>>4,d[o++]=(s&15)<<4|a>>2,d[o++]=(a&3)<<6|l&63;return c};var xO=typeof ArrayBuffer=="function",Ua=(t,i)=>{if(typeof t!="string")return{type:"message",data:Gb(t,i)};let e=t.charAt(0);return e==="b"?{type:"message",data:PO(t.substring(1),i)}:qa[e]?t.length>1?{type:qa[e],data:t.substring(1)}:{type:qa[e]}:za},PO=(t,i)=>{if(xO){let e=zb(t);return Gb(e,i)}else return{base64:!0,data:t}},Gb=(t,i)=>{switch(i){case"blob":return t instanceof Blob?t:new Blob([t]);case"arraybuffer":default:return t instanceof ArrayBuffer?t:t.buffer}};var $b="",Ub=(t,i)=>{let e=t.length,n=new Array(e),o=0;t.forEach((r,s)=>{Ga(r,!1,a=>{n[s]=a,++o===e&&i(n.join($b))})})},Wb=(t,i)=>{let e=t.split($b),n=[];for(let o=0;o<e.length;o++){let r=Ua(e[o],i);if(n.push(r),r.type==="error")break}return n};function Qb(){return new TransformStream({transform(t,i){jb(t,e=>{let n=e.length,o;if(n<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,n);else if(n<65536){o=new Uint8Array(3);let r=new DataView(o.buffer);r.setUint8(0,126),r.setUint16(1,n)}else{o=new Uint8Array(9);let r=new DataView(o.buffer);r.setUint8(0,127),r.setBigUint64(1,BigInt(n))}t.data&&typeof t.data!="string"&&(o[0]|=128),i.enqueue(o),i.enqueue(e)})}})}var Qu;function vd(t){return t.reduce((i,e)=>i+e.length,0)}function bd(t,i){if(t[0].length===i)return t.shift();let e=new Uint8Array(i),n=0;for(let o=0;o<i;o++)e[o]=t[0][n++],n===t[0].length&&(t.shift(),n=0);return t.length&&n<t[0].length&&(t[0]=t[0].slice(n)),e}function Yb(t,i){Qu||(Qu=new TextDecoder);let e=[],n=0,o=-1,r=!1;return new TransformStream({transform(s,a){for(e.push(s);;){if(n===0){if(vd(e)<1)break;let l=bd(e,1);r=(l[0]&128)===128,o=l[0]&127,o<126?n=3:o===126?n=1:n=2}else if(n===1){if(vd(e)<2)break;let l=bd(e,2);o=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),n=3}else if(n===2){if(vd(e)<8)break;let l=bd(e,8),c=new DataView(l.buffer,l.byteOffset,l.length),d=c.getUint32(0);if(d>Math.pow(2,21)-1){a.enqueue(za);break}o=d*Math.pow(2,32)+c.getUint32(4),n=3}else{if(vd(e)<o)break;let l=bd(e,o);a.enqueue(Ua(r?l:Qu.decode(l),i)),n=0}if(o===0||o>t){a.enqueue(za);break}}}})}var Yu=4;function gt(t){if(t)return OO(t)}function OO(t){for(var i in gt.prototype)t[i]=gt.prototype[i];return t}gt.prototype.on=gt.prototype.addEventListener=function(t,i){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(i),this};gt.prototype.once=function(t,i){function e(){this.off(t,e),i.apply(this,arguments)}return e.fn=i,this.on(t,e),this};gt.prototype.off=gt.prototype.removeListener=gt.prototype.removeAllListeners=gt.prototype.removeEventListener=function(t,i){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var e=this._callbacks["$"+t];if(!e)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var n,o=0;o<e.length;o++)if(n=e[o],n===i||n.fn===i){e.splice(o,1);break}return e.length===0&&delete this._callbacks["$"+t],this};gt.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var i=new Array(arguments.length-1),e=this._callbacks["$"+t],n=1;n<arguments.length;n++)i[n-1]=arguments[n];if(e){e=e.slice(0);for(var n=0,o=e.length;n<o;++n)e[n].apply(this,i)}return this};gt.prototype.emitReserved=gt.prototype.emit;gt.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]};gt.prototype.hasListeners=function(t){return!!this.listeners(t).length};var Eo=typeof Promise=="function"&&typeof Promise.resolve=="function"?i=>Promise.resolve().then(i):(i,e)=>e(i,0),Ei=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Xb="arraybuffer";function yd(t,...i){return i.reduce((e,n)=>(t.hasOwnProperty(n)&&(e[n]=t[n]),e),{})}var IO=Ei.setTimeout,DO=Ei.clearTimeout;function To(t,i){i.useNativeTimers?(t.setTimeoutFn=IO.bind(Ei),t.clearTimeoutFn=DO.bind(Ei)):(t.setTimeoutFn=Ei.setTimeout.bind(Ei),t.clearTimeoutFn=Ei.clearTimeout.bind(Ei))}var MO=1.33;function Kb(t){return typeof t=="string"?RO(t):Math.ceil((t.byteLength||t.size)*MO)}function RO(t){let i=0,e=0;for(let n=0,o=t.length;n<o;n++)i=t.charCodeAt(n),i<128?e+=1:i<2048?e+=2:i<55296||i>=57344?e+=3:(n++,e+=4);return e}function Cd(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Zb(t){let i="";for(let e in t)t.hasOwnProperty(e)&&(i.length&&(i+="&"),i+=encodeURIComponent(e)+"="+encodeURIComponent(t[e]));return i}function Jb(t){let i={},e=t.split("&");for(let n=0,o=e.length;n<o;n++){let r=e[n].split("=");i[decodeURIComponent(r[0])]=decodeURIComponent(r[1])}return i}var wd=class extends Error{constructor(i,e,n){super(i),this.description=e,this.context=n,this.type="TransportError"}},xo=class extends gt{constructor(i){super(),this.writable=!1,To(this,i),this.opts=i,this.query=i.query,this.socket=i.socket,this.supportsBinary=!i.forceBase64}onError(i,e,n){return super.emitReserved("error",new wd(i,e,n)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(i){this.readyState==="open"&&this.write(i)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(i){let e=Ua(i,this.socket.binaryType);this.onPacket(e)}onPacket(i){super.emitReserved("packet",i)}onClose(i){this.readyState="closed",super.emitReserved("close",i)}pause(i){}createUri(i,e={}){return i+"://"+this._hostname()+this._port()+this.opts.path+this._query(e)}_hostname(){let i=this.opts.hostname;return i.indexOf(":")===-1?i:"["+i+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(i){let e=Zb(i);return e.length?"?"+e:""}};var Wa=class extends xo{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(i){this.readyState="pausing";let e=()=>{this.readyState="paused",i()};if(this._polling||!this.writable){let n=0;this._polling&&(n++,this.once("pollComplete",function(){--n||e()})),this.writable||(n++,this.once("drain",function(){--n||e()}))}else e()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(i){let e=n=>{if(this.readyState==="opening"&&n.type==="open"&&this.onOpen(),n.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(n)};Wb(i,this.socket.binaryType).forEach(e),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){let i=()=>{this.write([{type:"close"}])};this.readyState==="open"?i():this.once("open",i)}write(i){this.writable=!1,Ub(i,e=>{this.doWrite(e,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let i=this.opts.secure?"https":"http",e=this.query||{};return this.opts.timestampRequests!==!1&&(e[this.opts.timestampParam]=Cd()),!this.supportsBinary&&!e.sid&&(e.b64=1),this.createUri(i,e)}};var ey=!1;try{ey=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}var ty=ey;function AO(){}var Xu=class extends Wa{constructor(i){if(super(i),typeof location<"u"){let e=location.protocol==="https:",n=location.port;n||(n=e?"443":"80"),this.xd=typeof location<"u"&&i.hostname!==location.hostname||n!==i.port}}doWrite(i,e){let n=this.request({method:"POST",data:i});n.on("success",e),n.on("error",(o,r)=>{this.onError("xhr post error",o,r)})}doPoll(){let i=this.request();i.on("data",this.onData.bind(this)),i.on("error",(e,n)=>{this.onError("xhr poll error",e,n)}),this.pollXhr=i}},Sd=(()=>{class t extends gt{constructor(e,n,o){super(),this.createRequest=e,To(this,o),this._opts=o,this._method=o.method||"GET",this._uri=n,this._data=o.data!==void 0?o.data:null,this._create()}_create(){var e;let n=yd(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;let o=this._xhr=this.createRequest(n);try{o.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){o.setDisableHeaderCheck&&o.setDisableHeaderCheck(!0);for(let r in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(r)&&o.setRequestHeader(r,this._opts.extraHeaders[r])}}catch{}if(this._method==="POST")try{o.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{o.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(o),"withCredentials"in o&&(o.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(o.timeout=this._opts.requestTimeout),o.onreadystatechange=()=>{var r;o.readyState===3&&((r=this._opts.cookieJar)===null||r===void 0||r.parseCookies(o.getResponseHeader("set-cookie"))),o.readyState===4&&(o.status===200||o.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof o.status=="number"?o.status:0)},0))},o.send(this._data)}catch(r){this.setTimeoutFn(()=>{this._onError(r)},0);return}typeof document<"u"&&(this._index=t.requestsCount++,t.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=AO,e)try{this._xhr.abort()}catch{}typeof document<"u"&&delete t.requests[this._index],this._xhr=null}}_onLoad(){let e=this._xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}return t.requestsCount=0,t.requests={},t})();if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",iy);else if(typeof addEventListener=="function"){let t="onpagehide"in Ei?"pagehide":"unload";addEventListener(t,iy,!1)}}function iy(){for(let t in Sd.requests)Sd.requests.hasOwnProperty(t)&&Sd.requests[t].abort()}var kO=function(){let t=ny({xdomain:!1});return t&&t.responseType!==null}(),tr=class extends Xu{constructor(i){super(i);let e=i&&i.forceBase64;this.supportsBinary=kO&&!e}request(i={}){return Object.assign(i,{xd:this.xd},this.opts),new Sd(ny,this.uri(),i)}};function ny(t){let i=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!i||ty))return new XMLHttpRequest}catch{}if(!i)try{return new Ei[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}var oy=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",Zu=class extends xo{get name(){return"websocket"}doOpen(){let i=this.uri(),e=this.opts.protocols,n=oy?{}:yd(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(i,e,n)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=i=>this.onClose({description:"websocket connection closed",context:i}),this.ws.onmessage=i=>this.onData(i.data),this.ws.onerror=i=>this.onError("websocket error",i)}write(i){this.writable=!1;for(let e=0;e<i.length;e++){let n=i[e],o=e===i.length-1;Ga(n,this.supportsBinary,r=>{try{this.doWrite(n,r)}catch{}o&&Eo(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){let i=this.opts.secure?"wss":"ws",e=this.query||{};return this.opts.timestampRequests&&(e[this.opts.timestampParam]=Cd()),this.supportsBinary||(e.b64=1),this.createUri(i,e)}},Ku=Ei.WebSocket||Ei.MozWebSocket,ir=class extends Zu{createSocket(i,e,n){return oy?new Ku(i,e,n):e?new Ku(i,e):new Ku(i)}doWrite(i,e){this.ws.send(e)}};var Rs=class extends xo{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(i){return this.emitReserved("error",i)}this._transport.closed.then(()=>{this.onClose()}).catch(i=>{this.onError("webtransport error",i)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(i=>{let e=Yb(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=i.readable.pipeThrough(e).getReader(),o=Qb();o.readable.pipeTo(i.writable),this._writer=o.writable.getWriter();let r=()=>{n.read().then(({done:a,value:l})=>{a||(this.onPacket(l),r())}).catch(a=>{})};r();let s={type:"open"};this.query.sid&&(s.data=`{"sid":"${this.query.sid}"}`),this._writer.write(s).then(()=>this.onOpen())})})}write(i){this.writable=!1;for(let e=0;e<i.length;e++){let n=i[e],o=e===i.length-1;this._writer.write(n).then(()=>{o&&Eo(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var i;(i=this._transport)===null||i===void 0||i.close()}};var Ju={websocket:ir,webtransport:Rs,polling:tr};var NO=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,LO=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function As(t){if(t.length>8e3)throw"URI too long";let i=t,e=t.indexOf("["),n=t.indexOf("]");e!=-1&&n!=-1&&(t=t.substring(0,e)+t.substring(e,n).replace(/:/g,";")+t.substring(n,t.length));let o=NO.exec(t||""),r={},s=14;for(;s--;)r[LO[s]]=o[s]||"";return e!=-1&&n!=-1&&(r.source=i,r.host=r.host.substring(1,r.host.length-1).replace(/;/g,":"),r.authority=r.authority.replace("[","").replace("]","").replace(/;/g,":"),r.ipv6uri=!0),r.pathNames=FO(r,r.path),r.queryKey=VO(r,r.query),r}function FO(t,i){let e=/\/{2,9}/g,n=i.replace(e,"/").split("/");return(i.slice(0,1)=="/"||i.length===0)&&n.splice(0,1),i.slice(-1)=="/"&&n.splice(n.length-1,1),n}function VO(t,i){let e={};return i.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,o,r){o&&(e[o]=r)}),e}var em=typeof addEventListener=="function"&&typeof removeEventListener=="function",Ed=[];em&&addEventListener("offline",()=>{Ed.forEach(t=>t())},!1);var Td=(()=>{class t extends gt{constructor(e,n){if(super(),this.binaryType=Xb,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e=="object"&&(n=e,e=null),e){let o=As(e);n.hostname=o.host,n.secure=o.protocol==="https"||o.protocol==="wss",n.port=o.port,o.query&&(n.query=o.query)}else n.host&&(n.hostname=As(n.host).host);To(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(o=>{let r=o.prototype.name;this.transports.push(r),this._transportsByName[r]=o}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Jb(this.opts.query)),em&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Ed.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){let n=Object.assign({},this.opts.query);n.EIO=Yu,n.transport=e,this.id&&(n.sid=this.id);let o=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](o)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}let e=this.opts.rememberUpgrade&&t.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";let n=this.createTransport(e);n.open(),this.setTransport(n)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",t.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":let n=new Error("server error");n.code=e.data,this._onError(n);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let o=0;o<this.writeBuffer.length;o++){let r=this.writeBuffer[o].data;if(r&&(n+=Kb(r)),o>0&&n>this._maxPayload)return this.writeBuffer.slice(0,o);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,Eo(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,n,o){return this._sendPacket("message",e,n,o),this}send(e,n,o){return this._sendPacket("message",e,n,o),this}_sendPacket(e,n,o,r){if(typeof n=="function"&&(r=n,n=void 0),typeof o=="function"&&(r=o,o=null),this.readyState==="closing"||this.readyState==="closed")return;o=o||{},o.compress=o.compress!==!1;let s={type:e,data:n,options:o};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),r&&this.once("flush",r),this.flush()}close(){let e=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),e()},o=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?o():e()}):this.upgrading?o():e()),this}_onError(e){if(t.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),em&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let o=Ed.indexOf(this._offlineEventListener);o!==-1&&Ed.splice(o,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,n),this.writeBuffer=[],this._prevBufferLen=0}}}return t.protocol=Yu,t})(),xd=class extends Td{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let i=0;i<this._upgrades.length;i++)this._probe(this._upgrades[i])}_probe(i){let e=this.createTransport(i),n=!1;Td.priorWebsocketSuccess=!1;let o=()=>{n||(e.send([{type:"ping",data:"probe"}]),e.once("packet",p=>{if(!n)if(p.type==="pong"&&p.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",e),!e)return;Td.priorWebsocketSuccess=e.name==="websocket",this.transport.pause(()=>{n||this.readyState!=="closed"&&(d(),this.setTransport(e),e.send([{type:"upgrade"}]),this.emitReserved("upgrade",e),e=null,this.upgrading=!1,this.flush())})}else{let h=new Error("probe error");h.transport=e.name,this.emitReserved("upgradeError",h)}}))};function r(){n||(n=!0,d(),e.close(),e=null)}let s=p=>{let h=new Error("probe error: "+p);h.transport=e.name,r(),this.emitReserved("upgradeError",h)};function a(){s("transport closed")}function l(){s("socket closed")}function c(p){e&&p.name!==e.name&&r()}let d=()=>{e.removeListener("open",o),e.removeListener("error",s),e.removeListener("close",a),this.off("close",l),this.off("upgrading",c)};e.once("open",o),e.once("error",s),e.once("close",a),this.once("close",l),this.once("upgrading",c),this._upgrades.indexOf("webtransport")!==-1&&i!=="webtransport"?this.setTimeoutFn(()=>{n||e.open()},200):e.open()}onHandshake(i){this._upgrades=this._filterUpgrades(i.upgrades),super.onHandshake(i)}_filterUpgrades(i){let e=[];for(let n=0;n<i.length;n++)~this.transports.indexOf(i[n])&&e.push(i[n]);return e}},ks=class extends xd{constructor(i,e={}){let n=typeof i=="object"?i:e;(!n.transports||n.transports&&typeof n.transports[0]=="string")&&(n.transports=(n.transports||["polling","websocket","webtransport"]).map(o=>Ju[o]).filter(o=>!!o)),super(i,n)}};var FW=ks.protocol;function ry(t,i="",e){let n=t;e=e||typeof location<"u"&&location,t==null&&(t=e.protocol+"//"+e.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=e.protocol+t:t=e.host+t),/^(https?|wss?):\/\//.test(t)||(typeof e<"u"?t=e.protocol+"//"+t:t="https://"+t),n=As(t)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";let r=n.host.indexOf(":")!==-1?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+r+":"+n.port+i,n.href=n.protocol+"://"+r+(e&&e.port===n.port?"":":"+n.port),n}var sm={};N1(sm,{Decoder:()=>om,Encoder:()=>nm,PacketType:()=>Qe,protocol:()=>dy});var HO=typeof ArrayBuffer=="function",jO=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,sy=Object.prototype.toString,qO=typeof Blob=="function"||typeof Blob<"u"&&sy.call(Blob)==="[object BlobConstructor]",zO=typeof File=="function"||typeof File<"u"&&sy.call(File)==="[object FileConstructor]";function Ya(t){return HO&&(t instanceof ArrayBuffer||jO(t))||qO&&t instanceof Blob||zO&&t instanceof File}function Qa(t,i){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let e=0,n=t.length;e<n;e++)if(Qa(t[e]))return!0;return!1}if(Ya(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return Qa(t.toJSON(),!0);for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&Qa(t[e]))return!0;return!1}function ay(t){let i=[],e=t.data,n=t;return n.data=tm(e,i),n.attachments=i.length,{packet:n,buffers:i}}function tm(t,i){if(!t)return t;if(Ya(t)){let e={_placeholder:!0,num:i.length};return i.push(t),e}else if(Array.isArray(t)){let e=new Array(t.length);for(let n=0;n<t.length;n++)e[n]=tm(t[n],i);return e}else if(typeof t=="object"&&!(t instanceof Date)){let e={};for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=tm(t[n],i));return e}return t}function ly(t,i){return t.data=im(t.data,i),delete t.attachments,t}function im(t,i){if(!t)return t;if(t&&t._placeholder===!0){if(typeof t.num=="number"&&t.num>=0&&t.num<i.length)return i[t.num];throw new Error("illegal attachments")}else if(Array.isArray(t))for(let e=0;e<t.length;e++)t[e]=im(t[e],i);else if(typeof t=="object")for(let e in t)Object.prototype.hasOwnProperty.call(t,e)&&(t[e]=im(t[e],i));return t}var GO=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],dy=5,Qe=function(t){return t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK",t}(Qe||{}),nm=class{constructor(i){this.replacer=i}encode(i){return(i.type===Qe.EVENT||i.type===Qe.ACK)&&Qa(i)?this.encodeAsBinary({type:i.type===Qe.EVENT?Qe.BINARY_EVENT:Qe.BINARY_ACK,nsp:i.nsp,data:i.data,id:i.id}):[this.encodeAsString(i)]}encodeAsString(i){let e=""+i.type;return(i.type===Qe.BINARY_EVENT||i.type===Qe.BINARY_ACK)&&(e+=i.attachments+"-"),i.nsp&&i.nsp!=="/"&&(e+=i.nsp+","),i.id!=null&&(e+=i.id),i.data!=null&&(e+=JSON.stringify(i.data,this.replacer)),e}encodeAsBinary(i){let e=ay(i),n=this.encodeAsString(e.packet),o=e.buffers;return o.unshift(n),o}};function cy(t){return Object.prototype.toString.call(t)==="[object Object]"}var om=class t extends gt{constructor(i){super(),this.reviver=i}add(i){let e;if(typeof i=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");e=this.decodeString(i);let n=e.type===Qe.BINARY_EVENT;n||e.type===Qe.BINARY_ACK?(e.type=n?Qe.EVENT:Qe.ACK,this.reconstructor=new rm(e),e.attachments===0&&super.emitReserved("decoded",e)):super.emitReserved("decoded",e)}else if(Ya(i)||i.base64)if(this.reconstructor)e=this.reconstructor.takeBinaryData(i),e&&(this.reconstructor=null,super.emitReserved("decoded",e));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+i)}decodeString(i){let e=0,n={type:Number(i.charAt(0))};if(Qe[n.type]===void 0)throw new Error("unknown packet type "+n.type);if(n.type===Qe.BINARY_EVENT||n.type===Qe.BINARY_ACK){let r=e+1;for(;i.charAt(++e)!=="-"&&e!=i.length;);let s=i.substring(r,e);if(s!=Number(s)||i.charAt(e)!=="-")throw new Error("Illegal attachments");n.attachments=Number(s)}if(i.charAt(e+1)==="/"){let r=e+1;for(;++e&&!(i.charAt(e)===","||e===i.length););n.nsp=i.substring(r,e)}else n.nsp="/";let o=i.charAt(e+1);if(o!==""&&Number(o)==o){let r=e+1;for(;++e;){let s=i.charAt(e);if(s==null||Number(s)!=s){--e;break}if(e===i.length)break}n.id=Number(i.substring(r,e+1))}if(i.charAt(++e)){let r=this.tryParse(i.substr(e));if(t.isPayloadValid(n.type,r))n.data=r;else throw new Error("invalid payload")}return n}tryParse(i){try{return JSON.parse(i,this.reviver)}catch{return!1}}static isPayloadValid(i,e){switch(i){case Qe.CONNECT:return cy(e);case Qe.DISCONNECT:return e===void 0;case Qe.CONNECT_ERROR:return typeof e=="string"||cy(e);case Qe.EVENT:case Qe.BINARY_EVENT:return Array.isArray(e)&&(typeof e[0]=="number"||typeof e[0]=="string"&&GO.indexOf(e[0])===-1);case Qe.ACK:case Qe.BINARY_ACK:return Array.isArray(e)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}},rm=class{constructor(i){this.packet=i,this.buffers=[],this.reconPack=i}takeBinaryData(i){if(this.buffers.push(i),this.buffers.length===this.reconPack.attachments){let e=ly(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};function Yi(t,i,e){return t.on(i,e),function(){t.off(i,e)}}var $O=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),Ns=class extends gt{constructor(i,e,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=i,this.nsp=e,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let i=this.io;this.subs=[Yi(i,"open",this.onopen.bind(this)),Yi(i,"packet",this.onpacket.bind(this)),Yi(i,"error",this.onerror.bind(this)),Yi(i,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...i){return i.unshift("message"),this.emit.apply(this,i),this}emit(i,...e){var n,o,r;if($O.hasOwnProperty(i))throw new Error('"'+i.toString()+'" is a reserved event name');if(e.unshift(i),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(e),this;let s={type:Qe.EVENT,data:e};if(s.options={},s.options.compress=this.flags.compress!==!1,typeof e[e.length-1]=="function"){let d=this.ids++,p=e.pop();this._registerAckCallback(d,p),s.id=d}let a=(o=(n=this.io.engine)===null||n===void 0?void 0:n.transport)===null||o===void 0?void 0:o.writable,l=this.connected&&!(!((r=this.io.engine)===null||r===void 0)&&r._hasPingExpired());return this.flags.volatile&&!a||(l?(this.notifyOutgoingListeners(s),this.packet(s)):this.sendBuffer.push(s)),this.flags={},this}_registerAckCallback(i,e){var n;let o=(n=this.flags.timeout)!==null&&n!==void 0?n:this._opts.ackTimeout;if(o===void 0){this.acks[i]=e;return}let r=this.io.setTimeoutFn(()=>{delete this.acks[i];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===i&&this.sendBuffer.splice(a,1);e.call(this,new Error("operation has timed out"))},o),s=(...a)=>{this.io.clearTimeoutFn(r),e.apply(this,a)};s.withError=!0,this.acks[i]=s}emitWithAck(i,...e){return new Promise((n,o)=>{let r=(s,a)=>s?o(s):n(a);r.withError=!0,e.push(r),this.emit(i,...e)})}_addToQueue(i){let e;typeof i[i.length-1]=="function"&&(e=i.pop());let n={id:this._queueSeq++,tryCount:0,pending:!1,args:i,flags:Object.assign({fromQueue:!0},this.flags)};i.push((o,...r)=>n!==this._queue[0]?void 0:(o!==null?n.tryCount>this._opts.retries&&(this._queue.shift(),e&&e(o)):(this._queue.shift(),e&&e(null,...r)),n.pending=!1,this._drainQueue())),this._queue.push(n),this._drainQueue()}_drainQueue(i=!1){if(!this.connected||this._queue.length===0)return;let e=this._queue[0];e.pending&&!i||(e.pending=!0,e.tryCount++,this.flags=e.flags,this.emit.apply(this,e.args))}packet(i){i.nsp=this.nsp,this.io._packet(i)}onopen(){typeof this.auth=="function"?this.auth(i=>{this._sendConnectPacket(i)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(i){this.packet({type:Qe.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},i):i})}onerror(i){this.connected||this.emitReserved("connect_error",i)}onclose(i,e){this.connected=!1,delete this.id,this.emitReserved("disconnect",i,e),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(i=>{if(!this.sendBuffer.some(n=>String(n.id)===i)){let n=this.acks[i];delete this.acks[i],n.withError&&n.call(this,new Error("socket has been disconnected"))}})}onpacket(i){if(i.nsp===this.nsp)switch(i.type){case Qe.CONNECT:i.data&&i.data.sid?this.onconnect(i.data.sid,i.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Qe.EVENT:case Qe.BINARY_EVENT:this.onevent(i);break;case Qe.ACK:case Qe.BINARY_ACK:this.onack(i);break;case Qe.DISCONNECT:this.ondisconnect();break;case Qe.CONNECT_ERROR:this.destroy();let n=new Error(i.data.message);n.data=i.data.data,this.emitReserved("connect_error",n);break}}onevent(i){let e=i.data||[];i.id!=null&&e.push(this.ack(i.id)),this.connected?this.emitEvent(e):this.receiveBuffer.push(Object.freeze(e))}emitEvent(i){if(this._anyListeners&&this._anyListeners.length){let e=this._anyListeners.slice();for(let n of e)n.apply(this,i)}super.emit.apply(this,i),this._pid&&i.length&&typeof i[i.length-1]=="string"&&(this._lastOffset=i[i.length-1])}ack(i){let e=this,n=!1;return function(...o){n||(n=!0,e.packet({type:Qe.ACK,id:i,data:o}))}}onack(i){let e=this.acks[i.id];typeof e=="function"&&(delete this.acks[i.id],e.withError&&i.data.unshift(null),e.apply(this,i.data))}onconnect(i,e){this.id=i,this.recovered=e&&this._pid===e,this._pid=e,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(i=>this.emitEvent(i)),this.receiveBuffer=[],this.sendBuffer.forEach(i=>{this.notifyOutgoingListeners(i),this.packet(i)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(i=>i()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Qe.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(i){return this.flags.compress=i,this}get volatile(){return this.flags.volatile=!0,this}timeout(i){return this.flags.timeout=i,this}onAny(i){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(i),this}prependAny(i){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(i),this}offAny(i){if(!this._anyListeners)return this;if(i){let e=this._anyListeners;for(let n=0;n<e.length;n++)if(i===e[n])return e.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(i){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(i),this}prependAnyOutgoing(i){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(i),this}offAnyOutgoing(i){if(!this._anyOutgoingListeners)return this;if(i){let e=this._anyOutgoingListeners;for(let n=0;n<e.length;n++)if(i===e[n])return e.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(i){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){let e=this._anyOutgoingListeners.slice();for(let n of e)n.apply(this,i.data)}}};function Vr(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}Vr.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var i=Math.random(),e=Math.floor(i*this.jitter*t);t=Math.floor(i*10)&1?t+e:t-e}return Math.min(t,this.max)|0};Vr.prototype.reset=function(){this.attempts=0};Vr.prototype.setMin=function(t){this.ms=t};Vr.prototype.setMax=function(t){this.max=t};Vr.prototype.setJitter=function(t){this.jitter=t};var Ls=class extends gt{constructor(i,e){var n;super(),this.nsps={},this.subs=[],i&&typeof i=="object"&&(e=i,i=void 0),e=e||{},e.path=e.path||"/socket.io",this.opts=e,To(this,e),this.reconnection(e.reconnection!==!1),this.reconnectionAttempts(e.reconnectionAttempts||1/0),this.reconnectionDelay(e.reconnectionDelay||1e3),this.reconnectionDelayMax(e.reconnectionDelayMax||5e3),this.randomizationFactor((n=e.randomizationFactor)!==null&&n!==void 0?n:.5),this.backoff=new Vr({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(e.timeout==null?2e4:e.timeout),this._readyState="closed",this.uri=i;let o=e.parser||sm;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=e.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(i){return arguments.length?(this._reconnection=!!i,i||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(i){return i===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=i,this)}reconnectionDelay(i){var e;return i===void 0?this._reconnectionDelay:(this._reconnectionDelay=i,(e=this.backoff)===null||e===void 0||e.setMin(i),this)}randomizationFactor(i){var e;return i===void 0?this._randomizationFactor:(this._randomizationFactor=i,(e=this.backoff)===null||e===void 0||e.setJitter(i),this)}reconnectionDelayMax(i){var e;return i===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=i,(e=this.backoff)===null||e===void 0||e.setMax(i),this)}timeout(i){return arguments.length?(this._timeout=i,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(i){if(~this._readyState.indexOf("open"))return this;this.engine=new ks(this.uri,this.opts);let e=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;let o=Yi(e,"open",function(){n.onopen(),i&&i()}),r=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),i?i(a):this.maybeReconnectOnOpen()},s=Yi(e,"error",r);if(this._timeout!==!1){let a=this._timeout,l=this.setTimeoutFn(()=>{o(),r(new Error("timeout")),e.close()},a);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(o),this.subs.push(s),this}connect(i){return this.open(i)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");let i=this.engine;this.subs.push(Yi(i,"ping",this.onping.bind(this)),Yi(i,"data",this.ondata.bind(this)),Yi(i,"error",this.onerror.bind(this)),Yi(i,"close",this.onclose.bind(this)),Yi(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(i){try{this.decoder.add(i)}catch(e){this.onclose("parse error",e)}}ondecoded(i){Eo(()=>{this.emitReserved("packet",i)},this.setTimeoutFn)}onerror(i){this.emitReserved("error",i)}socket(i,e){let n=this.nsps[i];return n?this._autoConnect&&!n.active&&n.connect():(n=new Ns(this,i,e),this.nsps[i]=n),n}_destroy(i){let e=Object.keys(this.nsps);for(let n of e)if(this.nsps[n].active)return;this._close()}_packet(i){let e=this.encoder.encode(i);for(let n=0;n<e.length;n++)this.engine.write(e[n],i.options)}cleanup(){this.subs.forEach(i=>i()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(i,e){var n;this.cleanup(),(n=this.engine)===null||n===void 0||n.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",i,e),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let i=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{let e=this.backoff.duration();this._reconnecting=!0;let n=this.setTimeoutFn(()=>{i.skipReconnect||(this.emitReserved("reconnect_attempt",i.backoff.attempts),!i.skipReconnect&&i.open(o=>{o?(i._reconnecting=!1,i.reconnect(),this.emitReserved("reconnect_error",o)):i.onreconnect()}))},e);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){let i=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",i)}};var Xa={};function Ka(t,i){typeof t=="object"&&(i=t,t=void 0),i=i||{};let e=ry(t,i.path||"/socket.io"),n=e.source,o=e.id,r=e.path,s=Xa[o]&&r in Xa[o].nsps,a=i.forceNew||i["force new connection"]||i.multiplex===!1||s,l;return a?l=new Ls(n,i):(Xa[o]||(Xa[o]=new Ls(n,i)),l=Xa[o]),e.query&&!i.query&&(i.query=e.queryKey),l.socket(e.path,i)}Object.assign(Ka,{Manager:Ls,Socket:Ns,io:Ka,connect:Ka});var am=class{constructor(){this.messagesSubject$=new X,this.socketNamespaceMap=new Map,this.messages$=this.messagesSubject$.pipe(Dg(),Xl(i=>{throw i}))}addSocketNamespace(i,e){let n=E({forceNew:!1,reconnectionAttempts:1/0},e);if(this.socketNamespaceMap.has(i))throw new Error(`Namespace endpoint ${i} already exists`);let o=Ka(i,n);return this.socketNamespaceMap.set(i,o),o}disconnectSocketNamespace(i){if(this.socketNamespaceMap.has(i)){let e=this.socketNamespaceMap.get(i);return e.removeAllListeners(),e.disconnect(),this.socketNamespaceMap.delete(i),!0}return!1}disconnectAllSockets(){for(let[i,e]of this.socketNamespaceMap.entries())e.removeAllListeners(),e.disconnect(),this.socketNamespaceMap.delete(i)}getSocket(i){return this.socketNamespaceMap.get(i)}},py=(()=>{class t extends am{onEvent(e,n){let o=this.socketNamespaceMap.get(n);if(!o)throw new Error(`Namespace endpoint ${n} does not exist`);return new fn(r=>{o.on(e,s=>r.next(s))})}static{this.\u0275fac=(()=>{let e;return function(o){return(e||(e=ti(t)))(o||t)}})()}static{this.\u0275prov=ne({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Pd="workspaceTabs",Fs=(()=>{class t{constructor(e,n){this.localStorageService=e,this.appConfig=n}getStoredTabs(e){return this.shouldStoreTabs()?this.localStorageService.getItemsByPrefix(this.getKey(e)):[]}storeTabs(e,n){this.shouldStoreTabs()&&this.localStorageService.setItem(this.getKey(n),JSON.stringify(e))}deleteStoredTabs(e){this.shouldStoreTabs()&&this.localStorageService.removeItem(this.getKey(e))}removeAllUndockedTabs(){if(!this.shouldStoreTabs())return;this.localStorageService.getKeysByPrefix(Pd).filter(n=>n!==Pd).forEach(n=>this.localStorageService.removeItem(n))}shouldStoreTabs(){return this.appConfig.featureFlags.storeWorkspaceTabs}getKey(e){return e?Pd+e:Pd}static{this.\u0275fac=function(n){return new(n||t)(D(Mt),D(St))}}static{this.\u0275prov=ne({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var hy="qhasPanelState",Po=(()=>{class t extends li{constructor(e,n,o,r,s){super(n,e),this.electronService=o,this.notificationService=r,this.translate=s,this.fileMap=se(new Map)}setWorkspace(e){return Y(this,null,function*(){Nn(t.prototype,this,"setWorkspace").call(this,e,hy),this.activeSubtab&&(yield this.restoreActiveSubtab())})}loadQhasByFilePath(e){return Y(this,null,function*(){try{return yield this.electronService.createStreamingFileFromPath(e)}catch(n){this.notificationService.notify({color:$i.ERROR,label:this.translate.instant("UNABLE_TO_OPEN",{filePath:e})}),console.error(`Failed to load ${e}: ${n}`)}})}updateFileMap(e,n){this.fileMap.update(o=>(o.set(e,n),o))}addSubtab(e,n){let o=super.createSubtab(ae.QHAS_REPORT,e,n);return this.updateLocalStorage(),o}removeSubtab(e){let n=super.removeSubtab(e);return this.updateLocalStorage(),n}setSubtabData(e,n=this.activeSubtab){n.data=E(E({},n.data),e),this.updateLocalStorage()}updateLocalStorage(){super.updateLocalStorage(hy)}handleQhasFile(e,n){this.addSubtab(n.name,{id:e,name:n.name,fileData:n});try{let o={id:e,report:{fileId:e,type:Vt.QHAS}};this.setSubtabData(o)}catch{this.notificationService.notify({color:$i.ERROR,label:this.translate.instant("ERRORS.CANNOT_DISPLAY_DATA")})}this.updateFileMap(e,n)}restoreActiveSubtab(){return Y(this,null,function*(){let e=this.activeSubtab.id,n=this.activeSubtab.resource.fileData.path,o=this.fileMap().get(e)??(yield this.loadQhasByFilePath(n));this.updateFileMap(e,o)})}static{this.\u0275fac=function(n){return new(n||t)(D(Ht),D(Mt),D(Xe),D(si),D(Ge))}}static{this.\u0275prov=ne({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var di=(()=>{class t{constructor(e,n,o,r,s,a,l,c,d,p,h,m,S,y,w,x,N,k,C,Q){this.zone=e,this.electronService=n,this.notificationService=o,this.performancePanelService=r,this.optracePanelService=s,this.localStorageService=a,this.spinnerService=l,this.fileService=c,this.socketService=d,this.translationService=p,this.http=h,this.router=m,this.iconService=S,this.tabStorageService=y,this.windowService=w,this.panelService=x,this.qhasPanelService=N,this.dialog=k,this.appConfig=C,this.graphPanelService=Q,this.workspaces=se([]),this.HOME=-1,this.contextMenuActions=[],this.temporaryWorkspaces=[],this.WORKSPACE_DIALOG_PREFIX="workspace.dialog.replacePanel.",this.workspaceTabs=Ie(()=>this.getWorkspaces().map(ie=>({workspaceId:ie.workspaceId,label:ie.workspaceName,link:`/workspaces/${ie.workspaceId}`,icon:this.iconService.layers,tabType:Va.PRIMARY,dismissable:!this.webServerMode(),contextMenuActions:this.contextMenuActions.map(re=>({label:re.label,command:()=>re.command(ie)}))}))),this.workspaceOpened$=new X,this.activeWorkspaceTabIndex=se(0),this.activeWorkspaceId=Ie(()=>this.workspaceTabs()[this.activeWorkspaceTabIndex()].workspaceId),this.webServerMode=se(!1),this.router.events.subscribe($=>{if(!($ instanceof us))return;let ie=this.workspaceTabs().findIndex(re=>re.link===$.url);ie>this.HOME?this.activeWorkspaceTabIndex.set(ie):this.activeWorkspaceTabIndex.set(this.HOME)}),this.useTemporaryWorkspaces=se(this.appConfig.featureFlags.useTemporaryWorkspaces),this.showSubtabs=se(this.appConfig.ui.showSubtabs),this.electronService.isRunningElectron()&&this.electronService.registerEventHandler("file-data",$=>Y(this,null,function*(){yield this.zone.run(()=>Y(this,null,function*(){this.spinnerService.stop();let ie=$.map(re=>this.fileService.createFileObject(re.data,re.filename));yield this.addNewWorkspaceAndFiles(ie)}))}))}initializeWorkspaceTabs(e){let n=this.tabStorageService.getStoredTabs(),o=(e?.size??0)===0,r=o?n:n.filter(s=>e.has(s.workspaceId));for(let s of r)this.addWorkspace(s.label,s.workspaceId);o&&this.tabStorageService.removeAllUndockedTabs()}getWorkspaces(){return this.workspaces()}addWorkspace(e,n){let o={workspaceId:n,workspaceName:e,localStorageKeySuffix:this.localStorageKeySuffix};return this.useTemporaryWorkspaces()&&this.temporaryWorkspaces.push(o),this.workspaces.update(r=>[...r,o]),o}updateWorkspace(e,n){let o={workspaceId:e,workspaceName:n,localStorageKeySuffix:this.localStorageKeySuffix};this.workspaces.update(r=>{let s=r.findIndex(a=>a.workspaceId===e);return r[s]=o,[...r]})}removeWorkspace(e){this.hideWorkspace(e),this.localStorageService.removeItem(e),this.graphPanelService.removeGraphState(e)}setContextMenuActions(e){this.contextMenuActions=e}onActiveWorkspaceTabUpdated(e){return Y(this,null,function*(){this.activeWorkspaceTabIndex.set(e),this.updateStoredTabState(),yield this.navigateTo(e)})}onWorkspaceTabClosed(e){return Y(this,null,function*(){let n=this.workspaceTabs()[e];n&&(this.removeWorkspace(n.workspaceId),this.updateStoredTabState(),this.workspaces().length===0&&(yield this.router.navigateByUrl("/")))})}updateStoredTabState(){this.tabStorageService.storeTabs(this.workspaceTabs(),this.localStorageKeySuffix)}addEmptyWorkspace(){let e=Rt(),n=this.translationService.instant(no.WORKSPACE_NAME_DEFAULT),o=this.addWorkspace(n,e);return this.updateWorkspacePanelStateInLocalStorage(e),this.panelService.setWorkspace(e),this.workspaceOpened$.next(o),o}addFilesToWorkspace(e,n){return Y(this,null,function*(){if(!e.length)return;let o=this.getWorkspaces().find(l=>l.workspaceId===n);if(!o)throw new Error(`Unable to add files to workspace - workspace ID ${n} does not exist`);let r=this.localStorageService.getItem(n),s=new Set;r&&(s=new Set([...r.displayedPanels,...r.collapsedPanels]));let a=[];for(let l of e){let c=yield this.getPanelViewType(l);if(s.has(c))a.push({file:l,panelType:c});else{let d=Rt();yield this.addFileToPanel(l,d,n,c),s.add(c)}}this.workspaceOpened$.next(o),this.windowService.setWorkspace(n);for(let{file:l,panelType:c}of a){if(!(yield this.confirmPanelReplacements(l.name,c)))continue;let p=Rt();yield this.addFileToPanel(l,p,n,c),s.add(c)}})}visualizeFilesInSeparateWorkspaces(e){return Y(this,null,function*(){if(!e.length)return;let n=[];for(let o of e){let r=yield this.getPanelViewType(o),s=Rt(),a=Rt();this.addWorkspace(o.name,a),n.push(a),yield this.addFileToPanel(o,s,a,r)}this.workspaceOpened$.next({workspaceId:n[n.length-1],workspaceName:e[e.length-1].name})})}visualizeFiles(e,n){return Y(this,null,function*(){n?yield this.addFilesToWorkspace(e,this.activeWorkspaceId()):yield this.visualizeFilesInSeparateWorkspaces(e)})}getPanelViewType(e){return Y(this,null,function*(){let n;return Mb(e.name)?n=yield Db(e):Rb(e.name)&&(n=ae.GRAPH),n||this.raiseInvalidFile(e.name,n),n})}addFileToPanel(e,n,o,r){return Y(this,null,function*(){switch(r){case ae.GRAPH:yield this.addSubtabAndVisualizeModel(o,n,e);break;case ae.OPTRACE_SUMMARY:yield this.addSubtabAndVisualizeOptrace(o,n,e);break;case ae.PERF_SUMMARY:yield this.addSubtabAndVisualizePerf(o,n,e);break;case ae.ACCURACY_SUMMARY:break;case ae.QHAS_REPORT:yield this.addSubtabAndVisualizeQhasReport(o,n,e);break}})}addSubtabAndVisualizeModel(e,n,o){return Y(this,null,function*(){this.updateWorkspacePanelStateInLocalStorage(e,ae.GRAPH),yield this.graphPanelService.setWorkspace(e),this.graphPanelService.handleModelFile(n,o)})}addSubtabAndVisualizeOptrace(e,n,o){return Y(this,null,function*(){this.updateWorkspacePanelStateInLocalStorage(e,ae.OPTRACE_SUMMARY),yield this.optracePanelService.setWorkspace(e),this.optracePanelService.handleOptraceFile(n,o)})}addSubtabAndVisualizePerf(e,n,o){return Y(this,null,function*(){this.updateWorkspacePanelStateInLocalStorage(e,ae.PERF_SUMMARY),yield this.performancePanelService.setWorkspace(e),this.performancePanelService.handlePerfFile(n,o)})}addSubtabAndVisualizeQhasReport(e,n,o){return Y(this,null,function*(){this.updateWorkspacePanelStateInLocalStorage(e,ae.QHAS_REPORT),yield this.qhasPanelService.setWorkspace(e),this.qhasPanelService.handleQhasFile(n,o)})}raiseInvalidFile(e,n){let o=n?"INVALID_FILE":"UNSUPPORTED_FILE_TYPE";throw this.notificationService.notify({color:$i.ERROR,label:this.translationService.instant(o,{filename:e}),autoHide:!1}),new Error("Invalid visualized file request")}confirmPanelReplacements(e,n){return Y(this,null,function*(){let o={title:this.translationService.instant(this.WORKSPACE_DIALOG_PREFIX+"title"),description:this.translationService.instant(this.WORKSPACE_DIALOG_PREFIX+"description",{filename:e,panelType:n}),isAcceptButtonPositive:!0,acceptButtonText:this.WORKSPACE_DIALOG_PREFIX+"acceptButton"},r=this.dialog.open(Pb,{data:o,width:"35rem"});return(yield wg(r.afterClosed())).isConfirmed})}updateWorkspacePanelStateInLocalStorage(e,n){let o=this.localStorageService.getItem(e),r=new Set(o?.displayedPanels||[]),s=new Set(o?.collapsedPanels||[]);n&&(r.add(n),s.delete(n));let a=ee(E({},o),{displayedPanels:Array.from(r),collapsedPanels:Array.from(s)});this.localStorageService.setItem(e,JSON.stringify(a))}clearTemporaryWorkspaces(){for(let e of this.temporaryWorkspaces)this.removeWorkspace(e.workspaceId)}initializePanelWebsocket(e){let n=`http://${window.location.host}/`;this.socketService.addSocketNamespace(n,e).on("file-data",(r,s={use_same_workspace:!0})=>{let a=r.map(l=>is(()=>this.http.get(l.load_url,{responseType:"blob"})));this.spinnerService.wait(),Ql(a).pipe(Fn(1)).subscribe({next:l=>Y(this,null,function*(){return yield this.visualizeFilesRequest(l,r,s.use_same_workspace)}),complete:()=>this.spinnerService.stop()})})}undockWorkspace(e){if(!this.electronService.isRunningElectron())return;let n=Rt(),o=this.copyWorkspaceToUndockedLocalStorage(n,e);if(!o){this.notificationService.notify({color:$i.ERROR,label:this.translationService.instant(no.WORKSPACE_ERROR_COULD_NOT_UNDOCK),autoHide:!1});return}window.electronAPI.createUndockedWindow(JSON.stringify(o))}copyWorkspaceToUndockedLocalStorage(e,n){let o=this.workspaceTabs().find(a=>a.workspaceId===n);if(!o)return;let r=ee(E({},o),{workspaceId:e});this.tabStorageService.storeTabs([r],e);let s=this.localStorageService.getItem(n);return this.localStorageService.setItem(e,JSON.stringify(s)),r}hideWorkspace(e){this.workspaces.update(n=>n.filter(o=>o.workspaceId!==e))}navigateTo(e){return Y(this,null,function*(){if(e!==this.HOME){let n=this.workspaceTabs()[e];yield this.router.navigateByUrl(n.link)}else yield this.router.navigateByUrl("/")})}visualizeFilesRequest(e,n,o){return Y(this,null,function*(){let r=e.map((s,a)=>new File([s],n[a].filename));o?yield this.addNewWorkspaceAndFiles(r):yield this.visualizeFilesInSeparateWorkspaces(r)})}addNewWorkspaceAndFiles(e){return Y(this,null,function*(){let n=Rt();this.addWorkspace(e[0].name,n),yield this.addFilesToWorkspace(e,n)})}static{this.\u0275fac=function(n){return new(n||t)(D(Je),D(Xe),D(si),D(wo),D(So),D(Mt),D(Ms),D(_d),D(py),D(Wn),D(ds),D(Go),D(Ce),D(Fs),D(Si),D(li),D(Po),D(Zn),D(St),D(bt))}}static{this.\u0275prov=ne({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var WO=["fileUpload"];function QO(t,i){if(t&1){let e=Z();f(0,"q-dropdown",3),q(1),z(2,"translate"),g(),f(3,"input",4,0),I("change",function(o){R(e);let r=v();return A(r.onSelectFiles(o))}),g()}if(t&2){let e=v();b("items",e.addOperations),u(),le(" ",G(2,3,"ADD")," "),u(2),b("accept",e.ACCEPTED_VISUALIZE_FILE_TYPES)}}var uy=(()=>{class t{constructor(e,n,o,r,s,a,l){this.darkModeService=e,this.translate=n,this.electronService=o,this.appConfig=r,this.router=s,this.workspaceService=a,this.iconService=l,this.isWorkspaceView=uv(this.router.events.pipe(vi(c=>c instanceof us),Kt(()=>this.router.url!=="/"))),this.ACCEPTED_VISUALIZE_FILE_TYPES=gd,this.addOperations=[{label:this.translate.instant("WORKSPACES.ADD_FILES_TO_WORKSPACE"),command:()=>this.initializeFilesUpload(!1)},{label:this.translate.instant("WORKSPACES.ADD_FILES_TO_NEW_WORKSPACE"),command:()=>this.initializeFilesUpload(!0)}],this.showAddFiles=Ie(()=>this.appConfig.ui.showAddFiles&&!this.workspaceService.webServerMode()&&this.isWorkspaceView())}initializeFilesUpload(e){this.addToNewWorkspace=e,this.fileUpload.nativeElement.click()}onSelectFiles(e){return Y(this,null,function*(){let n=Array.from(e.target.files);this.addToNewWorkspace?yield this.workspaceService.addNewWorkspaceAndFiles(n):yield this.workspaceService.visualizeFiles(n,!0),this.fileUpload.nativeElement.value=""})}toggleTheme(){this.darkModeService.toggle()}openDocs(){let e="https://docs.qualcomm.com/bundle/publicresource/topics/80-87189-1/overview.html";this.electronService.isRunningElectron()?this.electronService.send("openExternal",e):window.open(e,"_blank")}static{this.\u0275fac=function(n){return new(n||t)(_(Uo),_(Ge),_(Xe),_(St),_(Go),_(di),_(Ce))}}static{this.\u0275cmp=F({type:t,selectors:[["app-horizontal-nav"]],viewQuery:function(n,o){if(n&1&&Ee(WO,5),n&2){let r;me(r=fe())&&(o.fileUpload=r.first)}},standalone:!0,features:[B],decls:5,vars:5,consts:[["fileUpload",""],["id","right-side-nav",1,"border-left"],[3,"click","icon","qTooltip"],["color","primary","variant","fill","placement","bottom-end",3,"items"],["hidden","","type","file","multiple","",3,"change","accept"]],template:function(n,o){n&1&&(f(0,"div",1),T(1,QO,5,5),f(2,"q-icon-button",2),z(3,"translate"),I("click",function(){return o.openDocs()}),g(),M(4,"app-theme-toggle-icon"),g()),n&2&&(u(),L(o.showAddFiles()?1:-1),u(),b("icon",o.iconService.fileText)("qTooltip",G(3,3,"OPEN_DOCS")))},dependencies:[mt,be,Ne,mv,gv,fv,Le,st,f_,Dt,Ve,Ft,fs,Lv],styles:["[_nghost-%COMP%]{display:flex;align-items:center}#right-side-nav[_ngcontent-%COMP%]{background:var(--qds-background-neutral-3);gap:.25rem;display:flex;align-items:center;border-left:1px solid var(--qds-border-subtle-1);height:100%;padding:0 1.5rem}.nav-link[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center;justify-content:center;padding-right:.75rem} .q-badge--root.q-size-s.q-kind-counter{padding:1px .25rem;font-size:.56rem;height:.625rem;width:.625rem}.border-left[_ngcontent-%COMP%]{border-left:1px solid var(--qds-border-default-1)}"]})}}return t})();function dm(t){return function(e){let n=e?.value?.toString()||"";return n?n.trim().length>=t?void 0:{minlength:{requiredLength:t}}:void 0}}var g6=nn.pattern("^([1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$"),_6=nn.pattern(/^\S*$/),v6=[nn.required,nn.pattern("^[0-9]\\d{0,9}(\\.\\d{1,20})?%?$")],my=[dm(4),nn.maxLength(255)];function fy(t=3){return[dm(t)]}var gy={COMMON_SAVE:"common.save.label"};var Vs=(()=>{class t{constructor(e){this.translateService=e}getFormStateError(e,n,o){let r=e?.controls[n];if(!r||r.untouched||!r.errors)return"";let s=this.translateService.instant(o??"VALIDATION.REQUIRED");if(r.value==null)return s;switch(Object.keys(r.errors)[0].toLowerCase()){case"minlength":let a=r.errors.minlength.requiredLength;return this.translateService.instant(o??"VALIDATION.MIN_LENGTH").replace("<LENGTH>",a);case"maxlength":let l=r.errors.maxlength.requiredLength;return this.translateService.instant(o??"VALIDATION.MAX_LENGTH").replace("<LENGTH>",l);case"max":return this.translateService.instant(o??"VALIDATION.MAX");case"min":return this.translateService.instant(o??"VALIDATION.MIN");case"email":return this.translateService.instant(o??"VALIDATION.EMAIL");case"pattern":let c=r.errors.pattern,d=`${this.translateService.instant("VALIDATION.PATTERN")} "${c.requiredPattern}"`;return o?this.translateService.instant(o):d;case"required":return s;case"jsoninvalid":return this.translateService.instant(o??"VALIDATION.INVALID_JSON");case"duplicate":return this.translateService.instant(o??"VALIDATION.DUPLICATE");default:return this.translateService.instant(o??"VALIDATION.INVALID")}}static{this.\u0275fac=function(n){return new(n||t)(D(Wn))}}static{this.\u0275prov=ne({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var _y=(()=>{class t{constructor(e){this.errorHandlerService=e}static{this.\u0275fac=function(n){return new(n||t)(_(Vs))}}static{this.\u0275cmp=F({type:t,selectors:[["app-edit-workspace-dialog"]],inputs:{workspaceForm:"workspaceForm"},standalone:!0,features:[B],decls:4,vars:6,consts:[[3,"formGroup"],[1,"margin-bottom","d-flex","align-items-center","gap-8"],["data-testid","input-workspaceName","size","s","formControlName","name","fullWidth","","qTooltipAppendTo","host","tooltipPosition","top-start",1,"d-flex","justify-content-end","align-items-flex-start",3,"label","error","autofocus"]],template:function(n,o){n&1&&(f(0,"form",0)(1,"div",1),M(2,"q-text-input",2),z(3,"translate"),g()()),n&2&&(b("formGroup",o.workspaceForm),u(2),b("label",G(3,4,"NAME"))("error",o.errorHandlerService.getFormStateError(o.workspaceForm,"name"))("autofocus","autofocus"))},dependencies:[_t,gc,Qt,fc,zo,_c,vc,zt,on,be,Ne]})}}return t})();var vy=(()=>{class t{constructor(e){this.appConfig=e}onDragStart(){!this.isRunningElectron()||!this.appConfig.featureFlags.workspaces.allowDragAndDropOntoExistingWindows||window.electronAPI.requestWorkspaceDropzones()}onSendWorkspaceDropZone(e){this.isRunningElectron()&&window.electronAPI.onSendWorkspaceDropZone(e)}registerWorkspaceDropzone(e){this.isRunningElectron()&&window.electronAPI.registerWorkspaceDropzone(e)}sendDropZone(e){if(!this.isRunningElectron())return;let{top:n,bottom:o,right:r,left:s}=e.nativeElement.getBoundingClientRect(),a=window.devicePixelRatio,l={top:window.screenY+n*a,bottom:window.screenY+o*a,left:window.screenX+s*a,right:window.screenX+r*a};window.electronAPI.registerWorkspaceDropzone(l)}isRunningElectron(){return!!(window&&window.electronAPI)}static{this.\u0275fac=function(n){return new(n||t)(D(St))}}static{this.\u0275prov=ne({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var JO=["workspaceNav"],eI=["editWorkspaceDialog"],tI=["*"],iI=()=>({exact:!0});function nI(t,i){if(t&1&&(f(0,"div",7),M(1,"q-icon-button",11),g()),t&2){let e=v(2);b("routerLinkActiveOptions",Ye(2,iI)),u(),b("icon",e.iconService.home)}}function oI(t,i){if(t&1){let e=Z();f(0,"div",10)(1,"q-icon-button",12),I("click",function(){R(e);let o=v(2);return A(o.workspaceService.addEmptyWorkspace())}),g()()}if(t&2){let e=v(2);u(),b("icon",e.iconService.plus)}}function rI(t,i){if(t&1){let e=Z();T(0,nI,2,3,"div",7),f(1,"nav",8)(2,"app-draggable-tabs",9),I("activeTabUpdated",function(o){R(e);let r=v();return A(r.workspaceService.onActiveWorkspaceTabUpdated(o))})("tabClosed",function(o){R(e);let r=v();return A(r.workspaceService.onWorkspaceTabClosed(o))})("tabDroppedOutsideBoundary",function(o){R(e);let r=v();return A(r.triggerUndock(o))})("tabDragging",function(){R(e);let o=v();return A(o.workspaceDragStart())}),g()(),T(3,oI,2,1,"div",10)}if(t&2){let e=v(),n=ue(8);L(e.showHome()?0:-1),u(),b("tabPanel",n),u(),b("activeTabIndex",e.workspaceService.activeWorkspaceTabIndex())("tabData",e.workspaceService.workspaceTabs())("size",e.size),u(),L(!e.workspaceService.webServerMode()&&e.showAddEmptyWorkspace?3:-1)}}function sI(t,i){if(t&1&&M(0,"app-edit-workspace-dialog",13),t&2){let e=v();b("workspaceForm",e.editWorkspaceForm)}}var by=(()=>{class t{constructor(e,n,o,r,s,a,l,c){this.workspaceService=e,this.iconService=n,this.dragAndDropWorkspaceService=o,this.electronService=r,this.notificationService=s,this.translationService=a,this.dialog=l,this.appConfig=c,this.size=Is.LARGE,this.showWorkspaces=this.appConfig.ui.showWorkspaces,this.showAddEmptyWorkspace=this.appConfig.ui.workspaces.showAddEmptyWorkspace,this.showHome=Ie(()=>this.workspaceService.webServerMode()?!1:this.appConfig.ui.showHome)}ngOnInit(){let e=[{label:this.translationService.instant(no.WORKSPACE_MENU_OPTION_RENAME),command:n=>this.openEditWorkspaceNameDialog(n)}];this.electronService.isRunningElectron()&&e.push({label:this.translationService.instant(no.WORKSPACE_MENU_OPTION_UNDOCK),command:n=>Y(this,null,function*(){let o=this.workspaceService.workspaceTabs().findIndex(r=>r.workspaceId===n.workspaceId);this.workspaceService.undockWorkspace(n.workspaceId),yield this.workspaceService.onWorkspaceTabClosed(o),yield this.workspaceService.onActiveWorkspaceTabUpdated(this.getNextActiveTab(o))})}),this.workspaceService.setContextMenuActions(e)}triggerUndock(e){return Y(this,null,function*(){if(!e.workspaceId){this.notificationService.notify({color:$i.ERROR,label:this.translationService.instant(no.WORKSPACE_ERROR_COULD_NOT_UNDOCK),autoHide:!1});return}this.workspaceService.undockWorkspace(e.workspaceId),yield this.closeWorkspaceTab(e)})}workspaceDragStart(){this.dragAndDropWorkspaceService.onDragStart()}onOpenWorkspace(e){if(!e.workspaceId){this.notificationService.notify({color:$i.ERROR,label:this.translationService.instant(no.WORKSPACE_ERROR_COULD_NOT_OPEN),autoHide:!1});return}let n=this.workspaceService.addWorkspace(e.label??no.WORKSPACE_NAME_DEFAULT,e.workspaceId);this.workspaceService.workspaceOpened$.next(n)}closeWorkspaceTab(e){return Y(this,null,function*(){let n=this.workspaceService.workspaceTabs().findIndex(r=>r.workspaceId===e.workspaceId),o=this.getNextActiveWorkspaceIndex(n);yield this.workspaceService.onWorkspaceTabClosed(n),yield this.workspaceService.onActiveWorkspaceTabUpdated(o)})}getNextActiveWorkspaceIndex(e){let n=this.workspaceService.activeWorkspaceTabIndex();return e===this.workspaceService.activeWorkspaceTabIndex()?this.workspaceService.workspaceTabs().length?e-1:e:e<n?n-1:n}openEditWorkspaceNameDialog(e){this.editWorkspaceForm=new r_({name:new _a(e.workspaceName,[nn.required,...my])});let n=this.dialog.open(io,{data:{title:this.translationService.instant(no.WORKSPACE_MENU_OPTION_RENAME),showDialogActions:!0,dismissable:!0,acceptButtonText:this.translationService.instant(gy.COMMON_SAVE),isAcceptButtonPositive:!0,dialogAcceptedClosedCallback:r=>{r?.accepted&&(this.workspaceService.updateWorkspace(e.workspaceId,this.editWorkspaceForm.get("name").value),this.workspaceService.updateStoredTabState()),o.unsubscribe()}},width:"35rem"}),o=this.editWorkspaceForm.valueChanges.subscribe(()=>n.componentInstance.disableSubmit=this.editWorkspaceForm.invalid);n.componentInstance.modalContentTemplate=this.editWorkspaceDialog}getNextActiveTab(e){let n=this.workspaceService.activeWorkspaceTabIndex();return e===n?e===this.workspaceService.workspaceTabs().length?e-1:e:e<n?n-1:n}ngAfterViewInit(){this.electronService.isRunningElectron()&&(window.electronAPI.onSendWorkspaceDropZone(()=>this.dragAndDropWorkspaceService.sendDropZone(this.workspaceNav)),window.electronAPI.onOpenWorkspace(this.onOpenWorkspace.bind(this)))}static{this.\u0275fac=function(n){return new(n||t)(_(di),_(Ce),_(vy),_(Xe),_(si),_(Ge),_(Zn),_(St))}}static{this.\u0275cmp=F({type:t,selectors:[["app-main-nav"]],viewQuery:function(n,o){if(n&1&&(Ee(JO,7),Ee(eI,5)),n&2){let r;me(r=fe())&&(o.workspaceNav=r.first),me(r=fe())&&(o.editWorkspaceDialog=r.first)}},standalone:!0,features:[B],ngContentSelectors:tI,decls:12,vars:1,consts:[["workspaceNav",""],["tabPanel",""],["editWorkspaceDialog",""],[1,"d-flex","flex-column"],[1,"nav-wrapper","d-flex","justify-content-between","align-items-stretch"],[1,"horizontal-nav-container"],[1,"d-flex","flex-grow-1","flex-column","overflow-hidden","outlet"],["id","home","routerLink","/","routerLinkActive","active",3,"routerLinkActiveOptions"],["mat-tab-nav-bar","","backgroundColor","primary",3,"tabPanel"],[3,"activeTabUpdated","tabClosed","tabDroppedOutsideBoundary","tabDragging","activeTabIndex","tabData","size"],[1,"d-flex","align-items-center"],["data-testid","btn-home",3,"icon"],["data-testid","btn-add-empty-workspace",3,"click","icon"],[3,"workspaceForm"]],template:function(n,o){n&1&&(It(),f(0,"div",3,0)(2,"div",4),T(3,rI,4,6),f(4,"div",5),M(5,"app-horizontal-nav"),g()()(),ct(6),f(7,"mat-tab-nav-panel",6,1),M(9,"router-outlet"),g(),T(10,sI,1,1,"ng-template",null,2,ke)),n&2&&(u(3),L(o.showWorkspaces?3:-1))},dependencies:[Ds,Ve,Ft,uy,p_,h_,mt,Ts,ou,M0,d_,_t,_y],styles:[".nav-wrapper[_ngcontent-%COMP%]{background:var(--qds-background-neutral-3);height:2.5rem;border-bottom:solid 1px var(--qds-border-subtle-1)}.nav-wrapper[_ngcontent-%COMP%] > nav[_ngcontent-%COMP%]{margin-bottom:-1px;flex:0 1 auto} .mat-mdc-tab-links{height:100%}.outlet[_ngcontent-%COMP%]{background:var(--qds-background-neutral-2)}#home[_ngcontent-%COMP%]{display:flex;align-items:center;border-right:1px solid var(--qds-border-default-1);background:var(--qds-background-neutral-3)}#home.active[_ngcontent-%COMP%]{background:var(--qds-background-neutral-2);margin-bottom:-1px}#home[_ngcontent-%COMP%] .q-icon-button--root[_ngcontent-%COMP%]{height:100%}.horizontal-nav-container[_ngcontent-%COMP%]{flex-grow:1;justify-content:flex-end;display:flex}"]})}}return t})();var yy=(()=>{class t{toggleGraphPanel(e){e.preventDefault(),this.panelService.togglePanel(ae.GRAPH)}constructor(e){this.panelService=e}static{this.\u0275fac=function(n){return new(n||t)(_(li))}}static{this.\u0275cmp=F({type:t,selectors:[["app-shortcuts"]],hostBindings:function(n,o){n&1&&I("keydown.control.g",function(s){return o.toggleGraphPanel(s)},!1,Jl)},standalone:!0,features:[B],decls:0,vars:0,template:function(n,o){}})}}return t})();function aI(t,i){t&1&&(f(0,"div",2),q(1),z(2,"translate"),g()),t&2&&(u(),le(" ",G(2,1,i)," "))}function lI(t,i){if(t&1&&(f(0,"div",0),M(1,"q-progress-circle",1),T(2,aI,3,3,"div",2),z(3,"async"),g()),t&2){let e,n=v();u(2),L((e=G(3,1,n.spinnerService.getLoadingMessage()))?2:-1,e)}}var Cy=(()=>{class t{constructor(e){this.spinnerService=e}static{this.\u0275fac=function(n){return new(n||t)(_(Ms))}}static{this.\u0275cmp=F({type:t,selectors:[["app-spinner"]],standalone:!0,features:[B],decls:2,vars:3,consts:[[1,"overlay-spinner"],["size","l","hostDisplay","block"],[1,"q-font-body-sm","q-text-1-primary"]],template:function(n,o){n&1&&(T(0,lI,4,3,"div",0),z(1,"async")),n&2&&L(G(1,1,o.spinnerService.getLoadingStatus())?0:-1)},dependencies:[Ci,zi,ss,be,Ne],styles:['.overlay-spinner[_ngcontent-%COMP%]{position:fixed;z-index:1000000;height:100%;width:100%;overflow:visible;margin:auto;inset:0;display:flex;justify-content:center;flex-direction:column;align-items:center}.overlay-spinner[_ngcontent-%COMP%]:before{content:"";position:fixed;width:100%;height:100%;top:0;left:0;background-color:#0000004d}']})}}return t})();var cI=["menuBar"],dI=["iframeContainer"];function pI(t,i){if(t&1){let e=Z();f(0,"app-menu-bar",6,1),I("windowClosed",function(){R(e);let o=v();return A(o.onWindowClosed())}),g()}if(t&2){let e=v();b("showCloseOnly",e.showCloseOnly)}}var wy=(()=>{class t{constructor(e,n,o,r,s,a,l,c,d){this.menuService=e,this.windowService=n,this.tabStorageService=o,this.appConfig=r,this.graphPanelService=s,this.electronService=a,this.qNotificationService=l,this.iconService=c,this.workspaceService=d,this.size=Is.LARGE,this.qNotificationService.setConfig({position:{vertical:{position:"bottom"}}}),this.showCloseOnly=this.appConfig.ui.showCloseOnlyInMenuBar,this.showWorkspaces=this.appConfig.ui.showWorkspaces}ngOnInit(){this.menuService.registerMenuHandlers(),this.workspaceService.workspaceOpened$.subscribe(n=>Y(this,[n],function*({workspaceId:e}){let o=this.workspaceService.workspaceTabs().findIndex(r=>r.workspaceId===e);yield this.workspaceService.onActiveWorkspaceTabUpdated(o)})),this.showWorkspaces&&this.loadWorkspaces()}loadWorkspaces(){this.electronService.isRunningElectron()&&this.appConfig.environment.platform!=="electron-undocked"&&this.workspaceService.initializeWorkspaceTabs()}onWindowClosed(){this.appConfig.environment.platform==="electron-undocked"&&this.removeWorkspacesFromLocalStorage(),window.electronAPI.closeWindow()}ngAfterViewInit(){this.electronService.isRunningElectron()&&setTimeout(()=>this.menuBar.translateMenuItems()),this.windowService.translateTabs(),this.graphPanelService.iframeContainer=this.iframeContainer.nativeElement}removeWorkspacesFromLocalStorage(){this.workspaceService.getWorkspaces().length===0&&this.workspaceService.initializeWorkspaceTabs(new Set([this.windowService.workspaceId()]));let e=this.workspaceService.getWorkspaces()?.[0]?.localStorageKeySuffix;this.workspaceService.getWorkspaces().map(o=>o.workspaceId).forEach(o=>this.workspaceService.removeWorkspace(o)),e&&this.tabStorageService.deleteStoredTabs(e)}beforeUnloadHandler(){this.appConfig.featureFlags.useTemporaryWorkspaces&&this.workspaceService.clearTemporaryWorkspaces()}static{this.\u0275fac=function(n){return new(n||t)(_(Ht),_(Si),_(Fs),_(St),_(bt),_(Xe),_(si),_(Ce),_(di))}}static{this.\u0275cmp=F({type:t,selectors:[["app-root"]],viewQuery:function(n,o){if(n&1&&(Ee(cI,5),Ee(dI,5)),n&2){let r;me(r=fe())&&(o.menuBar=r.first),me(r=fe())&&(o.iframeContainer=r.first)}},hostBindings:function(n,o){n&1&&I("beforeunload",function(s){return o.beforeUnloadHandler(s)},!1,Jl)},standalone:!0,features:[B],decls:9,vars:1,consts:[["iframeContainer",""],["menuBar",""],["id","app-container",1,"h-100","d-flex","flex-column"],[3,"showCloseOnly"],[1,"h-100","d-flex","flex-column","overflow-hidden"],[1,"iframe-container"],[3,"windowClosed","showCloseOnly"]],template:function(n,o){n&1&&(Vi(0),M(1,"qui-root")(2,"app-shortcuts"),f(3,"div",2),T(4,pI,2,1,"app-menu-bar",3),f(5,"app-main-nav",4),M(6,"div",5,0),g(),M(8,"app-spinner"),g(),Bi()),n&2&&(u(4),L(o.electronService.isRunningElectron()?4:-1))},dependencies:[Mc,Ev,yy,Tb,Cy,Ts,Ve,Le,be,mt,by]})}}return t})();var Sy=(()=>{class t{constructor(){this.fileDropped=new de}onDragOver(e){e.preventDefault(),e.stopPropagation(),this.fileOver=!0}onDragLeave(e){e.preventDefault(),e.stopPropagation(),this.fileOver=!1}onDrop(e){e.preventDefault(),e.stopPropagation(),this.fileOver=!1;let n=Array.from(e.dataTransfer.files);n.length&&this.fileDropped.emit(n)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275dir=Se({type:t,selectors:[["","appDragAndDrop",""]],hostVars:2,hostBindings:function(n,o){n&1&&I("dragover",function(s){return o.onDragOver(s)})("dragleave",function(s){return o.onDragLeave(s)})("drop",function(s){return o.onDrop(s)}),n&2&&Fe("fileover",o.fileOver)},outputs:{fileDropped:"fileDropped"},standalone:!0})}}return t})();var hI=()=>["align-self-center"];function uI(t,i){t&1&&He(0)}function mI(t,i){if(t&1&&(f(0,"div",3),M(1,"q-inline-alert",11),g()),t&2){let e=v();u(),b("label",e.infoText)}}function fI(t,i){if(t&1&&M(0,"q-icon",12)(1,"br"),t&2){let e=v();b("icon",e.iconService.squareDashedMousePointer)}}function gI(t,i){if(t&1&&(f(0,"div",5),q(1),z(2,"translate"),g()),t&2){let e=v();u(),Te(G(2,1,e.title))}}var Od=(()=>{class t{constructor(e,n,o){this.translateService=e,this.iconService=n,this.errorHandlerService=o,this.title="LANDING_PAGE.SELECT_FILE_FOLDERS",this.subtitle="LANDING_PAGE.DROP_YOUR_FILES",this.folderOnlySelection=!1,this.showIcon=!1,this.fileLoaded=new de,this.lucideIconSizes=Fa,this.formattedBytes=Ob,this.fileList$=new it([])}ngOnInit(){this.fileList$.pipe(Kt(e=>e.map(n=>({name:n.name,size:n.size,lastModified:n.lastModified})))),this.fileExtension?this.fileExtension=this.fileExtension[0]==="."?this.fileExtension:"."+this.fileExtension:this.folderOnlySelection||(this.fileExtension=gd),this.subtext=this.subtext??this.translateService.instant("LANDING_PAGE.DROP_YOUR_FILES")}onFileDropped(e){let n=this.fileList$.getValue(),o=e.filter(r=>[...zu,...Ha].includes(r.name.substring(r.name.lastIndexOf("."))));this.fileList$.next([...n,...o]),this.fileLoaded.emit(this.fileList$.value)}onFileSelected(e){let n=Array.from(e.target.files);this.fileList$.next(n),this.fileLoaded.emit(this.fileList$.value)}static{this.\u0275fac=function(n){return new(n||t)(_(Wn),_(Ce),_(Vs))}}static{this.\u0275cmp=F({type:t,selectors:[["app-file-dropper"]],inputs:{title:"title",subtitle:"subtitle",infoText:"infoText",subtext:"subtext",fileExtension:"fileExtension",folderOnlySelection:"folderOnlySelection",modelTypeTemplateRef:"modelTypeTemplateRef",menu:"menu",showIcon:"showIcon"},outputs:{fileLoaded:"fileLoaded"},standalone:!0,features:[B],decls:17,vars:21,consts:[["fileUpload",""],[4,"ngTemplateOutlet"],[1,"dropper","d-flex","h-100"],[1,"mb-16"],["data-testid","section-file-drop-area","appDragAndDrop","",1,"items-display","d-flex","flex-column","flex-grow-1","justify-content-center","align-items-center",3,"fileDropped"],[1,"q-font-heading-sm","title"],[1,"d-flex"],[1,"drop-files-text"],["size","s","qTooltipArrow","","qTooltipPlacement","right",1,"ml-8","info-icon-color",3,"icon","qTooltip"],["hidden","true","multiple","","type","file","onclick","this.value=null",3,"change","accept"],["data-testid","btn-upload-file","color","primary","variant","fill",3,"click","startIcon","disabled"],["color","informative",3,"label"],["size","35",1,"upload-icon",3,"icon"]],template:function(n,o){if(n&1){let r=Z();T(0,uI,1,0,"ng-container",1),f(1,"div",2),T(2,mI,2,1,"div",3),f(3,"div",4),I("fileDropped",function(a){return R(r),A(o.onFileDropped(a))}),T(4,fI,2,1)(5,gI,3,3,"div",5),f(6,"div",6)(7,"p",7),q(8),z(9,"translate"),g(),M(10,"q-icon",8),z(11,"translate"),g(),f(12,"input",9,0),I("change",function(a){return R(r),A(o.onFileSelected(a))}),g(),f(14,"q-button",10),I("click",function(a){R(r);let l=ue(13);return A(o.menu?o.menu.toggle(a):l.click())}),q(15),z(16,"translate"),g()()()}n&2&&(b("ngTemplateOutlet",o.modelTypeTemplateRef),u(2),L(o.infoText?2:-1),u(2),L(o.showIcon?4:-1),u(),L(o.title?5:-1),u(3),Te(G(9,14,o.subtext)),u(2),Pi(Ye(20,hI)),b("icon",o.iconService.info)("qTooltip",G(11,16,"LANDING_PAGE.SUPPORTED_FORMATS")),u(2),b("accept",o.fileExtension),et("webkitdirectory",o.folderOnlySelection?!0:null),u(2),b("startIcon",o.iconService.filePlus2)("disabled",o.folderOnlySelection&&o.fileList$.value.length>0),u(),le(" ",G(16,18,"LANDING_PAGE.SELECT_FROM_COMPUTER")," "))},dependencies:[zo,zt,Sy,Dt,qi,Lt,Yt,Rc,be,Ne,oi,Ko,Xo,Gi,Le,st],styles:[`.subtext-size[_ngcontent-%COMP%]{font-size:.7em}.items-display[_ngcontent-%COMP%]{border-radius:.45rem;background-image:url("data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' rx='8' ry='8' stroke='%234076FF' stroke-width='2' stroke-dasharray='2%2c5' stroke-dashoffset='13' stroke-linecap='square'/%3e%3c/svg%3e");padding:2.5rem 0}.drop-files-text[_ngcontent-%COMP%]{margin:.75rem 0}.fileover[_ngcontent-%COMP%]{opacity:.6}.subtitle[_ngcontent-%COMP%]{font-size:.9rem}.upload-icon[_ngcontent-%COMP%]{color:var(--q-text-1-primary)}.info-text[_ngcontent-%COMP%]{color:var(--qds-status-informative)}.title[_ngcontent-%COMP%]{color:var(--q-text-1-primary)}p[_ngcontent-%COMP%]{color:var(--q-text-1-secondary)}.dropper[_ngcontent-%COMP%]{background:var(--qds-background-neutral-3);border-radius:.45rem}`]})}}return t})();var Ey=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=F({type:t,selectors:[["app-welcome"]],standalone:!0,features:[B],decls:8,vars:6,consts:[[1,"d-flex","flex-column","justify-content-center","align-items-center","mb-24"],["src","./assets/images/icon.png","alt","Logo",1,"scaled-image"]],template:function(n,o){n&1&&(f(0,"div",0),M(1,"img",1),f(2,"h1"),q(3),z(4,"translate"),g(),f(5,"p"),q(6),z(7,"translate"),g()()),n&2&&(u(3),le(" ",G(4,2,"LANDING_PAGE.WELCOME")," "),u(3),le(" ",G(7,4,"LANDING_PAGE.OVERVIEW")," "))},dependencies:[mt,be,Ne],styles:["p[_ngcontent-%COMP%]{color:var(--q-text-1-secondary)}.scaled-image[_ngcontent-%COMP%]{width:6rem;height:auto;margin-bottom:1.5rem}"]})}}return t})();var Ty=(()=>{class t{constructor(e){this.workspaceService=e}onFileLoaded(e){return Y(this,null,function*(){yield this.workspaceService.visualizeFiles(e,!1)})}static{this.\u0275fac=function(n){return new(n||t)(_(di))}}static{this.\u0275cmp=F({type:t,selectors:[["app-home-page"]],standalone:!0,features:[B],decls:5,vars:0,consts:[[1,"d-flex","flex-column","landing-page"],[3,"fileLoaded"],[1,"footer"],["src","./assets/images/qualcomm-logo.png","alt","Logo"]],template:function(n,o){n&1&&(f(0,"div",0),M(1,"app-welcome"),f(2,"app-file-dropper",1),I("fileLoaded",function(s){return o.onFileLoaded(s)}),g()(),f(3,"div",2),M(4,"img",3),g())},dependencies:[mt,Od,Ey],styles:["[_nghost-%COMP%]{height:100%;display:flex;flex-direction:column}.landing-page[_ngcontent-%COMP%]{margin:5% 10% 0;flex:1}.footer[_ngcontent-%COMP%]{padding:1rem}"]})}}return t})();var _I=["parentEl","","resizable1","","resizable2",""],or=(()=>{class t{constructor(e){this.handleRef=e,this.direction="horizontal",this.borderless=!1,this.resized=new de,this.dragging=!1,this.dimensions={horizontal:"width",vertical:"height"},this.minDimensions={horizontal:"minWidth",vertical:"minHeight"},this.clientPos={horizontal:"clientX",vertical:"clientY"}}ngOnInit(){this.boundMouseUp=this.onMouseUp.bind(this),this.boundMouseMove=this.onMouseMove.bind(this),this.boundMouseDown=this.onMouseDown.bind(this),document.addEventListener("mousemove",this.boundMouseMove),document.addEventListener("mouseup",this.boundMouseUp),this.handleRef.nativeElement.addEventListener("mousedown",this.boundMouseDown)}get dimension(){return this.dimensions[this.direction]}get minDimension(){return this.minDimensions[this.direction]}get clientPosition(){return this.clientPos[this.direction]}preventGlobalMouseEvents(){document.body.style["pointer-events"]="none"}restoreGlobalMouseEvents(){document.body.style["pointer-events"]="auto"}onMouseMove(e){if(!this.dragging)return;e.stopPropagation(),e.preventDefault();let n=e[this.clientPosition]-this.startPosition,o=this.startSize1+n,r=this.startSize2-n;if(o<this.resizable1[this.minDimension]||r<this.resizable2[this.minDimension])return;let s=o/this.parentSize*100,a=r/this.parentSize*100;this.resizable1[this.dimension]=s,this.resizable2[this.dimension]=a,this.resized?.emit()}onMouseDown(e){e.stopPropagation(),this.dragging=!0,this.startPosition=e[this.clientPosition],this.parentSize=this.parentEl.getBoundingClientRect()[this.dimension],this.startSize1=this.parentSize*this.resizable1[this.dimension]/100,this.startSize2=this.parentSize*this.resizable2[this.dimension]/100,this.preventGlobalMouseEvents()}onMouseUp(e){this.dragging&&(e.stopPropagation(),this.restoreGlobalMouseEvents(),this.dragging=!1)}ngOnDestroy(){document.removeEventListener("mousemove",this.boundMouseMove),document.removeEventListener("mouseup",this.boundMouseUp),this.handleRef.nativeElement.removeEventListener("mousedown",this.boundMouseDown)}static{this.\u0275fac=function(n){return new(n||t)(_(Ae))}}static{this.\u0275cmp=F({type:t,selectors:[["app-resize-handle","parentEl","","resizable1","","resizable2",""]],inputs:{parentEl:"parentEl",resizable1:"resizable1",resizable2:"resizable2",direction:"direction",borderless:"borderless"},outputs:{resized:"resized"},standalone:!0,features:[B],attrs:_I,decls:1,vars:4,consts:[["data-testid","resize-handle",1,"resize-handle"]],template:function(n,o){n&1&&M(0,"div",0),n&2&&Fe("vertical",o.direction==="vertical")("borderless",o.borderless)},styles:['.resize-handle[_ngcontent-%COMP%]{position:relative;background:var(--qds-border-default-1);width:1px;height:100%}.resize-handle.borderless[_ngcontent-%COMP%]{background:none}.resize-handle[_ngcontent-%COMP%]:after{content:"";cursor:ew-resize;z-index:100;position:absolute;display:block;top:0;left:-5px;width:10px;height:100%}.resize-handle.vertical[_ngcontent-%COMP%]{width:100%;height:1px}.resize-handle.vertical[_ngcontent-%COMP%]:after{cursor:ns-resize;top:-5px;left:0;width:100%;height:10px}']})}}return t})();var oo={production:!0,graphV2Enabled:!0};var rr=(()=>{class t{constructor(e){this.iconService=e,this.subtabs=[],this.activeSubtabUpdated=new de,this.subtabClosed=new de}onActiveSubtabUpdated(e){this.activeSubtabUpdated.emit(e)}onSubtabClosed(e){this.subtabClosed.emit(e)}static{this.\u0275fac=function(n){return new(n||t)(_(Ce))}}static{this.\u0275cmp=F({type:t,selectors:[["app-subtabs"]],inputs:{panelType:"panelType",subtabs:"subtabs",activeSubtabIndex:"activeSubtabIndex",importTemplateRef:"importTemplateRef"},outputs:{activeSubtabUpdated:"activeSubtabUpdated",subtabClosed:"subtabClosed"},standalone:!0,features:[B],decls:2,vars:4,consts:[[1,"subtabs-wrapper","d-flex","justify-content-between","align-items-end"],[1,"subtabs",3,"activeTabUpdated","tabClosed","activeTabIndex","tabData","showUnderline","showDivider"]],template:function(n,o){n&1&&(f(0,"div",0)(1,"app-draggable-tabs",1),I("activeTabUpdated",function(s){return o.onActiveSubtabUpdated(s)})("tabClosed",function(s){return o.onSubtabClosed(s)}),g()()),n&2&&(u(),b("activeTabIndex",o.activeSubtabIndex)("tabData",o.subtabs)("showUnderline",!0)("showDivider",!1))},dependencies:[Ds,Ve,Le,mt],styles:[".subtabs-wrapper[_ngcontent-%COMP%]{border-bottom:1px solid var(--qds-border-subtle-1);background:var(--qds-background-neutral-4);display:none}.subtabs-wrapper[_ngcontent-%COMP%] .subtabs[_ngcontent-%COMP%]{flex-shrink:1;min-width:0;height:2.25rem}.subtabs-wrapper[_ngcontent-%COMP%] .add-button[_ngcontent-%COMP%]{padding:.25rem 0;margin-right:.25rem}"]})}}return t})();var ro=(()=>{class t{constructor(e){this.graphPanelService=e,this._graphState=ka,this.destroyed$=new X,this.graphState$=new it(this.graphState),this.prevGraphState=ka,this.graphState$.pipe(ye(this.destroyed$)).subscribe(n=>{this._graphState=E(E({},this._graphState),n),this.graphPanelService.updateCachedGraphs(this.id,{graphState:this._graphState})})}set id(e){this._id=e}get id(){return this._id}get graphState(){return this._graphState}restoreGraphState(){let e=this.graphPanelService.getCachedIframe(this.id);e?.graphState&&this.graphState$.next(e.graphState)}setPropertyToShow(e){this.graphState$.next({propertyToShow:e})}setPropertyView(e){this.setPropertyToShow(e.propertyType),this.setViewHandler(e.propertyType)}setSidePanelTabIndex(e){this.graphState$.next({activeSidePanelTab:e})}setViewHandler(e){let n=E({},this.graphState$.value);switch(e){case Vt.MODEL:n.isModelPropertiesRequested=!0,n.isNodePropertiesRequested=!1;break;case vt.NODE:n.isModelPropertiesRequested=!1,n.isNodePropertiesRequested=!0;break}this.graphState$.next(n)}unsetProperty(e){let n=this.graphState;e===Vt.MODEL?n.isModelPropertiesRequested=!1:n.isNodePropertiesRequested=!1,this.graphState$.next(n)}setGraphViewHandler(e){switch(e){case vt.FILE_NOT_FOUND:this.graphState$.next({isFileNotFound:!0,isModelPlotted:!1});break;case vt.MODEL_PLOTTED:this.graphState$.next({isFileNotFound:!1,isModelPlotted:!0});break;case vt.SHOW_LOADER:this.graphState$.next({isFileNotFound:!1,isModelPlotted:!1});break}}infoHandler(e){this.graphState$.next({isSidePanelOpen:!0}),this._graphState.propertyToShow===Vt.MODEL?this.graphState$.next({modelProperties:e}):this._graphState.propertyToShow===vt.NODE&&this.graphState$.next({nodeProperties:e})}toggleSidenav(){let e=!this._graphState.isSidePanelOpen;e?this.graphState$.next(ee(E({},this.prevGraphState),{isSidePanelOpen:e})):(this.prevGraphState=this.graphState,this.graphState$.next(ee(E({},this.graphState),{isModelPropertiesRequested:!1,isNodePropertiesRequested:!1,isSidePanelOpen:e})))}searchReqHandler(e){this.graphState$.next({searchResults:e})}setAccuracyMetricsOpenFlags(e){this.graphState$.next({accuracyMetrics:E(E({},this.graphState.accuracyMetrics),e)})}ngOnDestroy(){this.destroyed$.next(!0),this.destroyed$.unsubscribe()}static{this.\u0275fac=function(n){return new(n||t)(D(bt))}}static{this.\u0275prov=ne({token:t,factory:t.\u0275fac})}}return t})();var xy={LEGEND:"graph.panel.legend",FLATTEN_LAYERS_TOOLTIP:"graph.controls.flattenLayers.tooltip",RESTORE_LAYERS_TOOLTIP:"graph.controls.restoreLayers.tooltip"};var sr=function(t){return t.ZOOM_IN="zoomIn",t.ZOOM_OUT="zoomOut",t.RESIZE="resize",t}(sr||{});var um="--qds-node-category-uncategorized",yt={DATA:"Data",NN_LAYER:"NN Layer",ACTIVATION:"Activation",POOLING:"Pooling",NORMALIZATION:"Normalization",MATH:"Math",SHAPE:"Shape",TRANSFORM:"Transform",QUANTIZATION:"Quantization",SYNTHETIC_LAYER:"Synthetic Layer",NAMESPACE_LAYER:"Namespace Layer",DEFAULT:"Default"},Id={[yt.DATA]:"--qds-node-category-data",[yt.NN_LAYER]:"--qds-node-category-layer",[yt.ACTIVATION]:"--qds-node-category-activation",[yt.POOLING]:"--qds-node-category-pool",[yt.NORMALIZATION]:"--qds-node-category-normalization",[yt.MATH]:"--qds-node-category-math",[yt.SHAPE]:"--qds-node-category-shape",[yt.TRANSFORM]:"--qds-node-category-transform",[yt.QUANTIZATION]:"--qds-node-category-quantization",[yt.SYNTHETIC_LAYER]:"--qds-artificial-layer-header-1",[yt.NAMESPACE_LAYER]:"--qds-layer-header-1",[yt.DEFAULT]:um},Py={[yt.NN_LAYER]:["conv","deconv","fc","dense","linear","lstm","gru","rnn","attention","transformer","embedding"],[yt.ACTIVATION]:["relu","sigmoid","tanh","softmax","gelu","swish","elu","selu","activation"],[yt.POOLING]:["pool","maxpool","avgpool"],[yt.NORMALIZATION]:["norm","batchnorm","layernorm","groupnorm","instancenorm","rmsnorm","lrn"],[yt.MATH]:["add","sub","mul","div","mod","pow","neg","abs","sin","cos","tan","asin","acos","atan","sinh","cosh","tanh","exp","log","sqrt","reciprocal","erf","sum","mean","max","min","reducesum","reducemean","reducemax","reducemin","reduceprod","reducel1","reducel2","reducelogsum","reducelogsumexp","reducesumsquare","equal","greater","less","greaterorequal","lessorequal","and","or","xor","not","floor","ceil","round","clip","sign","matmul","bitwiseand","bitwiseor","bitwisexor","bitwisenot","cumsum"],[yt.SHAPE]:["reshape","shape","size","flatten"],[yt.TRANSFORM]:["transpose","gather","slice","concat","split","cast","pad","tile","repeat","flip","squeeze","unsqueeze","expand"],[yt.QUANTIZATION]:["quant","dequant","quantize","dequantize"]},Br={SELECTED:"selected",HOVERED:"hovered",BLURRED:"blurred"};function jt(t){return t.children?.length>0}function Ja(t){return jt(t.sourceNode)&&jt(t.targetNode)}function Dd(t,i){let{x:e,y:n,width:o,height:r}=i;return e+o>=t.x&&e<=t.x+t.width&&n+r>=t.y&&n<=t.y+t.height}function rt(t,i){Object.entries(i).forEach(([e,n])=>{t.setAttribute(e,String(n))})}function gm(t){return jt(t.data)?"var(--qds-layer-border)":Md(t)}function Md(t){if(jt(t.data)){let e=Dy(t.data.depth);return t.data.isArtificial?`var(--qds-artificial-layer-header-${e})`:`var(--qds-layer-header-${e})`}return`var(${Id[t.data.type?.category]||um})`}function Iy(t){if(jt(t.data)){if(t.expanded){let i=Dy(t.data.depth);return t.data.isArtificial?`var(--qds-artificial-layer-body-${i})`:`var(--qds-layer-body-${i})`}return"transparent"}return"var(--qds-background-neutral-1)"}function Dy(t){let i=5*2-2,e=(t-1)%i;return e<5?e+1:i-e+1}function My(t){let i=1/0,e=1/0,n=-1/0,o=-1/0;for(let a of t)i=Math.min(i,a.x),n=Math.max(n,a.x+(a.width??0)),e=Math.min(e,a.y),o=Math.max(o,a.y+(a.height??0));let r=n-i,s=o-e;return{x:i,y:e,width:r,height:s}}function Ry(t,i){let e=t;for(;Hr(e+"...",i)>120&&e.length>1;)e=e.slice(0,-1);return e+(e.length<t.length?"...":"")}function el(t){let i=t.type?.name??t.name;return Ry(i,12)}function Ay(t){return Ry(t,10)}function _m(t){let i=[];for(let e of t.inputs)if(e.value?.tensor?.initializer){let n;e.value.tensor.type?.shape.dimensions?.length?(n=`(${e.value.tensor.type.shape.dimensions.join("x")})`,i.push(`${e.name} ${n}`)):(n=e.value.tensor.decodedData,i.push(`${e.name} = ${n}`))}return i}function bI(t){let i=el(t),e=Hr(i,12),n=_m(t);for(let r of n)if(e=Math.max(e,Hr(r,10)),e>120)return 120+6*2;let o=0;return n.length&&(o=100),jt(t)?Math.max(o,e+6*2+2+12+30):Math.max(o,e+6*2+2)}function yI(t){let i=0,e=t.inputs;for(let o of e)o.value?.tensor?.initializer&&i++;let n=0;return i&&(n=i*12+6*2),24+n}function Hr(t,i){let n=document.createElement("canvas").getContext("2d");return n.font=`${i}px Roboto Flex`,n.measureText(t).width}function tl(t){let i={};for(let e of t)i[e.id]={width:bI(e),height:yI(e)};return i}function vm(t,i){return jt(i.data)?i.width/2-t/2-12:6}var CI=(t,i)=>i.id,wI=()=>["d-flex","info-icon-color"],ky=t=>({property:t});function SI(t,i){if(t&1&&(f(0,"div",3)(1,"p",7),z(2,"translate"),q(3),g()()),t&2){let e=v().$implicit,n=v();u(),b("appTooltipInfo",G(2,3,n.fetchPropertyTooltips(e.header)))("tooltipClasses",Ye(5,wI)),u(2),le(" ",e.header.toUpperCase()," ")}}function EI(t,i){t&1&&He(0)}function TI(t,i){if(t&1&&(f(0,"div"),T(1,EI,1,0,"ng-container",9),g()),t&2){let e=i.$implicit;v(3);let n=ue(3);u(),b("ngTemplateOutlet",n)("ngTemplateOutletContext",ut(2,ky,e))}}function xI(t,i){if(t&1&&(f(0,"cdk-virtual-scroll-viewport",5),T(1,TI,2,4,"div",8),g()),t&2){let e=v().$implicit;u(),b("cdkVirtualForOf",e.properties)}}function PI(t,i){t&1&&He(0)}function OI(t,i){if(t&1&&T(0,PI,1,0,"ng-container",9),t&2){let e=i.$implicit;v(3);let n=ue(3);b("ngTemplateOutlet",n)("ngTemplateOutletContext",ut(2,ky,e))}}function II(t,i){if(t&1&&Pe(0,OI,1,4,"ng-container",null,Cr),t&2){let e=v().$implicit;Oe(e.properties)}}function DI(t,i){if(t&1&&(T(0,SI,4,6,"div",3),f(1,"div",4),T(2,xI,2,1,"cdk-virtual-scroll-viewport",5)(3,II,2,0),g(),M(4,"q-divider",6)),t&2){let e=i.$implicit,n=v();L(e.header!=="general"?0:-1),u(2),L(e.properties.length>n.VIRTUALIZATION_THRESHOLD?2:3)}}function MI(t,i){if(t&1&&(f(0,"p",15),q(1),g(),M(2,"q-divider")),t&2){let e=i.$implicit;u(),Te(e)}}function RI(t,i){if(t&1&&Pe(0,MI,3,1,null,null,Cr),t&2){let e=v(2).property;Oe(e.value.tensorInfo)}}function AI(t,i){if(t&1&&(f(0,"q-accordion",12)(1,"q-accordion-item",14),T(2,RI,2,0,"ng-template",null,1,ke),g()()),t&2){let e=ue(3),n=v().property;u(),tt("label",n.value.tensorName),b("content",e)}}function kI(t,i){if(t&1){let e=Z();f(0,"q-text-input",16),zn("ngModelChange",function(o){R(e);let r=v().property;return qn(r.value.tensorName,o)||(r.value.tensorName=o),A(o)}),g()}if(t&2){let e=v().property;jn("ngModel",e.value.tensorName)}}function NI(t,i){if(t&1&&(f(0,"div",10)(1,"p",11),q(2),g(),f(3,"div"),T(4,AI,4,2,"q-accordion",12)(5,kI,1,1,"q-text-input",13),g()()),t&2){let e=i.property;u(),tt("qTooltip",e.name),u(),le(" ",e.name," "),u(2),L(e.value.tensorInfo.length?4:5)}}function LI(t,i){t&1&&(f(0,"p",2),q(1),z(2,"translate"),g()),t&2&&(u(),le(" ",G(2,1,"GRAPH_PANEL.USER_NOTE")," "))}var Ny=(()=>{class t{constructor(){this.graphData=Ot(),this.selectedNode=Ot(),this.decodeTool=Ot.required(),this.VIRTUALIZATION_THRESHOLD=50,this.propertyGroups=Ie(()=>{let e=this.selectedNode()??this.graphData(),n=this.selectedNode()?.id||"model",o=[];return e&&(this.decodeTensor(),o.push({id:`${n}-general`,header:"general",properties:this.selectedNode()?this.getNodeGeneralSection():this.getModelGeneralSection()}),["attributes","inputs","outputs"].filter(r=>e[r]?.length).forEach(r=>{o.push({id:`${n}-${r}`,header:r,properties:this.transformArguments(e[r],r)})})),o}),this.QNN_QUANTIZATION_ENCODING_MAP={0:"Scale Offset",1:"Axis Scale Offset",2:"BW Scale Offset",3:"BW Axis Scale Offset",4:"Block",5:"Blockwise Expansion",6:"Vector"}}decodeTensor(){let{netronNode:e,Tensor:n,Quantization:o}=this.decodeTool();if(this.selectedNode()&&!jt(this.selectedNode())){let r=new Map;[...e.attributes||[],...e.inputs,...e.outputs].forEach(s=>{(Array.isArray(s.value)?s.value:[s.value]).forEach(l=>{let c=l?.initializer||(l?.values?l:void 0);l?.name&&c&&r.set(l.name,new n(c))})}),[...this.selectedNode().attributes||[],...this.selectedNode().inputs,...this.selectedNode().outputs].forEach(s=>{let a=s.value?.tensor;try{a&&r.has(a.name)&&(a.decodedData=r.get(a.name).toString())}catch{a.decodedData="Tensor data is empty."}a?.quantization&&(a.quantizationInfo=new o(a.quantization).toString())})}else this.graphData()&&this.graphData().inputs.forEach(r=>{let s=r.value?.tensor?.quantization;s&&(r.value.tensor.quantizationInfo=new o(s).toString())})}getNodeGeneralSection(){let e=this.selectedNode(),n=[];if(e.type?.name&&n.push({name:"type",value:this.createProperty(e.type.name)}),e.type?.module){let o=e.type.version!==void 0?`${e.type.module} v${e.type.version}`:e.type.module;n.push({name:"module",value:this.createProperty(o)})}return e.name&&n.push({name:"name",value:this.createProperty(e.name)}),n}getModelGeneralSection(){let e=this.graphData();return Object.keys(e).filter(n=>typeof e[n]=="string").map(n=>({name:n,value:this.createProperty(e[n])}))}transformArguments(e,n){return e.map(o=>{let r;return o.value?.tensor?r=this.createTensorProperty(o.value.tensor,n):o.value?.nonTensor!==void 0?r=this.createNonTensorProperty(o):r=this.createProperty("NA",[]),{name:o.name,value:r}})}getQnnQuantizationLabel(e){let n=e.encodingType!==void 0?`encoding type: ${this.QNN_QUANTIZATION_ENCODING_MAP[e.encodingType]}`:"",o="";Array.isArray(e.encodingInfo)?o=`
|
|
4
|
-
${e.encodingInfo.map((a,l)=>`
|
|
5
|
-
${l}${this.stringifyObject(a," ")}`).join(`
|
|
6
|
-
`)}`:o=`${this.stringifyObject(e.encodingInfo)}`;let r=this.stringifyObject(e.axisInfo),s=this.stringifyObject(e.lpbqInfo);return`${n}${r}${s}${o}`}stringifyObject(e,n=""){return!e||!Object.keys(e).length?"":`
|
|
7
|
-
`+Object.entries(e).map(([o,r])=>`${n}${o}: ${r}`).join(`
|
|
8
|
-
`)}getQuantizationLabel(e,n){return`${e?.type!==void 0?`quantization: ${e.type}`:""}${n?`
|
|
9
|
-
${n}`:""}`}createTensorProperty(e,n){let{name:o,type:r,initializer:s,description:a,identifier:l,quantization:c,quantizationInfo:d,qnnQuantization:p,dimensions:h,decodedData:m}=e,S=this.getTensorTypeLabel(r,h),y=n==="attributes"?S:`name: ${o}`,w=p?this.getQnnQuantizationLabel(p):this.getQuantizationLabel(c,d),x=[s?.category&&`category: ${s.category}`,n!=="attributes"&&r?.dataType&&S,s?.location&&`location: ${s.location}`,s?.stride&&`stride: ${s.stride.toString()}`,r?.denotation&&`denotation: ${r.denotation}`,a,l&&`identifier: ${l}`,w,h&&"type: shape",m].filter(Boolean);return this.createProperty(y,x)}getTensorTypeLabel(e,n){if(n?.length)return`[${n.join(",")}]`;let o=e?.dataType;return n=e?.shape?.dimensions,n?.length?`tensor: ${o}[${n.join(",")}]`:`tensor: ${o}`}createNonTensorProperty(e){let n=e.value?.nonTensor,o=[];if(n!==void 0)return Array.isArray(n)?(n=n.map(r=>typeof r=="bigint"?Number(r):r),n=JSON.stringify(n,null,2).slice(1,-1)):n=String(typeof n=="bigint"?Number(n):n),e.type&&o.push(`type: ${e.type}`),this.createProperty(n,o)}createProperty(e,n=[]){return{tensorName:e,tensorInfo:n}}fetchPropertyTooltips(e){let n=this.selectedNode()?"NODE":"MODEL";switch(e.toUpperCase()){case"INPUTS":return`GRAPH_PANEL.${n}_INPUTS_TOOLTIP`;case"OUTPUTS":return`GRAPH_PANEL.${n}_OUTPUTS_TOOLTIP`;case"ATTRIBUTES":return`GRAPH_PANEL.${n}_ATTRIBUTES_TOOLTIP`;default:return""}}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=F({type:t,selectors:[["app-netron-properties-view-v2"]],inputs:{graphData:[1,"graphData"],selectedNode:[1,"selectedNode"],decodeTool:[1,"decodeTool"]},standalone:!0,features:[B],decls:5,vars:1,consts:[["properties",""],["propertyInfo",""],[1,"text","user-note"],[1,"d-flex","gap-8","align-items-center","w-100"],[1,"property"],["itemSize","32"],[1,"divider"],["tooltipPosition","top-start",1,"header",3,"appTooltipInfo","tooltipClasses"],[4,"cdkVirtualFor","cdkVirtualForOf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"property-alignment"],["qTooltipPlacement","bottom",1,"text","key",3,"qTooltip"],[1,"netron-subProprties"],["size","s","readonly","","fullWidth","",1,"netron-input-text",3,"ngModel"],["size","s",1,"property-block",3,"label","content"],[1,"text","property-info"],["size","s","readonly","","fullWidth","",1,"netron-input-text",3,"ngModelChange","ngModel"]],template:function(n,o){n&1&&(Pe(0,DI,5,2,null,null,CI),T(2,NI,6,3,"ng-template",null,0,ke)(4,LI,3,3,"p",2)),n&2&&(Oe(o.propertyGroups()),u(4),L(o.selectedNode()&&!o.propertyGroups().length?4:-1))},dependencies:[Le,st,ri,Di,Ii,Xn,Yn,zt,on,_t,Qt,ji,be,Ne,vn,cc,pc,qo,oi,ci],styles:[".property-alignment[_ngcontent-%COMP%]{display:grid;grid-template-columns:20% 1fr;column-gap:1rem;row-gap:1rem;align-items:center;width:100%}.header[_ngcontent-%COMP%]{font-size:.85em;font-weight:560;line-height:1rem;letter-spacing:.03em;text-align:left;margin:1rem 0;color:var(--qds-text-primary-1)}.property[_ngcontent-%COMP%]{margin:1rem .4rem}.key[_ngcontent-%COMP%]{text-align:end;font-weight:400;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:0}.property-info[_ngcontent-%COMP%]{white-space:pre-wrap;margin-top:.5rem}.divider[_ngcontent-%COMP%]{margin-top:1rem}.user-note[_ngcontent-%COMP%]{text-align:center}.text[_ngcontent-%COMP%]{color:var(--qds-text-primary-1);opacity:.6;font-weight:200;font-size:.85em;line-height:1rem;font-style:normal;overflow-wrap:anywhere}.property-block[_ngcontent-%COMP%] .q-accordion-item--root{min-width:0}cdk-virtual-scroll-viewport[_ngcontent-%COMP%]{height:50vh}"]})}}return t})();var Ly=()=>["info-icon-color"];function FI(t,i){t&1&&(f(0,"div",9)(1,"span",10),z(2,"translate"),q(3),z(4,"translate"),g()()),t&2&&(u(),b("appTooltipInfo",G(2,3,"GRAPH_PANEL.MODEL_PROPERTIES_TOOLTIP"))("tooltipClasses",Ye(7,Ly)),u(2),le(" ",G(4,5,"GRAPH_PANEL.MODEL_PROPERTIES")," "))}function VI(t,i){if(t&1&&M(0,"app-netron-properties-view-v2",11),t&2){let e=v(2);b("graphData",e.graphData())("decodeTool",e.decodeTool())}}function BI(t,i){if(t&1&&T(0,VI,1,2,"app-netron-properties-view-v2",11),t&2){let e=v();L(e.graphService.graphState.isModelPropertiesRequested?0:-1)}}function HI(t,i){t&1&&(f(0,"div",9)(1,"span",10),z(2,"translate"),q(3),z(4,"translate"),g()()),t&2&&(u(),b("appTooltipInfo",G(2,3,"GRAPH_PANEL.NODE_PROPERTIES_TOOLTIP"))("tooltipClasses",Ye(7,Ly)),u(2),le(" ",G(4,5,"GRAPH_PANEL.NODE_PROPERTIES")," "))}function jI(t,i){if(t&1&&M(0,"app-netron-properties-view-v2",12),t&2){let e=v(3);b("selectedNode",e.selectedNode())("decodeTool",e.decodeTool())}}function qI(t,i){if(t&1&&T(0,jI,1,2,"app-netron-properties-view-v2",12),t&2){let e=v(2);L(e.graphService.graphState.isNodePropertiesRequested?0:-1)}}function zI(t,i){if(t&1){let e=Z();f(0,"q-accordion-item",7),I("opened",function(){R(e);let o=v();return A(o.onPropertiesOpened(o.properties.NODE))})("closed",function(){R(e);let o=v();return A(o.onPropertiesClosed(o.properties.NODE))}),T(1,HI,5,8,"ng-template",null,2,ke)(3,qI,1,1,"ng-template",null,3,ke),g()}if(t&2){let e=ue(2),n=ue(4),o=v();b("label",e)("startIcon",o.iconService.gitFork)("content",n)("expanded",o.graphService.graphState.isNodePropertiesRequested)}}var Fy=(()=>{class t{constructor(e,n,o){this.graphService=e,this.iconService=n,this.translateService=o,this.selectedNode=Ot(),this.graphData=Ot.required(),this.decodeTool=Ot.required(),this.showNodeProperties=Ie(()=>this.selectedNode()&&this.selectedNode()?.type?.category!=="Data"),this.properties=vt,_n(()=>{this.showNodeProperties()?this.onPropertiesOpened(vt.NODE):this.onPropertiesOpened(vt.MODEL)})}onPropertiesOpened(e){this.graphService.setPropertyView({propertyType:e})}onPropertiesClosed(e){this.graphService.unsetProperty(e)}static{this.\u0275fac=function(n){return new(n||t)(_(ro),_(Ce),_(Ge))}}static{this.\u0275cmp=F({type:t,selectors:[["app-graph-side-panel-v2"]],inputs:{selectedNode:[1,"selectedNode"],graphData:[1,"graphData"],decodeTool:[1,"decodeTool"]},standalone:!0,features:[B],decls:9,vars:5,consts:[["modelPropertiesLabel",""],["modelPropertiesContent",""],["nodePropertiesLabel",""],["nodePropertiesContent",""],[1,"d-flex","drawer-inner-container"],[1,"w-100"],[1,"netron-properties","flex-grow-1"],["size","s",3,"opened","closed","label","startIcon","content","expanded"],["size","s",3,"label","startIcon","content","expanded"],[1,"d-flex","w-100","align-items-center","gap-8"],["tooltipPosition","bottom",3,"appTooltipInfo","tooltipClasses"],[3,"graphData","decodeTool"],[3,"selectedNode","decodeTool"]],template:function(n,o){if(n&1){let r=Z();f(0,"div",4)(1,"div",5)(2,"q-accordion",6)(3,"q-accordion-item",7),I("opened",function(){return R(r),A(o.onPropertiesOpened(o.properties.MODEL))})("closed",function(){return R(r),A(o.onPropertiesClosed(o.properties.MODEL))}),T(4,FI,5,8,"ng-template",null,0,ke)(6,BI,1,1,"ng-template",null,1,ke),g(),T(8,zI,5,4,"q-accordion-item",8),g()()()}if(n&2){let r=ue(5),s=ue(7);u(3),b("label",r)("startIcon",o.iconService.settings2)("content",s)("expanded",o.graphService.graphState.isModelPropertiesRequested),u(5),L(o.showNodeProperties()?8:-1)}},dependencies:[sn,ri,Di,Ii,Ny,be,Ne,xr,_t,Mi,ci],styles:["[_nghost-%COMP%]{height:100%;flex:1;overflow-x:hidden}.drawer-inner-container[_ngcontent-%COMP%]{height:100%} .mat-drawer-inner-container{display:flex;height:100%} .q-tabs--nav{margin:0 .5rem}.analysis-wrapper[_ngcontent-%COMP%]{visibility:hidden}.analysis-wrapper.visible[_ngcontent-%COMP%]{visibility:visible}.report-dropdown-margin[_ngcontent-%COMP%]{margin:0 1rem .5rem}"]})}}return t})();var Gt="http://www.w3.org/2000/svg";var pi={SELECTED:"selected",HOVERED:"hovered",BLURRED:"blurred",HIDDEN:"hidden"},qr={LINE:{"stroke-width":1,stroke:"var(--q-neutral-400)"},INTERACTIVE:{"stroke-width":8,stroke:"transparent"}};var Rd=class{set graph(i){this._graph=i}get selectedEdgeId(){return this.selectedEdge?.data.id}constructor(i){this.edgeCache={},this.selectedNodeEdges={crossLayerEdges:[],highlightedDirectEdges:[],hiddenIndirectEdges:[]},this.onEdgeClick=i.onEdgeClick,this.layerGroups=i.layerGroups,this.svgEl=i.svgEl,this.viewEdgeMap=i.viewEdgeMap,this.viewNodeMap=i.viewNodeMap}createOrUpdateEdges(i){for(let e of i.edges){this.viewEdgeMap[e.data.id]=e;let n=this.edgeCache[e.data.id];if(n)this.updateEdge(n);else{let o=this.createEdgeElements(e),r={id:e.data.id,rendered:!1,blurred:!1,elements:o};this.addEdgeListeners(r),this.edgeCache[e.data.id]=r}}for(let e of i.nodes)e.childGraph&&this.createOrUpdateEdges(e.childGraph)}calculateEdge(i){let{globalPoints:e}=i,n=e[e.length-1],o=e[e.length-2],r=Math.atan2(n.y-o.y,n.x-o.x),s=1;return{edgeEnd:{x:n.x-s*Math.cos(r),y:n.y-s*Math.sin(r)},intersectionAngle:r,globalPoints:e}}updateEdge(i){let{elements:e}=i,n=this.viewEdgeMap[i.id],{edgeEnd:o,intersectionAngle:r,globalPoints:s}=this.calculateEdge(n);this.configureLine(e.line,s,o,qr.LINE),this.configureLine(e.interactiveLine,s,o,qr.INTERACTIVE),this.configureArrowhead(e.arrowhead,o,r,qr.LINE)}createEdgeElements(i){let{edgeEnd:e,intersectionAngle:n,globalPoints:o}=this.calculateEdge(i),r=this.createLine(o,e,qr.LINE),s=this.createArrowhead(e,n,qr.LINE),a=this.createLine(o,e,qr.INTERACTIVE);a.classList.add("interactive"),a.style.cursor="pointer";let l=document.createElementNS(Gt,"g");return rt(l,{class:"edge-group","data-testid":i.data.id}),l.appendChild(r),l.appendChild(a),l.appendChild(s),{group:l,line:r,interactiveLine:a,arrowhead:s}}createLine(i,e,n){let o=document.createElementNS(Gt,"path");return this.configureLine(o,i,e,n),o}configureLine(i,e,n,o){let r=`M ${e[0].x} ${e[0].y}`;if(e.length>2)for(let s=1;s<e.length-1;s++){let a=e[s],l=e[s+1],c=(a.x+l.x)/2,d=(a.y+l.y)/2;r+=` Q ${a.x} ${a.y}, ${c} ${d}`}r+=` L ${n.x} ${n.y}`,rt(i,ee(E({},o),{d:r,fill:"none",class:"edge-line","vector-effect":"non-scaling-stroke"}))}createArrowhead(i,e,n){let o=document.createElementNS(Gt,"path");return this.configureArrowhead(o,i,e,n),o}configureArrowhead(i,e,n,o){let r=3*Math.cos(n),s=3*Math.sin(n),a=6/2*Math.sin(n),l=6/2*Math.cos(n),c={x:e.x-r+a,y:e.y-s-l},d={x:e.x-r-a,y:e.y-s+l},p=`M ${c.x} ${c.y} L ${e.x} ${e.y} L ${d.x} ${d.y}`;rt(i,ee(E({},o),{d:p,fill:"none","vector-effect":"non-scaling-stroke",class:"edge-arrowhead"}))}getTensorEdges(i){return Object.values(this.edgeCache).filter(e=>this.viewEdgeMap[e.id].data.tensors?.some(n=>n.name===i))}addEdgeListeners(i){let{elements:e}=i,{interactiveLine:n,arrowhead:o}=e,r=this.viewEdgeMap[i.id],s=r.data.tensors;[n,o].forEach(a=>{a.addEventListener("click",()=>this.clickEdge(r.data.id)),a.addEventListener("pointerenter",()=>{Ja(r.data)?this.addEdgeStyle(i,pi.HOVERED):s.forEach(l=>this.addStylesToTensorEdges(l.name,pi.HOVERED))}),a.addEventListener("pointerleave",()=>{Ja(r.data)?this.removeEdgeStyle(i,pi.HOVERED):s.forEach(l=>this.removeStylesFromTensorEdges(l.name,pi.HOVERED))})})}clickEdge(i){this.clearHighlightedEdges();let e=this.viewEdgeMap[i],{tensors:n,targetNode:o,sourceNode:r}=e.data,s=this.viewNodeMap[r.id],a=this.viewNodeMap[o.id];!s.expanded&&!a.expanded?Ja(e.data)?this.addEdgeStyle(this.edgeCache[i],pi.SELECTED):this.highlightTensorEdges(n):this.showAllEdgesBetweenLayers(e,r.id,o.id),this.selectedEdge=e,this.onEdgeClick(e.data)}highlightTensorEdges(i){i.forEach(e=>this.addStylesToTensorEdges(e.name,pi.SELECTED))}showAllEdgesBetweenLayers(i,e,n){let o=this.edgeCache[i.data.id];this.hideIndirectEdge(o);let r=new Set,s=this._graph.layerDescendantsMap[e]||new Set([e]),a=this._graph.layerDescendantsMap[n]||new Set([n]);s.forEach(l=>{a.forEach(c=>{if(this._graph.adjacencyList[l]?.[c]){let d=this.findViewNode(l),p=this.findViewNode(c),h=`${d.data.id}->${p.data.id}`;r.has(h)||(this.createDetailedLayerEdge(d,p,i),r.add(h))}})})}createDetailedLayerEdge(i,e,n){let o=this.viewNodeMap[n.data.sourceNode.id],r=this.viewNodeMap[n.data.targetNode.id],s=[...n.globalPoints];if(o.expanded){let a=this.getNodeConnectionPoint(i,"bottom");s.unshift(a)}if(r.expanded){let a=this.getNodeConnectionPoint(e,"top");s.push(a)}this.renderCrossLayerEdge(s,i,e,n.data.tensors)}getMidpointOfEdges(i){let e=this.getTensorEdges(i);if(!e.length)return;let n=[],o=[];for(let a of e){let c=this.viewEdgeMap[a.id].globalPoints[0];n.push(c.x),o.push(c.y)}let r=n.reduce((a,l)=>a+l,0)/n.length,s=o.reduce((a,l)=>a+l,0)/o.length;return{globalX:r,globalY:s}}addStylesToTensorEdges(i,e){let n=this.getTensorEdges(i);for(let o of n)this.addEdgeStyle(o,e)}addEdgeStyle(i,e){i.elements.line.classList.add(e),i.elements.arrowhead.classList.add(e)}removeStylesFromTensorEdges(i,e){let n=this.getTensorEdges(i);for(let o of n)this.removeEdgeStyle(o,e)}removeEdgeStyle(i,e){i.elements.line.classList.remove(e),i.elements.arrowhead.classList.remove(e)}focusTensors(i){let e=new Set(i);for(let n of Object.values(this.edgeCache)){let r=this.viewEdgeMap[n.id].data.tensors.some(s=>e.has(s.name));r&&n.blurred?(n.blurred=!1,this.removeEdgeStyle(n,pi.BLURRED)):!r&&!n.blurred&&(n.blurred=!0,this.addEdgeStyle(n,pi.BLURRED))}}renderVisibleEdges(i){for(let e in this.edgeCache){let n=this.edgeCache[e];if(n.isCrossLayer)continue;let o=this.viewEdgeMap[n.id],{namespace:r}=o.data.sourceNode.parent;Dd(i,o.globalEdgeBounds)?n.rendered||(this.layerGroups[r].edgesGroup.appendChild(n.elements.group),n.rendered=!0):n.rendered&&(this.layerGroups[r].edgesGroup.removeChild(n.elements.group),n.rendered=!1)}}highlightAllNodeEdges(i){this.renderInputEdges(i),this.renderOutputEdges(i)}renderInputEdges(i){let e=this.findViewNode(i.id),n=this._graph.inverseAdjacencyList[i.id];for(let o in n){let r=this.findViewNode(o),s=n[o].tensors;this.highlightExistingEdgeOrCreateCrossLayerEdge(r,e,s)}}renderOutputEdges(i,e){let n=this.findViewNode(i.id),o=this._graph.adjacencyList[i.id];for(let r in o){let s=this.findViewNode(r),a=o[r].tensors,l=e?a.filter(c=>c.name===e):a;l.length&&this.highlightExistingEdgeOrCreateCrossLayerEdge(n,s,l)}}findViewNode(i){if(this.viewNodeMap[i])return this.viewNodeMap[i];let e=this._graph.ancestorMap[i];for(let n=e.length-1;n>=0;n--){let o=e[n].id;if(this.viewNodeMap[o])return this.viewNodeMap[o]}}highlightExistingEdgeOrCreateCrossLayerEdge(i,e,n){let o=Object.values(this.viewEdgeMap).find(r=>r.data.sourceNode.id===i.data.id&&r.data.targetNode.id===e.data.id);if(o){let r=this.edgeCache[o.data.id];this.addEdgeStyle(r,pi.SELECTED),this.selectedNodeEdges.highlightedDirectEdges.push(r)}else this.createCrossLayerEdge(i,e,n)}createCrossLayerEdge(i,e,n){let o=this.findExistingIndirectEdge(i,e);if(!o){console.error(`Unable to show cross-layer edge - no indirect edge found between ${i.data.id} and ${e.data.id}`);return}this.hideIndirectEdge(o);let r=this.calculateCrossLayerPoints(i,e,this.viewEdgeMap[o.id]);this.renderCrossLayerEdge(r,i,e,n)}findExistingIndirectEdge(i,e){let n=i.data.parent;for(;n;){let o=e.data.parent;for(;o;){let r=Object.values(this.viewEdgeMap).find(s=>{let a=s.data.sourceNode.id===i.data.id||s.data.sourceNode.id===n.id,l=s.data.targetNode.id===e.data.id||s.data.targetNode.id===o.id;return a&&l});if(r)return this.edgeCache[r.data.id];o=o.parent}n=n.parent}}hideIndirectEdge(i){this.addEdgeStyle(i,pi.HIDDEN),this.selectedNodeEdges.hiddenIndirectEdges.push(i)}calculateCrossLayerPoints(i,e,n){let o=this.viewNodeMap[n.data.sourceNode.id],r=this.viewNodeMap[n.data.targetNode.id],s=this.getNodeConnectionPoint(i,"bottom"),a=this.getNodeConnectionPoint(e,"top");if(o.expanded&&r.expanded)return[s,a];let l=[...n.globalPoints];return o.expanded&&(l[0]=s),r.expanded&&(l[l.length-1]=a),l}getNodeConnectionPoint(i,e){let n=i.globalX+i.width/2,o=e==="top"?i.globalY:i.globalY+i.height;return{x:n,y:o}}renderCrossLayerEdge(i,e,n,o){let r={v:e.data.id,w:n.data.id,points:i,globalPoints:i,globalEdgeBounds:My(i),data:{sourceNode:e.data,targetNode:n.data,id:`cross-layer-${e.data.id}->${n.data.id}`,tensors:o}};this.viewEdgeMap[r.data.id]=r;let s=this.createEdgeElements(r);this.svgEl.appendChild(s.group);let a={id:r.data.id,rendered:!0,blurred:!1,isCrossLayer:!0,elements:s};this.edgeCache[r.data.id]=a,this.addEdgeStyle(a,pi.SELECTED),this.selectedNodeEdges.crossLayerEdges.push(a)}clearHighlightedEdges(){this.selectedEdge&&this.clearEdgeSelection(this.selectedEdge.data.id),this.clearSelectedNodeEdges()}clearSelectedNodeEdges(){this.selectedNodeEdges.crossLayerEdges.forEach(i=>this.removeCrossLayerEdge(i)),this.selectedNodeEdges.highlightedDirectEdges.forEach(i=>this.removeEdgeStyle(i,pi.SELECTED)),this.selectedNodeEdges.hiddenIndirectEdges.forEach(i=>this.removeEdgeStyle(i,pi.HIDDEN)),this.selectedNodeEdges.crossLayerEdges=[],this.selectedNodeEdges.highlightedDirectEdges=[],this.selectedNodeEdges.hiddenIndirectEdges=[]}clearEdgeSelection(i){let e=this.viewEdgeMap[i];Ja(e.data)?this.removeEdgeStyle(this.edgeCache[i],pi.SELECTED):e.data.tensors.forEach(n=>this.removeStylesFromTensorEdges(n.name,pi.SELECTED)),this.selectedEdge=void 0}removeCrossLayerEdge(i){this.svgEl.removeChild(i.elements.group),delete this.edgeCache[i.id],delete this.viewEdgeMap[i.id]}removeEdge(i){let e=this.edgeCache[i.data.id],{namespace:n}=i.data.sourceNode.parent;e.rendered&&this.layerGroups[n].edgesGroup.removeChild(e.elements.group),delete this.edgeCache[i.data.id],delete this.viewEdgeMap[i.data.id]}reset(){this.edgeCache={},Object.keys(this.viewEdgeMap).forEach(i=>delete this.viewEdgeMap[i]),this.selectedEdge=void 0,this.selectedNodeEdges={crossLayerEdges:[],highlightedDirectEdges:[],hiddenIndirectEdges:[]}}};var Hs=function(t){return t[t.CREATE_VIEW_GRAPH=0]="CREATE_VIEW_GRAPH",t[t.EXPAND=1]="EXPAND",t[t.COLLAPSE=2]="COLLAPSE",t[t.REVEAL=3]="REVEAL",t}(Hs||{});var Ad=class{constructor(){this.worker=new Worker(new URL("worker-5VPKG2GV.js",import.meta.url),{type:"module"})}sendWorkerRequest(i,e){return new Promise((n,o)=>{this.worker.onmessage=r=>n(r.data.rootViewGraph),this.worker.onerror=r=>o(r),this.worker.postMessage({type:i,data:e})})}createViewGraph(i){let e={layerNode:i,nodeDimensions:tl(i.children)};return this.sendWorkerRequest(Hs.CREATE_VIEW_GRAPH,e)}expandNode(i,e){let n={rootViewGraph:i,clickedNodeId:e.id,nodeDimensions:tl(e.children)};return this.sendWorkerRequest(Hs.EXPAND,n)}collapseNode(i,e,n){let o={rootViewGraph:i,clickedNodeId:n,nodeDimensions:tl(e.nodes.map(r=>r.data))};return this.sendWorkerRequest(Hs.COLLAPSE,o)}revealNode(i,e){let n=[];for(let r of e)for(let s of r.children)n.push(s);let o={rootViewGraph:i,ancestors:e,nodeDimensions:tl(n)};return this.sendWorkerRequest(Hs.REVEAL,o)}destroy(){this.worker.terminate()}};var Nd=class{get selectedNodeId(){return this.selectedNode?.nodeId}constructor(i){this.nodeCache={},this.nodeToViewGraph={},this.onNodeClick=i.onNodeClick,this.onExpandNode=i.onExpandNode,this.layerGroups=i.layerGroups,this.viewNodeMap=i.viewNodeMap}createOrUpdateNodes(i){for(let e of i.nodes){this.viewNodeMap[e.data.id]=e,this.nodeToViewGraph[e.data.id]=i;let n=this.nodeCache[e.data.id];if(n)this.updateNode(n,e);else{let o=this.createNodeElements(e),r={nodeId:e.data.id,rendered:!1,blurred:!1,elements:o};this.addNodeListeners(r),this.nodeCache[e.data.id]=r}e.childGraph&&this.createOrUpdateNodes(e.childGraph)}}updateNode(i,e){let{elements:n}=i,{globalX:o,globalY:r,width:s,height:a}=e;if(rt(n.group,{transform:`translate(${o}, ${r})`}),rt(n.border,{width:s,height:a}),rt(n.header.background,{width:s,height:a,fill:Md(e)}),n.body&&this.configureBodyBackground(n.body.background,e,24),jt(e.data)){let l=Hr(el(e.data),12);rt(n.header.text,{x:vm(l,e)});let{toggleLayerButton:c}=n.header;e.expanded&&c.group.contains(c.expandIcon)?(c.group.removeChild(c.expandIcon),c.group.appendChild(c.collapseIcon)):!e.expanded&&c.group.contains(c.collapseIcon)&&(c.group.removeChild(c.collapseIcon),c.group.appendChild(c.expandIcon)),rt(c.group,{transform:`translate(${s/2+l/2}, ${6})`}),n.group.style.cursor="pointer"}}createNodeElements(i){let{globalX:e,globalY:n,width:o,height:r}=i,s=document.createElementNS(Gt,"g");rt(s,{id:`node-group-${i.data.name}`,"data-testid":i.data.name,class:"node-group",transform:`translate(${e}, ${n})`}),s.style.cursor="pointer";let a=this.createHeaderRect(o,r,i);s.appendChild(a);let l,c=this.createBodyTexts(i);(c.length||jt(i.data))&&(l=this.createBodyElements(i,c),s.appendChild(l.group));let p;jt(i.data)&&(p=this.createToggleLayerButtonElements(i),this.addExpandButtonListeners(p,i.data.id,s),s.appendChild(p.group));let h=this.createBorderRect(o,r,i);return s.appendChild(h),{isTextRendered:!1,group:s,header:{background:a,text:this.createHeaderText(i),toggleLayerButton:p},body:l,border:h}}createBodyElements(i,e){let n=document.createElementNS(Gt,"g");rt(n,{class:"body-group",transform:`translate(0, ${24})`});let o=this.createBodyBackground(i,24);return n.append(o),{group:n,background:o,texts:e}}createToggleLayerButtonElements(i){let e=document.createElementNS(Gt,"g"),n=document.createElementNS(Gt,"rect"),o=Oh(Av),r=Oh(kv);return rt(o,{width:12,height:12,"pointer-events":"none"}),rt(r,{width:12,height:12,"pointer-events":"none"}),rt(n,{x:-3,y:-3,width:12+3*2,height:12+3*2,fill:gm(i),opacity:0}),rt(e,{class:"expand-button-group",transform:`translate(${i.width/2+Hr(el(i.data),12)/2}, ${6})`}),e.appendChild(n),e.appendChild(i.expanded?r:o),{group:e,expandIcon:o,collapseIcon:r,buttonHitBox:n}}addExpandButtonListeners(i,e,n){i.buttonHitBox.addEventListener("click",()=>{let o=this.viewNodeMap[e],r=this.nodeToViewGraph[e];this.expandNode(n,o,r)}),i.buttonHitBox.addEventListener("mouseover",()=>{rt(i.buttonHitBox,{opacity:.5})}),i.buttonHitBox.addEventListener("mouseout",()=>rt(i.buttonHitBox,{opacity:0}))}createHeaderRect(i,e,n){let o=document.createElementNS(Gt,"rect");return rt(o,{width:i,height:e,rx:8,ry:8,class:"node-header",fill:Md(n),opacity:.8}),o}createHeaderText(i){let e=document.createElementNS(Gt,"text");e.textContent=el(i.data);let n=Hr(e.textContent,12);return rt(e,{"font-size":12,"dominant-baseline":"hanging",fill:"var(--qds-text-primary-1",x:vm(n,i),y:7}),e}createBodyBackground(i,e){let n=document.createElementNS(Gt,"path");return this.configureBodyBackground(n,i,e),n}configureBodyBackground(i,e,n){let{width:o,height:r}=e,s=r-n,a=`
|
|
10
|
-
M 0 0
|
|
11
|
-
H ${o}
|
|
12
|
-
V ${s-8}
|
|
13
|
-
A ${8} ${8} 0 0 1 ${o-8} ${s}
|
|
14
|
-
H ${8}
|
|
15
|
-
A ${8} ${8} 0 0 1 0 ${s-8}
|
|
16
|
-
V 0
|
|
17
|
-
Z
|
|
18
|
-
`;rt(i,{d:a,class:"node-body-background",fill:Iy(e)})}createBodyTexts(i){return _m(i.data).map((n,o)=>{let r=document.createElementNS(Gt,"text");return r.textContent=Ay(n),rt(r,{"font-size":10,"dominant-baseline":"hanging",fill:"var(--qds-text-primary-1",x:6,y:o*12+6}),r})}createBorderRect(i,e,n){let o=document.createElementNS(Gt,"rect");return rt(o,{width:i,height:e,rx:8,ry:8,stroke:gm(n),fill:"transparent",class:"node-border","pointer-events":"none"}),o}addNodeListeners(i){let{group:e,header:n}=i.elements,o=!1,r=5,s,a;e.addEventListener("click",l=>{if(o)return;l.stopPropagation();let c=this.viewNodeMap[i.nodeId],d=this.nodeToViewGraph[i.nodeId];l.detail===1?this.handleNodeClick(i):l.detail===2&&jt(c.data)&&this.expandNode(e,c,d)}),e.addEventListener("mouseover",()=>n.background.classList.add(Br.HOVERED)),e.addEventListener("mouseout",()=>n.background.classList.remove(Br.HOVERED)),e.addEventListener("mousemove",l=>{(Math.abs(l.clientX-s)>r||Math.abs(l.clientY-a)>r)&&(o=!0)}),e.addEventListener("mousedown",l=>{s=l.clientX,a=l.clientY,o=!1})}expandNode(i,e,n){i.style.cursor="wait",this.onExpandNode(e,n)}handleNodeClick(i){this.selectNode(i);let e=this.viewNodeMap[i.nodeId];this.onNodeClick(e.data)}selectNode(i){let{elements:e}=i;e.border.classList.add(Br.SELECTED);let n=this.viewNodeMap[i.nodeId];this.selectedNode&&this.selectedNode.nodeId!==n.data.id&&this.removeSelection(),this.selectedNode=i}removeSelection(){this.selectedNode&&(this.selectedNode.elements.border.classList.remove(Br.SELECTED),this.selectedNode=void 0)}getNodeCenterPosition(i){let e=this.viewNodeMap[i];if(!e)return;let{globalX:n,globalY:o,width:r,height:s}=e;return{globalX:n+r/2,globalY:o+s/2}}selectNodeById(i){let e=this.nodeCache[i];this.selectNode(e)}clickNodeById(i){let e=this.nodeCache[i];this.handleNodeClick(e)}focusNodes(i){let e=new Set(i);for(let n of Object.values(this.nodeCache)){let o=this.viewNodeMap[n.nodeId];e.has(o.data.name)?(n.blurred=!1,n.elements.group.classList.remove(Br.BLURRED)):(n.blurred=!0,n.elements.group.classList.add(Br.BLURRED))}}renderVisibleNodes(i,e){let n=e<.2;for(let o in this.nodeCache){let r=this.nodeCache[o],s=this.viewNodeMap[o],{elements:a}=r,l={x:s.globalX,y:s.globalY,width:s.width,height:s.height};if(Dd(i,l))if(!r.rendered)this.layerGroups[s.data.parent.namespace].nodesGroup.appendChild(a.group),r.rendered=!0,n||this.addTextToNode(a);else{let c=n&&a.isTextRendered,d=!n&&!a.isTextRendered;c?this.removeTextFromNode(a):d&&this.addTextToNode(a)}else r.rendered&&(this.layerGroups[s.data.parent.namespace].nodesGroup.removeChild(a.group),r.rendered=!1)}}removeTextFromNode(i){i.group.removeChild(i.header.text),i.body?.texts.forEach(e=>i.body.group.removeChild(e)),i.isTextRendered=!1}addTextToNode(i){i.group.appendChild(i.header.text),i.body?.texts.forEach(e=>i.body.group.appendChild(e)),i.isTextRendered=!0}removeNode(i){let e=this.nodeCache[i.data.id];e&&(e.rendered&&this.layerGroups[i.data.parent.namespace].nodesGroup.removeChild(e.elements.group),delete this.nodeCache[i.data.id],delete this.viewNodeMap[i.data.id],delete this.nodeToViewGraph[i.data.id])}reset(){this.nodeCache={},Object.keys(this.viewNodeMap).forEach(i=>delete this.viewNodeMap[i]),this.selectedNode=void 0}};var Ld=class{constructor(){this.viewBox={x:0,y:0,width:0,height:0},this.zoomFactor=1.2,this.zoomScale=1,this.isDragging=!1,this.lastPosition={x:0,y:0},this.layerGroups={},this.viewNodeMap={},this.viewEdgeMap={}}get graphState(){return{graph:this.graph,viewGraph:this.rootViewGraph,viewBox:this.viewBox,zoomScale:this.zoomScale,selectedNodeId:this.nodeRenderer?.selectedNodeId,selectedEdgeId:this.edgeRenderer?.selectedEdgeId}}init(s){return Y(this,arguments,function*({containerEl:i,onNodeClick:e,onEdgeClick:n,graph:o,state:r}){this.containerEl=i,this.svgEl=document.createElementNS(Gt,"svg"),rt(this.svgEl,{width:i.clientWidth,height:i.clientHeight}),i.appendChild(this.svgEl),this.resizeObserver=new ResizeObserver(()=>{let a=i.clientWidth,l=i.clientHeight;rt(this.svgEl,{width:a,height:l});let c=a/this.zoomScale,d=l/this.zoomScale;this.updateViewBox({width:c,height:d}),this.renderVisibleElements()}),this.resizeObserver.observe(i),this.updateViewBox({width:this.svgEl.clientWidth,height:this.svgEl.clientHeight}),this.edgeRenderer=new Rd({svgEl:this.svgEl,layerGroups:this.layerGroups,viewEdgeMap:this.viewEdgeMap,viewNodeMap:this.viewNodeMap,onEdgeClick:a=>{this.nodeRenderer.removeSelection(),n(a)}}),this.nodeRenderer=new Nd({svgEl:this.svgEl,layerGroups:this.layerGroups,viewNodeMap:this.viewNodeMap,onNodeClick:a=>{this.edgeRenderer.clearHighlightedEdges(),this.edgeRenderer.highlightAllNodeEdges(a),e(a)},onExpandNode:yield this.toggleExpand.bind(this)}),this.setGraph(o),this.graphProcessor=new Ad,this.createLayerGroupElements(o.hierarchyRoot),r?this.restoreGraphState(r):yield this.initialRender(o),this.addPanAndZoomListeners()})}setGraph(i){this.graph=i,this.edgeRenderer.graph=i}restoreGraphState(i){this.zoomScale=i.zoomScale,this.rootViewGraph=i.viewGraph,this.renderGraph(this.rootViewGraph),this.updateViewBox(i.viewBox),i.selectedNodeId?this.nodeRenderer.clickNodeById(i.selectedNodeId):i.selectedEdgeId&&this.edgeRenderer.clickEdge(i.selectedEdgeId)}initialRender(i){return Y(this,null,function*(){this.rootViewGraph=yield this.graphProcessor.createViewGraph(i.hierarchyRoot),this.renderGraph(this.rootViewGraph),this.centerView()})}reRender(i){return Y(this,null,function*(){this.clearGraph(),this.setGraph(i),this.createLayerGroupElements(i.hierarchyRoot),yield this.initialRender(i)})}clearGraph(){this.svgEl.innerHTML="",this.nodeRenderer.reset(),this.edgeRenderer.reset(),this.resetZoom()}createLayerGroupElements(i){let e=document.createElementNS(Gt,"g"),n=document.createElementNS(Gt,"g"),o=document.createElementNS(Gt,"g");rt(e,{id:`namespace-group-${i.namespace}`}),rt(n,{class:"edges-group"}),rt(o,{class:"nodes-group"}),this.svgEl.appendChild(e),e.appendChild(n),e.appendChild(o),this.layerGroups[i.namespace]={edgesGroup:n,nodesGroup:o};for(let r of i.children)jt(r)&&this.createLayerGroupElements(r)}renderGraph(i){this.nodeRenderer.createOrUpdateNodes(i),this.edgeRenderer.createOrUpdateEdges(i),this.renderVisibleElements()}renderVisibleElements(){this.edgeRenderer.renderVisibleEdges(this.viewBox),this.nodeRenderer.renderVisibleNodes(this.viewBox,this.zoomScale)}centerView(){let i=!0,e=!0,n=1/0,o=-1/0,r=1/0,s=-1/0;for(let d of this.rootViewGraph.nodes){n=Math.min(n,d.x),o=Math.max(o,d.x+d.width),r=Math.min(r,d.y),s=Math.max(s,d.y+d.height);let p=o-n,h=s-r;if(p>this.svgEl.clientWidth&&(i=!1),h>this.svgEl.clientHeight&&(e=!1),!i&&!e)break}let a=!1,l=!1;if(i){let d=(o-n)/2;this.updateViewBox({x:d-this.svgEl.clientWidth/2}),a=!0}if(e){let d=(s-r)/2;this.updateViewBox({y:d-this.svgEl.clientHeight/2}),l=!0}if(!(a&&l)){let d=[];for(let p of this.rootViewGraph.nodes)p.data.type?.category==="Data"&&!p.data.inputs.length&&d.push(p);d.length?this.centerViewAroundNodes(d,a,l):this.centerViewAroundNodes([this.rootViewGraph.nodes[0]],a,l)}this.renderVisibleElements()}centerViewAroundNodes(i,e,n){let o=i.map(r=>({x:r.x+r.width/2,y:r.y+r.height/2}));if(!e){let r=o[0].x;o.every(l=>l.y===o[0].y)&&(r=o.reduce((l,c)=>l+c.x,0)/o.length);let a=r-this.svgEl.clientWidth/2;this.updateViewBox({x:a})}if(!n){let r=o[0].y-this.svgEl.clientHeight*.05;this.updateViewBox({y:r})}}resetZoom(){this.zoom(this.viewBox.width/this.svgEl.clientWidth)}zoom(i){let e=this.svgEl.clientWidth/2,n=this.svgEl.clientHeight/2;this.zoomIntoPosition(e,n,i)}zoomIntoPosition(i,e,n){let o=this.zoomScale*n;if(o>8||o<.1)return;this.zoomScale=o;let r=this.viewBox.x+i/this.svgEl.clientWidth*this.viewBox.width,s=this.viewBox.y+e/this.svgEl.clientHeight*this.viewBox.height,a=this.viewBox.width/n,l=this.viewBox.height/n,c=r-i/this.svgEl.clientWidth*a,d=s-e/this.svgEl.clientHeight*l;this.updateViewBox({x:c,y:d,width:a,height:l}),this.renderVisibleElements()}addPanAndZoomListeners(){this.svgEl.addEventListener("mousedown",i=>this.startPan(i)),this.svgEl.addEventListener("mousemove",i=>this.doPan(i)),this.svgEl.addEventListener("mouseup",()=>this.endPan()),this.svgEl.addEventListener("wheel",i=>this.handleZoom(i))}handleZoom(i){i.preventDefault(),i.ctrlKey?this.zoomWithMouseWheel(i):this.panWithMouseWheel(i)}zoomWithMouseWheel(i){let n=i.deltaY<0?this.zoomFactor:1/this.zoomFactor;this.zoomIntoPosition(i.offsetX,i.offsetY,n)}panWithMouseWheel(i){let e=this.viewBox.x+i.deltaX,n=this.viewBox.y+i.deltaY;this.updateViewBox({x:e,y:n}),this.renderVisibleElements()}startPan(i){this.isDragging=!0,this.lastPosition.x=i.clientX,this.lastPosition.y=i.clientY}doPan(i){if(!this.isDragging)return;let e=(i.clientX-this.lastPosition.x)*(this.viewBox.width/this.svgEl.clientWidth),n=(i.clientY-this.lastPosition.y)*(this.viewBox.height/this.svgEl.clientHeight);this.updateViewBox({x:this.viewBox.x-e,y:this.viewBox.y-n}),this.renderVisibleElements(),this.lastPosition.x=i.clientX,this.lastPosition.y=i.clientY}endPan(){this.isDragging=!1}updateViewBox(i){this.viewBox=E(E({},this.viewBox),i),this.svgEl.setAttribute("viewBox",`${this.viewBox.x} ${this.viewBox.y} ${this.viewBox.width} ${this.viewBox.height}`)}selectAndScrollToNode(i){return Y(this,null,function*(){this.viewNodeMap[i]||(yield this.revealNode(i)),this.nodeRenderer.removeSelection(),this.edgeRenderer.clearHighlightedEdges();let e=this.viewNodeMap[i];this.nodeRenderer.selectNodeById(i),this.edgeRenderer.highlightAllNodeEdges(e.data);let n=this.nodeRenderer.getNodeCenterPosition(i);this.scrollToPosition(n.globalX,n.globalY)})}selectAndScrollToTensor(i,e){return Y(this,null,function*(){this.viewNodeMap[e.id]||(yield this.revealNode(e.id)),this.nodeRenderer.removeSelection(),this.edgeRenderer.clearHighlightedEdges(),this.edgeRenderer.renderOutputEdges(e,i);let n=this.edgeRenderer.getMidpointOfEdges(i);n?this.scrollToPosition(n.globalX,n.globalY):console.error(`Unable to scroll to tensor - no edges found for tensor "${i}"`)})}scrollToPosition(i,e){let n=i-this.viewBox.width/2,o=e-this.viewBox.height/2,r=this.viewBox.x,s=this.viewBox.y,a=500,l=25,c=Math.floor(a/l),d=0,p=setInterval(()=>{d++;let h=d/c,m=h*(2-h),S=r+(n-r)*m,y=s+(o-s)*m;this.updateViewBox({x:S,y}),this.renderVisibleElements(),d>=c&&clearInterval(p)},l)}focusNodes(i){this.nodeRenderer.focusNodes(i)}focusTensors(i){this.edgeRenderer.focusTensors(i)}revealNode(i){return Y(this,null,function*(){let e=this.graph.ancestorMap[i];this.rootViewGraph=yield this.graphProcessor.revealNode(this.rootViewGraph,e),this.renderGraph(this.rootViewGraph)})}toggleExpand(i,e){return Y(this,null,function*(){if(!jt(i.data))return;i.expanded?(this.rootViewGraph=yield this.graphProcessor.collapseNode(this.rootViewGraph,e,i.data.id),this.removeNodesAndEdgesInLayer(i)):this.rootViewGraph=yield this.graphProcessor.expandNode(this.rootViewGraph,i.data),this.renderGraph(this.rootViewGraph);let n=this.nodeRenderer.getNodeCenterPosition(i.data.id);this.scrollToPosition(n.globalX,i.globalY)})}removeNodesAndEdgesInLayer(i){for(let e of i.childGraph.edges)this.edgeRenderer.removeEdge(e);for(let e of i.childGraph.nodes)this.nodeRenderer.removeNode(e),e.childGraph&&this.removeNodesAndEdgesInLayer(e)}destroy(){this.graphProcessor?.destroy(),this.resizeObserver?.disconnect(),this.containerEl?.removeChild(this.svgEl)}};function qy(t,i,e=!1){let n=t.graphs[0],o={name:n.name||t.name,format:t.format,version:t.version,description:t.description,runtime:t.runtime,nodes:[],inputs:[],outputs:[],hierarchyRoot:void 0,nodeMap:{},layerDescendantsMap:{},ancestorMap:{},adjacencyList:{},inverseAdjacencyList:{}};o.inputs=n.inputs.flatMap(c=>il(c,i)),o.outputs=n.outputs.flatMap(c=>il(c,i)),o.nodes=n.nodes.map((c,d)=>({id:`node-${d}`,netronIndex:d,name:c.name,attributes:c.attributes.flatMap(h=>il(h,i)),description:c.description,type:KI(c.type),inputs:c.inputs.flatMap(h=>il(h,i)),outputs:c.outputs.flatMap(h=>il(h,i)),parent:void 0,namespace:e?"root":XI(c,t.format),children:[],depth:0}));let{inputToNodesMap:r,outputToNodesMap:s}=QI(o.nodes);UI(o,t,s),WI(o,t,r);let{adjacencyList:a,inverseAdjacencyList:l}=YI(o.nodes,r);o.adjacencyList=a,o.inverseAdjacencyList=l;for(let c of o.nodes)o.nodeMap[c.id]=c;return o}function il(t,i){return Array.isArray(t.value)?t.value.every(e=>typeof e=="object")?t.value.map(e=>ee(E({},t),{value:Hy(e,i)})):[ee(E({},t),{value:{nonTensor:t.value}})]:[ee(E({},t),{value:Hy(t.value,i)})]}function Hy(t,i){if(t!==null){if(typeof t=="object"){let e,n;t.type&&(e={dataType:t.type.dataType,shape:{dimensions:t.type?.shape?.dimensions},denotation:t.type.denotation});let o;if(t.initializer){n={name:t.initializer.name,type:t.initializer.type,category:t.initializer.category,location:t.initializer.location,stride:t.initializer.stride};try{!t.initializer.type?.shape?.dimensions.length&&(o=new i.Tensor(t.initializer).toString())}catch(r){n.error=r}}return{tensor:{type:e,initializer:n,name:t.name,description:t.description,identifier:t.identifier,quantization:t.quantization,qnnQuantization:t.qnnQuantization,dimensions:t.dimensions,decodedData:o}}}return{nonTensor:t}}}function UI(t,i,e){let n=[];for(let o=0;o<t.inputs.length;o++){let r=t.inputs[o],s={id:`input-${n.length}`,netronIndex:o,attributes:[],name:r.value.tensor.name,type:{name:r.name,category:"Data"},inputs:[],outputs:[r],namespace:"root",parent:void 0};n.push(s),Fd(s,s.outputs,e)}t.nodes.unshift(...n)}function WI(t,i,e){for(let n=0;n<t.outputs.length;n++){let o=t.outputs[n],r={id:`output-${n}`,netronIndex:n,attributes:[],name:o.value.tensor.name,type:{name:o.name,category:"Data"},inputs:[o],outputs:[],namespace:"root",parent:void 0};t.nodes.push(r),Fd(r,r.inputs,e)}}function QI(t){let i={},e={};for(let n of t)Fd(n,n.inputs,i),Fd(n,n.outputs,e);return{inputToNodesMap:i,outputToNodesMap:e}}function Fd(t,i,e){for(let n of i)n.value?.tensor&&(e[n.value.tensor.name]||(e[n.value.tensor.name]=[]),e[n.value.tensor.name].find(o=>o===t)||e[n.value.tensor.name].push(t))}function YI(t,i){let e={},n={};for(let o of t)for(let r of o.outputs){let s=r.value?.tensor;if(!s)continue;let a=i[r.value.tensor.name];if(a)for(let c of a)e[o.id]??={},e[o.id][c.id]??={tensors:[]},e[o.id][c.id].tensors.push(s),n[c.id]??={},n[c.id][o.id]??={tensors:[]},n[c.id][o.id].tensors.push(s)}return{adjacencyList:e,inverseAdjacencyList:n}}function XI(t,i){if(i.toLowerCase().startsWith("tensorflow lite")){let e=t.outputs[0]?.value[0];if(e?.name)return`root/${jy(e.name)}`}return(i.toLowerCase().startsWith("tensorflow")||i.toLowerCase().startsWith("onnx"))&&t.name?`root/${jy(t.name)}`:"root"}function jy(t){return t.startsWith("/")?t.slice(1):t}function KI(t){let i=t?.category;switch(i){case"Tensor":i=yt.TRANSFORM;break;case"Layer":i=yt.NN_LAYER;break;case"Pool":i=yt.POOLING;break;case void 0:i=ZI(t?.name);break}return ee(E({},t),{category:i})}function ZI(t){for(let[i,e]of Object.entries(Py))if(e.some(n=>t.toLowerCase().startsWith(n)))return i;return yt.DEFAULT}var js=(()=>{class t{constructor(e,n){this.notificationService=e,this.translate=n,this.selectedNode$=new X}highlightNodeInAllPanels(e,n){this.selectedNode$.next({nodeName:e,initiator:n})}showNotFoundNotification(e,n){this.notificationService.notify({color:"warning",label:this.translate.instant(e,{nodeName:n})})}static{this.\u0275fac=function(n){return new(n||t)(D(si),D(Ge))}}static{this.\u0275prov=ne({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var zy={GET_OP_TENSOR_MAPPING:"GET_OP_TENSOR_MAPPING"};var Vd=(()=>{class t{constructor(e){this.electronService=e,this.opTensorMappingCache={}}getOpTensorMappings(e){return Y(this,null,function*(){if(!this.opTensorMappingCache[e]){let n=yield this.electronService.runPythonFile(zy.GET_OP_TENSOR_MAPPING,e);this.opTensorMappingCache[e]=n?JSON.parse(n):void 0}return this.opTensorMappingCache[e]})}static{this.\u0275fac=function(n){return new(n||t)(D(Xe))}}static{this.\u0275prov=ne({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Bd=(()=>{class t{constructor(){}isMac(){let e=navigator.userAgent.toLowerCase();return e.includes("mac")||e.includes("darwin")}isWindows(){return navigator.userAgent.toLowerCase().includes("win")}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=ne({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Uy=(()=>{class t{constructor(e,n,o){this.platformService=e,this.tabStorageService=n,this.localStorageService=o}openOpTensorMappingsWindow(e){let n=this.platformService.isWindows()?`${e.split("\\").pop()}`:`${e.split("/").pop()}`,o=this.addPlaceholderWorkspace(`${n} Mappings`,ae.OP_TENSOR_MAPPINGS,{dlcFilePath:this.dlcFilePath,sourceModelPath:e});window.electronAPI.createUndockedWindow(JSON.stringify(o))}addPlaceholderWorkspace(e,n,o){let r=Rt(),s={workspaceId:r,label:e,link:`/workspaces/${r}`,tabType:Va.PRIMARY,dismissable:!0},a={displayedPanels:[n]},l={id:Rt(),resource:void 0,label:"<PLACEHOLDER_TAB>",panelType:ae.OP_TENSOR_MAPPINGS,data:o};return a.opTensorMappingsPanelState={subtabs:[l],activeSubtabIndex:0},this.tabStorageService.storeTabs([s],r),this.localStorageService.setItem(r,JSON.stringify(a)),s}static{this.\u0275fac=function(n){return new(n||t)(D(Bd),D(Fs),D(Mt))}}static{this.\u0275prov=ne({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var iD=["graphContent"],nD=["searchWrapper"],oD=["searchCombobox"],rD=["fileUpload"],sD=(t,i)=>i.name,Wy=t=>({width:t});function aD(t,i){t&1&&M(0,"q-progress-circle",11)}function lD(t,i){if(t&1){let e=Z();f(0,"span",13),z(1,"translate"),f(2,"q-icon-button",23),I("click",function(){R(e),v();let o=ue(1);return A(o.click())}),g()()}if(t&2){let e=v();b("qTooltip",G(1,3,e.opTensorBtnTooltip())),u(2),b("disabled",!e.hasOpTensorMappings())("icon",e.iconService.brainCircuit)}}function cD(t,i){if(t&1){let e=Z();f(0,"button",25),z(1,"translate"),I("click",function(){R(e);let o=v(2);return A(o.toggleLayers())}),g()}if(t&2){let e=v(2);b("icon",e.isFlattened()?e.iconService.layers2:e.iconService.squaresUnite)("disabled",e.graphService.graphState.isFileNotFound)("qTooltip",G(1,3,e.isFlattened()?e.GRAPH_PANEL_TRANSLATIONS.RESTORE_LAYERS_TOOLTIP:e.GRAPH_PANEL_TRANSLATIONS.FLATTEN_LAYERS_TOOLTIP))}}function dD(t,i){if(t&1&&(f(0,"div",30),M(1,"span",31),f(2,"span"),q(3),g()()),t&2){let e=i.$implicit;u(),Hn("background-color",e.color),u(2),Te(e.name)}}function pD(t,i){if(t&1&&Pe(0,dD,4,3,"div",30,sD),t&2){let e=v(2);Oe(e.legendCategories)}}function hD(t,i){if(t&1){let e=Z();f(0,"div",24)(1,"button",25),z(2,"translate"),I("click",function(){R(e);let o=v();return A(o.zoom(o.ZoomControls.ZOOM_IN))}),g(),f(3,"button",25),z(4,"translate"),I("click",function(){R(e);let o=v();return A(o.zoom(o.ZoomControls.ZOOM_OUT))}),g(),f(5,"button",25),z(6,"translate"),I("click",function(){R(e);let o=v();return A(o.zoom(o.ZoomControls.RESIZE))}),g(),T(7,cD,2,5,"button",26),g(),f(8,"div",27)(9,"q-accordion",28)(10,"q-accordion-item",29),z(11,"translate"),T(12,pD,2,0,"ng-template",null,6,ke),g()()()}if(t&2){let e=ue(13),n=v();u(),tt("qTooltip",G(2,12,"GRAPH_PANEL.ZOOM_IN")),b("icon",n.iconService.zoomIn)("disabled",n.graphService.graphState.isFileNotFound),u(2),tt("qTooltip",G(4,14,"GRAPH_PANEL.ZOOM_OUT")),b("icon",n.iconService.zoomOut)("disabled",n.graphService.graphState.isFileNotFound),u(2),tt("qTooltip",G(6,16,"GRAPH_PANEL.RESET_ZOOM")),b("icon",n.iconService.locate)("disabled",n.graphService.graphState.isFileNotFound),u(2),L(n.hasLayers()?7:-1),u(3),tt("label",G(11,18,n.GRAPH_PANEL_TRANSLATIONS.LEGEND)),b("content",e)}}function uD(t,i){t&1&&(f(0,"h3"),q(1),z(2,"translate"),g()),t&2&&(u(),Te(G(2,1,"GRAPH_PANEL.NETRON_NOT_FOUND")))}function mD(t,i){t&1&&(f(0,"h3"),q(1),z(2,"translate"),g()),t&2&&(u(),Te(G(2,1,"GRAPH_PANEL.FILE_NOT_FOUND")))}function fD(t,i){if(t&1&&M(0,"q-inline-alert",32),t&2){let e=v(2);b("description",e.modelError())}}function gD(t,i){t&1&&M(0,"q-progress-circle")}function _D(t,i){if(t&1&&T(0,fD,1,1,"q-inline-alert",32)(1,gD,1,0,"q-progress-circle"),t&2){let e=v();L(e.modelError()?0:!e.graphService.graphState.isModelPlotted||e.isGraphProcessing()?1:-1)}}var Hd=(()=>{class t{constructor(e,n,o,r,s,a,l,c,d,p,h,m,S){this.iconService=e,this.graphPanelService=n,this.graphService=o,this.translateService=r,this.appConfig=s,this.electronService=a,this.dataHandlerService=l,this.nodeHighlightService=c,this.themeService=d,this.dlcService=p,this.platformService=h,this.workspaceService=m,this.opTensorMappingsService=S,this.closeSubtab=new de,this.VIEW_OP_TENSOR_MAPPINGS_TOOLTIP=`${Qi.GRAPH_ACTION}.view_op_tensor_mappings.tooltip`,this.resizablePanels={drawerContent:{width:80,height:100,minWidth:0,minHeight:100},drawer:{width:20,height:100,minWidth:275,minHeight:100}},this.NETRON_SRC="./assets/netron_plugin/source/index.html",this.properties=vt,this.ZoomControls=sr,this.GRAPH_PANEL_TRANSLATIONS=xy,this.showOpTensorMapBtn=se(!1),this.hasOpTensorMappings=se(!1),this.opTensorBtnTooltip=Ie(()=>this.platformService.isMac()?`${this.VIEW_OP_TENSOR_MAPPINGS_TOOLTIP}.mac`:this.platformService.isWindows()?`${this.VIEW_OP_TENSOR_MAPPINGS_TOOLTIP}.windows`:this.hasOpTensorMappings()?this.VIEW_OP_TENSOR_MAPPINGS_TOOLTIP:`${this.VIEW_OP_TENSOR_MAPPINGS_TOOLTIP}.disabled`),this.searchOptions=[],this.selectedNode=se(void 0),this.graphData=se(void 0),this.isSearchProcessing=se(!1),this.isGraphProcessing=se(!1),this.decodeTool=se(void 0),this.isFlattened=se(!1),this.hasLayers=se(!1),this.modelError=se(void 0),this.legendCategories=Object.entries(Id).map(([y,w])=>({name:y,color:`var(${w})`})),this.destroyed$=new X,this.graphPanelService.checkIfModuleExists(this.NETRON_SRC)}ngOnInit(){this.applySavedDrawerDimensions(),this.workspaceId=this.graphPanelService.workspaceId}applySavedDrawerDimensions(){let e=this.subtab.data?.drawerDimensions;e&&(this.resizablePanels.drawerContent.width=e.contentWidth,this.resizablePanels.drawer.width=e.width)}ngAfterViewInit(){return Y(this,null,function*(){this.graphService.id=this.subtab.id,this.shouldLoadCachedGraph()||this.graphPanelService.setGraphState(this.workspaceId,void 0);let e=this.graphPanelService.getGraphState(this.workspaceId);e?(this.netronModel=e.netronModel,this.decodeTool.set(e.decodeTool),this.graphData.set(e.graph),this.hasLayers.set(e.hasLayers),this.isFlattened.set(e.isFlattened),yield this.renderGraph(e.graph),this.handleOpTensorMappings()):(this.initializeIframe(),this.graphPanelService.modelFetched$.pipe(ye(this.destroyed$)).subscribe(n=>{n===this.workspaceId&&(this.graphService.setGraphViewHandler(vt.SHOW_LOADER),this.iframe.setAttribute("src",this.NETRON_SRC+`?id=${this.iframe.id}`))}))})}initializeIframe(){this.iframe=this.graphPanelService.createIframe(this.subtab.id),this.graphPanelService.iframeContainer.appendChild(this.iframe),this.dataHandlerService.initializeIframe(this.iframe),this.initializeListeners()}onNodeClick(e){if(this.selectedNode.set(e),jt(e)){this.configureDecodeTool(void 0);return}e.type?.category==="Data"?this.graphService.setPropertyView({propertyType:vt.MODEL}):(this.configureDecodeTool(e),this.graphService.setPropertyView({propertyType:vt.NODE}),this.nodeHighlightService.highlightNodeInAllPanels(e.name,ae.GRAPH))}onEdgeClick(e){}configureDecodeTool(e){let n=e?this.netronModel.graphs[0].nodes[e.netronIndex]:void 0;this.decodeTool.set(ee(E({},this.decodeTool()),{netronNode:n}))}initializeListeners(){Object.values(Lr).forEach(e=>this.dataHandlerService.registerEvent(e,this.iframe)),this.eventSubscription=this.dataHandlerService.eventData$.pipe(ye(this.destroyed$)).subscribe(e=>this.eventHandler(e))}eventHandler(o){return Y(this,arguments,function*({event:e,data:n}){switch(e){case Lr.SOURCE_LOADED:{this.dataHandlerService.triggerEvent(Lr.THEME_CONTROL,this.themeService.currentTheme,this.iframe),this.graphPanelService.getGraphState(this.workspaceId)||this.graphPanelService.triggerModelLoadInNetron(this.iframe);break}case Lr.MODEL_GENERATED:{this.netronModel=this.iframe.contentWindow.model;let r=this.iframe.contentWindow.Tensor,s=this.iframe.contentWindow.Quantization;if(this.decodeTool.set({Tensor:r,Quantization:s}),!this.netronModel){this.graphPanelService.triggerModelLoadInNetron(this.iframe);return}this.handleOpTensorMappings(),this.deactivateIframe(),yield this.openGraph();break}case Lr.MODEL_ERROR:this.modelError.set(n)}})}openGraph(){return Y(this,null,function*(){let e=yield this.generateGraphWithHierarchy();this.graphData.set(e),yield this.renderGraph(this.graphData()),e.hierarchyRoot.children.some(o=>jt(o)&&!o.isArtificial)&&this.hasLayers.set(!0)})}generateGraphWithHierarchy(e=!1){return Y(this,null,function*(){let n=qy(this.netronModel,this.decodeTool(),e);return yield this.buildGraphHierarchy(n)})}buildGraphHierarchy(e){return Y(this,null,function*(){this.worker=new Worker(new URL("worker-UVGWDZ5K.js",import.meta.url),{type:"module"});let n=yield new Promise((o,r)=>{this.worker.onmessage=s=>o(s.data.graph),this.worker.onerror=s=>r(s),this.worker.postMessage({data:e})});return this.worker.terminate(),n})}createSearchOptions(e){let n=[];for(let o of e.nodes){if(!(o.type.category==="Data")){n.push({id:o.id,value:`\u25A2 ${o.name||"["+o.type.name+"]"}`,type:"node",data:o});for(let s of o.inputs){let a=s.value?.tensor?.initializer;a&&n.push({id:o.id,value:`\u25A0 ${a.name||s.value.tensor.name}`,type:"node",data:o})}}for(let s of o.outputs)n.push({id:s.value.tensor.name,value:`\u2192 ${s.value.tensor.name}`,type:"tensor",data:o})}return n}handleOpTensorMappings(){let e=this.appConfig.featureFlags.enableOpTensorMappings&&this.netronModel.format.toLowerCase()===Ba.DLC&&this.appConfig.environment.platform==="electron";if(this.showOpTensorMapBtn.set(e),!this.platformService.isMac()&&!this.platformService.isWindows()&&this.showOpTensorMapBtn()){let n=this.subtab.resource.fileData.path;Y(this,null,function*(){let r=yield this.dlcService.getOpTensorMappings(n);this.hasOpTensorMappings.set(r.data.source_mappings!==null||r.data.backend_mappings!==null),this.hasOpTensorMappings()&&(r.data.dlc_model_path=n,this.opTensorMappingsService.dlcFilePath=n,this.opTensorMappingsService.opTensorMappingsReport=r)})}}renderGraph(e){return Y(this,null,function*(){let n=this.graphContent.nativeElement;this.graphRenderer=new Ld,yield this.graphRenderer.init({graph:e,containerEl:n,onNodeClick:this.onNodeClick.bind(this),onEdgeClick:this.onEdgeClick.bind(this),state:this.graphPanelService.getGraphState(this.workspaceId)}),this.graphService.setGraphViewHandler(vt.MODEL_PLOTTED),this.searchOptions=this.createSearchOptions(this.graphData()),this.nodeHighlightService.selectedNode$.pipe(ye(this.destroyed$)).subscribe(s=>Y(this,[s],function*({nodeName:o,initiator:r}){if(r!==ae.GRAPH){let a=this.graphData().nodes.find(l=>l.name===o);a?(this.configureDecodeTool(a),this.selectedNode.set(a),yield this.graphRenderer.selectAndScrollToNode(a.id)):this.nodeHighlightService.showNotFoundNotification("GRAPH_PANEL.NODE_NOT_FOUND",o)}}))})}zoom(e){switch(e){case sr.RESIZE:this.graphRenderer.resetZoom();break;case sr.ZOOM_IN:this.graphRenderer.zoom(1.2);break;case sr.ZOOM_OUT:this.graphRenderer.zoom(.8);break}}toggleLayers(){return Y(this,null,function*(){this.isFlattened.set(!this.isFlattened()),this.isGraphProcessing.set(!0),yield this.reRender(this.isFlattened()),this.isGraphProcessing.set(!1)})}reRender(e){return Y(this,null,function*(){let n=yield this.generateGraphWithHierarchy(e);this.graphData.set(n),yield this.graphRenderer.reRender(n),this.graphService.setPropertyView({propertyType:vt.MODEL})})}onSearchStateChange(e){if(e.state==="open"){let n=this.searchWrapper.nativeElement.querySelector("input");n.autocomplete="off",n.focus()}else e.state==="closing"&&this.searchCombobox.resetValue()}selectItem(e){return Y(this,null,function*(){!e||Array.isArray(e)||(this.isSearchProcessing.set(!0),e.type==="node"?(yield this.graphRenderer.selectAndScrollToNode(e.id),this.onNodeClick(e.data)):e.type==="tensor"&&(yield this.graphRenderer.selectAndScrollToTensor(e.id,e.data)),this.isSearchProcessing.set(!1),this.searchCombobox.resetValue())})}onResizeDrawer(){this.subtab.data.drawerDimensions={contentWidth:this.resizablePanels.drawerContent.width,width:this.resizablePanels.drawer.width},this.graphPanelService.updateLocalStorage()}openOpTensorMappingsWindow(e){let n=Array.from(e.target.files);this.fileUpload.nativeElement.value="",n.length&&this.opTensorMappingsService.openOpTensorMappingsWindow(n[0].path)}deactivateIframe(){Object.values(Lr).forEach(e=>this.dataHandlerService.removeEvent(e,this.iframe)),this.eventSubscription.unsubscribe(),this.iframe.remove()}shouldLoadCachedGraph(){let e=this.graphPanelService.getGraphState(this.workspaceId);return e&&this.graphPanelService.workspaceToModelMap.get(this.workspaceId).some(n=>n.name.toLowerCase()===e.filename.toLowerCase())}ngOnDestroy(){if(this.worker?.terminate(),this.graphRenderer){let e=!this.workspaceService.getWorkspaces().find(o=>o.workspaceId===this.workspaceId),n=!!this.graphRenderer.graphState.viewGraph;!e&&n&&this.graphPanelService.setGraphState(this.workspaceId,ee(E({},this.graphRenderer.graphState),{decodeTool:this.decodeTool(),netronModel:this.netronModel,hasLayers:this.hasLayers(),isFlattened:this.isFlattened(),filename:this.subtab.resource.name??""})),this.graphRenderer.destroy()}this.iframe&&this.deactivateIframe(),this.destroyed$.next(!0),this.destroyed$.unsubscribe()}static{this.\u0275fac=function(n){return new(n||t)(_(Ce),_(bt),_(ro),_(Ge),_(St),_(Xe),_(Kn),_(js),_(Ac),_(Vd),_(Bd),_(di),_(Uy))}}static{this.\u0275cmp=F({type:t,selectors:[["app-graph-sub-panel-v2"]],viewQuery:function(n,o){if(n&1&&(Ee(iD,5),Ee(nD,5),Ee(oD,5),Ee(rD,5)),n&2){let r;me(r=fe())&&(o.graphContent=r.first),me(r=fe())&&(o.searchWrapper=r.first),me(r=fe())&&(o.searchCombobox=r.first),me(r=fe())&&(o.fileUpload=r.first)}},inputs:{subtab:"subtab"},outputs:{closeSubtab:"closeSubtab"},standalone:!0,features:[ze([ro]),B],decls:28,vars:31,consts:[["fileUpload",""],["graphResizeContainer",""],["searchWrapper",""],["searchCombobox",""],["graphContent",""],["drawer",""],["legendContent",""],["hidden","","type","file",3,"change","accept"],[1,"flex-column-grow","graph-sub-panel"],[1,"search-wrapper","d-flex","align-items-center","gap-8"],["data-testid","combo-search-nodes-edges","appendTo","portal","filterable","","virtual","","fullWidth","","showDropdownIcon","false","optionLabel","value",1,"w-100",3,"changed","stateChanged","placeholder","options","startIcon"],["size","s"],[1,"tab-spacer"],["qTooltipPlacement","top",3,"qTooltip"],["orientation","vertical",2,"height","100%"],["q-icon-button","","color","neutral","variant","ghost","size","m","qTooltipPlacement","top","qTooltipArrow","true",3,"click","icon","disabled","qTooltip"],["autosize","",1,"flex-grow-1","sidenav-container","mat-typography"],[3,"ngStyle"],[1,"d-flex","w-100","h-100"],[1,"center"],["mode","side","disableClose","true","position","end","opened","true",1,"d-flex",3,"ngStyle"],[3,"resized","direction","parentEl","resizable1","resizable2","borderless"],[3,"selectedNode","graphData","decodeTool"],["data-testid","open-op-tensor-mappings",3,"click","disabled","icon"],[1,"graph-controls"],["q-icon-button","","color","neutral","variant","ghost","size","m","qTooltipPlacement","right","qTooltipArrow","true",3,"click","icon","disabled","qTooltip"],["q-icon-button","","color","neutral","variant","ghost","size","m","qTooltipPlacement","right","qTooltipArrow","true",3,"icon","disabled","qTooltip"],[1,"graph-legend"],["defaultActiveIndex","0"],[1,"legend-accordion",3,"content","label"],[1,"legend-category"],[1,"legend-category-color"],["label","Error","color","negative",3,"description"]],template:function(n,o){if(n&1){let r=Z();f(0,"input",7,0),I("change",function(a){return R(r),A(o.openOpTensorMappingsWindow(a))}),g(),f(2,"div",8,1)(4,"mat-toolbar")(5,"div",9,2)(7,"q-combobox",10,3),z(9,"translate"),I("changed",function(a){return R(r),A(o.selectItem(a))})("stateChanged",function(a){return R(r),A(o.onSearchStateChange(a))}),g(),T(10,aD,1,0,"q-progress-circle",11),g(),M(11,"span",12),T(12,lD,3,5,"span",13),M(13,"q-divider",14),f(14,"button",15),I("click",function(){return R(r),A(o.graphService.toggleSidenav())}),g()(),f(15,"mat-drawer-container",16)(16,"mat-drawer-content",17)(17,"div",18,4),T(19,hD,14,20),f(20,"div",19),T(21,uD,3,3,"h3")(22,mD,3,3,"h3")(23,_D,2,1),g()()(),f(24,"mat-drawer",20,5)(26,"app-resize-handle",21),I("resized",function(){return R(r),A(o.onResizeDrawer())}),g(),M(27,"app-graph-side-panel-v2",22),g()()()}if(n&2){let r=ue(3);b("accept",".onnx"),u(4),Fe("visible",o.graphService.graphState.isModelPlotted),u(3),tt("placeholder",G(9,25,"GRAPH_PANEL.SEARCH_PLACEHOLDER")),b("options",o.searchOptions)("startIcon",o.iconService.search),u(3),L(o.isSearchProcessing()?10:-1),u(2),L(o.showOpTensorMapBtn()&&o.electronService.isRunningElectron()?12:-1),u(2),b("icon",o.graphService.graphState.isSidePanelOpen?o.iconService.sidebarOpen:o.iconService.sidebarClose)("disabled",o.graphService.graphState.isFileNotFound)("qTooltip",o.graphService.graphState.isSidePanelOpen?o.translateService.instant("GRAPH_PANEL.HIDE"):o.translateService.instant("GRAPH_PANEL.SHOW")),u(2),b("ngStyle",ut(27,Wy,o.graphService.graphState.isSidePanelOpen?o.resizablePanels.drawerContent.width+"%":"auto")),u(3),L(o.graphService.graphState.isModelPlotted?19:-1),u(2),L(o.graphPanelService.isNetronModuleFound?o.graphService.graphState.isFileNotFound?22:23:21),u(3),Fe("closed-drawer",!o.graphService.graphState.isSidePanelOpen),b("ngStyle",ut(29,Wy,o.graphService.graphState.isSidePanelOpen?o.resizablePanels.drawer.width+"%":"2.2rem")),u(2),b("direction","horizontal")("parentEl",r)("resizable1",o.resizablePanels.drawerContent)("resizable2",o.resizablePanels.drawer)("borderless",!0),u(),b("selectedNode",o.selectedNode())("graphData",o.graphData())("decodeTool",o.decodeTool())}},dependencies:[Gn,sn,xs,zt,fs,Ve,Ft,Wo,Le,st,Xn,Yn,hs,yc,Cc,bc,ri,Di,Ii,Ci,zi,be,Ne,Mi,Qn,or,Ko,Xo,Fy],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;flex:1;overflow:hidden}.graph-sub-panel[_ngcontent-%COMP%]{overflow:hidden}.mat-drawer-container[_ngcontent-%COMP%]{height:0}.mat-toolbar[_ngcontent-%COMP%]{background:var(--qds-background-neutral-2);padding:.5rem 0rem .5rem .5rem;height:auto;visibility:hidden;border-bottom:1px solid var(--qds-border-default-1)}.mat-toolbar.visible[_ngcontent-%COMP%]{visibility:visible}.center[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.tab-spacer[_ngcontent-%COMP%]{flex:1 1 auto}.closed-drawer[_ngcontent-%COMP%]{pointer-events:none} .mat-drawer{overflow:hidden} .q-select--option{white-space:nowrap}.search-wrapper[_ngcontent-%COMP%]{width:22rem}.graph-controls[_ngcontent-%COMP%]{display:flex;flex-direction:column;position:absolute;top:1rem;right:1rem;padding:.1rem;border:1px solid var(--qds-border-default-1);border-radius:4px;background:var(--qds-background-neutral-2);opacity:.9}.graph-legend[_ngcontent-%COMP%]{position:absolute;bottom:1rem;left:1rem;border:1px solid var(--qds-border-default-1);border-radius:4px;opacity:.8;z-index:10;transition:all .3s ease;box-shadow:0 2px 16px #0000000d,0 8px 8px #0000000d,0 1px 4px #0000001a}.graph-legend[_ngcontent-%COMP%]:hover{opacity:1}.legend-accordion[_ngcontent-%COMP%]{background:var(--qds-background-neutral-2)} .q-accordion-item--expand-icon{width:.8rem;height:.8rem}.legend-category[_ngcontent-%COMP%]{display:flex;font-size:.7rem;font-weight:400}.legend-category-color[_ngcontent-%COMP%]{width:.8rem;height:.8rem;margin:.2rem .4rem;border:1px solid var(--qds-border-default-1);border-radius:2px}"]})}}return t})();var vD=(t,i)=>i.key,bD=(t,i)=>i.tensorName,yD=()=>["d-flex","info-icon-color"],Qy=t=>({property:t});function CD(t,i){if(t&1&&(f(0,"div",3)(1,"p",7),z(2,"translate"),q(3),g()()),t&2){let e=v().$implicit,n=v();u(),b("appTooltipInfo",G(2,3,n.fetchPropertyTooltips(n.propertyType,e.key)))("tooltipClasses",Ye(5,yD)),u(2),le(" ",e.key.toUpperCase()," ")}}function wD(t,i){t&1&&He(0)}function SD(t,i){if(t&1&&(f(0,"div"),T(1,wD,1,0,"ng-container",9),g()),t&2){let e=i.$implicit;v(3);let n=ue(4);u(),b("ngTemplateOutlet",n)("ngTemplateOutletContext",ut(2,Qy,e))}}function ED(t,i){if(t&1&&(f(0,"cdk-virtual-scroll-viewport",5),T(1,SD,2,4,"div",8),g()),t&2){let e=v().$implicit;u(),b("cdkVirtualForOf",e.value)}}function TD(t,i){t&1&&He(0)}function xD(t,i){if(t&1&&T(0,TD,1,0,"ng-container",9),t&2){let e=i.$implicit;v(3);let n=ue(4);b("ngTemplateOutlet",n)("ngTemplateOutletContext",ut(2,Qy,e))}}function PD(t,i){if(t&1&&Pe(0,xD,1,4,"ng-container",null,Cr),t&2){let e=v().$implicit;Oe(e.value)}}function OD(t,i){if(t&1&&(T(0,CD,4,6,"div",3),f(1,"div",4),T(2,ED,2,1,"cdk-virtual-scroll-viewport",5)(3,PD,2,0),g(),M(4,"q-divider",6)),t&2){let e=i.$implicit,n=v();L(e.key!=="General"?0:-1),u(2),L(e.value.length>n.VIRTUALIZATION_THRESHOLD?2:3)}}function ID(t,i){if(t&1&&(f(0,"p",15),q(1),g(),M(2,"q-divider")),t&2){let e=i.$implicit;u(),Te(e)}}function DD(t,i){if(t&1&&Pe(0,ID,3,1,null,null,Cr),t&2){let e=v(2).$implicit;Oe(e.tensorInfo)}}function MD(t,i){if(t&1&&(f(0,"q-accordion",12)(1,"q-accordion-item",14),T(2,DD,2,0,"ng-template",null,1,ke),g()()),t&2){let e=ue(3),n=v().$implicit;u(),tt("label",n.tensorName),b("content",e)}}function RD(t,i){if(t&1){let e=Z();f(0,"q-text-input",16),zn("ngModelChange",function(o){R(e);let r=v().$implicit;return qn(r.tensorName,o)||(r.tensorName=o),A(o)}),g()}if(t&2){let e=v().$implicit;jn("ngModel",e.tensorName)}}function AD(t,i){if(t&1&&T(0,MD,4,2,"q-accordion",12)(1,RD,1,1,"q-text-input",13),t&2){let e=i.$implicit;L(e.tensorInfo.length?0:1)}}function kD(t,i){if(t&1&&(f(0,"div",10)(1,"p",11),q(2),g(),f(3,"div"),Pe(4,AD,2,1,null,null,bD),g()()),t&2){let e=i.$implicit;u(),tt("qTooltip",e.key),u(),le(" ",e.key," "),u(2),Oe(e.value)}}function ND(t,i){if(t&1&&(Pe(0,kD,6,2,"div",10,Cr),z(2,"keyvalue")),t&2){let e=i.property;Oe(G(2,0,e))}}function LD(t,i){t&1&&(f(0,"p",2),q(1),z(2,"translate"),g()),t&2&&(u(),le(" ",G(2,1,"GRAPH_PANEL.USER_NOTE")," "))}var Yy=(()=>{class t{constructor(){this.netronProperties=[],this.netronPropertiesMap=new Map,this.VIRTUALIZATION_THRESHOLD=50}ngOnChanges(e){if(e.netronProperties.currentValue!==e.netronProperties.previousValue){this.netronPropertiesMap=new Map;for(let n of this.netronProperties){let o=Object.keys(n)[0],r=n[o];this.netronPropertiesMap.set(o,r)}}}fetchPropertyTooltips(e,n){switch(n.toUpperCase()){case"INPUTS":return"GRAPH_PANEL."+e.toUpperCase()+"_INPUTS_TOOLTIP";case"OUTPUTS":return"GRAPH_PANEL."+e.toUpperCase()+"_OUTPUTS_TOOLTIP";case"ATTRIBUTES":return"GRAPH_PANEL."+e.toUpperCase()+"_ATTRIBUTES_TOOLTIP";default:return""}}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=F({type:t,selectors:[["app-netron-properties-view"]],inputs:{netronProperties:"netronProperties",propertyType:"propertyType"},standalone:!0,features:[$e,B],decls:6,vars:3,consts:[["properties",""],["elementContent",""],[1,"text","user-note"],[1,"d-flex","gap-8","align-items-center","w-100"],[1,"property"],["itemSize","32"],[1,"divider"],["tooltipPosition","top-start",1,"header",3,"appTooltipInfo","tooltipClasses"],[4,"cdkVirtualFor","cdkVirtualForOf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"property-alignment"],["qTooltipPlacement","bottom",1,"text","key",3,"qTooltip"],[1,"netron-subProprties"],["size","s","readonly","","fullWidth","",1,"netron-input-text",3,"ngModel"],["size","s",1,"netron-property-accordion",3,"label","content"],[1,"text","sub-element"],["size","s","readonly","","fullWidth","",1,"netron-input-text",3,"ngModelChange","ngModel"]],template:function(n,o){n&1&&(Pe(0,OD,5,2,null,null,vD),z(2,"keyvalue"),T(3,ND,3,2,"ng-template",null,0,ke)(5,LD,3,3,"p",2)),n&2&&(Oe(G(2,1,o.netronPropertiesMap)),u(5),L(o.propertyType==="node"&&!o.netronProperties.length?5:-1))},dependencies:[Le,st,ri,Di,Ii,Xn,Yn,zt,on,_t,Qt,ji,Sr,be,Ne,vn,cc,pc,qo,oi,ci],styles:[".property-alignment[_ngcontent-%COMP%]{display:grid;grid-template-columns:20% 1fr;column-gap:1rem;row-gap:1rem;align-items:center;width:100%}.header[_ngcontent-%COMP%]{font-size:.85em;font-weight:560;line-height:1rem;letter-spacing:.03em;text-align:left;margin:1rem 0;color:var(--qds-text-primary-1)}.property[_ngcontent-%COMP%]{margin:1rem .4rem}.key[_ngcontent-%COMP%]{text-align:end;font-weight:400;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:0}.sub-element[_ngcontent-%COMP%]{white-space:pre-wrap;margin-top:.5rem}.divider[_ngcontent-%COMP%]{margin-top:1rem}.user-note[_ngcontent-%COMP%]{text-align:center}.text[_ngcontent-%COMP%]{color:var(--qds-text-primary-1);opacity:.6;font-weight:200;font-size:.85em;line-height:1rem;font-style:normal;overflow-wrap:anywhere}.netron-input-text[_ngcontent-%COMP%]{background-color:var(--qds-background-neutral-2);color:var(--qds-text-primary-1);font-weight:400;font-size:.85em;line-height:1rem;font-style:normal}.netron-property-accordion[_ngcontent-%COMP%] .q-accordion-item--root{min-width:0}cdk-virtual-scroll-viewport[_ngcontent-%COMP%]{height:50vh}"]})}}return t})();var Xy=()=>["info-icon-color"];function FD(t,i){t&1&&(f(0,"div",8)(1,"span",9),z(2,"translate"),q(3),z(4,"translate"),g()()),t&2&&(u(),b("appTooltipInfo",G(2,3,"GRAPH_PANEL.MODEL_PROPERTIES_TOOLTIP"))("tooltipClasses",Ye(7,Xy)),u(2),le(" ",G(4,5,"GRAPH_PANEL.MODEL_PROPERTIES")," "))}function VD(t,i){if(t&1&&M(0,"app-netron-properties-view",10),t&2){let e=v(2);b("netronProperties",e.graphService.graphState.modelProperties)("propertyType",e.artifacts.MODEL)}}function BD(t,i){if(t&1&&T(0,VD,1,2,"app-netron-properties-view",10),t&2){let e=v();L(e.graphService.graphState.isModelPropertiesRequested?0:-1)}}function HD(t,i){t&1&&(f(0,"div",8)(1,"span",9),z(2,"translate"),q(3),z(4,"translate"),g()()),t&2&&(u(),b("appTooltipInfo",G(2,3,"GRAPH_PANEL.NODE_PROPERTIES_TOOLTIP"))("tooltipClasses",Ye(7,Xy)),u(2),le(" ",G(4,5,"GRAPH_PANEL.NODE_PROPERTIES")," "))}function jD(t,i){if(t&1&&M(0,"app-netron-properties-view",10),t&2){let e=v(2);b("netronProperties",e.graphService.graphState.nodeProperties)("propertyType",e.properties.NODE)}}function qD(t,i){if(t&1&&T(0,jD,1,2,"app-netron-properties-view",10),t&2){let e=v();L(e.graphService.graphState.isNodePropertiesRequested?0:-1)}}var Ky=(()=>{class t{constructor(e,n,o){this.iconService=e,this.graphPanelService=n,this.translateService=o,this.properties=vt,this.artifacts=Vt,this.destroyed$=new X}ngOnDestroy(){this.destroyed$.next(!0),this.destroyed$.unsubscribe()}static{this.\u0275fac=function(n){return new(n||t)(_(Ce),_(bt),_(Ge))}}static{this.\u0275cmp=F({type:t,selectors:[["app-graph-side-panel"]],inputs:{graphService:"graphService",subtab:"subtab"},standalone:!0,features:[B],decls:13,vars:8,consts:[["modelPropertiesLabel",""],["modelPropertiesContent",""],["nodePropertiesLabel",""],["nodePropertiesContent",""],[1,"d-flex","drawer-inner-container"],[1,"w-100"],[1,"netron-properties","flex-grow-1"],["size","s",3,"opened","closed","label","startIcon","content","expanded"],[1,"d-flex","w-100","align-items-center","gap-8"],["tooltipPosition","bottom",3,"appTooltipInfo","tooltipClasses"],[3,"netronProperties","propertyType"]],template:function(n,o){if(n&1){let r=Z();f(0,"div",4)(1,"div",5)(2,"q-accordion",6)(3,"q-accordion-item",7),I("opened",function(){return R(r),A(o.graphService.setPropertyView({propertyType:o.artifacts.MODEL}))})("closed",function(){return R(r),A(o.graphService.unsetProperty(o.artifacts.MODEL))}),T(4,FD,5,8,"ng-template",null,0,ke)(6,BD,1,1,"ng-template",null,1,ke),g(),f(8,"q-accordion-item",7),I("opened",function(){return R(r),A(o.graphService.setPropertyView({propertyType:o.properties.NODE}))})("closed",function(){return R(r),A(o.graphService.unsetProperty(o.properties.NODE))}),T(9,HD,5,8,"ng-template",null,2,ke)(11,qD,1,1,"ng-template",null,3,ke),g()()()()}if(n&2){let r=ue(5),s=ue(7),a=ue(10),l=ue(12);u(3),b("label",r)("startIcon",o.iconService.settings2)("content",s)("expanded",o.graphService.graphState.isModelPropertiesRequested),u(5),b("label",a)("startIcon",o.iconService.gitFork)("content",l)("expanded",o.graphService.graphState.isNodePropertiesRequested)}},dependencies:[sn,ri,Di,Ii,Yy,be,Ne,xr,_t,Mi,ci],styles:["[_nghost-%COMP%]{height:100%;flex:1;overflow-x:hidden}.drawer-inner-container[_ngcontent-%COMP%]{border-top:1px solid var(--qds-border-default-1);height:100%} .mat-drawer-inner-container{display:flex;height:100%} .q-tabs--nav{margin:0 .5rem}.analysis-wrapper[_ngcontent-%COMP%]{visibility:hidden}.analysis-wrapper.visible[_ngcontent-%COMP%]{visibility:visible}.report-dropdown-margin[_ngcontent-%COMP%]{margin:0 1rem .5rem}"]})}}return t})();var zD=["dialogData",""];function GD(t,i){if(t&1&&(f(0,"div",6)(1,"span",7),q(2),z(3,"translate"),g(),M(4,"q-icon",8),z(5,"translate"),g()),t&2){let e=v();u(2),Te(G(3,3,"SUBGRAPH_DIALOG.SUBGRAPH_SIZE")),u(2),b("icon",e.iconService.info)("qTooltip",G(5,5,"SUBGRAPH_DIALOG.SUBGRAPH_SIZE_TOOLTIP"))}}function $D(t,i){if(t&1&&M(0,"q-text-input",5),t&2){let e=v(),n=ue(7);b("label",n)("error",e.errorHandlerService.getFormStateError(e.subgraphForm,"subgraphSize"))}}var Zy=(()=>{class t{constructor(e,n,o){this.fb=e,this.iconService=n,this.errorHandlerService=o,this.numberValidator=[nn.required,...fy(1),nn.pattern("^[0-9]*$")],this.destroy$=new X,this.DEFAULT_SUBGRAPH_SIZE=1e3}ngOnInit(){this.subgraphForm=this.initializeForm(),this.dialogData.next(this.subgraphForm.getRawValue());let e=this.subgraphForm.get("graphView"),n=this.subgraphForm.get("subgraphSize");e.valueChanges.pipe(ye(this.destroy$)).subscribe(o=>{let r=o==="subgraph"?this.numberValidator:void 0;n.setValidators(r),n.updateValueAndValidity()}),this.subgraphForm.valueChanges.pipe(ye(this.destroy$)).subscribe(()=>this.dialogData.next(this.subgraphForm.invalid?void 0:this.subgraphForm.getRawValue()))}initializeForm(){return this.fb.group({graphView:["subgraph",nn.required],subgraphSize:[this.DEFAULT_SUBGRAPH_SIZE,this.numberValidator]})}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.unsubscribe()}static{this.\u0275fac=function(n){return new(n||t)(_(a_),_(Ce),_(Vs))}}static{this.\u0275cmp=F({type:t,selectors:[["app-subgraph-dialog","dialogData",""]],inputs:{dialogData:"dialogData"},standalone:!0,features:[B],attrs:zD,decls:15,vars:14,consts:[["subgraphInfo",""],[1,"d-flex","flex-column","gap-16",3,"formGroup"],["formControlName","graphView","qRadioGroup","",1,"d-flex","gap-16","graph-view-control"],["value","subgraph",3,"label"],["value","full",3,"label"],["formControlName","subgraphSize",3,"label","error"],[1,"q-body-xs","d-flex","align-items-center","gap-4","subgraph-size-label-wrapper"],[1,"subgraph-size-label"],["size","xs",3,"icon","qTooltip"]],template:function(n,o){n&1&&(f(0,"div"),q(1),z(2,"translate"),g(),f(3,"div"),q(4),z(5,"translate"),g(),T(6,GD,6,7,"ng-template",null,0,ke),f(8,"form",1)(9,"fieldset",2),M(10,"q-radio",3),z(11,"translate"),M(12,"q-radio",4),z(13,"translate"),g(),T(14,$D,1,2,"q-text-input",5),g()),n&2&&(u(),Te(G(2,6,"SUBGRAPH_DIALOG.SUBTITLE1")),u(3),Te(G(5,8,"SUBGRAPH_DIALOG.SUBTITLE2")),u(4),b("formGroup",o.subgraphForm),u(2),b("label",G(11,10,"SUBGRAPH_DIALOG.VIEW_SUBGRAPH")),u(2),b("label",G(13,12,"SUBGRAPH_DIALOG.VIEW_FULL_GRAPH")),u(2),L(o.subgraphForm.get("graphView").value==="subgraph"?14:-1))},dependencies:[_t,gc,Qt,fc,Dt,qi,Rc,Tv,xv,zt,on,Le,st,zo,_c,vc,be,Ne],styles:[".subgraph-size-label-wrapper[_ngcontent-%COMP%]{margin-bottom:.5rem}.graph-view-control[_ngcontent-%COMP%]{margin-top:1rem}"]})}}return t})();var qs=(()=>{class t{constructor(e,n,o,r,s){this.dataHandlerService=e,this.graphPanelService=n,this.notificationService=o,this.translate=r,this.windowService=s,this.selectedNode$=new X}highlightNodeInGraphAndReports(e,n){let o=Na.NODE_NAME+n;this.dataHandlerService.triggerEvent(at.HIGHLIGHT,o,e)}highlightNodeInReports(e){this.selectedNode$.next(e)}highlightNode(e){let n=this.graphPanelService.activeIframe;n&&this.windowService.displayedPanels().includes(ae.GRAPH)?this.highlightNodeInGraphAndReports(n,e):this.highlightNodeInReports(e)}showNotFoundNotification(e,n){this.notificationService.notify({color:"warning",label:this.translate.instant(e,{nodeName:n})})}static{this.\u0275fac=function(n){return new(n||t)(D(Kn),D(bt),D(si),D(Ge),D(Si))}}static{this.\u0275prov=ne({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var UD=["graphContent"],WD=["iframe"],QD=["searchWrapper"],YD=["searchCombobox"],XD=["subgraphDialogRef"],KD=["optracePanelContainer"],Jy=t=>({width:t});function ZD(t,i){if(t&1){let e=Z();f(0,"mat-toolbar")(1,"div",12,2)(3,"q-combobox",13,3),z(5,"translate"),I("changed",function(o){R(e);let r=v();return A(r.selectItem(o))})("stateChanged",function(o){R(e);let r=v();return A(r.onSearchStateChange(o))}),g()(),f(6,"button",14),z(7,"translate"),I("click",function(){R(e);let o=v();return A(o.zoom(o.ZoomControls.ZOOM_IN))}),g(),f(8,"button",14),z(9,"translate"),I("click",function(){R(e);let o=v();return A(o.zoom(o.ZoomControls.ZOOM_OUT))}),g(),f(10,"button",14),z(11,"translate"),I("click",function(){R(e);let o=v();return A(o.zoom(o.ZoomControls.RESIZE))}),g(),M(12,"span",15)(13,"q-divider",16),f(14,"button",14),I("click",function(){R(e);let o=v();return A(o.graphService.toggleSidenav())}),g()()}if(t&2){let e=v();u(3),tt("placeholder",G(5,15,"GRAPH_PANEL.SEARCH_PLACEHOLDER")),b("options",e.graphService.graphState.searchResults)("startIcon",e.iconService.search),u(3),tt("qTooltip",G(7,17,"GRAPH_PANEL.ZOOM_IN")),b("icon",e.iconService.zoomIn)("disabled",e.graphService.graphState.isFileNotFound),u(2),tt("qTooltip",G(9,19,"GRAPH_PANEL.ZOOM_OUT")),b("icon",e.iconService.zoomOut)("disabled",e.graphService.graphState.isFileNotFound),u(2),tt("qTooltip",G(11,21,"GRAPH_PANEL.RESET_ZOOM")),b("icon",e.iconService.locate)("disabled",e.graphService.graphState.isFileNotFound),u(4),b("icon",e.graphService.graphState.isSidePanelOpen?e.iconService.sidebarOpen:e.iconService.sidebarClose)("disabled",e.graphService.graphState.isFileNotFound)("qTooltip",e.graphService.graphState.isSidePanelOpen?e.translateService.instant("GRAPH_PANEL.HIDE"):e.translateService.instant("GRAPH_PANEL.SHOW"))}}function JD(t,i){t&1&&M(0,"div",9,4)}function eM(t,i){t&1&&(f(0,"h3"),q(1),z(2,"translate"),g()),t&2&&(u(),Te(G(2,1,"GRAPH_PANEL.NETRON_NOT_FOUND")))}function tM(t,i){t&1&&(f(0,"h3"),q(1),z(2,"translate"),g()),t&2&&(u(),Te(G(2,1,"GRAPH_PANEL.FILE_NOT_FOUND")))}function iM(t,i){t&1&&M(0,"q-progress-circle")}function nM(t,i){if(t&1&&(f(0,"div",10),T(1,eM,3,3,"h3")(2,tM,3,3,"h3")(3,iM,1,0,"q-progress-circle"),g()),t&2){let e=v();u(),L(e.graphPanelService.isNetronModuleFound?e.graphService.graphState.isFileNotFound?2:3:1)}}function oM(t,i){if(t&1){let e=Z();f(0,"mat-drawer",17,5)(2,"app-resize-handle",18),I("resized",function(){R(e);let o=v();return A(o.onResizeDrawer())}),g(),M(3,"app-graph-side-panel",19),g()}if(t&2){let e=v(),n=ue(1);Fe("closed-drawer",!e.graphService.graphState.isSidePanelOpen),b("ngStyle",ut(10,Jy,e.graphService.graphState.isSidePanelOpen?e.resizablePanels.drawer.width+"%":"2.2rem")),u(2),b("direction","horizontal")("parentEl",n)("resizable1",e.resizablePanels.drawerContent)("resizable2",e.resizablePanels.drawer)("borderless",!0),u(),b("subtab",e.subtab)("graphService",e.graphService)}}function rM(t,i){if(t&1&&M(0,"app-subgraph-dialog",20),t&2){let e=v();b("dialogData",e.dialogData$)}}var eC=(()=>{class t{constructor(e,n,o,r,s,a,l,c,d){this.iconService=e,this.graphPanelService=n,this.graphService=o,this.translateService=r,this.dataHandlerService=s,this.dialog=a,this.cdRef=l,this.nodeHighlightService=c,this.themeService=d,this.closeSubtab=new de,this.dialogData$=new it(void 0),this.resizablePanels={netronPanel:{width:100,height:50,minWidth:100,minHeight:100},optracePanel:{width:100,height:100,minWidth:100,minHeight:36},drawerContent:{width:60,height:100,minWidth:0,minHeight:100},drawer:{width:40,height:100,minWidth:275,minHeight:100}},this.NETRON_SRC="./assets/netron_plugin/source/index.html",this.properties=vt,this.ZoomControls=sr,this.destroyed$=new X,this.BORDER_WIDTH=1,this.sourceLoadedEventReceived=!1,this.controls={[at.INFO_CONTROL]:this.graphService.infoHandler.bind(this.graphService),[at.PROPERTY_REQUEST]:this.propertyReqHandler.bind(this),[at.EVENT_CONTROL]:this.eventHandler.bind(this),[at.SEARCH]:this.graphService.searchReqHandler.bind(this.graphService),[at.SUBGRAPH_DIALOG.SHOW]:this.openSubgraphDialog.bind(this)},this.graphPanelService.checkIfModuleExists(this.NETRON_SRC)}ngOnInit(){this.initializeIframe(),this.applySavedDrawerDimensions(),this.themeService.getThemeListenerForIframe$(at.THEME_CONTROL,this.iframe).pipe(ye(this.destroyed$)).subscribe()}applySavedDrawerDimensions(){let{drawerDimensions:e}=this.subtab.data;e&&(this.resizablePanels.drawerContent.width=e.contentWidth,this.resizablePanels.drawer.width=e.width)}ngAfterViewChecked(){if(this.iframe&&this.graphContent){let e=this.graphContent.nativeElement.getBoundingClientRect();this.iframe.style.left=e.left+"px",this.iframe.style.top=e.top+"px",this.iframe.style.width=e.width-this.BORDER_WIDTH+"px",this.iframe.style.height=e.height-this.BORDER_WIDTH+"px",this.cdRef.detectChanges()}}ngAfterViewInit(){this.graphPanelService.modelFetched$.pipe(ye(this.destroyed$)).subscribe(()=>{this.graphPanelService.getCachedIframe(this.subtab.id)||(this.graphService.setGraphViewHandler(vt.SHOW_LOADER),this.iframe.setAttribute("src",this.NETRON_SRC))});let e=this.graphPanelService.getCachedIframe(this.subtab.data?.optraceId);e?.height&&(this.resizablePanels.optracePanel.height=parseFloat(e.height),this.resizablePanels.netronPanel.height=100-parseFloat(e.height)),this.cdRef.detectChanges()}initializeIframe(){this.graphService.id=this.subtab.id;let e=this.graphPanelService.getCachedIframe(this.subtab.id);e?.iframe?(this.iframe=e.iframe,this.iframe.style.display="block",this.graphService.restoreGraphState()):(this.iframe=this.graphPanelService.createIframe(this.subtab.id),this.graphPanelService.iframeContainer.appendChild(this.iframe)),this.dataHandlerService.initializeIframe(this.iframe),this.initializeListeners()}initializeListeners(){this.dataHandlerService.registerEvent(at.INFO_CONTROL,this.iframe),this.dataHandlerService.registerEvent(at.PROPERTY_REQUEST,this.iframe),this.dataHandlerService.registerEvent(at.SEARCH,this.iframe),this.dataHandlerService.registerEvent(at.EVENT_CONTROL,this.iframe),this.dataHandlerService.registerEvent(at.SUBGRAPH_DIALOG.SHOW,this.iframe),this.dataHandlerService.registerEvent(at.OUTPUT_TO_NODE_MAP,this.iframe),this.eventSubscription=this.dataHandlerService.eventData$.pipe(ye(this.destroyed$)).subscribe(e=>this.controlMap(e))}controlMap(e){let n=this.controls[e.event];n&&n(e.data)}propertyReqHandler(e){switch(e.propertyType){case"node":{let n=e.nodeId.split(Na.NODE_NAME)[1]||e.nodeId.split(Na.NODE_ID)[1];n&&(this.nodeHighlightService.highlightNodeInReports(n),e.nodeNotFound?this.nodeHighlightService.showNotFoundNotification("GRAPH_PANEL.NODE_NOT_FOUND",n):this.fetchAndDisplayProperties(e));break}case"model":{this.fetchAndDisplayProperties(e);break}default:console.error(`Unsupported propertyType ${e.propertyType}`)}}fetchAndDisplayProperties(e){this.dataHandlerService.triggerEvent(at.INFO_CONTROL,"",this.iframe),this.graphService.setPropertyView(e)}eventHandler(e){switch(e){case vt.SOURCE_LOADED:{this.dataHandlerService.triggerEvent(at.THEME_CONTROL,this.themeService.currentTheme,this.iframe),this.graphPanelService.getCachedIframe(this.subtab.id)||this.graphPanelService.triggerModelLoadInNetron(this.iframe),this.sourceLoadedEventReceived=!0;break}case vt.MODEL_PLOTTED:{if(!this.sourceLoadedEventReceived)return;this.graphService.setGraphViewHandler(vt.MODEL_PLOTTED),this.iframe.style.visibility="visible",this.graphPanelService.cacheGraph(this.subtab.id,this.iframe);break}}}zoom(e){this.dataHandlerService.triggerEvent(at.ZOOM,e,this.iframe)}triggerSearchEvent(e){this.dataHandlerService.triggerEvent(at.SEARCH,e,this.iframe)}onSearchStateChange(e){if(e.state==="opening")this.triggerSearchEvent("");else if(e.state==="open"){let n=this.searchWrapper.nativeElement.querySelector("input");n.autocomplete="off",n.focus()}else e.state==="closing"&&(this.graphService.searchReqHandler([]),this.searchCombobox.resetValue())}selectItem(e){!e||Array.isArray(e)||(this.dataHandlerService.triggerEvent(at.HIGHLIGHT,e.id,this.iframe),this.searchCombobox.resetValue())}destroyEvents(e){this.dataHandlerService.removeEvent(at.INFO_CONTROL,e),this.dataHandlerService.removeEvent(at.PROPERTY_REQUEST,e),this.dataHandlerService.removeEvent(at.EVENT_CONTROL,e),this.dataHandlerService.removeEvent(at.SEARCH,e),this.dataHandlerService.removeEvent(at.SUBGRAPH_DIALOG.SHOW,e)}deactivateIframe(e){e.style.display="none",this.destroyEvents(e),this.eventSubscription.unsubscribe(),this.graphPanelService.removeUnplottedIframe(e,this.subtab.id)}openSubgraphDialog(){let e=this.dialog.open(io,{minWidth:"30vw",data:{title:this.translateService.instant("SUBGRAPH_DIALOG.TITLE"),acceptButtonText:this.translateService.instant("CONTINUE"),isAcceptButtonPositive:!0,componentData:this.dialogData$,dialogAcceptedClosedCallback:o=>{n.unsubscribe(),o.accepted?e.close(o):this.closeSubtab.emit()}}});e.componentInstance.modalContentTemplate=this.subgraphDialogRef;let n=this.dialogData$.subscribe(o=>e.componentInstance.disableSubmit=!o);e.afterClosed().subscribe(o=>{if(o.accepted){let r=o.data.getValue(),s=r.graphView==="subgraph"?r.subgraphSize:void 0;this.dataHandlerService.triggerEvent(at.SUBGRAPH_DIALOG.SUBMIT,s,this.iframe)}})}onResize(){let e=this.graphPanelService.cachedIframes.get(this.subtab.data.optraceId);e.height=String(this.resizablePanels.optracePanel.height),this.graphPanelService.cachedIframes.put(this.subtab.data.optraceId,e)}onResizeDrawer(){this.subtab.data.drawerDimensions={contentWidth:this.resizablePanels.drawerContent.width,width:this.resizablePanels.drawer.width},this.graphPanelService.updateLocalStorage()}ngOnDestroy(){this.iframe&&this.deactivateIframe(this.iframe),this.destroyed$.next(!0),this.destroyed$.unsubscribe()}static{this.\u0275fac=function(n){return new(n||t)(_(Ce),_(bt),_(ro),_(Ge),_(Kn),_(Zn),_(tn),_(qs),_(Ac))}}static{this.\u0275cmp=F({type:t,selectors:[["app-graph-sub-panel"]],viewQuery:function(n,o){if(n&1&&(Ee(UD,5),Ee(WD,5),Ee(QD,5),Ee(YD,5),Ee(XD,5),Ee(KD,5,Ae)),n&2){let r;me(r=fe())&&(o.graphContent=r.first),me(r=fe())&&(o.iframeRef=r.first),me(r=fe())&&(o.searchWrapper=r.first),me(r=fe())&&(o.searchCombobox=r.first),me(r=fe())&&(o.subgraphDialogRef=r.first),me(r=fe())&&(o.optracePanelContainerRef=r.first)}},inputs:{subtab:"subtab"},outputs:{closeSubtab:"closeSubtab"},standalone:!0,features:[ze([ro]),B],decls:10,vars:6,consts:[["graphResizeContainer",""],["subgraphDialogRef",""],["searchWrapper",""],["searchCombobox",""],["graphContent",""],["drawer",""],[1,"flex-column-grow","graph-sub-panel"],["autosize","",1,"flex-grow-1","sidenav-container","mat-typography"],[3,"ngStyle"],[1,"d-flex","w-100","h-100"],[1,"center"],["mode","side","disableClose","true","position","end","opened","true",1,"d-flex",3,"closed-drawer","ngStyle"],[1,"search-wrapper","d-flex","align-items-center","gap-8"],["data-testid","combo-search-nodes-edges","appendTo","portal","filterable","","virtual","","fullWidth","","showDropdownIcon","false","optionLabel","value",1,"w-100",3,"changed","stateChanged","placeholder","options","startIcon"],["q-icon-button","","color","neutral","variant","ghost","size","m","qTooltipPlacement","top","qTooltipArrow","true",3,"click","icon","disabled","qTooltip"],[1,"tab-spacer"],["orientation","vertical",2,"height","100%"],["mode","side","disableClose","true","position","end","opened","true",1,"d-flex",3,"ngStyle"],[3,"resized","direction","parentEl","resizable1","resizable2","borderless"],[3,"subtab","graphService"],[3,"dialogData"]],template:function(n,o){n&1&&(f(0,"div",6,0),T(2,ZD,15,23,"mat-toolbar"),f(3,"mat-drawer-container",7)(4,"mat-drawer-content",8),T(5,JD,2,0,"div",9)(6,nM,4,1,"div",10),g(),T(7,oM,4,12,"mat-drawer",11),g(),T(8,rM,1,1,"ng-template",null,1,ke),g()),n&2&&(u(2),L(o.graphService.graphState.isModelPlotted?2:-1),u(2),b("ngStyle",ut(4,Jy,o.graphService.graphState.isSidePanelOpen?o.resizablePanels.drawerContent.width+"%":"auto")),u(),L(o.graphService.graphState.isModelPlotted?5:6),u(2),L(o.graphService.graphState.isModelPlotted?7:-1))},dependencies:[Gn,sn,xs,zt,fs,Ve,Wo,Le,st,Xn,Yn,hs,yc,Cc,bc,ri,Ci,zi,be,Ne,Zy,Mi,Qn,or,Ky],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;flex:1;overflow:hidden}.graph-sub-panel[_ngcontent-%COMP%]{overflow:hidden}.mat-toolbar[_ngcontent-%COMP%]{background:var(--qds-background-neutral-2);padding:.5rem 0rem .5rem .5rem;height:auto}.mat-toolbar[_ngcontent-%COMP%] q-text-input[_ngcontent-%COMP%]{max-width:15rem}mat-drawer-container[_ngcontent-%COMP%]{background:var(--qds-background-neutral-2)!important}.center[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.tab-spacer[_ngcontent-%COMP%]{flex:1 1 auto}.closed-drawer[_ngcontent-%COMP%]{pointer-events:none} .mat-drawer{overflow:hidden}.search-wrapper[_ngcontent-%COMP%]{width:18rem}"]})}}return t})();var sM=(t,i)=>i.id;function aM(t,i){if(t&1){let e=Z();f(0,"app-subtabs",1),I("activeSubtabUpdated",function(o){R(e);let r=v();return A(r.onActiveSubtabUpdated(o))})("subtabClosed",function(o){R(e);let r=v();return A(r.onSubtabClosed(o))}),g()}if(t&2){let e=v();b("panelType",e.panelTypes.GRAPH)("subtabs",e.graphPanelService.subtabs)("activeSubtabIndex",e.graphPanelService.activeSubtabIndex)}}function lM(t,i){if(t&1){let e=Z();f(0,"app-graph-sub-panel-v2",3),I("closeSubtab",function(){R(e);let o=v(2).$index,r=v();return A(r.onSubtabClosed(o))}),g()}if(t&2){let e=v(2).$implicit;b("subtab",e)}}function cM(t,i){if(t&1){let e=Z();f(0,"app-graph-sub-panel",3),I("closeSubtab",function(){R(e);let o=v(2).$index,r=v();return A(r.onSubtabClosed(o))}),g()}if(t&2){let e=v(2).$implicit;b("subtab",e)}}function dM(t,i){if(t&1&&T(0,lM,1,1,"app-graph-sub-panel-v2",2)(1,cM,1,1,"app-graph-sub-panel",2),t&2){let e=v(2);L(e.environment.graphV2Enabled?0:1)}}function pM(t,i){if(t&1&&T(0,dM,2,1),t&2){let e=i.$implicit,n=v();L((n.graphPanelService.activeSubtab==null?null:n.graphPanelService.activeSubtab.id)===e.id?0:-1)}}var tC=(()=>{class t{constructor(e,n,o,r,s,a,l,c){this.iconService=e,this.graphPanelService=n,this.workspaceService=o,this.translateService=r,this.notificationsService=s,this.translationService=a,this.route=l,this.appConfig=c,this.classList="flex-column-grow",this.panelTypes=ae,this.modalData={title:this.translateService.instant("GRAPH_PANEL.VISUALIZE"),acceptButtonText:this.translateService.instant("OPEN"),isAcceptButtonPositive:!0,disableSubmit:!0},this.environment=oo,this.showSubtabs=this.appConfig.ui.showSubtabs}onSelectCollection(e){let{collectionName:n}=e,o;o?this.graphPanelService.addSubtab(n,{id:o.id,name:o.name}):this.notificationsService.notify({color:$i.ERROR,label:this.translationService.instant("ERRORS.UNABLE_TO_DISPLAY_COLLECTION")})}onActiveSubtabUpdated(e){this.graphPanelService.setActiveSubtabIndex(e)}onSubtabClosed(e){this.graphPanelService.removeSubtab(e)}static{this.\u0275fac=function(n){return new(n||t)(_(Ce),_(bt),_(di),_(Wn),_(si),_(Ge),_(wc),_(St))}}static{this.\u0275cmp=F({type:t,selectors:[["app-graph-panel"]],hostVars:2,hostBindings:function(n,o){n&2&&Pi(o.classList)},standalone:!0,features:[B],decls:3,vars:1,consts:[[3,"panelType","subtabs","activeSubtabIndex"],[3,"activeSubtabUpdated","subtabClosed","panelType","subtabs","activeSubtabIndex"],[3,"subtab"],[3,"closeSubtab","subtab"]],template:function(n,o){n&1&&(T(0,aM,1,3,"app-subtabs",0),Pe(1,pM,1,1,null,null,sM)),n&2&&(L(o.showSubtabs?0:-1),u(),Oe(o.graphPanelService.subtabs))},dependencies:[rr,eC,Hd,be]})}}return t})();var iC="opTensorMappingsPanelState",zs=(()=>{class t extends li{constructor(e,n,o,r,s){super(n,o),this.appConfig=e,this.dlcService=r,this.electronService=s}setWorkspace(e){return Y(this,null,function*(){this.electronService.isRunningElectron()&&this.appConfig.environment.platform==="electron-undocked"&&(Nn(t.prototype,this,"setWorkspace").call(this,e,iC),yield this.restoreActiveSubtab())})}restoreActiveSubtab(){return Y(this,null,function*(){let e=this.activeSubtab?.data.dlcFilePath;if(!e)return;let{sourceModelPath:n,backendModelPath:o}=this.activeSubtab.data;if(!n&&!o)throw new Error("A source model path and/or backend model path must be defined");this.opTensorMappings=yield this.dlcService.getOpTensorMappings(e),this.sourceModelData=yield this.electronService.createStreamingFileFromPath(n),this.dlcModelData=yield this.electronService.createStreamingFileFromPath(e)})}setSubtabData(e,n=this.activeSubtab){n.data=E(E({},n.data),e),super.updateLocalStorage(iC)}loadModel(e,n){switch(e){case"source":n.updateFileMap([{file:this.sourceModelData,id:Rt(),name:this.sourceModelData.name}]);break;case"dlc":n.updateFileMap([{file:this.dlcModelData,id:Rt(),name:this.dlcModelData.name}]);break;case"backend":throw new Error("Backend model loading not yet supported")}}static{this.\u0275fac=function(n){return new(n||t)(D(St),D(Mt),D(Ht),D(Vd),D(Xe))}}static{this.\u0275prov=ne({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var hM=["iframeContainer"];function uM(t,i){if(t&1&&M(0,"app-graph-sub-panel-v2",2),t&2){let e=v();b("subtab",e.subtab())}}var oC=(()=>{class t{constructor(e,n){this.graphPanelService=e,this.opTensorMappingsPanelService=n,this.subtab=Ot.required(),this.modelType=Ot.required(),this.renderGraph=se(!1)}ngAfterViewInit(){this.graphPanelService.iframeContainer=this.iframeContainer.nativeElement,this.renderGraph.set(!0),this.opTensorMappingsPanelService.loadModel(this.modelType(),this.graphPanelService)}static{this.\u0275fac=function(n){return new(n||t)(_(bt),_(zs))}}static{this.\u0275cmp=F({type:t,selectors:[["app-graph-sub-panel-v2-wrapper"]],viewQuery:function(n,o){if(n&1&&Ee(hM,5),n&2){let r;me(r=fe())&&(o.iframeContainer=r.first)}},inputs:{subtab:[1,"subtab"],modelType:[1,"modelType"]},standalone:!0,features:[ze([bt,Kn,Rv]),B],decls:3,vars:1,consts:[["iframeContainer",""],[1,"iframe-container"],[1,"h-100",3,"subtab"]],template:function(n,o){n&1&&(M(0,"div",1,0),T(2,uM,1,1,"app-graph-sub-panel-v2",2)),n&2&&(u(2),L(o.renderGraph()?2:-1))},dependencies:[Hd],encapsulation:2})}}return t})();var rC=t=>({width:t}),sC=(()=>{class t{constructor(e){this.opTensorMappingsPanelService=e,this.resizablePanels={drawerContent:{width:50,height:100,minWidth:275,minHeight:100},drawer:{width:50,height:100,minWidth:275,minHeight:100}}}ngOnInit(){this.sourceGraphSubtab={id:Rt(),resource:{id:Rt(),name:"Source Graph",fileData:this.opTensorMappingsPanelService.sourceModelData},label:"Source Graph",panelType:ae.GRAPH},this.dlcGraphSubtab={id:Rt(),resource:{id:Rt(),name:"DLC Graph",fileData:this.opTensorMappingsPanelService.dlcModelData},label:"DLC Graph",panelType:ae.GRAPH}}static{this.\u0275fac=function(n){return new(n||t)(_(zs))}}static{this.\u0275cmp=F({type:t,selectors:[["app-op-tensor-mappings"]],standalone:!0,features:[B],decls:7,vars:15,consts:[["graphResizeContainer",""],[1,"d-flex","h-100"],[1,"flex-1",3,"ngStyle"],[1,"flex-1",3,"subtab","modelType"],[3,"direction","parentEl","resizable1","resizable2","borderless"]],template:function(n,o){if(n&1&&(f(0,"div",1,0)(2,"div",2),M(3,"app-graph-sub-panel-v2-wrapper",3),g(),M(4,"app-resize-handle",4),f(5,"div",2),M(6,"app-graph-sub-panel-v2-wrapper",3),g()()),n&2){let r=ue(1);u(2),b("ngStyle",ut(11,rC,o.resizablePanels.drawerContent.width+"%")),u(),b("subtab",o.sourceGraphSubtab)("modelType","source"),u(),b("direction","horizontal")("parentEl",r)("resizable1",o.resizablePanels.drawerContent)("resizable2",o.resizablePanels.drawer)("borderless",!1),u(),b("ngStyle",ut(13,rC,o.resizablePanels.drawer.width+"%")),u(),b("subtab",o.dlcGraphSubtab)("modelType","dlc")}},dependencies:[mt,Gn,oC,or]})}}return t})();var jd="#5172CA",qd="#8DC176",aC="#FFC754",lC="#FB7465",cC="#6DBAE1",dC="#339571",pC="#FF8D4D",hC="#9F6BB7",uC="#F48CCF",zd="#C4C2C2",Io=[jd,qd,aC,lC,cC,dC,pC,hC,uC];function Cm(t){return Do(Io,t)}function Do(t,i){return i%=t.length,t[i]}function Gd(t,i){t=t.replace("#","");let e=Math.round(i*255).toString(16).padStart(2,"0");return`#${t}${e}`}function wm(t,i){return t=t.replace(/^#/,""),[parseInt(t.substring(0,2),16),parseInt(t.substring(2,4),16),parseInt(t.substring(4,6),16)].reduce((e,n)=>{let o=Math.min(255,Math.floor(n+(255-n)*i/100)).toString(16).padStart(2,"0");return e+o},"#")}function Ri(t,i){return getComputedStyle(i).getPropertyValue(t).trim()}function nl(t){return!t||t.trim()===""}var so=class extends Error{constructor(i){super(`Expected ${i.expected}, but got ${i.actual}`),this.name="SchemaValidationError"}};var mM=Object.defineProperty,fM=(t,i,e)=>i in t?mM(t,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[i]=e,mC=(t,i,e)=>fM(t,typeof i!="symbol"?i+"":i,e),ol=class{constructor(i,e){mC(this,"observer"),mC(this,"element"),this.element=i,this.observer=new ResizeObserver(n=>{n.forEach(()=>e())})}observe(){this.observer.observe(this.element)}disconnect(){this.observer.disconnect()}};function fC(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var gM=Object.defineProperty,_M=(t,i,e)=>i in t?gM(t,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[i]=e,gC=(t,i,e)=>_M(t,typeof i!="symbol"?i+"":i,e),Sm={exports:{}};function _C(t,i=100,e={}){if(typeof t!="function")throw new TypeError(`Expected the first parameter to be a function, got \`${typeof t}\`.`);if(i<0)throw new RangeError("`wait` must not be negative.");let{immediate:n}=typeof e=="boolean"?{immediate:e}:e,o,r,s,a,l;function c(){let h=o,m=r;return o=void 0,r=void 0,l=t.apply(h,m),l}function d(){let h=Date.now()-a;h<i&&h>=0?s=setTimeout(d,i-h):(s=void 0,n||(l=c()))}let p=function(...h){if(o&&this!==o&&Object.getPrototypeOf(this)===Object.getPrototypeOf(o))throw new Error("Debounced method called with different contexts of the same prototype.");o=this,r=h,a=Date.now();let m=n&&!s;return s||(s=setTimeout(d,i)),m&&(l=c()),l};return p.clear=()=>{s&&(clearTimeout(s),s=void 0)},p.flush=()=>{s&&p.trigger()},p.trigger=()=>{l=c(),p.clear()},p}Sm.exports.debounce=_C;Sm.exports=_C;var vM=Sm.exports,bM=fC(vM),rl=class{constructor(i,e){gC(this,"observer"),gC(this,"element"),this.element=i;let n=bM(([o])=>e(o.isIntersecting),300);this.observer=new IntersectionObserver(n)}observe(){this.observer.observe(this.element)}unobserve(){this.observer.unobserve(this.element)}};var Et={TITLES_SUBTABS_OP_INSTANCES:"Op Instances",TITLES_SUBTABS_OP_TYPES:"Op Types",TITLES_TABLE_DOMINANT_PATH_CYCLES:"HTP Dominant Path Cycles",TITLES_TABLE_HTP_OP_INSTANCES:"HTP Op Instances",TITLES_TABLE_HTP_OP_TYPES:"HTP Op Types",TITLES_TABLE_HTP_RESOURCES:"HTP Resources",TITLES_TABLE_OVERALL_SUMMARY:"HTP Overall Summary",TITLES_TABLE_PROPERTIES:"Properties",TITLES_TABLE_QNN_OP_INSTANCES:"QNN Op Instances (Nodes)",TITLES_TABLE_QNN_OP_TYPES:"QNN Op Types",TITLES_TABS_HTP_OPS_DETAILS:"HTP Ops Details",TITLES_TABS_OVERALL_SUMMARY:"HTP Overall Summary",TITLES_TABS_QNN_OPS_DETAILS:"QNN Ops Details",TOOLTIPS_TABLE_HTP_DOMINANT_PATH_SHOW_NESTED_TABLE:"Click 'Show details' to view dominant path cycle details for each HTP core",TOOLTIPS_TABLE_HTP_OP_INSTANCES_SHOW_NESTED_TABLE:"Click 'Show details' to view more properties of the HTP op instance",TOOLTIPS_TABLE_OVERALL_SUMMARY:"The HTP Overall Summary and Ops Details provide user-friendly, summarized data from running models with HTP runtime. Details include overall HTP resource utilization, active cycles, dominant cycle path, and tracing back to the original QNN graph.",TOOLTIPS_TABLE_OVERALL_SUMMARY_SHOW_NESTED_TABLE:"Click 'Show details' to view the metrics of each HTP thread",TOOLBAR_ACTION_SORT_ERROR_CANNOT_SORT:"Unable to sort chart. Please try again.",TOOLBAR_ACTION_SORT_OPTION_NONE_LABEL:"No Sorting",TOOLBAR_ACTION_SORT_OPTION_HIGH_TO_LOW_LABEL:"High to Low",TOOLBAR_ACTION_SORT_OPTION_LOW_TO_HIGH_LABEL:"Low to High",TOOLBAR_ACTION_SORT_LABEL:"Sort by:",TOOLBAR_ACTION_RESTORE_TOOLTIP:"Reset chart",TOOLBAR_ACTION_TOGGLE_CHART_LABELS_TOOLTIP:"Click to toggle chart labels off and on"};var $d={aria:{enabled:!0},textStyle:{fontFamily:"Roboto Flex"},tooltip:{axisPointer:{type:"shadow"},backgroundColor:"black",borderColor:"black",textStyle:{color:"white"}}};var Ud="1.0.0 - 2.0.0";var yM=Object.defineProperty,CM=(t,i,e)=>i in t?yM(t,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[i]=e,sl=(t,i,e)=>CM(t,typeof i!="symbol"?i+"":i,e),cn=class{constructor(i){sl(this,"tableTitle"),sl(this,"tableTooltip"),sl(this,"data"),sl(this,"columns"),sl(this,"nestedTableProperties"),Object.assign(this,i),i.nestedTableProperties&&this.setNestedTable(i.nestedTableProperties)}getColumnsWithExpandButton(i){return[...this.columns,i]}setNestedTable(i){this.nestedTableProperties=i,this.columns=this.getColumnsWithExpandButton(i.expandColumn)}};var wM=Object.defineProperty,SM=(t,i,e)=>i in t?wM(t,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[i]=e,EM=(t,i,e)=>SM(t,typeof i!="symbol"?i+"":i,e),dn=class{constructor(i){EM(this,"MAX_XAXIS_LABEL_CHARS",30),this.qhasDataSeriesService=i}generateHtpThreadsSummaryChartConfig(i){let e=[...i].sort((c,d)=>d.tid-c.tid),n=this.qhasDataSeriesService.getDataSeriesForHtpThreadsSummary(e),o=Ri("--q-text-1-primary",document.body),r=Ri("--q-border-1-default",document.body),s=e.map(c=>`${c.type}
|
|
19
|
-
|
|
20
|
-
TID ${c.tid}`),a=[e.map(c=>c.utilization),e.map(c=>c.timeline_cycles),e.map(c=>c.cycles_used)],l=[...this.generateBaseDatasetForBarCharts(n,s,"threadId")];return ee(E({},this.getCommonBarChartConfigs(n.filter(c=>c.display??!0).map(c=>c.seriesName),"")),{tooltip:{trigger:"axis",axisPointer:{type:"shadow"},formatter:c=>this.htpThreadsTooltipFormatter(c,a)},xAxis:[{type:"value",min:0,max:100,axisLabel:{show:!1},axisLine:{show:!0,lineStyle:{color:r}},splitLine:{lineStyle:{color:r}}}],yAxis:{type:"category",axisLabel:{fontSize:12,color:o}},dataset:l,series:n.map((c,d)=>({name:c.seriesName,type:"bar",datasetIndex:0,color:Do(Io,d),tooltip:{valueFormatter:this.parseFloatData},label:{show:!0,position:"inside",align:"center",formatter:p=>this.htpThreadsSeriesLabelFormatter(p,a)}}))})}generateStackedBarChartConfig(i,e,n){let o=this.generateBaseDatasetForBarCharts(i,e,n);return ee(E({},this.getCommonVerticalBarChartConfigs(o,i,n)),{series:i.filter(r=>r.display??!0).map((r,s)=>({id:r.datasetColumn,name:r.seriesName,type:"bar",stack:"total",datasetIndex:0,encode:{x:n,y:r.datasetColumn},color:Do(Io,s),tooltip:{valueFormatter:this.parseFloatData}}))})}generateComparisonBarChartConfig(i,e,n){let o=this.generateBaseDatasetForBarCharts(i,e,n);return ee(E({},this.getCommonVerticalBarChartConfigs(o,i,n)),{series:i.map((r,s)=>({id:r.datasetColumn,name:r.seriesName,type:"bar",barGap:"0",datasetIndex:0,encode:{x:n,y:r.datasetColumn},color:Do(Io,s),tooltip:{valueFormatter:this.parseFloatData}}))})}generateTopCategoriesPieChartConfig(i){let e=i.data??[],n=e.map(o=>o.name);return ee(E({},this.getCommonTopCategoriesPieChartConfig(n)),{series:[{type:"pie",radius:"50%",center:["50%","30%"],selectedMode:"multiple",label:{fontSize:14},encode:{itemName:"name",value:"value"},data:e.map((o,r)=>({name:o.name,value:o.value,itemStyle:{color:o.name.toLowerCase()==="other"?zd:Do(Io,r)}}))}]})}generateTopCategoriesPieChartConfigFromDataset(i){return ee(E({},this.getCommonTopCategoriesPieChartConfig([])),{dataset:i,series:[{type:"pie",radius:"50%",center:["50%","30%"],selectedMode:"multiple",label:{fontSize:14},datasetIndex:0,itemStyle:{color:e=>e.name.toLowerCase()==="other"?zd:Do(Io,e.dataIndex)}}]})}getCommonTopCategoriesPieChartConfig(i){let e=Ri("--q-text-1-primary",document.body),n=Ri("--q-background-1",document.body),o=Ri("--q-border-1-default",document.body);return ee(E({aria:{enabled:!0}},this.getCommonConfigs()),{tooltip:{trigger:"item",formatter:"{b} : {d}%",backgroundColor:n,borderColor:o,textStyle:{color:e}},legend:{data:i.length>0?i:void 0,textStyle:{color:e},bottom:0},grid:{left:"10%",right:"10%",top:"15%",bottom:"10%",containLabel:!0}})}generateKPIChartConfig(i){let e=Ri("--q-text-1-primary",document.body),n=[],o=[],r=[],s=[],a=100/i.data.length,l=a*.8;return i.data.forEach((c,d)=>{let p=d*l-8;n.push({left:`${Math.round(p)}%`,right:`${Math.round(100-(p+a))}%`,top:16,bottom:0,containLabel:!0}),o.push({type:"category",data:[c.name],position:"top",axisLine:{show:!1},axisLabel:{show:!0,color:e,fontSize:14,verticalAlign:"middle"},axisTick:{show:!1},splitLine:{show:!1},gridIndex:d}),r.push({type:"value",axisLine:{show:!1},axisLabel:{show:!1},axisTick:{show:!1},splitLine:{show:!1},gridIndex:d});let h=Do(Io,d);s.push({name:c.name,type:"bar",xAxisIndex:d,yAxisIndex:d,data:[{value:50,label:{show:!0,fontSize:"2rem",formatter:`${parseFloat(c.value.toFixed(2))}${c.unit==="percentage"?"%":""} `,color:e,align:"center",position:"inside",verticalAlign:"middle"},itemStyle:{color:{type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:.05,color:wm(h,50)},{offset:.05,color:h}]}}}]})}),ee(E({},this.generateTitleConfig("KPIs")),{legend:{show:!1},tooltip:{show:!1},grid:n,xAxis:o,yAxis:r,series:s})}htpThreadsTooltipFormatter(i,e){return(Array.isArray(i)?i:[i]).map(n=>{let o=this.htpThreadsSeriesLabelFormatter(n,e);return`${n.seriesName}: ${o}`}).join("<br />")}htpThreadsSeriesLabelFormatter(i,e){var n;return`${this.parseFloatData((n=e[i.seriesIndex??0])==null?void 0:n[i.dataIndex])??"N/A"}`}getUpdatedSeriesConfigForDataset(i,e){let n=Array.isArray(i.series)?i.series:[i.series];return{xAxis:i.xAxis,yAxis:i.yAxis,series:n.map(o=>ee(E({},o),{datasetIndex:e}))}}getFilteredTransform(i,e){return{type:"filter",config:{dimension:i,"=":e}}}getSortTransform(i,e){return{type:"sort",config:{dimension:i,order:e}}}getTransformedDataset(i,e,n){let o={};if(!e&&n===void 0)return o;let r=Array.isArray(i.dataset)?i.dataset:[i.dataset];if(e?.datasetIndex!==void 0&&n===void 0)return E({dataset:r},this.getUpdatedSeriesConfigForDataset(i,e.datasetIndex));let s=[...r],a=this.createTransformedDataset(n,e);return a.length>0&&s.push({transform:a}),E({dataset:s},this.getUpdatedSeriesConfigForDataset(i,s.length-1))}createTransformedDataset(i,e){let n=[],o=e?.datasetIndex!==void 0;if(i!==void 0){let r=i;o&&(r=i.map(s=>E({fromDatasetIndex:e?.datasetIndex},s))),n.push(...r)}return e&&!o&&n.push(this.getSortTransform(`${e.dimension}`,e.order??"asc")),n}setAxesLabelsVisibility(i,e){return(Array.isArray(i)?i:[i]).map(n=>(n.axisLabel=n.axisLabel||{},n.axisLabel.show=e,n))}setPieChartsLabelsVisibility(i,e){return(Array.isArray(i)?i:[i]).map(n=>(n.type!=="pie"||(n.label=n.label||{},n.label.show=e),n))}setChartLabelsVisibility(i,e,n){let{setXAxisLabels:o,setSeriesLabels:r,setYAxisLabels:s}=e,a={};return o&&(a.xAxis=this.setAxesLabelsVisibility(i.xAxis??[],n)),s&&(a.yAxis=this.setAxesLabelsVisibility(i.yAxis??[],n)),r&&(a.series=this.setPieChartsLabelsVisibility(i.series??[],n)),a}generateBaseDatasetForBarCharts(i,e,n){let o=i.map(r=>r.datasetColumn);return[{dimensions:[n,...o],source:e.reduce((r,s,a)=>{let l=[s,...i.map(c=>c.data[a].value)];return r.push(l),r},[])}]}parseFloatData(i){let e=parseFloat(i?.toString()??"");return!i||isNaN(e)?i:parseFloat(e.toFixed(2))}getCommonBarChartConfigs(i,e){let n=Ri("--q-text-1-primary",document.body),o=Ri("--q-border-1-default",document.body);return ee(E({},this.getCommonConfigs()),{tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},legend:{data:i,textStyle:{color:n},right:0,top:"4%"},grid:{left:"10%",right:"10%",top:"15%",bottom:"10%",containLabel:!0},yAxis:{type:"value",name:e,nameTextStyle:{fontSize:12,color:n},splitLine:{lineStyle:{color:o}}}})}generateTitleConfig(i,e){return{title:E({text:i,show:!1},e||{})}}getCommonConfigs(i){return E({backgroundColor:Ri("--q-background-2",document.body)},i)}truncate(i,e){return i.length>e?i.substring(0,e)+"...":i}getCommonVerticalBarChartConfigs(i,e,n){var o;let r=Ri("--q-text-1-primary",document.body),s=e.filter(a=>a.display??!0).map(a=>a.seriesName);return ee(E({aria:{enabled:!0}},this.getCommonBarChartConfigs(s,((o=e[0])==null?void 0:o.unit)??"Unknown")),{xAxis:{type:"category",name:nl(n)?"Unknown":n.trim(),axisLabel:{rotate:45,fontSize:12,interval:0,color:r,formatter:a=>this.truncate(a,this.MAX_XAXIS_LABEL_CHARS)},nameTextStyle:{fontSize:12,color:r}},dataZoom:[{type:"slider",show:!0,xAxisIndex:0,start:0,end:10},{type:"inside",xAxisIndex:0,start:0,end:10}],dataset:i})}};var ar=class{getSortOptions(i,e="vertical"){let n={id:"default",name:Et.TOOLBAR_ACTION_SORT_OPTION_NONE_LABEL,datasetIndex:0};return i.length===0?[n]:i.reduce((o,r)=>{let s=["asc","desc"],a=e==="vertical"?Et.TOOLBAR_ACTION_SORT_OPTION_LOW_TO_HIGH_LABEL:Et.TOOLBAR_ACTION_SORT_OPTION_HIGH_TO_LOW_LABEL,l=e==="vertical"?Et.TOOLBAR_ACTION_SORT_OPTION_HIGH_TO_LOW_LABEL:Et.TOOLBAR_ACTION_SORT_OPTION_LOW_TO_HIGH_LABEL,c=s.map(d=>{let p=`${r.name}: ${d==="asc"?a:l}`;return{id:`srt-${p}`,name:p,dimension:r.id,order:d}});return o.push(...c),o},[n])}getSortableOptions(i,e,n="vertical"){let o=this.getSortOptions(i,n);return Object.keys(e).length===0?o:o.filter((r,s)=>s===0||Object.keys(e).length===0?!0:Object.keys(e).some(a=>r.name.includes(a)?e[a]:!1))}};var TM=Object.defineProperty,xM=(t,i,e)=>i in t?TM(t,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[i]=e,ao=(t,i,e)=>xM(t,typeof i!="symbol"?i+"":i,e),lr=class{constructor(i,e,n){ao(this,"activeDomPathOption",{title:"Active vs Dominant Path Cycles",value:"activeDomPathCycles",position:"bottom",chartConfigCallback:o=>({bottomCharts:[{sortable:!0,config:this.getActiveDominantPathCyclesChart(o),toggleXAxisLabels:!0,toggleYAxisLabels:!1,toggleSeriesLabels:!1}],topCharts:[]})}),ao(this,"memoryAccessChartOption",{title:"Memory Access Comparison",value:"memoryAccessComparison",position:"bottom",chartConfigCallback:o=>({bottomCharts:[{sortable:!0,config:this.getMemoryAccessChart(o),toggleXAxisLabels:!0,toggleYAxisLabels:!1,toggleSeriesLabels:!1}],topCharts:[]})}),ao(this,"topInstancesOption",{title:"Top Operation Instances",value:"topOpInstances",position:"bottom",chartConfigCallback:o=>({bottomCharts:[{sortable:!1,config:this.getTopOperationsForTotalOpInstances(o),toggleXAxisLabels:!1,toggleYAxisLabels:!1,toggleSeriesLabels:!0}],topCharts:[]})}),ao(this,"topDomPathCyclesOption",{title:"Top Dominant Path Cycles By Type",value:"topDomPathCycles",position:"bottom",chartConfigCallback:o=>({bottomCharts:[{sortable:!1,config:this.getTopTypesForDominantPathCycles(o),toggleXAxisLabels:!1,toggleYAxisLabels:!1,toggleSeriesLabels:!0}],topCharts:[]})}),ao(this,"optionSort",(o,r)=>o.title.localeCompare(r.title)),ao(this,"commonChartOptions",[this.memoryAccessChartOption]),ao(this,"qnnOptypeChartOptions",[this.activeDomPathOption,...this.commonChartOptions].sort(this.optionSort)),ao(this,"qnnOpInstancesChartOptions",this.qnnOptypeChartOptions),ao(this,"htpOptypeChartOptions",[...this.qnnOptypeChartOptions,this.topInstancesOption].sort(this.optionSort)),ao(this,"htpOpInstancesChartOptions",[...this.commonChartOptions,this.topDomPathCyclesOption].sort(this.optionSort)),this.qhasDataSeriesService=i,this.qhasTableService=e,this.qhasChartConfigurationService=n}getChartOptions(i){return{overallSummary:[i.htpOverallSummary.map((e,n)=>({title:`Core ${n}`,value:n,chartConfigCallback:this.getSummaryCharts.bind(this,i,n)}))],qnnOpInstances:[this.qnnOptypeChartOptions,this.qnnOpInstancesChartOptions],htpOpInstances:[this.htpOptypeChartOptions,this.htpOpInstancesChartOptions]}}getCoreOptions(i){return{overallSummary:[[]],qnnOpInstances:[[],[]],htpOpInstances:[[],i.htpOverallSummary.map((e,n)=>({title:`Core ${n}`,value:n}))]}}getActiveDominantPathCyclesChart(i){if(i.every(e=>e.kind==="QNNOperationInstanceNodeDetails"||e.kind==="HTPOperationTypeDetails"||e.kind==="QNNOperationTypeDetails")){let e=i.map(o=>o.kind==="QNNOperationInstanceNodeDetails"?o.qnn_op.trim():o.op.trim()),n=this.qhasDataSeriesService.getDataSeriesForActiveDominantPathCycles(i);return ee(E(E({},this.generateTitleConfig("Active vs Dominant Path Cycles")),this.qhasChartConfigurationService.generateComparisonBarChartConfig(n,e,"Operations")),{aria:{enabled:!0,label:{description:"Compares the percentage of active cycles against the percentage of dominant path cycles for each operation"}}})}throw new Error("Unsupported data type: Active vs Dominant Path Cycles chart cannot be generated.")}getMemoryAccessChart(i){let e=i.map(o=>{let r;switch(o.kind){case"QNNOperationInstanceNodeDetails":r=o.qnn_op;break;case"HTPOperationInstanceNodeDetails":r=`${o.htp_op} (${o.op_id})`;break;case"HTPOperationTypeDetails":case"QNNOperationTypeDetails":r=o.op;break;default:throw new Error(`Memory access chart not supported for data type ${JSON.stringify(o)}`)}return r.trim()}),n=this.qhasDataSeriesService.getDataSeriesForMemoryAccess(i);return ee(E(E({},this.generateTitleConfig("Memory Access By Operation")),this.qhasChartConfigurationService.generateStackedBarChartConfig(n,e,"Operations")),{aria:{enabled:!0,label:{description:"Shows operations' total DRAM and VTCM activity classified by type (read/write)"}}})}getTopTypesForDominantPathCycles(i){if(i.length>0&&i[0].kind==="HTPOperationInstanceNodeDetails"){let e=i;return ee(E(E({},this.generateTitleConfig("% Dominant Path Cycles By Type")),this.qhasChartConfigurationService.generateTopCategoriesPieChartConfigFromDataset(this.qhasDataSeriesService.getDatasetForDominantPathCyclesByType(e))),{aria:{enabled:!0,label:{description:"Shows percentage of cycles on the critical path grouped by task type. Note: N/A means task was not associated with a specific parent Op. Typically, these are tasks like System Service where chunks of data are prefetched into L2 cache for future ops to use"}}})}else if(i.length>0)throw new Error("% dominant path cycles by type chart not supported for this data type");throw new Error("No data given to generate % dominant path cycles by type chart")}getTopOperationsForTotalOpInstances(i){if(i.length>0&&i[0].kind==="HTPOperationTypeDetails")return ee(E(E({},this.generateTitleConfig("Top Operations By Instance Count")),this.qhasChartConfigurationService.generateTopCategoriesPieChartConfig(this.qhasDataSeriesService.getDataSeriesForTopHtpOpInstances(i))),{aria:{enabled:!0,label:{description:"Shows the operations that make up 95% of total instances. If there are more than 10 operations within the 95%, the extra ones are grouped into the 'Other' category."}}});throw i.length>0?new Error("Top operations by instance count not supported for this data type"):new Error("No data given to generate top operations by instance count chart")}getSummaryCharts(i,e){if(i.htpOverallSummary.length-1<e)throw new Error(`No data given to generate summary charts for core ${e}`);let n=ee(E(E({},this.generateTitleConfig("HTP Thread Details")),this.qhasChartConfigurationService.generateHtpThreadsSummaryChartConfig(i.htpOverallSummary[e].htp_resources)),{aria:{enabled:!0,label:{description:"Provides quick metrics for each HTP thread for the given core such as utilization %, timeline cycles, and cycles used."}}}),o=[i.qnnOpTypes,i.qnnOpInstancesNodes,i.htpOpTypes,i.htpOpInstances].map(r=>{let s=this.qhasDataSeriesService.getDataSeriesForTopDominantPath(r);return{sortable:!1,toggleSeriesLabels:!0,toggleXAxisLabels:!1,toggleYAxisLabels:!1,config:ee(E(E({},this.generateTitleConfig(`${this.operationDetailKindLabel(r[0])}: Top Operations - Dominant Path Cycles %`)),this.qhasChartConfigurationService.generateTopCategoriesPieChartConfig(s[e]??[])),{aria:{enabled:!0,label:{description:"Shows the operations that make up 95% of total dominant path cycles. If there are more than 10 operations within the 95%, the extra ones are grouped into the 'Other' category."}}})}});return{topCharts:[{sortable:!1,config:this.qhasChartConfigurationService.generateKPIChartConfig({seriesName:"KPIs",unit:"percentage",datasetColumn:"value",data:[{name:"Utilization %",value:i.htpOverallSummary[e].percent_utilization,unit:"percentage"},{name:"Inf/s",value:i.htpOverallSummary[e].inf_per_s,unit:"number"}]}),toggleXAxisLabels:!1,toggleYAxisLabels:!1,toggleSeriesLabels:!1}],bottomCharts:[{sortable:!1,config:n,toggleXAxisLabels:!1,toggleYAxisLabels:!0,toggleSeriesLabels:!1},...o]}}getChartConfigsFor(i,e,n){let o=Array.isArray(i)?i:[i],r=this.qhasTableService.tabToTableMap[e][n].data;return o.reduce((s,a)=>{let{bottomCharts:l,topCharts:c}=a.chartConfigCallback(r);return s.bottomCharts.push(...l.map(d=>(d.config=E(E({},$d),d.config),d))),s.topCharts.push(...c.map(d=>(d.config=E(E({},$d),d.config),d))),s},{bottomCharts:[],topCharts:[]})}generateTitleConfig(i,e){return{title:E({text:i,show:!1},e||{})}}operationDetailKindLabel(i){switch(i.kind){case"HTPOperationInstanceNodeDetails":return"HTP Op Instances";case"HTPOperationTypeDetails":return"HTP Op Types";case"QNNOperationInstanceNodeDetails":return"QNN Op Instances";case"QNNOperationTypeDetails":return"QNN Op Types";default:return"Unknown"}}};function bC(t){return["HTPOperationInstanceNodeDetails","QNNOperationInstanceNodeDetails","HTPOperationTypeDetails","QNNOperationTypeDetails"].includes(t.kind)}var PM=Object.defineProperty,OM=(t,i,e)=>i in t?PM(t,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[i]=e,IM=(t,i,e)=>OM(t,typeof i!="symbol"?i+"":i,e),En=class{constructor(){IM(this,"OTHER","Other")}getDataSeriesForActiveDominantPathCycles(i){let e=0;i.length>0&&(e=i[0].dominant_path_cycles.length);let n=[];for(let o=0;o<e;o++)n.push({seriesName:`% Dominant Path Cycles (Core ${o})`,datasetColumn:`dominant_path_cycles_core_${o}`,unit:"% Cycles",data:i.map(r=>({value:r.dominant_path_cycles[o].percent_dominant_path_cycles,unit:"cycles",name:"% Dominant Path Cycles"}))});return[{seriesName:"% Active Cycles",datasetColumn:"percent_active_cycles",unit:"% Cycles",data:i.map(o=>({value:o.percent_active_cycles,unit:"cycles",name:"% Active Cycles"}))},...n]}getDataSeriesForHtpThreadsSummary(i){let e=Math.max(...i.map(o=>o.timeline_cycles)),n=Math.max(...i.map(o=>o.cycles_used));return[{seriesName:"Utilization %",datasetColumn:"utilization",unit:"percentage",data:i.map(o=>({value:o.utilization,unit:"utilization",name:"Utilization %"}))},{seriesName:"Timeline Cycles",datasetColumn:"timeline_cycles",unit:"number",data:i.map(o=>({value:this.normalizeData(o.timeline_cycles,e),unit:"timeline_cycles",name:"Timeline Cycles"}))},{seriesName:"Cycles Used",datasetColumn:"cycles_used",unit:"number",data:i.map(o=>({value:this.normalizeData(o.cycles_used,n),unit:"cycles_used",name:"Cycles Used"}))}]}getDataSeriesForMemoryAccess(i){var e;let n=[{seriesName:"VTCM Read",datasetColumn:"vtcm_read",unit:"Memory Access (Bytes)",data:i.map(o=>({value:o.vtcm_read,unit:"bytes",name:"VTCM Read"}))},{seriesName:"VTCM Write",datasetColumn:"vtcm_write",unit:"Memory Access (Bytes)",data:i.map(o=>({value:o.vtcm_write,unit:"bytes",name:"VTCM Write"}))},{seriesName:"DRAM Read",datasetColumn:"dram_read",unit:"Memory Access (Bytes)",data:i.map(o=>({value:o.dram_read,unit:"bytes",name:"DRAM Read"}))},{seriesName:"DRAM Write",datasetColumn:"dram_write",unit:"Memory Access (Bytes)",data:i.map(o=>({value:o.dram_write,unit:"bytes",name:"DRAM Write"}))}];return((e=i[0])==null?void 0:e.kind)==="HTPOperationInstanceNodeDetails"&&n.push({seriesName:"Core",datasetColumn:"htp",unit:"number",data:i.map(o=>({value:o.htp,unit:"number",name:"Core"})),display:!1}),n}getDataSeriesForTopDominantPath(i,e=10,n=95){if(!i.length)return[{seriesName:"Top Operations - % Dominant Path Cycles Core 0",datasetColumn:"percentDominantPathCycles",unit:"percentage",data:[]}];let o=[],r;if(i.every(a=>a.kind==="QNNOperationInstanceNodeDetails"||a.kind==="HTPOperationTypeDetails"||a.kind==="QNNOperationTypeDetails"))r=i.flatMap(a=>a.dominant_path_cycles.map(l=>({core:l.core,percentDominantPathCycles:l.percent_dominant_path_cycles,name:a.kind==="QNNOperationInstanceNodeDetails"?a.qnn_op.trim():a.op.trim()})));else if(i.every(a=>a.kind==="HTPOperationInstanceNodeDetails"))r=i.map(a=>({core:a.htp,percentDominantPathCycles:a.percent_dominant_path_cycles,name:`${a.htp_op.trim()} (${a.op_id})`}));else throw new Error(`Unknown operation data type(s): ${i.filter(a=>!bC(a))}`);let s=new Set(r.map(a=>a.core)).size;for(let a=0;a<s;a++){let l=0,c=r.filter(p=>p.core===a).sort((p,h)=>h.percentDominantPathCycles-p.percentDominantPathCycles).slice(0,e).filter(p=>l<n?(l+=p.percentDominantPathCycles,!0):!1).map(p=>({name:p.name.trim(),value:p.percentDominantPathCycles,unit:"percentage"})),d={name:this.OTHER,value:100-c.reduce((p,h)=>p+=h.value,0),unit:"percentage"};o.push({seriesName:`Top Operations - % Dominant Path Cycles Core ${a}`,datasetColumn:"percentDominantPathCycles",data:[...c,d],unit:"percentage"})}return o}getDatasetForDominantPathCyclesByType(i){let e=new Set(i.map(r=>r.htp)).size,n=Array.from(new Set(i.map(r=>r.type))),o=[];for(let r=0;r<e;r++){let s=n.flatMap(a=>[{percentDominantPathCycles:i.filter(l=>l.htp===r&&l.type.trim()===a.trim()).reduce((l,c)=>l+=c.percent_dominant_path_cycles,0),resourceType:a.replace(", ","+").trim(),htp:r}]);o.push(...s)}return[{dimensions:["resourceType","percentDominantPathCycles","htp"],source:o}]}getDataSeriesForTopHtpOpInstances(i,e=10,n=95){if(i.length===0)return{seriesName:"Top Operations By HTP Op Instances",datasetColumn:"instances",unit:"number",data:[]};let o=i.reduce((l,c)=>l+=c.instances,0),r=0,s=i.sort((l,c)=>c.instances-l.instances).slice(0,e).filter(l=>r<n?(r+=l.instances/o*100,!0):!1).map(l=>({name:l.op.trim(),value:l.instances,unit:"number"})),a={name:this.OTHER,value:o-s.reduce((l,c)=>l+=c.value,0),unit:"number"};return{seriesName:"Top Operations By HTP Op Instances",datasetColumn:"instances",unit:"number",data:[...s,a]}}normalizeData(i,e){return i/e*100}};var DM=Object.defineProperty,MM=(t,i,e)=>i in t?DM(t,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[i]=e,lo=(t,i,e)=>MM(t,typeof i!="symbol"?i+"":i,e),Mo=class{constructor(){lo(this,"memoryColumns",[{accessor:"dram_read",header:"DRAM Read",type:"string",tooltip:"Number of bytes of DRAM (Dynamic Random-Access Memory) Read"},{accessor:"dram_write",header:"DRAM Write",type:"string",tooltip:"Number of bytes of DRAM (Dynamic Random-Access Memory) Write"},{accessor:"vtcm_read",header:"VTCM Read",type:"string",tooltip:"Number of bytes of VTCM (Vector Tightly Coupled Memory) Read"},{accessor:"vtcm_write",header:"VTCM Write",type:"string",tooltip:"Number of bytes of VTCM (Vector Tightly Coupled Memory) Write"}]),lo(this,"qnnOperationTypeColumns",this.generateColumns([{accessor:"op",header:"Op",type:"string",tooltip:"QNN Op Type"},{accessor:"num_htp_ops",header:"Num HTP Ops",type:"string",tooltip:"Number HTP Ops that roll up into this QNN op type"},...this.memoryColumns,{accessor:"cycles",header:"Cycles",type:"string",tooltip:"Overall time spent executing that operation. Indicates the total number of clock cycles taken by the specified operation."},{accessor:"percent_active_cycles",header:"% Active Cycles",type:"number",tooltip:"Represents the percentage of active cycles (cycles when the operation is actively executing) out of the total cycles. It indicates how efficiently the operation utilizes the available execution time"}])),lo(this,"qnnOperationInstanceNodesColumns",this.generateColumns([{accessor:"qnn_op",header:"Op",type:"string",tooltip:"QNN Op Type"},{accessor:"num_htp_ops",header:"Num HTP Ops",type:"string",tooltip:"Number HTP Ops that roll up into this QNN op type"},...this.memoryColumns,{accessor:"cycles",header:"Cycles",type:"string",tooltip:"Overall time spent executing that operation. Indicates the total number of clock cycles taken by the specified operation."},{accessor:"percent_active_cycles",header:"% Active Cycles",type:"number",tooltip:"Represents the percentage of active cycles (cycles when the operation is actively executing) out of the total cycles. It indicates how efficiently the operation utilizes the available execution time"}])),lo(this,"htpOperationTypesColumns",this.generateColumns([{accessor:"op",header:"Op",type:"string",tooltip:"HTP Op"},{accessor:"instances",header:"Instances",type:"string",tooltip:"Number of instances of this op"},{accessor:"format_change",header:"Format Change",type:"string",tooltip:"Indicates whether an op has a format change"},{accessor:"reference_op",header:"Ref Op",type:"string",tooltip:"Indicates whether an op is a reference op (implementation runs purely on scalar code)"},...this.memoryColumns,{accessor:"percent_active_cycles",header:"% Active Cycles",type:"number",tooltip:"Represents the percentage of active cycles (cycles when the operation is actively executing) out of the total cycles. It indicates how efficiently the operation utilizes the available execution time"},{accessor:"cycles",header:"Cycles",type:"string",tooltip:"Overall time spent executing that operation. Indicates the total number of clock cycles taken by the specified operation."}])),lo(this,"htpOperationInstancesColumns",this.generateColumns([{accessor:"htp",header:"HTP",type:"string",tooltip:"HTP instance ID"},{accessor:"op_id",header:"Op ID",type:"string",tooltip:"Op ID"},{accessor:"htp_op",header:"HTP Op",type:"string",tooltip:"The HTP op name"},{accessor:"qnn_op",header:"QNN Op",type:"string",tooltip:"The QNN IR Op this HTP op maps to"},{accessor:"tid",header:"TID",type:"string",tooltip:"HTP thread ID of instance"},{accessor:"type",header:"Type",type:"string",tooltip:"Indicates what the operation is doing. Running on HVX/HMX, it's DMA set/wait or operation includes DMA, operation includes a format changes, it's Sync on DMA, etc"},{accessor:"start_cycle",header:"Start Cycle",type:"string",tooltip:"Indicates the cycle count when the operation started"},{accessor:"cycles",header:"Cycles",type:"string",tooltip:"Overall time spent executing that operation. Indicates the total number of clock cycles taken by the specified operation."},{accessor:"num_dominant_path_cycles",header:"Num Dominant Path Cycles",type:"number",tooltip:"Refers to the number of cycles on the critical path for the operation"},{accessor:"percent_dominant_path_cycles",header:"% Dominant Path Cycles",type:"number",tooltip:"Represents the percentage of cycles on the critical path for the HTP core"},...this.memoryColumns])),lo(this,"htpOperationInstancesPropertiesColumns",this.generateColumns([{accessor:"dtype",header:"Dtype",type:"string",tooltip:"QNN Data Type"},{accessor:"rank",header:"Rank",type:"string",tooltip:"Rank of output"},{accessor:"step_size",header:"Step Size",type:"string",tooltip:"Step Size for quantization"},{accessor:"zero_offset",header:"Zero Offset",type:"string",tooltip:"Zero Offset for quantization"},{accessor:"dims",header:"Dims",type:"string",tooltip:"Tensor dimensions"},{accessor:"input_nodes",header:"Input Nodes",type:"string",tooltip:"Input Nodes into this op"}])),lo(this,"htpOverallSummaryColumns",this.generateColumns([{accessor:"htp",header:"HTP",type:"string",tooltip:"Specifies the HTP core used for this run"},{accessor:"percent_utilization",header:"Util %",type:"number",tooltip:"Percentage of overall timeline HTP Utilization"},{accessor:"inf_per_s",header:"Inference Per Second (IPS)",type:"number",tooltip:"Inferences per second of overall graph"},{accessor:"time_us",header:"Time \xB5s",type:"string",tooltip:"Time taken in microseconds"},{accessor:"total_dram",header:"Total DRAM",type:"string",tooltip:"Total DRAM (Dynamic Random-Access Memory) indicates all data movement (in bytes) between the processor and main memory"},{accessor:"total_dram_read",header:"Total DRAM Read",type:"string",tooltip:"Number of bytes of DRAM Read"},{accessor:"total_dram_write",header:"Total DRAM Write",type:"string",tooltip:"Number of bytes of DRAM Write"},{accessor:"total_vtcm",header:"Total VTCM",type:"string",tooltip:"Total VTCM (Vector Tightly Coupled Memory) indicates all data movement (in bytes) between the processor and the specialized memory region closely tied to vector processing units"},{accessor:"total_vtcm_read",header:"Total VTCM Read",type:"string",tooltip:"Number of bytes of VTCM Read"},{accessor:"total_vtcm_write",header:"Total VTCM Write",type:"string",tooltip:"Number of bytes of VTCM Write"},{accessor:"timeline_cycles",header:"Timeline Cycles",type:"string",tooltip:"Total number of cycles taken by operations for the core. Reflects the overall time spent executing operations"}])),lo(this,"htpResourcesColumns",this.generateColumns([{accessor:"tid",header:"TID",type:"string",tooltip:"Thread ID as executed on HTP"},{accessor:"type",header:"Type",type:"string",tooltip:"Resource type e.g. HMX or HVX"},{accessor:"utilization",header:"Util %",type:"number",tooltip:"Percentage of utilization of this resource"},{accessor:"timeline_cycles",header:"Timeline Cycles",type:"string",tooltip:"Total number of cycles taken by operations for the core. Reflects the overall time spent executing operations."},{accessor:"start_cycle",header:"Start Cycle",type:"string",tooltip:"Start cycle timestamp for this TID"},{accessor:"end_cycle",header:"End Cycle",type:"string",tooltip:"End cycle timestamp for this TID"},{accessor:"cycles_used",header:"Cycles Used",type:"string",tooltip:"Number of cycles where this resource was actually used"}])),lo(this,"dominantPathQHASTable",{tableTitle:"HTP Dominant Path Cycles",columns:this.generateColumns([{accessor:"core",header:"Core",type:"string",tooltip:"Specifies the HTP core used for this run"},{accessor:"num_dominant_path_cycles",header:"Number of Dominant Path Cycles",type:"number",tooltip:"Refers to the number of cycles on the critical path for the operation"},{accessor:"percent_dominant_path_cycles",header:"% Dominant Path Cycles",type:"number",tooltip:"Represents the percentage of cycles on the critical path for the HTP core"}])}),lo(this,"tabToTableMap")}generateColumns(i){return i.map(e=>({accessorKey:e.accessor,header:e.header,meta:{tooltip:e.tooltip},cell:({getValue:n})=>e.type==="number"?parseFloat(n().toFixed(2)):n()}))}};var RM=Object.defineProperty,AM=(t,i,e)=>i in t?RM(t,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[i]=e,kM=(t,i,e)=>AM(t,typeof i!="symbol"?i+"":i,e),Im={exports:{}},NM="2.0.0",jC=256,LM=Number.MAX_SAFE_INTEGER||9007199254740991,FM=16,VM=jC-6,BM=["major","premajor","minor","preminor","patch","prepatch","prerelease"],Zd={MAX_LENGTH:jC,MAX_SAFE_COMPONENT_LENGTH:FM,MAX_SAFE_BUILD_LENGTH:VM,MAX_SAFE_INTEGER:LM,RELEASE_TYPES:BM,SEMVER_SPEC_VERSION:NM,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},HM=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{},Jd=HM;(function(t,i){let{MAX_SAFE_COMPONENT_LENGTH:e,MAX_SAFE_BUILD_LENGTH:n,MAX_LENGTH:o}=Zd,r=Jd;i=t.exports={};let s=i.re=[],a=i.safeRe=[],l=i.src=[],c=i.safeSrc=[],d=i.t={},p=0,h="[a-zA-Z0-9-]",m=[["\\s",1],["\\d",o],[h,n]],S=w=>{for(let[x,N]of m)w=w.split(`${x}*`).join(`${x}{0,${N}}`).split(`${x}+`).join(`${x}{1,${N}}`);return w},y=(w,x,N)=>{let k=S(x),C=p++;r(w,C,x),d[w]=C,l[C]=x,c[C]=k,s[C]=new RegExp(x,N?"g":void 0),a[C]=new RegExp(k,N?"g":void 0)};y("NUMERICIDENTIFIER","0|[1-9]\\d*"),y("NUMERICIDENTIFIERLOOSE","\\d+"),y("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${h}*`),y("MAINVERSION",`(${l[d.NUMERICIDENTIFIER]})\\.(${l[d.NUMERICIDENTIFIER]})\\.(${l[d.NUMERICIDENTIFIER]})`),y("MAINVERSIONLOOSE",`(${l[d.NUMERICIDENTIFIERLOOSE]})\\.(${l[d.NUMERICIDENTIFIERLOOSE]})\\.(${l[d.NUMERICIDENTIFIERLOOSE]})`),y("PRERELEASEIDENTIFIER",`(?:${l[d.NUMERICIDENTIFIER]}|${l[d.NONNUMERICIDENTIFIER]})`),y("PRERELEASEIDENTIFIERLOOSE",`(?:${l[d.NUMERICIDENTIFIERLOOSE]}|${l[d.NONNUMERICIDENTIFIER]})`),y("PRERELEASE",`(?:-(${l[d.PRERELEASEIDENTIFIER]}(?:\\.${l[d.PRERELEASEIDENTIFIER]})*))`),y("PRERELEASELOOSE",`(?:-?(${l[d.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[d.PRERELEASEIDENTIFIERLOOSE]})*))`),y("BUILDIDENTIFIER",`${h}+`),y("BUILD",`(?:\\+(${l[d.BUILDIDENTIFIER]}(?:\\.${l[d.BUILDIDENTIFIER]})*))`),y("FULLPLAIN",`v?${l[d.MAINVERSION]}${l[d.PRERELEASE]}?${l[d.BUILD]}?`),y("FULL",`^${l[d.FULLPLAIN]}$`),y("LOOSEPLAIN",`[v=\\s]*${l[d.MAINVERSIONLOOSE]}${l[d.PRERELEASELOOSE]}?${l[d.BUILD]}?`),y("LOOSE",`^${l[d.LOOSEPLAIN]}$`),y("GTLT","((?:<|>)?=?)"),y("XRANGEIDENTIFIERLOOSE",`${l[d.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),y("XRANGEIDENTIFIER",`${l[d.NUMERICIDENTIFIER]}|x|X|\\*`),y("XRANGEPLAIN",`[v=\\s]*(${l[d.XRANGEIDENTIFIER]})(?:\\.(${l[d.XRANGEIDENTIFIER]})(?:\\.(${l[d.XRANGEIDENTIFIER]})(?:${l[d.PRERELEASE]})?${l[d.BUILD]}?)?)?`),y("XRANGEPLAINLOOSE",`[v=\\s]*(${l[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[d.XRANGEIDENTIFIERLOOSE]})(?:${l[d.PRERELEASELOOSE]})?${l[d.BUILD]}?)?)?`),y("XRANGE",`^${l[d.GTLT]}\\s*${l[d.XRANGEPLAIN]}$`),y("XRANGELOOSE",`^${l[d.GTLT]}\\s*${l[d.XRANGEPLAINLOOSE]}$`),y("COERCEPLAIN",`(^|[^\\d])(\\d{1,${e}})(?:\\.(\\d{1,${e}}))?(?:\\.(\\d{1,${e}}))?`),y("COERCE",`${l[d.COERCEPLAIN]}(?:$|[^\\d])`),y("COERCEFULL",l[d.COERCEPLAIN]+`(?:${l[d.PRERELEASE]})?(?:${l[d.BUILD]})?(?:$|[^\\d])`),y("COERCERTL",l[d.COERCE],!0),y("COERCERTLFULL",l[d.COERCEFULL],!0),y("LONETILDE","(?:~>?)"),y("TILDETRIM",`(\\s*)${l[d.LONETILDE]}\\s+`,!0),i.tildeTrimReplace="$1~",y("TILDE",`^${l[d.LONETILDE]}${l[d.XRANGEPLAIN]}$`),y("TILDELOOSE",`^${l[d.LONETILDE]}${l[d.XRANGEPLAINLOOSE]}$`),y("LONECARET","(?:\\^)"),y("CARETTRIM",`(\\s*)${l[d.LONECARET]}\\s+`,!0),i.caretTrimReplace="$1^",y("CARET",`^${l[d.LONECARET]}${l[d.XRANGEPLAIN]}$`),y("CARETLOOSE",`^${l[d.LONECARET]}${l[d.XRANGEPLAINLOOSE]}$`),y("COMPARATORLOOSE",`^${l[d.GTLT]}\\s*(${l[d.LOOSEPLAIN]})$|^$`),y("COMPARATOR",`^${l[d.GTLT]}\\s*(${l[d.FULLPLAIN]})$|^$`),y("COMPARATORTRIM",`(\\s*)${l[d.GTLT]}\\s*(${l[d.LOOSEPLAIN]}|${l[d.XRANGEPLAIN]})`,!0),i.comparatorTrimReplace="$1$2$3",y("HYPHENRANGE",`^\\s*(${l[d.XRANGEPLAIN]})\\s+-\\s+(${l[d.XRANGEPLAIN]})\\s*$`),y("HYPHENRANGELOOSE",`^\\s*(${l[d.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[d.XRANGEPLAINLOOSE]})\\s*$`),y("STAR","(<|>)?=?\\s*\\*"),y("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),y("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(Im,Im.exports);var ll=Im.exports,jM=Object.freeze({loose:!0}),qM=Object.freeze({}),zM=t=>t?typeof t!="object"?jM:t:qM,Mm=zM,yC=/^[0-9]+$/,qC=(t,i)=>{let e=yC.test(t),n=yC.test(i);return e&&n&&(t=+t,i=+i),t===i?0:e&&!n?-1:n&&!e?1:t<i?-1:1},GM=(t,i)=>qC(i,t),zC={compareIdentifiers:qC,rcompareIdentifiers:GM},Wd=Jd,{MAX_LENGTH:CC,MAX_SAFE_INTEGER:Qd}=Zd,{safeRe:wC,safeSrc:SC,t:Yd}=ll,$M=Mm,{compareIdentifiers:Gs}=zC,UM=class co{constructor(i,e){if(e=$M(e),i instanceof co){if(i.loose===!!e.loose&&i.includePrerelease===!!e.includePrerelease)return i;i=i.version}else if(typeof i!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof i}".`);if(i.length>CC)throw new TypeError(`version is longer than ${CC} characters`);Wd("SemVer",i,e),this.options=e,this.loose=!!e.loose,this.includePrerelease=!!e.includePrerelease;let n=i.trim().match(e.loose?wC[Yd.LOOSE]:wC[Yd.FULL]);if(!n)throw new TypeError(`Invalid Version: ${i}`);if(this.raw=i,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>Qd||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Qd||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Qd||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(o=>{if(/^[0-9]+$/.test(o)){let r=+o;if(r>=0&&r<Qd)return r}return o}):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(i){if(Wd("SemVer.compare",this.version,this.options,i),!(i instanceof co)){if(typeof i=="string"&&i===this.version)return 0;i=new co(i,this.options)}return i.version===this.version?0:this.compareMain(i)||this.comparePre(i)}compareMain(i){return i instanceof co||(i=new co(i,this.options)),Gs(this.major,i.major)||Gs(this.minor,i.minor)||Gs(this.patch,i.patch)}comparePre(i){if(i instanceof co||(i=new co(i,this.options)),this.prerelease.length&&!i.prerelease.length)return-1;if(!this.prerelease.length&&i.prerelease.length)return 1;if(!this.prerelease.length&&!i.prerelease.length)return 0;let e=0;do{let n=this.prerelease[e],o=i.prerelease[e];if(Wd("prerelease compare",e,n,o),n===void 0&&o===void 0)return 0;if(o===void 0)return 1;if(n===void 0)return-1;if(n!==o)return Gs(n,o)}while(++e)}compareBuild(i){i instanceof co||(i=new co(i,this.options));let e=0;do{let n=this.build[e],o=i.build[e];if(Wd("build compare",e,n,o),n===void 0&&o===void 0)return 0;if(o===void 0)return 1;if(n===void 0)return-1;if(n!==o)return Gs(n,o)}while(++e)}inc(i,e,n){if(i.startsWith("pre")){if(!e&&n===!1)throw new Error("invalid increment argument: identifier is empty");if(e){let o=new RegExp(`^${this.options.loose?SC[Yd.PRERELEASELOOSE]:SC[Yd.PRERELEASE]}$`),r=`-${e}`.match(o);if(!r||r[1]!==e)throw new Error(`invalid identifier: ${e}`)}}switch(i){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",e,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",e,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",e,n),this.inc("pre",e,n);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",e,n),this.inc("pre",e,n);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let o=Number(n)?1:0;if(this.prerelease.length===0)this.prerelease=[o];else{let r=this.prerelease.length;for(;--r>=0;)typeof this.prerelease[r]=="number"&&(this.prerelease[r]++,r=-2);if(r===-1){if(e===this.prerelease.join(".")&&n===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(o)}}if(e){let r=[e,o];n===!1&&(r=[e]),Gs(this.prerelease[0],e)===0?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw new Error(`invalid increment argument: ${i}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}},Ti=UM,EC=Ti,WM=(t,i,e=!1)=>{if(t instanceof EC)return t;try{return new EC(t,i)}catch(n){if(!e)return null;throw n}},$s=WM,QM=$s,YM=(t,i)=>{let e=QM(t,i);return e?e.version:null},XM=YM,KM=$s,ZM=(t,i)=>{let e=KM(t.trim().replace(/^[=v]+/,""),i);return e?e.version:null},JM=ZM,TC=Ti,eR=(t,i,e,n,o)=>{typeof e=="string"&&(o=n,n=e,e=void 0);try{return new TC(t instanceof TC?t.version:t,e).inc(i,n,o).version}catch{return null}},tR=eR,xC=$s,iR=(t,i)=>{let e=xC(t,null,!0),n=xC(i,null,!0),o=e.compare(n);if(o===0)return null;let r=o>0,s=r?e:n,a=r?n:e,l=!!s.prerelease.length;if(a.prerelease.length&&!l){if(!a.patch&&!a.minor)return"major";if(a.compareMain(s)===0)return a.minor&&!a.patch?"minor":"patch"}let c=l?"pre":"";return e.major!==n.major?c+"major":e.minor!==n.minor?c+"minor":e.patch!==n.patch?c+"patch":"prerelease"},nR=iR,oR=Ti,rR=(t,i)=>new oR(t,i).major,sR=rR,aR=Ti,lR=(t,i)=>new aR(t,i).minor,cR=lR,dR=Ti,pR=(t,i)=>new dR(t,i).patch,hR=pR,uR=$s,mR=(t,i)=>{let e=uR(t,i);return e&&e.prerelease.length?e.prerelease:null},fR=mR,PC=Ti,gR=(t,i,e)=>new PC(t,e).compare(new PC(i,e)),Tn=gR,_R=Tn,vR=(t,i,e)=>_R(i,t,e),bR=vR,yR=Tn,CR=(t,i)=>yR(t,i,!0),wR=CR,OC=Ti,SR=(t,i,e)=>{let n=new OC(t,e),o=new OC(i,e);return n.compare(o)||n.compareBuild(o)},Rm=SR,ER=Rm,TR=(t,i)=>t.sort((e,n)=>ER(e,n,i)),xR=TR,PR=Rm,OR=(t,i)=>t.sort((e,n)=>PR(n,e,i)),IR=OR,DR=Tn,MR=(t,i,e)=>DR(t,i,e)>0,ep=MR,RR=Tn,AR=(t,i,e)=>RR(t,i,e)<0,Am=AR,kR=Tn,NR=(t,i,e)=>kR(t,i,e)===0,GC=NR,LR=Tn,FR=(t,i,e)=>LR(t,i,e)!==0,$C=FR,VR=Tn,BR=(t,i,e)=>VR(t,i,e)>=0,km=BR,HR=Tn,jR=(t,i,e)=>HR(t,i,e)<=0,Nm=jR,qR=GC,zR=$C,GR=ep,$R=km,UR=Am,WR=Nm,QR=(t,i,e,n)=>{switch(i){case"===":return typeof t=="object"&&(t=t.version),typeof e=="object"&&(e=e.version),t===e;case"!==":return typeof t=="object"&&(t=t.version),typeof e=="object"&&(e=e.version),t!==e;case"":case"=":case"==":return qR(t,e,n);case"!=":return zR(t,e,n);case">":return GR(t,e,n);case">=":return $R(t,e,n);case"<":return UR(t,e,n);case"<=":return WR(t,e,n);default:throw new TypeError(`Invalid operator: ${i}`)}},UC=QR,YR=Ti,XR=$s,{safeRe:Xd,t:Kd}=ll,KR=(t,i)=>{if(t instanceof YR)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;i=i||{};let e=null;if(!i.rtl)e=t.match(i.includePrerelease?Xd[Kd.COERCEFULL]:Xd[Kd.COERCE]);else{let l=i.includePrerelease?Xd[Kd.COERCERTLFULL]:Xd[Kd.COERCERTL],c;for(;(c=l.exec(t))&&(!e||e.index+e[0].length!==t.length);)(!e||c.index+c[0].length!==e.index+e[0].length)&&(e=c),l.lastIndex=c.index+c[1].length+c[2].length;l.lastIndex=-1}if(e===null)return null;let n=e[2],o=e[3]||"0",r=e[4]||"0",s=i.includePrerelease&&e[5]?`-${e[5]}`:"",a=i.includePrerelease&&e[6]?`+${e[6]}`:"";return XR(`${n}.${o}.${r}${s}${a}`,i)},ZR=KR,Dm=class{constructor(){this.max=1e3,this.map=new Map}get(i){let e=this.map.get(i);if(e!==void 0)return this.map.delete(i),this.map.set(i,e),e}delete(i){return this.map.delete(i)}set(i,e){if(!this.delete(i)&&e!==void 0){if(this.map.size>=this.max){let n=this.map.keys().next().value;this.delete(n)}this.map.set(i,e)}return this}},JR=Dm,Em,IC;function xn(){if(IC)return Em;IC=1;let t=/\s+/g;class i{constructor(W,P){if(P=o(P),W instanceof i)return W.loose===!!P.loose&&W.includePrerelease===!!P.includePrerelease?W:new i(W.raw,P);if(W instanceof r)return this.raw=W.value,this.set=[[W]],this.formatted=void 0,this;if(this.options=P,this.loose=!!P.loose,this.includePrerelease=!!P.includePrerelease,this.raw=W.trim().replace(t," "),this.set=this.raw.split("||").map(O=>this.parseRange(O.trim())).filter(O=>O.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let O=this.set[0];if(this.set=this.set.filter(V=>!y(V[0])),this.set.length===0)this.set=[O];else if(this.set.length>1){for(let V of this.set)if(V.length===1&&w(V[0])){this.set=[V];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let W=0;W<this.set.length;W++){W>0&&(this.formatted+="||");let P=this.set[W];for(let O=0;O<P.length;O++)O>0&&(this.formatted+=" "),this.formatted+=P[O].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(W){let P=((this.options.includePrerelease&&m)|(this.options.loose&&S))+":"+W,O=n.get(P);if(O)return O;let V=this.options.loose,H=V?l[c.HYPHENRANGELOOSE]:l[c.HYPHENRANGE];W=W.replace(H,_e(this.options.includePrerelease)),s("hyphen replace",W),W=W.replace(l[c.COMPARATORTRIM],d),s("comparator trim",W),W=W.replace(l[c.TILDETRIM],p),s("tilde trim",W),W=W.replace(l[c.CARETTRIM],h),s("caret trim",W);let K=W.split(" ").map(he=>N(he,this.options)).join(" ").split(/\s+/).map(he=>te(he,this.options));V&&(K=K.filter(he=>(s("loose invalid filter",he,this.options),!!he.match(l[c.COMPARATORLOOSE])))),s("range list",K);let ce=new Map,oe=K.map(he=>new r(he,this.options));for(let he of oe){if(y(he))return[he];ce.set(he.value,he)}ce.size>1&&ce.has("")&&ce.delete("");let Re=[...ce.values()];return n.set(P,Re),Re}intersects(W,P){if(!(W instanceof i))throw new TypeError("a Range is required");return this.set.some(O=>x(O,P)&&W.set.some(V=>x(V,P)&&O.every(H=>V.every(K=>H.intersects(K,P)))))}test(W){if(!W)return!1;if(typeof W=="string")try{W=new a(W,this.options)}catch{return!1}for(let P=0;P<this.set.length;P++)if(pe(this.set[P],W,this.options))return!0;return!1}}Em=i;let e=JR,n=new e,o=Mm,r=tp(),s=Jd,a=Ti,{safeRe:l,t:c,comparatorTrimReplace:d,tildeTrimReplace:p,caretTrimReplace:h}=ll,{FLAG_INCLUDE_PRERELEASE:m,FLAG_LOOSE:S}=Zd,y=U=>U.value==="<0.0.0-0",w=U=>U.value==="",x=(U,W)=>{let P=!0,O=U.slice(),V=O.pop();for(;P&&O.length;)P=O.every(H=>V.intersects(H,W)),V=O.pop();return P},N=(U,W)=>(s("comp",U,W),U=$(U,W),s("caret",U),U=C(U,W),s("tildes",U),U=re(U,W),s("xrange",U),U=ge(U,W),s("stars",U),U),k=U=>!U||U.toLowerCase()==="x"||U==="*",C=(U,W)=>U.trim().split(/\s+/).map(P=>Q(P,W)).join(" "),Q=(U,W)=>{let P=W.loose?l[c.TILDELOOSE]:l[c.TILDE];return U.replace(P,(O,V,H,K,ce)=>{s("tilde",U,O,V,H,K,ce);let oe;return k(V)?oe="":k(H)?oe=`>=${V}.0.0 <${+V+1}.0.0-0`:k(K)?oe=`>=${V}.${H}.0 <${V}.${+H+1}.0-0`:ce?(s("replaceTilde pr",ce),oe=`>=${V}.${H}.${K}-${ce} <${V}.${+H+1}.0-0`):oe=`>=${V}.${H}.${K} <${V}.${+H+1}.0-0`,s("tilde return",oe),oe})},$=(U,W)=>U.trim().split(/\s+/).map(P=>ie(P,W)).join(" "),ie=(U,W)=>{s("caret",U,W);let P=W.loose?l[c.CARETLOOSE]:l[c.CARET],O=W.includePrerelease?"-0":"";return U.replace(P,(V,H,K,ce,oe)=>{s("caret",U,V,H,K,ce,oe);let Re;return k(H)?Re="":k(K)?Re=`>=${H}.0.0${O} <${+H+1}.0.0-0`:k(ce)?H==="0"?Re=`>=${H}.${K}.0${O} <${H}.${+K+1}.0-0`:Re=`>=${H}.${K}.0${O} <${+H+1}.0.0-0`:oe?(s("replaceCaret pr",oe),H==="0"?K==="0"?Re=`>=${H}.${K}.${ce}-${oe} <${H}.${K}.${+ce+1}-0`:Re=`>=${H}.${K}.${ce}-${oe} <${H}.${+K+1}.0-0`:Re=`>=${H}.${K}.${ce}-${oe} <${+H+1}.0.0-0`):(s("no pr"),H==="0"?K==="0"?Re=`>=${H}.${K}.${ce}${O} <${H}.${K}.${+ce+1}-0`:Re=`>=${H}.${K}.${ce}${O} <${H}.${+K+1}.0-0`:Re=`>=${H}.${K}.${ce} <${+H+1}.0.0-0`),s("caret return",Re),Re})},re=(U,W)=>(s("replaceXRanges",U,W),U.split(/\s+/).map(P=>we(P,W)).join(" ")),we=(U,W)=>{U=U.trim();let P=W.loose?l[c.XRANGELOOSE]:l[c.XRANGE];return U.replace(P,(O,V,H,K,ce,oe)=>{s("xRange",U,O,V,H,K,ce,oe);let Re=k(H),he=Re||k(K),lt=he||k(ce),kt=lt;return V==="="&&kt&&(V=""),oe=W.includePrerelease?"-0":"",Re?V===">"||V==="<"?O="<0.0.0-0":O="*":V&&kt?(he&&(K=0),ce=0,V===">"?(V=">=",he?(H=+H+1,K=0,ce=0):(K=+K+1,ce=0)):V==="<="&&(V="<",he?H=+H+1:K=+K+1),V==="<"&&(oe="-0"),O=`${V+H}.${K}.${ce}${oe}`):he?O=`>=${H}.0.0${oe} <${+H+1}.0.0-0`:lt&&(O=`>=${H}.${K}.0${oe} <${H}.${+K+1}.0-0`),s("xRange return",O),O})},ge=(U,W)=>(s("replaceStars",U,W),U.trim().replace(l[c.STAR],"")),te=(U,W)=>(s("replaceGTE0",U,W),U.trim().replace(l[W.includePrerelease?c.GTE0PRE:c.GTE0],"")),_e=U=>(W,P,O,V,H,K,ce,oe,Re,he,lt,kt)=>(k(O)?P="":k(V)?P=`>=${O}.0.0${U?"-0":""}`:k(H)?P=`>=${O}.${V}.0${U?"-0":""}`:K?P=`>=${P}`:P=`>=${P}${U?"-0":""}`,k(Re)?oe="":k(he)?oe=`<${+Re+1}.0.0-0`:k(lt)?oe=`<${Re}.${+he+1}.0-0`:kt?oe=`<=${Re}.${he}.${lt}-${kt}`:U?oe=`<${Re}.${he}.${+lt+1}-0`:oe=`<=${oe}`,`${P} ${oe}`.trim()),pe=(U,W,P)=>{for(let O=0;O<U.length;O++)if(!U[O].test(W))return!1;if(W.prerelease.length&&!P.includePrerelease){for(let O=0;O<U.length;O++)if(s(U[O].semver),U[O].semver!==r.ANY&&U[O].semver.prerelease.length>0){let V=U[O].semver;if(V.major===W.major&&V.minor===W.minor&&V.patch===W.patch)return!0}return!1}return!0};return Em}var Tm,DC;function tp(){if(DC)return Tm;DC=1;let t=Symbol("SemVer ANY");class i{static get ANY(){return t}constructor(d,p){if(p=e(p),d instanceof i){if(d.loose===!!p.loose)return d;d=d.value}d=d.trim().split(/\s+/).join(" "),s("comparator",d,p),this.options=p,this.loose=!!p.loose,this.parse(d),this.semver===t?this.value="":this.value=this.operator+this.semver.version,s("comp",this)}parse(d){let p=this.options.loose?n[o.COMPARATORLOOSE]:n[o.COMPARATOR],h=d.match(p);if(!h)throw new TypeError(`Invalid comparator: ${d}`);this.operator=h[1]!==void 0?h[1]:"",this.operator==="="&&(this.operator=""),h[2]?this.semver=new a(h[2],this.options.loose):this.semver=t}toString(){return this.value}test(d){if(s("Comparator.test",d,this.options.loose),this.semver===t||d===t)return!0;if(typeof d=="string")try{d=new a(d,this.options)}catch{return!1}return r(d,this.operator,this.semver,this.options)}intersects(d,p){if(!(d instanceof i))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new l(d.value,p).test(this.value):d.operator===""?d.value===""?!0:new l(this.value,p).test(d.semver):(p=e(p),p.includePrerelease&&(this.value==="<0.0.0-0"||d.value==="<0.0.0-0")||!p.includePrerelease&&(this.value.startsWith("<0.0.0")||d.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&d.operator.startsWith(">")||this.operator.startsWith("<")&&d.operator.startsWith("<")||this.semver.version===d.semver.version&&this.operator.includes("=")&&d.operator.includes("=")||r(this.semver,"<",d.semver,p)&&this.operator.startsWith(">")&&d.operator.startsWith("<")||r(this.semver,">",d.semver,p)&&this.operator.startsWith("<")&&d.operator.startsWith(">")))}}Tm=i;let e=Mm,{safeRe:n,t:o}=ll,r=UC,s=Jd,a=Ti,l=xn();return Tm}var eA=xn(),tA=(t,i,e)=>{try{i=new eA(i,e)}catch{return!1}return i.test(t)},ip=tA,iA=xn(),nA=(t,i)=>new iA(t,i).set.map(e=>e.map(n=>n.value).join(" ").trim().split(" ")),oA=nA,rA=Ti,sA=xn(),aA=(t,i,e)=>{let n=null,o=null,r=null;try{r=new sA(i,e)}catch{return null}return t.forEach(s=>{r.test(s)&&(!n||o.compare(s)===-1)&&(n=s,o=new rA(n,e))}),n},lA=aA,cA=Ti,dA=xn(),pA=(t,i,e)=>{let n=null,o=null,r=null;try{r=new dA(i,e)}catch{return null}return t.forEach(s=>{r.test(s)&&(!n||o.compare(s)===1)&&(n=s,o=new cA(n,e))}),n},hA=pA,xm=Ti,uA=xn(),MC=ep,mA=(t,i)=>{t=new uA(t,i);let e=new xm("0.0.0");if(t.test(e)||(e=new xm("0.0.0-0"),t.test(e)))return e;e=null;for(let n=0;n<t.set.length;++n){let o=t.set[n],r=null;o.forEach(s=>{let a=new xm(s.semver.version);switch(s.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!r||MC(a,r))&&(r=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${s.operator}`)}}),r&&(!e||MC(e,r))&&(e=r)}return e&&t.test(e)?e:null},fA=mA,gA=xn(),_A=(t,i)=>{try{return new gA(t,i).range||"*"}catch{return null}},vA=_A,bA=Ti,WC=tp(),{ANY:yA}=WC,CA=xn(),wA=ip,RC=ep,AC=Am,SA=Nm,EA=km,TA=(t,i,e,n)=>{t=new bA(t,n),i=new CA(i,n);let o,r,s,a,l;switch(e){case">":o=RC,r=SA,s=AC,a=">",l=">=";break;case"<":o=AC,r=EA,s=RC,a="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(wA(t,i,n))return!1;for(let c=0;c<i.set.length;++c){let d=i.set[c],p=null,h=null;if(d.forEach(m=>{m.semver===yA&&(m=new WC(">=0.0.0")),p=p||m,h=h||m,o(m.semver,p.semver,n)?p=m:s(m.semver,h.semver,n)&&(h=m)}),p.operator===a||p.operator===l||(!h.operator||h.operator===a)&&r(t,h.semver)||h.operator===l&&s(t,h.semver))return!1}return!0},Lm=TA,xA=Lm,PA=(t,i,e)=>xA(t,i,">",e),OA=PA,IA=Lm,DA=(t,i,e)=>IA(t,i,"<",e),MA=DA,kC=xn(),RA=(t,i,e)=>(t=new kC(t,e),i=new kC(i,e),t.intersects(i,e)),AA=RA,kA=ip,NA=Tn,LA=(t,i,e)=>{let n=[],o=null,r=null,s=t.sort((d,p)=>NA(d,p,e));for(let d of s)kA(d,i,e)?(r=d,o||(o=d)):(r&&n.push([o,r]),r=null,o=null);o&&n.push([o,null]);let a=[];for(let[d,p]of n)d===p?a.push(d):!p&&d===s[0]?a.push("*"):p?d===s[0]?a.push(`<=${p}`):a.push(`${d} - ${p}`):a.push(`>=${d}`);let l=a.join(" || "),c=typeof i.raw=="string"?i.raw:String(i);return l.length<c.length?l:i},NC=xn(),Fm=tp(),{ANY:Pm}=Fm,al=ip,Vm=Tn,FA=(t,i,e={})=>{if(t===i)return!0;t=new NC(t,e),i=new NC(i,e);let n=!1;e:for(let o of t.set){for(let r of i.set){let s=BA(o,r,e);if(n=n||s!==null,s)continue e}if(n)return!1}return!0},VA=[new Fm(">=0.0.0-0")],LC=[new Fm(">=0.0.0")],BA=(t,i,e)=>{if(t===i)return!0;if(t.length===1&&t[0].semver===Pm){if(i.length===1&&i[0].semver===Pm)return!0;e.includePrerelease?t=VA:t=LC}if(i.length===1&&i[0].semver===Pm){if(e.includePrerelease)return!0;i=LC}let n=new Set,o,r;for(let m of t)m.operator===">"||m.operator===">="?o=FC(o,m,e):m.operator==="<"||m.operator==="<="?r=VC(r,m,e):n.add(m.semver);if(n.size>1)return null;let s;if(o&&r&&(s=Vm(o.semver,r.semver,e),s>0||s===0&&(o.operator!==">="||r.operator!=="<=")))return null;for(let m of n){if(o&&!al(m,String(o),e)||r&&!al(m,String(r),e))return null;for(let S of i)if(!al(m,String(S),e))return!1;return!0}let a,l,c,d,p=r&&!e.includePrerelease&&r.semver.prerelease.length?r.semver:!1,h=o&&!e.includePrerelease&&o.semver.prerelease.length?o.semver:!1;p&&p.prerelease.length===1&&r.operator==="<"&&p.prerelease[0]===0&&(p=!1);for(let m of i){if(d=d||m.operator===">"||m.operator===">=",c=c||m.operator==="<"||m.operator==="<=",o){if(h&&m.semver.prerelease&&m.semver.prerelease.length&&m.semver.major===h.major&&m.semver.minor===h.minor&&m.semver.patch===h.patch&&(h=!1),m.operator===">"||m.operator===">="){if(a=FC(o,m,e),a===m&&a!==o)return!1}else if(o.operator===">="&&!al(o.semver,String(m),e))return!1}if(r){if(p&&m.semver.prerelease&&m.semver.prerelease.length&&m.semver.major===p.major&&m.semver.minor===p.minor&&m.semver.patch===p.patch&&(p=!1),m.operator==="<"||m.operator==="<="){if(l=VC(r,m,e),l===m&&l!==r)return!1}else if(r.operator==="<="&&!al(r.semver,String(m),e))return!1}if(!m.operator&&(r||o)&&s!==0)return!1}return!(o&&c&&!r&&s!==0||r&&d&&!o&&s!==0||h||p)},FC=(t,i,e)=>{if(!t)return i;let n=Vm(t.semver,i.semver,e);return n>0?t:n<0||i.operator===">"&&t.operator===">="?i:t},VC=(t,i,e)=>{if(!t)return i;let n=Vm(t.semver,i.semver,e);return n<0?t:n>0||i.operator==="<"&&t.operator==="<="?i:t},HA=FA,Om=ll,BC=Zd,jA=Ti,HC=zC,qA=$s,zA=XM,GA=JM,$A=tR,UA=nR,WA=sR,QA=cR,YA=hR,XA=fR,KA=Tn,ZA=bR,JA=wR,ek=Rm,tk=xR,ik=IR,nk=ep,ok=Am,rk=GC,sk=$C,ak=km,lk=Nm,ck=UC,dk=ZR,pk=tp(),hk=xn(),uk=ip,mk=oA,fk=lA,gk=hA,_k=fA,vk=vA,bk=Lm,yk=OA,Ck=MA,wk=AA,Sk=LA,Ek=HA,Tk={parse:qA,valid:zA,clean:GA,inc:$A,diff:UA,major:WA,minor:QA,patch:YA,prerelease:XA,compare:KA,rcompare:ZA,compareLoose:JA,compareBuild:ek,sort:tk,rsort:ik,gt:nk,lt:ok,eq:rk,neq:sk,gte:ak,lte:lk,cmp:ck,coerce:dk,Comparator:pk,Range:hk,satisfies:uk,toComparators:mk,maxSatisfying:fk,minSatisfying:gk,minVersion:_k,validRange:vk,outside:bk,gtr:yk,ltr:Ck,intersects:wk,simplifyRange:Sk,subset:Ek,SemVer:jA,re:Om.re,src:Om.src,tokens:Om.t,SEMVER_SPEC_VERSION:BC.SEMVER_SPEC_VERSION,RELEASE_TYPES:BC.RELEASE_TYPES,compareIdentifiers:HC.compareIdentifiers,rcompareIdentifiers:HC.rcompareIdentifiers},cr=class{constructor(){kM(this,"requiredColumns",{htpOverallSummary:["percent_idle","percent_utilization","htp","htp_resources","inf_per_s","time_us","timeline_cycles","total_dram","total_dram_read","total_dram_write","total_vtcm","total_vtcm_read","total_vtcm_write"],qnnOpTypes:["percent_active_cycles","cycles","dram_read","dram_write","num_htp_ops","op","vtcm_read","vtcm_write","num_dominant_path_cycles_htp","percent_dominant_path_cycles_htp"],qnnOpInstancesNodes:["percent_active_cycles","cycles","dram_read","dram_write","num_htp_ops","qnn_op","vtcm_read","vtcm_write","num_dominant_path_cycles_htp","percent_dominant_path_cycles_htp"],htpOpTypes:["percent_active_cycles","cycles","dram_read","dram_write","format_change","instances","op","reference_op","vtcm_read","vtcm_write","num_dominant_path_cycles_htp","percent_dominant_path_cycles_htp"],htpOpInstances:["percent_dominant_path_cycles","cycles","dma","dma_set","dma_wait","dram_read","dram_write","dims","dtype","fmt_change","hmx","htp","htp_op","hvx","input_nodes","num_dominant_path_cycles","op_id","qnn_op","rank","ref_op","start_cycle","step_size","sync","tid","vtcm_read","vtcm_write","zero_offset"]})}processJson(i){return Y(this,null,function*(){try{let e=JSON.parse(yield i.text());return this.validateQhasReport(e),{htpOverallSummary:this.parseHtpOverallSummary(e.data.htp_overall_summary.data,this.requiredColumns.htpOverallSummary),qnnOpTypes:this.parseForDominantPathCyclesAndKeys(e.data.qnn_op_types.data,this.requiredColumns.qnnOpTypes,"QNNOperationTypeDetails"),qnnOpInstancesNodes:this.parseForDominantPathCyclesAndKeys(e.data.qnn_op_instances_nodes.data,this.requiredColumns.qnnOpInstancesNodes,"QNNOperationInstanceNodeDetails"),htpOpTypes:this.parseForDominantPathCyclesAndKeys(e.data.htp_op_types.data,this.requiredColumns.htpOpTypes,"HTPOperationTypeDetails"),htpOpInstances:this.parseHtpOpInstanceNodes(e.data.htp_op_instances.data,this.requiredColumns.htpOpInstances,"HTPOperationInstanceNodeDetails")}}catch(e){throw e instanceof so?e:new so({expected:"valid JSON matching QHAS schema",actual:"data that does not conform to the expected schema."})}})}parseHtpOverallSummary(i,e){return i.map(n=>e.reduce((o,r)=>{var s;return r.startsWith("htp_resources")?o[r]=(s=n[r])==null?void 0:s.data:o[r]=n[r],o},{}))}parseForDominantPathCyclesAndKeys(i,e,n){return i.map(o=>{let r={kind:n},s=[];for(let a in o)if(a.startsWith("num_dominant_path_cycles_htp")){let[l,c]=a.split(/_(?=\d+$)/);s.push({core:parseInt(c,10),num_dominant_path_cycles:o[a],percent_dominant_path_cycles:o[`percent_dominant_path_cycles_htp_${c}`]})}else if(e.includes(a)){let l=o[a];r[a]=typeof l=="boolean"?`${l}`:l}return r.dominant_path_cycles=s,r})}parseHtpOpInstanceNodes(i,e,n){let o={dma:"DMA",dma_set:"DMA Set",dma_wait:"DMA Wait",hmx:"HMX",hvx:"HVX",sync:"Sync",ref_op:"Ref Op",fmt_change:"Format Change"},r=new Set(["dtype","rank","step_size","zero_offset","dims","input_nodes"]);return i.map(s=>e.reduce((a,l)=>{var c;return l.startsWith("htp_resources")?a[l]=(c=s[l])==null?void 0:c.data:o[l]?a.type=this.getActiveTypes(a.type,o[l],s[l]):r.has(l)?(a.properties=a.properties||[{}],a.properties[0][l]=s[l]):a[l]=s[l],a},{kind:n}))}getActiveTypes(i,e,n){let o="N/A";return n?!i||i===o?e:`${i}, ${e}`:i||o}validateQhasReport(i){var e;if(!this.isQhasReport(i)){let n=(e=i.header)==null?void 0:e.artifact_type;throw new so({expected:"artifact type of QHAS",actual:n??"unknown"})}if(!this.validateQhasSchemaVersion(i,Ud)){let n=this.getQhasReportSchemaVersion(i),o="unknown";if(n){let{major:r,minor:s,patch:a}=this.getQhasReportSchemaVersion(i);o=`${r}.${s}.${a}`}throw new so({expected:`version of ${Ud}`,actual:o})}}validateQhasSchemaVersion(i,e){let n=this.getQhasReportSchemaVersion(i);return n&&Tk.satisfies(`${n.major}.${n.minor}.${n.patch}`,e)}isQhasReport(i){var e;return`${(e=i.header)==null?void 0:e.artifact_type}`.toLowerCase()==="qhas"}getQhasReportSchemaVersion(i){var e;return(e=i.header)==null?void 0:e.version}};var Bm={name:"Name",tid:"Thread",dur:"Duration",ts:"Start cycle",processName:"Process"},Hm={name:"Name",dur:"Duration",ts:"Start cycle",value:"Value"};var Us="QNN::";var xk=Object.defineProperty,Pk=(t,i,e)=>i in t?xk(t,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[i]=e,Xt=(t,i,e)=>Pk(t,typeof i!="symbol"?i+"":i,e),Ok={value:()=>{}};function of(){for(var t=0,i=arguments.length,e={},n;t<i;++t){if(!(n=arguments[t]+"")||n in e||/[\s.]/.test(n))throw new Error("illegal type: "+n);e[n]=[]}return new sp(e)}function sp(t){this._=t}function Ik(t,i){return t.trim().split(/^|\s+/).map(function(e){var n="",o=e.indexOf(".");if(o>=0&&(n=e.slice(o+1),e=e.slice(0,o)),e&&!i.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:n}})}sp.prototype=of.prototype={constructor:sp,on:function(t,i){var e=this._,n=Ik(t+"",e),o,r=-1,s=n.length;if(arguments.length<2){for(;++r<s;)if((o=(t=n[r]).type)&&(o=Dk(e[o],t.name)))return o;return}if(i!=null&&typeof i!="function")throw new Error("invalid callback: "+i);for(;++r<s;)if(o=(t=n[r]).type)e[o]=QC(e[o],t.name,i);else if(i==null)for(o in e)e[o]=QC(e[o],t.name,null);return this},copy:function(){var t={},i=this._;for(var e in i)t[e]=i[e].slice();return new sp(t)},call:function(t,i){if((o=arguments.length-2)>0)for(var e=new Array(o),n=0,o,r;n<o;++n)e[n]=arguments[n+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(r=this._[t],n=0,o=r.length;n<o;++n)r[n].value.apply(i,e)},apply:function(t,i,e){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var n=this._[t],o=0,r=n.length;o<r;++o)n[o].value.apply(i,e)}};function Dk(t,i){for(var e=0,n=t.length,o;e<n;++e)if((o=t[e]).name===i)return o.value}function QC(t,i,e){for(var n=0,o=t.length;n<o;++n)if(t[n].name===i){t[n]=Ok,t=t.slice(0,n).concat(t.slice(n+1));break}return e!=null&&t.push({name:i,value:e}),t}var Qm="http://www.w3.org/1999/xhtml",YC={svg:"http://www.w3.org/2000/svg",xhtml:Qm,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function vp(t){var i=t+="",e=i.indexOf(":");return e>=0&&(i=t.slice(0,e))!=="xmlns"&&(t=t.slice(e+1)),YC.hasOwnProperty(i)?{space:YC[i],local:t}:t}function Mk(t){return function(){var i=this.ownerDocument,e=this.namespaceURI;return e===Qm&&i.documentElement.namespaceURI===Qm?i.createElement(t):i.createElementNS(e,t)}}function Rk(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function _w(t){var i=vp(t);return(i.local?Rk:Mk)(i)}function Ak(){}function rf(t){return t==null?Ak:function(){return this.querySelector(t)}}function kk(t){typeof t!="function"&&(t=rf(t));for(var i=this._groups,e=i.length,n=new Array(e),o=0;o<e;++o)for(var r=i[o],s=r.length,a=n[o]=new Array(s),l,c,d=0;d<s;++d)(l=r[d])&&(c=t.call(l,l.__data__,d,r))&&("__data__"in l&&(c.__data__=l.__data__),a[d]=c);return new Xi(n,this._parents)}function Nk(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function Lk(){return[]}function vw(t){return t==null?Lk:function(){return this.querySelectorAll(t)}}function Fk(t){return function(){return Nk(t.apply(this,arguments))}}function Vk(t){typeof t=="function"?t=Fk(t):t=vw(t);for(var i=this._groups,e=i.length,n=[],o=[],r=0;r<e;++r)for(var s=i[r],a=s.length,l,c=0;c<a;++c)(l=s[c])&&(n.push(t.call(l,l.__data__,c,s)),o.push(l));return new Xi(n,o)}function bw(t){return function(){return this.matches(t)}}function yw(t){return function(i){return i.matches(t)}}var Bk=Array.prototype.find;function Hk(t){return function(){return Bk.call(this.children,t)}}function jk(){return this.firstElementChild}function qk(t){return this.select(t==null?jk:Hk(typeof t=="function"?t:yw(t)))}var zk=Array.prototype.filter;function Gk(){return Array.from(this.children)}function $k(t){return function(){return zk.call(this.children,t)}}function Uk(t){return this.selectAll(t==null?Gk:$k(typeof t=="function"?t:yw(t)))}function Wk(t){typeof t!="function"&&(t=bw(t));for(var i=this._groups,e=i.length,n=new Array(e),o=0;o<e;++o)for(var r=i[o],s=r.length,a=n[o]=[],l,c=0;c<s;++c)(l=r[c])&&t.call(l,l.__data__,c,r)&&a.push(l);return new Xi(n,this._parents)}function Cw(t){return new Array(t.length)}function Qk(){return new Xi(this._enter||this._groups.map(Cw),this._parents)}function dp(t,i){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=i}dp.prototype={constructor:dp,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,i){return this._parent.insertBefore(t,i)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function Yk(t){return function(){return t}}function Xk(t,i,e,n,o,r){for(var s=0,a,l=i.length,c=r.length;s<c;++s)(a=i[s])?(a.__data__=r[s],n[s]=a):e[s]=new dp(t,r[s]);for(;s<l;++s)(a=i[s])&&(o[s]=a)}function Kk(t,i,e,n,o,r,s){var a,l,c=new Map,d=i.length,p=r.length,h=new Array(d),m;for(a=0;a<d;++a)(l=i[a])&&(h[a]=m=s.call(l,l.__data__,a,i)+"",c.has(m)?o[a]=l:c.set(m,l));for(a=0;a<p;++a)m=s.call(t,r[a],a,r)+"",(l=c.get(m))?(n[a]=l,l.__data__=r[a],c.delete(m)):e[a]=new dp(t,r[a]);for(a=0;a<d;++a)(l=i[a])&&c.get(h[a])===l&&(o[a]=l)}function Zk(t){return t.__data__}function Jk(t,i){if(!arguments.length)return Array.from(this,Zk);var e=i?Kk:Xk,n=this._parents,o=this._groups;typeof t!="function"&&(t=Yk(t));for(var r=o.length,s=new Array(r),a=new Array(r),l=new Array(r),c=0;c<r;++c){var d=n[c],p=o[c],h=p.length,m=eN(t.call(d,d&&d.__data__,c,n)),S=m.length,y=a[c]=new Array(S),w=s[c]=new Array(S),x=l[c]=new Array(h);e(d,p,y,w,x,m,i);for(var N=0,k=0,C,Q;N<S;++N)if(C=y[N]){for(N>=k&&(k=N+1);!(Q=w[k])&&++k<S;);C._next=Q||null}}return s=new Xi(s,n),s._enter=a,s._exit=l,s}function eN(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function tN(){return new Xi(this._exit||this._groups.map(Cw),this._parents)}function iN(t,i,e){var n=this.enter(),o=this,r=this.exit();return typeof t=="function"?(n=t(n),n&&(n=n.selection())):n=n.append(t+""),i!=null&&(o=i(o),o&&(o=o.selection())),e==null?r.remove():e(r),n&&o?n.merge(o).order():o}function nN(t){for(var i=t.selection?t.selection():t,e=this._groups,n=i._groups,o=e.length,r=n.length,s=Math.min(o,r),a=new Array(o),l=0;l<s;++l)for(var c=e[l],d=n[l],p=c.length,h=a[l]=new Array(p),m,S=0;S<p;++S)(m=c[S]||d[S])&&(h[S]=m);for(;l<o;++l)a[l]=e[l];return new Xi(a,this._parents)}function oN(){for(var t=this._groups,i=-1,e=t.length;++i<e;)for(var n=t[i],o=n.length-1,r=n[o],s;--o>=0;)(s=n[o])&&(r&&s.compareDocumentPosition(r)^4&&r.parentNode.insertBefore(s,r),r=s);return this}function rN(t){t||(t=sN);function i(p,h){return p&&h?t(p.__data__,h.__data__):!p-!h}for(var e=this._groups,n=e.length,o=new Array(n),r=0;r<n;++r){for(var s=e[r],a=s.length,l=o[r]=new Array(a),c,d=0;d<a;++d)(c=s[d])&&(l[d]=c);l.sort(i)}return new Xi(o,this._parents).order()}function sN(t,i){return t<i?-1:t>i?1:t>=i?0:NaN}function aN(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function lN(){return Array.from(this)}function cN(){for(var t=this._groups,i=0,e=t.length;i<e;++i)for(var n=t[i],o=0,r=n.length;o<r;++o){var s=n[o];if(s)return s}return null}function dN(){let t=0;for(let i of this)++t;return t}function pN(){return!this.node()}function hN(t){for(var i=this._groups,e=0,n=i.length;e<n;++e)for(var o=i[e],r=0,s=o.length,a;r<s;++r)(a=o[r])&&t.call(a,a.__data__,r,o);return this}function uN(t){return function(){this.removeAttribute(t)}}function mN(t){return function(){this.removeAttributeNS(t.space,t.local)}}function fN(t,i){return function(){this.setAttribute(t,i)}}function gN(t,i){return function(){this.setAttributeNS(t.space,t.local,i)}}function _N(t,i){return function(){var e=i.apply(this,arguments);e==null?this.removeAttribute(t):this.setAttribute(t,e)}}function vN(t,i){return function(){var e=i.apply(this,arguments);e==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function bN(t,i){var e=vp(t);if(arguments.length<2){var n=this.node();return e.local?n.getAttributeNS(e.space,e.local):n.getAttribute(e)}return this.each((i==null?e.local?mN:uN:typeof i=="function"?e.local?vN:_N:e.local?gN:fN)(e,i))}function ww(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function yN(t){return function(){this.style.removeProperty(t)}}function CN(t,i,e){return function(){this.style.setProperty(t,i,e)}}function wN(t,i,e){return function(){var n=i.apply(this,arguments);n==null?this.style.removeProperty(t):this.style.setProperty(t,n,e)}}function SN(t,i,e){return arguments.length>1?this.each((i==null?yN:typeof i=="function"?wN:CN)(t,i,e??"")):Xs(this.node(),t)}function Xs(t,i){return t.style.getPropertyValue(i)||ww(t).getComputedStyle(t,null).getPropertyValue(i)}function EN(t){return function(){delete this[t]}}function TN(t,i){return function(){this[t]=i}}function xN(t,i){return function(){var e=i.apply(this,arguments);e==null?delete this[t]:this[t]=e}}function PN(t,i){return arguments.length>1?this.each((i==null?EN:typeof i=="function"?xN:TN)(t,i)):this.node()[t]}function Sw(t){return t.trim().split(/^|\s+/)}function sf(t){return t.classList||new Ew(t)}function Ew(t){this._node=t,this._names=Sw(t.getAttribute("class")||"")}Ew.prototype={add:function(t){var i=this._names.indexOf(t);i<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var i=this._names.indexOf(t);i>=0&&(this._names.splice(i,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function Tw(t,i){for(var e=sf(t),n=-1,o=i.length;++n<o;)e.add(i[n])}function xw(t,i){for(var e=sf(t),n=-1,o=i.length;++n<o;)e.remove(i[n])}function ON(t){return function(){Tw(this,t)}}function IN(t){return function(){xw(this,t)}}function DN(t,i){return function(){(i.apply(this,arguments)?Tw:xw)(this,t)}}function MN(t,i){var e=Sw(t+"");if(arguments.length<2){for(var n=sf(this.node()),o=-1,r=e.length;++o<r;)if(!n.contains(e[o]))return!1;return!0}return this.each((typeof i=="function"?DN:i?ON:IN)(e,i))}function RN(){this.textContent=""}function AN(t){return function(){this.textContent=t}}function kN(t){return function(){var i=t.apply(this,arguments);this.textContent=i??""}}function NN(t){return arguments.length?this.each(t==null?RN:(typeof t=="function"?kN:AN)(t)):this.node().textContent}function LN(){this.innerHTML=""}function FN(t){return function(){this.innerHTML=t}}function VN(t){return function(){var i=t.apply(this,arguments);this.innerHTML=i??""}}function BN(t){return arguments.length?this.each(t==null?LN:(typeof t=="function"?VN:FN)(t)):this.node().innerHTML}function HN(){this.nextSibling&&this.parentNode.appendChild(this)}function jN(){return this.each(HN)}function qN(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function zN(){return this.each(qN)}function GN(t){var i=typeof t=="function"?t:_w(t);return this.select(function(){return this.appendChild(i.apply(this,arguments))})}function $N(){return null}function UN(t,i){var e=typeof t=="function"?t:_w(t),n=i==null?$N:typeof i=="function"?i:rf(i);return this.select(function(){return this.insertBefore(e.apply(this,arguments),n.apply(this,arguments)||null)})}function WN(){var t=this.parentNode;t&&t.removeChild(this)}function QN(){return this.each(WN)}function YN(){var t=this.cloneNode(!1),i=this.parentNode;return i?i.insertBefore(t,this.nextSibling):t}function XN(){var t=this.cloneNode(!0),i=this.parentNode;return i?i.insertBefore(t,this.nextSibling):t}function KN(t){return this.select(t?XN:YN)}function ZN(t){return arguments.length?this.property("__data__",t):this.node().__data__}function JN(t){return function(i){t.call(this,i,this.__data__)}}function eL(t){return t.trim().split(/^|\s+/).map(function(i){var e="",n=i.indexOf(".");return n>=0&&(e=i.slice(n+1),i=i.slice(0,n)),{type:i,name:e}})}function tL(t){return function(){var i=this.__on;if(i){for(var e=0,n=-1,o=i.length,r;e<o;++e)r=i[e],(!t.type||r.type===t.type)&&r.name===t.name?this.removeEventListener(r.type,r.listener,r.options):i[++n]=r;++n?i.length=n:delete this.__on}}}function iL(t,i,e){return function(){var n=this.__on,o,r=JN(i);if(n){for(var s=0,a=n.length;s<a;++s)if((o=n[s]).type===t.type&&o.name===t.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=r,o.options=e),o.value=i;return}}this.addEventListener(t.type,r,e),o={type:t.type,name:t.name,value:i,listener:r,options:e},n?n.push(o):this.__on=[o]}}function nL(t,i,e){var n=eL(t+""),o,r=n.length,s;if(arguments.length<2){var a=this.node().__on;if(a){for(var l=0,c=a.length,d;l<c;++l)for(o=0,d=a[l];o<r;++o)if((s=n[o]).type===d.type&&s.name===d.name)return d.value}return}for(a=i?iL:tL,o=0;o<r;++o)this.each(a(n[o],i,e));return this}function Pw(t,i,e){var n=ww(t),o=n.CustomEvent;typeof o=="function"?o=new o(i,e):(o=n.document.createEvent("Event"),e?(o.initEvent(i,e.bubbles,e.cancelable),o.detail=e.detail):o.initEvent(i,!1,!1)),t.dispatchEvent(o)}function oL(t,i){return function(){return Pw(this,t,i)}}function rL(t,i){return function(){return Pw(this,t,i.apply(this,arguments))}}function sL(t,i){return this.each((typeof i=="function"?rL:oL)(t,i))}function*aL(){for(var t=this._groups,i=0,e=t.length;i<e;++i)for(var n=t[i],o=0,r=n.length,s;o<r;++o)(s=n[o])&&(yield s)}var Ow=[null];function Xi(t,i){this._groups=t,this._parents=i}function _l(){return new Xi([[document.documentElement]],Ow)}function lL(){return this}Xi.prototype=_l.prototype={constructor:Xi,select:kk,selectAll:Vk,selectChild:qk,selectChildren:Uk,filter:Wk,data:Jk,enter:Qk,exit:tN,join:iN,merge:nN,selection:lL,order:oN,sort:rN,call:aN,nodes:lN,node:cN,size:dN,empty:pN,each:hN,attr:bN,style:SN,property:PN,classed:MN,text:NN,html:BN,raise:jN,lower:zN,append:GN,insert:UN,remove:QN,clone:KN,datum:ZN,on:nL,dispatch:sL,[Symbol.iterator]:aL};function Pn(t){return typeof t=="string"?new Xi([[document.querySelector(t)]],[document.documentElement]):new Xi([[t]],Ow)}function cL(t){let i;for(;i=t.sourceEvent;)t=i;return t}function XC(t,i){if(t=cL(t),i===void 0&&(i=t.currentTarget),i){var e=i.ownerSVGElement||i;if(e.createSVGPoint){var n=e.createSVGPoint();return n.x=t.clientX,n.y=t.clientY,n=n.matrixTransform(i.getScreenCTM().inverse()),[n.x,n.y]}if(i.getBoundingClientRect){var o=i.getBoundingClientRect();return[t.clientX-o.left-i.clientLeft,t.clientY-o.top-i.clientTop]}}return[t.pageX,t.pageY]}var Ym={capture:!0,passive:!1};function Xm(t){t.preventDefault(),t.stopImmediatePropagation()}function dL(t){var i=t.document.documentElement,e=Pn(t).on("dragstart.drag",Xm,Ym);"onselectstart"in i?e.on("selectstart.drag",Xm,Ym):(i.__noselect=i.style.MozUserSelect,i.style.MozUserSelect="none")}function pL(t,i){var e=t.document.documentElement,n=Pn(t).on("dragstart.drag",null);i&&(n.on("click.drag",Xm,Ym),setTimeout(function(){n.on("click.drag",null)},0)),"onselectstart"in e?n.on("selectstart.drag",null):(e.style.MozUserSelect=e.__noselect,delete e.__noselect)}function af(t,i,e){t.prototype=i.prototype=e,e.constructor=t}function Iw(t,i){var e=Object.create(t.prototype);for(var n in i)e[n]=i[n];return e}function vl(){}var ul=.7,pp=1/ul,Ys="\\s*([+-]?\\d+)\\s*",ml="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",po="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",hL=/^#([0-9a-f]{3,8})$/,uL=new RegExp(`^rgb\\(${Ys},${Ys},${Ys}\\)$`),mL=new RegExp(`^rgb\\(${po},${po},${po}\\)$`),fL=new RegExp(`^rgba\\(${Ys},${Ys},${Ys},${ml}\\)$`),gL=new RegExp(`^rgba\\(${po},${po},${po},${ml}\\)$`),_L=new RegExp(`^hsl\\(${ml},${po},${po}\\)$`),vL=new RegExp(`^hsla\\(${ml},${po},${po},${ml}\\)$`),KC={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};af(vl,$r,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:ZC,formatHex:ZC,formatHex8:bL,formatHsl:yL,formatRgb:JC,toString:JC});function ZC(){return this.rgb().formatHex()}function bL(){return this.rgb().formatHex8()}function yL(){return Dw(this).formatHsl()}function JC(){return this.rgb().formatRgb()}function $r(t){var i,e;return t=(t+"").trim().toLowerCase(),(i=hL.exec(t))?(e=i[1].length,i=parseInt(i[1],16),e===6?ew(i):e===3?new Ai(i>>8&15|i>>4&240,i>>4&15|i&240,(i&15)<<4|i&15,1):e===8?np(i>>24&255,i>>16&255,i>>8&255,(i&255)/255):e===4?np(i>>12&15|i>>8&240,i>>8&15|i>>4&240,i>>4&15|i&240,((i&15)<<4|i&15)/255):null):(i=uL.exec(t))?new Ai(i[1],i[2],i[3],1):(i=mL.exec(t))?new Ai(i[1]*255/100,i[2]*255/100,i[3]*255/100,1):(i=fL.exec(t))?np(i[1],i[2],i[3],i[4]):(i=gL.exec(t))?np(i[1]*255/100,i[2]*255/100,i[3]*255/100,i[4]):(i=_L.exec(t))?nw(i[1],i[2]/100,i[3]/100,1):(i=vL.exec(t))?nw(i[1],i[2]/100,i[3]/100,i[4]):KC.hasOwnProperty(t)?ew(KC[t]):t==="transparent"?new Ai(NaN,NaN,NaN,0):null}function ew(t){return new Ai(t>>16&255,t>>8&255,t&255,1)}function np(t,i,e,n){return n<=0&&(t=i=e=NaN),new Ai(t,i,e,n)}function CL(t){return t instanceof vl||(t=$r(t)),t?(t=t.rgb(),new Ai(t.r,t.g,t.b,t.opacity)):new Ai}function Km(t,i,e,n){return arguments.length===1?CL(t):new Ai(t,i,e,n??1)}function Ai(t,i,e,n){this.r=+t,this.g=+i,this.b=+e,this.opacity=+n}af(Ai,Km,Iw(vl,{brighter(t){return t=t==null?pp:Math.pow(pp,t),new Ai(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?ul:Math.pow(ul,t),new Ai(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Ai(Gr(this.r),Gr(this.g),Gr(this.b),hp(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:tw,formatHex:tw,formatHex8:wL,formatRgb:iw,toString:iw}));function tw(){return`#${zr(this.r)}${zr(this.g)}${zr(this.b)}`}function wL(){return`#${zr(this.r)}${zr(this.g)}${zr(this.b)}${zr((isNaN(this.opacity)?1:this.opacity)*255)}`}function iw(){let t=hp(this.opacity);return`${t===1?"rgb(":"rgba("}${Gr(this.r)}, ${Gr(this.g)}, ${Gr(this.b)}${t===1?")":`, ${t})`}`}function hp(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Gr(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function zr(t){return t=Gr(t),(t<16?"0":"")+t.toString(16)}function nw(t,i,e,n){return n<=0?t=i=e=NaN:e<=0||e>=1?t=i=NaN:i<=0&&(t=NaN),new On(t,i,e,n)}function Dw(t){if(t instanceof On)return new On(t.h,t.s,t.l,t.opacity);if(t instanceof vl||(t=$r(t)),!t)return new On;if(t instanceof On)return t;t=t.rgb();var i=t.r/255,e=t.g/255,n=t.b/255,o=Math.min(i,e,n),r=Math.max(i,e,n),s=NaN,a=r-o,l=(r+o)/2;return a?(i===r?s=(e-n)/a+(e<n)*6:e===r?s=(n-i)/a+2:s=(i-e)/a+4,a/=l<.5?r+o:2-r-o,s*=60):a=l>0&&l<1?0:s,new On(s,a,l,t.opacity)}function SL(t,i,e,n){return arguments.length===1?Dw(t):new On(t,i,e,n??1)}function On(t,i,e,n){this.h=+t,this.s=+i,this.l=+e,this.opacity=+n}af(On,SL,Iw(vl,{brighter(t){return t=t==null?pp:Math.pow(pp,t),new On(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?ul:Math.pow(ul,t),new On(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,i=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,n=e+(e<.5?e:1-e)*i,o=2*e-n;return new Ai(jm(t>=240?t-240:t+120,o,n),jm(t,o,n),jm(t<120?t+240:t-120,o,n),this.opacity)},clamp(){return new On(ow(this.h),op(this.s),op(this.l),hp(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let t=hp(this.opacity);return`${t===1?"hsl(":"hsla("}${ow(this.h)}, ${op(this.s)*100}%, ${op(this.l)*100}%${t===1?")":`, ${t})`}`}}));function ow(t){return t=(t||0)%360,t<0?t+360:t}function op(t){return Math.max(0,Math.min(1,t||0))}function jm(t,i,e){return(t<60?i+(e-i)*t/60:t<180?e:t<240?i+(e-i)*(240-t)/60:i)*255}var lf=t=>()=>t;function EL(t,i){return function(e){return t+e*i}}function TL(t,i,e){return t=Math.pow(t,e),i=Math.pow(i,e)-t,e=1/e,function(n){return Math.pow(t+n*i,e)}}function xL(t){return(t=+t)==1?Mw:function(i,e){return e-i?TL(i,e,t):lf(isNaN(i)?e:i)}}function Mw(t,i){var e=i-t;return e?EL(t,e):lf(isNaN(t)?i:t)}var up=function t(i){var e=xL(i);function n(o,r){var s=e((o=Km(o)).r,(r=Km(r)).r),a=e(o.g,r.g),l=e(o.b,r.b),c=Mw(o.opacity,r.opacity);return function(d){return o.r=s(d),o.g=a(d),o.b=l(d),o.opacity=c(d),o+""}}return n.gamma=t,n}(1);function PL(t,i){i||(i=[]);var e=t?Math.min(i.length,t.length):0,n=i.slice(),o;return function(r){for(o=0;o<e;++o)n[o]=t[o]*(1-r)+i[o]*r;return n}}function OL(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function IL(t,i){var e=i?i.length:0,n=t?Math.min(e,t.length):0,o=new Array(n),r=new Array(e),s;for(s=0;s<n;++s)o[s]=bl(t[s],i[s]);for(;s<e;++s)r[s]=i[s];return function(a){for(s=0;s<n;++s)r[s]=o[s](a);return r}}function DL(t,i){var e=new Date;return t=+t,i=+i,function(n){return e.setTime(t*(1-n)+i*n),e}}function pn(t,i){return t=+t,i=+i,function(e){return t*(1-e)+i*e}}function ML(t,i){var e={},n={},o;(t===null||typeof t!="object")&&(t={}),(i===null||typeof i!="object")&&(i={});for(o in i)o in t?e[o]=bl(t[o],i[o]):n[o]=i[o];return function(r){for(o in e)n[o]=e[o](r);return n}}var Zm=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,qm=new RegExp(Zm.source,"g");function RL(t){return function(){return t}}function AL(t){return function(i){return t(i)+""}}function Rw(t,i){var e=Zm.lastIndex=qm.lastIndex=0,n,o,r,s=-1,a=[],l=[];for(t=t+"",i=i+"";(n=Zm.exec(t))&&(o=qm.exec(i));)(r=o.index)>e&&(r=i.slice(e,r),a[s]?a[s]+=r:a[++s]=r),(n=n[0])===(o=o[0])?a[s]?a[s]+=o:a[++s]=o:(a[++s]=null,l.push({i:s,x:pn(n,o)})),e=qm.lastIndex;return e<i.length&&(r=i.slice(e),a[s]?a[s]+=r:a[++s]=r),a.length<2?l[0]?AL(l[0].x):RL(i):(i=l.length,function(c){for(var d=0,p;d<i;++d)a[(p=l[d]).i]=p.x(c);return a.join("")})}function bl(t,i){var e=typeof i,n;return i==null||e==="boolean"?lf(i):(e==="number"?pn:e==="string"?(n=$r(i))?(i=n,up):Rw:i instanceof $r?up:i instanceof Date?DL:OL(i)?PL:Array.isArray(i)?IL:typeof i.valueOf!="function"&&typeof i.toString!="function"||isNaN(i)?ML:pn)(t,i)}var rw=180/Math.PI,Aw={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function kw(t,i,e,n,o,r){var s,a,l;return(s=Math.sqrt(t*t+i*i))&&(t/=s,i/=s),(l=t*e+i*n)&&(e-=t*l,n-=i*l),(a=Math.sqrt(e*e+n*n))&&(e/=a,n/=a,l/=a),t*n<i*e&&(t=-t,i=-i,l=-l,s=-s),{translateX:o,translateY:r,rotate:Math.atan2(i,t)*rw,skewX:Math.atan(l)*rw,scaleX:s,scaleY:a}}var rp;function kL(t){let i=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return i.isIdentity?Aw:kw(i.a,i.b,i.c,i.d,i.e,i.f)}function NL(t){return t==null||(rp||(rp=document.createElementNS("http://www.w3.org/2000/svg","g")),rp.setAttribute("transform",t),!(t=rp.transform.baseVal.consolidate()))?Aw:(t=t.matrix,kw(t.a,t.b,t.c,t.d,t.e,t.f))}function Nw(t,i,e,n){function o(c){return c.length?c.pop()+" ":""}function r(c,d,p,h,m,S){if(c!==p||d!==h){var y=m.push("translate(",null,i,null,e);S.push({i:y-4,x:pn(c,p)},{i:y-2,x:pn(d,h)})}else(p||h)&&m.push("translate("+p+i+h+e)}function s(c,d,p,h){c!==d?(c-d>180?d+=360:d-c>180&&(c+=360),h.push({i:p.push(o(p)+"rotate(",null,n)-2,x:pn(c,d)})):d&&p.push(o(p)+"rotate("+d+n)}function a(c,d,p,h){c!==d?h.push({i:p.push(o(p)+"skewX(",null,n)-2,x:pn(c,d)}):d&&p.push(o(p)+"skewX("+d+n)}function l(c,d,p,h,m,S){if(c!==p||d!==h){var y=m.push(o(m)+"scale(",null,",",null,")");S.push({i:y-4,x:pn(c,p)},{i:y-2,x:pn(d,h)})}else(p!==1||h!==1)&&m.push(o(m)+"scale("+p+","+h+")")}return function(c,d){var p=[],h=[];return c=t(c),d=t(d),r(c.translateX,c.translateY,d.translateX,d.translateY,p,h),s(c.rotate,d.rotate,p,h),a(c.skewX,d.skewX,p,h),l(c.scaleX,c.scaleY,d.scaleX,d.scaleY,p,h),c=d=null,function(m){for(var S=-1,y=h.length,w;++S<y;)p[(w=h[S]).i]=w.x(m);return p.join("")}}}var LL=Nw(kL,"px, ","px)","deg)"),FL=Nw(NL,", ",")",")"),Ks=0,dl=0,cl=0,Lw=1e3,mp,pl,fp=0,Ur=0,bp=0,fl=typeof performance=="object"&&performance.now?performance:Date,Fw=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function cf(){return Ur||(Fw(VL),Ur=fl.now()+bp)}function VL(){Ur=0}function gp(){this._call=this._time=this._next=null}gp.prototype=Vw.prototype={constructor:gp,restart:function(t,i,e){if(typeof t!="function")throw new TypeError("callback is not a function");e=(e==null?cf():+e)+(i==null?0:+i),!this._next&&pl!==this&&(pl?pl._next=this:mp=this,pl=this),this._call=t,this._time=e,Jm()},stop:function(){this._call&&(this._call=null,this._time=1/0,Jm())}};function Vw(t,i,e){var n=new gp;return n.restart(t,i,e),n}function BL(){cf(),++Ks;for(var t=mp,i;t;)(i=Ur-t._time)>=0&&t._call.call(void 0,i),t=t._next;--Ks}function sw(){Ur=(fp=fl.now())+bp,Ks=dl=0;try{BL()}finally{Ks=0,jL(),Ur=0}}function HL(){var t=fl.now(),i=t-fp;i>Lw&&(bp-=i,fp=t)}function jL(){for(var t,i=mp,e,n=1/0;i;)i._call?(n>i._time&&(n=i._time),t=i,i=i._next):(e=i._next,i._next=null,i=t?t._next=e:mp=e);pl=t,Jm(n)}function Jm(t){if(!Ks){dl&&(dl=clearTimeout(dl));var i=t-Ur;i>24?(t<1/0&&(dl=setTimeout(sw,t-fl.now()-bp)),cl&&(cl=clearInterval(cl))):(cl||(fp=fl.now(),cl=setInterval(HL,Lw)),Ks=1,Fw(sw))}}function aw(t,i,e){var n=new gp;return i=i==null?0:+i,n.restart(o=>{n.stop(),t(o+i)},i,e),n}var qL=of("start","end","cancel","interrupt"),zL=[],Bw=0,lw=1,ef=2,ap=3,cw=4,tf=5,lp=6;function yp(t,i,e,n,o,r){var s=t.__transition;if(!s)t.__transition={};else if(e in s)return;GL(t,e,{name:i,index:n,group:o,on:qL,tween:zL,time:r.time,delay:r.delay,duration:r.duration,ease:r.ease,timer:null,state:Bw})}function df(t,i){var e=In(t,i);if(e.state>Bw)throw new Error("too late; already scheduled");return e}function ho(t,i){var e=In(t,i);if(e.state>ap)throw new Error("too late; already running");return e}function In(t,i){var e=t.__transition;if(!e||!(e=e[i]))throw new Error("transition not found");return e}function GL(t,i,e){var n=t.__transition,o;n[i]=e,e.timer=Vw(r,0,e.time);function r(c){e.state=lw,e.timer.restart(s,e.delay,e.time),e.delay<=c&&s(c-e.delay)}function s(c){var d,p,h,m;if(e.state!==lw)return l();for(d in n)if(m=n[d],m.name===e.name){if(m.state===ap)return aw(s);m.state===cw?(m.state=lp,m.timer.stop(),m.on.call("interrupt",t,t.__data__,m.index,m.group),delete n[d]):+d<i&&(m.state=lp,m.timer.stop(),m.on.call("cancel",t,t.__data__,m.index,m.group),delete n[d])}if(aw(function(){e.state===ap&&(e.state=cw,e.timer.restart(a,e.delay,e.time),a(c))}),e.state=ef,e.on.call("start",t,t.__data__,e.index,e.group),e.state===ef){for(e.state=ap,o=new Array(h=e.tween.length),d=0,p=-1;d<h;++d)(m=e.tween[d].value.call(t,t.__data__,e.index,e.group))&&(o[++p]=m);o.length=p+1}}function a(c){for(var d=c<e.duration?e.ease.call(null,c/e.duration):(e.timer.restart(l),e.state=tf,1),p=-1,h=o.length;++p<h;)o[p].call(t,d);e.state===tf&&(e.on.call("end",t,t.__data__,e.index,e.group),l())}function l(){e.state=lp,e.timer.stop(),delete n[i];for(var c in n)return;delete t.__transition}}function nf(t,i){var e=t.__transition,n,o,r=!0,s;if(e){i=i==null?null:i+"";for(s in e){if((n=e[s]).name!==i){r=!1;continue}o=n.state>ef&&n.state<tf,n.state=lp,n.timer.stop(),n.on.call(o?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete e[s]}r&&delete t.__transition}}function $L(t){return this.each(function(){nf(this,t)})}function UL(t,i){var e,n;return function(){var o=ho(this,t),r=o.tween;if(r!==e){n=e=r;for(var s=0,a=n.length;s<a;++s)if(n[s].name===i){n=n.slice(),n.splice(s,1);break}}o.tween=n}}function WL(t,i,e){var n,o;if(typeof e!="function")throw new Error;return function(){var r=ho(this,t),s=r.tween;if(s!==n){o=(n=s).slice();for(var a={name:i,value:e},l=0,c=o.length;l<c;++l)if(o[l].name===i){o[l]=a;break}l===c&&o.push(a)}r.tween=o}}function QL(t,i){var e=this._id;if(t+="",arguments.length<2){for(var n=In(this.node(),e).tween,o=0,r=n.length,s;o<r;++o)if((s=n[o]).name===t)return s.value;return null}return this.each((i==null?UL:WL)(e,t,i))}function pf(t,i,e){var n=t._id;return t.each(function(){var o=ho(this,n);(o.value||(o.value={}))[i]=e.apply(this,arguments)}),function(o){return In(o,n).value[i]}}function Hw(t,i){var e;return(typeof i=="number"?pn:i instanceof $r?up:(e=$r(i))?(i=e,up):Rw)(t,i)}function YL(t){return function(){this.removeAttribute(t)}}function XL(t){return function(){this.removeAttributeNS(t.space,t.local)}}function KL(t,i,e){var n,o=e+"",r;return function(){var s=this.getAttribute(t);return s===o?null:s===n?r:r=i(n=s,e)}}function ZL(t,i,e){var n,o=e+"",r;return function(){var s=this.getAttributeNS(t.space,t.local);return s===o?null:s===n?r:r=i(n=s,e)}}function JL(t,i,e){var n,o,r;return function(){var s,a=e(this),l;return a==null?void this.removeAttribute(t):(s=this.getAttribute(t),l=a+"",s===l?null:s===n&&l===o?r:(o=l,r=i(n=s,a)))}}function e2(t,i,e){var n,o,r;return function(){var s,a=e(this),l;return a==null?void this.removeAttributeNS(t.space,t.local):(s=this.getAttributeNS(t.space,t.local),l=a+"",s===l?null:s===n&&l===o?r:(o=l,r=i(n=s,a)))}}function t2(t,i){var e=vp(t),n=e==="transform"?FL:Hw;return this.attrTween(t,typeof i=="function"?(e.local?e2:JL)(e,n,pf(this,"attr."+t,i)):i==null?(e.local?XL:YL)(e):(e.local?ZL:KL)(e,n,i))}function i2(t,i){return function(e){this.setAttribute(t,i.call(this,e))}}function n2(t,i){return function(e){this.setAttributeNS(t.space,t.local,i.call(this,e))}}function o2(t,i){var e,n;function o(){var r=i.apply(this,arguments);return r!==n&&(e=(n=r)&&n2(t,r)),e}return o._value=i,o}function r2(t,i){var e,n;function o(){var r=i.apply(this,arguments);return r!==n&&(e=(n=r)&&i2(t,r)),e}return o._value=i,o}function s2(t,i){var e="attr."+t;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(i==null)return this.tween(e,null);if(typeof i!="function")throw new Error;var n=vp(t);return this.tween(e,(n.local?o2:r2)(n,i))}function a2(t,i){return function(){df(this,t).delay=+i.apply(this,arguments)}}function l2(t,i){return i=+i,function(){df(this,t).delay=i}}function c2(t){var i=this._id;return arguments.length?this.each((typeof t=="function"?a2:l2)(i,t)):In(this.node(),i).delay}function d2(t,i){return function(){ho(this,t).duration=+i.apply(this,arguments)}}function p2(t,i){return i=+i,function(){ho(this,t).duration=i}}function h2(t){var i=this._id;return arguments.length?this.each((typeof t=="function"?d2:p2)(i,t)):In(this.node(),i).duration}function u2(t,i){if(typeof i!="function")throw new Error;return function(){ho(this,t).ease=i}}function m2(t){var i=this._id;return arguments.length?this.each(u2(i,t)):In(this.node(),i).ease}function f2(t,i){return function(){var e=i.apply(this,arguments);if(typeof e!="function")throw new Error;ho(this,t).ease=e}}function g2(t){if(typeof t!="function")throw new Error;return this.each(f2(this._id,t))}function _2(t){typeof t!="function"&&(t=bw(t));for(var i=this._groups,e=i.length,n=new Array(e),o=0;o<e;++o)for(var r=i[o],s=r.length,a=n[o]=[],l,c=0;c<s;++c)(l=r[c])&&t.call(l,l.__data__,c,r)&&a.push(l);return new ko(n,this._parents,this._name,this._id)}function v2(t){if(t._id!==this._id)throw new Error;for(var i=this._groups,e=t._groups,n=i.length,o=e.length,r=Math.min(n,o),s=new Array(n),a=0;a<r;++a)for(var l=i[a],c=e[a],d=l.length,p=s[a]=new Array(d),h,m=0;m<d;++m)(h=l[m]||c[m])&&(p[m]=h);for(;a<n;++a)s[a]=i[a];return new ko(s,this._parents,this._name,this._id)}function b2(t){return(t+"").trim().split(/^|\s+/).every(function(i){var e=i.indexOf(".");return e>=0&&(i=i.slice(0,e)),!i||i==="start"})}function y2(t,i,e){var n,o,r=b2(i)?df:ho;return function(){var s=r(this,t),a=s.on;a!==n&&(o=(n=a).copy()).on(i,e),s.on=o}}function C2(t,i){var e=this._id;return arguments.length<2?In(this.node(),e).on.on(t):this.each(y2(e,t,i))}function w2(t){return function(){var i=this.parentNode;for(var e in this.__transition)if(+e!==t)return;i&&i.removeChild(this)}}function S2(){return this.on("end.remove",w2(this._id))}function E2(t){var i=this._name,e=this._id;typeof t!="function"&&(t=rf(t));for(var n=this._groups,o=n.length,r=new Array(o),s=0;s<o;++s)for(var a=n[s],l=a.length,c=r[s]=new Array(l),d,p,h=0;h<l;++h)(d=a[h])&&(p=t.call(d,d.__data__,h,a))&&("__data__"in d&&(p.__data__=d.__data__),c[h]=p,yp(c[h],i,e,h,c,In(d,e)));return new ko(r,this._parents,i,e)}function T2(t){var i=this._name,e=this._id;typeof t!="function"&&(t=vw(t));for(var n=this._groups,o=n.length,r=[],s=[],a=0;a<o;++a)for(var l=n[a],c=l.length,d,p=0;p<c;++p)if(d=l[p]){for(var h=t.call(d,d.__data__,p,l),m,S=In(d,e),y=0,w=h.length;y<w;++y)(m=h[y])&&yp(m,i,e,y,h,S);r.push(h),s.push(d)}return new ko(r,s,i,e)}var x2=_l.prototype.constructor;function P2(){return new x2(this._groups,this._parents)}function O2(t,i){var e,n,o;return function(){var r=Xs(this,t),s=(this.style.removeProperty(t),Xs(this,t));return r===s?null:r===e&&s===n?o:o=i(e=r,n=s)}}function jw(t){return function(){this.style.removeProperty(t)}}function I2(t,i,e){var n,o=e+"",r;return function(){var s=Xs(this,t);return s===o?null:s===n?r:r=i(n=s,e)}}function D2(t,i,e){var n,o,r;return function(){var s=Xs(this,t),a=e(this),l=a+"";return a==null&&(l=a=(this.style.removeProperty(t),Xs(this,t))),s===l?null:s===n&&l===o?r:(o=l,r=i(n=s,a))}}function M2(t,i){var e,n,o,r="style."+i,s="end."+r,a;return function(){var l=ho(this,t),c=l.on,d=l.value[r]==null?a||(a=jw(i)):void 0;(c!==e||o!==d)&&(n=(e=c).copy()).on(s,o=d),l.on=n}}function R2(t,i,e){var n=(t+="")=="transform"?LL:Hw;return i==null?this.styleTween(t,O2(t,n)).on("end.style."+t,jw(t)):typeof i=="function"?this.styleTween(t,D2(t,n,pf(this,"style."+t,i))).each(M2(this._id,t)):this.styleTween(t,I2(t,n,i),e).on("end.style."+t,null)}function A2(t,i,e){return function(n){this.style.setProperty(t,i.call(this,n),e)}}function k2(t,i,e){var n,o;function r(){var s=i.apply(this,arguments);return s!==o&&(n=(o=s)&&A2(t,s,e)),n}return r._value=i,r}function N2(t,i,e){var n="style."+(t+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(i==null)return this.tween(n,null);if(typeof i!="function")throw new Error;return this.tween(n,k2(t,i,e??""))}function L2(t){return function(){this.textContent=t}}function F2(t){return function(){var i=t(this);this.textContent=i??""}}function V2(t){return this.tween("text",typeof t=="function"?F2(pf(this,"text",t)):L2(t==null?"":t+""))}function B2(t){return function(i){this.textContent=t.call(this,i)}}function H2(t){var i,e;function n(){var o=t.apply(this,arguments);return o!==e&&(i=(e=o)&&B2(o)),i}return n._value=t,n}function j2(t){var i="text";if(arguments.length<1)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,H2(t))}function q2(){for(var t=this._name,i=this._id,e=qw(),n=this._groups,o=n.length,r=0;r<o;++r)for(var s=n[r],a=s.length,l,c=0;c<a;++c)if(l=s[c]){var d=In(l,i);yp(l,t,e,c,s,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new ko(n,this._parents,t,e)}function z2(){var t,i,e=this,n=e._id,o=e.size();return new Promise(function(r,s){var a={value:s},l={value:function(){--o===0&&r()}};e.each(function(){var c=ho(this,n),d=c.on;d!==t&&(i=(t=d).copy(),i._.cancel.push(a),i._.interrupt.push(a),i._.end.push(l)),c.on=i}),o===0&&r()})}var G2=0;function ko(t,i,e,n){this._groups=t,this._parents=i,this._name=e,this._id=n}function qw(){return++G2}var Ro=_l.prototype;ko.prototype={constructor:ko,select:E2,selectAll:T2,selectChild:Ro.selectChild,selectChildren:Ro.selectChildren,filter:_2,merge:v2,selection:P2,transition:q2,call:Ro.call,nodes:Ro.nodes,node:Ro.node,size:Ro.size,empty:Ro.empty,each:Ro.each,on:C2,attr:t2,attrTween:s2,style:R2,styleTween:N2,text:V2,textTween:j2,remove:S2,tween:QL,delay:c2,duration:h2,ease:m2,easeVarying:g2,end:z2,[Symbol.iterator]:Ro[Symbol.iterator]};function $2(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var U2={time:null,delay:0,duration:250,ease:$2};function W2(t,i){for(var e;!(e=t.__transition)||!(e=e[i]);)if(!(t=t.parentNode))throw new Error(`transition ${i} not found`);return e}function Q2(t){var i,e;t instanceof ko?(i=t._id,t=t._name):(i=qw(),(e=U2).time=cf(),t=t==null?null:t+"");for(var n=this._groups,o=n.length,r=0;r<o;++r)for(var s=n[r],a=s.length,l,c=0;c<a;++c)(l=s[c])&&yp(l,t,i,c,s,e||W2(l,i));return new ko(n,this._parents,t,i)}_l.prototype.interrupt=$L;_l.prototype.transition=Q2;var zm=t=>()=>t;function Y2(t,{sourceEvent:i,target:e,selection:n,mode:o,dispatch:r}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:i,enumerable:!0,configurable:!0},target:{value:e,enumerable:!0,configurable:!0},selection:{value:n,enumerable:!0,configurable:!0},mode:{value:o,enumerable:!0,configurable:!0},_:{value:r}})}function X2(t){t.stopImmediatePropagation()}function Gm(t){t.preventDefault(),t.stopImmediatePropagation()}var dw={name:"drag"},$m={name:"space"},Ws={name:"handle"},Qs={name:"center"},{abs:pw,max:hi,min:ui}=Math;function hw(t){return[+t[0],+t[1]]}function uw(t){return[hw(t[0]),hw(t[1])]}var cp={name:"x",handles:["w","e"].map(_p),input:function(t,i){return t==null?null:[[+t[0],i[0][1]],[+t[1],i[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},Um={name:"y",handles:["n","s"].map(_p),input:function(t,i){return t==null?null:[[i[0][0],+t[0]],[i[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},Ao={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},mw={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},fw={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},K2={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},Z2={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function _p(t){return{type:t}}function J2(t){return!t.ctrlKey&&!t.button}function eF(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function tF(){return navigator.maxTouchPoints||"ontouchstart"in this}function Wm(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function iF(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function gw(t){var i=t.__brush;return i?i.dim.output(i.selection):null}function nF(){return oF(cp)}function oF(t){var i=eF,e=J2,n=tF,o=!0,r=of("start","brush","end"),s=6,a;function l(w){var x=w.property("__brush",y).selectAll(".overlay").data([_p("overlay")]);x.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Ao.overlay).merge(x).each(function(){var k=Wm(this).extent;Pn(this).attr("x",k[0][0]).attr("y",k[0][1]).attr("width",k[1][0]-k[0][0]).attr("height",k[1][1]-k[0][1])}),w.selectAll(".selection").data([_p("selection")]).enter().append("rect").attr("class","selection").attr("cursor",Ao.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var N=w.selectAll(".handle").data(t.handles,function(k){return k.type});N.exit().remove(),N.enter().append("rect").attr("class",function(k){return"handle handle--"+k.type}).attr("cursor",function(k){return Ao[k.type]}),w.each(c).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",h).filter(n).on("touchstart.brush",h).on("touchmove.brush",m).on("touchend.brush touchcancel.brush",S).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}l.move=function(w,x,N){w.tween?w.on("start.brush",function(k){d(this,arguments).beforestart().start(k)}).on("interrupt.brush end.brush",function(k){d(this,arguments).end(k)}).tween("brush",function(){var k=this,C=k.__brush,Q=d(k,arguments),$=C.selection,ie=t.input(typeof x=="function"?x.apply(this,arguments):x,C.extent),re=bl($,ie);function we(ge){C.selection=ge===1&&ie===null?null:re(ge),c.call(k),Q.brush()}return $!==null&&ie!==null?we:we(1)}):w.each(function(){var k=this,C=arguments,Q=k.__brush,$=t.input(typeof x=="function"?x.apply(k,C):x,Q.extent),ie=d(k,C).beforestart();nf(k),Q.selection=$===null?null:$,c.call(k),ie.start(N).brush(N).end(N)})},l.clear=function(w,x){l.move(w,null,x)};function c(){var w=Pn(this),x=Wm(this).selection;x?(w.selectAll(".selection").style("display",null).attr("x",x[0][0]).attr("y",x[0][1]).attr("width",x[1][0]-x[0][0]).attr("height",x[1][1]-x[0][1]),w.selectAll(".handle").style("display",null).attr("x",function(N){return N.type[N.type.length-1]==="e"?x[1][0]-s/2:x[0][0]-s/2}).attr("y",function(N){return N.type[0]==="s"?x[1][1]-s/2:x[0][1]-s/2}).attr("width",function(N){return N.type==="n"||N.type==="s"?x[1][0]-x[0][0]+s:s}).attr("height",function(N){return N.type==="e"||N.type==="w"?x[1][1]-x[0][1]+s:s})):w.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function d(w,x,N){var k=w.__brush.emitter;return k&&(!N||!k.clean)?k:new p(w,x,N)}function p(w,x,N){this.that=w,this.args=x,this.state=w.__brush,this.active=0,this.clean=N}p.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(w,x){return this.starting?(this.starting=!1,this.emit("start",w,x)):this.emit("brush",w),this},brush:function(w,x){return this.emit("brush",w,x),this},end:function(w,x){return--this.active===0&&(delete this.state.emitter,this.emit("end",w,x)),this},emit:function(w,x,N){var k=Pn(this.that).datum();r.call(w,this.that,new Y2(w,{sourceEvent:x,target:l,selection:t.output(this.state.selection),mode:N,dispatch:r}),k)}};function h(w){if(a&&!w.touches||!e.apply(this,arguments))return;var x=this,N=w.target.__data__.type,k=(o&&w.metaKey?N="overlay":N)==="selection"?dw:o&&w.altKey?Qs:Ws,C=t===Um?null:K2[N],Q=t===cp?null:Z2[N],$=Wm(x),ie=$.extent,re=$.selection,we=ie[0][0],ge,te,_e=ie[0][1],pe,U,W=ie[1][0],P,O,V=ie[1][1],H,K,ce=0,oe=0,Re,he=C&&Q&&o&&w.shiftKey,lt,kt,Be=Array.from(w.touches||[w],xe=>{let Ct=xe.identifier;return xe=XC(xe,x),xe.point0=xe.slice(),xe.identifier=Ct,xe});nf(x);var Pt=d(x,arguments,!0).beforestart();if(N==="overlay"){re&&(Re=!0);let xe=[Be[0],Be[1]||Be[0]];$.selection=re=[[ge=t===Um?we:ui(xe[0][0],xe[1][0]),pe=t===cp?_e:ui(xe[0][1],xe[1][1])],[P=t===Um?W:hi(xe[0][0],xe[1][0]),H=t===cp?V:hi(xe[0][1],xe[1][1])]],Be.length>1&&Fi(w)}else ge=re[0][0],pe=re[0][1],P=re[1][0],H=re[1][1];te=ge,U=pe,O=P,K=H;var Bt=Pn(x).attr("pointer-events","none"),qt=Bt.selectAll(".overlay").attr("cursor",Ao[N]);if(w.touches)Pt.moved=mr,Pt.ended=fr;else{var Li=Pn(w.view).on("mousemove.brush",mr,!0).on("mouseup.brush",fr,!0);o&&Li.on("keydown.brush",Jr,!0).on("keyup.brush",gr,!0),dL(w.view)}c.call(x),Pt.start(w,k.name);function mr(xe){for(let Ct of xe.changedTouches||[xe])for(let kn of Be)kn.identifier===Ct.identifier&&(kn.cur=XC(Ct,x));if(he&&!lt&&!kt&&Be.length===1){let Ct=Be[0];pw(Ct.cur[0]-Ct[0])>pw(Ct.cur[1]-Ct[1])?kt=!0:lt=!0}for(let Ct of Be)Ct.cur&&(Ct[0]=Ct.cur[0],Ct[1]=Ct.cur[1]);Re=!0,Gm(xe),Fi(xe)}function Fi(xe){let Ct=Be[0],kn=Ct.point0;var Ut;switch(ce=Ct[0]-kn[0],oe=Ct[1]-kn[1],k){case $m:case dw:{C&&(ce=hi(we-ge,ui(W-P,ce)),te=ge+ce,O=P+ce),Q&&(oe=hi(_e-pe,ui(V-H,oe)),U=pe+oe,K=H+oe);break}case Ws:{Be[1]?(C&&(te=hi(we,ui(W,Be[0][0])),O=hi(we,ui(W,Be[1][0])),C=1),Q&&(U=hi(_e,ui(V,Be[0][1])),K=hi(_e,ui(V,Be[1][1])),Q=1)):(C<0?(ce=hi(we-ge,ui(W-ge,ce)),te=ge+ce,O=P):C>0&&(ce=hi(we-P,ui(W-P,ce)),te=ge,O=P+ce),Q<0?(oe=hi(_e-pe,ui(V-pe,oe)),U=pe+oe,K=H):Q>0&&(oe=hi(_e-H,ui(V-H,oe)),U=pe,K=H+oe));break}case Qs:{C&&(te=hi(we,ui(W,ge-ce*C)),O=hi(we,ui(W,P+ce*C))),Q&&(U=hi(_e,ui(V,pe-oe*Q)),K=hi(_e,ui(V,H+oe*Q)));break}}O<te&&(C*=-1,Ut=ge,ge=P,P=Ut,Ut=te,te=O,O=Ut,N in mw&&qt.attr("cursor",Ao[N=mw[N]])),K<U&&(Q*=-1,Ut=pe,pe=H,H=Ut,Ut=U,U=K,K=Ut,N in fw&&qt.attr("cursor",Ao[N=fw[N]])),$.selection&&(re=$.selection),lt&&(te=re[0][0],O=re[1][0]),kt&&(U=re[0][1],K=re[1][1]),(re[0][0]!==te||re[0][1]!==U||re[1][0]!==O||re[1][1]!==K)&&($.selection=[[te,U],[O,K]],c.call(x),Pt.brush(xe,k.name))}function fr(xe){if(X2(xe),xe.touches){if(xe.touches.length)return;a&&clearTimeout(a),a=setTimeout(function(){a=null},500)}else pL(xe.view,Re),Li.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);Bt.attr("pointer-events","all"),qt.attr("cursor",Ao.overlay),$.selection&&(re=$.selection),iF(re)&&($.selection=null,c.call(x)),Pt.end(xe,k.name)}function Jr(xe){switch(xe.keyCode){case 16:{he=C&&Q;break}case 18:{k===Ws&&(C&&(P=O-ce*C,ge=te+ce*C),Q&&(H=K-oe*Q,pe=U+oe*Q),k=Qs,Fi(xe));break}case 32:{(k===Ws||k===Qs)&&(C<0?P=O-ce:C>0&&(ge=te-ce),Q<0?H=K-oe:Q>0&&(pe=U-oe),k=$m,qt.attr("cursor",Ao.selection),Fi(xe));break}default:return}Gm(xe)}function gr(xe){switch(xe.keyCode){case 16:{he&&(lt=kt=he=!1,Fi(xe));break}case 18:{k===Qs&&(C<0?P=O:C>0&&(ge=te),Q<0?H=K:Q>0&&(pe=U),k=Ws,Fi(xe));break}case 32:{k===$m&&(xe.altKey?(C&&(P=O-ce*C,ge=te+ce*C),Q&&(H=K-oe*Q,pe=U+oe*Q),k=Qs):(C<0?P=O:C>0&&(ge=te),Q<0?H=K:Q>0&&(pe=U),k=Ws),qt.attr("cursor",Ao[N]),Fi(xe));break}default:return}Gm(xe)}}function m(w){d(this,arguments).moved(w)}function S(w){d(this,arguments).ended(w)}function y(){var w=this.__brush||{selection:null};return w.extent=uw(i.apply(this,arguments)),w.dim=t,w}return l.extent=function(w){return arguments.length?(i=typeof w=="function"?w:zm(uw(w)),l):i},l.filter=function(w){return arguments.length?(e=typeof w=="function"?w:zm(!!w),l):e},l.touchable=function(w){return arguments.length?(n=typeof w=="function"?w:zm(!!w),l):n},l.handleSize=function(w){return arguments.length?(s=+w,l):s},l.keyModifiers=function(w){return arguments.length?(o=!!w,l):o},l.on=function(){var w=r.on.apply(r,arguments);return w===r?l:w},l}function hl(t,i,e){this.k=t,this.x=i,this.y=e}hl.prototype={constructor:hl,scale:function(t){return t===1?this:new hl(this.k*t,this.x,this.y)},translate:function(t,i){return t===0&i===0?this:new hl(this.k,this.x+this.k*t,this.y+this.k*i)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};hl.prototype;var gl=class{constructor({svgEl:i,onBrushChange:e,xAxisGroup:n,xScale:o,getTimelineEdges:r}){Xt(this,"brush"),Xt(this,"brushGroupSelection"),Xt(this,"brushGroup"),Xt(this,"onBrushChange"),Xt(this,"svgEl"),Xt(this,"xAxisGroup"),Xt(this,"xScale"),Xt(this,"getTimelineEdges"),Xt(this,"isPanning",!1),Xt(this,"isZooming",!1),Xt(this,"panInterval"),Xt(this,"zoomInterval"),Xt(this,"INTERVAL_MS",20),Xt(this,"ACCELERATION_FACTOR",.04),Xt(this,"ZOOM_FACTOR",.01),Xt(this,"PAN_FACTOR",.04),Xt(this,"zoomScale",1),Xt(this,"translateX",0),this.svgEl=i,this.onBrushChange=e,this.xAxisGroup=n,this.xScale=o,this.getTimelineEdges=r,this.initializeBrush()}initializeBrush(){this.brush=nF().on("brush",this.brushed.bind(this));let i=this.svgEl.getBoundingClientRect();this.setBrushExtent(i),this.brushGroupSelection=this.xAxisGroup.append("g").attr("class","vcl-brush"),this.brushGroup=this.brushGroupSelection.node(),this.moveBrush(this.xScale.range())}brushed(i){let e=this.svgEl.getBoundingClientRect(),{leftEdge:n,rightEdge:o}=this.getTimelineEdges(e),[r,s]=i.selection,a=s-r;this.zoomScale=(o-n)/a,this.translateX=-(r-n)*this.zoomScale,this.onBrushChange(this.zoomScale,this.translateX)}calculateBrushSelectionAfterZoom(i,e,n,o,r){let{leftEdge:s,rightEdge:a}=this.getTimelineEdges(r),l=(e-i)*this.ZOOM_FACTOR*o*n,c=Math.max(s,i+l),d=Math.min(a,e-l);return[c,d]}calculateBrushSelectionAfterPan(i,e,n,o,r){let{leftEdge:s,rightEdge:a}=this.getTimelineEdges(r),l=e-i,c=l*this.PAN_FACTOR*o*n,d=i+c,p=e+c,h=d<=s,m=p>=a;return h?[s,s+l]:m?[a-l,a]:[d,p]}createInterval(i,e,n){return setInterval(()=>{i+=this.ACCELERATION_FACTOR,n(e,i)},this.INTERVAL_MS)}setBrushExtent(i){let{leftEdge:e,rightEdge:n}=this.getTimelineEdges(i);this.brush.extent([[e,0],[n,i.height]])}moveBrush(i){this.brushGroupSelection.call(this.brush).call(this.brush.move,i)}updateBrushSelection(i,e,n){let o=this.svgEl.getBoundingClientRect(),[r,s]=gw(this.brushGroup),[a,l]=n(r,s,i,e,o);this.moveBrush([a,l])}zoom(i,e){this.updateBrushSelection(i,e,this.calculateBrushSelectionAfterZoom.bind(this))}pan(i,e){this.updateBrushSelection(i,e,this.calculateBrushSelectionAfterPan.bind(this))}getInvertedBrushSelection(i){let[e,n]=gw(this.brushGroup);return[i.invert(e),i.invert(n)]}startZoom(i){if(this.isZooming)return;let e=1.01;this.zoom(i,e),this.isZooming=!0,this.zoomInterval=this.createInterval(e,i,this.zoom.bind(this))}startPan(i){if(this.isPanning)return;let e=1.01;this.pan(i,e),this.isPanning=!0,this.panInterval=this.createInterval(e,i,this.pan.bind(this))}stopZoom(){this.isZooming=!1,clearInterval(this.zoomInterval)}stopPan(){this.isPanning=!1,clearInterval(this.panInterval)}reset(){this.zoomScale=1,this.translateX=0,this.brushGroupSelection.remove()}};var Dn=(t=>(t.COMPLETE="X",t.METADATA="M",t.COUNTER="C",t))(Dn||{});var rF=Object.defineProperty,sF=(t,i,e)=>i in t?rF(t,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[i]=e,Wr=(t,i,e)=>sF(t,typeof i!="symbol"?i+"":i,e);function wp(t,i){return t==null||i==null?NaN:t<i?-1:t>i?1:t>=i?0:NaN}function aF(t,i){return t==null||i==null?NaN:i<t?-1:i>t?1:i>=t?0:NaN}function Kw(t){let i,e,n;t.length!==2?(i=wp,e=(a,l)=>wp(t(a),l),n=(a,l)=>t(a)-l):(i=t===wp||t===aF?t:lF,e=t,n=t);function o(a,l,c=0,d=a.length){if(c<d){if(i(l,l)!==0)return d;do{let p=c+d>>>1;e(a[p],l)<0?c=p+1:d=p}while(c<d)}return c}function r(a,l,c=0,d=a.length){if(c<d){if(i(l,l)!==0)return d;do{let p=c+d>>>1;e(a[p],l)<=0?c=p+1:d=p}while(c<d)}return c}function s(a,l,c=0,d=a.length){let p=o(a,l,c,d-1);return p>c&&n(a[p-1],l)>-n(a[p],l)?p-1:p}return{left:o,center:s,right:r}}function lF(){return 0}function cF(t){return t===null?NaN:+t}var dF=Kw(wp),pF=dF.right;Kw(cF).center;var hF=Math.sqrt(50),uF=Math.sqrt(10),mF=Math.sqrt(2);function Sp(t,i,e){let n=(i-t)/Math.max(0,e),o=Math.floor(Math.log10(n)),r=n/Math.pow(10,o),s=r>=hF?10:r>=uF?5:r>=mF?2:1,a,l,c;return o<0?(c=Math.pow(10,-o)/s,a=Math.round(t*c),l=Math.round(i*c),a/c<t&&++a,l/c>i&&--l,c=-c):(c=Math.pow(10,o)*s,a=Math.round(t/c),l=Math.round(i/c),a*c<t&&++a,l*c>i&&--l),l<a&&.5<=e&&e<2?Sp(t,i,e*2):[a,l,c]}function fF(t,i,e){if(i=+i,t=+t,e=+e,!(e>0))return[];if(t===i)return[t];let n=i<t,[o,r,s]=n?Sp(i,t,e):Sp(t,i,e);if(!(r>=o))return[];let a=r-o+1,l=new Array(a);if(n)if(s<0)for(let c=0;c<a;++c)l[c]=(r-c)/-s;else for(let c=0;c<a;++c)l[c]=(r-c)*s;else if(s<0)for(let c=0;c<a;++c)l[c]=(o+c)/-s;else for(let c=0;c<a;++c)l[c]=(o+c)*s;return l}function hf(t,i,e){return i=+i,t=+t,e=+e,Sp(t,i,e)[2]}function gF(t,i,e){i=+i,t=+t,e=+e;let n=i<t,o=n?hf(i,t,e):hf(t,i,e);return(n?-1:1)*(o<0?1/-o:o)}function _F(t){return t}var vF=3,zw=1e-6;function bF(t){return"translate("+t+",0)"}function yF(t){return i=>+t(i)}function CF(t,i){return i=Math.max(0,t.bandwidth()-i*2)/2,t.round()&&(i=Math.round(i)),e=>+t(e)+i}function wF(){return!this.__axis}function SF(t,i){var e=[],n=null,o=null,r=6,s=6,a=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,c=1,d="y",p=bF;function h(m){var S=n??(i.ticks?i.ticks.apply(i,e):i.domain()),y=o??(i.tickFormat?i.tickFormat.apply(i,e):_F),w=Math.max(r,0)+a,x=i.range(),N=+x[0]+l,k=+x[x.length-1]+l,C=(i.bandwidth?CF:yF)(i.copy(),l),Q=m.selection?m.selection():m,$=Q.selectAll(".domain").data([null]),ie=Q.selectAll(".tick").data(S,i).order(),re=ie.exit(),we=ie.enter().append("g").attr("class","tick"),ge=ie.select("line"),te=ie.select("text");$=$.merge($.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),ie=ie.merge(we),ge=ge.merge(we.append("line").attr("stroke","currentColor").attr(d+"2",c*r)),te=te.merge(we.append("text").attr("fill","currentColor").attr(d,c*w).attr("dy","0.71em")),m!==Q&&($=$.transition(m),ie=ie.transition(m),ge=ge.transition(m),te=te.transition(m),re=re.transition(m).attr("opacity",zw).attr("transform",function(_e){return isFinite(_e=C(_e))?p(_e+l):this.getAttribute("transform")}),we.attr("opacity",zw).attr("transform",function(_e){var pe=this.parentNode.__axis;return p((pe&&isFinite(pe=pe(_e))?pe:C(_e))+l)})),re.remove(),$.attr("d",s?"M"+N+","+c*s+"V"+l+"H"+k+"V"+c*s:"M"+N+","+l+"H"+k),ie.attr("opacity",1).attr("transform",function(_e){return p(C(_e)+l)}),ge.attr(d+"2",c*r),te.attr(d,c*w).text(y),Q.filter(wF).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor","middle"),Q.each(function(){this.__axis=C})}return h.scale=function(m){return arguments.length?(i=m,h):i},h.ticks=function(){return e=Array.from(arguments),h},h.tickArguments=function(m){return arguments.length?(e=m==null?[]:Array.from(m),h):e.slice()},h.tickValues=function(m){return arguments.length?(n=m==null?null:Array.from(m),h):n&&n.slice()},h.tickFormat=function(m){return arguments.length?(o=m,h):o},h.tickSize=function(m){return arguments.length?(r=s=+m,h):r},h.tickSizeInner=function(m){return arguments.length?(r=+m,h):r},h.tickSizeOuter=function(m){return arguments.length?(s=+m,h):s},h.tickPadding=function(m){return arguments.length?(a=+m,h):a},h.offset=function(m){return arguments.length?(l=+m,h):l},h}function EF(t){return SF(vF,t)}function TF(t,i){return t=+t,i=+i,function(e){return Math.round(t*(1-e)+i*e)}}function xF(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Ep(t,i){if((e=(t=i?t.toExponential(i-1):t.toExponential()).indexOf("e"))<0)return null;var e,n=t.slice(0,e);return[n.length>1?n[0]+n.slice(2):n,+t.slice(e+1)]}function Js(t){return t=Ep(Math.abs(t)),t?t[1]:NaN}function PF(t,i){return function(e,n){for(var o=e.length,r=[],s=0,a=t[0],l=0;o>0&&a>0&&(l+a+1>n&&(a=Math.max(1,n-l)),r.push(e.substring(o-=a,o+a)),!((l+=a+1)>n));)a=t[s=(s+1)%t.length];return r.reverse().join(i)}}function OF(t){return function(i){return i.replace(/[0-9]/g,function(e){return t[+e]})}}var IF=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Tp(t){if(!(i=IF.exec(t)))throw new Error("invalid format: "+t);var i;return new mf({fill:i[1],align:i[2],sign:i[3],symbol:i[4],zero:i[5],width:i[6],comma:i[7],precision:i[8]&&i[8].slice(1),trim:i[9],type:i[10]})}Tp.prototype=mf.prototype;function mf(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}mf.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function DF(t){e:for(var i=t.length,e=1,n=-1,o;e<i;++e)switch(t[e]){case".":n=o=e;break;case"0":n===0&&(n=e),o=e;break;default:if(!+t[e])break e;n>0&&(n=0);break}return n>0?t.slice(0,n)+t.slice(o+1):t}var Zw;function MF(t,i){var e=Ep(t,i);if(!e)return t+"";var n=e[0],o=e[1],r=o-(Zw=Math.max(-8,Math.min(8,Math.floor(o/3)))*3)+1,s=n.length;return r===s?n:r>s?n+new Array(r-s+1).join("0"):r>0?n.slice(0,r)+"."+n.slice(r):"0."+new Array(1-r).join("0")+Ep(t,Math.max(0,i+r-1))[0]}function Gw(t,i){var e=Ep(t,i);if(!e)return t+"";var n=e[0],o=e[1];return o<0?"0."+new Array(-o).join("0")+n:n.length>o+1?n.slice(0,o+1)+"."+n.slice(o+1):n+new Array(o-n.length+2).join("0")}var $w={"%":(t,i)=>(t*100).toFixed(i),b:t=>Math.round(t).toString(2),c:t=>t+"",d:xF,e:(t,i)=>t.toExponential(i),f:(t,i)=>t.toFixed(i),g:(t,i)=>t.toPrecision(i),o:t=>Math.round(t).toString(8),p:(t,i)=>Gw(t*100,i),r:Gw,s:MF,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Uw(t){return t}var Ww=Array.prototype.map,Qw=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function RF(t){var i=t.grouping===void 0||t.thousands===void 0?Uw:PF(Ww.call(t.grouping,Number),t.thousands+""),e=t.currency===void 0?"":t.currency[0]+"",n=t.currency===void 0?"":t.currency[1]+"",o=t.decimal===void 0?".":t.decimal+"",r=t.numerals===void 0?Uw:OF(Ww.call(t.numerals,String)),s=t.percent===void 0?"%":t.percent+"",a=t.minus===void 0?"\u2212":t.minus+"",l=t.nan===void 0?"NaN":t.nan+"";function c(p){p=Tp(p);var h=p.fill,m=p.align,S=p.sign,y=p.symbol,w=p.zero,x=p.width,N=p.comma,k=p.precision,C=p.trim,Q=p.type;Q==="n"?(N=!0,Q="g"):$w[Q]||(k===void 0&&(k=12),C=!0,Q="g"),(w||h==="0"&&m==="=")&&(w=!0,h="0",m="=");var $=y==="$"?e:y==="#"&&/[boxX]/.test(Q)?"0"+Q.toLowerCase():"",ie=y==="$"?n:/[%p]/.test(Q)?s:"",re=$w[Q],we=/[defgprs%]/.test(Q);k=k===void 0?6:/[gprs]/.test(Q)?Math.max(1,Math.min(21,k)):Math.max(0,Math.min(20,k));function ge(te){var _e=$,pe=ie,U,W,P;if(Q==="c")pe=re(te)+pe,te="";else{te=+te;var O=te<0||1/te<0;if(te=isNaN(te)?l:re(Math.abs(te),k),C&&(te=DF(te)),O&&+te==0&&S!=="+"&&(O=!1),_e=(O?S==="("?S:a:S==="-"||S==="("?"":S)+_e,pe=(Q==="s"?Qw[8+Zw/3]:"")+pe+(O&&S==="("?")":""),we){for(U=-1,W=te.length;++U<W;)if(P=te.charCodeAt(U),48>P||P>57){pe=(P===46?o+te.slice(U+1):te.slice(U))+pe,te=te.slice(0,U);break}}}N&&!w&&(te=i(te,1/0));var V=_e.length+te.length+pe.length,H=V<x?new Array(x-V+1).join(h):"";switch(N&&w&&(te=i(H+te,H.length?x-pe.length:1/0),H=""),m){case"<":te=_e+te+pe+H;break;case"=":te=_e+H+te+pe;break;case"^":te=H.slice(0,V=H.length>>1)+_e+te+pe+H.slice(V);break;default:te=H+_e+te+pe;break}return r(te)}return ge.toString=function(){return p+""},ge}function d(p,h){var m=c((p=Tp(p),p.type="f",p)),S=Math.max(-8,Math.min(8,Math.floor(Js(h)/3)))*3,y=Math.pow(10,-S),w=Qw[8+S/3];return function(x){return m(y*x)+w}}return{format:c,formatPrefix:d}}var Cp,Jw,eS;AF({thousands:",",grouping:[3],currency:["$",""]});function AF(t){return Cp=RF(t),Jw=Cp.format,eS=Cp.formatPrefix,Cp}function kF(t){return Math.max(0,-Js(Math.abs(t)))}function NF(t,i){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Js(i)/3)))*3-Js(Math.abs(t)))}function LF(t,i){return t=Math.abs(t),i=Math.abs(i)-t,Math.max(0,Js(i)-Js(t))+1}function FF(t,i){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(i).domain(t);break}return this}function VF(t){return function(){return t}}function BF(t){return+t}var Yw=[0,1];function Zs(t){return t}function uf(t,i){return(i-=t=+t)?function(e){return(e-t)/i}:VF(isNaN(i)?NaN:.5)}function HF(t,i){var e;return t>i&&(e=t,t=i,i=e),function(n){return Math.max(t,Math.min(i,n))}}function jF(t,i,e){var n=t[0],o=t[1],r=i[0],s=i[1];return o<n?(n=uf(o,n),r=e(s,r)):(n=uf(n,o),r=e(r,s)),function(a){return r(n(a))}}function qF(t,i,e){var n=Math.min(t.length,i.length)-1,o=new Array(n),r=new Array(n),s=-1;for(t[n]<t[0]&&(t=t.slice().reverse(),i=i.slice().reverse());++s<n;)o[s]=uf(t[s],t[s+1]),r[s]=e(i[s],i[s+1]);return function(a){var l=pF(t,a,1,n)-1;return r[l](o[l](a))}}function zF(t,i){return i.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function GF(){var t=Yw,i=Yw,e=bl,n,o,r,s=Zs,a,l,c;function d(){var h=Math.min(t.length,i.length);return s!==Zs&&(s=HF(t[0],t[h-1])),a=h>2?qF:jF,l=c=null,p}function p(h){return h==null||isNaN(h=+h)?r:(l||(l=a(t.map(n),i,e)))(n(s(h)))}return p.invert=function(h){return s(o((c||(c=a(i,t.map(n),pn)))(h)))},p.domain=function(h){return arguments.length?(t=Array.from(h,BF),d()):t.slice()},p.range=function(h){return arguments.length?(i=Array.from(h),d()):i.slice()},p.rangeRound=function(h){return i=Array.from(h),e=TF,d()},p.clamp=function(h){return arguments.length?(s=h?!0:Zs,d()):s!==Zs},p.interpolate=function(h){return arguments.length?(e=h,d()):e},p.unknown=function(h){return arguments.length?(r=h,p):r},function(h,m){return n=h,o=m,d()}}function $F(){return GF()(Zs,Zs)}function UF(t,i,e,n){var o=gF(t,i,e),r;switch(n=Tp(n??",f"),n.type){case"s":{var s=Math.max(Math.abs(t),Math.abs(i));return n.precision==null&&!isNaN(r=NF(o,s))&&(n.precision=r),eS(n,s)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(r=LF(o,Math.max(Math.abs(t),Math.abs(i))))&&(n.precision=r-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(r=kF(o))&&(n.precision=r-(n.type==="%")*2);break}}return Jw(n)}function WF(t){var i=t.domain;return t.ticks=function(e){var n=i();return fF(n[0],n[n.length-1],e??10)},t.tickFormat=function(e,n){var o=i();return UF(o[0],o[o.length-1],e??10,n)},t.nice=function(e){e==null&&(e=10);var n=i(),o=0,r=n.length-1,s=n[o],a=n[r],l,c,d=10;for(a<s&&(c=s,s=a,a=c,c=o,o=r,r=c);d-- >0;){if(c=hf(s,a,e),c===l)return n[o]=s,n[r]=a,i(n);if(c>0)s=Math.floor(s/c)*c,a=Math.ceil(a/c)*c;else if(c<0)s=Math.ceil(s*c)/c,a=Math.floor(a*c)/c;else break;l=c}return t},t}function yl(){var t=$F();return t.copy=function(){return zF(t,yl())},FF.apply(t,arguments),WF(t)}var Xw={top:0,right:5,bottom:0,left:5},xp=class{constructor(i){Wr(this,"svgEl"),Wr(this,"xAxisGroup"),Wr(this,"xAxis"),Wr(this,"xScale"),Wr(this,"onBrushChange"),Wr(this,"brush"),Wr(this,"range"),this.onBrushChange=i.onBrushChange}initializeAxis(i){this.xAxis=EF(this.xScale).tickSizeOuter(0),this.xAxisGroup=Pn(i).append("g").call(this.xAxis),this.xAxisGroup.selectAll(".tick text").attr("transform","translate(25, 0)")}initializeBrush(i){this.brush=new gl({svgEl:i,onBrushChange:this.onBrushChange,xAxisGroup:this.xAxisGroup,xScale:this.xScale,getTimelineEdges:this.getTimelineEdges})}getTimelineEdges(i){return{leftEdge:Xw.left,rightEdge:i.width-Xw.right}}render(i){this.svgEl=i;let e=i.getBoundingClientRect(),{leftEdge:n,rightEdge:o}=this.getTimelineEdges(e);this.xScale=yl().domain(this.range).range([n,o]),this.initializeAxis(i),this.initializeBrush(i)}onResize(){if(!this.svgEl)return;let i=this.svgEl.getBoundingClientRect(),{leftEdge:e,rightEdge:n}=this.getTimelineEdges(i),o=this.brush.getInvertedBrushSelection(this.xScale);if(this.xScale.range([e,n]),this.xAxisGroup.call(this.xAxis),o){let[r,s]=o;this.brush.setBrushExtent(i),this.brush.moveBrush([this.xScale(r),this.xScale(s)])}}reset(){this.svgEl=void 0,this.xAxisGroup.remove(),this.brush.reset()}};var QF=Object.defineProperty,YF=(t,i,e)=>i in t?QF(t,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[i]=e,ff=(t,i,e)=>YF(t,typeof i!="symbol"?i+"":i,e),Pp=class{constructor(){ff(this,"mode"),ff(this,"visibleCharts",new Set),ff(this,"timeline",new xp({onBrushChange:(i,e)=>{this.visibleCharts.forEach(n=>n.updateZoomAndPosition(i,e))}}))}onChartInit(i){this.visibleCharts.add(i)}onChartDestroy(i){this.visibleCharts.delete(i)}onResize(){this.timeline.onResize(),this.visibleCharts.forEach(i=>i.onResize())}updateTheme(i){this.mode=i,this.visibleCharts.forEach(e=>e.render())}},At=new Pp;var XF=Object.defineProperty,KF=(t,i,e)=>i in t?XF(t,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[i]=e,$t=(t,i,e)=>KF(t,typeof i!="symbol"?i+"":i,e),ki="top",un="bottom",mn="right",Ni="left",Tf="auto",Pl=[ki,un,mn,Ni],ta="start",Tl="end",ZF="clippingParents",bS="viewport",Cl="popper",JF="reference",tS=Pl.reduce(function(t,i){return t.concat([i+"-"+ta,i+"-"+Tl])},[]),yS=[].concat(Pl,[Tf]).reduce(function(t,i){return t.concat([i,i+"-"+ta,i+"-"+Tl])},[]),eV="beforeRead",tV="read",iV="afterRead",nV="beforeMain",oV="main",rV="afterMain",sV="beforeWrite",aV="write",lV="afterWrite",cV=[eV,tV,iV,nV,oV,rV,sV,aV,lV];function fo(t){return t?(t.nodeName||"").toLowerCase():null}function Ki(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var i=t.ownerDocument;return i&&i.defaultView||window}return t}function Xr(t){var i=Ki(t).Element;return t instanceof i||t instanceof Element}function hn(t){var i=Ki(t).HTMLElement;return t instanceof i||t instanceof HTMLElement}function xf(t){if(typeof ShadowRoot>"u")return!1;var i=Ki(t).ShadowRoot;return t instanceof i||t instanceof ShadowRoot}function dV(t){var i=t.state;Object.keys(i.elements).forEach(function(e){var n=i.styles[e]||{},o=i.attributes[e]||{},r=i.elements[e];!hn(r)||!fo(r)||(Object.assign(r.style,n),Object.keys(o).forEach(function(s){var a=o[s];a===!1?r.removeAttribute(s):r.setAttribute(s,a===!0?"":a)}))})}function pV(t){var i=t.state,e={popper:{position:i.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(i.elements.popper.style,e.popper),i.styles=e,i.elements.arrow&&Object.assign(i.elements.arrow.style,e.arrow),function(){Object.keys(i.elements).forEach(function(n){var o=i.elements[n],r=i.attributes[n]||{},s=Object.keys(i.styles.hasOwnProperty(n)?i.styles[n]:e[n]),a=s.reduce(function(l,c){return l[c]="",l},{});!hn(o)||!fo(o)||(Object.assign(o.style,a),Object.keys(r).forEach(function(l){o.removeAttribute(l)}))})}}var CS={name:"applyStyles",enabled:!0,phase:"write",fn:dV,effect:pV,requires:["computeStyles"]};function mo(t){return t.split("-")[0]}var Yr=Math.max,Rp=Math.min,ia=Math.round;function yf(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(i){return i.brand+"/"+i.version}).join(" "):navigator.userAgent}function wS(){return!/^((?!chrome|android).)*safari/i.test(yf())}function na(t,i,e){i===void 0&&(i=!1),e===void 0&&(e=!1);var n=t.getBoundingClientRect(),o=1,r=1;i&&hn(t)&&(o=t.offsetWidth>0&&ia(n.width)/t.offsetWidth||1,r=t.offsetHeight>0&&ia(n.height)/t.offsetHeight||1);var s=Xr(t)?Ki(t):window,a=s.visualViewport,l=!wS()&&e,c=(n.left+(l&&a?a.offsetLeft:0))/o,d=(n.top+(l&&a?a.offsetTop:0))/r,p=n.width/o,h=n.height/r;return{width:p,height:h,top:d,right:c+p,bottom:d+h,left:c,x:c,y:d}}function Pf(t){var i=na(t),e=t.offsetWidth,n=t.offsetHeight;return Math.abs(i.width-e)<=1&&(e=i.width),Math.abs(i.height-n)<=1&&(n=i.height),{x:t.offsetLeft,y:t.offsetTop,width:e,height:n}}function SS(t,i){var e=i.getRootNode&&i.getRootNode();if(t.contains(i))return!0;if(e&&xf(e)){var n=i;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function No(t){return Ki(t).getComputedStyle(t)}function hV(t){return["table","td","th"].indexOf(fo(t))>=0}function dr(t){return((Xr(t)?t.ownerDocument:t.document)||window.document).documentElement}function kp(t){return fo(t)==="html"?t:t.assignedSlot||t.parentNode||(xf(t)?t.host:null)||dr(t)}function iS(t){return!hn(t)||No(t).position==="fixed"?null:t.offsetParent}function uV(t){var i=/firefox/i.test(yf()),e=/Trident/i.test(yf());if(e&&hn(t)){var n=No(t);if(n.position==="fixed")return null}var o=kp(t);for(xf(o)&&(o=o.host);hn(o)&&["html","body"].indexOf(fo(o))<0;){var r=No(o);if(r.transform!=="none"||r.perspective!=="none"||r.contain==="paint"||["transform","perspective"].indexOf(r.willChange)!==-1||i&&r.willChange==="filter"||i&&r.filter&&r.filter!=="none")return o;o=o.parentNode}return null}function Ol(t){for(var i=Ki(t),e=iS(t);e&&hV(e)&&No(e).position==="static";)e=iS(e);return e&&(fo(e)==="html"||fo(e)==="body"&&No(e).position==="static")?i:e||uV(t)||i}function Of(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function wl(t,i,e){return Yr(t,Rp(i,e))}function mV(t,i,e){var n=wl(t,i,e);return n>e?e:n}function ES(){return{top:0,right:0,bottom:0,left:0}}function TS(t){return Object.assign({},ES(),t)}function xS(t,i){return i.reduce(function(e,n){return e[n]=t,e},{})}var fV=function(t,i){return t=typeof t=="function"?t(Object.assign({},i.rects,{placement:i.placement})):t,TS(typeof t!="number"?t:xS(t,Pl))};function gV(t){var i,e=t.state,n=t.name,o=t.options,r=e.elements.arrow,s=e.modifiersData.popperOffsets,a=mo(e.placement),l=Of(a),c=[Ni,mn].indexOf(a)>=0,d=c?"height":"width";if(!(!r||!s)){var p=fV(o.padding,e),h=Pf(r),m=l==="y"?ki:Ni,S=l==="y"?un:mn,y=e.rects.reference[d]+e.rects.reference[l]-s[l]-e.rects.popper[d],w=s[l]-e.rects.reference[l],x=Ol(r),N=x?l==="y"?x.clientHeight||0:x.clientWidth||0:0,k=y/2-w/2,C=p[m],Q=N-h[d]-p[S],$=N/2-h[d]/2+k,ie=wl(C,$,Q),re=l;e.modifiersData[n]=(i={},i[re]=ie,i.centerOffset=ie-$,i)}}function _V(t){var i=t.state,e=t.options,n=e.element,o=n===void 0?"[data-popper-arrow]":n;o!=null&&(typeof o=="string"&&(o=i.elements.popper.querySelector(o),!o)||SS(i.elements.popper,o)&&(i.elements.arrow=o))}var vV={name:"arrow",enabled:!0,phase:"main",fn:gV,effect:_V,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function oa(t){return t.split("-")[1]}var bV={top:"auto",right:"auto",bottom:"auto",left:"auto"};function yV(t,i){var e=t.x,n=t.y,o=i.devicePixelRatio||1;return{x:ia(e*o)/o||0,y:ia(n*o)/o||0}}function nS(t){var i,e=t.popper,n=t.popperRect,o=t.placement,r=t.variation,s=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,d=t.roundOffsets,p=t.isFixed,h=s.x,m=h===void 0?0:h,S=s.y,y=S===void 0?0:S,w=typeof d=="function"?d({x:m,y}):{x:m,y};m=w.x,y=w.y;var x=s.hasOwnProperty("x"),N=s.hasOwnProperty("y"),k=Ni,C=ki,Q=window;if(c){var $=Ol(e),ie="clientHeight",re="clientWidth";if($===Ki(e)&&($=dr(e),No($).position!=="static"&&a==="absolute"&&(ie="scrollHeight",re="scrollWidth")),$=$,o===ki||(o===Ni||o===mn)&&r===Tl){C=un;var we=p&&$===Q&&Q.visualViewport?Q.visualViewport.height:$[ie];y-=we-n.height,y*=l?1:-1}if(o===Ni||(o===ki||o===un)&&r===Tl){k=mn;var ge=p&&$===Q&&Q.visualViewport?Q.visualViewport.width:$[re];m-=ge-n.width,m*=l?1:-1}}var te=Object.assign({position:a},c&&bV),_e=d===!0?yV({x:m,y},Ki(e)):{x:m,y};if(m=_e.x,y=_e.y,l){var pe;return Object.assign({},te,(pe={},pe[C]=N?"0":"",pe[k]=x?"0":"",pe.transform=(Q.devicePixelRatio||1)<=1?"translate("+m+"px, "+y+"px)":"translate3d("+m+"px, "+y+"px, 0)",pe))}return Object.assign({},te,(i={},i[C]=N?y+"px":"",i[k]=x?m+"px":"",i.transform="",i))}function CV(t){var i=t.state,e=t.options,n=e.gpuAcceleration,o=n===void 0?!0:n,r=e.adaptive,s=r===void 0?!0:r,a=e.roundOffsets,l=a===void 0?!0:a,c={placement:mo(i.placement),variation:oa(i.placement),popper:i.elements.popper,popperRect:i.rects.popper,gpuAcceleration:o,isFixed:i.options.strategy==="fixed"};i.modifiersData.popperOffsets!=null&&(i.styles.popper=Object.assign({},i.styles.popper,nS(Object.assign({},c,{offsets:i.modifiersData.popperOffsets,position:i.options.strategy,adaptive:s,roundOffsets:l})))),i.modifiersData.arrow!=null&&(i.styles.arrow=Object.assign({},i.styles.arrow,nS(Object.assign({},c,{offsets:i.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),i.attributes.popper=Object.assign({},i.attributes.popper,{"data-popper-placement":i.placement})}var wV={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:CV,data:{}},Op={passive:!0};function SV(t){var i=t.state,e=t.instance,n=t.options,o=n.scroll,r=o===void 0?!0:o,s=n.resize,a=s===void 0?!0:s,l=Ki(i.elements.popper),c=[].concat(i.scrollParents.reference,i.scrollParents.popper);return r&&c.forEach(function(d){d.addEventListener("scroll",e.update,Op)}),a&&l.addEventListener("resize",e.update,Op),function(){r&&c.forEach(function(d){d.removeEventListener("scroll",e.update,Op)}),a&&l.removeEventListener("resize",e.update,Op)}}var EV={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:SV,data:{}},TV={left:"right",right:"left",bottom:"top",top:"bottom"};function Mp(t){return t.replace(/left|right|bottom|top/g,function(i){return TV[i]})}var xV={start:"end",end:"start"};function oS(t){return t.replace(/start|end/g,function(i){return xV[i]})}function If(t){var i=Ki(t),e=i.pageXOffset,n=i.pageYOffset;return{scrollLeft:e,scrollTop:n}}function Df(t){return na(dr(t)).left+If(t).scrollLeft}function PV(t,i){var e=Ki(t),n=dr(t),o=e.visualViewport,r=n.clientWidth,s=n.clientHeight,a=0,l=0;if(o){r=o.width,s=o.height;var c=wS();(c||!c&&i==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:r,height:s,x:a+Df(t),y:l}}function OV(t){var i,e=dr(t),n=If(t),o=(i=t.ownerDocument)==null?void 0:i.body,r=Yr(e.scrollWidth,e.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=Yr(e.scrollHeight,e.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),a=-n.scrollLeft+Df(t),l=-n.scrollTop;return No(o||e).direction==="rtl"&&(a+=Yr(e.clientWidth,o?o.clientWidth:0)-r),{width:r,height:s,x:a,y:l}}function Mf(t){var i=No(t),e=i.overflow,n=i.overflowX,o=i.overflowY;return/auto|scroll|overlay|hidden/.test(e+o+n)}function PS(t){return["html","body","#document"].indexOf(fo(t))>=0?t.ownerDocument.body:hn(t)&&Mf(t)?t:PS(kp(t))}function Sl(t,i){var e;i===void 0&&(i=[]);var n=PS(t),o=n===((e=t.ownerDocument)==null?void 0:e.body),r=Ki(n),s=o?[r].concat(r.visualViewport||[],Mf(n)?n:[]):n,a=i.concat(s);return o?a:a.concat(Sl(kp(s)))}function Cf(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function IV(t,i){var e=na(t,!1,i==="fixed");return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}function rS(t,i,e){return i===bS?Cf(PV(t,e)):Xr(i)?IV(i,e):Cf(OV(dr(t)))}function DV(t){var i=Sl(kp(t)),e=["absolute","fixed"].indexOf(No(t).position)>=0,n=e&&hn(t)?Ol(t):t;return Xr(n)?i.filter(function(o){return Xr(o)&&SS(o,n)&&fo(o)!=="body"}):[]}function MV(t,i,e,n){var o=i==="clippingParents"?DV(t):[].concat(i),r=[].concat(o,[e]),s=r[0],a=r.reduce(function(l,c){var d=rS(t,c,n);return l.top=Yr(d.top,l.top),l.right=Rp(d.right,l.right),l.bottom=Rp(d.bottom,l.bottom),l.left=Yr(d.left,l.left),l},rS(t,s,n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function OS(t){var i=t.reference,e=t.element,n=t.placement,o=n?mo(n):null,r=n?oa(n):null,s=i.x+i.width/2-e.width/2,a=i.y+i.height/2-e.height/2,l;switch(o){case ki:l={x:s,y:i.y-e.height};break;case un:l={x:s,y:i.y+i.height};break;case mn:l={x:i.x+i.width,y:a};break;case Ni:l={x:i.x-e.width,y:a};break;default:l={x:i.x,y:i.y}}var c=o?Of(o):null;if(c!=null){var d=c==="y"?"height":"width";switch(r){case ta:l[c]=l[c]-(i[d]/2-e[d]/2);break;case Tl:l[c]=l[c]+(i[d]/2-e[d]/2);break}}return l}function xl(t,i){i===void 0&&(i={});var e=i,n=e.placement,o=n===void 0?t.placement:n,r=e.strategy,s=r===void 0?t.strategy:r,a=e.boundary,l=a===void 0?ZF:a,c=e.rootBoundary,d=c===void 0?bS:c,p=e.elementContext,h=p===void 0?Cl:p,m=e.altBoundary,S=m===void 0?!1:m,y=e.padding,w=y===void 0?0:y,x=TS(typeof w!="number"?w:xS(w,Pl)),N=h===Cl?JF:Cl,k=t.rects.popper,C=t.elements[S?N:h],Q=MV(Xr(C)?C:C.contextElement||dr(t.elements.popper),l,d,s),$=na(t.elements.reference),ie=OS({reference:$,element:k,strategy:"absolute",placement:o}),re=Cf(Object.assign({},k,ie)),we=h===Cl?re:$,ge={top:Q.top-we.top+x.top,bottom:we.bottom-Q.bottom+x.bottom,left:Q.left-we.left+x.left,right:we.right-Q.right+x.right},te=t.modifiersData.offset;if(h===Cl&&te){var _e=te[o];Object.keys(ge).forEach(function(pe){var U=[mn,un].indexOf(pe)>=0?1:-1,W=[ki,un].indexOf(pe)>=0?"y":"x";ge[pe]+=_e[W]*U})}return ge}function RV(t,i){i===void 0&&(i={});var e=i,n=e.placement,o=e.boundary,r=e.rootBoundary,s=e.padding,a=e.flipVariations,l=e.allowedAutoPlacements,c=l===void 0?yS:l,d=oa(n),p=d?a?tS:tS.filter(function(S){return oa(S)===d}):Pl,h=p.filter(function(S){return c.indexOf(S)>=0});h.length===0&&(h=p);var m=h.reduce(function(S,y){return S[y]=xl(t,{placement:y,boundary:o,rootBoundary:r,padding:s})[mo(y)],S},{});return Object.keys(m).sort(function(S,y){return m[S]-m[y]})}function AV(t){if(mo(t)===Tf)return[];var i=Mp(t);return[oS(t),i,oS(i)]}function kV(t){var i=t.state,e=t.options,n=t.name;if(!i.modifiersData[n]._skip){for(var o=e.mainAxis,r=o===void 0?!0:o,s=e.altAxis,a=s===void 0?!0:s,l=e.fallbackPlacements,c=e.padding,d=e.boundary,p=e.rootBoundary,h=e.altBoundary,m=e.flipVariations,S=m===void 0?!0:m,y=e.allowedAutoPlacements,w=i.options.placement,x=mo(w),N=x===w,k=l||(N||!S?[Mp(w)]:AV(w)),C=[w].concat(k).reduce(function(he,lt){return he.concat(mo(lt)===Tf?RV(i,{placement:lt,boundary:d,rootBoundary:p,padding:c,flipVariations:S,allowedAutoPlacements:y}):lt)},[]),Q=i.rects.reference,$=i.rects.popper,ie=new Map,re=!0,we=C[0],ge=0;ge<C.length;ge++){var te=C[ge],_e=mo(te),pe=oa(te)===ta,U=[ki,un].indexOf(_e)>=0,W=U?"width":"height",P=xl(i,{placement:te,boundary:d,rootBoundary:p,altBoundary:h,padding:c}),O=U?pe?mn:Ni:pe?un:ki;Q[W]>$[W]&&(O=Mp(O));var V=Mp(O),H=[];if(r&&H.push(P[_e]<=0),a&&H.push(P[O]<=0,P[V]<=0),H.every(function(he){return he})){we=te,re=!1;break}ie.set(te,H)}if(re)for(var K=S?3:1,ce=function(he){var lt=C.find(function(kt){var Be=ie.get(kt);if(Be)return Be.slice(0,he).every(function(Pt){return Pt})});if(lt)return we=lt,"break"},oe=K;oe>0;oe--){var Re=ce(oe);if(Re==="break")break}i.placement!==we&&(i.modifiersData[n]._skip=!0,i.placement=we,i.reset=!0)}}var NV={name:"flip",enabled:!0,phase:"main",fn:kV,requiresIfExists:["offset"],data:{_skip:!1}};function sS(t,i,e){return e===void 0&&(e={x:0,y:0}),{top:t.top-i.height-e.y,right:t.right-i.width+e.x,bottom:t.bottom-i.height+e.y,left:t.left-i.width-e.x}}function aS(t){return[ki,mn,un,Ni].some(function(i){return t[i]>=0})}function LV(t){var i=t.state,e=t.name,n=i.rects.reference,o=i.rects.popper,r=i.modifiersData.preventOverflow,s=xl(i,{elementContext:"reference"}),a=xl(i,{altBoundary:!0}),l=sS(s,n),c=sS(a,o,r),d=aS(l),p=aS(c);i.modifiersData[e]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:p},i.attributes.popper=Object.assign({},i.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":p})}var FV={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:LV};function VV(t,i,e){var n=mo(t),o=[Ni,ki].indexOf(n)>=0?-1:1,r=typeof e=="function"?e(Object.assign({},i,{placement:t})):e,s=r[0],a=r[1];return s=s||0,a=(a||0)*o,[Ni,mn].indexOf(n)>=0?{x:a,y:s}:{x:s,y:a}}function BV(t){var i=t.state,e=t.options,n=t.name,o=e.offset,r=o===void 0?[0,0]:o,s=yS.reduce(function(d,p){return d[p]=VV(p,i.rects,r),d},{}),a=s[i.placement],l=a.x,c=a.y;i.modifiersData.popperOffsets!=null&&(i.modifiersData.popperOffsets.x+=l,i.modifiersData.popperOffsets.y+=c),i.modifiersData[n]=s}var HV={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:BV};function jV(t){var i=t.state,e=t.name;i.modifiersData[e]=OS({reference:i.rects.reference,element:i.rects.popper,strategy:"absolute",placement:i.placement})}var qV={name:"popperOffsets",enabled:!0,phase:"read",fn:jV,data:{}};function zV(t){return t==="x"?"y":"x"}function GV(t){var i=t.state,e=t.options,n=t.name,o=e.mainAxis,r=o===void 0?!0:o,s=e.altAxis,a=s===void 0?!1:s,l=e.boundary,c=e.rootBoundary,d=e.altBoundary,p=e.padding,h=e.tether,m=h===void 0?!0:h,S=e.tetherOffset,y=S===void 0?0:S,w=xl(i,{boundary:l,rootBoundary:c,padding:p,altBoundary:d}),x=mo(i.placement),N=oa(i.placement),k=!N,C=Of(x),Q=zV(C),$=i.modifiersData.popperOffsets,ie=i.rects.reference,re=i.rects.popper,we=typeof y=="function"?y(Object.assign({},i.rects,{placement:i.placement})):y,ge=typeof we=="number"?{mainAxis:we,altAxis:we}:Object.assign({mainAxis:0,altAxis:0},we),te=i.modifiersData.offset?i.modifiersData.offset[i.placement]:null,_e={x:0,y:0};if($){if(r){var pe,U=C==="y"?ki:Ni,W=C==="y"?un:mn,P=C==="y"?"height":"width",O=$[C],V=O+w[U],H=O-w[W],K=m?-re[P]/2:0,ce=N===ta?ie[P]:re[P],oe=N===ta?-re[P]:-ie[P],Re=i.elements.arrow,he=m&&Re?Pf(Re):{width:0,height:0},lt=i.modifiersData["arrow#persistent"]?i.modifiersData["arrow#persistent"].padding:ES(),kt=lt[U],Be=lt[W],Pt=wl(0,ie[P],he[P]),Bt=k?ie[P]/2-K-Pt-kt-ge.mainAxis:ce-Pt-kt-ge.mainAxis,qt=k?-ie[P]/2+K+Pt+Be+ge.mainAxis:oe+Pt+Be+ge.mainAxis,Li=i.elements.arrow&&Ol(i.elements.arrow),mr=Li?C==="y"?Li.clientTop||0:Li.clientLeft||0:0,Fi=(pe=te?.[C])!=null?pe:0,fr=O+Bt-Fi-mr,Jr=O+qt-Fi,gr=wl(m?Rp(V,fr):V,O,m?Yr(H,Jr):H);$[C]=gr,_e[C]=gr-O}if(a){var xe,Ct=C==="x"?ki:Ni,kn=C==="x"?un:mn,Ut=$[Q],Fo=Q==="y"?"height":"width",la=Ut+w[Ct],_r=Ut-w[kn],ca=[ki,Ni].indexOf(x)!==-1,jl=(xe=te?.[Q])!=null?xe:0,ql=ca?la:Ut-ie[Fo]-re[Fo]-jl+ge.altAxis,zl=ca?Ut+ie[Fo]+re[Fo]-jl-ge.altAxis:_r,Gl=m&&ca?mV(ql,Ut,zl):wl(m?ql:la,Ut,m?zl:_r);$[Q]=Gl,_e[Q]=Gl-Ut}i.modifiersData[n]=_e}}var $V={name:"preventOverflow",enabled:!0,phase:"main",fn:GV,requiresIfExists:["offset"]};function UV(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function WV(t){return t===Ki(t)||!hn(t)?If(t):UV(t)}function QV(t){var i=t.getBoundingClientRect(),e=ia(i.width)/t.offsetWidth||1,n=ia(i.height)/t.offsetHeight||1;return e!==1||n!==1}function YV(t,i,e){e===void 0&&(e=!1);var n=hn(i),o=hn(i)&&QV(i),r=dr(i),s=na(t,o,e),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(n||!n&&!e)&&((fo(i)!=="body"||Mf(r))&&(a=WV(i)),hn(i)?(l=na(i,!0),l.x+=i.clientLeft,l.y+=i.clientTop):r&&(l.x=Df(r))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function XV(t){var i=new Map,e=new Set,n=[];t.forEach(function(r){i.set(r.name,r)});function o(r){e.add(r.name);var s=[].concat(r.requires||[],r.requiresIfExists||[]);s.forEach(function(a){if(!e.has(a)){var l=i.get(a);l&&o(l)}}),n.push(r)}return t.forEach(function(r){e.has(r.name)||o(r)}),n}function KV(t){var i=XV(t);return cV.reduce(function(e,n){return e.concat(i.filter(function(o){return o.phase===n}))},[])}function ZV(t){var i;return function(){return i||(i=new Promise(function(e){Promise.resolve().then(function(){i=void 0,e(t())})})),i}}function JV(t){var i=t.reduce(function(e,n){var o=e[n.name];return e[n.name]=o?Object.assign({},o,n,{options:Object.assign({},o.options,n.options),data:Object.assign({},o.data,n.data)}):n,e},{});return Object.keys(i).map(function(e){return i[e]})}var lS={placement:"bottom",modifiers:[],strategy:"absolute"};function cS(){for(var t=arguments.length,i=new Array(t),e=0;e<t;e++)i[e]=arguments[e];return!i.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function eB(t){t===void 0&&(t={});var i=t,e=i.defaultModifiers,n=e===void 0?[]:e,o=i.defaultOptions,r=o===void 0?lS:o;return function(s,a,l){l===void 0&&(l=r);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},lS,r),modifiersData:{},elements:{reference:s,popper:a},attributes:{},styles:{}},d=[],p=!1,h={state:c,setOptions:function(y){var w=typeof y=="function"?y(c.options):y;S(),c.options=Object.assign({},r,c.options,w),c.scrollParents={reference:Xr(s)?Sl(s):s.contextElement?Sl(s.contextElement):[],popper:Sl(a)};var x=KV(JV([].concat(n,c.options.modifiers)));return c.orderedModifiers=x.filter(function(N){return N.enabled}),m(),h.update()},forceUpdate:function(){if(!p){var y=c.elements,w=y.reference,x=y.popper;if(cS(w,x)){c.rects={reference:YV(w,Ol(x),c.options.strategy==="fixed"),popper:Pf(x)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(re){return c.modifiersData[re.name]=Object.assign({},re.data)});for(var N=0;N<c.orderedModifiers.length;N++){if(c.reset===!0){c.reset=!1,N=-1;continue}var k=c.orderedModifiers[N],C=k.fn,Q=k.options,$=Q===void 0?{}:Q,ie=k.name;typeof C=="function"&&(c=C({state:c,options:$,name:ie,instance:h})||c)}}}},update:ZV(function(){return new Promise(function(y){h.forceUpdate(),y(c)})}),destroy:function(){S(),p=!0}};if(!cS(s,a))return h;h.setOptions(l).then(function(y){!p&&l.onFirstUpdate&&l.onFirstUpdate(y)});function m(){c.orderedModifiers.forEach(function(y){var w=y.name,x=y.options,N=x===void 0?{}:x,k=y.effect;if(typeof k=="function"){var C=k({state:c,name:w,instance:h,options:N}),Q=function(){};d.push(C||Q)}})}function S(){d.forEach(function(y){return y()}),d=[]}return h}}var tB=[EV,qV,wV,CS,HV,NV,$V,vV,FV],iB=eB({defaultModifiers:tB}),nB="tippy-box",IS="tippy-content",oB="tippy-backdrop",DS="tippy-arrow",MS="tippy-svg-arrow",Qr={passive:!0,capture:!0},RS=function(){return document.body};function gf(t,i,e){if(Array.isArray(t)){var n=t[i];return n??(Array.isArray(e)?e[i]:e)}return t}function Rf(t,i){var e={}.toString.call(t);return e.indexOf("[object")===0&&e.indexOf(i+"]")>-1}function AS(t,i){return typeof t=="function"?t.apply(void 0,i):t}function dS(t,i){if(i===0)return t;var e;return function(n){clearTimeout(e),e=setTimeout(function(){t(n)},i)}}function rB(t){return t.split(/\s+/).filter(Boolean)}function ea(t){return[].concat(t)}function pS(t,i){t.indexOf(i)===-1&&t.push(i)}function sB(t){return t.filter(function(i,e){return t.indexOf(i)===e})}function aB(t){return t.split("-")[0]}function Ap(t){return[].slice.call(t)}function hS(t){return Object.keys(t).reduce(function(i,e){return t[e]!==void 0&&(i[e]=t[e]),i},{})}function El(){return document.createElement("div")}function Np(t){return["Element","Fragment"].some(function(i){return Rf(t,i)})}function lB(t){return Rf(t,"NodeList")}function kS(t){return Rf(t,"MouseEvent")}function cB(t){return!!(t&&t._tippy&&t._tippy.reference===t)}function dB(t){return Np(t)?[t]:lB(t)?Ap(t):Array.isArray(t)?t:Ap(document.querySelectorAll(t))}function _f(t,i){t.forEach(function(e){e&&(e.style.transitionDuration=i+"ms")})}function uS(t,i){t.forEach(function(e){e&&e.setAttribute("data-state",i)})}function NS(t){var i,e=ea(t),n=e[0];return n!=null&&(i=n.ownerDocument)!=null&&i.body?n.ownerDocument:document}function pB(t,i){var e=i.clientX,n=i.clientY;return t.every(function(o){var r=o.popperRect,s=o.popperState,a=o.props,l=a.interactiveBorder,c=aB(s.placement),d=s.modifiersData.offset;if(!d)return!0;var p=c==="bottom"?d.top.y:0,h=c==="top"?d.bottom.y:0,m=c==="right"?d.left.x:0,S=c==="left"?d.right.x:0,y=r.top-n+p>l,w=n-r.bottom-h>l,x=r.left-e+m>l,N=e-r.right-S>l;return y||w||x||N})}function vf(t,i,e){var n=i+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(o){t[n](o,e)})}function mS(t,i){for(var e=i;e;){var n;if(t.contains(e))return!0;e=e.getRootNode==null||(n=e.getRootNode())==null?void 0:n.host}return!1}var uo={isTouch:!1},fS=0;function hB(){uo.isTouch||(uo.isTouch=!0,window.performance&&document.addEventListener("mousemove",LS))}function LS(){var t=performance.now();t-fS<20&&(uo.isTouch=!1,document.removeEventListener("mousemove",LS)),fS=t}function uB(){var t=document.activeElement;if(cB(t)){var i=t._tippy;t.blur&&!i.state.isVisible&&t.blur()}}function mB(){document.addEventListener("touchstart",hB,Qr),window.addEventListener("blur",uB)}var fB=typeof window<"u"&&typeof document<"u",gB=fB?!!window.msCrypto:!1;var _B={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},vB={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},Mn=Object.assign({appendTo:RS,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},_B,vB),bB=Object.keys(Mn),yB=function(t){var i=Object.keys(t);i.forEach(function(e){Mn[e]=t[e]})};function FS(t){var i=t.plugins||[],e=i.reduce(function(n,o){var r=o.name,s=o.defaultValue;if(r){var a;n[r]=t[r]!==void 0?t[r]:(a=Mn[r])!=null?a:s}return n},{});return Object.assign({},t,e)}function CB(t,i){var e=i?Object.keys(FS(Object.assign({},Mn,{plugins:i}))):bB,n=e.reduce(function(o,r){var s=(t.getAttribute("data-tippy-"+r)||"").trim();if(!s)return o;if(r==="content")o[r]=s;else try{o[r]=JSON.parse(s)}catch{o[r]=s}return o},{});return n}function gS(t,i){var e=Object.assign({},i,{content:AS(i.content,[t])},i.ignoreAttributes?{}:CB(t,i.plugins));return e.aria=Object.assign({},Mn.aria,e.aria),e.aria={expanded:e.aria.expanded==="auto"?i.interactive:e.aria.expanded,content:e.aria.content==="auto"?i.interactive?null:"describedby":e.aria.content},e}var wB=function(){return"innerHTML"};function wf(t,i){t[wB()]=i}function _S(t){var i=El();return t===!0?i.className=DS:(i.className=MS,Np(t)?i.appendChild(t):wf(i,t)),i}function vS(t,i){Np(i.content)?(wf(t,""),t.appendChild(i.content)):typeof i.content!="function"&&(i.allowHTML?wf(t,i.content):t.textContent=i.content)}function Sf(t){var i=t.firstElementChild,e=Ap(i.children);return{box:i,content:e.find(function(n){return n.classList.contains(IS)}),arrow:e.find(function(n){return n.classList.contains(DS)||n.classList.contains(MS)}),backdrop:e.find(function(n){return n.classList.contains(oB)})}}function VS(t){var i=El(),e=El();e.className=nB,e.setAttribute("data-state","hidden"),e.setAttribute("tabindex","-1");var n=El();n.className=IS,n.setAttribute("data-state","hidden"),vS(n,t.props),i.appendChild(e),e.appendChild(n),o(t.props,t.props);function o(r,s){var a=Sf(i),l=a.box,c=a.content,d=a.arrow;s.theme?l.setAttribute("data-theme",s.theme):l.removeAttribute("data-theme"),typeof s.animation=="string"?l.setAttribute("data-animation",s.animation):l.removeAttribute("data-animation"),s.inertia?l.setAttribute("data-inertia",""):l.removeAttribute("data-inertia"),l.style.maxWidth=typeof s.maxWidth=="number"?s.maxWidth+"px":s.maxWidth,s.role?l.setAttribute("role",s.role):l.removeAttribute("role"),(r.content!==s.content||r.allowHTML!==s.allowHTML)&&vS(c,t.props),s.arrow?d?r.arrow!==s.arrow&&(l.removeChild(d),l.appendChild(_S(s.arrow))):l.appendChild(_S(s.arrow)):d&&l.removeChild(d)}return{popper:i,onUpdate:o}}VS.$$tippy=!0;var SB=1,Ip=[],bf=[];function EB(t,i){var e=gS(t,Object.assign({},Mn,FS(hS(i)))),n,o,r,s=!1,a=!1,l=!1,c=!1,d,p,h,m=[],S=dS(fr,e.interactiveDebounce),y,w=SB++,x=null,N=sB(e.plugins),k={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},C={id:w,reference:t,popper:El(),popperInstance:x,props:e,state:k,plugins:N,clearDelayTimeouts:ql,setProps:zl,setContent:Gl,show:I1,hide:D1,hideWithInteractivity:M1,enable:ca,disable:jl,unmount:R1,destroy:A1};if(!e.render)return C;var Q=e.render(C),$=Q.popper,ie=Q.onUpdate;$.setAttribute("data-tippy-root",""),$.id="tippy-"+C.id,C.popper=$,t._tippy=C,$._tippy=C;var re=N.map(function(j){return j.fn(C)}),we=t.hasAttribute("aria-expanded");return Li(),K(),O(),V("onCreate",[C]),e.showOnCreate&&la(),$.addEventListener("mouseenter",function(){C.props.interactive&&C.state.isVisible&&C.clearDelayTimeouts()}),$.addEventListener("mouseleave",function(){C.props.interactive&&C.props.trigger.indexOf("mouseenter")>=0&&U().addEventListener("mousemove",S)}),C;function ge(){var j=C.props.touch;return Array.isArray(j)?j:[j,0]}function te(){return ge()[0]==="hold"}function _e(){var j;return!!((j=C.props.render)!=null&&j.$$tippy)}function pe(){return y||t}function U(){var j=pe().parentNode;return j?NS(j):document}function W(){return Sf($)}function P(j){return C.state.isMounted&&!C.state.isVisible||uo.isTouch||d&&d.type==="focus"?0:gf(C.props.delay,j?0:1,Mn.delay)}function O(j){j===void 0&&(j=!1),$.style.pointerEvents=C.props.interactive&&!j?"":"none",$.style.zIndex=""+C.props.zIndex}function V(j,ve,Me){if(Me===void 0&&(Me=!0),re.forEach(function(Ke){Ke[j]&&Ke[j].apply(Ke,ve)}),Me){var nt;(nt=C.props)[j].apply(nt,ve)}}function H(){var j=C.props.aria;if(j.content){var ve="aria-"+j.content,Me=$.id,nt=ea(C.props.triggerTarget||t);nt.forEach(function(Ke){var fi=Ke.getAttribute(ve);if(C.state.isVisible)Ke.setAttribute(ve,fi?fi+" "+Me:Me);else{var Ji=fi&&fi.replace(Me,"").trim();Ji?Ke.setAttribute(ve,Ji):Ke.removeAttribute(ve)}})}}function K(){if(!(we||!C.props.aria.expanded)){var j=ea(C.props.triggerTarget||t);j.forEach(function(ve){C.props.interactive?ve.setAttribute("aria-expanded",C.state.isVisible&&ve===pe()?"true":"false"):ve.removeAttribute("aria-expanded")})}}function ce(){U().removeEventListener("mousemove",S),Ip=Ip.filter(function(j){return j!==S})}function oe(j){if(!(uo.isTouch&&(l||j.type==="mousedown"))){var ve=j.composedPath&&j.composedPath()[0]||j.target;if(!(C.props.interactive&&mS($,ve))){if(ea(C.props.triggerTarget||t).some(function(Me){return mS(Me,ve)})){if(uo.isTouch||C.state.isVisible&&C.props.trigger.indexOf("click")>=0)return}else V("onClickOutside",[C,j]);C.props.hideOnClick===!0&&(C.clearDelayTimeouts(),C.hide(),a=!0,setTimeout(function(){a=!1}),C.state.isMounted||kt())}}}function Re(){l=!0}function he(){l=!1}function lt(){var j=U();j.addEventListener("mousedown",oe,!0),j.addEventListener("touchend",oe,Qr),j.addEventListener("touchstart",he,Qr),j.addEventListener("touchmove",Re,Qr)}function kt(){var j=U();j.removeEventListener("mousedown",oe,!0),j.removeEventListener("touchend",oe,Qr),j.removeEventListener("touchstart",he,Qr),j.removeEventListener("touchmove",Re,Qr)}function Be(j,ve){Bt(j,function(){!C.state.isVisible&&$.parentNode&&$.parentNode.contains($)&&ve()})}function Pt(j,ve){Bt(j,ve)}function Bt(j,ve){var Me=W().box;function nt(Ke){Ke.target===Me&&(vf(Me,"remove",nt),ve())}if(j===0)return ve();vf(Me,"remove",p),vf(Me,"add",nt),p=nt}function qt(j,ve,Me){Me===void 0&&(Me=!1);var nt=ea(C.props.triggerTarget||t);nt.forEach(function(Ke){Ke.addEventListener(j,ve,Me),m.push({node:Ke,eventType:j,handler:ve,options:Me})})}function Li(){te()&&(qt("touchstart",Fi,{passive:!0}),qt("touchend",Jr,{passive:!0})),rB(C.props.trigger).forEach(function(j){if(j!=="manual")switch(qt(j,Fi),j){case"mouseenter":qt("mouseleave",Jr);break;case"focus":qt(gB?"focusout":"blur",gr);break;case"focusin":qt("focusout",gr);break}})}function mr(){m.forEach(function(j){var ve=j.node,Me=j.eventType,nt=j.handler,Ke=j.options;ve.removeEventListener(Me,nt,Ke)}),m=[]}function Fi(j){var ve,Me=!1;if(!(!C.state.isEnabled||xe(j)||a)){var nt=((ve=d)==null?void 0:ve.type)==="focus";d=j,y=j.currentTarget,K(),!C.state.isVisible&&kS(j)&&Ip.forEach(function(Ke){return Ke(j)}),j.type==="click"&&(C.props.trigger.indexOf("mouseenter")<0||s)&&C.props.hideOnClick!==!1&&C.state.isVisible?Me=!0:la(j),j.type==="click"&&(s=!Me),Me&&!nt&&_r(j)}}function fr(j){var ve=j.target,Me=pe().contains(ve)||$.contains(ve);if(!(j.type==="mousemove"&&Me)){var nt=Fo().concat($).map(function(Ke){var fi,Ji=Ke._tippy,es=(fi=Ji.popperInstance)==null?void 0:fi.state;return es?{popperRect:Ke.getBoundingClientRect(),popperState:es,props:e}:null}).filter(Boolean);pB(nt,j)&&(ce(),_r(j))}}function Jr(j){var ve=xe(j)||C.props.trigger.indexOf("click")>=0&&s;if(!ve){if(C.props.interactive){C.hideWithInteractivity(j);return}_r(j)}}function gr(j){C.props.trigger.indexOf("focusin")<0&&j.target!==pe()||C.props.interactive&&j.relatedTarget&&$.contains(j.relatedTarget)||_r(j)}function xe(j){return uo.isTouch?te()!==j.type.indexOf("touch")>=0:!1}function Ct(){kn();var j=C.props,ve=j.popperOptions,Me=j.placement,nt=j.offset,Ke=j.getReferenceClientRect,fi=j.moveTransition,Ji=_e()?Sf($).arrow:null,es=Ke?{getBoundingClientRect:Ke,contextElement:Ke.contextElement||pe()}:t,$l={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(Ul){var ts=Ul.state;if(_e()){var k1=W(),gh=k1.box;["placement","reference-hidden","escaped"].forEach(function(Wl){Wl==="placement"?gh.setAttribute("data-placement",ts.placement):ts.attributes.popper["data-popper-"+Wl]?gh.setAttribute("data-"+Wl,""):gh.removeAttribute("data-"+Wl)}),ts.attributes.popper={}}}},vr=[{name:"offset",options:{offset:nt}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!fi}},$l];_e()&&Ji&&vr.push({name:"arrow",options:{element:Ji,padding:3}}),vr.push.apply(vr,ve?.modifiers||[]),C.popperInstance=iB(es,$,Object.assign({},ve,{placement:Me,onFirstUpdate:h,modifiers:vr}))}function kn(){C.popperInstance&&(C.popperInstance.destroy(),C.popperInstance=null)}function Ut(){var j=C.props.appendTo,ve,Me=pe();C.props.interactive&&j===RS||j==="parent"?ve=Me.parentNode:ve=AS(j,[Me]),ve.contains($)||ve.appendChild($),C.state.isMounted=!0,Ct()}function Fo(){return Ap($.querySelectorAll("[data-tippy-root]"))}function la(j){C.clearDelayTimeouts(),j&&V("onTrigger",[C,j]),lt();var ve=P(!0),Me=ge(),nt=Me[0],Ke=Me[1];uo.isTouch&&nt==="hold"&&Ke&&(ve=Ke),ve?n=setTimeout(function(){C.show()},ve):C.show()}function _r(j){if(C.clearDelayTimeouts(),V("onUntrigger",[C,j]),!C.state.isVisible){kt();return}if(!(C.props.trigger.indexOf("mouseenter")>=0&&C.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(j.type)>=0&&s)){var ve=P(!1);ve?o=setTimeout(function(){C.state.isVisible&&C.hide()},ve):r=requestAnimationFrame(function(){C.hide()})}}function ca(){C.state.isEnabled=!0}function jl(){C.hide(),C.state.isEnabled=!1}function ql(){clearTimeout(n),clearTimeout(o),cancelAnimationFrame(r)}function zl(j){if(!C.state.isDestroyed){V("onBeforeUpdate",[C,j]),mr();var ve=C.props,Me=gS(t,Object.assign({},ve,hS(j),{ignoreAttributes:!0}));C.props=Me,Li(),ve.interactiveDebounce!==Me.interactiveDebounce&&(ce(),S=dS(fr,Me.interactiveDebounce)),ve.triggerTarget&&!Me.triggerTarget?ea(ve.triggerTarget).forEach(function(nt){nt.removeAttribute("aria-expanded")}):Me.triggerTarget&&t.removeAttribute("aria-expanded"),K(),O(),ie&&ie(ve,Me),C.popperInstance&&(Ct(),Fo().forEach(function(nt){requestAnimationFrame(nt._tippy.popperInstance.forceUpdate)})),V("onAfterUpdate",[C,j])}}function Gl(j){C.setProps({content:j})}function I1(){var j=C.state.isVisible,ve=C.state.isDestroyed,Me=!C.state.isEnabled,nt=uo.isTouch&&!C.props.touch,Ke=gf(C.props.duration,0,Mn.duration);if(!(j||ve||Me||nt)&&!pe().hasAttribute("disabled")&&(V("onShow",[C],!1),C.props.onShow(C)!==!1)){if(C.state.isVisible=!0,_e()&&($.style.visibility="visible"),O(),lt(),C.state.isMounted||($.style.transition="none"),_e()){var fi=W(),Ji=fi.box,es=fi.content;_f([Ji,es],0)}h=function(){var $l;if(!(!C.state.isVisible||c)){if(c=!0,$.offsetHeight,$.style.transition=C.props.moveTransition,_e()&&C.props.animation){var vr=W(),Ul=vr.box,ts=vr.content;_f([Ul,ts],Ke),uS([Ul,ts],"visible")}H(),K(),pS(bf,C),($l=C.popperInstance)==null||$l.forceUpdate(),V("onMount",[C]),C.props.animation&&_e()&&Pt(Ke,function(){C.state.isShown=!0,V("onShown",[C])})}},Ut()}}function D1(){var j=!C.state.isVisible,ve=C.state.isDestroyed,Me=!C.state.isEnabled,nt=gf(C.props.duration,1,Mn.duration);if(!(j||ve||Me)&&(V("onHide",[C],!1),C.props.onHide(C)!==!1)){if(C.state.isVisible=!1,C.state.isShown=!1,c=!1,s=!1,_e()&&($.style.visibility="hidden"),ce(),kt(),O(!0),_e()){var Ke=W(),fi=Ke.box,Ji=Ke.content;C.props.animation&&(_f([fi,Ji],nt),uS([fi,Ji],"hidden"))}H(),K(),C.props.animation?_e()&&Be(nt,C.unmount):C.unmount()}}function M1(j){U().addEventListener("mousemove",S),pS(Ip,S),S(j)}function R1(){C.state.isVisible&&C.hide(),C.state.isMounted&&(kn(),Fo().forEach(function(j){j._tippy.unmount()}),$.parentNode&&$.parentNode.removeChild($),bf=bf.filter(function(j){return j!==C}),C.state.isMounted=!1,V("onHidden",[C]))}function A1(){!C.state.isDestroyed&&(C.clearDelayTimeouts(),C.unmount(),mr(),delete t._tippy,C.state.isDestroyed=!0,V("onDestroy",[C]))}}function Il(t,i){i===void 0&&(i={});var e=Mn.plugins.concat(i.plugins||[]);mB();var n=Object.assign({},i,{plugins:e}),o=dB(t);if(0)var r,s;var a=o.reduce(function(l,c){var d=c&&EB(c,n);return d&&l.push(d),l},[]);return Np(t)?a[0]:a}Il.defaultProps=Mn;Il.setDefaultProps=yB;Il.currentInput=uo;Object.assign({},CS,{effect:function(t){var i=t.state,e={popper:{position:i.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(i.elements.popper.style,e.popper),i.styles=e,i.elements.arrow&&Object.assign(i.elements.arrow.style,e.arrow)}});var Ef={clientX:0,clientY:0},Dp=[];function BS(t){var i=t.clientX,e=t.clientY;Ef={clientX:i,clientY:e}}function TB(t){t.addEventListener("mousemove",BS)}function xB(t){t.removeEventListener("mousemove",BS)}var PB={name:"followCursor",defaultValue:!1,fn:function(t){var i=t.reference,e=NS(t.props.triggerTarget||i),n=!1,o=!1,r=!0,s=t.props;function a(){return t.props.followCursor==="initial"&&t.state.isVisible}function l(){e.addEventListener("mousemove",p)}function c(){e.removeEventListener("mousemove",p)}function d(){n=!0,t.setProps({getReferenceClientRect:null}),n=!1}function p(S){var y=S.target?i.contains(S.target):!0,w=t.props.followCursor,x=S.clientX,N=S.clientY,k=i.getBoundingClientRect(),C=x-k.left,Q=N-k.top;(y||!t.props.interactive)&&t.setProps({getReferenceClientRect:function(){var $=i.getBoundingClientRect(),ie=x,re=N;w==="initial"&&(ie=$.left+C,re=$.top+Q);var we=w==="horizontal"?$.top:re,ge=w==="vertical"?$.right:ie,te=w==="horizontal"?$.bottom:re,_e=w==="vertical"?$.left:ie;return{width:ge-_e,height:te-we,top:we,right:ge,bottom:te,left:_e}}})}function h(){t.props.followCursor&&(Dp.push({instance:t,doc:e}),TB(e))}function m(){Dp=Dp.filter(function(S){return S.instance!==t}),Dp.filter(function(S){return S.doc===e}).length===0&&xB(e)}return{onCreate:h,onDestroy:m,onBeforeUpdate:function(){s=t.props},onAfterUpdate:function(S,y){var w=y.followCursor;n||w!==void 0&&s.followCursor!==w&&(m(),w?(h(),t.state.isMounted&&!o&&!a()&&l()):(c(),d()))},onMount:function(){t.props.followCursor&&!o&&(r&&(p(Ef),r=!1),a()||l())},onTrigger:function(S,y){kS(y)&&(Ef={clientX:y.clientX,clientY:y.clientY}),o=y.type==="focus"},onHidden:function(){t.props.followCursor&&(d(),c(),r=!0)}}}};Il.setDefaultProps({render:VS});var Lo=class{constructor(i){$t(this,"context"),$t(this,"canvasEl"),$t(this,"xScale"),$t(this,"yScale"),$t(this,"data"),$t(this,"onZoom"),$t(this,"onCanvasPan"),$t(this,"hoveredBar"),$t(this,"selectedBar"),$t(this,"zoomScale",1),$t(this,"translateX",0),$t(this,"onHover"),$t(this,"MIN_BAR_WIDTH",1),$t(this,"HOVERED_OPACITY",.5),$t(this,"BLURRED_OPACITY",.3),$t(this,"canvasSelection"),$t(this,"onBarClick"),$t(this,"tooltip"),$t(this,"tooltipRenderer");let{canvasEl:e,data:n,onBarClick:o,tooltipRenderer:r,yRange:s}=i;this.canvasEl=e,this.data=n,this.onBarClick=o,this.tooltipRenderer=r,this.zoomScale=At.timeline.brush.zoomScale,this.translateX=At.timeline.brush.translateX;let a=e.getBoundingClientRect();this.canvasSelection=Pn(e).attr("width",a.width).attr("height",a.height);let l=this.canvasEl.getContext("2d");if(!l){console.error("Canvas context could not be created");return}this.context=l,this.xScale=yl().domain(At.timeline.range).range([0,a.width]),this.yScale=yl(),s&&this.yScale.domain(s).range([0,a.height]),this.tooltipRenderer&&(this.initializeToolip(),this.addTooltipListeners(e)),this.onBarClick&&this.addClickListener(e)}initializeToolip(){this.tooltip=Il(this.canvasEl,{followCursor:!0,plugins:[PB],duration:0,theme:"vcl"})}updateTooltip(i){i?(this.tooltip.setContent(this.tooltipRenderer(i)),this.tooltip.show()):this.tooltip.hide()}addTooltipListeners(i){i.addEventListener("mousemove",e=>{this.hoveredBar=this.findHoveredBar(e),this.updateTooltip(this.hoveredBar),this.render()}),i.addEventListener("mouseleave",()=>{this.hoveredBar=void 0,this.updateTooltip(this.hoveredBar),this.render()})}addClickListener(i){i.addEventListener("click",e=>{let n=this.findHoveredBar(e);this.onBarClick(n)})}findHoveredBar(i){this.context.save(),this.context.translate(this.translateX,0);let e=this.canvasEl.getBoundingClientRect(),n=i.clientX-e.left-this.translateX,o=i.clientY-e.top,r=this.data.find(s=>{let a=this.xScale(s.ts),l=this.xScale(s.tsEnd)-a,c=a*this.zoomScale,d=l*this.zoomScale,p=n>=c&&n<=c+Math.max(this.MIN_BAR_WIDTH,d),h=o>=2&&o<=e.height-2;return p&&h});return this.context.restore(),r}getBarWidth(i,e){return this.selectedBar?i===this.selectedBar?Math.max(this.MIN_BAR_WIDTH,e):e:Math.max(this.MIN_BAR_WIDTH,e)}render(){let i=this.canvasEl.getBoundingClientRect();this.context.save(),this.context.clearRect(0,0,i.width,i.height),this.context.translate(this.translateX,0);let e=-this.translateX,n=i.width-this.translateX;this.data.forEach(o=>this.scaleAndRender(o,i,e,n)),this.context.restore()}scaleAndRender(i,e,n,o){let r=this.xScale(i.ts),s=this.xScale(i.tsEnd)-r,a=r*this.zoomScale,l=s*this.zoomScale,c=this.yScale(i.value),d=e.height-c;a+l>=n&&a<o&&this.drawCallback({d:i,x:a,y:d,width:this.getBarWidth(i,l),height:c,visibleStart:n,visibleEnd:o,rect:e})}getFillStyle(i,e){let n=i===this.hoveredBar,o=e;return this.selectedBar&&(o=i===this.selectedBar?e:Gd(e,this.BLURRED_OPACITY)),n&&(o=Gd(e,this.HOVERED_OPACITY)),o}highlightBar(i,e,n,o){this.context.strokeStyle=At.mode==="dark"?"white":"black",this.context.lineWidth=2,this.context.strokeRect(i,e,n,o)}updateZoomAndPosition(i,e){this.zoomScale=i,this.translateX=e,this.render()}onResize(){let i=this.canvasEl.getBoundingClientRect();this.canvasSelection.attr("width",i.width).attr("height",i.height),this.xScale.range([0,i.width]),this.render()}onSelection(i){this.selectedBar=i,this.render()}};function OB(t,i){let e,n;if(i===void 0)for(let o of t)o!=null&&(e===void 0?o>=o&&(e=n=o):(e>o&&(e=o),n<o&&(n=o)));else{let o=-1;for(let r of t)(r=i(r,++o,t))!=null&&(e===void 0?r>=r&&(e=n=r):(e>r&&(e=r),n<r&&(n=r)))}return[e,n]}var Dl=class extends Lo{constructor(i){super(ee(E({},i),{tooltipRenderer:e=>e.value.toLocaleString(),yRange:OB(i.data,e=>e.value)})),super.render()}drawCallback({d:i,x:e,y:n,width:o,height:r}){this.drawBar(i,e,n,o,r)}drawBar(i,e,n,o,r){this.context.fillStyle=this.getFillStyle(i,qd),this.context.fillRect(e,n,o,r),i===this.selectedBar&&this.highlightBar(e,n,o,r)}};function HS(t){return Object.values(t.threads).flatMap(i=>i)}function jS(t){if(!t.length)return[];t.sort((e,n)=>e.ts-n.ts);let i=[];i.push(t[0]);for(let e=1;e<t.length;e++){let n=i[i.length-1],o=t[e];o.ts<=n.tsEnd?(i.pop(),i.push(ee(E({},n),{tsEnd:Math.max(n.tsEnd,o.tsEnd)}))):i.push(o)}return i}var Ml=class extends Lo{constructor(i){let e=HS(i.data),n=jS(e);super({canvasEl:i.canvasEl,data:n,yRange:[0,1]}),super.render()}drawCallback({x:i,width:e}){this.context.fillStyle=jd,this.context.fillRect(i,0,e,this.yScale(1))}};var IB=Object.defineProperty,DB=(t,i,e)=>i in t?IB(t,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[i]=e,MB=(t,i,e)=>DB(t,typeof i!="symbol"?i+"":i,e),qS=5,RB=15,GS=2,zS=GS/2,Rl=class extends Lo{constructor(i){super(ee(E({},i),{tooltipRenderer:e=>e.name})),MB(this,"opColors"),this.opColors=i.opColors,super.render()}drawCallback({d:i,x:e,width:n,visibleStart:o,visibleEnd:r,rect:s}){this.context.font="10px sans-serif",this.drawBar(i,e,n,s.height-GS),this.drawLabel(i,e,n,o,r)}drawBar(i,e,n,o){let r=this.opColors[i.name];this.context.fillStyle=this.getFillStyle(i,r),this.context.fillRect(e,zS,n,o),i===this.selectedBar&&this.highlightBar(e,zS,n,o)}drawLabel(i,e,n,o,r){let s=e+n,a=s<o||e>r,l=n<20;if(a||l)return;let c=this.truncateTextToFitBar(i,n,s,o),d=Math.max(e,o,0);this.context.fillStyle="white",this.context.fillText(c,d+qS,RB)}truncateTextToFitBar(i,e,n,o){let r=i.name,s=this.context.measureText(r).width,a=Math.min(e,n-o);for(;r.length&&s+qS>a;)r=r.slice(0,-1),s=this.context.measureText(r).width;return r}};var AB=Object.defineProperty,kB=(t,i,e)=>i in t?AB(t,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[i]=e,Lp=(t,i,e)=>kB(t,typeof i!="symbol"?i+"":i,e),Al=class{constructor(i){Lp(this,"config"),Lp(this,"SHORTCUTS",{ZOOM_IN:"w",ZOOM_OUT:"s",PAN_LEFT:"a",PAN_RIGHT:"d"}),Lp(this,"ZOOM_DIRECTION_MAP",{[this.SHORTCUTS.ZOOM_IN]:1,[this.SHORTCUTS.ZOOM_OUT]:-1}),Lp(this,"PAN_DIRECTION_MAP",{[this.SHORTCUTS.PAN_RIGHT]:1,[this.SHORTCUTS.PAN_LEFT]:-1}),this.config=i,i.element.addEventListener("keydown",this.handleKeyDown.bind(this)),i.element.addEventListener("keyup",this.handleKeyUp.bind(this))}isKeyEventInFormElement(i){if(i.target){let e=i.target;if(e.tagName==="INPUT"||e.tagName==="TEXTAREA")return!0}return!1}handleKeyDown(i){this.isKeyEventInFormElement(i)||((i.key===this.SHORTCUTS.ZOOM_IN||i.key===this.SHORTCUTS.ZOOM_OUT)&&this.config.onZoom(this.ZOOM_DIRECTION_MAP[i.key]),(i.key===this.SHORTCUTS.PAN_LEFT||i.key===this.SHORTCUTS.PAN_RIGHT)&&this.config.onPan(this.PAN_DIRECTION_MAP[i.key]))}handleKeyUp(i){this.isKeyEventInFormElement(i)||((i.key===this.SHORTCUTS.ZOOM_IN||i.key===this.SHORTCUTS.ZOOM_OUT)&&this.config.onZoomStop(),(i.key===this.SHORTCUTS.PAN_LEFT||i.key===this.SHORTCUTS.PAN_RIGHT)&&this.config.onPanStop())}removeListeners(){this.config.element.removeEventListener("keydown",this.handleKeyDown.bind(this)),this.config.element.removeEventListener("keydown",this.handleKeyUp.bind(this))}};function Af(t,i){let e=new Set;if(i)return e;for(let n of t)e.add(n.pid);return e}function kf(t,i){let e=new Set(t);return e.has(i)?e.delete(i):e.add(i),e}function Nf(t){return Y(this,null,function*(){let i=JSON.parse(yield t.text());return i.traceEvents??i})}function $S(t){let i=[],e=[],n=[];for(let o of t)switch(o.ph){case Dn.METADATA:n.push(o);break;case Dn.COMPLETE:i.push(o);break;case Dn.COUNTER:e.push(o);break}return{completeEvents:i,counterEvents:e,metaEvents:n}}function US(t){let i=[1/0,0];for(let e of t){i[0]=Math.min(i[0],e.ts);let n=e.ts+(e.dur||0);i[1]=Math.max(i[1],n)}return i}function WS(t){let i=new Set;for(let o of t)i.add(o.name);let e={},n=0;return i.forEach(o=>{e[o]=Cm(n),n++}),e}function QS(t,i){var e,n;for(let o of i)t[o.pid]||(t[o.pid]={name:"",threads:{},memoryTypes:{},sortIndex:-1,pid:o.pid}),(e=o.args)!=null&&e.name&&(t[o.pid].name=o.args.name),((n=o.args)==null?void 0:n.sort_index)!==void 0&&(t[o.pid].sortIndex=o.args.sort_index)}function YS(t,i){for(let e of t){let n=i[e.pid];n.threads[e.tid]||(n.threads[e.tid]=[]);let o=e.ts+(e.dur||0);n.threads[e.tid].push(ee(E({},e),{tsEnd:o,value:o-e.ts,processName:n.name}))}}function XS(t,i){[...t].sort((e,n)=>e.ts-n.ts).forEach(e=>{let n=i[e.pid];n.memoryTypes[e.name]||(n.memoryTypes[e.name]=[]);let o=n.memoryTypes[e.name];if(o.length>0&&NB(o,e.ts),e.args){let r=Object.values(e.args)[0];o.push(ee(E({},e),{tsEnd:e.ts,value:r,processName:n.name}))}})}function NB(t,i){let e=t[t.length-1];e.tsEnd=i}function KS(t){let i=t.findIndex(e=>e.name==="Memory Bandwidth");if(i!==-1){let e=t[i];t.splice(i,1),t.unshift(e)}}function ZS(t){let i=[];for(let e of t)Object.values(e.threads).flat().forEach(n=>i.push(n));return i}function Lf(t){let{completeEvents:i,counterEvents:e,metaEvents:n}=$S(t),o=US(i),r={};QS(r,n),YS(i,r),XS(e,r);let s=Object.values(r).sort((a,l)=>a.sortIndex-l.sortIndex);return KS(s),{processes:s,range:o,opColors:WS(i),htpOps:ZS(s)}}var JS=new Set(["Memory Bandwidth","SystemService","Output","Input"]),eE=/^Core \d+ Overview$/;function Fp(t,i){return t.startsWith(i)?t.substring(i.length):t}function Ff(t){let i=Fp(t.name,Us);return eE.test(i)||JS.has(i)}function Vp(t){setTimeout(()=>{t.scrollIntoView({behavior:"smooth"})})}function Bp(t,i,e){let n=new Set(i);n.add(t),e(n)}function Vf(t,i){return t.find(e=>{var n,o;return((n=e.args)==null?void 0:n.opid)===((o=i.args)==null?void 0:o.opid)&&e.pid===i.pid})}function Bf(t){return t.ph===Dn.COMPLETE}function Hf(t){return t.ph===Dn.COUNTER}function jf(t,i){if(t.preventDefault(),!i)return;let e=t.clientY,n=i.getBoundingClientRect(),o=s=>{s.preventDefault();let a=s.clientY-e;i.style.height=`${n.height-a}px`},r=()=>{document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",r)};document.addEventListener("mousemove",o),document.addEventListener("mouseup",r)}var mi=typeof document>"u"?null:document,Hp=typeof window>"u"?null:window;function hr(t,i){return typeof t=="function"?t(i):t}function Zi(t,i){return e=>{i.setState(n=>ee(E({},n),{[t]:hr(e,n[t])}))}}function Gp(t){return t instanceof Function}function FB(t){return Array.isArray(t)&&t.every(i=>typeof i=="number")}function VB(t,i){let e=[],n=o=>{o.forEach(r=>{e.push(r);let s=i(r);s!=null&&s.length&&n(s)})};return n(t),e}function De(t,i,e){let n=[],o;return()=>{var r;let s;e.key&&e.debug&&(s=Date.now());let a=t();if(!(a.length!==n.length||a.some((c,d)=>n[d]!==c)))return o;n=a;let l;if(e.key&&e.debug&&(l=Date.now()),o=i(...a),(r=e?.onChange)==null||r.call(e,o),e.key&&e.debug&&e!=null&&e.debug()){let c=Math.round((Date.now()-s)*100)/100,d=Math.round((Date.now()-l)*100)/100,p=d/16,h=(m,S)=>{for(m=String(m);m.length<S;)m=` ${m}`;return m};console.info(`%c\u23F1 ${h(d,5)} /${h(c,5)} ms`,`
|
|
21
|
-
font-size: .6rem;
|
|
22
|
-
font-weight: bold;
|
|
23
|
-
color: hsl(${Math.max(0,Math.min(120-120*p,120))}deg 100% 31%);`,e?.key)}return o}}var jp={maxSize:Number.MAX_SAFE_INTEGER,minSize:20,size:150},qf=()=>({columnSizingStart:[],deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,startOffset:null,startSize:null}),BB={createColumn:(t,i)=>{t.getSize=()=>{let e=i.getState().columnSizing[t.id];return Math.min(Math.max(t.columnDef.minSize??jp.minSize,e??t.columnDef.size??jp.size),t.columnDef.maxSize??jp.maxSize)},t.getStart=e=>{let n=e?e==="left"?i.getLeftVisibleLeafColumns():i.getRightVisibleLeafColumns():i.getVisibleLeafColumns(),o=n.findIndex(r=>r.id===t.id);if(o>0){let r=n[o-1];return r.getStart(e)+r.getSize()}return 0},t.resetSize=()=>{var r;i.setColumnSizing(o=>{var s=o,{[r=t.id]:e}=s,n=da(s,[_h(r)]);return n})},t.getCanResize=()=>(t.columnDef.enableResizing??!0)&&(i.options.enableColumnResizing??!0),t.getIsResizing=()=>i.getState().columnSizingInfo.isResizingColumn===t.id},createHeader:(t,i)=>{t.getSize=()=>{let e=0,n=o=>{o.subHeaders.length?o.subHeaders.forEach(n):e+=o.column.getSize()??0};return n(t),e},t.getStart=()=>{if(t.index>0){let e=t.headerGroup.headers[t.index-1];return e.getStart()+e.getSize()}return 0},t.getResizeHandler=()=>{let e=i.getColumn(t.column.id),n=e?.getCanResize();return o=>{var r;if(!e||!n||((r=o.persist)==null||r.call(o),zf(o)&&o.touches&&o.touches.length>1))return;let s=t.getSize(),a=t?t.getLeafHeaders().map(w=>[w.column.id,w.column.getSize()]):[[e.id,e.getSize()]],l=zf(o)?Math.round(o.touches[0].clientX):o.clientX,c={},d=(w,x)=>{typeof x=="number"&&(i.setColumnSizingInfo(N=>{let k=i.options.columnResizeDirection==="rtl"?-1:1,C=(x-(N?.startOffset??0))*k,Q=Math.max(C/(N?.startSize??0),-.999999);return N.columnSizingStart.forEach(([$,ie])=>{c[$]=Math.round(Math.max(ie+ie*Q,0)*100)/100}),ee(E({},N),{deltaOffset:C,deltaPercentage:Q})}),(i.options.columnResizeMode==="onChange"||w==="end")&&i.setColumnSizing(N=>E(E({},N),c)))},p=w=>d("move",w),h=w=>{d("end",w),i.setColumnSizingInfo(x=>ee(E({},x),{columnSizingStart:[],deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,startOffset:null,startSize:null}))},m={moveHandler:w=>p(w.clientX),upHandler:w=>{mi?.removeEventListener("mousemove",m.moveHandler),mi?.removeEventListener("mouseup",m.upHandler),h(w.clientX)}},S={moveHandler:w=>(w.cancelable&&(w.preventDefault(),w.stopPropagation()),p(w.touches[0].clientX),!1),upHandler:w=>{var x;mi?.removeEventListener("touchmove",S.moveHandler),mi?.removeEventListener("touchend",S.upHandler),w.cancelable&&(w.preventDefault(),w.stopPropagation()),h((x=w.touches[0])==null?void 0:x.clientX)}},y=HB()?{passive:!1}:!1;zf(o)?(mi?.addEventListener("touchmove",S.moveHandler,y),mi?.addEventListener("touchend",S.upHandler,y)):(mi?.addEventListener("mousemove",m.moveHandler,y),mi?.addEventListener("mouseup",m.upHandler,y)),i.setColumnSizingInfo(w=>ee(E({},w),{columnSizingStart:a,deltaOffset:0,deltaPercentage:0,isResizingColumn:e.id,startOffset:l,startSize:s}))}}},createTable:t=>{t.setColumnSizing=i=>{var e,n;return(n=(e=t.options).onColumnSizingChange)==null?void 0:n.call(e,i)},t.setColumnSizingInfo=i=>{var e,n;return(n=(e=t.options).onColumnSizingInfoChange)==null?void 0:n.call(e,i)},t.resetColumnSizing=i=>{t.setColumnSizing(i?{}:t.initialState.columnSizing??{})},t.resetHeaderSizeInfo=i=>{t.setColumnSizingInfo(i?qf():t.initialState.columnSizingInfo??qf())},t.getTotalSize=()=>{var i;return((i=t.getHeaderGroups()[0])==null?void 0:i.headers.reduce((e,n)=>e+n.getSize(),0))??0},t.getLeftTotalSize=()=>{var i;return((i=t.getLeftHeaderGroups()[0])==null?void 0:i.headers.reduce((e,n)=>e+n.getSize(),0))??0},t.getCenterTotalSize=()=>{var i;return((i=t.getCenterHeaderGroups()[0])==null?void 0:i.headers.reduce((e,n)=>e+n.getSize(),0))??0},t.getRightTotalSize=()=>{var i;return((i=t.getRightHeaderGroups()[0])==null?void 0:i.headers.reduce((e,n)=>e+n.getSize(),0))??0}},getDefaultColumnDef:()=>jp,getDefaultOptions:t=>({columnResizeDirection:"ltr",columnResizeMode:"onEnd",onColumnSizingChange:Zi("columnSizing",t),onColumnSizingInfoChange:Zi("columnSizingInfo",t)}),getInitialState:t=>E({columnSizing:{},columnSizingInfo:qf()},t)},qp=null;function HB(){if(typeof qp=="boolean")return qp;let t=!1;try{let i={get passive(){return t=!0,!1}},e=()=>{};Hp?.addEventListener("test",e,i),Hp?.removeEventListener("test",e)}catch{t=!1}return qp=t,qp}function zf(t){return t.type==="touchstart"}var jB={createRow:(t,i)=>{t.toggleExpanded=e=>{i.setExpanded(n=>{var s;let o=n===!0?!0:!!(n!=null&&n[t.id]),r={};if(n===!0?Object.keys(i.getRowModel().rowsById).forEach(l=>{r[l]=!0}):r=n,e=e??!o,!o&&e)return ee(E({},r),{[t.id]:!0});if(o&&!e){let a=r,{[s=t.id]:l}=a;return da(a,[_h(s)])}return n})},t.getIsExpanded=()=>{var e,n;let o=i.getState().expanded;return!!(((n=(e=i.options).getIsRowExpanded)==null?void 0:n.call(e,t))??(o===!0||o?.[t.id]))},t.getCanExpand=()=>{var e,n,o;return((n=(e=i.options).getRowCanExpand)==null?void 0:n.call(e,t))??((i.options.enableExpanding??!0)&&!!((o=t.subRows)!=null&&o.length))},t.getIsAllParentsExpanded=()=>{let e=!0,n=t;for(;e&&n.parentId;)n=i.getRow(n.parentId,!0),e=n.getIsExpanded();return e},t.getToggleExpandedHandler=()=>{let e=t.getCanExpand();return()=>{e&&t.toggleExpanded()}}},createTable:t=>{let i=!1,e=!1;t._autoResetExpanded=()=>{if(!i){t._queue(()=>{i=!0});return}if(t.options.autoResetAll??t.options.autoResetExpanded??!t.options.manualExpanding){if(e)return;e=!0,t._queue(()=>{t.resetExpanded(),e=!1})}},t.setExpanded=n=>{var o,r;return(r=(o=t.options).onExpandedChange)==null?void 0:r.call(o,n)},t.toggleAllRowsExpanded=n=>{n??!t.getIsAllRowsExpanded()?t.setExpanded(!0):t.setExpanded({})},t.resetExpanded=n=>{var o;t.setExpanded(n?{}:((o=t.initialState)==null?void 0:o.expanded)??{})},t.getCanSomeRowsExpand=()=>t.getPrePaginationRowModel().flatRows.some(n=>n.getCanExpand()),t.getToggleAllRowsExpandedHandler=()=>n=>{var o;(o=n.persist)==null||o.call(n),t.toggleAllRowsExpanded()},t.getIsSomeRowsExpanded=()=>{let n=t.getState().expanded;return n===!0||Object.values(n).some(Boolean)},t.getIsAllRowsExpanded=()=>{let n=t.getState().expanded;return typeof n=="boolean"?n===!0:!(!Object.keys(n).length||t.getRowModel().flatRows.some(o=>!o.getIsExpanded()))},t.getExpandedDepth=()=>{let n=0;return(t.getState().expanded===!0?Object.keys(t.getRowModel().rowsById):Object.keys(t.getState().expanded)).forEach(o=>{let r=o.split(".");n=Math.max(n,r.length)}),n},t.getPreExpandedRowModel=()=>t.getSortedRowModel(),t.getExpandedRowModel=()=>(!t._getExpandedRowModel&&t.options.getExpandedRowModel&&(t._getExpandedRowModel=t.options.getExpandedRowModel(t)),t.options.manualExpanding||!t._getExpandedRowModel?t.getPreExpandedRowModel():t._getExpandedRowModel())},getDefaultOptions:t=>({onExpandedChange:Zi("expanded",t),paginateExpandedRows:!0}),getInitialState:t=>E({expanded:{}},t)},aE=(t,i,e)=>{var n,o,r;let s=e.toLowerCase();return!!((r=(o=(n=t.getValue(i))==null?void 0:n.toString())==null?void 0:o.toLowerCase())!=null&&r.includes(s))};aE.autoRemove=t=>Rn(t);var lE=(t,i,e)=>{var n,o;return!!((o=(n=t.getValue(i))==null?void 0:n.toString())!=null&&o.includes(e))};lE.autoRemove=t=>Rn(t);var cE=(t,i,e)=>{var n,o;return((o=(n=t.getValue(i))==null?void 0:n.toString())==null?void 0:o.toLowerCase())===e?.toLowerCase()};cE.autoRemove=t=>Rn(t);var dE=(t,i,e)=>{var n;return(n=t.getValue(i))==null?void 0:n.includes(e)};dE.autoRemove=t=>Rn(t)||!(t!=null&&t.length);var pE=(t,i,e)=>!e.some(n=>{var o;return!((o=t.getValue(i))!=null&&o.includes(n))});pE.autoRemove=t=>Rn(t)||!(t!=null&&t.length);var hE=(t,i,e)=>e.some(n=>{var o;return(o=t.getValue(i))==null?void 0:o.includes(n)});hE.autoRemove=t=>Rn(t)||!(t!=null&&t.length);var uE=(t,i,e)=>t.getValue(i)===e;uE.autoRemove=t=>Rn(t);var mE=(t,i,e)=>t.getValue(i)==e;mE.autoRemove=t=>Rn(t);var eg=(t,i,e)=>{let[n,o]=e,r=t.getValue(i);return r>=n&&r<=o};eg.resolveFilterValue=t=>{let[i,e]=t,n=typeof i!="number"?parseFloat(i):i,o=typeof e!="number"?parseFloat(e):e,r=i===null||Number.isNaN(n)?-1/0:n,s=e===null||Number.isNaN(o)?1/0:o;if(r>s){let a=r;r=s,s=a}return[r,s]};eg.autoRemove=t=>Rn(t)||Rn(t[0])&&Rn(t[1]);var pr={arrIncludes:dE,arrIncludesAll:pE,arrIncludesSome:hE,equals:uE,equalsString:cE,inNumberRange:eg,includesString:aE,includesStringSensitive:lE,weakEquals:mE};function Rn(t){return t==null||t===""}var qB={createColumn:(t,i)=>{t.getAutoFilterFn=()=>{let e=i.getCoreRowModel().flatRows[0],n=e?.getValue(t.id);return typeof n=="string"?pr.includesString:typeof n=="number"?pr.inNumberRange:typeof n=="boolean"||n!==null&&typeof n=="object"?pr.equals:Array.isArray(n)?pr.arrIncludes:pr.weakEquals},t.getFilterFn=()=>{var e;return Gp(t.columnDef.filterFn)?t.columnDef.filterFn:t.columnDef.filterFn==="auto"?t.getAutoFilterFn():((e=i.options.filterFns)==null?void 0:e[t.columnDef.filterFn])??pr[t.columnDef.filterFn]},t.getCanFilter=()=>(t.columnDef.enableColumnFilter??!0)&&(i.options.enableColumnFilters??!0)&&(i.options.enableFilters??!0)&&!!t.accessorFn,t.getCanGlobalFilter=()=>{var e,n;return(t.columnDef.enableGlobalFilter??!0)&&(i.options.enableGlobalFilter??!0)&&(i.options.enableFilters??!0)&&(((n=(e=i.options).getColumnCanGlobalFilter)==null?void 0:n.call(e,t))??!0)&&!!t.accessorFn},t.getIsFiltered=()=>t.getFilterIndex()>-1,t.getFilterValue=()=>{var e,n;return(n=(e=i.getState().columnFilters)==null?void 0:e.find(o=>o.id===t.id))==null?void 0:n.value},t.getFilterIndex=()=>{var e;return((e=i.getState().columnFilters)==null?void 0:e.findIndex(n=>n.id===t.id))??-1},t.setFilterValue=e=>{i.setColumnFilters(n=>{let o=t.getFilterFn(),r=n?.find(l=>l.id===t.id),s=hr(e,r?r.value:void 0);if(oE(o,s,t))return n?.filter(l=>l.id!==t.id)??[];let a={id:t.id,value:s};return r?n?.map(l=>l.id===t.id?a:l)??[]:n!=null&&n.length?[...n,a]:[a]})},t._getFacetedRowModel=i.options.getFacetedRowModel&&i.options.getFacetedRowModel(i,t.id),t.getFacetedRowModel=()=>t._getFacetedRowModel?t._getFacetedRowModel():i.getPreFilteredRowModel(),t._getFacetedUniqueValues=i.options.getFacetedUniqueValues&&i.options.getFacetedUniqueValues(i,t.id),t.getFacetedUniqueValues=()=>t._getFacetedUniqueValues?t._getFacetedUniqueValues():new Map,t._getFacetedMinMaxValues=i.options.getFacetedMinMaxValues&&i.options.getFacetedMinMaxValues(i,t.id),t.getFacetedMinMaxValues=()=>{if(t._getFacetedMinMaxValues)return t._getFacetedMinMaxValues()}},createRow:(t,i)=>{t.columnFilters={},t.columnFiltersMeta={}},createTable:t=>{t.getGlobalAutoFilterFn=()=>pr.includesString,t.getGlobalFilterFn=()=>{var i;let{globalFilterFn:e}=t.options;return Gp(e)?e:e==="auto"?t.getGlobalAutoFilterFn():((i=t.options.filterFns)==null?void 0:i[e])??pr[e]},t.setColumnFilters=i=>{var e,n;let o=t.getAllLeafColumns(),r=s=>{var a;return(a=hr(i,s))==null?void 0:a.filter(l=>{let c=o.find(d=>d.id===l.id);if(c){let d=c.getFilterFn();if(oE(d,l.value,c))return!1}return!0})};(n=(e=t.options).onColumnFiltersChange)==null||n.call(e,r)},t.setGlobalFilter=i=>{var e,n;(n=(e=t.options).onGlobalFilterChange)==null||n.call(e,i)},t.resetGlobalFilter=i=>{t.setGlobalFilter(i?void 0:t.initialState.globalFilter)},t.resetColumnFilters=i=>{var e;t.setColumnFilters(i?[]:((e=t.initialState)==null?void 0:e.columnFilters)??[])},t.getPreFilteredRowModel=()=>t.getCoreRowModel(),t.getFilteredRowModel=()=>(!t._getFilteredRowModel&&t.options.getFilteredRowModel&&(t._getFilteredRowModel=t.options.getFilteredRowModel(t)),t.options.manualFiltering||!t._getFilteredRowModel?t.getPreFilteredRowModel():t._getFilteredRowModel()),t._getGlobalFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,"__global__"),t.getGlobalFacetedRowModel=()=>t.options.manualFiltering||!t._getGlobalFacetedRowModel?t.getPreFilteredRowModel():t._getGlobalFacetedRowModel(),t._getGlobalFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,"__global__"),t.getGlobalFacetedUniqueValues=()=>t._getGlobalFacetedUniqueValues?t._getGlobalFacetedUniqueValues():new Map,t._getGlobalFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,"__global__"),t.getGlobalFacetedMinMaxValues=()=>{if(t._getGlobalFacetedMinMaxValues)return t._getGlobalFacetedMinMaxValues()}},getDefaultColumnDef:()=>({filterFn:"auto"}),getDefaultOptions:t=>({filterFromLeafRows:!1,getColumnCanGlobalFilter:i=>{var e,n;let o=(n=(e=t.getCoreRowModel().flatRows[0])==null?void 0:e._getAllCellsByColumnId()[i.id])==null?void 0:n.getValue();return typeof o=="string"||typeof o=="number"},globalFilterFn:"auto",maxLeafRowFilterDepth:100,onColumnFiltersChange:Zi("columnFilters",t),onGlobalFilterChange:Zi("globalFilter",t)}),getInitialState:t=>E({columnFilters:[],globalFilter:void 0},t)};function oE(t,i,e){return(t&&t.autoRemove?t.autoRemove(i,e):!1)||typeof i>"u"||typeof i=="string"&&!i}var zB=(t,i,e)=>e.reduce((n,o)=>{let r=o.getValue(t);return n+(typeof r=="number"?r:0)},0),GB=(t,i,e)=>{let n;return e.forEach(o=>{let r=o.getValue(t);r!=null&&(n>r||n===void 0&&r>=r)&&(n=r)}),n},$B=(t,i,e)=>{let n;return e.forEach(o=>{let r=o.getValue(t);r!=null&&(n<r||n===void 0&&r>=r)&&(n=r)}),n},UB=(t,i,e)=>{let n,o;return e.forEach(r=>{let s=r.getValue(t);s!=null&&(n===void 0?s>=s&&(n=o=s):(n>s&&(n=s),o<s&&(o=s)))}),[n,o]},WB=(t,i)=>{let e=0,n=0;if(i.forEach(o=>{let r=o.getValue(t);r!=null&&(r=+r)>=r&&(++e,n+=r)}),e)return n/e},QB=(t,i)=>{if(!i.length)return;let e=i.map(r=>r.getValue(t));if(!FB(e))return;if(e.length===1)return e[0];let n=Math.floor(e.length/2),o=e.sort((r,s)=>r-s);return e.length%2!==0?o[n]:(o[n-1]+o[n])/2},YB=(t,i)=>Array.from(new Set(i.map(e=>e.getValue(t))).values()),XB=(t,i)=>new Set(i.map(e=>e.getValue(t))).size,KB=(t,i)=>i.length,Gf={count:KB,extent:UB,max:$B,mean:WB,median:QB,min:GB,sum:zB,unique:YB,uniqueCount:XB},ZB={createCell:(t,i,e)=>{t.getIsGrouped=()=>i.getIsGrouped()&&i.id===e.groupingColumnId,t.getIsPlaceholder=()=>!t.getIsGrouped()&&i.getIsGrouped(),t.getIsAggregated=()=>{var n;return!t.getIsGrouped()&&!t.getIsPlaceholder()&&!!((n=e.subRows)!=null&&n.length)}},createColumn:(t,i)=>{t.toggleGrouping=()=>{i.setGrouping(e=>e!=null&&e.includes(t.id)?e.filter(n=>n!==t.id):[...e??[],t.id])},t.getCanGroup=()=>t.columnDef.enableGrouping??!0??i.options.enableGrouping??!0??!!t.accessorFn,t.getIsGrouped=()=>{var e;return(e=i.getState().grouping)==null?void 0:e.includes(t.id)},t.getGroupedIndex=()=>{var e;return(e=i.getState().grouping)==null?void 0:e.indexOf(t.id)},t.getToggleGroupingHandler=()=>{let e=t.getCanGroup();return()=>{e&&t.toggleGrouping()}},t.getAutoAggregationFn=()=>{let e=i.getCoreRowModel().flatRows[0],n=e?.getValue(t.id);if(typeof n=="number")return Gf.sum;if(Object.prototype.toString.call(n)==="[object Date]")return Gf.extent},t.getAggregationFn=()=>{var e;if(!t)throw new Error;return Gp(t.columnDef.aggregationFn)?t.columnDef.aggregationFn:t.columnDef.aggregationFn==="auto"?t.getAutoAggregationFn():((e=i.options.aggregationFns)==null?void 0:e[t.columnDef.aggregationFn])??Gf[t.columnDef.aggregationFn]}},createRow:(t,i)=>{t.getIsGrouped=()=>!!t.groupingColumnId,t.getGroupingValue=e=>{if(t._groupingValuesCache.hasOwnProperty(e))return t._groupingValuesCache[e];let n=i.getColumn(e);return n!=null&&n.columnDef.getGroupingValue?(t._groupingValuesCache[e]=n.columnDef.getGroupingValue(t.original),t._groupingValuesCache[e]):t.getValue(e)},t._groupingValuesCache={}},createTable:t=>{t.setGrouping=i=>{var e,n;return(n=(e=t.options).onGroupingChange)==null?void 0:n.call(e,i)},t.resetGrouping=i=>{var e;t.setGrouping(i?[]:((e=t.initialState)==null?void 0:e.grouping)??[])},t.getPreGroupedRowModel=()=>t.getFilteredRowModel(),t.getGroupedRowModel=()=>(!t._getGroupedRowModel&&t.options.getGroupedRowModel&&(t._getGroupedRowModel=t.options.getGroupedRowModel(t)),t.options.manualGrouping||!t._getGroupedRowModel?t.getPreGroupedRowModel():t._getGroupedRowModel())},getDefaultColumnDef:()=>({aggregatedCell:t=>{var i,e;return((e=(i=t.getValue())==null?void 0:i.toString)==null?void 0:e.call(i))??null},aggregationFn:"auto"}),getDefaultOptions:t=>({groupedColumnMode:"reorder",onGroupingChange:Zi("grouping",t)}),getInitialState:t=>E({grouping:[]},t)};function JB(t,i,e){if(!(i!=null&&i.length)||!e)return t;let n=t.filter(o=>!i.includes(o.id));return e==="remove"?n:[...i.map(o=>t.find(r=>r.id===o)).filter(Boolean),...n]}var eH={createTable:t=>{t.setColumnOrder=i=>{var e,n;return(n=(e=t.options).onColumnOrderChange)==null?void 0:n.call(e,i)},t.resetColumnOrder=i=>{t.setColumnOrder(i?[]:t.initialState.columnOrder??[])},t._getOrderColumnsFn=De(()=>[t.getState().columnOrder,t.getState().grouping,t.options.groupedColumnMode],(i,e,n)=>o=>{let r=[];if(!(i!=null&&i.length))r=o;else{let s=[...i],a=[...o];for(;a.length&&s.length;){let l=s.shift(),c=a.findIndex(d=>d.id===l);c>-1&&r.push(a.splice(c,1)[0])}r=[...r,...a]}return JB(r,e,n)},{key:!1})},getDefaultOptions:t=>({onColumnOrderChange:Zi("columnOrder",t)}),getInitialState:t=>E({columnOrder:[]},t)},Kf=0,Zf=10,$f=()=>({pageIndex:Kf,pageSize:Zf}),tH={createTable:t=>{let i=!1,e=!1;t._autoResetPageIndex=()=>{if(!i){t._queue(()=>{i=!0});return}if(t.options.autoResetAll??t.options.autoResetPageIndex??!t.options.manualPagination){if(e)return;e=!0,t._queue(()=>{t.resetPageIndex(),e=!1})}},t.setPagination=n=>{var o,r;let s=a=>hr(n,a);return(r=(o=t.options).onPaginationChange)==null?void 0:r.call(o,s)},t.resetPagination=n=>{t.setPagination(n?$f():t.initialState.pagination??$f())},t.setPageIndex=n=>{t.setPagination(o=>{let r=hr(n,o.pageIndex),s=typeof t.options.pageCount>"u"||t.options.pageCount===-1?Number.MAX_SAFE_INTEGER:t.options.pageCount-1;return r=Math.max(0,Math.min(r,s)),ee(E({},o),{pageIndex:r})})},t.resetPageIndex=n=>{var o,r;t.setPageIndex(n?Kf:((r=(o=t.initialState)==null?void 0:o.pagination)==null?void 0:r.pageIndex)??Kf)},t.resetPageSize=n=>{var o,r;t.setPageSize(n?Zf:((r=(o=t.initialState)==null?void 0:o.pagination)==null?void 0:r.pageSize)??Zf)},t.setPageSize=n=>{t.setPagination(o=>{let r=Math.max(1,hr(n,o.pageSize)),s=o.pageSize*o.pageIndex,a=Math.floor(s/r);return ee(E({},o),{pageIndex:a,pageSize:r})})},t.setPageCount=n=>t.setPagination(o=>{let r=hr(n,t.options.pageCount??-1);return typeof r=="number"&&(r=Math.max(-1,r)),ee(E({},o),{pageCount:r})}),t.getPageOptions=De(()=>[t.getPageCount()],n=>{let o=[];return n&&n>0&&(o=[...new Array(n)].fill(null).map((r,s)=>s)),o},{debug:()=>t.options.debugAll??t.options.debugTable,key:!1}),t.getCanPreviousPage=()=>t.getState().pagination.pageIndex>0,t.getCanNextPage=()=>{let{pageIndex:n}=t.getState().pagination,o=t.getPageCount();return o===-1?!0:o===0?!1:n<o-1},t.previousPage=()=>t.setPageIndex(n=>n-1),t.nextPage=()=>t.setPageIndex(n=>n+1),t.getPrePaginationRowModel=()=>t.getExpandedRowModel(),t.getPaginationRowModel=()=>(!t._getPaginationRowModel&&t.options.getPaginationRowModel&&(t._getPaginationRowModel=t.options.getPaginationRowModel(t)),t.options.manualPagination||!t._getPaginationRowModel?t.getPrePaginationRowModel():t._getPaginationRowModel()),t.getPageCount=()=>t.options.pageCount??Math.ceil(t.getPrePaginationRowModel().rows.length/t.getState().pagination.pageSize)},getDefaultOptions:t=>({onPaginationChange:Zi("pagination",t)}),getInitialState:t=>ee(E({},t),{pagination:E(E({},$f()),t?.pagination)})},Uf=()=>({left:[],right:[]}),Wf=()=>({bottom:[],includeLeafRows:!1,includeParentRows:!1,top:[]}),iH={createColumn:(t,i)=>{t.pin=e=>{let n=t.getLeafColumns().map(o=>o.id).filter(Boolean);i.setColumnPinning(o=>e==="right"?{left:(o?.left??[]).filter(r=>!(n!=null&&n.includes(r))),right:[...(o?.right??[]).filter(r=>!(n!=null&&n.includes(r))),...n]}:e==="left"?{left:[...(o?.left??[]).filter(r=>!(n!=null&&n.includes(r))),...n],right:(o?.right??[]).filter(r=>!(n!=null&&n.includes(r)))}:{left:(o?.left??[]).filter(r=>!(n!=null&&n.includes(r))),right:(o?.right??[]).filter(r=>!(n!=null&&n.includes(r)))})},t.getCanPin=()=>t.getLeafColumns().some(e=>(e.columnDef.enablePinning??!0)&&(i.options.enableColumnPinning??i.options.enablePinning??!0)),t.getIsPinned=()=>Qf(t,i),t.getIsPinnedLeft=()=>Qf(t,i)==="left",t.getIsPinnedRight=()=>Qf(t,i)==="right",t.getPinnedIndex=()=>{var e,n;let o=t.getIsPinned();return o?((n=(e=i.getState().columnPinning)==null?void 0:e[o])==null?void 0:n.indexOf(t.id))??-1:0}},createRow:(t,i)=>{t.pin=(e,n,o)=>{let r=n||i.options.includeLeafRows?t.getLeafRows().map(({id:l})=>l):[],s=o||i.options.includeParentRows?t.getParentRows().map(({id:l})=>l):[],a=new Set([...s,t.id,...r]);i.setRowPinning(l=>e==="bottom"?ee(E({},l),{bottom:[...(l?.bottom??[]).filter(c=>!(a!=null&&a.has(c))),...Array.from(a)],top:(l?.top??[]).filter(c=>!(a!=null&&a.has(c)))}):e==="top"?ee(E({},l),{bottom:(l?.bottom??[]).filter(c=>!(a!=null&&a.has(c))),top:[...(l?.top??[]).filter(c=>!(a!=null&&a.has(c))),...Array.from(a)]}):ee(E({},l),{bottom:(l?.bottom??[]).filter(c=>!(a!=null&&a.has(c))),top:(l?.top??[]).filter(c=>!(a!=null&&a.has(c)))}))},t.getCanPin=()=>{let{enablePinning:e,enableRowPinning:n}=i.options;return typeof n=="function"?n(t):n??e??!0},t.getIsPinned=()=>Yf(t,i),t.getIsPinnedBottom=()=>Yf(t,i)==="bottom",t.getIsPinnedTop=()=>Yf(t,i)==="top",t.getPinnedIndex=()=>{var e;let n=t.getIsPinned();if(!n)return-1;let o=(e=i._getPinnedRows(n))==null?void 0:e.map(({id:r})=>r);return o?.indexOf(t.id)??-1},t.getCenterVisibleCells=De(()=>[t._getAllVisibleCells(),i.getState().columnPinning.left,i.getState().columnPinning.right],(e,n,o)=>{let r=[...n??[],...o??[]];return e.filter(s=>!r.includes(s.column.id))},{debug:()=>i.options.debugAll??i.options.debugRows,key:!1}),t.getLeftVisibleCells=De(()=>[t._getAllVisibleCells(),i.getState().columnPinning.left,,],(e,n)=>(n??[]).map(o=>e.find(r=>r.column.id===o)).filter(Boolean).map(o=>ee(E({},o),{position:"left"})),{debug:()=>i.options.debugAll??i.options.debugRows,key:!1}),t.getRightVisibleCells=De(()=>[t._getAllVisibleCells(),i.getState().columnPinning.right],(e,n)=>(n??[]).map(o=>e.find(r=>r.column.id===o)).filter(Boolean).map(o=>ee(E({},o),{position:"right"})),{debug:()=>i.options.debugAll??i.options.debugRows,key:!1})},createTable:t=>{t.setColumnPinning=i=>{var e,n;return(n=(e=t.options).onColumnPinningChange)==null?void 0:n.call(e,i)},t.resetColumnPinning=i=>{var e;return t.setColumnPinning(i?Uf():((e=t.initialState)==null?void 0:e.columnPinning)??Uf())},t.getIsSomeColumnsPinned=i=>{var e,n,o;let r=t.getState().columnPinning;return i?!!((o=r[i])!=null&&o.length):!!((e=r.left)!=null&&e.length||(n=r.right)!=null&&n.length)},t.getLeftLeafColumns=De(()=>[t.getAllLeafColumns(),t.getState().columnPinning.left],(i,e)=>(e??[]).map(n=>i.find(o=>o.id===n)).filter(Boolean),{debug:()=>t.options.debugAll??t.options.debugColumns,key:!1}),t.getRightLeafColumns=De(()=>[t.getAllLeafColumns(),t.getState().columnPinning.right],(i,e)=>(e??[]).map(n=>i.find(o=>o.id===n)).filter(Boolean),{debug:()=>t.options.debugAll??t.options.debugColumns,key:!1}),t.getCenterLeafColumns=De(()=>[t.getAllLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right],(i,e,n)=>{let o=[...e??[],...n??[]];return i.filter(r=>!o.includes(r.id))},{debug:()=>t.options.debugAll??t.options.debugColumns,key:!1}),t.setRowPinning=i=>{var e,n;return(n=(e=t.options).onRowPinningChange)==null?void 0:n.call(e,i)},t.resetRowPinning=i=>{var e;return t.setRowPinning(i?Wf():((e=t.initialState)==null?void 0:e.rowPinning)??Wf())},t.getIsSomeRowsPinned=i=>{var e,n,o;let r=t.getState().rowPinning;return i?!!((o=r[i])!=null&&o.length):!!((e=r.top)!=null&&e.length||(n=r.bottom)!=null&&n.length)},t._getPinnedRows=i=>De(()=>[t.getRowModel().rows,t.getState().rowPinning[i]],(e,n)=>(t.options.keepPinnedRows??!0?(n??[]).map(o=>{let r=t.getRow(o,!0);return r.getIsAllParentsExpanded()?r:null}):(n??[]).map(o=>e.find(r=>r.id===o))).filter(Boolean).map(o=>ee(E({},o),{position:i})),{debug:()=>t.options.debugAll??t.options.debugRows,key:!1})(),t.getTopRows=()=>t._getPinnedRows("top"),t.getBottomRows=()=>t._getPinnedRows("bottom"),t.getCenterRows=De(()=>[t.getRowModel().rows,t.getState().rowPinning.top,t.getState().rowPinning.bottom],(i,e,n)=>{let o=new Set([...e??[],...n??[]]);return i.filter(r=>!o.has(r.id))},{debug:()=>t.options.debugAll??t.options.debugRows,key:!1})},getDefaultOptions:t=>({onColumnPinningChange:Zi("columnPinning",t),onRowPinningChange:Zi("rowPinning",t)}),getInitialState:t=>E({columnPinning:Uf(),rowPinning:Wf()},t)};function Qf(t,i){let e=t.getLeafColumns().map(a=>a.id),{left:n,right:o}=i.getState().columnPinning,r=e.some(a=>n?.includes(a)),s=e.some(a=>o?.includes(a));return r?"left":s?"right":!1}function Yf(t,i){let e=[t.id],{bottom:n,top:o}=i.getState().rowPinning,r=e.some(a=>o?.includes(a)),s=e.some(a=>n?.includes(a));return r?"top":s?"bottom":!1}var nH={createRow:(t,i)=>{t.toggleSelected=(e,n)=>{let o=t.getIsSelected();i.setRowSelection(r=>{if(e=typeof e<"u"?e:!o,t.getCanSelect()&&o===e)return r;let s=E({},r);return Nl(s,t.id,e,n?.selectChildren??!0,i),fE(t,s,i)})},t.getIsSelected=()=>{let{rowSelection:e}=i.getState();return Up(t,e)},t.getIsSomeSelected=()=>{let{rowSelection:e}=i.getState();return $p(t,e)==="some"},t.getIsAllSubRowsSelected=()=>{let{rowSelection:e}=i.getState();return $p(t,e)==="all"},t.getCanSelect=()=>typeof i.options.enableRowSelection=="function"?i.options.enableRowSelection(t):i.options.enableRowSelection??!0,t.getCanSelectSubRows=()=>typeof i.options.enableSubRowSelection=="function"?i.options.enableSubRowSelection(t):i.options.enableSubRowSelection??!0,t.getCanMultiSelect=()=>typeof i.options.enableMultiRowSelection=="function"?i.options.enableMultiRowSelection(t):i.options.enableMultiRowSelection??!0,t.getToggleSelectedHandler=()=>{let e=t.getCanSelect();return n=>{var o;e&&t.toggleSelected((o=n.target)==null?void 0:o.checked)}}},createTable:t=>{t.setRowSelection=i=>{var e,n;return(n=(e=t.options).onRowSelectionChange)==null?void 0:n.call(e,i)},t.resetRowSelection=i=>t.setRowSelection(i?{}:t.initialState.rowSelection??{}),t.toggleAllRowsSelected=i=>{t.setRowSelection(e=>{i=typeof i<"u"?i:!t.getIsAllRowsSelected();let n=E({},e),o=t.getPreGroupedRowModel().flatRows;return i?o.forEach(r=>{r.getCanSelect()&&(n[r.id]=!0)}):o.forEach(r=>{delete n[r.id]}),n})},t.toggleAllPageRowsSelected=i=>t.setRowSelection(e=>{let n=typeof i<"u"?i:!t.getIsAllPageRowsSelected(),o=E({},e);return t.getRowModel().rows.forEach(r=>{Nl(o,r.id,n,!0,t)}),o}),t.getPreSelectedRowModel=()=>t.getCoreRowModel(),t.getSelectedRowModel=De(()=>[t.getState().rowSelection,t.getCoreRowModel()],(i,e)=>Object.keys(i).length?Xf(t,e):{flatRows:[],rows:[],rowsById:{}},{debug:()=>t.options.debugAll??t.options.debugTable,key:!1}),t.getFilteredSelectedRowModel=De(()=>[t.getState().rowSelection,t.getFilteredRowModel()],(i,e)=>Object.keys(i).length?Xf(t,e):{flatRows:[],rows:[],rowsById:{}},{debug:()=>t.options.debugAll??t.options.debugTable,key:"getFilteredSelectedRowModel"}),t.getGroupedSelectedRowModel=De(()=>[t.getState().rowSelection,t.getSortedRowModel()],(i,e)=>Object.keys(i).length?Xf(t,e):{flatRows:[],rows:[],rowsById:{}},{debug:()=>t.options.debugAll??t.options.debugTable,key:"getGroupedSelectedRowModel"}),t.getIsAllRowsSelected=()=>{let i=t.getFilteredRowModel().flatRows,{rowSelection:e}=t.getState(),n=!!(i.length&&Object.keys(e).length);return n&&i.some(o=>o.getCanSelect()&&!e[o.id])&&(n=!1),n},t.getIsAllPageRowsSelected=()=>{let i=t.getPaginationRowModel().flatRows.filter(o=>o.getCanSelect()),{rowSelection:e}=t.getState(),n=!!i.length;return n&&i.some(o=>!e[o.id])&&(n=!1),n},t.getIsSomeRowsSelected=()=>{let i=Object.keys(t.getState().rowSelection??{}).length;return i>0&&i<t.getFilteredRowModel().flatRows.length},t.getIsSomePageRowsSelected=()=>{let i=t.getPaginationRowModel().flatRows;return t.getIsAllPageRowsSelected()?!1:i.filter(e=>e.getCanSelect()).some(e=>e.getIsSelected()||e.getIsSomeSelected())},t.getToggleAllRowsSelectedHandler=()=>i=>{t.toggleAllRowsSelected(i.target.checked)},t.getToggleAllPageRowsSelectedHandler=()=>i=>{t.toggleAllPageRowsSelected(i.target.checked)}},getDefaultOptions:t=>({enableMultiRowSelection:!0,enableRowSelection:!0,enableSubRowSelection:!0,onRowSelectionChange:Zi("rowSelection",t)}),getInitialState:t=>E({rowSelection:{}},t)},Nl=(t,i,e,n,o)=>{var r;let s=o.getRow(i,!0);e?(s.getCanMultiSelect()||Object.keys(t).forEach(a=>delete t[a]),s.getCanSelect()&&(t[i]=!0)):delete t[i],n&&(r=s.subRows)!=null&&r.length&&s.getCanSelectSubRows()&&s.subRows.forEach(a=>Nl(t,a.id,e,n,o))};function Xf(t,i){let e=t.getState().rowSelection,n=[],o={},r=(s,a=0)=>s.map(l=>{var c;let d=Up(l,e);if(d&&(n.push(l),o[l.id]=l),(c=l.subRows)!=null&&c.length&&(l=ee(E({},l),{subRows:r(l.subRows,a+1)})),d)return l}).filter(Boolean);return{flatRows:n,rows:r(i.rows),rowsById:o}}function fE(t,i,e){let n=t.getParentRow();if(!n)return i;let o=Up(n,i),r=$p(n,i)==="all";return r&&!o?Nl(i,n.id,!0,!1,e):!r&&o&&Nl(i,n.id,!1,!1,e),fE(n,i,e)}function Up(t,i){return i[t.id]??!1}function $p(t,i,e){var n;if(!((n=t.subRows)!=null&&n.length))return!1;let o=!0,r=!1;return t.subRows.forEach(s=>{if(!(r&&!o)&&(s.getCanSelect()&&(Up(s,i)?r=!0:o=!1),s.subRows&&s.subRows.length)){let a=$p(s,i);a==="all"?r=!0:(a==="some"&&(r=!0),o=!1)}}),o?"all":r?"some":!1}var Jf=/([0-9]+)/gm,oH=(t,i,e)=>gE(ur(t.getValue(e)).toLowerCase(),ur(i.getValue(e)).toLowerCase()),rH=(t,i,e)=>gE(ur(t.getValue(e)),ur(i.getValue(e))),sH=(t,i,e)=>tg(ur(t.getValue(e)).toLowerCase(),ur(i.getValue(e)).toLowerCase()),aH=(t,i,e)=>tg(ur(t.getValue(e)),ur(i.getValue(e))),lH=(t,i,e)=>{let n=t.getValue(e),o=i.getValue(e);return n>o?1:n<o?-1:0},cH=(t,i,e)=>tg(t.getValue(e),i.getValue(e));function tg(t,i){return t===i?0:t>i?1:-1}function ur(t){return typeof t=="number"?isNaN(t)||t===1/0||t===-1/0?"":String(t):typeof t=="string"?t:""}function gE(t,i){let e=t.split(Jf).filter(Boolean),n=i.split(Jf).filter(Boolean);for(;e.length&&n.length;){let o=e.shift(),r=n.shift(),s=parseInt(o,10),a=parseInt(r,10),l=[s,a].sort();if(isNaN(l[0])){if(o>r)return 1;if(r>o)return-1;continue}if(isNaN(l[1]))return isNaN(s)?-1:1;if(s>a)return 1;if(a>s)return-1}return e.length-n.length}var kl={alphanumeric:oH,alphanumericCaseSensitive:rH,basic:cH,datetime:lH,text:sH,textCaseSensitive:aH},dH={createColumn:(t,i)=>{t.getAutoSortingFn=()=>{let e=i.getFilteredRowModel().flatRows.slice(10),n=!1;for(let o of e){let r=o?.getValue(t.id);if(Object.prototype.toString.call(r)==="[object Date]")return kl.datetime;if(typeof r=="string"&&(n=!0,r.split(Jf).length>1))return kl.alphanumeric}return n?kl.text:kl.basic},t.getAutoSortDir=()=>{let e=i.getFilteredRowModel().flatRows[0];return typeof e?.getValue(t.id)=="string"?"asc":"desc"},t.getSortingFn=()=>{var e;if(!t)throw new Error;return Gp(t.columnDef.sortingFn)?t.columnDef.sortingFn:t.columnDef.sortingFn==="auto"?t.getAutoSortingFn():((e=i.options.sortingFns)==null?void 0:e[t.columnDef.sortingFn])??kl[t.columnDef.sortingFn]},t.toggleSorting=(e,n)=>{let o=t.getNextSortingOrder(),r=typeof e<"u"&&e!==null;i.setSorting(s=>{let a=s?.find(h=>h.id===t.id),l=s?.findIndex(h=>h.id===t.id),c=[],d,p=r?e:o==="desc";return s!=null&&s.length&&t.getCanMultiSort()&&n?a?d="toggle":d="add":s!=null&&s.length&&l!==s.length-1?d="replace":a?d="toggle":d="replace",d==="toggle"&&(r||o||(d="remove")),d==="add"?(c=[...s,{desc:p,id:t.id}],c.splice(0,c.length-(i.options.maxMultiSortColCount??Number.MAX_SAFE_INTEGER))):d==="toggle"?c=s.map(h=>h.id===t.id?ee(E({},h),{desc:p}):h):d==="remove"?c=s.filter(h=>h.id!==t.id):c=[{desc:p,id:t.id}],c})},t.getFirstSortDir=()=>t.columnDef.sortDescFirst??i.options.sortDescFirst??t.getAutoSortDir()==="desc"?"desc":"asc",t.getNextSortingOrder=e=>{let n=t.getFirstSortDir(),o=t.getIsSorted();return o?o!==n&&(i.options.enableSortingRemoval??!0)&&(!e||(i.options.enableMultiRemove??!0))?!1:o==="desc"?"asc":"desc":n},t.getCanSort=()=>(t.columnDef.enableSorting??!0)&&(i.options.enableSorting??!0)&&!!t.accessorFn,t.getCanMultiSort=()=>t.columnDef.enableMultiSort??i.options.enableMultiSort??!!t.accessorFn,t.getIsSorted=()=>{var e;let n=(e=i.getState().sorting)==null?void 0:e.find(o=>o.id===t.id);return n?n.desc?"desc":"asc":!1},t.getSortIndex=()=>{var e;return((e=i.getState().sorting)==null?void 0:e.findIndex(n=>n.id===t.id))??-1},t.clearSorting=()=>{i.setSorting(e=>e!=null&&e.length?e.filter(n=>n.id!==t.id):[])},t.getToggleSortingHandler=()=>{let e=t.getCanSort();return n=>{var o,r,s,a;e&&((o=n.persist)==null||o.call(n),(a=t.toggleSorting)==null||a.call(t,void 0,t.getCanMultiSort()?(s=(r=i.options).isMultiSortEvent)==null?void 0:s.call(r,n):!1))}}},createTable:t=>{t.setSorting=i=>{var e,n;return(n=(e=t.options).onSortingChange)==null?void 0:n.call(e,i)},t.resetSorting=i=>{var e;t.setSorting(i?[]:((e=t.initialState)==null?void 0:e.sorting)??[])},t.getPreSortedRowModel=()=>t.getGroupedRowModel(),t.getSortedRowModel=()=>(!t._getSortedRowModel&&t.options.getSortedRowModel&&(t._getSortedRowModel=t.options.getSortedRowModel(t)),t.options.manualSorting||!t._getSortedRowModel?t.getPreSortedRowModel():t._getSortedRowModel())},getDefaultColumnDef:()=>({sortUndefined:1,sortingFn:"auto"}),getDefaultOptions:t=>({isMultiSortEvent:i=>i.shiftKey,onSortingChange:Zi("sorting",t)}),getInitialState:t=>E({sorting:[]},t)},pH={createColumn:(t,i)=>{t.toggleVisibility=e=>{t.getCanHide()&&i.setColumnVisibility(n=>ee(E({},n),{[t.id]:e??!t.getIsVisible()}))},t.getIsVisible=()=>{var e;return((e=i.getState().columnVisibility)==null?void 0:e[t.id])??!0},t.getCanHide=()=>(t.columnDef.enableHiding??!0)&&(i.options.enableHiding??!0),t.getToggleVisibilityHandler=()=>e=>{var n;(n=t.toggleVisibility)==null||n.call(t,e.target.checked)}},createRow:(t,i)=>{t._getAllVisibleCells=De(()=>[t.getAllCells(),i.getState().columnVisibility],e=>e.filter(n=>n.column.getIsVisible()),{debug:()=>i.options.debugAll??i.options.debugRows,key:"row._getAllVisibleCells"}),t.getVisibleCells=De(()=>[t.getLeftVisibleCells(),t.getCenterVisibleCells(),t.getRightVisibleCells()],(e,n,o)=>[...e,...n,...o],{debug:()=>i.options.debugAll??i.options.debugRows,key:!1})},createTable:t=>{let i=(e,n)=>De(()=>[n(),n().filter(o=>o.getIsVisible()).map(o=>o.id).join("_")],o=>o.filter(r=>{var s;return(s=r.getIsVisible)==null?void 0:s.call(r)}),{debug:()=>t.options.debugAll??t.options.debugColumns,key:e});t.getVisibleFlatColumns=i("getVisibleFlatColumns",()=>t.getAllFlatColumns()),t.getVisibleLeafColumns=i("getVisibleLeafColumns",()=>t.getAllLeafColumns()),t.getLeftVisibleLeafColumns=i("getLeftVisibleLeafColumns",()=>t.getLeftLeafColumns()),t.getRightVisibleLeafColumns=i("getRightVisibleLeafColumns",()=>t.getRightLeafColumns()),t.getCenterVisibleLeafColumns=i("getCenterVisibleLeafColumns",()=>t.getCenterLeafColumns()),t.setColumnVisibility=e=>{var n,o;return(o=(n=t.options).onColumnVisibilityChange)==null?void 0:o.call(n,e)},t.resetColumnVisibility=e=>{t.setColumnVisibility(e?{}:t.initialState.columnVisibility??{})},t.toggleAllColumnsVisible=e=>{e=e??!t.getIsAllColumnsVisible(),t.setColumnVisibility(t.getAllLeafColumns().reduce((n,o)=>{var r;return ee(E({},n),{[o.id]:e||!((r=o.getCanHide)!=null&&r.call(o))})},{}))},t.getIsAllColumnsVisible=()=>!t.getAllLeafColumns().some(e=>{var n;return!((n=e.getIsVisible)!=null&&n.call(e))}),t.getIsSomeColumnsVisible=()=>t.getAllLeafColumns().some(e=>{var n;return(n=e.getIsVisible)==null?void 0:n.call(e)}),t.getToggleAllColumnsVisibilityHandler=()=>e=>{var n;t.toggleAllColumnsVisible((n=e.target)==null?void 0:n.checked)}},getDefaultOptions:t=>({onColumnVisibilityChange:Zi("columnVisibility",t)}),getInitialState:t=>E({columnVisibility:{}},t)};function hH(t,i,e,n){var o;let r=E(E({},t._getDefaultColumnDef()),i),s=r.accessorKey,a=r.id??(s?s.replace(".","_"):void 0)??(typeof r.header=="string"?r.header:void 0),l;if(r.accessorFn?l=r.accessorFn:s&&(s.includes(".")?l=d=>{let p=d;for(let h of s.split("."))p=p?.[h];return p}:l=d=>d[r.accessorKey]),!a)throw new Error;let c={accessorFn:l,columnDef:r,columns:[],depth:e,getFlatColumns:De(()=>[!0],()=>{var d;return[c,...(d=c.columns)==null?void 0:d.flatMap(p=>p.getFlatColumns())]},{debug:()=>t.options.debugAll??t.options.debugColumns,key:"column.getFlatColumns"}),getLeafColumns:De(()=>[t._getOrderColumnsFn()],d=>{var p;if((p=c.columns)!=null&&p.length){let h=c.columns.flatMap(m=>m.getLeafColumns());return d(h)}return[c]},{debug:()=>t.options.debugAll??t.options.debugColumns,key:"column.getLeafColumns"}),id:`${String(a)}`,parent:n};for(let d of t._features)(o=d.createColumn)==null||o.call(d,c,t);return c}function rE(t,i,e){let n=e.id??i.id,o={colSpan:0,column:i,depth:e.depth,getContext:()=>({column:i,header:o,table:t}),getLeafHeaders:()=>{let r=[],s=a=>{a.subHeaders&&a.subHeaders.length&&a.subHeaders.map(s),r.push(a)};return s(o),r},headerGroup:null,id:n,index:e.index,isPlaceholder:!!e.isPlaceholder,placeholderId:e.placeholderId,rowSpan:0,subHeaders:[]};return t._features.forEach(r=>{var s;(s=r.createHeader)==null||s.call(r,o,t)}),o}var uH={createTable:t=>{t.getHeaderGroups=De(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right],(i,e,n,o)=>{let r=n?.map(l=>e.find(c=>c.id===l)).filter(Boolean)??[],s=o?.map(l=>e.find(c=>c.id===l)).filter(Boolean)??[],a=e.filter(l=>!(n!=null&&n.includes(l.id))&&!(o!=null&&o.includes(l.id)));return zp(i,[...r,...a,...s],t)},{debug:()=>t.options.debugAll??t.options.debugHeaders,key:!1}),t.getCenterHeaderGroups=De(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right],(i,e,n,o)=>(e=e.filter(r=>!(n!=null&&n.includes(r.id))&&!(o!=null&&o.includes(r.id))),zp(i,e,t,"center")),{debug:()=>t.options.debugAll??t.options.debugHeaders,key:!1}),t.getLeftHeaderGroups=De(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left],(i,e,n)=>{let o=n?.map(r=>e.find(s=>s.id===r)).filter(Boolean)??[];return zp(i,o,t,"left")},{debug:()=>t.options.debugAll??t.options.debugHeaders,key:!1}),t.getRightHeaderGroups=De(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.right],(i,e,n)=>{let o=n?.map(r=>e.find(s=>s.id===r)).filter(Boolean)??[];return zp(i,o,t,"right")},{debug:()=>t.options.debugAll??t.options.debugHeaders,key:!1}),t.getFooterGroups=De(()=>[t.getHeaderGroups()],i=>[...i].reverse(),{debug:()=>t.options.debugAll??t.options.debugHeaders,key:!1}),t.getLeftFooterGroups=De(()=>[t.getLeftHeaderGroups()],i=>[...i].reverse(),{debug:()=>t.options.debugAll??t.options.debugHeaders,key:!1}),t.getCenterFooterGroups=De(()=>[t.getCenterHeaderGroups()],i=>[...i].reverse(),{debug:()=>t.options.debugAll??t.options.debugHeaders,key:!1}),t.getRightFooterGroups=De(()=>[t.getRightHeaderGroups()],i=>[...i].reverse(),{debug:()=>t.options.debugAll??t.options.debugHeaders,key:!1}),t.getFlatHeaders=De(()=>[t.getHeaderGroups()],i=>i.map(e=>e.headers).flat(),{debug:()=>t.options.debugAll??t.options.debugHeaders,key:!1}),t.getLeftFlatHeaders=De(()=>[t.getLeftHeaderGroups()],i=>i.map(e=>e.headers).flat(),{debug:()=>t.options.debugAll??t.options.debugHeaders,key:!1}),t.getCenterFlatHeaders=De(()=>[t.getCenterHeaderGroups()],i=>i.map(e=>e.headers).flat(),{debug:()=>t.options.debugAll??t.options.debugHeaders,key:!1}),t.getRightFlatHeaders=De(()=>[t.getRightHeaderGroups()],i=>i.map(e=>e.headers).flat(),{debug:()=>t.options.debugAll??t.options.debugHeaders,key:!1}),t.getCenterLeafHeaders=De(()=>[t.getCenterFlatHeaders()],i=>i.filter(e=>{var n;return!((n=e.subHeaders)!=null&&n.length)}),{debug:()=>t.options.debugAll??t.options.debugHeaders,key:!1}),t.getLeftLeafHeaders=De(()=>[t.getLeftFlatHeaders()],i=>i.filter(e=>{var n;return!((n=e.subHeaders)!=null&&n.length)}),{debug:()=>t.options.debugAll??t.options.debugHeaders,key:!1}),t.getRightLeafHeaders=De(()=>[t.getRightFlatHeaders()],i=>i.filter(e=>{var n;return!((n=e.subHeaders)!=null&&n.length)}),{debug:()=>t.options.debugAll??t.options.debugHeaders,key:!1}),t.getLeafHeaders=De(()=>[t.getLeftHeaderGroups(),t.getCenterHeaderGroups(),t.getRightHeaderGroups()],(i,e,n)=>{var o,r,s;return[...((o=i[0])==null?void 0:o.headers)??[],...((r=e[0])==null?void 0:r.headers)??[],...((s=n[0])==null?void 0:s.headers)??[]].map(a=>a.getLeafHeaders()).flat()},{debug:()=>t.options.debugAll??t.options.debugHeaders,key:!1})}};function zp(t,i,e,n){var o;let r=0,s=(p,h=1)=>{r=Math.max(r,h),p.filter(m=>m.getIsVisible()).forEach(m=>{var S;(S=m.columns)!=null&&S.length&&s(m.columns,h+1)},0)};s(t);let a=[],l=(p,h)=>{let m={depth:h,headers:[],id:[n,`${h}`].filter(Boolean).join("_")},S=[];p.forEach(y=>{let w=[...S].reverse()[0],x=y.column.depth===m.depth,N,k=!1;if(x&&y.column.parent?N=y.column.parent:(N=y.column,k=!0),w&&w?.column===N)w.subHeaders.push(y);else{let C=rE(e,N,{depth:h,id:[n,h,N.id,y?.id].filter(Boolean).join("_"),index:S.length,isPlaceholder:k,placeholderId:k?`${S.filter(Q=>Q.column===N).length}`:void 0});C.subHeaders.push(y),S.push(C)}m.headers.push(y),y.headerGroup=m}),a.push(m),h>0&&l(S,h-1)},c=i.map((p,h)=>rE(e,p,{depth:r,index:h}));l(c,r-1),a.reverse();let d=p=>p.filter(h=>h.column.getIsVisible()).map(h=>{let m=0,S=0,y=[0];h.subHeaders&&h.subHeaders.length?(y=[],d(h.subHeaders).forEach(({colSpan:x,rowSpan:N})=>{m+=x,y.push(N)})):m=1;let w=Math.min(...y);return S=S+w,h.colSpan=m,h.rowSpan=S,{colSpan:m,rowSpan:S}});return d(((o=a[0])==null?void 0:o.headers)??[]),a}var sE=[uH,pH,eH,iH,qB,dH,ZB,jB,tH,nH,BB];function _E(t){var i;(t.debugAll||t.debugTable)&&console.info("Creating Table Instance...");let e={_features:sE},n=e._features.reduce((c,d)=>{var p;return Object.assign(c,(p=d.getDefaultOptions)==null?void 0:p.call(d,e))},{}),o=c=>e.options.mergeOptions?e.options.mergeOptions(n,c):E(E({},n),c),r=E({},t.initialState??{});e._features.forEach(c=>{var d;r=((d=c.getInitialState)==null?void 0:d.call(c,r))??r});let s=[],a=!1,l={_features:sE,_getAllFlatColumnsById:De(()=>[e.getAllFlatColumns()],c=>c.reduce((d,p)=>(d[p.id]=p,d),{}),{debug:()=>e.options.debugAll??e.options.debugColumns,key:!1}),_getColumnDefs:()=>e.options.columns,_getDefaultColumnDef:De(()=>[e.options.defaultColumn],c=>(c=c??{},E(E({cell:d=>d.getValue(),header:d=>{let p=d.header.column.columnDef;return p.accessorKey?p.accessorKey:p.accessorFn?p.id:null}},e._features.reduce((d,p)=>{var h;return Object.assign(d,(h=p.getDefaultColumnDef)==null?void 0:h.call(p))},{})),c)),{debug:()=>e.options.debugAll??e.options.debugColumns,key:!1}),_getRowId:(c,d,p)=>{var h,m;return((m=(h=e.options).getRowId)==null?void 0:m.call(h,c,d,p))??`${p?[p.id,d].join("."):d}`},_queue:c=>{s.push(c),a||(a=!0,Promise.resolve().then(()=>{for(;s.length;)s.shift()();a=!1}).catch(d=>setTimeout(()=>{throw d})))},getAllColumns:De(()=>[e._getColumnDefs()],c=>{let d=(p,h,m=0)=>p.map(S=>{let y=hH(e,S,m,h),w=S;return y.columns=w.columns?d(w.columns,y,m+1):[],y});return d(c)},{debug:()=>e.options.debugAll??e.options.debugColumns,key:!1}),getAllFlatColumns:De(()=>[e.getAllColumns()],c=>c.flatMap(d=>d.getFlatColumns()),{debug:()=>e.options.debugAll??e.options.debugColumns,key:!1}),getAllLeafColumns:De(()=>[e.getAllColumns(),e._getOrderColumnsFn()],(c,d)=>{let p=c.flatMap(h=>h.getLeafColumns());return d(p)},{debug:()=>e.options.debugAll??e.options.debugColumns,key:!1}),getColumn:c=>e._getAllFlatColumnsById()[c],getCoreRowModel:()=>{var c,d;return e._getCoreRowModel||(e._getCoreRowModel=(d=(c=e.options)==null?void 0:c.getCoreRowModel)==null?void 0:d.call(c,e)),e._getCoreRowModel()},getRow:(c,d)=>{let p=(d?e.getPrePaginationRowModel():e.getRowModel()).rowsById[c];if(!p&&(p=e.getCoreRowModel().rowsById[c],!p))throw new Error;return p},getRowModel:()=>e.getPaginationRowModel(),getState:()=>e.options.state,initialState:r,options:E(E({},n),t),reset:()=>{e.setState(e.initialState)},setOptions:c=>{let d=hr(c,e.options);e.options=o(d)},setState:c=>{var d,p;(p=(d=e.options).onStateChange)==null||p.call(d,c)},updateOptions:c=>{e.options=E(E({},e.options),c)}};Object.assign(e,l);for(let c=0;c<e._features.length;c++){let d=e._features[c];(i=d?.createTable)==null||i.call(d,e)}return e}function mH(t,i,e,n){let o={column:e,getContext:De(()=>[t,e,i,o],(r,s,a,l)=>({cell:l,column:s,getValue:l.getValue,row:a,table:r}),{debug:()=>t.options.debugAll,key:!1}),getValue:()=>i.getValue(n),id:`${i.id}_${e.id}`,row:i};return t._features.forEach(r=>{var s;(s=r.createCell)==null||s.call(r,o,e,i,t)},{}),o}var ig=(t,i,e,n,o,r,s)=>{var a;let l={_getAllCellsByColumnId:De(()=>[l.getAllCells()],c=>c.reduce((d,p)=>(d[p.column.id]=p,d),{}),{debug:()=>t.options.debugAll??t.options.debugRows,key:"row.getAllCellsByColumnId"}),_uniqueValuesCache:{},_valuesCache:{},depth:o,getAllCells:De(()=>[t.getAllLeafColumns()],c=>c.map(d=>mH(t,l,d,d.id)),{debug:()=>t.options.debugAll??t.options.debugRows,key:!1}),getLeafRows:()=>VB(l.subRows,c=>c.subRows),getParentRow:()=>l.parentId?t.getRow(l.parentId,!0):void 0,getParentRows:()=>{let c=[],d=l;for(;;){let p=d.getParentRow();if(!p)break;c.push(p),d=p}return c.reverse()},getUniqueValues:c=>{if(l._uniqueValuesCache.hasOwnProperty(c))return l._uniqueValuesCache[c];let d=t.getColumn(c);if(d!=null&&d.accessorFn)return d.columnDef.getUniqueValues?(l._uniqueValuesCache[c]=d.columnDef.getUniqueValues(l.original,n),l._uniqueValuesCache[c]):(l._uniqueValuesCache[c]=[l.getValue(c)],l._uniqueValuesCache[c])},getValue:c=>{if(l._valuesCache.hasOwnProperty(c))return l._valuesCache[c];let d=t.getColumn(c);if(d!=null&&d.accessorFn)return l._valuesCache[c]=d.accessorFn(l.original,n),l._valuesCache[c]},id:i,index:n,original:e,parentId:s,subRows:r??[]};for(let c=0;c<t._features.length;c++){let d=t._features[c];(a=d?.createRow)==null||a.call(d,l,t)}return l};function fH(t,i,e){return e.options.filterFromLeafRows?gH(t,i,e):_H(t,i,e)}function gH(t,i,e){let n=[],o={},r=e.options.maxLeafRowFilterDepth??100,s=(a,l=0)=>{var c;let d=[];for(let p=0;p<a.length;p++){let h=a[p],m=ig(e,h.id,h.original,h.index,h.depth,void 0,h.parentId);if(m.columnFilters=h.columnFilters,(c=h.subRows)!=null&&c.length&&l<r){if(m.subRows=s(h.subRows,l+1),h=m,i(h)&&!m.subRows.length){d.push(h),o[h.id]=h,n.push(h);continue}if(i(h)||m.subRows.length){d.push(h),o[h.id]=h,n.push(h);continue}}else h=m,i(h)&&(d.push(h),o[h.id]=h,n.push(h))}return d};return{flatRows:n,rows:s(t),rowsById:o}}function _H(t,i,e){let n=[],o={},r=e.options.maxLeafRowFilterDepth??100,s=(a,l=0)=>{var c;let d=[];for(let p=0;p<a.length;p++){let h=a[p];if(i(h)){if((c=h.subRows)!=null&&c.length&&l<r){let m=ig(e,h.id,h.original,h.index,h.depth,void 0,h.parentId);m.subRows=s(h.subRows,l+1),h=m}d.push(h),n.push(h),o[h.id]=h}}return d};return{flatRows:n,rows:s(t),rowsById:o}}function Wp(){return t=>De(()=>[t.options.data],i=>{let e={flatRows:[],rows:[],rowsById:{}},n=(o,r=0,s)=>{let a=[];return o.forEach((l,c)=>{var d;let p=ig(t,t._getRowId(l,c,s),l,c,r,void 0,s?.id);e.flatRows.push(p),e.rowsById[p.id]=p,a.push(p),t.options.getSubRows&&(p.originalSubRows=t.options.getSubRows(l,c),(d=p.originalSubRows)!=null&&d.length&&(p.subRows=n(p.originalSubRows,r+1,p)))}),a};return e.rows=n(i),e},{debug:()=>t.options.debugAll??t.options.debugTable,key:!1,onChange:()=>{t._autoResetPageIndex()}})}function vE(){return t=>De(()=>[t.getState().expanded,t.getPreExpandedRowModel(),t.options.paginateExpandedRows],(i,e,n)=>!e.rows.length||i!==!0&&!Object.keys(i??{}).length||!n?e:bE(e),{debug:()=>t.options.debugAll??t.options.debugTable,key:!1})}function bE(t){let i=[],e=n=>{var o;i.push(n),(o=n.subRows)!=null&&o.length&&n.getIsExpanded()&&n.subRows.forEach(e)};return t.rows.forEach(e),{flatRows:t.flatRows,rows:i,rowsById:t.rowsById}}function yE(){return t=>De(()=>[t.getPreFilteredRowModel(),t.getState().columnFilters,t.getState().globalFilter],(i,e,n)=>{if(!i.rows.length||!(e!=null&&e.length)&&!n){for(let h=0;h<i.flatRows.length;h++)i.flatRows[h].columnFilters={},i.flatRows[h].columnFiltersMeta={};return i}let o=[],r=[];(e??[]).forEach(h=>{var m;let S=t.getColumn(h.id);if(!S)return;let y=S.getFilterFn();y&&o.push({filterFn:y,id:h.id,resolvedValue:((m=y.resolveFilterValue)==null?void 0:m.call(y,h.value))??h.value})});let s=e.map(h=>h.id),a=t.getGlobalFilterFn(),l=t.getAllLeafColumns().filter(h=>h.getCanGlobalFilter());n&&a&&l.length&&(s.push("__global__"),l.forEach(h=>{var m;r.push({filterFn:a,id:h.id,resolvedValue:((m=a.resolveFilterValue)==null?void 0:m.call(a,n))??n})}));let c,d;for(let h=0;h<i.flatRows.length;h++){let m=i.flatRows[h];if(m.columnFilters={},o.length)for(let S=0;S<o.length;S++){c=o[S];let y=c.id;m.columnFilters[y]=c.filterFn(m,y,c.resolvedValue,w=>{m.columnFiltersMeta[y]=w})}if(r.length){for(let S=0;S<r.length;S++){d=r[S];let y=d.id;if(d.filterFn(m,y,d.resolvedValue,w=>{m.columnFiltersMeta[y]=w})){m.columnFilters.__global__=!0;break}}m.columnFilters.__global__!==!0&&(m.columnFilters.__global__=!1)}}let p=h=>{for(let m=0;m<s.length;m++)if(h.columnFilters[s[m]]===!1)return!1;return!0};return fH(i.rows,p,t)},{debug:()=>t.options.debugAll??t.options.debugTable,key:!1,onChange:()=>{t._autoResetPageIndex()}})}function CE(){return t=>De(()=>[t.getState().pagination,t.getPrePaginationRowModel(),t.options.paginateExpandedRows?void 0:t.getState().expanded],(i,e)=>{if(!e.rows.length)return e;let{pageIndex:n,pageSize:o}=i,{flatRows:r,rows:s,rowsById:a}=e,l=o*n,c=l+o;s=s.slice(l,c);let d;t.options.paginateExpandedRows?d={flatRows:r,rows:s,rowsById:a}:d=bE({flatRows:r,rows:s,rowsById:a}),d.flatRows=[];let p=h=>{d.flatRows.push(h),h.subRows.length&&h.subRows.forEach(p)};return d.rows.forEach(p),d},{debug:()=>t.options.debugAll??t.options.debugTable,key:!1})}function wE(){return t=>De(()=>[t.getState().sorting,t.getPreSortedRowModel()],(i,e)=>{if(!e.rows.length||!(i!=null&&i.length))return e;let n=t.getState().sorting,o=[],r=n.filter(l=>{var c;return(c=t.getColumn(l.id))==null?void 0:c.getCanSort()}),s={};r.forEach(l=>{let c=t.getColumn(l.id);c&&(s[l.id]={invertSorting:c.columnDef.invertSorting,sortUndefined:c.columnDef.sortUndefined,sortingFn:c.getSortingFn()})});let a=l=>{let c=l.map(d=>E({},d));return c.sort((d,p)=>{for(let h=0;h<r.length;h+=1){let m=r[h],S=s[m.id],y=m?.desc??!1,w=0;if(S.sortUndefined){let x=d.getValue(m.id),N=p.getValue(m.id),k=x===void 0,C=N===void 0;(k||C)&&(w=k&&C?0:k?S.sortUndefined:-S.sortUndefined)}if(w===0&&(w=S.sortingFn(d,p,m.id)),w!==0)return y&&(w*=-1),S.invertSorting&&(w*=-1),w}return d.index-p.index}),c.forEach(d=>{var p;o.push(d),(p=d.subRows)!=null&&p.length&&(d.subRows=a(d.subRows))}),c};return{flatRows:o,rows:a(e.rows),rowsById:e.rowsById}},{debug:()=>t.options.debugAll??t.options.debugTable,key:"",onChange:()=>{t._autoResetPageIndex()}})}function vH(t,i){if(t&1&&(Vi(0),He(1,2),Bi()),t&2){let e=v();u(),b("ngComponentOutlet",e.componentType)("ngComponentOutletInputs",e.internalComponentInput())}}function bH(t,i){if(t&1&&q(0),t&2){let e=v();Te(e.simpleValue)}}function yH(t,i){if(t&1&&(Vi(0),He(1,2),Bi()),t&2){let e=v();u(),b("ngComponentOutlet",e.componentType)("ngComponentOutletInputs",e.componentInput)}}function CH(t,i){if(t&1&&q(0),t&2){let e=v();Te(e.simpleValue)}}var wH=["q-table",""],ra=["*"],SH=["q-tbody",""],EH=["q-td",""];var TH=["q-th",""],xH=["q-thead",""],PH=["q-tr",""],SE=(()=>{class t{cell;componentInput;useAggregatedCell;internalComponentInput=se({});componentType;simpleValue;ngOnChanges(){this.updateRender()}updateRender(){if(this.cell.getIsPlaceholder()){this.resetComponentType(),this.simpleValue=void 0;return}let e=this.useAggregatedCell?this.cell.column.columnDef.aggregatedCell??this.cell.column.columnDef.cell:this.cell.column.columnDef.cell;if(typeof e=="function"){let n=e(this.cell.getContext());typeof n=="function"?(this.componentType=n,this.internalComponentInput.set(ee(E({},this.componentInput),{context:this.cell.getContext()}))):(this.resetComponentType(),this.simpleValue=n)}else this.resetComponentType(),this.simpleValue=e}resetComponentType(){this.componentType=null,this.componentInput={}}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=F({type:t,selectors:[["dynamic-cell"]],inputs:{cell:"cell",componentInput:"componentInput",useAggregatedCell:[2,"useAggregatedCell","useAggregatedCell",qe]},features:[Tt,$e],decls:4,vars:2,consts:[["simpleContent",""],[4,"ngIf","ngIfElse"],[3,"ngComponentOutlet","ngComponentOutletInputs"]],template:function(n,o){if(n&1&&(Vi(0),T(1,vH,2,2,"ng-container",1)(2,bH,1,1,"ng-template",null,0,ke),Bi()),n&2){let r=ue(3);u(),b("ngIf",o.componentType)("ngIfElse",r)}},dependencies:[yh,bo],encapsulation:2})}return t})();var Qp=(()=>{class t{header;componentInput={};componentType;simpleValue;ngOnChanges(){let e=this.header.column.columnDef.header;if(typeof e=="function"){let n=e(this.header.getContext());typeof n=="function"?(this.componentType=n,this.componentInput={context:this.header.getContext()}):(this.resetComponentType(),this.simpleValue=n)}else this.resetComponentType(),this.simpleValue=e}resetComponentType(){this.componentType=null,this.componentInput={}}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=F({type:t,selectors:[["dynamic-header"]],inputs:{header:"header"},features:[$e],decls:4,vars:2,consts:[["simpleContent",""],[4,"ngIf","ngIfElse"],[3,"ngComponentOutlet","ngComponentOutletInputs"]],template:function(n,o){if(n&1&&(Vi(0),T(1,yH,2,2,"ng-container",1)(2,CH,1,1,"ng-template",null,0,ke),Bi()),n&2){let r=ue(3);u(),b("ngIf",o.componentType)("ngIfElse",r)}},dependencies:[yh,bo],encapsulation:2,changeDetection:0})}return t})(),Ll=(()=>{class t{compact=se(!1);showColumnDivider=se(!0);size=se("md");static \u0275fac=function(n){return new(n||t)};static \u0275prov=ne({token:t,factory:t.\u0275fac})}return t})(),Yp=(()=>{class t{elementRef;renderer;tableContextService;class;compact;showColumnDivider;size="md";constructor(e,n,o){this.elementRef=e,this.renderer=n,this.tableContextService=o}ngOnInit(){this.updateClass()}ngOnChanges(e){this.updateClass(),e.showColumnDivider&&this.tableContextService.showColumnDivider.set(this.showColumnDivider),e.compact&&this.tableContextService.compact.set(this.compact),e.size&&this.tableContextService.size.set(this.size)}updateClass(){this.renderer.setAttribute(this.elementRef.nativeElement,"class",Tr.table(this.class))}static \u0275fac=function(n){return new(n||t)(_(Ae),_(yr),_(Ll))};static \u0275cmp=F({type:t,selectors:[["","q-table",""]],inputs:{class:"class",compact:[2,"compact","compact",qe],showColumnDivider:[2,"showColumnDivider","showColumnDivider",qe],size:"size"},features:[ze([{provide:Ll,useClass:Ll}]),Tt,$e],attrs:wH,ngContentSelectors:ra,decls:1,vars:0,template:function(n,o){n&1&&(It(),ct(0))},encapsulation:2,changeDetection:0})}return t})(),Xp=(()=>{class t{elementRef;renderer;class;constructor(e,n){this.elementRef=e,this.renderer=n}ngOnInit(){this.updateClass()}ngOnChanges(){this.updateClass()}updateClass(){this.renderer.setAttribute(this.elementRef.nativeElement,"class",Tr.tbody(this.class))}static \u0275fac=function(n){return new(n||t)(_(Ae),_(yr))};static \u0275cmp=F({type:t,selectors:[["","q-tbody",""]],inputs:{class:"class"},features:[$e],attrs:SH,ngContentSelectors:ra,decls:1,vars:0,template:function(n,o){n&1&&(It(),ct(0))},encapsulation:2,changeDetection:0})}return t})(),Kp=(()=>{class t{elementRef;renderer;tableContextService;class;isAggregated;isGrouped;showColumnDivider;constructor(e,n,o){this.elementRef=e,this.renderer=n,this.tableContextService=o,_n(()=>{this.tableContextService.compact(),this.tableContextService.showColumnDivider(),this.tableContextService.size(),this.updateClass()})}ngOnInit(){this.updateClass()}ngOnChanges(){this.updateClass()}updateClass(){this.renderer.setAttribute(this.elementRef.nativeElement,"class",Tr.td(Ph(this.showColumnDivider)?this.showColumnDivider:this.tableContextService.showColumnDivider(),this.isAggregated,this.isGrouped,this.tableContextService.compact(),this.tableContextService.size(),this.class))}static \u0275fac=function(n){return new(n||t)(_(Ae),_(yr),_(Ll))};static \u0275cmp=F({type:t,selectors:[["","q-td",""]],inputs:{class:"class",isAggregated:[2,"isAggregated","isAggregated",qe],isGrouped:[2,"isGrouped","isGrouped",qe],showColumnDivider:[2,"showColumnDivider","showColumnDivider",qe]},features:[Tt,$e],attrs:EH,ngContentSelectors:ra,decls:1,vars:0,template:function(n,o){n&1&&(It(),ct(0))},encapsulation:2,changeDetection:0})}return t})();var Zp=(()=>{class t{elementRef;renderer;tableContextService;class;isDragging;isDraggingOver;showColumnDivider;constructor(e,n,o){this.elementRef=e,this.renderer=n,this.tableContextService=o,_n(()=>{this.tableContextService.compact(),this.tableContextService.showColumnDivider(),this.tableContextService.size(),this.updateClass()})}ngOnInit(){this.updateClass()}ngOnChanges(){this.updateClass()}updateClass(){this.renderer.setAttribute(this.elementRef.nativeElement,"class",Tr.th(Ph(this.showColumnDivider)?this.showColumnDivider:this.tableContextService.showColumnDivider(),this.isDragging,this.isDraggingOver,this.tableContextService.compact(),this.tableContextService.size(),this.class))}static \u0275fac=function(n){return new(n||t)(_(Ae),_(yr),_(Ll))};static \u0275cmp=F({type:t,selectors:[["","q-th",""]],inputs:{class:"class",isDragging:[2,"isDragging","isDragging",qe],isDraggingOver:[2,"isDraggingOver","isDraggingOver",qe],showColumnDivider:[2,"showColumnDivider","showColumnDivider",qe]},features:[Tt,$e],attrs:TH,ngContentSelectors:ra,decls:1,vars:0,template:function(n,o){n&1&&(It(),ct(0))},encapsulation:2,changeDetection:0})}return t})(),Jp=(()=>{class t{elementRef;renderer;class;constructor(e,n){this.elementRef=e,this.renderer=n}ngOnInit(){this.updateClass()}ngOnChanges(){this.updateClass()}updateClass(){this.renderer.setAttribute(this.elementRef.nativeElement,"class",Tr.thead(this.class))}static \u0275fac=function(n){return new(n||t)(_(Ae),_(yr))};static \u0275cmp=F({type:t,selectors:[["","q-thead",""]],inputs:{class:"class"},features:[$e],attrs:xH,ngContentSelectors:ra,decls:1,vars:0,template:function(n,o){n&1&&(It(),ct(0))},encapsulation:2,changeDetection:0})}return t})(),eh=(()=>{class t{elementRef;renderer;class;isDragging;isDraggingOver;isSelected;constructor(e,n){this.elementRef=e,this.renderer=n}ngOnInit(){this.updateClass()}ngOnChanges(){this.updateClass()}updateClass(){this.renderer.setAttribute(this.elementRef.nativeElement,"class",Tr.tr(this.isSelected,this.isDragging,this.isDraggingOver,this.class))}static \u0275fac=function(n){return new(n||t)(_(Ae),_(yr))};static \u0275cmp=F({type:t,selectors:[["","q-tr",""]],inputs:{class:"class",isDragging:[2,"isDragging","isDragging",qe],isDraggingOver:[2,"isDraggingOver","isDraggingOver",qe],isSelected:[2,"isSelected","isSelected",qe]},features:[Tt,$e],attrs:PH,ngContentSelectors:ra,decls:1,vars:0,template:function(n,o){n&1&&(It(),ct(0))},encapsulation:2,changeDetection:0})}return t})(),Fl=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=ht({type:t});static \u0275inj=dt({})}return t})();function EE(t){let i=null,e=()=>{i||(i=wr(()=>t()))};queueMicrotask(()=>e());let n=()=>{};return new Proxy(n,{apply(o,r,s){return e(),Reflect.apply(typeof i=="function"?i:o,r,s)},get(o,r,s){return e(),Reflect.get(i,r,s)},getOwnPropertyDescriptor(){return{configurable:!0,enumerable:!0}},has(o,r){return e(),Reflect.has(i,r)},ownKeys(){return e(),Reflect.ownKeys(i)}})}function OH(t){let i=t;return new Proxy(i,{apply(){return t()},get(e,n){if(e[n])return e[n];let o=wr(t);if(n.startsWith("get")&&!n.endsWith("Handler")&&!n.endsWith("Model")){let r=o[n];if(typeof r=="function")return Object.defineProperty(e,n,{configurable:!0,enumerable:!0,value:IH(t,r)}),e[n]}return e[n]=o[n]},getOwnPropertyDescriptor(){return{configurable:!0,enumerable:!0}},has(e,n){return!!wr(t)[n]},ownKeys(){return Reflect.ownKeys(wr(t))}})}function IH(t,i){if(!(i.length>0))return Ie(()=>(t(),i()));let n={};return(...o)=>{let r=DH(...o);if(n.hasOwnProperty(r))return n[r]?.();let s=Ie(()=>(t(),i(...o)));return n[r]=s,s()}}function DH(...t){return JSON.stringify(t)}function th(t){return EE(()=>{let i=E({onStateChange:()=>{},renderFallbackValue:null,state:se({})},t()),e=_E(i),n=se(E({},e.initialState)),o=Ie(()=>{let s=n(),a=t();return ee(E(E(E({},e.options),i),a),{onStateChange:l=>{let c=l instanceof Function?l(s):l;n.set(c),i.onStateChange?.(l)},state:E(E({},s),a.state)})}),r=Ie(()=>(e.setOptions(o()),e),{equal:()=>!1});return OH(r)})}function TE(t){return EE(()=>({page:Ie(()=>t.getState().pagination.pageIndex+1),pageSize:Ie(()=>t.getState().pagination.pageSize),setPage:i=>t.setPageIndex(i-1),setRowsPerPage:t.setPageSize,totalRows:Ie(()=>(t.getState(),t.getFilteredRowModel().rows.length))}))}var ng=class{constructor(){this.subject=new Ln(1),this.subscriptions=new gi}doFilter(i){this.subject.next(i)}dispose(){this.subscriptions.unsubscribe()}notEmpty(i,e){this.subscriptions.add(this.subject.subscribe(n=>{if(n[i]){let o=n[i].currentValue;o!=null&&e(o)}}))}has(i,e){this.subscriptions.add(this.subject.subscribe(n=>{if(n[i]){let o=n[i].currentValue;e(o)}}))}notFirst(i,e){this.subscriptions.add(this.subject.subscribe(n=>{if(n[i]&&!n[i].isFirstChange()){let o=n[i].currentValue;e(o)}}))}notFirstAndEmpty(i,e){this.subscriptions.add(this.subject.subscribe(n=>{if(n[i]&&!n[i].isFirstChange()){let o=n[i].currentValue;o!=null&&e(o)}}))}},PE=new pt("NGX_ECHARTS_CONFIG"),Vl=(()=>{class t{constructor(e,n,o){this.el=n,this.ngZone=o,this.options=null,this.theme=null,this.initOpts=null,this.merge=null,this.autoResize=!0,this.loading=!1,this.loadingType="default",this.loadingOpts=null,this.chartInit=new de,this.optionsError=new de,this.chartClick=this.createLazyEvent("click"),this.chartDblClick=this.createLazyEvent("dblclick"),this.chartMouseDown=this.createLazyEvent("mousedown"),this.chartMouseMove=this.createLazyEvent("mousemove"),this.chartMouseUp=this.createLazyEvent("mouseup"),this.chartMouseOver=this.createLazyEvent("mouseover"),this.chartMouseOut=this.createLazyEvent("mouseout"),this.chartGlobalOut=this.createLazyEvent("globalout"),this.chartContextMenu=this.createLazyEvent("contextmenu"),this.chartHighlight=this.createLazyEvent("highlight"),this.chartDownplay=this.createLazyEvent("downplay"),this.chartSelectChanged=this.createLazyEvent("selectchanged"),this.chartLegendSelectChanged=this.createLazyEvent("legendselectchanged"),this.chartLegendSelected=this.createLazyEvent("legendselected"),this.chartLegendUnselected=this.createLazyEvent("legendunselected"),this.chartLegendLegendSelectAll=this.createLazyEvent("legendselectall"),this.chartLegendLegendInverseSelect=this.createLazyEvent("legendinverseselect"),this.chartLegendScroll=this.createLazyEvent("legendscroll"),this.chartDataZoom=this.createLazyEvent("datazoom"),this.chartDataRangeSelected=this.createLazyEvent("datarangeselected"),this.chartGraphRoam=this.createLazyEvent("graphroam"),this.chartGeoRoam=this.createLazyEvent("georoam"),this.chartTreeRoam=this.createLazyEvent("treeroam"),this.chartTimelineChanged=this.createLazyEvent("timelinechanged"),this.chartTimelinePlayChanged=this.createLazyEvent("timelineplaychanged"),this.chartRestore=this.createLazyEvent("restore"),this.chartDataViewChanged=this.createLazyEvent("dataviewchanged"),this.chartMagicTypeChanged=this.createLazyEvent("magictypechanged"),this.chartGeoSelectChanged=this.createLazyEvent("geoselectchanged"),this.chartGeoSelected=this.createLazyEvent("geoselected"),this.chartGeoUnselected=this.createLazyEvent("geounselected"),this.chartAxisAreaSelected=this.createLazyEvent("axisareaselected"),this.chartBrush=this.createLazyEvent("brush"),this.chartBrushEnd=this.createLazyEvent("brushend"),this.chartBrushSelected=this.createLazyEvent("brushselected"),this.chartGlobalCursorTaken=this.createLazyEvent("globalcursortaken"),this.chartRendered=this.createLazyEvent("rendered"),this.chartFinished=this.createLazyEvent("finished"),this.animationFrameID=null,this.chart$=new Ln(1),this.resize$=new X,this.changeFilter=new ng,this.resizeObFired=!1,this.echarts=e.echarts,this.theme=e.theme||null}ngOnChanges(e){this.changeFilter.doFilter(e)}ngOnInit(){if(!window.ResizeObserver)throw new Error("please install a polyfill for ResizeObserver");this.resizeSub=this.resize$.pipe(Mg(100,_g,{leading:!1,trailing:!0})).subscribe(()=>this.resize()),this.autoResize&&(this.resizeOb=this.ngZone.runOutsideAngular(()=>new window.ResizeObserver(e=>{for(let n of e)n.target===this.el.nativeElement&&(this.resizeObFired?this.animationFrameID=window.requestAnimationFrame(()=>{this.resize$.next()}):this.resizeObFired=!0)})),this.resizeOb.observe(this.el.nativeElement)),this.changeFilter.notFirstAndEmpty("options",e=>this.onOptionsChange(e)),this.changeFilter.notFirstAndEmpty("merge",e=>this.setOption(e)),this.changeFilter.has("loading",e=>this.toggleLoading(!!e)),this.changeFilter.notFirst("theme",()=>this.refreshChart())}ngOnDestroy(){window.clearTimeout(this.initChartTimer),this.resizeSub&&this.resizeSub.unsubscribe(),this.animationFrameID&&window.cancelAnimationFrame(this.animationFrameID),this.resizeOb&&this.resizeOb.unobserve(this.el.nativeElement),this.loadingSub&&this.loadingSub.unsubscribe(),this.changeFilter.dispose(),this.dispose()}ngAfterViewInit(){this.initChartTimer=window.setTimeout(()=>this.initChart())}dispose(){this.chart&&(this.chart.isDisposed()||this.chart.dispose(),this.chart=null)}resize(){this.chart&&this.chart.resize()}toggleLoading(e){this.chart?e?this.chart.showLoading(this.loadingType,this.loadingOpts):this.chart.hideLoading():this.loadingSub=this.chart$.subscribe(n=>e?n.showLoading(this.loadingType,this.loadingOpts):n.hideLoading())}setOption(e,n){if(this.chart)try{this.chart.setOption(e,n)}catch(o){console.error(o),this.optionsError.emit(o)}}refreshChart(){return Y(this,null,function*(){this.dispose(),yield this.initChart()})}createChart(){let e=this.el.nativeElement;if(window&&window.getComputedStyle){let n=window.getComputedStyle(e,null).getPropertyValue("height");(!n||n==="0px")&&(!e.style.height||e.style.height==="0px")&&(e.style.height="400px")}return this.ngZone.runOutsideAngular(()=>(typeof this.echarts=="function"?this.echarts:()=>Promise.resolve(this.echarts))().then(({init:o})=>o(e,this.theme,this.initOpts)))}initChart(){return Y(this,null,function*(){yield this.onOptionsChange(this.options),this.merge&&this.chart&&this.setOption(this.merge)})}onOptionsChange(e){return Y(this,null,function*(){e&&(this.chart?this.setOption(this.options,!0):(this.chart=yield this.createChart(),this.chart$.next(this.chart),this.chartInit.emit(this.chart),this.setOption(this.options,!0)))})}createLazyEvent(e){return this.chartInit.pipe(Vo(n=>new fn(o=>(n.on(e,r=>this.ngZone.run(()=>o.next(r))),()=>{this.chart&&(this.chart.isDisposed()||n.off(e))}))))}static{this.\u0275fac=function(n){return new(n||t)(_(PE),_(Ae),_(Je))}}static{this.\u0275dir=Se({type:t,selectors:[["echarts"],["","echarts",""]],inputs:{options:"options",theme:"theme",initOpts:"initOpts",merge:"merge",autoResize:"autoResize",loading:"loading",loadingType:"loadingType",loadingOpts:"loadingOpts"},outputs:{chartInit:"chartInit",optionsError:"optionsError",chartClick:"chartClick",chartDblClick:"chartDblClick",chartMouseDown:"chartMouseDown",chartMouseMove:"chartMouseMove",chartMouseUp:"chartMouseUp",chartMouseOver:"chartMouseOver",chartMouseOut:"chartMouseOut",chartGlobalOut:"chartGlobalOut",chartContextMenu:"chartContextMenu",chartHighlight:"chartHighlight",chartDownplay:"chartDownplay",chartSelectChanged:"chartSelectChanged",chartLegendSelectChanged:"chartLegendSelectChanged",chartLegendSelected:"chartLegendSelected",chartLegendUnselected:"chartLegendUnselected",chartLegendLegendSelectAll:"chartLegendLegendSelectAll",chartLegendLegendInverseSelect:"chartLegendLegendInverseSelect",chartLegendScroll:"chartLegendScroll",chartDataZoom:"chartDataZoom",chartDataRangeSelected:"chartDataRangeSelected",chartGraphRoam:"chartGraphRoam",chartGeoRoam:"chartGeoRoam",chartTreeRoam:"chartTreeRoam",chartTimelineChanged:"chartTimelineChanged",chartTimelinePlayChanged:"chartTimelinePlayChanged",chartRestore:"chartRestore",chartDataViewChanged:"chartDataViewChanged",chartMagicTypeChanged:"chartMagicTypeChanged",chartGeoSelectChanged:"chartGeoSelectChanged",chartGeoSelected:"chartGeoSelected",chartGeoUnselected:"chartGeoUnselected",chartAxisAreaSelected:"chartAxisAreaSelected",chartBrush:"chartBrush",chartBrushEnd:"chartBrushEnd",chartBrushSelected:"chartBrushSelected",chartGlobalCursorTaken:"chartGlobalCursorTaken",chartRendered:"chartRendered",chartFinished:"chartFinished"},exportAs:["echarts"],standalone:!0,features:[$e]})}}return t})(),Bl=(t={})=>({provide:PE,useFactory:()=>ee(E({},t),{echarts:()=>import("./chunk-HBP6TEQ6.js")})});var MH=["*"];function RH(t,i){if(t&1&&(f(0,"div",2)(1,"span",3),q(2),g(),f(3,"span",4),q(4),g()()),t&2){let e=i.$implicit,n=v();et("data-testid","detail-item-"+e.key),u(2),le("",n.MEMORY_DETAILS_LABEL_MAP[e.key],":"),u(2),Te(e.value)}}var AH=t=>({depth:0,args:t}),kH=t=>({"vcl-op-details--indentation":t}),NH=(t,i)=>({depth:t,args:i});function LH(t,i){if(t&1&&(f(0,"div",3)(1,"span",6),q(2),g(),f(3,"span",7),q(4),g()()),t&2){let e=i.$implicit,n=v();et("data-testid","detail-item-"+e.key),u(2),le("",n.OP_DETAILS_LABEL_MAP[e.key],":"),u(2),Te(e.value)}}function FH(t,i){t&1&&He(0)}function VH(t,i){t&1&&He(0)}function BH(t,i){if(t&1&&T(0,VH,1,0,"ng-container",5),t&2){let e=v().$implicit,n=v().depth;v();let o=ue(8);b("ngTemplateOutlet",o)("ngTemplateOutletContext",Bo(2,NH,n+1,e.value))}}function HH(t,i){if(t&1&&(f(0,"span",7),q(1),g()),t&2){let e=v().$implicit;u(),Te(e.value)}}function jH(t,i){if(t&1&&(f(0,"div",8)(1,"span",6),q(2),g(),T(3,BH,1,5,"ng-container")(4,HH,2,1,"span",7),g()),t&2){let e=i.$implicit,n=v().depth,o=v();b("ngClass",ut(4,kH,n>0)),et("data-testid","detail-item-"+e.key),u(2),le("",e.key,":"),u(),L(o.isObject(e.value)?3:4)}}function qH(t,i){if(t&1&&(Pe(0,jH,5,6,"div",8,gn),z(2,"keyvalue")),t&2){let e=i.args,n=v();Oe(bh(2,0,e,n.originalOrder))}}var zH=["panelRef"];function GH(t,i){if(t&1&&M(0,"app-op-details",6),t&2){let e=v();b("selectedBar",e.selectedBar)}}function $H(t,i){if(t&1&&M(0,"app-memory-details",6),t&2){let e=v();b("selectedBar",e.selectedBar)}}var UH=["svgRef"],rg=["canvasRef"],WH=["processElRef"],OE=(t,i)=>i.key,QH=t=>({expanded:t});function YH(t,i){if(t&1&&M(0,"app-overview-chart-wrapper",9),t&2){let e=v();b("data",e.process)("isExpanded",e.isExpanded)}}function XH(t,i){if(t&1){let e=Z();f(0,"app-thread-chart-wrapper",15),I("barClick",function(o){R(e);let r=v(3);return A(r.barClick.emit(o))}),g()}if(t&2){let e=v().$implicit,n=v(2);b("data",n.process.threads[e.key])("opColors",n.opColors)("selectedItem",n.selectedItem)}}function KH(t,i){if(t&1&&(f(0,"div",11)(1,"div",12),q(2),g(),f(3,"div",13),T(4,XH,1,3,"app-thread-chart-wrapper",14),g()()),t&2){let e=i.$implicit,n=v(2);u(),et("data-testid","thread-"+n.process.name+"-"+e.key),u(),le("Thread ",e.key,""),u(2),L(n.isInViewport()?4:-1)}}function ZH(t,i){if(t&1){let e=Z();f(0,"app-memory-chart-wrapper",17),I("barClick",function(o){R(e);let r=v(3);return A(r.barClick.emit(o))}),g()}if(t&2){let e=v().$implicit,n=v(2);b("data",n.process.memoryTypes[e.key])("selectedItem",n.selectedItem)}}function JH(t,i){if(t&1&&(f(0,"div",11)(1,"div",12),q(2),g(),f(3,"div",13),T(4,ZH,1,2,"app-memory-chart-wrapper",16),g()()),t&2){let e=i.$implicit,n=v(2);u(),et("data-testid","memory-type-"+n.process.name+"-"+e.key),u(),Te(e.key),u(2),L(n.isInViewport()?4:-1)}}function e3(t,i){if(t&1&&(f(0,"div",10),Pe(1,KH,5,3,"div",11,OE),z(3,"keyvalue"),Pe(4,JH,5,3,"div",11,OE),z(6,"keyvalue"),g()),t&2){let e=v();et("data-testid","tracks-wrapper-"+e.process.name),u(),Oe(G(3,1,e.process.threads)),u(3),Oe(G(6,3,e.process.memoryTypes))}}var t3=["componentRef"];function i3(t,i){t&1&&(f(0,"div",2),M(1,"q-progress-circle"),g())}function n3(t,i){t&1&&(f(0,"div",2),M(1,"q-inline-alert",3),g())}function o3(t,i){if(t&1){let e=Z();f(0,"app-process",11),I("expand",function(){let o=R(e).$implicit,r=v(3);return A(r.handleExpand(o))})("barClick",function(o){R(e);let r=v(3);return A(r.selectedItem.set(o))})("init",function(o){R(e);let r=v(3);return A(r.handleProcessInit(o))}),g()}if(t&2){let e=i.$implicit,n=v(3);b("isExpanded",n.expandedProcesses().has(e.pid))("process",e)("opColors",n.opColors())("selectedItem",n.selectedItem())}}function r3(t,i){if(t&1){let e=Z();f(0,"app-detail-panel",12),I("close",function(){R(e);let o=v(3);return A(o.selectedItem.set(void 0))}),g()}if(t&2){let e=v(3);b("selectedBar",e.selectedItem())}}function s3(t,i){if(t&1){let e=Z();f(0,"div",4)(1,"app-toolbar",5),I("selectQnnOp",function(o){R(e);let r=v(2);return A(r.selectQnnOp(o))})("selectHtpOp",function(o){R(e);let r=v(2);return A(r.selectHtpOp(o))}),g(),f(2,"app-header",6),I("expandAll",function(){R(e);let o=v(2);return A(o.handleExpandAll())}),g()(),f(3,"div",7)(4,"div",8),Pe(5,o3,1,4,"app-process",9,gn),g()(),T(7,r3,1,1,"app-detail-panel",10)}if(t&2){let e=v(2);u(),b("processes",e.processes())("htpOps",e.htpOps()),u(),b("isAllExpanded",e.isAllExpanded()),u(3),Oe(e.processes()),u(2),L(e.selectedItem()?7:-1)}}function a3(t,i){if(t&1&&T(0,n3,2,0,"div",2)(1,s3,8,4),t&2){let e=v();L(e.error()?0:e.processes().length?1:-1)}}function l3(t,i){if(t&1){let e=Z();f(0,"q-button",3),I("click",function(){R(e);let o=v(2);return A(o.context.row.toggleExpanded())}),q(1," Hide details "),g()}if(t&2){let e=v(2);b("endIcon",e.ChevronUp)}}function c3(t,i){if(t&1){let e=Z();f(0,"q-button",4),I("click",function(){R(e);let o=v(2);return A(o.context.row.toggleExpanded())}),q(1," Show details "),g()}if(t&2){let e=v(2);b("endIcon",e.ChevronDown)}}function d3(t,i){if(t&1&&T(0,l3,2,1,"q-button",1)(1,c3,2,1,"q-button",2),t&2){let e=v();L(e.context.row.getIsExpanded()?0:1)}}function p3(t,i){if(t&1){let e=Z();f(0,"div",2)(1,"q-combobox",6),zn("ngModelChange",function(o){R(e);let r=v();return qn(r.selectedSortOption,o)||(r.selectedSortOption=o),A(o)}),I("ngModelChange",function(o){R(e);let r=v();return A(r.onSelectedSortChanged(o))})("changed",function(o){R(e);let r=v();return A(r.onSort(o))}),g()()}if(t&2){let e=v();u(),b("options",e.sortOptions()),jn("ngModel",e.selectedSortOption),b("placeholder",e.translateService.instant(e.TRANSLATION_REGISTRY.TOOLBAR_ACTION_SORT_LABEL))("disableOptionToggle",!0)}}var h3=()=>["info-icon-color","d-flex","mt-8"],ih=(t,i)=>i.id,u3=t=>({transform:t}),m3=()=>["focus-selected-row-border"],ME=()=>[],f3=()=>["focus-expanded-row-border"],g3=()=>["info-icon-color"];function _3(t,i){if(t&1){let e=Z();f(0,"q-icon-button",18),I("click",function(){R(e);let o=v().$implicit;return A(o.column.toggleSorting())}),g()}if(t&2){let e=v().$implicit,n=v(3);b("icon",e.column.getIsSorted()?n.ArrowUp:n.ArrowDownUp)("ngStyle",ut(2,u3,e.column.getIsSorted()==="desc"?"rotate(180deg)":"unset"))}}function v3(t,i){if(t&1&&(f(0,"th",14)(1,"div",15),M(2,"dynamic-header",16),T(3,_3,1,4,"q-icon-button",17),g()()),t&2){let e,n=i.$implicit;b("qTooltip",(e=n.getContext().column.columnDef.meta)==null?null:e.tooltip),u(2),b("header",n),u(),L(n.column.getCanSort()?3:-1)}}function b3(t,i){if(t&1&&(f(0,"tr",8),Pe(1,v3,4,3,"th",14,ih),g()),t&2){let e=i.$implicit;u(),Oe(e.headers)}}function y3(t,i){if(t&1&&(f(0,"td",20),M(1,"dynamic-cell",21),g()),t&2){let e=i.$implicit;u(),b("cell",e)}}function C3(t,i){if(t&1&&(f(0,"tr",19)(1,"td",22),M(2,"app-recursive-table",23),g()()),t&2){let e=v().$implicit,n=v(2);b("ngClass",e.getIsExpanded()?Ye(6,f3):Ye(7,ME)),u(),et("colspan",e.getVisibleCells().length),u(),b("data",e.original[n.qhasTable.nestedTableProperties.expandOnColumnKey])("columns",n.qhasTable.nestedTableProperties.table.columns)("tableTitle",n.qhasTable.nestedTableProperties.table.tableTitle)("disableAccordion",!0)}}function w3(t,i){if(t&1&&(f(0,"tr",19),Pe(1,y3,2,1,"td",20,ih),g(),T(3,C3,3,8,"tr",19)),t&2){let e=i.$implicit;b("ngClass",e.getIsExpanded()?Ye(2,m3):Ye(3,ME)),u(),Oe(e.getVisibleCells()),u(2),L(e.getIsExpanded()?3:-1)}}function S3(t,i){t&1&&q(0," 0 results ")}function E3(t,i){if(t&1&&q(0),t&2){let e=v().$implicit;Bg(" ",e.currentPageStart,"-",e.currentPageEnd," of ",e.totalRows," ")}}function T3(t,i){if(t&1&&(f(0,"span"),T(1,S3,1,0)(2,E3,1,3),g()),t&2){let e=i.$implicit;u(),L(e.totalRows?2:1)}}function x3(t,i){if(t&1){let e=Z();f(0,"q-pagination",24),I("rowsPerPageChanged",function(o){R(e);let r=v(2);return A(r.paginationHelper.setRowsPerPage(o))})("pageChanged",function(o){R(e);let r=v(2);return A(r.paginationHelper.setPage(o.page))}),g()}if(t&2){let e=v(2);b("totalRows",e.paginationHelper.totalRows())("rowsPerPage",e.paginationHelper.pageSize())("rowsPerPageOptions",e.pageSizeOptions)("page",e.paginationHelper.page())}}function P3(t,i){if(t&1&&(f(0,"div",4)(1,"div",5)(2,"table",6)(3,"thead",7),Pe(4,b3,3,0,"tr",8,ih),g(),f(6,"tbody",9),Pe(7,w3,4,4,null,null,ih),g()()(),f(9,"div",10)(10,"span",11),T(11,T3,3,1,"ng-template",12),g(),T(12,x3,1,4,"q-pagination",13),g()()),t&2){let e=v();u(2),b("ngClass",e.headerSize),et("data-testid","table-recursive-table-"+e.tableTitle),u(2),Oe(e.table.getHeaderGroups()),u(3),Oe(e.table.getRowModel().rows),u(2),b("totalRows",e.paginationHelper.totalRows())("rowsPerPage",e.paginationHelper.pageSize())("page",e.paginationHelper.page()),u(3),L(e.showPaginator()?12:-1)}}function O3(t,i){if(t&1){let e=Z();f(0,"q-text-input",31),I("ngModelChange",function(o){R(e);let r=v(3);return A(r.applyFilter(o))})("click",function(o){return R(e),A(o.stopPropagation())}),g()}if(t&2){let e=v(3);Vg("placeholder","Search ",e.tableTitle,""),b("ngModel",e.globalFilter)}}function I3(t,i){if(t&1){let e=Z();f(0,"div",28),T(1,O3,1,3,"q-text-input",29),f(2,"q-icon-button",30),I("click",function(o){R(e);let r=v(2);return A(r.toggleSearch(o))}),g()()}if(t&2){let e=v(2);u(),L(e.searchOpTypes()?1:-1),u(),b("icon",e.Search)}}function D3(t,i){if(t&1&&(f(0,"div",25)(1,"div",26)(2,"h6",27),q(3),g()(),T(4,I3,3,2,"div",28),g()),t&2){let e=v();u(2),b("appTooltipInfo",e.qhasTable==null?null:e.qhasTable.tableTooltip)("tooltipClasses",Ye(4,g3)),u(),le(" ",e.tableTitle," "),u(),L(e.showSearch()?4:-1)}}var RE=(t,i)=>i.config.title,M3=(t,i)=>({title:t,table:i}),IE=(t,i)=>[t,i],DE=(t,i)=>({titles:t,tables:i}),R3=t=>({title:"",table:t,multiselect:!0}),A3=t=>({"grid-chart-container":t});function k3(t,i){t&1&&(f(0,"div",2),M(1,"q-progress-circle"),g())}function N3(t,i){t&1&&He(0)}function L3(t,i){t&1&&He(0)}function F3(t,i){t&1&&He(0)}function V3(t,i){if(t&1){let e=Z();f(0,"div",4),I("activeIndexChanged",function(o){R(e);let r=v();return A(r.tabChange(o.index))}),f(1,"div",5)(2,"button",6),q(3),g(),f(4,"button",7),q(5),g(),f(6,"button",8),q(7),g()(),f(8,"div",9)(9,"div",10),T(10,N3,1,0,"ng-container",11),g(),f(11,"div",12),T(12,L3,1,0,"ng-container",11),g(),f(13,"div",13),T(14,F3,1,0,"ng-container",11),g()()()}if(t&2){let e=v(),n=ue(3),o=ue(5);b("activeIndex",e.activeTabIndex()),u(3),le(" ",e.translateService.instant(e.TRANSLATION_REGISTRY.TITLES_TABS_OVERALL_SUMMARY)," "),u(2),le(" ",e.translateService.instant(e.TRANSLATION_REGISTRY.TITLES_TABS_QNN_OPS_DETAILS)," "),u(2),le(" ",e.translateService.instant(e.TRANSLATION_REGISTRY.TITLES_TABS_HTP_OPS_DETAILS)," "),u(3),b("ngTemplateOutlet",o)("ngTemplateOutletContext",Bo(10,M3,e.translateService.instant(e.TRANSLATION_REGISTRY.TITLES_TABS_OVERALL_SUMMARY),e.qhasTableService.tabToTableMap[e.OVERALL_SUMMARY_TAB][0])),u(2),b("ngTemplateOutlet",n)("ngTemplateOutletContext",Bo(16,DE,Bo(13,IE,e.translateService.instant(e.TRANSLATION_REGISTRY.TITLES_SUBTABS_OP_TYPES),e.translateService.instant(e.TRANSLATION_REGISTRY.TITLES_SUBTABS_OP_INSTANCES)),e.qhasTableService.tabToTableMap[e.QNN_OP_TYPES_TAB])),u(2),b("ngTemplateOutlet",n)("ngTemplateOutletContext",Bo(22,DE,Bo(19,IE,e.translateService.instant(e.TRANSLATION_REGISTRY.TITLES_SUBTABS_OP_TYPES),e.translateService.instant(e.TRANSLATION_REGISTRY.TITLES_SUBTABS_OP_INSTANCES)),e.qhasTableService.tabToTableMap[e.HTP_OP_TYPES_TAB]))}}function B3(t,i){if(t&1&&(f(0,"button",15),q(1),g()),t&2){let e=i.$implicit;et("data-testid","btn-qhas-subtab-"+e),u(),le(" ",e," ")}}function H3(t,i){t&1&&He(0)}function j3(t,i){if(t&1&&(f(0,"div",16),T(1,H3,1,0,"ng-container",11),g()),t&2){let e=i.$implicit;v(2);let n=ue(5);u(),b("ngTemplateOutlet",n)("ngTemplateOutletContext",ut(2,R3,e))}}function q3(t,i){if(t&1){let e=Z();f(0,"div",14),I("activeIndexChanged",function(o){R(e);let r=v();return A(r.subtabChange(o.index))}),f(1,"div",5),Pe(2,B3,2,2,"button",15,gn),g(),f(4,"div",9),Pe(5,j3,2,4,"div",16,gn),g()()}if(t&2){let e=i.tables,n=i.titles,o=v();b("activeIndex",o.activeSubtabIndex()),u(2),Oe(n),u(3),Oe(e)}}function z3(t,i){if(t&1&&M(0,"q-combobox",22),t&2){let e=v().multiselect,n=v();b("multiple",e)("formControl",n.chartOptionControl)("options",n.currentTabOptions())}}function G3(t,i){if(t&1&&M(0,"q-combobox",23),t&2){let e=v(2);b("formControl",e.coreOptionControl)("options",e.currentCoreOptions())}}function $3(t,i){if(t&1&&M(0,"div",28),t&2){let e=i.$implicit;b("options",e.config),et("data-testid","chart-"+e.config.title)}}function U3(t,i){if(t&1&&(f(0,"div",24),Pe(1,$3,1,2,"div",28,RE),g()),t&2){let e=v(2);u(),Oe(e.topCharts())}}function W3(t,i){if(t&1&&M(0,"app-qhas-chart",27),t&2){let e=i.$implicit,n=v(2);b("qhasChartConfig",e)("chartFilter",n.chartFilter())}}function Q3(t,i){if(t&1&&(f(0,"div",17)(1,"div",18),M(2,"app-recursive-table",19),g(),f(3,"div",20)(4,"div",21),T(5,z3,1,3,"q-combobox",22)(6,G3,1,2,"q-combobox",23),g(),T(7,U3,3,0,"div",24),g(),f(8,"div",25)(9,"div",26),Pe(10,W3,1,2,"app-qhas-chart",27,RE),g()()()),t&2){let e,n=i.table,o=v();u(2),b("qhasTable",n),u(3),L(o.currentTabOptions().length>1?5:-1),u(),L(o.currentCoreOptions().length>1?6:-1),u(),L((e=o.topCharts())!=null&&e.length?7:-1),u(2),b("ngClass",ut(5,A3,o.bottomCharts().length>1)),u(),Oe(o.bottomCharts())}}var Y3=(()=>{class t{handleMouseDown(e){jf(e,this.resizeRef)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=F({type:t,selectors:[["app-resize-handle"]],inputs:{resizeRef:"resizeRef"},standalone:!0,features:[B],decls:1,vars:0,consts:[["data-testid","resize-handle",1,"vcl-resize-handle--root",3,"mousedown"]],template:function(n,o){n&1&&(f(0,"div",0),I("mousedown",function(s){return o.handleMouseDown(s)}),g())},styles:['.vcl-resize-handle--root[_ngcontent-%COMP%]:after{content:"";cursor:ns-resize;z-index:100;position:absolute;display:block;top:-5px;left:0;width:100%;height:10px}']})}}return t})(),AE=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=F({type:t,selectors:[["app-details-section"]],inputs:{header:"header"},standalone:!0,features:[B],ngContentSelectors:MH,decls:4,vars:1,consts:[[1,"vcl-details-section--root"],[1,"vcl-details-section--header"]],template:function(n,o){n&1&&(It(),f(0,"div",0)(1,"div",1),q(2),g(),ct(3),g()),n&2&&(u(2),Te(o.header))},dependencies:[Ve],styles:[".vcl-details-section--root[_ngcontent-%COMP%]{background:var(--q-background-2);border:1px solid var(--q-border-1-default);flex:1;padding:1rem}.vcl-details-section--root[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{font:var(--q-font-heading-xs-subtle);padding-bottom:.5rem}[_nghost-%COMP%]{display:contents}"]})}}return t})(),X3=(()=>{class t{constructor(){this.MEMORY_DETAILS_LABEL_MAP=Hm}get details(){return{name:this.selectedBar.name,ts:this.selectedBar.ts.toLocaleString(),value:this.selectedBar.value.toLocaleString(),dur:(this.selectedBar.tsEnd-this.selectedBar.ts).toLocaleString()}}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=F({type:t,selectors:[["app-memory-details"]],inputs:{selectedBar:"selectedBar"},standalone:!0,features:[B],decls:5,vars:2,consts:[[1,"vcl-memory-details--root"],["header","Properties"],[1,"vcl-memory-details--detail-item"],[1,"vcl-memory-details--label"],[1,"vcl-memory-details--value"]],template:function(n,o){n&1&&(f(0,"div",0)(1,"app-details-section",1),Pe(2,RH,5,3,"div",2,gn),z(4,"keyvalue"),g()()),n&2&&(u(2),Oe(G(4,0,o.details)))},dependencies:[AE,Sr],styles:[".vcl-memory-details--label[_ngcontent-%COMP%]{font:var(--q-font-heading-xxs-subtle);margin-right:.5rem}.vcl-memory-details--value[_ngcontent-%COMP%]{font:var(--q-font-body-xs);color:var(--q-text-1-secondary)}"]})}}return t})(),K3=(()=>{class t{constructor(){this.OP_DETAILS_LABEL_MAP=Bm}get details(){return{name:this.selectedBar.name,ts:this.selectedBar.ts.toLocaleString(),dur:this.selectedBar.dur?.toLocaleString(),tid:this.selectedBar.tid,processName:this.selectedBar.processName}}isObject(e){return typeof e=="object"}originalOrder(){return 0}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=F({type:t,selectors:[["app-op-details"]],inputs:{selectedBar:"selectedBar"},standalone:!0,features:[B],decls:9,vars:7,consts:[["argsTemplate",""],[1,"vcl-op-details--root"],["header","Details"],[1,"vcl-op-details--detail-item"],["header","Arguments"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"vcl-op-details--label"],[1,"vcl-op-details--value"],[3,"ngClass"]],template:function(n,o){if(n&1&&(f(0,"div",1)(1,"app-details-section",2),Pe(2,LH,5,3,"div",3,gn),z(4,"keyvalue"),g(),f(5,"app-details-section",4),T(6,FH,1,0,"ng-container",5),g()(),T(7,qH,3,3,"ng-template",null,0,ke)),n&2){let r=ue(8);u(2),Oe(bh(4,2,o.details,o.originalOrder)),u(4),b("ngTemplateOutlet",r)("ngTemplateOutletContext",ut(5,AH,o.selectedBar.args))}},dependencies:[AE,vo,Sr,oi],styles:[".vcl-op-details--root[_ngcontent-%COMP%]{display:flex;gap:.5rem}.vcl-op-details--label[_ngcontent-%COMP%]{font:var(--q-font-heading-xxs-subtle);margin-right:.5rem}.vcl-op-details--value[_ngcontent-%COMP%]{font:var(--q-font-body-xs);color:var(--q-text-1-secondary)}.vcl-op-details--indentation[_ngcontent-%COMP%]{padding-left:1rem}"]})}}return t})(),Z3=(()=>{class t{constructor(){this.close=new de,this.X=ms,this.EventTypes=Dn,this.isOpItem=Bf,this.isMemoryItem=Hf}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=F({type:t,selectors:[["app-detail-panel"]],viewQuery:function(n,o){if(n&1&&Ee(zH,5),n&2){let r;me(r=fe())&&(o.panelRef=r.first)}},inputs:{selectedBar:"selectedBar"},outputs:{close:"close"},standalone:!0,features:[B],decls:8,vars:4,consts:[["panelRef",""],["data-testid","detail-panel",1,"vcl-detail-panel--root"],[3,"resizeRef"],[1,"vcl-detail-panel--close-btn-wrapper"],["data-testid","btn-detail-panel-close","dense","",3,"click","icon"],[1,"vcl-detail-panel--detail-inner-container"],[3,"selectedBar"]],template:function(n,o){if(n&1){let r=Z();f(0,"div",1,0),M(2,"app-resize-handle",2),f(3,"div",3)(4,"q-icon-button",4),I("click",function(){return R(r),A(o.close.emit())}),g()(),f(5,"div",5),T(6,GH,1,1,"app-op-details",6)(7,$H,1,1,"app-memory-details",6),g()()}if(n&2){let r=ue(1);u(2),b("resizeRef",r),u(2),b("icon",o.X),u(2),L(o.isOpItem(o.selectedBar)?6:-1),u(),L(o.isMemoryItem(o.selectedBar)?7:-1)}},dependencies:[Ve,Ft,K3,X3,Y3],styles:[".vcl-detail-panel--root[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;padding:.5rem;background:var(--q-background-3);height:50%;border-top:1px solid var(--q-border-1-default);box-shadow:2px -2px 5px var(--box-shadow)}.vcl-detail-panel--close-btn-wrapper[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;padding-bottom:.5rem}.vcl-detail-panel--detail-inner-container[_ngcontent-%COMP%]{overflow:auto;flex:1}[_nghost-%COMP%]{display:contents}"]})}}return t})(),J3=(()=>{class t{constructor(){this.expandAll=new de,this.ChevronsDownUp=x_,this.ChevronsUpDown=P_}ngAfterViewInit(){At.timeline.render(this.svgRef.nativeElement)}ngOnDestroy(){At.timeline.reset()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=F({type:t,selectors:[["app-header"]],viewQuery:function(n,o){if(n&1&&Ee(UH,5),n&2){let r;me(r=fe())&&(o.svgRef=r.first)}},inputs:{isAllExpanded:"isAllExpanded"},outputs:{expandAll:"expandAll"},standalone:!0,features:[B],decls:6,vars:2,consts:[["svgRef",""],[1,"vcl-header--root"],[1,"vcl-header--left-header-section"],["data-testid","btn-expand-all","qTooltipPlacement","right",3,"click","icon","qTooltip"],[1,"vcl-header--timeline-wrapper"],["data-testid","timeline",1,"vcl-header--timeline"]],template:function(n,o){if(n&1){let r=Z();f(0,"div",1)(1,"div",2)(2,"q-icon-button",3),I("click",function(){return R(r),A(o.expandAll.emit())}),g()(),f(3,"div",4),Zl(),M(4,"svg",5,0),g()()}n&2&&(u(2),b("icon",o.isAllExpanded?o.ChevronsDownUp:o.ChevronsUpDown)("qTooltip",o.isAllExpanded?"Collapse all":"Expand all"))},dependencies:[Le,st,Ve,Ft],styles:[".vcl-header--root[_ngcontent-%COMP%]{display:flex;border-bottom:1px solid var(--q-border-1-default);box-shadow:2px 3px 5px var(--box-shadow)}.vcl-header--left-header-section[_ngcontent-%COMP%]{display:flex;align-items:flex-end;width:245px}.vcl-header--timeline-wrapper[_ngcontent-%COMP%]{display:flex;flex:1;overflow:auto;scrollbar-gutter:stable}.vcl-header--timeline[_ngcontent-%COMP%]{height:50px;flex:1}"]})}}return t})(),ej=(()=>{class t{constructor(){this.barClick=new de}ngAfterViewInit(){this.chartRef=new Dl({canvasEl:this.canvasRef.nativeElement,data:this.data,onBarClick:e=>this.barClick.emit(e)}),At.onChartInit(this.chartRef),this.chartRef.onSelection(this.selectedItem)}ngOnChanges(e){e.selectedItem?.currentValue!==e.selectedItem?.previousValue&&this.chartRef?.onSelection(this.selectedItem)}ngOnDestroy(){At.onChartDestroy(this.chartRef)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=F({type:t,selectors:[["app-memory-chart-wrapper"]],viewQuery:function(n,o){if(n&1&&Ee(rg,5),n&2){let r;me(r=fe())&&(o.canvasRef=r.first)}},inputs:{data:"data",selectedItem:"selectedItem"},outputs:{barClick:"barClick"},standalone:!0,features:[$e,B],decls:3,vars:0,consts:[["canvasRef",""],[1,"vcl-memory-chart-wrapper--root"],["role","img"]],template:function(n,o){n&1&&(f(0,"div",1),M(1,"canvas",2,0),g())},styles:[".vcl-memory-chart-wrapper--root[_ngcontent-%COMP%]{flex:1;position:relative}.vcl-memory-chart-wrapper--root[_ngcontent-%COMP%] canvas[_ngcontent-%COMP%]{width:100%;height:100%}[_nghost-%COMP%]{display:flex;flex:1}"]})}}return t})(),tj=(()=>{class t{ngAfterViewInit(){this.chartRef=new Ml({canvasEl:this.canvasRef.nativeElement,data:this.data}),At.onChartInit(this.chartRef)}ngOnDestroy(){At.onChartDestroy(this.chartRef)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=F({type:t,selectors:[["app-overview-chart-wrapper"]],viewQuery:function(n,o){if(n&1&&Ee(rg,5),n&2){let r;me(r=fe())&&(o.canvasRef=r.first)}},inputs:{data:"data",isExpanded:"isExpanded"},standalone:!0,features:[B],decls:3,vars:3,consts:[["canvasRef",""],[1,"vcl-overview-chart-wrapper--root"],["role","img",3,"ariaHidden"]],template:function(n,o){n&1&&(f(0,"div",1),M(1,"canvas",2,0),g()),n&2&&(u(),Fe("hidden",o.isExpanded),b("ariaHidden",o.isExpanded))},styles:[".vcl-overview-chart-wrapper--root[_ngcontent-%COMP%]{flex:1;position:relative;height:100%}.vcl-overview-chart-wrapper--root[_ngcontent-%COMP%] canvas[_ngcontent-%COMP%]{width:100%;height:100%;visibility:visible}.vcl-overview-chart-wrapper--root[_ngcontent-%COMP%] canvas.hidden[_ngcontent-%COMP%]{visibility:hidden}[_nghost-%COMP%]{display:flex;flex:1}"]})}}return t})(),ij=(()=>{class t{constructor(){this.barClick=new de}ngAfterViewInit(){this.chartRef=new Rl({canvasEl:this.canvasRef.nativeElement,data:this.data,onBarClick:e=>this.barClick.emit(e),opColors:this.opColors}),At.onChartInit(this.chartRef),this.chartRef.onSelection(this.selectedItem)}ngOnChanges(e){e.selectedItem.currentValue!==e.selectedItem.previousValue&&this.chartRef?.onSelection(this.selectedItem)}ngOnDestroy(){At.onChartDestroy(this.chartRef)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=F({type:t,selectors:[["app-thread-chart-wrapper"]],viewQuery:function(n,o){if(n&1&&Ee(rg,5),n&2){let r;me(r=fe())&&(o.canvasRef=r.first)}},inputs:{data:"data",opColors:"opColors",selectedItem:"selectedItem"},outputs:{barClick:"barClick"},standalone:!0,features:[$e,B],decls:3,vars:0,consts:[["canvasRef",""],[1,"vcl-thread-chart-wrapper--root"],["role","img"]],template:function(n,o){n&1&&(f(0,"div",1),M(1,"canvas",2,0),g())},styles:[".vcl-thread-chart-wrapper--root[_ngcontent-%COMP%]{flex:1;position:relative}.vcl-thread-chart-wrapper--root[_ngcontent-%COMP%] canvas[_ngcontent-%COMP%]{width:100%;height:100%}[_nghost-%COMP%]{display:flex;flex:1}"]})}}return t})(),nj=(()=>{class t{constructor(){this.init=new de,this.barClick=new de,this.expand=new de,this.isInViewport=se(!1),this.ChevronDown=xh,this.ChevronRight=Ec}ngAfterViewInit(){this.viewportObserverRef=new rl(this.processElRef.nativeElement,e=>this.isInViewport.set(e)),this.viewportObserverRef.observe(),this.init.emit({pid:this.process.pid,processEl:this.processElRef.nativeElement})}ngOnDestroy(){this.viewportObserverRef.unobserve()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=F({type:t,selectors:[["app-process"]],viewQuery:function(n,o){if(n&1&&Ee(WH,5),n&2){let r;me(r=fe())&&(o.processElRef=r.first)}},inputs:{process:"process",isExpanded:"isExpanded",opColors:"opColors",selectedItem:"selectedItem"},outputs:{init:"init",barClick:"barClick",expand:"expand"},standalone:!0,features:[B],decls:12,vars:10,consts:[["processElRef",""],[1,"vcl-process--root"],[1,"vcl-process--header"],[1,"vcl-process--expansion-btn",3,"click","ngClass"],[1,"d-flex","w-100","h-100","align-items-center"],[1,"vcl-process--expansion-btn-header",3,"qTooltip"],[1,"vcl-process--expansion-btn-header-icon",3,"icon"],[1,"text-ellipsis","vcl-process--expansion-btn-header-label"],[1,"vcl-process--overview-chart-container"],[3,"data","isExpanded"],[1,"vcl-process--tracks-wrapper"],[1,"d-flex","vcl-process--track-row"],[1,"vcl-process--track-header"],[1,"d-flex","vcl-process--track-content"],[3,"data","opColors","selectedItem"],[3,"barClick","data","opColors","selectedItem"],[3,"data","selectedItem"],[3,"barClick","data","selectedItem"]],template:function(n,o){if(n&1){let r=Z();f(0,"div",1,0)(2,"div",2)(3,"button",3),I("click",function(){return R(r),A(o.expand.emit())}),f(4,"div",4)(5,"div",5),M(6,"q-icon",6),f(7,"span",7),q(8),g()(),f(9,"div",8),T(10,YH,1,2,"app-overview-chart-wrapper",9),g()()()(),T(11,e3,7,5,"div",10),g()}n&2&&(u(2),et("data-testid","process-header-"+o.process.name),u(),b("ngClass",ut(8,QH,o.isExpanded)),et("data-testid","btn-expand-"+o.process.name),u(2),b("qTooltip",o.process.name),u(),b("icon",o.isExpanded?o.ChevronDown:o.ChevronRight),u(2),Te(o.process.name),u(2),L(o.isInViewport()?10:-1),u(),L(o.isExpanded?11:-1))},dependencies:[mt,vo,Sr,Le,st,Dt,qi,ij,ej,tj],styles:[".vcl-process--track-row[_ngcontent-%COMP%]{height:25px}.vcl-process--track-row[_ngcontent-%COMP%]:not(:last-child){border-bottom:1px solid var(--q-border-1-default)}.vcl-process--track-header[_ngcontent-%COMP%]{border-left:1px solid var(--q-background-highlight);border-right:1px solid var(--q-border-1-default);padding:0 12px;color:var(--q-text-1-secondary);align-content:center;width:250px}.vcl-process--track-content[_ngcontent-%COMP%]{flex:1}.vcl-process--header[_ngcontent-%COMP%]{display:flex}.vcl-process--header[_ngcontent-%COMP%]:hover{background-color:var(--q-button-background-hover)}.vcl-process--expansion-btn[_ngcontent-%COMP%]{border-bottom:1px solid var(--q-border-1-default);width:100%;height:36px;font-size:var(--q-font-size-body-s);font-weight:var(--q-font-weight-semi-bold);background-color:transparent;color:var(--q-text-1-primary)}.vcl-process--expansion-btn.expanded[_ngcontent-%COMP%]{background-color:var(--q-background-highlight);color:var(--q-text-2-primary)}.vcl-process--tracks-wrapper[_ngcontent-%COMP%]{border-bottom:1px solid var(--q-background-highlight);border-right:1px solid var(--q-background-highlight)}.vcl-process--expansion-btn-header[_ngcontent-%COMP%]{display:flex;align-items:center;height:100%;width:250px;border-right:1px solid var(--q-border-1-default)}.vcl-process--expansion-btn-header-icon[_ngcontent-%COMP%]{margin:0 6px}.vcl-process--expansion-btn-header-label[_ngcontent-%COMP%]{flex:1;text-align:left}.vcl-process--overview-chart-container[_ngcontent-%COMP%]{display:flex;height:22px;flex:1}"]})}}return t})(),oj=(()=>{class t{constructor(){this.selectQnnOp=new de,this.selectHtpOp=new de,this.Search=va,this.optionLabel=e=>`${e.name} - ${e.processName} - ${e.args?.opid}`}onSelectQnnOp(e){this.selectQnnOp.emit(e)}onSelectHtpOp(e){this.selectHtpOp.emit(e)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=F({type:t,selectors:[["app-toolbar"]],inputs:{processes:"processes",htpOps:"htpOps"},outputs:{selectQnnOp:"selectQnnOp",selectHtpOp:"selectHtpOp"},standalone:!0,features:[B],decls:3,vars:5,consts:[[1,"vcl-toolbar--root"],["data-testid","combo-qnn-search","placeholder","Search QNN Ops...","size","s","filterable","","virtual","","optionLabel","name","disableOptionToggle","","fullWidth","",1,"vcl-toolbar--qnn-search-combobox",3,"changed","startIcon","options"],["data-testid","combo-htp-search","placeholder","Search HTP Ops...","size","s","filterable","","virtual","","disableOptionToggle","","fullWidth","",1,"vcl-toolbar--htp-search-combobox",3,"changed","startIcon","options","optionLabel"]],template:function(n,o){n&1&&(f(0,"div",0)(1,"q-combobox",1),I("changed",function(s){return o.onSelectQnnOp(s)}),g(),f(2,"q-combobox",2),I("changed",function(s){return o.onSelectHtpOp(s)}),g()()),n&2&&(u(),b("startIcon",o.Search)("options",o.processes),u(),b("startIcon",o.Search)("options",o.htpOps)("optionLabel",o.optionLabel))},dependencies:[Mi,Qn],styles:[".vcl-toolbar--root[_ngcontent-%COMP%]{display:flex;gap:.5rem;padding:.5rem;border-bottom:1px solid var(--q-border-1-default)}.vcl-toolbar--qnn-search-combobox[_ngcontent-%COMP%]{width:15rem}.vcl-toolbar--htp-search-combobox[_ngcontent-%COMP%]{width:22rem}"]})}}return t})(),kE=(()=>{class t{constructor(){this.controlsInit=new de,this.qnnOpExpanded=new de,this.qnnOpNotFound=new de,this.isLoading=se(!1),this.error=se(!1),this.expandedProcesses=se(new Set),this.selectedItem=se(void 0),this.processes=se([]),this.opColors=se({}),this.htpOps=se([]),this.isAllExpanded=Ie(()=>this.processes().length===this.expandedProcesses().size),this.processElLookup={}}ngOnChanges(e){e.file&&e.file.currentValue!==e.file.previousValue&&(this.isLoading.set(!0),this.resetState(),this.readJsonFile(this.file)),e.theme&&e.theme.currentValue!==e.theme.previousValue&&At.updateTheme(this.theme)}ngOnInit(){this.controlsInit.emit({selectQnnOp:e=>{let n=this.processes().find(o=>o.name===e||o.name===`${Us}${e}`);n?this.selectQnnOp(n):this.qnnOpNotFound.emit(e)}})}ngAfterViewInit(){this.resizeObserver=new ol(this.componentRef.nativeElement,()=>At.onResize()),this.resizeObserver.observe(),this.keyboardShortcuts=new Al({element:this.componentRef.nativeElement,onZoom:e=>At.timeline.brush.startZoom(e),onPan:e=>At.timeline.brush.startPan(e),onZoomStop:()=>At.timeline.brush.stopZoom(),onPanStop:()=>At.timeline.brush.stopPan()})}resetState(){this.error.set(!1),this.selectedItem.set(void 0),this.expandedProcesses.set(new Set)}readJsonFile(e){return Y(this,null,function*(){try{let n=yield Nf(e),{processes:o,range:r,opColors:s,htpOps:a}=Lf(n);At.timeline.range=r,this.htpOps.set(a),this.processes.set(o),this.opColors.set(s),this.isLoading.set(!1),this.componentRef.nativeElement.focus()}catch(n){console.error(n),this.error.set(!0),this.isLoading.set(!1)}})}handleExpandAll(){let e=Af(this.processes(),this.isAllExpanded());this.expandedProcesses.set(e)}handleExpand(e){let n=kf(this.expandedProcesses(),e.pid);this.expandedProcesses.set(n),this.expandedProcesses().has(e.pid)&&!Ff(e)&&this.qnnOpExpanded.emit(Fp(e.name,Us))}handleDetailClose(){this.selectedItem.set(void 0),this.componentRef.nativeElement.focus()}handleProcessInit({pid:e,processEl:n}){this.processElLookup[e]=n}selectQnnOp(e){e&&(Bp(e.pid,this.expandedProcesses(),this.expandedProcesses.set),Vp(this.processElLookup[e.pid]))}selectHtpOp(e){if(!e)return;let n=Vf(this.htpOps(),e);n&&(this.selectedItem.set(n),Bp(n.pid,this.expandedProcesses(),this.expandedProcesses.set),Vp(this.processElLookup[n.pid]))}ngOnDestroy(){this.resizeObserver.disconnect(),this.keyboardShortcuts.removeListeners()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=F({type:t,selectors:[["app-optrace"]],viewQuery:function(n,o){if(n&1&&Ee(t3,5),n&2){let r;me(r=fe())&&(o.componentRef=r.first)}},inputs:{theme:"theme",file:"file"},outputs:{controlsInit:"controlsInit",qnnOpExpanded:"qnnOpExpanded",qnnOpNotFound:"qnnOpNotFound"},standalone:!0,features:[$e,B],decls:4,vars:1,consts:[["componentRef",""],["tabindex","0",1,"vcl-optrace--root"],[1,"vcl-optrace--center"],["color","negative","label","Unable to load trace","description","File must be valid JSON and adhere to the Trace Event Format."],[1,"vcl-optrace--header"],[3,"selectQnnOp","selectHtpOp","processes","htpOps"],[3,"expandAll","isAllExpanded"],[1,"vcl-optrace--scroll-container"],[1,"vcl-optrace--optrace-body"],[3,"isExpanded","process","opColors","selectedItem"],[3,"selectedBar"],[3,"expand","barClick","init","isExpanded","process","opColors","selectedItem"],[3,"close","selectedBar"]],template:function(n,o){n&1&&(f(0,"div",1,0),T(2,i3,2,0,"div",2)(3,a3,2,1),g()),n&2&&(u(2),L(o.isLoading()?2:3))},dependencies:[Ci,zi,Ko,Xo,J3,nj,Z3,oj],styles:["[class^=vcl-][_ngcontent-%COMP%] .h-100[_ngcontent-%COMP%]{height:100%}[class^=vcl-][_ngcontent-%COMP%] .w-100[_ngcontent-%COMP%]{width:100%}[class^=vcl-][_ngcontent-%COMP%] .w-25[_ngcontent-%COMP%]{width:25%}[class^=vcl-][_ngcontent-%COMP%] .w-50[_ngcontent-%COMP%]{width:50%}[class^=vcl-][_ngcontent-%COMP%] .mt-0[_ngcontent-%COMP%]{margin-top:0}[class^=vcl-][_ngcontent-%COMP%] .pt-0[_ngcontent-%COMP%]{padding-top:0}[class^=vcl-][_ngcontent-%COMP%] .font-bold[_ngcontent-%COMP%]{font-weight:700}[class^=vcl-][_ngcontent-%COMP%] .text-ellipsis[_ngcontent-%COMP%]{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}[class^=vcl-][_ngcontent-%COMP%] .d-flex[_ngcontent-%COMP%]{display:flex}[class^=vcl-][_ngcontent-%COMP%] .d-inline-flex[_ngcontent-%COMP%]{display:inline-flex}[class^=vcl-][_ngcontent-%COMP%] .flex-grow-1[_ngcontent-%COMP%]{flex-grow:1}[class^=vcl-][_ngcontent-%COMP%] .justify-content-between[_ngcontent-%COMP%]{justify-content:space-between}[class^=vcl-][_ngcontent-%COMP%] .justify-content-center[_ngcontent-%COMP%]{justify-content:center}[class^=vcl-][_ngcontent-%COMP%] .justify-content-right[_ngcontent-%COMP%]{justify-content:right}[class^=vcl-][_ngcontent-%COMP%] .justify-content-around[_ngcontent-%COMP%]{justify-content:space-around}[class^=vcl-][_ngcontent-%COMP%] .justify-content-start[_ngcontent-%COMP%]{justify-content:flex-start}[class^=vcl-][_ngcontent-%COMP%] .justify-content-end[_ngcontent-%COMP%]{justify-content:flex-end}[class^=vcl-][_ngcontent-%COMP%] .flex-column[_ngcontent-%COMP%]{flex-direction:column}[class^=vcl-][_ngcontent-%COMP%] .align-items-center[_ngcontent-%COMP%]{align-items:center}[class^=vcl-][_ngcontent-%COMP%] .align-items-baseline[_ngcontent-%COMP%]{align-items:baseline}[class^=vcl-][_ngcontent-%COMP%] .align-items-end[_ngcontent-%COMP%]{align-items:flex-end}[class^=vcl-][_ngcontent-%COMP%] .align-items-flex-start[_ngcontent-%COMP%]{align-items:flex-start}[class^=vcl-][_ngcontent-%COMP%] .align-self-start[_ngcontent-%COMP%]{align-self:flex-start}[class^=vcl-][_ngcontent-%COMP%] .align-self-end[_ngcontent-%COMP%]{align-self:flex-end}[class^=vcl-][_ngcontent-%COMP%] .align-self-center[_ngcontent-%COMP%]{align-self:center}[class^=vcl-][_ngcontent-%COMP%] .align-self-start[_ngcontent-%COMP%]{align-self:start}[class^=vcl-][_ngcontent-%COMP%] .align-self-baseline[_ngcontent-%COMP%]{align-self:baseline}[class^=vcl-][_ngcontent-%COMP%] .align-self-stretch[_ngcontent-%COMP%]{align-self:stretch}[class^=vcl-][_ngcontent-%COMP%] .flex-column-grow[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex-grow:1}[class^=vcl-][_ngcontent-%COMP%] .gap-4[_ngcontent-%COMP%]{gap:.25rem}[class^=vcl-][_ngcontent-%COMP%] .gap-8[_ngcontent-%COMP%]{gap:.5rem}[class^=vcl-][_ngcontent-%COMP%] .gap-12[_ngcontent-%COMP%]{gap:.75rem}[class^=vcl-][_ngcontent-%COMP%] .gap-16[_ngcontent-%COMP%]{gap:1rem}[class^=vcl-][_ngcontent-%COMP%] .gap-24[_ngcontent-%COMP%]{gap:1.5rem}[class^=vcl-][_ngcontent-%COMP%] .flex-column-reverse[_ngcontent-%COMP%]{flex-direction:column-reverse}[class^=vcl-][_ngcontent-%COMP%] .flex-1[_ngcontent-%COMP%]{flex:1 1 auto}[class^=vcl-][_ngcontent-%COMP%] .flex-wrap[_ngcontent-%COMP%]{flex-wrap:wrap}[class^=vcl-][_ngcontent-%COMP%] .white-space-pre-line[_ngcontent-%COMP%]{white-space:pre-line}.light[_ngcontent-%COMP%]{--q-background-highlight: #3852D3;--box-shadow: rgba(0, 0, 0, .2)}.dark[_ngcontent-%COMP%]{--q-background-highlight: #809FFF;--box-shadow: rgba(0, 0, 0, .8)}.vcl-optrace--root[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;background:var(--q-background-1);color:var(--q-text-1-primary)}.vcl-optrace--root[_ngcontent-%COMP%]:focus-visible{outline:none}.vcl-optrace--center[_ngcontent-%COMP%]{flex:1;display:flex;align-items:center;justify-content:center}.vcl-optrace--header[_ngcontent-%COMP%]{background:var(--q-background-2)}.vcl-optrace--scroll-container[_ngcontent-%COMP%]{overflow:auto;flex:1 1 0;scrollbar-gutter:stable}.vcl-optrace--body[_ngcontent-%COMP%]{margin-right:4px}"],changeDetection:0})}}return t})(),og=(()=>{class t{constructor(){this.ChevronDown=xh,this.ChevronUp=T_}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=F({type:t,selectors:[["app-expansion-cell"]],inputs:{context:"context"},standalone:!0,features:[B],decls:2,vars:1,consts:[[1,"vcl-expansion-cell--root"],["color","primary","variant","fill","dense","",3,"endIcon"],["color","neutral","variant","fill","dense","",3,"endIcon"],["color","primary","variant","fill","dense","",3,"click","endIcon"],["color","neutral","variant","fill","dense","",3,"click","endIcon"]],template:function(n,o){n&1&&(f(0,"div",0),T(1,d3,2,1),g()),n&2&&(u(),L(o.context.row.getCanExpand()?1:-1))},dependencies:[Qo,_t,Ve,Lt,Yt],encapsulation:2,changeDetection:0})}}return t})(),rj=(()=>{class t{constructor(){this.Info=xc}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=F({type:t,selectors:[["app-tooltip-icon"]],inputs:{tooltipPosition:"tooltipPosition",tooltipClasses:"tooltipClasses",tooltipContent:"tooltipContent"},standalone:!0,features:[B],decls:1,vars:4,consts:[["size","s","qTooltipPosition","fixed","qTooltipAppendTo","host",3,"icon","qTooltip","ngClass","qTooltipPlacement"]],template:function(n,o){n&1&&M(0,"q-icon",0),n&2&&b("icon",o.Info)("qTooltip",o.tooltipContent)("ngClass",o.tooltipClasses)("qTooltipPlacement",o.tooltipPosition)},dependencies:[mt,vo,Dt,qi,Le,st],encapsulation:2})}}return t})(),NE=(()=>{class t{constructor(e){this.viewContainerRef=e}ngOnInit(){this.addInfoIconWithTooltip()}addInfoIconWithTooltip(){if(this.tooltipContent){let e=this.viewContainerRef.createComponent(rj);e.instance.tooltipClasses=this.tooltipClasses?.join(" "),e.instance.tooltipContent=this.tooltipContent,e.instance.tooltipPosition=this.tooltipPosition}}static{this.\u0275fac=function(n){return new(n||t)(_(ni))}}static{this.\u0275dir=Se({type:t,selectors:[["","appTooltipInfo",""]],inputs:{tooltipContent:[0,"appTooltipInfo","tooltipContent"],tooltipPosition:"tooltipPosition",tooltipClasses:"tooltipClasses"},standalone:!0})}}return t})(),LE=(()=>{class t{constructor(){this.instant=e=>e}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=ne({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})(),sj=(()=>{class t{constructor(e){this.translateService=e,this.selectedOption=Vn(),this.restored=Vn(),this.toggleChartLabels=Vn(),this.sortOptions=Ot([]),this.originalIndexOrderMap={},this.Locate=Q_,this.TRANSLATION_REGISTRY=Et,this.labelControlIcon=Ie(()=>this.showLabels()?N_:k_),this.showLabels=se(!0)}onSelectedSortChanged(e){Array.isArray(e)&&(e=e[0]),this.selectedSortOption=e}onSort(e){Array.isArray(e)&&(e=e[0]),this.selectedSortOption=e,this.selectedOption.emit(e)}onRestore(){this.selectedSortOption=this.sortOptions()[0],this.showLabels.set(!0),this.restored.emit()}onToggleChartLabels(){this.showLabels.set(!this.showLabels()),this.toggleChartLabels.emit(this.showLabels())}static{this.\u0275fac=function(n){return new(n||t)(_(LE))}}static{this.\u0275cmp=F({type:t,selectors:[["app-qhas-chart-toolbar"]],inputs:{sortOptions:[1,"sortOptions"]},outputs:{selectedOption:"selectedOption",restored:"restored",toggleChartLabels:"toggleChartLabels"},standalone:!0,features:[B],decls:6,vars:5,consts:[[1,"vcl-chart--toolbar"],[1,"d-flex","gap-8"],[1,"sort-section"],["data-testid","toolbar-action-list",1,"d-flex"],["data-testid","toolbar-action-restore","qTooltipPlacement","top",3,"click","icon","qTooltip"],["data-testid","toolbar-action-toggle-labels","qTooltipPlacement","top",3,"click","icon","qTooltip"],["data-testid","toolbar-action-sort-options","appendTo","portal","size","s","optionLabel","name","optionValue","id","clearable","false",3,"ngModelChange","changed","options","ngModel","placeholder","disableOptionToggle"]],template:function(n,o){n&1&&(f(0,"div",0)(1,"div",1),T(2,p3,2,4,"div",2),g(),f(3,"div",3)(4,"q-icon-button",4),I("click",function(){return o.onRestore()}),g(),f(5,"q-icon-button",5),I("click",function(){return o.onToggleChartLabels()}),g()()()),n&2&&(u(2),L(o.sortOptions().length>0?2:-1),u(2),b("icon",o.Locate)("qTooltip",o.translateService.instant(o.TRANSLATION_REGISTRY.TOOLBAR_ACTION_RESTORE_TOOLTIP)),u(),b("icon",o.labelControlIcon())("qTooltip",o.translateService.instant(o.TRANSLATION_REGISTRY.TOOLBAR_ACTION_TOGGLE_CHART_LABELS_TOOLTIP)))},dependencies:[mt,Mi,Qn,_t,Qt,ji,Ve,Ft,Le,st],styles:[".vcl-chart--toolbar[_ngcontent-%COMP%]{padding:.25rem 1rem;margin:.3rem 1.5rem .3rem 0;display:flex;gap:1rem;align-items:center;justify-content:space-between}.vcl-chart--toolbar[_ngcontent-%COMP%] .search-section[_ngcontent-%COMP%]{max-width:12rem}[_nghost-%COMP%] .q-combobox--input-container{padding-top:0;padding-bottom:0}"]})}}return t})(),aj=(()=>{class t{constructor(e,n){this.toolbarService=e,this.chartConfigurationService=n,this.chartFilter=Ot(),this.qhasChartConfig=Ot.required(),this.sortable=Ie(()=>this.qhasChartConfig().sortable??!0),this.chartConfig=Ie(()=>this.qhasChartConfig().config),this.sortOptions=Ie(()=>{if(!this.sortable())return[];let o=Array.isArray(this.chartConfig().series)?this.chartConfig().series:[this.chartConfig().series];return this.toolbarService.getSortableOptions(o,this.selectedSeries())}),this.selectedSeries=se({}),this.sortConfiguration=se(void 0),this.mergeOptions=Ie(()=>{let o={};return!this.sortConfiguration()&&this.chartFilter()===void 0?o:this.chartConfigurationService.getTransformedDataset(this.chartConfig(),this.sortConfiguration(),this.chartFilter())}),this.getCssPropertyValue=Ri,this.destroyed$=new X}ngOnInit(){let e=Array.isArray(this.chartConfig().title)?this.chartConfig().title[0].text:this.chartConfig().title.text;this.title=nl(e)?"":e}onChartInit(e){this.eChartsInstance=e}onLegendChange(e){this.selectedSeries.set(e)}onRestore(){this.eChartsInstance.dispatchAction({type:"restore"}),this.eChartsInstance.dispatchAction({type:"legendAllSelect"}),this.sortOptions().length?this.sortConfiguration.set(E({},this.sortOptions()[0])):this.eChartsInstance.setOption(this.mergeOptions())}sortChart(e){this.sortConfiguration.set(e)}onToggleChartLabels(e){let n=this.eChartsInstance.getOption(),o={setXAxisLabels:this.qhasChartConfig().toggleXAxisLabels,setYAxisLabels:this.qhasChartConfig().toggleYAxisLabels,setSeriesLabels:this.qhasChartConfig().toggleSeriesLabels};this.eChartsInstance.setOption(this.chartConfigurationService.setChartLabelsVisibility(n,o,e))}ngOnDestroy(){this.destroyed$.next(!0),this.destroyed$.unsubscribe()}static{this.\u0275fac=function(n){return new(n||t)(_(ar),_(dn))}}static{this.\u0275cmp=F({type:t,selectors:[["app-qhas-chart"]],inputs:{chartFilter:[1,"chartFilter"],qhasChartConfig:[1,"qhasChartConfig"]},standalone:!0,features:[ze([Bl(),{provide:ar,useClass:ar},{provide:En,useClass:En},{provide:dn,useFactory:e=>new dn(e),deps:[En]}]),B],decls:8,vars:8,consts:[[1,"vcl-chart--container"],[1,"d-flex","gap-8","align-items-center"],["tooltipPosition","top",1,"chart-title","q-text-1-primary","q-font-heading-sm-subtle",3,"appTooltipInfo","tooltipClasses"],[1,"scroll-wrapper"],[1,"chart-wrapper"],[3,"selectedOption","restored","toggleChartLabels","sortOptions"],["echarts","","role","img",1,"chart",3,"chartInit","chartLegendSelectChanged","chartLegendLegendSelectAll","options","merge"]],template:function(n,o){n&1&&(f(0,"div",0)(1,"div",1)(2,"h2",2),q(3),g()(),f(4,"div",3)(5,"div",4)(6,"app-qhas-chart-toolbar",5),I("selectedOption",function(s){return o.sortChart(s)})("restored",function(){return o.onRestore()})("toggleChartLabels",function(s){return o.onToggleChartLabels(s)}),g(),f(7,"div",6),I("chartInit",function(s){return o.onChartInit(s)})("chartLegendSelectChanged",function(s){return o.onLegendChange(s.selected)})("chartLegendLegendSelectAll",function(s){return o.onLegendChange(s.selected)}),g()()()()),n&2&&(u(2),b("appTooltipInfo",o.chartConfig().aria.label.description)("tooltipClasses",Ye(7,h3)),u(),le(" ",o.title," "),u(3),b("sortOptions",o.sortOptions()),u(),b("options",o.chartConfig())("merge",o.mergeOptions()),et("data-testid","chart-"+o.title))},dependencies:[Ve,Dt,Le,Vl,NE,sj],styles:["[class^=vcl-][_ngcontent-%COMP%] .scroll-wrapper[_ngcontent-%COMP%]{overflow:auto}[class^=vcl-][_ngcontent-%COMP%] .header-wrapper[_ngcontent-%COMP%]{padding-right:1rem}[class^=vcl-][_ngcontent-%COMP%] .chart-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;position:relative;min-height:400px;max-height:100%;min-width:500px;width:100%;margin-bottom:1rem}[class^=vcl-][_ngcontent-%COMP%] .chart[_ngcontent-%COMP%]{width:100%;height:100%}[class^=vcl-][_ngcontent-%COMP%] .chart-title[_ngcontent-%COMP%]{padding-left:1rem;margin-bottom:0}[class^=vcl-][_ngcontent-%COMP%] .chart-title[_ngcontent-%COMP%] q-icon[_ngcontent-%COMP%]{display:flex}.vcl-chart--container[_ngcontent-%COMP%]{padding:1rem;background:var(--q-background-2);border:1px solid var(--q-border-1-default)}"]})}}return t})(),lj=(()=>{class t{constructor(){this.data=[],this.disableAccordion=!1,this.Search=va,this.ArrowDownUp=__,this.ArrowUp=Sc,this.Table2=av,this.ACCORDION_COLLAPSED=-1,this.ACCORDION_EXPANDED=0,this.searchOpTypes=se(!1),this.globalFilter="",this.pageSizeOptions=[5,10,20],this.showPaginator=se(!0),this.search$=new X,this.accordionState=se(this.ACCORDION_EXPANDED),this.destroy$=new X,this.showSearch=Ie(()=>this.accordionState()===this.ACCORDION_EXPANDED)}ngOnInit(){if(!this.data&&!this.qhasTable)throw new Error("You must provide data, tableTitle, and columns OR a qhasTable to this component");this.qhasTable&&(this.columns=this.qhasTable.columns,this.data=this.qhasTable.data,this.tableTitle=this.qhasTable.tableTitle),this.table=th(()=>({columns:this.columns,data:this.data,getCoreRowModel:Wp(),getSortedRowModel:wE(),getFilteredRowModel:yE(),getPaginationRowModel:CE(),getExpandedRowModel:vE(),getRowCanExpand:()=>!0})),this.headerSize=this.getHeaderSize(this.table),this.paginationHelper=TE(this.table),this.paginationHelper.setRowsPerPage(this.pageSizeOptions[0]),this.showPaginator.set(this.data.length>Math.min(...this.pageSizeOptions)),this.table.updateOptions({data:this.data}),this.setupSearch()}getHeaderSize(e){let r=e.getAllColumns().length;return 12<r&&r<15?"header-small":""}setupSearch(){this.search$.pipe(ye(this.destroy$),ns(300),br()).subscribe(e=>{this.table.setGlobalFilter(e)})}toggleSearch(e){e.stopPropagation(),this.table.resetGlobalFilter(),this.searchOpTypes.set(!this.searchOpTypes())}onAccordionChange(e){let n=this.accordionState()===e.index?this.ACCORDION_COLLAPSED:this.ACCORDION_EXPANDED;this.accordionState.set(n)}applyFilter(e){this.search$.next(e)}ngOnDestroy(){this.destroy$.next()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=F({type:t,selectors:[["app-recursive-table"]],inputs:{data:"data",columns:"columns",tableTitle:"tableTitle",qhasTable:"qhasTable",disableAccordion:"disableAccordion"},standalone:!0,features:[B],decls:6,vars:6,consts:[["tableTemplate",""],["tableTitleLabel",""],["multiple","","data-testid","accordion-recursive-table",1,"table-accordion",3,"changed","activeIndex"],[3,"content","label","startIcon","disabled","expanded"],[1,"vcl-recursive-table--root"],[1,"vcl-recursive-table--table-container"],["q-table","",1,"w-100",3,"ngClass"],["q-thead",""],["q-tr",""],["q-tbody",""],["q-pagination","",1,"pagination-container",3,"totalRows","rowsPerPage","page"],["q-pagination-page-metadata",""],["metadata-template",""],["showPageMetadata","false",1,"mt-4",3,"totalRows","rowsPerPage","rowsPerPageOptions","page"],["q-th","","qTooltipPlacement","top-start",3,"qTooltip"],[1,"d-flex","align-items-center"],[3,"header"],["dense","","size","s",1,"transition-[transform]","ease-in-out",3,"icon","ngStyle"],["dense","","size","s",1,"transition-[transform]","ease-in-out",3,"click","icon","ngStyle"],["q-tr","",3,"ngClass"],["q-td",""],[3,"cell"],["q-td","",1,"padding-0"],[3,"data","columns","tableTitle","disableAccordion"],["showPageMetadata","false",1,"mt-4",3,"rowsPerPageChanged","pageChanged","totalRows","rowsPerPage","rowsPerPageOptions","page"],[1,"vcl-recursive-table--title-container"],[1,"d-flex","gap-8","align-items-center"],["tooltipPosition","right",1,"q-text-1-primary","q-font-heading-xxs",3,"appTooltipInfo","tooltipClasses"],[1,"d-flex","align-items-center","h-100"],["data-testid","input-table-search","fullWidth","","size","m",3,"placeholder","ngModel"],["data-testid","icon-btn-table-search","qTooltip","Click to toggle table search","qTooltipPlacement","top-start",1,"h-100",3,"click","icon"],["data-testid","input-table-search","fullWidth","","size","m",3,"ngModelChange","click","placeholder","ngModel"]],template:function(n,o){if(n&1){let r=Z();f(0,"q-accordion",2),I("changed",function(a){return R(r),A(o.onAccordionChange(a))}),M(1,"q-accordion-item",3),g(),T(2,P3,13,6,"ng-template",null,0,ke)(4,D3,5,5,"ng-template",null,1,ke)}if(n&2){let r=ue(3),s=ue(5);b("activeIndex",o.accordionState()),u(),b("content",r)("label",s)("startIcon",o.Table2)("disabled",o.disableAccordion)("expanded",o.disableAccordion)}},dependencies:[t,xr,Fl,Qp,SE,Zp,Xp,Yp,Jp,eh,Kp,Ve,Ft,mt,vo,Gn,zt,on,_t,Qt,ji,Sv,Cv,wv,yv,bv,ri,Di,Ii,Lt,Le,st,NE],styles:[".vcl-recursive-table--root[_ngcontent-%COMP%]{display:flex;flex-direction:column}.vcl-recursive-table--table-container[_ngcontent-%COMP%]{overflow-x:auto}.vcl-recursive-table--title-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-content:center;align-items:center;height:100%;flex:1 1 auto}[class^=vcl-][_ngcontent-%COMP%] .pagination-container[_ngcontent-%COMP%]{background:var(--q-background-3);display:flex;justify-content:space-between;padding:8px;align-items:center}[class^=vcl-][_ngcontent-%COMP%] .focus-expanded-row-border[_ngcontent-%COMP%]{border:1px solid var(--q-border-focus);border-top:0px}[class^=vcl-][_ngcontent-%COMP%] .focus-selected-row-border[_ngcontent-%COMP%]{border:1px solid var(--q-border-focus);border-bottom:0px}.q-icon-button--root[_ngcontent-%COMP%]{height:100%}.header-small[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:last-child, .header-small[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:last-child{width:10%}.vcl-recursive-table--container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{text-align:left;white-space:normal;max-width:300px}.vcl-recursive-table--container[_ngcontent-%COMP%] .q-table--table.header-small[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{min-width:7.5em}.vcl-recursive-table--container[_ngcontent-%COMP%] .q-table--td.padding-0[_ngcontent-%COMP%]{padding:0}.vcl-recursive-table--root[_ngcontent-%COMP%] .vcl-recursive-table--table-container[_ngcontent-%COMP%] .q-table--th.q-divider[_ngcontent-%COMP%], .vcl-recursive-table--root[_ngcontent-%COMP%] .vcl-recursive-table--table-container[_ngcontent-%COMP%] .q-table--td.q-divider[_ngcontent-%COMP%]{border:none;border-right:none}[_nghost-%COMP%] .q-accordion-item--title-bar, [_nghost-%COMP%] .q-accordion-item--title-bar.q-disabled{background:var(--q-background-3)}[_nghost-%COMP%] .q-accordion--root{padding:0}[_nghost-%COMP%] .q-accordion-item--root .q-accordion-item--panel{padding:0}"]})}}return t})(),FE=(()=>{class t{constructor(e,n,o,r,s,a){this.qhasService=e,this.qhasChartService=n,this.qhasChartConfigService=o,this.darkModeService=r,this.qhasTableService=s,this.translateService=a,this.schemaError=Vn(),this.OVERALL_SUMMARY_TAB=0,this.QNN_OP_TYPES_TAB=1,this.HTP_OP_TYPES_TAB=2,this.TRANSLATION_REGISTRY=Et,this.isLoading=se(!1),this.bottomCharts=se([]),this.topCharts=se([]),this.chartOptionControl=new _a(void 0),this.coreOptionControl=new _a(void 0),this.chartFilter=se(void 0),this.activeSubtabIndex=se(0),this.activeTabIndex=se(0),this.qhasComboboxOptions=se({}),this.qhasCoreComboboxOptions=se({}),this.destroy$=new X,_n(()=>{this.darkModeService.getMode()&&this.report&&this.chartChanged(this.chartOptionControl.value)},{allowSignalWrites:!0}),this.currentTabOptions=Ie(()=>{let l=this.getTabOptions(this.activeTabIndex(),this.activeSubtabIndex(),this.qhasComboboxOptions());return this.chartOptionControl.setValue(l[0]),l}),this.currentCoreOptions=Ie(()=>{let l=this.getTabOptions(this.activeTabIndex(),this.activeSubtabIndex(),this.qhasCoreComboboxOptions());return this.coreOptionControl.setValue(l[0]),l})}ngOnInit(){this.chartOptionControl.valueChanges.pipe(ye(this.destroy$)).subscribe(e=>{this.chartChanged(e)}),this.coreOptionControl.valueChanges.pipe(ye(this.destroy$)).subscribe(e=>{if(e?.value!==void 0){let n=this.qhasChartConfigService.getFilteredTransform("htp",e.value);this.chartFilter.set([n])}else this.chartFilter.set(void 0)})}ngOnChanges(e){return Y(this,null,function*(){if(e.file&&e.file.currentValue!==e.file.previousValue){this.isLoading.set(!0);try{let n=yield this.qhasService.processJson(this.file);this.report=n,this.updateTables(n),this.qhasComboboxOptions.set(this.qhasChartService.getChartOptions(n)),this.qhasCoreComboboxOptions.set(this.qhasChartService.getCoreOptions(n)),this.tabChange(this.OVERALL_SUMMARY_TAB)}catch(n){n instanceof so?this.schemaError.emit(n):console.error(n)}this.isLoading.set(!1)}})}updateTables(e){let n={expandColumn:{cell:()=>og,id:"expansion",header:this.translateService.instant(Et.TITLES_TABLE_DOMINANT_PATH_CYCLES),meta:{tooltip:this.translateService.instant(Et.TOOLTIPS_TABLE_HTP_DOMINANT_PATH_SHOW_NESTED_TABLE)}},expandOnColumnKey:"dominant_path_cycles",table:new cn(E({},this.qhasTableService.dominantPathQHASTable))};this.qhasTableService.tabToTableMap={[this.OVERALL_SUMMARY_TAB]:[new cn({tableTitle:this.translateService.instant(Et.TITLES_TABLE_OVERALL_SUMMARY),tableTooltip:this.translateService.instant(Et.TOOLTIPS_TABLE_OVERALL_SUMMARY),data:e.htpOverallSummary,columns:this.qhasTableService.htpOverallSummaryColumns,nestedTableProperties:{expandOnColumnKey:"htp_resources",expandColumn:{cell:()=>og,id:"expansion",header:this.translateService.instant(Et.TITLES_TABLE_HTP_RESOURCES),meta:{tooltip:this.translateService.instant(Et.TOOLTIPS_TABLE_OVERALL_SUMMARY_SHOW_NESTED_TABLE)}},table:new cn({columns:this.qhasTableService.htpResourcesColumns,tableTitle:this.translateService.instant(Et.TITLES_TABLE_HTP_RESOURCES)})}})],[this.QNN_OP_TYPES_TAB]:[new cn({tableTitle:this.translateService.instant(Et.TITLES_TABLE_QNN_OP_TYPES),data:e.qnnOpTypes,columns:this.qhasTableService.qnnOperationTypeColumns,nestedTableProperties:n}),new cn({tableTitle:this.translateService.instant(Et.TITLES_TABLE_QNN_OP_INSTANCES),data:e.qnnOpInstancesNodes,columns:this.qhasTableService.qnnOperationInstanceNodesColumns,nestedTableProperties:n})],[this.HTP_OP_TYPES_TAB]:[new cn({tableTitle:this.translateService.instant(Et.TITLES_TABLE_HTP_OP_TYPES),data:e.htpOpTypes,columns:this.qhasTableService.htpOperationTypesColumns,nestedTableProperties:n}),new cn({tableTitle:this.translateService.instant(Et.TITLES_TABLE_HTP_OP_INSTANCES),data:e.htpOpInstances,columns:this.qhasTableService.htpOperationInstancesColumns,nestedTableProperties:{expandOnColumnKey:"properties",expandColumn:{cell:()=>og,id:"expansion",header:this.translateService.instant(Et.TITLES_TABLE_PROPERTIES),meta:{tooltip:this.translateService.instant(Et.TOOLTIPS_TABLE_HTP_OP_INSTANCES_SHOW_NESTED_TABLE)}},table:new cn({columns:this.qhasTableService.htpOperationInstancesPropertiesColumns,tableTitle:this.translateService.instant(Et.TITLES_TABLE_PROPERTIES)})}})]}}tabChange(e){this.activeSubtabIndex.set(0),this.activeTabIndex.set(e)}subtabChange(e){this.activeSubtabIndex.set(e)}chartChanged(e){let{bottomCharts:n,topCharts:o}=this.qhasChartService.getChartConfigsFor(e,this.activeTabIndex(),this.activeSubtabIndex());this.bottomCharts.set(n),this.topCharts.set(o)}ngOnDestroy(){this.destroy$.next()}getTabOptions(e,n,o){let r=this.getTabKey(e);return o?.[r]?.[n]??[]}getTabKey(e){let n="";switch(e){case this.OVERALL_SUMMARY_TAB:n="overallSummary";break;case this.QNN_OP_TYPES_TAB:n="qnnOpInstances";break;case this.HTP_OP_TYPES_TAB:n="htpOpInstances";break;default:console.error(`No tab options for tab in ${e}`)}return n}static{this.\u0275fac=function(n){return new(n||t)(_(cr),_(lr),_(dn),_(Uo),_(Mo),_(LE))}}static{this.\u0275cmp=F({type:t,selectors:[["app-htp-analysis-summary"]],inputs:{file:"file"},outputs:{schemaError:"schemaError"},standalone:!0,features:[ze([{provide:cr,useClass:cr},{provide:Mo,useClass:Mo},{provide:En,useClass:En},{provide:dn,useFactory:e=>new dn(e),deps:[En]},{provide:lr,useFactory:(e,n,o)=>new lr(e,n,o),deps:[En,Mo,dn]},Bl()]),$e,B],decls:6,vars:1,consts:[["multiTabPanelTemplate",""],["qhasTabContentTemplate",""],[1,"vcl-htp-analysis-summary--center"],["q-tabs","","orientation","vertical","size","l",1,"vcl-htp-analysis-summary--root",3,"activeIndex"],["q-tabs","","orientation","vertical","size","l",1,"vcl-htp-analysis-summary--root",3,"activeIndexChanged","activeIndex"],["q-tab-list",""],["data-testid","btn-qhas-overall-summary","q-tab",""],["data-testid","btn-qhas-qnn-op-instances","q-tab",""],["data-testid","btn-qhas-htp-op-instances","q-tab",""],["q-tab-panels",""],["data-testid","panel-qhas-overall-summary","q-tab-panel",""],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["data-testid","panel-qhas-qnn-op-instances","q-tab-panel",""],["data-testid","panel-qhas-htp-op-instances","q-tab-panel",""],["q-tabs","",3,"activeIndexChanged","activeIndex"],["q-tab",""],["q-tab-panel",""],[1,"vcl-htp-analysis--container"],[1,"vcl-htp-analysis-summary--tables-container","grid-r-1-span-1","grid-c-1-span-2"],[1,"mt-8",3,"qhasTable"],[1,"vcl-htp-analysis-summary--top-chart-and-chart-selection-container"],[1,"d-flex","gap-8"],["fullWidth","","appendTo","portal","data-testid","options-chart-type","placeholder","Choose a chart option","optionLabel","title",1,"chart-combobox",3,"multiple","formControl","options"],["fullWidth","","appendTo","portal","data-testid","options-core","placeholder","Choose a core option","optionLabel","title","clearable","false","disableOptionToggle","true",1,"chart-combobox",3,"formControl","options"],[1,"d-flex","flex-wrap","flex-1"],[1,"vcl-htp-analysis-summary--bottom-charts-container"],[1,"vcl-htp-analysis--chart-container",3,"ngClass"],[3,"qhasChartConfig","chartFilter"],["echarts","","role","img",1,"top-chart-container",3,"options"]],template:function(n,o){n&1&&T(0,k3,2,0,"div",2)(1,V3,15,25,"div",3)(2,q3,7,1,"ng-template",null,0,ke)(4,Q3,12,7,"ng-template",null,1,ke),n&2&&L(o.isLoading()?0:o.report?1:-1)},dependencies:[xr,Mv,Pv,Dv,Iv,Ov,Fl,mt,vo,oi,zt,_t,Qt,Ci,zi,lj,Mi,Qn,aj,zo,s_,Vl,Le],styles:["[class^=vcl-][_ngcontent-%COMP%] .h-100[_ngcontent-%COMP%]{height:100%}[class^=vcl-][_ngcontent-%COMP%] .w-100[_ngcontent-%COMP%]{width:100%}[class^=vcl-][_ngcontent-%COMP%] .w-25[_ngcontent-%COMP%]{width:25%}[class^=vcl-][_ngcontent-%COMP%] .w-50[_ngcontent-%COMP%]{width:50%}[class^=vcl-][_ngcontent-%COMP%] .mt-0[_ngcontent-%COMP%]{margin-top:0}[class^=vcl-][_ngcontent-%COMP%] .pt-0[_ngcontent-%COMP%]{padding-top:0}[class^=vcl-][_ngcontent-%COMP%] .font-bold[_ngcontent-%COMP%]{font-weight:700}[class^=vcl-][_ngcontent-%COMP%] .text-ellipsis[_ngcontent-%COMP%]{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}[class^=vcl-][_ngcontent-%COMP%] .d-flex[_ngcontent-%COMP%]{display:flex}[class^=vcl-][_ngcontent-%COMP%] .d-inline-flex[_ngcontent-%COMP%]{display:inline-flex}[class^=vcl-][_ngcontent-%COMP%] .flex-grow-1[_ngcontent-%COMP%]{flex-grow:1}[class^=vcl-][_ngcontent-%COMP%] .justify-content-between[_ngcontent-%COMP%]{justify-content:space-between}[class^=vcl-][_ngcontent-%COMP%] .justify-content-center[_ngcontent-%COMP%]{justify-content:center}[class^=vcl-][_ngcontent-%COMP%] .justify-content-right[_ngcontent-%COMP%]{justify-content:right}[class^=vcl-][_ngcontent-%COMP%] .justify-content-around[_ngcontent-%COMP%]{justify-content:space-around}[class^=vcl-][_ngcontent-%COMP%] .justify-content-start[_ngcontent-%COMP%]{justify-content:flex-start}[class^=vcl-][_ngcontent-%COMP%] .justify-content-end[_ngcontent-%COMP%]{justify-content:flex-end}[class^=vcl-][_ngcontent-%COMP%] .flex-column[_ngcontent-%COMP%]{flex-direction:column}[class^=vcl-][_ngcontent-%COMP%] .align-items-center[_ngcontent-%COMP%]{align-items:center}[class^=vcl-][_ngcontent-%COMP%] .align-items-baseline[_ngcontent-%COMP%]{align-items:baseline}[class^=vcl-][_ngcontent-%COMP%] .align-items-end[_ngcontent-%COMP%]{align-items:flex-end}[class^=vcl-][_ngcontent-%COMP%] .align-items-flex-start[_ngcontent-%COMP%]{align-items:flex-start}[class^=vcl-][_ngcontent-%COMP%] .align-self-start[_ngcontent-%COMP%]{align-self:flex-start}[class^=vcl-][_ngcontent-%COMP%] .align-self-end[_ngcontent-%COMP%]{align-self:flex-end}[class^=vcl-][_ngcontent-%COMP%] .align-self-center[_ngcontent-%COMP%]{align-self:center}[class^=vcl-][_ngcontent-%COMP%] .align-self-start[_ngcontent-%COMP%]{align-self:start}[class^=vcl-][_ngcontent-%COMP%] .align-self-baseline[_ngcontent-%COMP%]{align-self:baseline}[class^=vcl-][_ngcontent-%COMP%] .align-self-stretch[_ngcontent-%COMP%]{align-self:stretch}[class^=vcl-][_ngcontent-%COMP%] .flex-column-grow[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex-grow:1}[class^=vcl-][_ngcontent-%COMP%] .gap-4[_ngcontent-%COMP%]{gap:.25rem}[class^=vcl-][_ngcontent-%COMP%] .gap-8[_ngcontent-%COMP%]{gap:.5rem}[class^=vcl-][_ngcontent-%COMP%] .gap-12[_ngcontent-%COMP%]{gap:.75rem}[class^=vcl-][_ngcontent-%COMP%] .gap-16[_ngcontent-%COMP%]{gap:1rem}[class^=vcl-][_ngcontent-%COMP%] .gap-24[_ngcontent-%COMP%]{gap:1.5rem}[class^=vcl-][_ngcontent-%COMP%] .flex-column-reverse[_ngcontent-%COMP%]{flex-direction:column-reverse}[class^=vcl-][_ngcontent-%COMP%] .flex-1[_ngcontent-%COMP%]{flex:1 1 auto}[class^=vcl-][_ngcontent-%COMP%] .flex-wrap[_ngcontent-%COMP%]{flex-wrap:wrap}[class^=vcl-][_ngcontent-%COMP%] .white-space-pre-line[_ngcontent-%COMP%]{white-space:pre-line}.d-grid[_ngcontent-%COMP%]{display:grid}.grid-c-1-span-1[_ngcontent-%COMP%]{grid-column:1/span 1}.grid-c-1-span-2[_ngcontent-%COMP%]{grid-column:1/span 2}.grid-c-1-span-3[_ngcontent-%COMP%]{grid-column:1/span 3}.grid-c-1-span-4[_ngcontent-%COMP%]{grid-column:1/span 4}.grid-c-1-span-5[_ngcontent-%COMP%]{grid-column:1/span 5}.grid-c-1-span-6[_ngcontent-%COMP%]{grid-column:1/span 6}.grid-c-1-span-7[_ngcontent-%COMP%]{grid-column:1/span 7}.grid-c-1-span-8[_ngcontent-%COMP%]{grid-column:1/span 8}.grid-c-1-span-9[_ngcontent-%COMP%]{grid-column:1/span 9}.grid-c-1-span-10[_ngcontent-%COMP%]{grid-column:1/span 10}.grid-c-1-span-11[_ngcontent-%COMP%]{grid-column:1/span 11}.grid-c-1-span-12[_ngcontent-%COMP%]{grid-column:1/span 12}.grid-c-2-span-1[_ngcontent-%COMP%]{grid-column:2/span 1}.grid-c-2-span-2[_ngcontent-%COMP%]{grid-column:2/span 2}.grid-c-2-span-3[_ngcontent-%COMP%]{grid-column:2/span 3}.grid-c-2-span-4[_ngcontent-%COMP%]{grid-column:2/span 4}.grid-c-2-span-5[_ngcontent-%COMP%]{grid-column:2/span 5}.grid-c-2-span-6[_ngcontent-%COMP%]{grid-column:2/span 6}.grid-c-2-span-7[_ngcontent-%COMP%]{grid-column:2/span 7}.grid-c-2-span-8[_ngcontent-%COMP%]{grid-column:2/span 8}.grid-c-2-span-9[_ngcontent-%COMP%]{grid-column:2/span 9}.grid-c-2-span-10[_ngcontent-%COMP%]{grid-column:2/span 10}.grid-c-2-span-11[_ngcontent-%COMP%]{grid-column:2/span 11}.grid-c-2-span-12[_ngcontent-%COMP%]{grid-column:2/span 12}.grid-c-3-span-1[_ngcontent-%COMP%]{grid-column:3/span 1}.grid-c-3-span-2[_ngcontent-%COMP%]{grid-column:3/span 2}.grid-c-3-span-3[_ngcontent-%COMP%]{grid-column:3/span 3}.grid-c-3-span-4[_ngcontent-%COMP%]{grid-column:3/span 4}.grid-c-3-span-5[_ngcontent-%COMP%]{grid-column:3/span 5}.grid-c-3-span-6[_ngcontent-%COMP%]{grid-column:3/span 6}.grid-c-3-span-7[_ngcontent-%COMP%]{grid-column:3/span 7}.grid-c-3-span-8[_ngcontent-%COMP%]{grid-column:3/span 8}.grid-c-3-span-9[_ngcontent-%COMP%]{grid-column:3/span 9}.grid-c-3-span-10[_ngcontent-%COMP%]{grid-column:3/span 10}.grid-c-3-span-11[_ngcontent-%COMP%]{grid-column:3/span 11}.grid-c-3-span-12[_ngcontent-%COMP%]{grid-column:3/span 12}.grid-c-4-span-1[_ngcontent-%COMP%]{grid-column:4/span 1}.grid-c-4-span-2[_ngcontent-%COMP%]{grid-column:4/span 2}.grid-c-4-span-3[_ngcontent-%COMP%]{grid-column:4/span 3}.grid-c-4-span-4[_ngcontent-%COMP%]{grid-column:4/span 4}.grid-c-4-span-5[_ngcontent-%COMP%]{grid-column:4/span 5}.grid-c-4-span-6[_ngcontent-%COMP%]{grid-column:4/span 6}.grid-c-4-span-7[_ngcontent-%COMP%]{grid-column:4/span 7}.grid-c-4-span-8[_ngcontent-%COMP%]{grid-column:4/span 8}.grid-c-4-span-9[_ngcontent-%COMP%]{grid-column:4/span 9}.grid-c-4-span-10[_ngcontent-%COMP%]{grid-column:4/span 10}.grid-c-4-span-11[_ngcontent-%COMP%]{grid-column:4/span 11}.grid-c-4-span-12[_ngcontent-%COMP%]{grid-column:4/span 12}.grid-c-5-span-1[_ngcontent-%COMP%]{grid-column:5/span 1}.grid-c-5-span-2[_ngcontent-%COMP%]{grid-column:5/span 2}.grid-c-5-span-3[_ngcontent-%COMP%]{grid-column:5/span 3}.grid-c-5-span-4[_ngcontent-%COMP%]{grid-column:5/span 4}.grid-c-5-span-5[_ngcontent-%COMP%]{grid-column:5/span 5}.grid-c-5-span-6[_ngcontent-%COMP%]{grid-column:5/span 6}.grid-c-5-span-7[_ngcontent-%COMP%]{grid-column:5/span 7}.grid-c-5-span-8[_ngcontent-%COMP%]{grid-column:5/span 8}.grid-c-5-span-9[_ngcontent-%COMP%]{grid-column:5/span 9}.grid-c-5-span-10[_ngcontent-%COMP%]{grid-column:5/span 10}.grid-c-5-span-11[_ngcontent-%COMP%]{grid-column:5/span 11}.grid-c-5-span-12[_ngcontent-%COMP%]{grid-column:5/span 12}.grid-c-6-span-1[_ngcontent-%COMP%]{grid-column:6/span 1}.grid-c-6-span-2[_ngcontent-%COMP%]{grid-column:6/span 2}.grid-c-6-span-3[_ngcontent-%COMP%]{grid-column:6/span 3}.grid-c-6-span-4[_ngcontent-%COMP%]{grid-column:6/span 4}.grid-c-6-span-5[_ngcontent-%COMP%]{grid-column:6/span 5}.grid-c-6-span-6[_ngcontent-%COMP%]{grid-column:6/span 6}.grid-c-6-span-7[_ngcontent-%COMP%]{grid-column:6/span 7}.grid-c-6-span-8[_ngcontent-%COMP%]{grid-column:6/span 8}.grid-c-6-span-9[_ngcontent-%COMP%]{grid-column:6/span 9}.grid-c-6-span-10[_ngcontent-%COMP%]{grid-column:6/span 10}.grid-c-6-span-11[_ngcontent-%COMP%]{grid-column:6/span 11}.grid-c-6-span-12[_ngcontent-%COMP%]{grid-column:6/span 12}.grid-c-7-span-1[_ngcontent-%COMP%]{grid-column:7/span 1}.grid-c-7-span-2[_ngcontent-%COMP%]{grid-column:7/span 2}.grid-c-7-span-3[_ngcontent-%COMP%]{grid-column:7/span 3}.grid-c-7-span-4[_ngcontent-%COMP%]{grid-column:7/span 4}.grid-c-7-span-5[_ngcontent-%COMP%]{grid-column:7/span 5}.grid-c-7-span-6[_ngcontent-%COMP%]{grid-column:7/span 6}.grid-c-7-span-7[_ngcontent-%COMP%]{grid-column:7/span 7}.grid-c-7-span-8[_ngcontent-%COMP%]{grid-column:7/span 8}.grid-c-7-span-9[_ngcontent-%COMP%]{grid-column:7/span 9}.grid-c-7-span-10[_ngcontent-%COMP%]{grid-column:7/span 10}.grid-c-7-span-11[_ngcontent-%COMP%]{grid-column:7/span 11}.grid-c-7-span-12[_ngcontent-%COMP%]{grid-column:7/span 12}.grid-c-8-span-1[_ngcontent-%COMP%]{grid-column:8/span 1}.grid-c-8-span-2[_ngcontent-%COMP%]{grid-column:8/span 2}.grid-c-8-span-3[_ngcontent-%COMP%]{grid-column:8/span 3}.grid-c-8-span-4[_ngcontent-%COMP%]{grid-column:8/span 4}.grid-c-8-span-5[_ngcontent-%COMP%]{grid-column:8/span 5}.grid-c-8-span-6[_ngcontent-%COMP%]{grid-column:8/span 6}.grid-c-8-span-7[_ngcontent-%COMP%]{grid-column:8/span 7}.grid-c-8-span-8[_ngcontent-%COMP%]{grid-column:8/span 8}.grid-c-8-span-9[_ngcontent-%COMP%]{grid-column:8/span 9}.grid-c-8-span-10[_ngcontent-%COMP%]{grid-column:8/span 10}.grid-c-8-span-11[_ngcontent-%COMP%]{grid-column:8/span 11}.grid-c-8-span-12[_ngcontent-%COMP%]{grid-column:8/span 12}.grid-c-9-span-1[_ngcontent-%COMP%]{grid-column:9/span 1}.grid-c-9-span-2[_ngcontent-%COMP%]{grid-column:9/span 2}.grid-c-9-span-3[_ngcontent-%COMP%]{grid-column:9/span 3}.grid-c-9-span-4[_ngcontent-%COMP%]{grid-column:9/span 4}.grid-c-9-span-5[_ngcontent-%COMP%]{grid-column:9/span 5}.grid-c-9-span-6[_ngcontent-%COMP%]{grid-column:9/span 6}.grid-c-9-span-7[_ngcontent-%COMP%]{grid-column:9/span 7}.grid-c-9-span-8[_ngcontent-%COMP%]{grid-column:9/span 8}.grid-c-9-span-9[_ngcontent-%COMP%]{grid-column:9/span 9}.grid-c-9-span-10[_ngcontent-%COMP%]{grid-column:9/span 10}.grid-c-9-span-11[_ngcontent-%COMP%]{grid-column:9/span 11}.grid-c-9-span-12[_ngcontent-%COMP%]{grid-column:9/span 12}.grid-c-10-span-1[_ngcontent-%COMP%]{grid-column:10/span 1}.grid-c-10-span-2[_ngcontent-%COMP%]{grid-column:10/span 2}.grid-c-10-span-3[_ngcontent-%COMP%]{grid-column:10/span 3}.grid-c-10-span-4[_ngcontent-%COMP%]{grid-column:10/span 4}.grid-c-10-span-5[_ngcontent-%COMP%]{grid-column:10/span 5}.grid-c-10-span-6[_ngcontent-%COMP%]{grid-column:10/span 6}.grid-c-10-span-7[_ngcontent-%COMP%]{grid-column:10/span 7}.grid-c-10-span-8[_ngcontent-%COMP%]{grid-column:10/span 8}.grid-c-10-span-9[_ngcontent-%COMP%]{grid-column:10/span 9}.grid-c-10-span-10[_ngcontent-%COMP%]{grid-column:10/span 10}.grid-c-10-span-11[_ngcontent-%COMP%]{grid-column:10/span 11}.grid-c-10-span-12[_ngcontent-%COMP%]{grid-column:10/span 12}.grid-c-11-span-1[_ngcontent-%COMP%]{grid-column:11/span 1}.grid-c-11-span-2[_ngcontent-%COMP%]{grid-column:11/span 2}.grid-c-11-span-3[_ngcontent-%COMP%]{grid-column:11/span 3}.grid-c-11-span-4[_ngcontent-%COMP%]{grid-column:11/span 4}.grid-c-11-span-5[_ngcontent-%COMP%]{grid-column:11/span 5}.grid-c-11-span-6[_ngcontent-%COMP%]{grid-column:11/span 6}.grid-c-11-span-7[_ngcontent-%COMP%]{grid-column:11/span 7}.grid-c-11-span-8[_ngcontent-%COMP%]{grid-column:11/span 8}.grid-c-11-span-9[_ngcontent-%COMP%]{grid-column:11/span 9}.grid-c-11-span-10[_ngcontent-%COMP%]{grid-column:11/span 10}.grid-c-11-span-11[_ngcontent-%COMP%]{grid-column:11/span 11}.grid-c-11-span-12[_ngcontent-%COMP%]{grid-column:11/span 12}.grid-c-12-span-1[_ngcontent-%COMP%]{grid-column:12/span 1}.grid-c-12-span-2[_ngcontent-%COMP%]{grid-column:12/span 2}.grid-c-12-span-3[_ngcontent-%COMP%]{grid-column:12/span 3}.grid-c-12-span-4[_ngcontent-%COMP%]{grid-column:12/span 4}.grid-c-12-span-5[_ngcontent-%COMP%]{grid-column:12/span 5}.grid-c-12-span-6[_ngcontent-%COMP%]{grid-column:12/span 6}.grid-c-12-span-7[_ngcontent-%COMP%]{grid-column:12/span 7}.grid-c-12-span-8[_ngcontent-%COMP%]{grid-column:12/span 8}.grid-c-12-span-9[_ngcontent-%COMP%]{grid-column:12/span 9}.grid-c-12-span-10[_ngcontent-%COMP%]{grid-column:12/span 10}.grid-c-12-span-11[_ngcontent-%COMP%]{grid-column:12/span 11}.grid-c-12-span-12[_ngcontent-%COMP%]{grid-column:12/span 12}.grid-r-1-span-1[_ngcontent-%COMP%]{grid-row:1/span 1}.grid-r-1-span-2[_ngcontent-%COMP%]{grid-row:1/span 2}.grid-r-1-span-3[_ngcontent-%COMP%]{grid-row:1/span 3}.grid-r-1-span-4[_ngcontent-%COMP%]{grid-row:1/span 4}.grid-r-1-span-5[_ngcontent-%COMP%]{grid-row:1/span 5}.grid-r-1-span-6[_ngcontent-%COMP%]{grid-row:1/span 6}.grid-r-1-span-7[_ngcontent-%COMP%]{grid-row:1/span 7}.grid-r-1-span-8[_ngcontent-%COMP%]{grid-row:1/span 8}.grid-r-1-span-9[_ngcontent-%COMP%]{grid-row:1/span 9}.grid-r-1-span-10[_ngcontent-%COMP%]{grid-row:1/span 10}.grid-r-1-span-11[_ngcontent-%COMP%]{grid-row:1/span 11}.grid-r-1-span-12[_ngcontent-%COMP%]{grid-row:1/span 12}.grid-r-2-span-1[_ngcontent-%COMP%]{grid-row:2/span 1}.grid-r-2-span-2[_ngcontent-%COMP%]{grid-row:2/span 2}.grid-r-2-span-3[_ngcontent-%COMP%]{grid-row:2/span 3}.grid-r-2-span-4[_ngcontent-%COMP%]{grid-row:2/span 4}.grid-r-2-span-5[_ngcontent-%COMP%]{grid-row:2/span 5}.grid-r-2-span-6[_ngcontent-%COMP%]{grid-row:2/span 6}.grid-r-2-span-7[_ngcontent-%COMP%]{grid-row:2/span 7}.grid-r-2-span-8[_ngcontent-%COMP%]{grid-row:2/span 8}.grid-r-2-span-9[_ngcontent-%COMP%]{grid-row:2/span 9}.grid-r-2-span-10[_ngcontent-%COMP%]{grid-row:2/span 10}.grid-r-2-span-11[_ngcontent-%COMP%]{grid-row:2/span 11}.grid-r-2-span-12[_ngcontent-%COMP%]{grid-row:2/span 12}.grid-r-3-span-1[_ngcontent-%COMP%]{grid-row:3/span 1}.grid-r-3-span-2[_ngcontent-%COMP%]{grid-row:3/span 2}.grid-r-3-span-3[_ngcontent-%COMP%]{grid-row:3/span 3}.grid-r-3-span-4[_ngcontent-%COMP%]{grid-row:3/span 4}.grid-r-3-span-5[_ngcontent-%COMP%]{grid-row:3/span 5}.grid-r-3-span-6[_ngcontent-%COMP%]{grid-row:3/span 6}.grid-r-3-span-7[_ngcontent-%COMP%]{grid-row:3/span 7}.grid-r-3-span-8[_ngcontent-%COMP%]{grid-row:3/span 8}.grid-r-3-span-9[_ngcontent-%COMP%]{grid-row:3/span 9}.grid-r-3-span-10[_ngcontent-%COMP%]{grid-row:3/span 10}.grid-r-3-span-11[_ngcontent-%COMP%]{grid-row:3/span 11}.grid-r-3-span-12[_ngcontent-%COMP%]{grid-row:3/span 12}.grid-r-4-span-1[_ngcontent-%COMP%]{grid-row:4/span 1}.grid-r-4-span-2[_ngcontent-%COMP%]{grid-row:4/span 2}.grid-r-4-span-3[_ngcontent-%COMP%]{grid-row:4/span 3}.grid-r-4-span-4[_ngcontent-%COMP%]{grid-row:4/span 4}.grid-r-4-span-5[_ngcontent-%COMP%]{grid-row:4/span 5}.grid-r-4-span-6[_ngcontent-%COMP%]{grid-row:4/span 6}.grid-r-4-span-7[_ngcontent-%COMP%]{grid-row:4/span 7}.grid-r-4-span-8[_ngcontent-%COMP%]{grid-row:4/span 8}.grid-r-4-span-9[_ngcontent-%COMP%]{grid-row:4/span 9}.grid-r-4-span-10[_ngcontent-%COMP%]{grid-row:4/span 10}.grid-r-4-span-11[_ngcontent-%COMP%]{grid-row:4/span 11}.grid-r-4-span-12[_ngcontent-%COMP%]{grid-row:4/span 12}.grid-r-5-span-1[_ngcontent-%COMP%]{grid-row:5/span 1}.grid-r-5-span-2[_ngcontent-%COMP%]{grid-row:5/span 2}.grid-r-5-span-3[_ngcontent-%COMP%]{grid-row:5/span 3}.grid-r-5-span-4[_ngcontent-%COMP%]{grid-row:5/span 4}.grid-r-5-span-5[_ngcontent-%COMP%]{grid-row:5/span 5}.grid-r-5-span-6[_ngcontent-%COMP%]{grid-row:5/span 6}.grid-r-5-span-7[_ngcontent-%COMP%]{grid-row:5/span 7}.grid-r-5-span-8[_ngcontent-%COMP%]{grid-row:5/span 8}.grid-r-5-span-9[_ngcontent-%COMP%]{grid-row:5/span 9}.grid-r-5-span-10[_ngcontent-%COMP%]{grid-row:5/span 10}.grid-r-5-span-11[_ngcontent-%COMP%]{grid-row:5/span 11}.grid-r-5-span-12[_ngcontent-%COMP%]{grid-row:5/span 12}.grid-r-6-span-1[_ngcontent-%COMP%]{grid-row:6/span 1}.grid-r-6-span-2[_ngcontent-%COMP%]{grid-row:6/span 2}.grid-r-6-span-3[_ngcontent-%COMP%]{grid-row:6/span 3}.grid-r-6-span-4[_ngcontent-%COMP%]{grid-row:6/span 4}.grid-r-6-span-5[_ngcontent-%COMP%]{grid-row:6/span 5}.grid-r-6-span-6[_ngcontent-%COMP%]{grid-row:6/span 6}.grid-r-6-span-7[_ngcontent-%COMP%]{grid-row:6/span 7}.grid-r-6-span-8[_ngcontent-%COMP%]{grid-row:6/span 8}.grid-r-6-span-9[_ngcontent-%COMP%]{grid-row:6/span 9}.grid-r-6-span-10[_ngcontent-%COMP%]{grid-row:6/span 10}.grid-r-6-span-11[_ngcontent-%COMP%]{grid-row:6/span 11}.grid-r-6-span-12[_ngcontent-%COMP%]{grid-row:6/span 12}.grid-r-7-span-1[_ngcontent-%COMP%]{grid-row:7/span 1}.grid-r-7-span-2[_ngcontent-%COMP%]{grid-row:7/span 2}.grid-r-7-span-3[_ngcontent-%COMP%]{grid-row:7/span 3}.grid-r-7-span-4[_ngcontent-%COMP%]{grid-row:7/span 4}.grid-r-7-span-5[_ngcontent-%COMP%]{grid-row:7/span 5}.grid-r-7-span-6[_ngcontent-%COMP%]{grid-row:7/span 6}.grid-r-7-span-7[_ngcontent-%COMP%]{grid-row:7/span 7}.grid-r-7-span-8[_ngcontent-%COMP%]{grid-row:7/span 8}.grid-r-7-span-9[_ngcontent-%COMP%]{grid-row:7/span 9}.grid-r-7-span-10[_ngcontent-%COMP%]{grid-row:7/span 10}.grid-r-7-span-11[_ngcontent-%COMP%]{grid-row:7/span 11}.grid-r-7-span-12[_ngcontent-%COMP%]{grid-row:7/span 12}.grid-r-8-span-1[_ngcontent-%COMP%]{grid-row:8/span 1}.grid-r-8-span-2[_ngcontent-%COMP%]{grid-row:8/span 2}.grid-r-8-span-3[_ngcontent-%COMP%]{grid-row:8/span 3}.grid-r-8-span-4[_ngcontent-%COMP%]{grid-row:8/span 4}.grid-r-8-span-5[_ngcontent-%COMP%]{grid-row:8/span 5}.grid-r-8-span-6[_ngcontent-%COMP%]{grid-row:8/span 6}.grid-r-8-span-7[_ngcontent-%COMP%]{grid-row:8/span 7}.grid-r-8-span-8[_ngcontent-%COMP%]{grid-row:8/span 8}.grid-r-8-span-9[_ngcontent-%COMP%]{grid-row:8/span 9}.grid-r-8-span-10[_ngcontent-%COMP%]{grid-row:8/span 10}.grid-r-8-span-11[_ngcontent-%COMP%]{grid-row:8/span 11}.grid-r-8-span-12[_ngcontent-%COMP%]{grid-row:8/span 12}.grid-r-9-span-1[_ngcontent-%COMP%]{grid-row:9/span 1}.grid-r-9-span-2[_ngcontent-%COMP%]{grid-row:9/span 2}.grid-r-9-span-3[_ngcontent-%COMP%]{grid-row:9/span 3}.grid-r-9-span-4[_ngcontent-%COMP%]{grid-row:9/span 4}.grid-r-9-span-5[_ngcontent-%COMP%]{grid-row:9/span 5}.grid-r-9-span-6[_ngcontent-%COMP%]{grid-row:9/span 6}.grid-r-9-span-7[_ngcontent-%COMP%]{grid-row:9/span 7}.grid-r-9-span-8[_ngcontent-%COMP%]{grid-row:9/span 8}.grid-r-9-span-9[_ngcontent-%COMP%]{grid-row:9/span 9}.grid-r-9-span-10[_ngcontent-%COMP%]{grid-row:9/span 10}.grid-r-9-span-11[_ngcontent-%COMP%]{grid-row:9/span 11}.grid-r-9-span-12[_ngcontent-%COMP%]{grid-row:9/span 12}.grid-r-10-span-1[_ngcontent-%COMP%]{grid-row:10/span 1}.grid-r-10-span-2[_ngcontent-%COMP%]{grid-row:10/span 2}.grid-r-10-span-3[_ngcontent-%COMP%]{grid-row:10/span 3}.grid-r-10-span-4[_ngcontent-%COMP%]{grid-row:10/span 4}.grid-r-10-span-5[_ngcontent-%COMP%]{grid-row:10/span 5}.grid-r-10-span-6[_ngcontent-%COMP%]{grid-row:10/span 6}.grid-r-10-span-7[_ngcontent-%COMP%]{grid-row:10/span 7}.grid-r-10-span-8[_ngcontent-%COMP%]{grid-row:10/span 8}.grid-r-10-span-9[_ngcontent-%COMP%]{grid-row:10/span 9}.grid-r-10-span-10[_ngcontent-%COMP%]{grid-row:10/span 10}.grid-r-10-span-11[_ngcontent-%COMP%]{grid-row:10/span 11}.grid-r-10-span-12[_ngcontent-%COMP%]{grid-row:10/span 12}.grid-r-11-span-1[_ngcontent-%COMP%]{grid-row:11/span 1}.grid-r-11-span-2[_ngcontent-%COMP%]{grid-row:11/span 2}.grid-r-11-span-3[_ngcontent-%COMP%]{grid-row:11/span 3}.grid-r-11-span-4[_ngcontent-%COMP%]{grid-row:11/span 4}.grid-r-11-span-5[_ngcontent-%COMP%]{grid-row:11/span 5}.grid-r-11-span-6[_ngcontent-%COMP%]{grid-row:11/span 6}.grid-r-11-span-7[_ngcontent-%COMP%]{grid-row:11/span 7}.grid-r-11-span-8[_ngcontent-%COMP%]{grid-row:11/span 8}.grid-r-11-span-9[_ngcontent-%COMP%]{grid-row:11/span 9}.grid-r-11-span-10[_ngcontent-%COMP%]{grid-row:11/span 10}.grid-r-11-span-11[_ngcontent-%COMP%]{grid-row:11/span 11}.grid-r-11-span-12[_ngcontent-%COMP%]{grid-row:11/span 12}.grid-r-12-span-1[_ngcontent-%COMP%]{grid-row:12/span 1}.grid-r-12-span-2[_ngcontent-%COMP%]{grid-row:12/span 2}.grid-r-12-span-3[_ngcontent-%COMP%]{grid-row:12/span 3}.grid-r-12-span-4[_ngcontent-%COMP%]{grid-row:12/span 4}.grid-r-12-span-5[_ngcontent-%COMP%]{grid-row:12/span 5}.grid-r-12-span-6[_ngcontent-%COMP%]{grid-row:12/span 6}.grid-r-12-span-7[_ngcontent-%COMP%]{grid-row:12/span 7}.grid-r-12-span-8[_ngcontent-%COMP%]{grid-row:12/span 8}.grid-r-12-span-9[_ngcontent-%COMP%]{grid-row:12/span 9}.grid-r-12-span-10[_ngcontent-%COMP%]{grid-row:12/span 10}.grid-r-12-span-11[_ngcontent-%COMP%]{grid-row:12/span 11}.grid-r-12-span-12[_ngcontent-%COMP%]{grid-row:12/span 12}.vcl-htp-analysis--container[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:auto auto minmax(400px,1fr);gap:1rem;height:100%}.vcl-htp-analysis-summary--top-chart-and-chart-selection-container[_ngcontent-%COMP%] .top-chart-container[_ngcontent-%COMP%]{height:120px;width:100%}.vcl-htp-analysis-summary--tables-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;width:100%;background:var(--q-background-2);border:1px solid var(--q-border-1-default);padding:1rem}.vcl-htp-analysis-summary--top-chart-and-chart-selection-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between;grid-row:2/span 1;grid-column:1/span 1;min-width:400px}.vcl-htp-analysis-summary--bottom-charts-container[_ngcontent-%COMP%]{container-name:bottom-charts-container;container-type:inline-size;display:flex;flex-direction:column;gap:.5rem;grid-row:3/span 1;grid-column:1/span 2}.vcl-htp-analysis--chart-container[_ngcontent-%COMP%]{max-height:500px;display:flex;flex-direction:column}.vcl-htp-analysis--chart-container.grid-chart-container[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,1fr);gap:.25rem}@container bottom-charts-container (max-width: 1250px){.vcl-htp-analysis--chart-container.grid-chart-container[_ngcontent-%COMP%]{grid-template-columns:1fr}}.chart-combobox[_ngcontent-%COMP%]{align-self:flex-start;min-width:15rem;max-width:20rem;flex-shrink:0}.vcl-htp-analysis-summary--center[_ngcontent-%COMP%]{flex:1;display:flex;align-items:center;justify-content:center}[_nghost-%COMP%] .q-tabs--panel{width:100%}[_nghost-%COMP%] .q-tabs--root{width:100%;height:100%}[_nghost-%COMP%] .q-tab--content{width:100%;height:100%}"]})}}return t})();var VE=(()=>{class t{constructor(e,n,o,r){this.optracePanelService=e,this.darkModeService=n,this.nodeHighlightService=o,this.nodeHighlightServiceV2=r,oo.graphV2Enabled?this.nodeHighlightServiceV2.selectedNode$.pipe($o()).subscribe(({nodeName:s,initiator:a})=>{a!==ae.OPTRACE_SUMMARY&&this.optraceControls.selectQnnOp(s)}):this.nodeHighlightService.selectedNode$.pipe($o()).subscribe(s=>{setTimeout(()=>{this.optraceControls.selectQnnOp(s)},700)})}setUpOptraceOnControls(e){this.optraceControls=e}highlightNode(e){oo.graphV2Enabled?this.nodeHighlightServiceV2.highlightNodeInAllPanels(e,ae.OPTRACE_SUMMARY):this.nodeHighlightService.highlightNode(e)}showOpNotFoundNotification(e){this.nodeHighlightService.showNotFoundNotification("OPTRACE_PANEL.NODE_NOT_FOUND",e)}static{this.\u0275fac=function(n){return new(n||t)(_(So),_(Uo),_(qs),_(js))}}static{this.\u0275cmp=F({type:t,selectors:[["app-optrace-sub-panel"]],inputs:{optraceId:"optraceId"},standalone:!0,features:[B],decls:2,vars:2,consts:[[1,"optrace-container"],[3,"controlsInit","qnnOpExpanded","qnnOpNotFound","file","theme"]],template:function(n,o){n&1&&(f(0,"div",0)(1,"app-optrace",1),I("controlsInit",function(s){return o.setUpOptraceOnControls(s)})("qnnOpExpanded",function(s){return o.highlightNode(s)})("qnnOpNotFound",function(s){return o.showOpNotFoundNotification(s)}),g()()),n&2&&(u(),b("file",o.optracePanelService.fileMap().get(o.optraceId))("theme",o.darkModeService.getMode()))},dependencies:[Dt,Ve,Ci,Le,be,kE],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;flex:1;overflow:hidden;background:var(--qds-background-neutral-3)}.optrace-container[_ngcontent-%COMP%]{height:100%;position:relative}"]})}}return t})();var cj=(t,i)=>i.id;function dj(t,i){if(t&1&&M(0,"app-optrace-sub-panel",1),t&2){let e=v().$implicit;b("optraceId",e.id)}}function pj(t,i){if(t&1&&T(0,dj,1,1,"app-optrace-sub-panel",1),t&2){let e=i.$implicit,n=v();L((n.optracePanelService.activeSubtab==null?null:n.optracePanelService.activeSubtab.id)===e.id?0:-1)}}var BE=(()=>{class t{constructor(e,n){this.iconService=e,this.optracePanelService=n,this.classList="flex-column-grow",this.panelTypes=ae}onActiveSubtabUpdated(e){this.optracePanelService.setActiveSubtabIndex(e)}onSubtabClosed(e){this.optracePanelService.removeSubtab(e)}static{this.\u0275fac=function(n){return new(n||t)(_(Ce),_(So))}}static{this.\u0275cmp=F({type:t,selectors:[["app-optrace-panel"]],hostVars:2,hostBindings:function(n,o){n&2&&Pi(o.classList)},standalone:!0,features:[B],decls:3,vars:3,consts:[[3,"activeSubtabUpdated","subtabClosed","panelType","subtabs","activeSubtabIndex"],[3,"optraceId"]],template:function(n,o){n&1&&(f(0,"app-subtabs",0),I("activeSubtabUpdated",function(s){return o.onActiveSubtabUpdated(s)})("subtabClosed",function(s){return o.onSubtabClosed(s)}),g(),Pe(1,pj,1,1,null,null,cj)),n&2&&(b("panelType",o.panelTypes.OPTRACE_SUMMARY)("subtabs",o.optracePanelService.subtabs)("activeSubtabIndex",o.optracePanelService.activeSubtabIndex),u(),Oe(o.optracePanelService.subtabs))},dependencies:[rr,VE,be]})}}return t})();function HE(t,i){let e=i instanceof Ae?i.nativeElement:i;return getComputedStyle(e).getPropertyValue(t).trim()}var hj=()=>({standalone:!0});function uj(t,i){if(t&1){let e=Z();f(0,"div",4)(1,"q-combobox",9),I("changed",function(o){R(e);let r=v();return A(r.seriesChanged.emit(o))}),g()()}if(t&2){let e=v();u(),b("options",e.seriesDropdownOptions)("disableOptionToggle",!0)("ngModel",e.selectedDropdownSeries)("ngModelOptions",Ye(4,hj))}}var jE=(()=>{class t{constructor(e,n){this.iconService=e,this.translateService=n,this.searchChanged=new de,this.sorted=new de,this.seriesChanged=new de,this.restored=new de,this.searchText$=new it(""),this.originalIndexMap={},this.searchText$.pipe($o(),ns(300),br()).subscribe(o=>this.filterBySearch(o)),this.defaultSort={name:this.translateService.instant("ANALYSIS.SORTING.NO_SORTING"),sortFn:o=>[...o].sort((r,s)=>this.originalIndexMap[r.name]-this.originalIndexMap[s.name])},this.selectedSort=this.defaultSort}ngOnInit(){this.createOriginalDataOrderMap()}ngOnChanges(e){e.selectedDropdownSeries?.currentValue!==e.selectedDropdownSeries?.previousValue&&this.filterBySearch(this.searchText$.value),e.sortableSeries?.currentValue!==e.sortableSeries?.previousValue&&(this.setupSortOptions(),this.sortData(this.selectedSort,this.filteredData))}createOriginalDataOrderMap(){this.data[0].data.forEach((e,n)=>this.originalIndexMap[e.name]=n)}filterBySearch(e){let n=this.getSearchedData(e),o=this.sortData(this.selectedSort,n);this.searchChanged.emit(o)}setupSortOptions(){this.sortOptions=[this.defaultSort];for(let e of Object.keys(this.sortableSeries))this.sortableSeries[e]&&this.sortOptions.push({id:`lth-${e}`,name:`${e}: ${this.translateService.instant("ANALYSIS.SORTING.LOW_TO_HIGH")}`,series:e,sortFn:n=>[...n].sort((o,r)=>o.value-r.value)},{id:`htl-${e}`,name:`${e}: ${this.translateService.instant("ANALYSIS.SORTING.HIGH_TO_LOW")}`,series:e,sortFn:n=>[...n].sort((o,r)=>r.value-o.value)})}getSearchedData(e){if(!e.trim())return this.data;let n=[];for(let o of this.data){let r=o.data.filter(s=>s.name.toLowerCase().includes(e.trim().toLowerCase()));n.push(ee(E({},o),{data:r}))}return n}sortData(e,n){let o=n.find(l=>l.seriesName===this.selectedSort.series)??n[0],r=ee(E({},o),{data:e.sortFn(o.data)}),s={};s[r.seriesName]=r;let a=n.reduce((l,c)=>{if(c.seriesName!==o.seriesName){l[c.seriesName]={};for(let d of c.data)l[c.seriesName][d.name]=d}return l},{});for(let l of n)l.seriesName!==o.seriesName&&(s[l.seriesName]=ee(E({},l),{data:r.data.map(c=>a[l.seriesName][c.name])}));return n.map(l=>s[l.seriesName])}onSort(e){Array.isArray(e)&&(e=e[0]),this.selectedSort=e;let n=this.sortData(e,this.filteredData);this.sorted.emit(n)}static{this.\u0275fac=function(n){return new(n||t)(_(Ce),_(Ge))}}static{this.\u0275cmp=F({type:t,selectors:[["app-chart-toolbar"]],inputs:{data:"data",filteredData:"filteredData",seriesDropdownOptions:"seriesDropdownOptions",selectedDropdownSeries:"selectedDropdownSeries",sortableSeries:"sortableSeries"},outputs:{searchChanged:"searchChanged",sorted:"sorted",seriesChanged:"seriesChanged",restored:"restored"},standalone:!0,features:[ze([]),$e,B],decls:13,vars:17,consts:[[1,"toolbar"],[1,"d-flex","gap-8"],[1,"search-section"],["fullWidth","","size","s",3,"ngModelChange","placeholder","ngModel","startIcon"],[1,"series-section"],[1,"sort-section"],["appendTo","portal","size","s","optionLabel","name","optionValue","id","clearable","false",3,"changed","options","placeholder","disableOptionToggle"],[1,"d-flex"],["data-testid","btn-restore","qTooltipPlacement","top",3,"click","icon","qTooltip"],["appendTo","portal","size","s","optionLabel","name","clearable","false","placeholder","Series",3,"changed","options","disableOptionToggle","ngModel","ngModelOptions"]],template:function(n,o){n&1&&(f(0,"div",0)(1,"div",1)(2,"div",2)(3,"q-text-input",3),z(4,"translate"),z(5,"async"),I("ngModelChange",function(s){return o.searchText$.next(s)}),g()(),T(6,uj,2,5,"div",4),f(7,"div",5)(8,"q-combobox",6),z(9,"translate"),I("changed",function(s){return o.onSort(s)}),g()()(),f(10,"div",7)(11,"q-icon-button",8),z(12,"translate"),I("click",function(){return o.restored.emit()}),g()()()),n&2&&(u(3),tt("placeholder",G(4,9,"GRAPH_PANEL.SEARCH")),b("ngModel",G(5,11,o.searchText$))("startIcon",o.iconService.search),u(3),L(o.seriesDropdownOptions?6:-1),u(2),tt("placeholder",G(9,13,"ANALYSIS.SORTING.SORT_BY")),b("options",o.sortOptions)("disableOptionToggle",!0),u(3),b("icon",o.iconService.locate)("qTooltip",G(12,15,"PERFORMANCE_METRICS.RESET_CHART")))},dependencies:[ss,Qo,Ve,Ft,Mi,Qn,Le,st,be,Ne,zt,on,_t,Qt,ji],styles:[".toolbar[_ngcontent-%COMP%]{padding:.25rem 1rem;margin:.3rem 1.5rem .3rem 0;display:flex;gap:1rem;align-items:center;justify-content:space-between}.toolbar[_ngcontent-%COMP%] .search-section[_ngcontent-%COMP%]{max-width:12rem}.toolbar[_ngcontent-%COMP%] .q-combobox--input-container{padding-top:0;padding-bottom:0}"]})}}return t})();var mj="#9996FF",fj="#00BBC5",gj="#809FFF",_j="#FF699B",vj="#DE6BFF",bj="#19C700",yj="#CC9D00",Cj="#FF7269",wj="#88B700",Sj="#88B700",qE=[gj,fj,_j,mj,vj,bj,yj,Cj,wj,Sj];function zE(t,i){return i%=t.length,t[i]}var GE=(()=>{class t{constructor(e,n,o,r){this.iconService=e,this.translateService=n,this.fileService=o,this.darkModeService=r,this.toggledLegendSeries={},this.searchChanged=new de,this.sort=new de,this.seriesChanged=new de,this.chartClicked=new de,this.legendChanged=new de,this.selectionNotFound=new de,this.staticOptions={textStyle:{fontFamily:"Roboto Flex"},tooltip:{axisPointer:{type:"shadow"},backgroundColor:"black",borderColor:"black",textStyle:{color:"white"},formatter:s=>`${s.name}<br />
|
|
24
|
-
<strong>${s.value.toLocaleString()} ${s.data.unit??""}</strong>`},dataZoom:[{type:"inside"},{type:"slider"}]},this.getCssPropertyValue=HE,this.formatter=Intl.NumberFormat("en",{notation:"compact"}),this.destroyed$=new X,_n(()=>{this.darkModeService.getMode()&&this.eChartsInstance&&this.applyChartData()})}ngOnInit(){this.highlight$&&this.highlight$.pipe(ye(this.destroyed$)).subscribe(e=>this.highlightInChart(e))}ngOnChanges(e){let n=e.filteredData?.currentValue!==e.filteredData?.previousValue,o=e.selectedDropdownSeries?.currentValue!==e.selectedDropdownSeries?.previousValue;(n||o)&&this.applyChartData()}applyChartData(){let e=this.getCssPropertyValue("--qds-text-primary-1",document.body),n=this.getCssPropertyValue("--qds-border-default-1",document.body),o=this.filteredData.reduce((r,s)=>ee(E({},r),{[s.seriesName]:this.toggledLegendSeries[s.seriesName]}),{});this.dataOptions={grid:{containLabel:!0,left:50,top:40,right:50},legend:{data:this.filteredData.map(r=>r.seriesName),type:"scroll",right:50,itemWidth:15,itemHeight:15,icon:"rect",selected:o,textStyle:{color:e}},yAxis:this.getDistinctUnits().map(r=>({type:"value",name:r,nameLocation:"middle",nameGap:50,nameRotate:90,nameTextStyle:{fontSize:12,color:e},axisLabel:{color:e,fontSize:12,formatter:s=>this.formatter.format(s)},splitLine:{lineStyle:{color:n}}})),xAxis:{type:"category",data:this.filteredData[0].data.map(r=>r.name),axisLabel:{show:!0,interval:0,formatter:r=>r===this.selectedName?r:" ",color:e},axisTick:{show:!1},axisLine:{show:!1}},series:this.filteredData.map((r,s)=>E({name:r.seriesName,data:r.data.map(a=>ee(E({},a),{itemStyle:{opacity:this.selectedName?.3:1},select:{itemStyle:{opacity:1}}})),barGap:0,color:zE(qE,s),label:{formatter:({name:a})=>a,position:"bottom",distance:10},select:{itemStyle:{borderWidth:0}},selectedMode:!0,emphasis:{itemStyle:{opacity:.5}},animation:!1},r.seriesOptions))}}getDistinctUnits(){let e=new Set;for(let n of this.filteredData)e.add(n.unit);return[...e]}highlightInChart(e){this.data[0].data.some(o=>o.name===e)?(this.eChartsInstance.dispatchAction({type:"downplay"}),this.eChartsInstance.dispatchAction({type:"select",name:e}),this.selectedName=e,this.applyChartData()):this.selectionNotFound.emit(e)}onChartInit(e){this.eChartsInstance=e}onLegendChange(e){this.legendChanged.emit(e)}onRestore(){this.selectedName=void 0,this.eChartsInstance.dispatchAction({type:"restore"}),this.applyChartData()}ngOnDestroy(){this.destroyed$.next(!0),this.destroyed$.unsubscribe()}static{this.\u0275fac=function(n){return new(n||t)(_(Ce),_(Ge),_(_d),_(Uo))}}static{this.\u0275cmp=F({type:t,selectors:[["app-chart"]],inputs:{data:"data",filteredData:"filteredData",tooltipContent:"tooltipContent",seriesDropdownOptions:"seriesDropdownOptions",selectedDropdownSeries:"selectedDropdownSeries",toggledLegendSeries:"toggledLegendSeries",imageName:"imageName",highlight$:"highlight$"},outputs:{searchChanged:"searchChanged",sort:"sort",seriesChanged:"seriesChanged",chartClicked:"chartClicked",legendChanged:"legendChanged",selectionNotFound:"selectionNotFound"},standalone:!0,features:[ze([Bl()]),$e,B],decls:4,vars:7,consts:[[1,"scroll-wrapper"],[1,"chart-wrapper"],[3,"searchChanged","sorted","seriesChanged","restored","data","filteredData","seriesDropdownOptions","selectedDropdownSeries","sortableSeries"],["echarts","",1,"chart",3,"chartClick","chartInit","chartLegendSelectChanged","options","merge"]],template:function(n,o){n&1&&(f(0,"div",0)(1,"div",1)(2,"app-chart-toolbar",2),I("searchChanged",function(s){return o.searchChanged.emit(s)})("sorted",function(s){return o.sort.emit(s)})("seriesChanged",function(s){return o.seriesChanged.emit(s)})("restored",function(){return o.onRestore()}),g(),f(3,"div",3),I("chartClick",function(s){return o.chartClicked.emit(s)})("chartInit",function(s){return o.onChartInit(s)})("chartLegendSelectChanged",function(s){return o.onLegendChange(s.selected)}),g()()()),n&2&&(u(2),b("data",o.data)("filteredData",o.filteredData)("seriesDropdownOptions",o.seriesDropdownOptions)("selectedDropdownSeries",o.selectedDropdownSeries)("sortableSeries",o.toggledLegendSeries),u(),b("options",o.staticOptions)("merge",o.dataOptions))},dependencies:[Ve,Dt,Le,jE,be,Vl],styles:[".scroll-wrapper[_ngcontent-%COMP%]{overflow:auto}.header-wrapper[_ngcontent-%COMP%]{padding-right:1rem}.chart-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;position:relative;height:50vh;min-height:250px;max-height:500px;min-width:500px;width:100%;margin-bottom:1rem}.chart[_ngcontent-%COMP%]{width:100%;height:100%}.chart-title[_ngcontent-%COMP%]{font-weight:var(--q-font-weight-medium);padding-left:1rem;margin-bottom:0}.chart-title[_ngcontent-%COMP%] q-icon[_ngcontent-%COMP%]{display:flex}"]})}}return t})();var Tj=[[["caption"]],[["colgroup"],["col"]],"*"],xj=["caption","colgroup, col","*"];function Pj(t,i){t&1&&ct(0,2)}function Oj(t,i){t&1&&(f(0,"thead",0),He(1,1),g(),f(2,"tbody",0),He(3,2)(4,3),g(),f(5,"tfoot",0),He(6,4),g())}function Ij(t,i){t&1&&He(0,1)(1,2)(2,3)(3,4)}var An=new pt("CDK_TABLE");var lh=(()=>{class t{constructor(e){this.template=e}static{this.\u0275fac=function(n){return new(n||t)(_(ii))}}static{this.\u0275dir=Se({type:t,selectors:[["","cdkCellDef",""]],standalone:!0})}}return t})(),ch=(()=>{class t{constructor(e){this.template=e}static{this.\u0275fac=function(n){return new(n||t)(_(ii))}}static{this.\u0275dir=Se({type:t,selectors:[["","cdkHeaderCellDef",""]],standalone:!0})}}return t})(),WE=(()=>{class t{constructor(e){this.template=e}static{this.\u0275fac=function(n){return new(n||t)(_(ii))}}static{this.\u0275dir=Se({type:t,selectors:[["","cdkFooterCellDef",""]],standalone:!0})}}return t})(),sa=(()=>{class t{get name(){return this._name}set name(e){this._setNameInput(e)}get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=!0)}get stickyEnd(){return this._stickyEnd}set stickyEnd(e){e!==this._stickyEnd&&(this._stickyEnd=e,this._hasStickyChanged=!0)}constructor(e){this._table=e,this._hasStickyChanged=!1,this._sticky=!1,this._stickyEnd=!1}hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=!1}_updateColumnCssClassName(){this._columnCssClassName=[`cdk-column-${this.cssClassFriendlyName}`]}_setNameInput(e){e&&(this._name=e,this.cssClassFriendlyName=e.replace(/[^a-z0-9_-]/gi,"-"),this._updateColumnCssClassName())}static{this.\u0275fac=function(n){return new(n||t)(_(An,8))}}static{this.\u0275dir=Se({type:t,selectors:[["","cdkColumnDef",""]],contentQueries:function(n,o,r){if(n&1&&(bi(r,lh,5),bi(r,ch,5),bi(r,WE,5)),n&2){let s;me(s=fe())&&(o.cell=s.first),me(s=fe())&&(o.headerCell=s.first),me(s=fe())&&(o.footerCell=s.first)}},inputs:{name:[0,"cdkColumnDef","name"],sticky:[2,"sticky","sticky",qe],stickyEnd:[2,"stickyEnd","stickyEnd",qe]},standalone:!0,features:[ze([{provide:"MAT_SORT_HEADER_COLUMN_DEF",useExisting:t}]),Tt]})}}return t})(),oh=class{constructor(i,e){e.nativeElement.classList.add(...i._columnCssClassName)}},QE=(()=>{class t extends oh{constructor(e,n){super(e,n)}static{this.\u0275fac=function(n){return new(n||t)(_(sa),_(Ae))}}static{this.\u0275dir=Se({type:t,selectors:[["cdk-header-cell"],["th","cdk-header-cell",""]],hostAttrs:["role","columnheader",1,"cdk-header-cell"],standalone:!0,features:[ot]})}}return t})();var YE=(()=>{class t extends oh{constructor(e,n){super(e,n);let o=e._table?._getCellRole();o&&n.nativeElement.setAttribute("role",o)}static{this.\u0275fac=function(n){return new(n||t)(_(sa),_(Ae))}}static{this.\u0275dir=Se({type:t,selectors:[["cdk-cell"],["td","cdk-cell",""]],hostAttrs:[1,"cdk-cell"],standalone:!0,features:[ot]})}}return t})(),rh=class{constructor(){this.tasks=[],this.endTasks=[]}},sh=new pt("_COALESCED_STYLE_SCHEDULER"),ag=(()=>{class t{constructor(e){this._currentSchedule=null,this._ngZone=je(Je)}schedule(e){this._createScheduleIfNeeded(),this._currentSchedule.tasks.push(e)}scheduleEnd(e){this._createScheduleIfNeeded(),this._currentSchedule.endTasks.push(e)}_createScheduleIfNeeded(){this._currentSchedule||(this._currentSchedule=new rh,this._ngZone.runOutsideAngular(()=>queueMicrotask(()=>{for(;this._currentSchedule.tasks.length||this._currentSchedule.endTasks.length;){let e=this._currentSchedule;this._currentSchedule=new rh;for(let n of e.tasks)n();for(let n of e.endTasks)n()}this._currentSchedule=null})))}static{this.\u0275fac=function(n){return new(n||t)(D(Je))}}static{this.\u0275prov=ne({token:t,factory:t.\u0275fac})}}return t})();var lg=(()=>{class t{constructor(e,n){this.template=e,this._differs=n}ngOnChanges(e){if(!this._columnsDiffer){let n=e.columns&&e.columns.currentValue||[];this._columnsDiffer=this._differs.find(n).create(),this._columnsDiffer.diff(n)}}getColumnsDiff(){return this._columnsDiffer.diff(this.columns)}extractCellTemplate(e){return this instanceof Hl?e.headerCell.template:this instanceof cg?e.footerCell.template:e.cell.template}static{this.\u0275fac=function(n){return new(n||t)(_(ii),_(os))}}static{this.\u0275dir=Se({type:t,features:[$e]})}}return t})(),Hl=(()=>{class t extends lg{get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=!0)}constructor(e,n,o){super(e,n),this._table=o,this._hasStickyChanged=!1,this._sticky=!1}ngOnChanges(e){super.ngOnChanges(e)}hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=!1}static{this.\u0275fac=function(n){return new(n||t)(_(ii),_(os),_(An,8))}}static{this.\u0275dir=Se({type:t,selectors:[["","cdkHeaderRowDef",""]],inputs:{columns:[0,"cdkHeaderRowDef","columns"],sticky:[2,"cdkHeaderRowDefSticky","sticky",qe]},standalone:!0,features:[Tt,ot,$e]})}}return t})(),cg=(()=>{class t extends lg{get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=!0)}constructor(e,n,o){super(e,n),this._table=o,this._hasStickyChanged=!1,this._sticky=!1}ngOnChanges(e){super.ngOnChanges(e)}hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=!1}static{this.\u0275fac=function(n){return new(n||t)(_(ii),_(os),_(An,8))}}static{this.\u0275dir=Se({type:t,selectors:[["","cdkFooterRowDef",""]],inputs:{columns:[0,"cdkFooterRowDef","columns"],sticky:[2,"cdkFooterRowDefSticky","sticky",qe]},standalone:!0,features:[Tt,ot,$e]})}}return t})(),dh=(()=>{class t extends lg{constructor(e,n,o){super(e,n),this._table=o}static{this.\u0275fac=function(n){return new(n||t)(_(ii),_(os),_(An,8))}}static{this.\u0275dir=Se({type:t,selectors:[["","cdkRowDef",""]],inputs:{columns:[0,"cdkRowDefColumns","columns"],when:[0,"cdkRowDefWhen","when"]},standalone:!0,features:[ot]})}}return t})(),Kr=(()=>{class t{static{this.mostRecentCellOutlet=null}constructor(e){this._viewContainer=e,t.mostRecentCellOutlet=this}ngOnDestroy(){t.mostRecentCellOutlet===this&&(t.mostRecentCellOutlet=null)}static{this.\u0275fac=function(n){return new(n||t)(_(ni))}}static{this.\u0275dir=Se({type:t,selectors:[["","cdkCellOutlet",""]],standalone:!0})}}return t})(),dg=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=F({type:t,selectors:[["cdk-header-row"],["tr","cdk-header-row",""]],hostAttrs:["role","row",1,"cdk-header-row"],standalone:!0,features:[B],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(n,o){n&1&&He(0,0)},dependencies:[Kr],encapsulation:2})}}return t})();var pg=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=F({type:t,selectors:[["cdk-row"],["tr","cdk-row",""]],hostAttrs:["role","row",1,"cdk-row"],standalone:!0,features:[B],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(n,o){n&1&&He(0,0)},dependencies:[Kr],encapsulation:2})}}return t})(),XE=(()=>{class t{constructor(e){this.templateRef=e,this._contentClassName="cdk-no-data-row"}static{this.\u0275fac=function(n){return new(n||t)(_(ii))}}static{this.\u0275dir=Se({type:t,selectors:[["ng-template","cdkNoDataRow",""]],standalone:!0})}}return t})(),$E=["top","bottom","left","right"],sg=class{constructor(i,e,n,o,r=!0,s=!0,a){this._isNativeHtmlTable=i,this._stickCellCss=e,this.direction=n,this._coalescedStyleScheduler=o,this._isBrowser=r,this._needsPositionStickyOnElement=s,this._positionListener=a,this._elemSizeCache=new WeakMap,this._resizeObserver=globalThis?.ResizeObserver?new globalThis.ResizeObserver(l=>this._updateCachedSizes(l)):null,this._updatedStickyColumnsParamsToReplay=[],this._stickyColumnsReplayTimeout=null,this._cachedCellWidths=[],this._borderCellCss={top:`${e}-border-elem-top`,bottom:`${e}-border-elem-bottom`,left:`${e}-border-elem-left`,right:`${e}-border-elem-right`}}clearStickyPositioning(i,e){(e.includes("left")||e.includes("right"))&&this._removeFromStickyColumnReplayQueue(i);let n=[];for(let o of i)if(o.nodeType===o.ELEMENT_NODE){n.push(o);for(let r=0;r<o.children.length;r++)n.push(o.children[r])}this._coalescedStyleScheduler.schedule(()=>{for(let o of n)this._removeStickyStyle(o,e)})}updateStickyColumns(i,e,n,o=!0,r=!0){if(r&&this._updateStickyColumnReplayQueue({rows:[...i],stickyStartStates:[...e],stickyEndStates:[...n]}),!i.length||!this._isBrowser||!(e.some(s=>s)||n.some(s=>s))){this._positionListener&&(this._positionListener.stickyColumnsUpdated({sizes:[]}),this._positionListener.stickyEndColumnsUpdated({sizes:[]}));return}this._coalescedStyleScheduler.schedule(()=>{let s=i[0],a=s.children.length,l=this._getCellWidths(s,o),c=this._getStickyStartColumnPositions(l,e),d=this._getStickyEndColumnPositions(l,n),p=e.lastIndexOf(!0),h=n.indexOf(!0),m=this.direction==="rtl",S=m?"right":"left",y=m?"left":"right";for(let w of i)for(let x=0;x<a;x++){let N=w.children[x];e[x]&&this._addStickyStyle(N,S,c[x],x===p),n[x]&&this._addStickyStyle(N,y,d[x],x===h)}this._positionListener&&(this._positionListener.stickyColumnsUpdated({sizes:p===-1?[]:l.slice(0,p+1).map((w,x)=>e[x]?w:null)}),this._positionListener.stickyEndColumnsUpdated({sizes:h===-1?[]:l.slice(h).map((w,x)=>n[x+h]?w:null).reverse()}))})}stickRows(i,e,n){this._isBrowser&&this._coalescedStyleScheduler.schedule(()=>{let o=n==="bottom"?i.slice().reverse():i,r=n==="bottom"?e.slice().reverse():e,s=[],a=[],l=[];for(let d=0,p=0;d<o.length;d++){if(!r[d])continue;s[d]=p;let h=o[d];l[d]=this._isNativeHtmlTable?Array.from(h.children):[h];let m=this._retrieveElementSize(h).height;p+=m,a[d]=m}let c=r.lastIndexOf(!0);for(let d=0;d<o.length;d++){if(!r[d])continue;let p=s[d],h=d===c;for(let m of l[d])this._addStickyStyle(m,n,p,h)}n==="top"?this._positionListener?.stickyHeaderRowsUpdated({sizes:a,offsets:s,elements:l}):this._positionListener?.stickyFooterRowsUpdated({sizes:a,offsets:s,elements:l})})}updateStickyFooterContainer(i,e){this._isNativeHtmlTable&&this._coalescedStyleScheduler.schedule(()=>{let n=i.querySelector("tfoot");n&&(e.some(o=>!o)?this._removeStickyStyle(n,["bottom"]):this._addStickyStyle(n,"bottom",0,!1))})}_removeStickyStyle(i,e){for(let o of e)i.style[o]="",i.classList.remove(this._borderCellCss[o]);$E.some(o=>e.indexOf(o)===-1&&i.style[o])?i.style.zIndex=this._getCalculatedZIndex(i):(i.style.zIndex="",this._needsPositionStickyOnElement&&(i.style.position=""),i.classList.remove(this._stickCellCss))}_addStickyStyle(i,e,n,o){i.classList.add(this._stickCellCss),o&&i.classList.add(this._borderCellCss[e]),i.style[e]=`${n}px`,i.style.zIndex=this._getCalculatedZIndex(i),this._needsPositionStickyOnElement&&(i.style.cssText+="position: -webkit-sticky; position: sticky; ")}_getCalculatedZIndex(i){let e={top:100,bottom:10,left:1,right:1},n=0;for(let o of $E)i.style[o]&&(n+=e[o]);return n?`${n}`:""}_getCellWidths(i,e=!0){if(!e&&this._cachedCellWidths.length)return this._cachedCellWidths;let n=[],o=i.children;for(let r=0;r<o.length;r++){let s=o[r];n.push(this._retrieveElementSize(s).width)}return this._cachedCellWidths=n,n}_getStickyStartColumnPositions(i,e){let n=[],o=0;for(let r=0;r<i.length;r++)e[r]&&(n[r]=o,o+=i[r]);return n}_getStickyEndColumnPositions(i,e){let n=[],o=0;for(let r=i.length;r>0;r--)e[r]&&(n[r]=o,o+=i[r]);return n}_retrieveElementSize(i){let e=this._elemSizeCache.get(i);if(e)return e;let n=i.getBoundingClientRect(),o={width:n.width,height:n.height};return this._resizeObserver&&(this._elemSizeCache.set(i,o),this._resizeObserver.observe(i,{box:"border-box"})),o}_updateStickyColumnReplayQueue(i){this._removeFromStickyColumnReplayQueue(i.rows),!this._stickyColumnsReplayTimeout&&this._updatedStickyColumnsParamsToReplay.push(i)}_removeFromStickyColumnReplayQueue(i){let e=new Set(i);for(let n of this._updatedStickyColumnsParamsToReplay)n.rows=n.rows.filter(o=>!e.has(o));this._updatedStickyColumnsParamsToReplay=this._updatedStickyColumnsParamsToReplay.filter(n=>!!n.rows.length)}_updateCachedSizes(i){let e=!1;for(let n of i){let o=n.borderBoxSize?.length?{width:n.borderBoxSize[0].inlineSize,height:n.borderBoxSize[0].blockSize}:{width:n.contentRect.width,height:n.contentRect.height};o.width!==this._elemSizeCache.get(n.target)?.width&&Dj(n.target)&&(e=!0),this._elemSizeCache.set(n.target,o)}e&&this._updatedStickyColumnsParamsToReplay.length&&(this._stickyColumnsReplayTimeout&&clearTimeout(this._stickyColumnsReplayTimeout),this._stickyColumnsReplayTimeout=setTimeout(()=>{for(let n of this._updatedStickyColumnsParamsToReplay)this.updateStickyColumns(n.rows,n.stickyStartStates,n.stickyEndStates,!0,!1);this._updatedStickyColumnsParamsToReplay=[],this._stickyColumnsReplayTimeout=null},0))}};function Dj(t){return["cdk-cell","cdk-header-cell","cdk-footer-cell"].some(i=>t.classList.contains(i))}var ah=new pt("CDK_SPL");var hg=(()=>{class t{constructor(e,n){this.viewContainer=e,this.elementRef=n;let o=je(An);o._rowOutlet=this,o._outletAssigned()}static{this.\u0275fac=function(n){return new(n||t)(_(ni),_(Ae))}}static{this.\u0275dir=Se({type:t,selectors:[["","rowOutlet",""]],standalone:!0})}}return t})(),ug=(()=>{class t{constructor(e,n){this.viewContainer=e,this.elementRef=n;let o=je(An);o._headerRowOutlet=this,o._outletAssigned()}static{this.\u0275fac=function(n){return new(n||t)(_(ni),_(Ae))}}static{this.\u0275dir=Se({type:t,selectors:[["","headerRowOutlet",""]],standalone:!0})}}return t})(),mg=(()=>{class t{constructor(e,n){this.viewContainer=e,this.elementRef=n;let o=je(An);o._footerRowOutlet=this,o._outletAssigned()}static{this.\u0275fac=function(n){return new(n||t)(_(ni),_(Ae))}}static{this.\u0275dir=Se({type:t,selectors:[["","footerRowOutlet",""]],standalone:!0})}}return t})(),fg=(()=>{class t{constructor(e,n){this.viewContainer=e,this.elementRef=n;let o=je(An);o._noDataRowOutlet=this,o._outletAssigned()}static{this.\u0275fac=function(n){return new(n||t)(_(ni),_(Ae))}}static{this.\u0275dir=Se({type:t,selectors:[["","noDataRowOutlet",""]],standalone:!0})}}return t})();var Zr=(()=>{class t{_getCellRole(){if(this._cellRoleInternal===void 0){let e=this._elementRef.nativeElement.getAttribute("role");return e==="grid"||e==="treegrid"?"gridcell":"cell"}return this._cellRoleInternal}get trackBy(){return this._trackByFn}set trackBy(e){this._trackByFn=e}get dataSource(){return this._dataSource}set dataSource(e){this._dataSource!==e&&this._switchDataSource(e)}get multiTemplateDataRows(){return this._multiTemplateDataRows}set multiTemplateDataRows(e){this._multiTemplateDataRows=e,this._rowOutlet&&this._rowOutlet.viewContainer.length&&(this._forceRenderDataRows(),this.updateStickyColumnStyles())}get fixedLayout(){return this._fixedLayout}set fixedLayout(e){this._fixedLayout=e,this._forceRecalculateCellWidths=!0,this._stickyColumnStylesNeedReset=!0}constructor(e,n,o,r,s,a,l,c,d,p,h,m){this._differs=e,this._changeDetectorRef=n,this._elementRef=o,this._dir=s,this._platform=l,this._viewRepeater=c,this._coalescedStyleScheduler=d,this._viewportRuler=p,this._stickyPositioningListener=h,this._onDestroy=new X,this._columnDefsByName=new Map,this._customColumnDefs=new Set,this._customRowDefs=new Set,this._customHeaderRowDefs=new Set,this._customFooterRowDefs=new Set,this._headerRowDefChanged=!0,this._footerRowDefChanged=!0,this._stickyColumnStylesNeedReset=!0,this._forceRecalculateCellWidths=!0,this._cachedRenderRowsMap=new Map,this.stickyCssClass="cdk-table-sticky",this.needsPositionStickyOnElement=!0,this._isShowingNoDataRow=!1,this._hasAllOutlets=!1,this._hasInitialized=!1,this._cellRoleInternal=void 0,this._multiTemplateDataRows=!1,this._fixedLayout=!1,this.contentChanged=new de,this.viewChange=new it({start:0,end:Number.MAX_VALUE}),this._injector=je(Wt),r||o.nativeElement.setAttribute("role","table"),this._document=a,this._isServer=!l.isBrowser,this._isNativeHtmlTable=o.nativeElement.nodeName==="TABLE"}ngOnInit(){this._setupStickyStyler(),this._dataDiffer=this._differs.find([]).create((e,n)=>this.trackBy?this.trackBy(n.dataIndex,n.data):n),this._viewportRuler.change().pipe(ye(this._onDestroy)).subscribe(()=>{this._forceRecalculateCellWidths=!0})}ngAfterContentInit(){this._hasInitialized=!0}ngAfterContentChecked(){this._canRender()&&this._render()}ngOnDestroy(){[this._rowOutlet?.viewContainer,this._headerRowOutlet?.viewContainer,this._footerRowOutlet?.viewContainer,this._cachedRenderRowsMap,this._customColumnDefs,this._customRowDefs,this._customHeaderRowDefs,this._customFooterRowDefs,this._columnDefsByName].forEach(e=>{e?.clear()}),this._headerRowDefs=[],this._footerRowDefs=[],this._defaultRowDef=null,this._onDestroy.next(),this._onDestroy.complete(),ac(this.dataSource)&&this.dataSource.disconnect(this)}renderRows(){this._renderRows=this._getAllRenderRows();let e=this._dataDiffer.diff(this._renderRows);if(!e){this._updateNoDataRow(),this.contentChanged.next();return}let n=this._rowOutlet.viewContainer;this._viewRepeater.applyChanges(e,n,(o,r,s)=>this._getEmbeddedViewArgs(o.item,s),o=>o.item.data,o=>{o.operation===Gg.INSERTED&&o.context&&this._renderCellTemplateForItem(o.record.item.rowDef,o.context)}),this._updateRowIndexContext(),e.forEachIdentityChange(o=>{let r=n.get(o.currentIndex);r.context.$implicit=o.item.data}),this._updateNoDataRow(),Bn(()=>{this.updateStickyColumnStyles()},{injector:this._injector}),this.contentChanged.next()}addColumnDef(e){this._customColumnDefs.add(e)}removeColumnDef(e){this._customColumnDefs.delete(e)}addRowDef(e){this._customRowDefs.add(e)}removeRowDef(e){this._customRowDefs.delete(e)}addHeaderRowDef(e){this._customHeaderRowDefs.add(e),this._headerRowDefChanged=!0}removeHeaderRowDef(e){this._customHeaderRowDefs.delete(e),this._headerRowDefChanged=!0}addFooterRowDef(e){this._customFooterRowDefs.add(e),this._footerRowDefChanged=!0}removeFooterRowDef(e){this._customFooterRowDefs.delete(e),this._footerRowDefChanged=!0}setNoDataRow(e){this._customNoDataRow=e}updateStickyHeaderRowStyles(){let e=this._getRenderedRows(this._headerRowOutlet);if(this._isNativeHtmlTable){let o=UE(this._headerRowOutlet,"thead");o&&(o.style.display=e.length?"":"none")}let n=this._headerRowDefs.map(o=>o.sticky);this._stickyStyler.clearStickyPositioning(e,["top"]),this._stickyStyler.stickRows(e,n,"top"),this._headerRowDefs.forEach(o=>o.resetStickyChanged())}updateStickyFooterRowStyles(){let e=this._getRenderedRows(this._footerRowOutlet);if(this._isNativeHtmlTable){let o=UE(this._footerRowOutlet,"tfoot");o&&(o.style.display=e.length?"":"none")}let n=this._footerRowDefs.map(o=>o.sticky);this._stickyStyler.clearStickyPositioning(e,["bottom"]),this._stickyStyler.stickRows(e,n,"bottom"),this._stickyStyler.updateStickyFooterContainer(this._elementRef.nativeElement,n),this._footerRowDefs.forEach(o=>o.resetStickyChanged())}updateStickyColumnStyles(){let e=this._getRenderedRows(this._headerRowOutlet),n=this._getRenderedRows(this._rowOutlet),o=this._getRenderedRows(this._footerRowOutlet);(this._isNativeHtmlTable&&!this._fixedLayout||this._stickyColumnStylesNeedReset)&&(this._stickyStyler.clearStickyPositioning([...e,...n,...o],["left","right"]),this._stickyColumnStylesNeedReset=!1),e.forEach((r,s)=>{this._addStickyColumnStyles([r],this._headerRowDefs[s])}),this._rowDefs.forEach(r=>{let s=[];for(let a=0;a<n.length;a++)this._renderRows[a].rowDef===r&&s.push(n[a]);this._addStickyColumnStyles(s,r)}),o.forEach((r,s)=>{this._addStickyColumnStyles([r],this._footerRowDefs[s])}),Array.from(this._columnDefsByName.values()).forEach(r=>r.resetStickyChanged())}_outletAssigned(){!this._hasAllOutlets&&this._rowOutlet&&this._headerRowOutlet&&this._footerRowOutlet&&this._noDataRowOutlet&&(this._hasAllOutlets=!0,this._canRender()&&this._render())}_canRender(){return this._hasAllOutlets&&this._hasInitialized}_render(){this._cacheRowDefs(),this._cacheColumnDefs(),!this._headerRowDefs.length&&!this._footerRowDefs.length&&this._rowDefs.length;let n=this._renderUpdatedColumns()||this._headerRowDefChanged||this._footerRowDefChanged;this._stickyColumnStylesNeedReset=this._stickyColumnStylesNeedReset||n,this._forceRecalculateCellWidths=n,this._headerRowDefChanged&&(this._forceRenderHeaderRows(),this._headerRowDefChanged=!1),this._footerRowDefChanged&&(this._forceRenderFooterRows(),this._footerRowDefChanged=!1),this.dataSource&&this._rowDefs.length>0&&!this._renderChangeSubscription?this._observeRenderChanges():this._stickyColumnStylesNeedReset&&this.updateStickyColumnStyles(),this._checkStickyStates()}_getAllRenderRows(){let e=[],n=this._cachedRenderRowsMap;this._cachedRenderRowsMap=new Map;for(let o=0;o<this._data.length;o++){let r=this._data[o],s=this._getRenderRowsForData(r,o,n.get(r));this._cachedRenderRowsMap.has(r)||this._cachedRenderRowsMap.set(r,new WeakMap);for(let a=0;a<s.length;a++){let l=s[a],c=this._cachedRenderRowsMap.get(l.data);c.has(l.rowDef)?c.get(l.rowDef).push(l):c.set(l.rowDef,[l]),e.push(l)}}return e}_getRenderRowsForData(e,n,o){return this._getRowDefs(e,n).map(s=>{let a=o&&o.has(s)?o.get(s):[];if(a.length){let l=a.shift();return l.dataIndex=n,l}else return{data:e,rowDef:s,dataIndex:n}})}_cacheColumnDefs(){this._columnDefsByName.clear(),nh(this._getOwnDefs(this._contentColumnDefs),this._customColumnDefs).forEach(n=>{this._columnDefsByName.has(n.name),this._columnDefsByName.set(n.name,n)})}_cacheRowDefs(){this._headerRowDefs=nh(this._getOwnDefs(this._contentHeaderRowDefs),this._customHeaderRowDefs),this._footerRowDefs=nh(this._getOwnDefs(this._contentFooterRowDefs),this._customFooterRowDefs),this._rowDefs=nh(this._getOwnDefs(this._contentRowDefs),this._customRowDefs);let e=this._rowDefs.filter(n=>!n.when);!this.multiTemplateDataRows&&e.length>1,this._defaultRowDef=e[0]}_renderUpdatedColumns(){let e=(s,a)=>{let l=!!a.getColumnsDiff();return s||l},n=this._rowDefs.reduce(e,!1);n&&this._forceRenderDataRows();let o=this._headerRowDefs.reduce(e,!1);o&&this._forceRenderHeaderRows();let r=this._footerRowDefs.reduce(e,!1);return r&&this._forceRenderFooterRows(),n||o||r}_switchDataSource(e){this._data=[],ac(this.dataSource)&&this.dataSource.disconnect(this),this._renderChangeSubscription&&(this._renderChangeSubscription.unsubscribe(),this._renderChangeSubscription=null),e||(this._dataDiffer&&this._dataDiffer.diff([]),this._rowOutlet&&this._rowOutlet.viewContainer.clear()),this._dataSource=e}_observeRenderChanges(){if(!this.dataSource)return;let e;ac(this.dataSource)?e=this.dataSource.connect(this):Cg(this.dataSource)?e=this.dataSource:Array.isArray(this.dataSource)&&(e=_i(this.dataSource)),this._renderChangeSubscription=e.pipe(ye(this._onDestroy)).subscribe(n=>{this._data=n||[],this.renderRows()})}_forceRenderHeaderRows(){this._headerRowOutlet.viewContainer.length>0&&this._headerRowOutlet.viewContainer.clear(),this._headerRowDefs.forEach((e,n)=>this._renderRow(this._headerRowOutlet,e,n)),this.updateStickyHeaderRowStyles()}_forceRenderFooterRows(){this._footerRowOutlet.viewContainer.length>0&&this._footerRowOutlet.viewContainer.clear(),this._footerRowDefs.forEach((e,n)=>this._renderRow(this._footerRowOutlet,e,n)),this.updateStickyFooterRowStyles()}_addStickyColumnStyles(e,n){let o=Array.from(n.columns||[]).map(a=>{let l=this._columnDefsByName.get(a);return l}),r=o.map(a=>a.sticky),s=o.map(a=>a.stickyEnd);this._stickyStyler.updateStickyColumns(e,r,s,!this._fixedLayout||this._forceRecalculateCellWidths)}_getRenderedRows(e){let n=[];for(let o=0;o<e.viewContainer.length;o++){let r=e.viewContainer.get(o);n.push(r.rootNodes[0])}return n}_getRowDefs(e,n){if(this._rowDefs.length==1)return[this._rowDefs[0]];let o=[];if(this.multiTemplateDataRows)o=this._rowDefs.filter(r=>!r.when||r.when(n,e));else{let r=this._rowDefs.find(s=>s.when&&s.when(n,e))||this._defaultRowDef;r&&o.push(r)}return o.length,o}_getEmbeddedViewArgs(e,n){let o=e.rowDef,r={$implicit:e.data};return{templateRef:o.template,context:r,index:n}}_renderRow(e,n,o,r={}){let s=e.viewContainer.createEmbeddedView(n.template,r,o);return this._renderCellTemplateForItem(n,r),s}_renderCellTemplateForItem(e,n){for(let o of this._getCellTemplates(e))Kr.mostRecentCellOutlet&&Kr.mostRecentCellOutlet._viewContainer.createEmbeddedView(o,n);this._changeDetectorRef.markForCheck()}_updateRowIndexContext(){let e=this._rowOutlet.viewContainer;for(let n=0,o=e.length;n<o;n++){let s=e.get(n).context;s.count=o,s.first=n===0,s.last=n===o-1,s.even=n%2===0,s.odd=!s.even,this.multiTemplateDataRows?(s.dataIndex=this._renderRows[n].dataIndex,s.renderIndex=n):s.index=this._renderRows[n].dataIndex}}_getCellTemplates(e){return!e||!e.columns?[]:Array.from(e.columns,n=>{let o=this._columnDefsByName.get(n);return e.extractCellTemplate(o)})}_forceRenderDataRows(){this._dataDiffer.diff([]),this._rowOutlet.viewContainer.clear(),this.renderRows()}_checkStickyStates(){let e=(n,o)=>n||o.hasStickyChanged();this._headerRowDefs.reduce(e,!1)&&this.updateStickyHeaderRowStyles(),this._footerRowDefs.reduce(e,!1)&&this.updateStickyFooterRowStyles(),Array.from(this._columnDefsByName.values()).reduce(e,!1)&&(this._stickyColumnStylesNeedReset=!0,this.updateStickyColumnStyles())}_setupStickyStyler(){let e=this._dir?this._dir.value:"ltr";this._stickyStyler=new sg(this._isNativeHtmlTable,this.stickyCssClass,e,this._coalescedStyleScheduler,this._platform.isBrowser,this.needsPositionStickyOnElement,this._stickyPositioningListener),(this._dir?this._dir.change:_i()).pipe(ye(this._onDestroy)).subscribe(n=>{this._stickyStyler.direction=n,this.updateStickyColumnStyles()})}_getOwnDefs(e){return e.filter(n=>!n._table||n._table===this)}_updateNoDataRow(){let e=this._customNoDataRow||this._noDataRow;if(!e)return;let n=this._rowOutlet.viewContainer.length===0;if(n===this._isShowingNoDataRow)return;let o=this._noDataRowOutlet.viewContainer;if(n){let r=o.createEmbeddedView(e.templateRef),s=r.rootNodes[0];r.rootNodes.length===1&&s?.nodeType===this._document.ELEMENT_NODE&&(s.setAttribute("role","row"),s.classList.add(e._contentClassName))}else o.clear();this._isShowingNoDataRow=n,this._changeDetectorRef.markForCheck()}static{this.\u0275fac=function(n){return new(n||t)(_(os),_(tn),_(Ae),ha("role"),_(Hi,8),_(wt),_(Oi),_(ga),_(sh),_($n),_(ah,12),_(Je,8))}}static{this.\u0275cmp=F({type:t,selectors:[["cdk-table"],["table","cdk-table",""]],contentQueries:function(n,o,r){if(n&1&&(bi(r,XE,5),bi(r,sa,5),bi(r,dh,5),bi(r,Hl,5),bi(r,cg,5)),n&2){let s;me(s=fe())&&(o._noDataRow=s.first),me(s=fe())&&(o._contentColumnDefs=s),me(s=fe())&&(o._contentRowDefs=s),me(s=fe())&&(o._contentHeaderRowDefs=s),me(s=fe())&&(o._contentFooterRowDefs=s)}},hostAttrs:[1,"cdk-table"],hostVars:2,hostBindings:function(n,o){n&2&&Fe("cdk-table-fixed-layout",o.fixedLayout)},inputs:{trackBy:"trackBy",dataSource:"dataSource",multiTemplateDataRows:[2,"multiTemplateDataRows","multiTemplateDataRows",qe],fixedLayout:[2,"fixedLayout","fixedLayout",qe]},outputs:{contentChanged:"contentChanged"},exportAs:["cdkTable"],standalone:!0,features:[ze([{provide:An,useExisting:t},{provide:ga,useClass:lc},{provide:sh,useClass:ag},{provide:ah,useValue:null}]),Tt,B],ngContentSelectors:xj,decls:5,vars:2,consts:[["role","rowgroup"],["headerRowOutlet",""],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(n,o){n&1&&(It(Tj),ct(0),ct(1,1),T(2,Pj,1,0)(3,Oj,7,0)(4,Ij,4,0)),n&2&&(u(2),L(o._isServer?2:-1),u(),L(o._isNativeHtmlTable?3:4))},dependencies:[ug,hg,fg,mg],styles:[".cdk-table-fixed-layout{table-layout:fixed}"],encapsulation:2})}}return t})();function nh(t,i){return t.concat(Array.from(i))}function UE(t,i){let e=i.toUpperCase(),n=t.viewContainer.element.nativeElement;for(;n;){let o=n.nodeType===1?n.nodeName:null;if(o===e)return n;if(o==="TABLE")break;n=n.parentNode}return null}var KE=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275mod=ht({type:t})}static{this.\u0275inj=dt({imports:[vn]})}}return t})();var Mj=[[["caption"]],[["colgroup"],["col"]],"*"],Rj=["caption","colgroup, col","*"];function Aj(t,i){t&1&&ct(0,2)}function kj(t,i){t&1&&(f(0,"thead",0),He(1,1),g(),f(2,"tbody",2),He(3,3)(4,4),g(),f(5,"tfoot",0),He(6,5),g())}function Nj(t,i){t&1&&He(0,1)(1,3)(2,4)(3,5)}var ZE=(()=>{class t extends Zr{constructor(){super(...arguments),this.stickyCssClass="mat-mdc-table-sticky",this.needsPositionStickyOnElement=!1}static{this.\u0275fac=(()=>{let e;return function(o){return(e||(e=ti(t)))(o||t)}})()}static{this.\u0275cmp=F({type:t,selectors:[["mat-table"],["table","mat-table",""]],hostAttrs:[1,"mat-mdc-table","mdc-data-table__table"],hostVars:2,hostBindings:function(n,o){n&2&&Fe("mdc-table-fixed-layout",o.fixedLayout)},exportAs:["matTable"],standalone:!0,features:[ze([{provide:Zr,useExisting:t},{provide:An,useExisting:t},{provide:sh,useClass:ag},{provide:ga,useClass:lc},{provide:ah,useValue:null}]),ot,B],ngContentSelectors:Rj,decls:5,vars:2,consts:[["role","rowgroup"],["headerRowOutlet",""],["role","rowgroup",1,"mdc-data-table__content"],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(n,o){n&1&&(It(Mj),ct(0),ct(1,1),T(2,Aj,1,0)(3,kj,7,0)(4,Nj,4,0)),n&2&&(u(2),L(o._isServer?2:-1),u(),L(o._isNativeHtmlTable?3:4))},dependencies:[ug,hg,fg,mg],styles:[".mat-mdc-table-sticky{position:sticky !important}mat-table{display:block}mat-header-row{min-height:56px}mat-row,mat-footer-row{min-height:48px}mat-row,mat-header-row,mat-footer-row{display:flex;border-width:0;border-bottom-width:1px;border-style:solid;align-items:center;box-sizing:border-box}mat-cell:first-of-type,mat-header-cell:first-of-type,mat-footer-cell:first-of-type{padding-left:24px}[dir=rtl] mat-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:first-of-type:not(:only-of-type){padding-left:0;padding-right:24px}mat-cell:last-of-type,mat-header-cell:last-of-type,mat-footer-cell:last-of-type{padding-right:24px}[dir=rtl] mat-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:last-of-type:not(:only-of-type){padding-right:0;padding-left:24px}mat-cell,mat-header-cell,mat-footer-cell{flex:1;display:flex;align-items:center;overflow:hidden;word-wrap:break-word;min-height:inherit}.mat-mdc-table{min-width:100%;border:0;border-spacing:0;table-layout:auto;white-space:normal;background-color:var(--mat-table-background-color, var(--mat-app-surface))}.mdc-data-table__cell{box-sizing:border-box;overflow:hidden;text-align:left;text-overflow:ellipsis}[dir=rtl] .mdc-data-table__cell{text-align:right}.mdc-data-table__cell,.mdc-data-table__header-cell{padding:0 16px}.mat-mdc-header-row{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;height:var(--mat-table-header-container-height, 56px);color:var(--mat-table-header-headline-color, var(--mat-app-on-surface, rgba(0, 0, 0, 0.87)));font-family:var(--mat-table-header-headline-font, var(--mat-app-title-small-font, Roboto, sans-serif));line-height:var(--mat-table-header-headline-line-height, var(--mat-app-title-small-line-height));font-size:var(--mat-table-header-headline-size, var(--mat-app-title-small-size, 14px));font-weight:var(--mat-table-header-headline-weight, var(--mat-app-title-small-weight, 500))}.mat-mdc-row{height:var(--mat-table-row-item-container-height, 52px);color:var(--mat-table-row-item-label-text-color, var(--mat-app-on-surface, rgba(0, 0, 0, 0.87)))}.mat-mdc-row,.mdc-data-table__content{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-table-row-item-label-text-font, var(--mat-app-body-medium-font, Roboto, sans-serif));line-height:var(--mat-table-row-item-label-text-line-height, var(--mat-app-body-medium-line-height));font-size:var(--mat-table-row-item-label-text-size, var(--mat-app-body-medium-size, 14px));font-weight:var(--mat-table-row-item-label-text-weight, var(--mat-app-body-medium-weight))}.mat-mdc-footer-row{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;height:var(--mat-table-footer-container-height, 52px);color:var(--mat-table-row-item-label-text-color, var(--mat-app-on-surface, rgba(0, 0, 0, 0.87)));font-family:var(--mat-table-footer-supporting-text-font, var(--mat-app-body-medium-font, Roboto, sans-serif));line-height:var(--mat-table-footer-supporting-text-line-height, var(--mat-app-body-medium-line-height));font-size:var(--mat-table-footer-supporting-text-size, var(--mat-app-body-medium-size, 14px));font-weight:var(--mat-table-footer-supporting-text-weight, var(--mat-app-body-medium-weight));letter-spacing:var(--mat-table-footer-supporting-text-tracking, var(--mat-app-body-medium-tracking))}.mat-mdc-header-cell{border-bottom-color:var(--mat-table-row-item-outline-color, var(--mat-app-outline, rgba(0, 0, 0, 0.12)));border-bottom-width:var(--mat-table-row-item-outline-width, 1px);border-bottom-style:solid;letter-spacing:var(--mat-table-header-headline-tracking, var(--mat-app-title-small-tracking));font-weight:inherit;line-height:inherit;box-sizing:border-box;text-overflow:ellipsis;overflow:hidden;outline:none;text-align:left}[dir=rtl] .mat-mdc-header-cell{text-align:right}.mat-mdc-cell{border-bottom-color:var(--mat-table-row-item-outline-color, var(--mat-app-outline, rgba(0, 0, 0, 0.12)));border-bottom-width:var(--mat-table-row-item-outline-width, 1px);border-bottom-style:solid;letter-spacing:var(--mat-table-row-item-label-text-tracking, var(--mat-app-body-medium-tracking));line-height:inherit}.mdc-data-table__row:last-child .mat-mdc-cell{border-bottom:none}.mat-mdc-footer-cell{letter-spacing:var(--mat-table-row-item-label-text-tracking, var(--mat-app-body-medium-tracking))}mat-row.mat-mdc-row,mat-header-row.mat-mdc-header-row,mat-footer-row.mat-mdc-footer-row{border-bottom:none}.mat-mdc-table tbody,.mat-mdc-table tfoot,.mat-mdc-table thead,.mat-mdc-cell,.mat-mdc-footer-cell,.mat-mdc-header-row,.mat-mdc-row,.mat-mdc-footer-row,.mat-mdc-table .mat-mdc-header-cell{background:inherit}.mat-mdc-table mat-header-row.mat-mdc-header-row,.mat-mdc-table mat-row.mat-mdc-row,.mat-mdc-table mat-footer-row.mat-mdc-footer-cell{height:unset}mat-header-cell.mat-mdc-header-cell,mat-cell.mat-mdc-cell,mat-footer-cell.mat-mdc-footer-cell{align-self:stretch}"],encapsulation:2})}}return t})(),JE=(()=>{class t extends lh{static{this.\u0275fac=(()=>{let e;return function(o){return(e||(e=ti(t)))(o||t)}})()}static{this.\u0275dir=Se({type:t,selectors:[["","matCellDef",""]],standalone:!0,features:[ze([{provide:lh,useExisting:t}]),ot]})}}return t})(),e1=(()=>{class t extends ch{static{this.\u0275fac=(()=>{let e;return function(o){return(e||(e=ti(t)))(o||t)}})()}static{this.\u0275dir=Se({type:t,selectors:[["","matHeaderCellDef",""]],standalone:!0,features:[ze([{provide:ch,useExisting:t}]),ot]})}}return t})();var t1=(()=>{class t extends sa{get name(){return this._name}set name(e){this._setNameInput(e)}_updateColumnCssClassName(){super._updateColumnCssClassName(),this._columnCssClassName.push(`mat-column-${this.cssClassFriendlyName}`)}static{this.\u0275fac=(()=>{let e;return function(o){return(e||(e=ti(t)))(o||t)}})()}static{this.\u0275dir=Se({type:t,selectors:[["","matColumnDef",""]],inputs:{name:[0,"matColumnDef","name"]},standalone:!0,features:[ze([{provide:sa,useExisting:t},{provide:"MAT_SORT_HEADER_COLUMN_DEF",useExisting:t}]),ot]})}}return t})(),i1=(()=>{class t extends QE{static{this.\u0275fac=(()=>{let e;return function(o){return(e||(e=ti(t)))(o||t)}})()}static{this.\u0275dir=Se({type:t,selectors:[["mat-header-cell"],["th","mat-header-cell",""]],hostAttrs:["role","columnheader",1,"mat-mdc-header-cell","mdc-data-table__header-cell"],standalone:!0,features:[ot]})}}return t})();var n1=(()=>{class t extends YE{static{this.\u0275fac=(()=>{let e;return function(o){return(e||(e=ti(t)))(o||t)}})()}static{this.\u0275dir=Se({type:t,selectors:[["mat-cell"],["td","mat-cell",""]],hostAttrs:[1,"mat-mdc-cell","mdc-data-table__cell"],standalone:!0,features:[ot]})}}return t})();var o1=(()=>{class t extends Hl{static{this.\u0275fac=(()=>{let e;return function(o){return(e||(e=ti(t)))(o||t)}})()}static{this.\u0275dir=Se({type:t,selectors:[["","matHeaderRowDef",""]],inputs:{columns:[0,"matHeaderRowDef","columns"],sticky:[2,"matHeaderRowDefSticky","sticky",qe]},standalone:!0,features:[ze([{provide:Hl,useExisting:t}]),Tt,ot]})}}return t})();var r1=(()=>{class t extends dh{static{this.\u0275fac=(()=>{let e;return function(o){return(e||(e=ti(t)))(o||t)}})()}static{this.\u0275dir=Se({type:t,selectors:[["","matRowDef",""]],inputs:{columns:[0,"matRowDefColumns","columns"],when:[0,"matRowDefWhen","when"]},standalone:!0,features:[ze([{provide:dh,useExisting:t}]),ot]})}}return t})(),s1=(()=>{class t extends dg{static{this.\u0275fac=(()=>{let e;return function(o){return(e||(e=ti(t)))(o||t)}})()}static{this.\u0275cmp=F({type:t,selectors:[["mat-header-row"],["tr","mat-header-row",""]],hostAttrs:["role","row",1,"mat-mdc-header-row","mdc-data-table__header-row"],exportAs:["matHeaderRow"],standalone:!0,features:[ze([{provide:dg,useExisting:t}]),ot,B],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(n,o){n&1&&He(0,0)},dependencies:[Kr],encapsulation:2})}}return t})();var a1=(()=>{class t extends pg{static{this.\u0275fac=(()=>{let e;return function(o){return(e||(e=ti(t)))(o||t)}})()}static{this.\u0275cmp=F({type:t,selectors:[["mat-row"],["tr","mat-row",""]],hostAttrs:["role","row",1,"mat-mdc-row","mdc-data-table__row"],exportAs:["matRow"],standalone:!0,features:[ze([{provide:pg,useExisting:t}]),ot,B],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(n,o){n&1&&He(0,0)},dependencies:[Kr],encapsulation:2})}}return t})();var l1=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275mod=ht({type:t})}static{this.\u0275inj=dt({imports:[yi,KE,yi]})}}return t})(),Lj=9007199254740991,ph=class extends sc{get data(){return this._data.value}set data(i){i=Array.isArray(i)?i:[],this._data.next(i),this._renderChangesSubscription||this._filterData(i)}get filter(){return this._filter.value}set filter(i){this._filter.next(i),this._renderChangesSubscription||this._filterData(this.data)}get sort(){return this._sort}set sort(i){this._sort=i,this._updateChangeSubscription()}get paginator(){return this._paginator}set paginator(i){this._paginator=i,this._updateChangeSubscription()}constructor(i=[]){super(),this._renderData=new it([]),this._filter=new it(""),this._internalPageChanges=new X,this._renderChangesSubscription=null,this.sortingDataAccessor=(e,n)=>{let o=e[n];if(jg(o)){let r=Number(o);return r<Lj?r:o}return o},this.sortData=(e,n)=>{let o=n.active,r=n.direction;return!o||r==""?e:e.sort((s,a)=>{let l=this.sortingDataAccessor(s,o),c=this.sortingDataAccessor(a,o),d=typeof l,p=typeof c;d!==p&&(d==="number"&&(l+=""),p==="number"&&(c+=""));let h=0;return l!=null&&c!=null?l>c?h=1:l<c&&(h=-1):l!=null?h=1:c!=null&&(h=-1),h*(r=="asc"?1:-1)})},this.filterPredicate=(e,n)=>{let o=Object.keys(e).reduce((s,a)=>s+e[a]+"\u25EC","").toLowerCase(),r=n.trim().toLowerCase();return o.indexOf(r)!=-1},this._data=new it(i),this._updateChangeSubscription()}_updateChangeSubscription(){let i=this._sort?Zt(this._sort.sortChange,this._sort.initialized):_i(null),e=this._paginator?Zt(this._paginator.page,this._internalPageChanges,this._paginator.initialized):_i(null),n=this._data,o=_o([n,this._filter]).pipe(Kt(([a])=>this._filterData(a))),r=_o([o,i]).pipe(Kt(([a])=>this._orderData(a))),s=_o([r,e]).pipe(Kt(([a])=>this._pageData(a)));this._renderChangesSubscription?.unsubscribe(),this._renderChangesSubscription=s.subscribe(a=>this._renderData.next(a))}_filterData(i){return this.filteredData=this.filter==null||this.filter===""?i:i.filter(e=>this.filterPredicate(e,this.filter)),this.paginator&&this._updatePaginator(this.filteredData.length),this.filteredData}_orderData(i){return this.sort?this.sortData(i.slice(),this.sort):i}_pageData(i){if(!this.paginator)return i;let e=this.paginator.pageIndex*this.paginator.pageSize;return i.slice(e,e+this.paginator.pageSize)}_updatePaginator(i){Promise.resolve().then(()=>{let e=this.paginator;if(e&&(e.length=i,e.pageIndex>0)){let n=Math.ceil(e.length/e.pageSize)-1||0,o=Math.min(e.pageIndex,n);o!==e.pageIndex&&(e.pageIndex=o,this._internalPageChanges.next())}})}connect(){return this._renderChangesSubscription||this._updateChangeSubscription(),this._renderData}disconnect(){this._renderChangesSubscription?.unsubscribe(),this._renderChangesSubscription=null}};var Vj=(()=>{class t{constructor(){this.indexChange=new X,this.stickyChange=new X,this.renderedRangeStream=new it({start:0,end:0}),this.scrolledIndexChange=this.indexChange.pipe(br()),this._dataLength=0}get dataLength(){return this._dataLength}set dataLength(e){e!==this._dataLength&&(this._dataLength=e,this.onDataLengthChanged())}attach(e){this.viewport=e,this.viewport.renderedRangeStream.subscribe(this.renderedRangeStream),this.stickyChange.next(0),this.onDataLengthChanged()}detach(){this.indexChange.complete(),this.stickyChange.complete(),this.renderedRangeStream.complete()}onContentScrolled(){this.updateContent()}onDataLengthChanged(){if(this.viewport){let e=this.dataLength*this.rowHeight+this.headerHeight+this.footerHeight;this.viewport.setTotalContentSize(e);let n=this.viewport.getViewportSize();this.viewport.measureScrollOffset()+n>=e&&this.viewport.scrollToOffset(e-n)}this.updateContent()}onContentRendered(){}onRenderedOffsetChanged(){}scrollToIndex(e,n){!this.viewport||!this.rowHeight||this.viewport.scrollToOffset((e-1)*this.rowHeight+this.headerHeight,n)}setConfig(e){let{rowHeight:n,headerHeight:o,footerHeight:r,bufferMultiplier:s}=e;this.rowHeight===n&&this.headerHeight===o&&this.footerHeight===r&&this.bufferMultiplier===s||(this.rowHeight=n,this.headerHeight=o,this.footerHeight=r,this.bufferMultiplier=s,this.onDataLengthChanged())}updateContent(){if(!this.viewport||!this.rowHeight)return;let e=this.viewport.getOffsetToRenderedContentStart(),n=e/this.rowHeight,o=Math.ceil(this.viewport.getViewportSize()/this.rowHeight),r=Math.ceil(o*this.bufferMultiplier),s=n+o+2*r,a=e+r*this.rowHeight,l=this.viewport.measureScrollOffset(),d=(l-a)/this.rowHeight,p=l/this.rowHeight;if(this.indexChange.next(p),Math.abs(d)<1){this.viewport.setRenderedContentOffset(e),this.viewport.setRenderedRange({start:n,end:s});return}if(e===0&&d<0){this.viewport.setRenderedContentOffset(e),this.viewport.setRenderedRange({start:n,end:s});return}let m=Math.sign(d)*Math.floor(Math.abs(d)),S=Math.max(0,e+m*this.rowHeight);this.viewport.setRenderedContentOffset(S);let y=Math.max(0,n+m),w=y+o+2*r;this.viewport.setRenderedRange({start:y,end:w}),this.stickyChange.next(S)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ne({token:t,factory:t.\u0275fac}),t})();function Bj(t){return t instanceof hh||t instanceof aa}var hh=class extends sc{constructor(i=[]){super(),this._renderData=new it([]),this._renderChangesSubscription=null,this._data=new it(i),this._updateChangeSubscription()}get data(){return this._data.value}set data(i){i=Array.isArray(i)?i:[],this._data.next(i)}_updateChangeSubscription(){this.initStreams(),this._renderChangesSubscription?.unsubscribe(),this._renderChangesSubscription=new gi,this._renderChangesSubscription.add(this._data.subscribe(i=>this.dataToRender$.next(i))),this._renderChangesSubscription.add(this.dataOfRange$.subscribe(i=>this._renderData.next(i)))}connect(){return this._renderChangesSubscription||this._updateChangeSubscription(),this._renderData}disconnect(){this._renderChangesSubscription?.unsubscribe(),this._renderChangesSubscription=null}initStreams(){this.streamsReady||(this.dataToRender$=new Ln(1),this.dataOfRange$=new Ln(1),this.streamsReady=!0)}},aa=class extends ph{_updateChangeSubscription(){this.initStreams();let i=this._sort,e=this._paginator,n=this._internalPageChanges,o=this._filter,r=this._renderData,s=i?Zt(i.sortChange,i.initialized):_i(null),a=e?Zt(e.page,n,e.initialized):_i(null),l=this._data,c=_o([l,o]).pipe(Kt(([h])=>this._filterData(h))),d=_o([c,s]).pipe(Kt(([h])=>this._orderData(h))),p=_o([d,a]).pipe(Kt(([h])=>this._pageData(h)));this._renderChangesSubscription?.unsubscribe(),this._renderChangesSubscription=new gi,this._renderChangesSubscription.add(p.subscribe(h=>this.dataToRender$.next(h))),this._renderChangesSubscription.add(this.dataOfRange$.subscribe(h=>r.next(h)))}initStreams(){this.streamsReady||(this.dataToRender$=new Ln(1),this.dataOfRange$=new Ln(1),this.streamsReady=!0)}};function Hj(t){return t.scrollStrategy}function p1(...t){return t.map(i=>`${i.join(" ")}, ${i.join("")}`).join(", ")}var c1=p1([".mat-mdc-header-row",".mat-mdc-table-sticky"],[".mat-header-row",".mat-table-sticky"],[".cdk-header-row",".cdk-table-sticky"]),d1=p1([".mat-mdc-footer-row",".mat-mdc-table-sticky"],[".mat-footer-row",".mat-table-sticky"],[".cdk-footer-row",".cdk-table-sticky"]);function jj(t){return t instanceof Zr&&t.stickyCssClass.includes("mat")}function qj(t){return t instanceof Zr&&t.stickyCssClass.includes("cdk")}var go={rowHeight:48,headerHeight:56,headerEnabled:!0,footerHeight:48,footerEnabled:!1,bufferMultiplier:.7},h1=(()=>{class t{constructor(e){this.zone=e,this.destroyed$=new X,this.rowHeight=go.rowHeight,this.headerEnabled=go.headerEnabled,this.headerHeight=go.headerHeight,this.footerEnabled=go.footerEnabled,this.footerHeight=go.footerHeight,this.bufferMultiplier=go.bufferMultiplier,this.scrollStrategy=new Vj,this.dataSourceChanges=new X,this.resetStickyPositions=new X,this.stickyEnabled={header:!1,footer:!1}}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete(),this.dataSourceChanges.complete()}ngAfterContentInit(){let e=this.table._switchDataSource;this.table._switchDataSource=o=>{e.call(this.table,o),this.connectDataSource(o)};let n=this.table.updateStickyColumnStyles;this.table.updateStickyColumnStyles=()=>{let o=this.table._stickyColumnStylesNeedReset;n.call(this.table),o&&this.resetStickyPositions.next()},this.connectDataSource(this.table.dataSource),_o([this.scrollStrategy.stickyChange,this.resetStickyPositions.pipe(xi(void 0),xg(()=>this.getScheduleObservable()),pa(()=>{this.stickyPositions=null}))]).pipe(ye(this.destroyed$)).subscribe(([o])=>{this.stickyPositions||this.initStickyPositions(),this.stickyEnabled.header&&this.setStickyHeader(o),this.stickyEnabled.footer&&this.setStickyFooter(o)})}connectDataSource(e){if(this.dataSourceChanges.next(),!Bj(e))throw new Error("[tvsItemSize] requires TableVirtualScrollDataSource or CdkTableVirtualScrollDataSource be set as [dataSource] of the table");if(jj(this.table)&&!(e instanceof aa))throw new Error("[tvsItemSize] requires TableVirtualScrollDataSource be set as [dataSource] of [mat-table]");if(qj(this.table)&&!(e instanceof hh))throw new Error("[tvsItemSize] requires CdkTableVirtualScrollDataSource be set as [dataSource] of [cdk-table]");e.dataToRender$.pipe(br(),ye(this.dataSourceChanges),ye(this.destroyed$),pa(n=>this.scrollStrategy.dataLength=n.length),Vo(n=>this.scrollStrategy.renderedRangeStream.pipe(Kt(({start:o,end:r})=>typeof o!="number"||typeof r!="number"?n:n.slice(o,r))))).subscribe(n=>{this.zone.run(()=>{e.dataOfRange$.next(n)})})}ngOnChanges(){let e={rowHeight:+this.rowHeight||go.rowHeight,headerHeight:this.headerEnabled?+this.headerHeight||go.headerHeight:0,footerHeight:this.footerEnabled?+this.footerHeight||go.footerHeight:0,bufferMultiplier:+this.bufferMultiplier||go.bufferMultiplier};this.scrollStrategy.setConfig(e)}setStickyEnabled(){if(!this.scrollStrategy.viewport){this.stickyEnabled={header:!1,footer:!1};return}let e=n=>n.map(o=>o.sticky).reduce((o,r)=>o&&r,!0);this.stickyEnabled={header:e(this.table._headerRowDefs),footer:e(this.table._footerRowDefs)}}setStickyHeader(e){this.scrollStrategy.viewport.elementRef.nativeElement.querySelectorAll(c1).forEach(n=>{let o=n.parentElement,r=0;this.stickyPositions.has(o)&&(r=this.stickyPositions.get(o)),n.style.top=`${r-e}px`})}setStickyFooter(e){this.scrollStrategy.viewport.elementRef.nativeElement.querySelectorAll(d1).forEach(n=>{let o=n.parentElement,r=0;this.stickyPositions.has(o)&&(r=this.stickyPositions.get(o)),n.style.bottom=`${-r+e}px`})}initStickyPositions(){this.stickyPositions=new Map,this.setStickyEnabled(),this.stickyEnabled.header&&this.scrollStrategy.viewport.elementRef.nativeElement.querySelectorAll(c1).forEach(e=>{let n=e.parentElement;this.stickyPositions.has(n)||this.stickyPositions.set(n,n.offsetTop)}),this.stickyEnabled.footer&&this.scrollStrategy.viewport.elementRef.nativeElement.querySelectorAll(d1).forEach(e=>{let n=e.parentElement;this.stickyPositions.has(n)||this.stickyPositions.set(n,-n.offsetTop)})}getScheduleObservable(){return this.zone.isStable?yg(Promise.resolve(void 0)):this.zone.onStable.pipe(Fn(1))}}return t.\u0275fac=function(e){return new(e||t)(_(Je))},t.\u0275dir=Se({type:t,selectors:[["cdk-virtual-scroll-viewport","tvsItemSize",""]],contentQueries:function(e,n,o){if(e&1&&bi(o,Zr,5),e&2){let r;me(r=fe())&&(n.table=r.first)}},inputs:{rowHeight:[0,"tvsItemSize","rowHeight"],headerEnabled:"headerEnabled",headerHeight:"headerHeight",footerEnabled:"footerEnabled",footerHeight:"footerHeight",bufferMultiplier:"bufferMultiplier"},features:[ze([{provide:$g,useFactory:Hj,deps:[vh(()=>t)]}]),$e]}),t})(),u1=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ht({type:t}),t.\u0275inj=dt({}),t})();var Gj=(t,i)=>i.seriesName;function $j(t,i){if(t&1&&(f(0,"th",10),q(1),g()),t&2){let e=v();u(),le(" ",e.nameCol," ")}}function Uj(t,i){if(t&1&&(f(0,"td",11),q(1),g()),t&2){let e=i.$implicit;u(),le(" ",e.name," ")}}function Wj(t,i){if(t&1&&(f(0,"th",10),q(1),g()),t&2){let e=v().$implicit;u(),le(" ",e.seriesName+(e.unit?" ("+e.unit+")":"")," ")}}function Qj(t,i){if(t&1&&(f(0,"td",11),q(1),g()),t&2){let e=i.$implicit,n=v().$index;u(),le(" ",e.data[n]," ")}}function Yj(t,i){if(t&1&&(Vi(0,3),T(1,Wj,2,1,"th",4)(2,Qj,2,1,"td",5),Bi()),t&2){let e=i.$implicit;b("matColumnDef",e.seriesName)}}function Xj(t,i){t&1&&M(0,"th",12)}function Kj(t,i){if(t&1){let e=Z();f(0,"td",13)(1,"q-icon-button",14),I("click",function(o){R(e);let r=ue(3);return A(r.toggle(o))}),g(),f(2,"q-menu",15,0),I("selected",function(o){let r=R(e).$implicit,s=v();return A(s.contextAction.emit({itemName:r.name,event:o}))}),g()()}if(t&2){let e=v();u(),b("icon",e.iconService.moreVertical)("dense",!0),u(),b("items",e.contextMenu)}}function Zj(t,i){t&1&&M(0,"tr",16)}function Jj(t,i){if(t&1&&M(0,"tr",17),t&2){let e=i.$implicit,n=v();Fe("highlighted",e.name===n.highlightedItemName)}}var gg=(()=>{class t{constructor(e){this.iconService=e,this.contextAction=new de,this.displayedColumns=[],this.dataSource=new aa([]),this.toggledData=[],this.NAME_COL="name",this.CONTEXT_COL="context",this.destroyed$=new X}ngOnInit(){this.highlight$&&this.highlight$.pipe(ye(this.destroyed$)).subscribe(e=>{let{data:n}=this.toggledData[0],o=n.findIndex(r=>r.name===e);o>-1&&(this.viewPort.scrollToIndex(o),this.highlightedItemName=n[o].name)})}ngOnChanges(e){let n=e.data?.currentValue!==e.data?.previousValue,o=e.toggledSeries?.currentValue!==e.data?.previousValue;(n||o)&&(this.toggledData=this.data.filter(r=>this.toggledSeries[r.seriesName]),this.dataSource.data=this.mapToTableData(this.toggledData),this.displayedColumns=this.getDisplayedColumns())}getDisplayedColumns(){let e=this.toggledData.map(o=>o.seriesName),n=[this.NAME_COL,...e];return this.contextMenu&&n.push(this.CONTEXT_COL),n}mapToTableData(e){return e[0]?.data.map((n,o)=>({name:e[0].data[o].name,data:e.map(r=>r.data[o].value.toLocaleString())}))}ngOnDestroy(){this.destroyed$.next(!0),this.destroyed$.unsubscribe()}static{this.\u0275fac=function(n){return new(n||t)(_(Ce))}}static{this.\u0275cmp=F({type:t,selectors:[["app-data-list"]],viewQuery:function(n,o){if(n&1&&Ee(qo,5),n&2){let r;me(r=fe())&&(o.viewPort=r.first)}},inputs:{nameCol:"nameCol",data:"data",toggledSeries:"toggledSeries",highlight$:"highlight$",contextMenu:"contextMenu"},outputs:{contextAction:"contextAction"},standalone:!0,features:[$e,B],decls:12,vars:5,consts:[["menu",""],["tvsItemSize","50","headerHeight","56"],["mat-table","",1,"mat-elevation-z0",3,"dataSource"],[3,"matColumnDef"],["mat-header-cell","","class","table-header-name",4,"matHeaderCellDef"],["mat-cell","","class","cell",4,"matCellDef"],["mat-header-cell","","class","table-header-name context-col",4,"matHeaderCellDef"],["mat-cell","","class","cell context-col",4,"matCellDef"],["mat-header-row","","class","column-header-row",4,"matHeaderRowDef"],["mat-row","","class","row",3,"highlighted",4,"matRowDef","matRowDefColumns"],["mat-header-cell","",1,"table-header-name"],["mat-cell","",1,"cell"],["mat-header-cell","",1,"table-header-name","context-col"],["mat-cell","",1,"cell","context-col"],["variant","ghost",3,"click","icon","dense"],["appendTo","portal",3,"selected","items"],["mat-header-row","",1,"column-header-row"],["mat-row","",1,"row"]],template:function(n,o){n&1&&(f(0,"cdk-virtual-scroll-viewport",1)(1,"table",2),Vi(2,3),T(3,$j,2,1,"th",4)(4,Uj,2,1,"td",5),Bi(),Pe(5,Yj,3,1,"ng-container",3,Gj),Vi(7,3),T(8,Xj,1,0,"th",6)(9,Kj,4,3,"td",7),Bi(),T(10,Zj,1,0,"tr",8)(11,Jj,1,2,"tr",9),g()()),n&2&&(u(),b("dataSource",o.dataSource),u(),b("matColumnDef",o.NAME_COL),u(3),Oe(o.toggledData),u(2),b("matColumnDef",o.CONTEXT_COL),u(3),b("matHeaderRowDef",o.displayedColumns),u(),b("matRowDefColumns",o.displayedColumns))},dependencies:[u1,h1,vn,qo,be,l1,ZE,e1,o1,t1,JE,r1,i1,n1,s1,a1,Gi,Yo,Ve,Ft],styles:["table[_ngcontent-%COMP%]{border:1px solid var(--qds-border-subtle-1)}.cell[_ngcontent-%COMP%]{font-size:var(--q-font-size-body-xs);background-color:var(--qds-background-neutral-4)}.column-header-row[_ngcontent-%COMP%]{border-top:1px solid var(--qds-border-subtle-1);background-color:var(--qds-background-neutral-4);font-weight:var(--q-font-weight-semi-bold);font-size:var(--q-font-size-body-xs)}cdk-virtual-scroll-viewport[_ngcontent-%COMP%]{height:30vh}.row[_ngcontent-%COMP%]{height:50px;border-top:1px solid var(--qds-border-subtle-1)}.row.highlighted[_ngcontent-%COMP%]{border:1px solid blue}.row[_ngcontent-%COMP%]:last-child{border-bottom:1px solid var(--qds-border-subtle-1)}.context-col[_ngcontent-%COMP%]{width:20px} .q-menu-item--root{text-wrap:nowrap} .mat-mdc-cell, .mat-mdc-header-cell[_ngcontent-%COMP%]{border:none!important} .mat-mdc-header-cell{font-weight:var(--q-font-weight-bold)!important}"]})}}return t})();var m1="INIT",f1="DE-INIT",uh="APP EXECUTE IPS",mh="\u03BCs",g1="inf/sec";var eq=(t,i)=>i.name,fh=(t,i)=>i.id;function tq(t,i){if(t&1&&(f(0,"th",8),M(1,"dynamic-header",9),g()),t&2){let e=i.$implicit;u(),b("header",e)}}function iq(t,i){if(t&1&&(f(0,"tr",6),Pe(1,tq,2,1,"th",8,fh),g()),t&2){let e=i.$implicit;u(),Oe(e.headers)}}function nq(t,i){if(t&1&&(f(0,"td",10),q(1),g()),t&2){let e=i.$implicit;u(),le(" ",e.getValue()," ")}}function oq(t,i){if(t&1&&(f(0,"tr",6),Pe(1,nq,2,1,"td",10,fh),g()),t&2){let e=i.$implicit;u(),Oe(e.getVisibleCells())}}function rq(t,i){if(t&1&&(f(0,"table",4)(1,"thead",5),Pe(2,iq,3,0,"tr",6,fh),g(),f(4,"tbody",7),Pe(5,oq,3,0,"tr",6,fh),g()()),t&2){let e=v(3);b("showColumnDivider",!0),u(2),Oe(e.table().getHeaderGroups()),u(3),Oe(e.table().getRowModel().rows)}}function sq(t,i){if(t&1&&(f(0,"div",1)(1,"div",2)(2,"div",3),q(3),g()(),f(4,"div",2)(5,"div",3),q(6),g()()(),T(7,rq,7,1,"table",4)),t&2){let e=i.$implicit,n=v(2);u(3),le("",e.name," :"),u(3),le(" ",(e.time||e.avg)+" "+e.unit," "),u(),L(e.name===n.APP_EXECUTE_IPS&&n.executeEvents().length?7:-1)}}function aq(t,i){if(t&1&&Pe(0,sq,8,3,null,null,eq),t&2){let e=v();Oe(e.report().root_events)}}var _1=(()=>{class t{constructor(){this.APP_EXECUTE_IPS=uh,this.report=Ot.required(),this.executeEvents=Ie(()=>this.report()?.execute_events||[]),this.table=Ie(()=>this.executeEvents().length?th(()=>({columns:this.columns,data:this.executeEvents(),getCoreRowModel:Wp()})):void 0),this.columns=[{accessorKey:"identifier",header:"Event",cell:({row:e})=>e.original.identifier},{accessorKey:"min",header:"Min",cell:({getValue:e})=>e().toFixed(2)},{accessorKey:"max",header:"Max",cell:({getValue:e})=>e().toFixed(2)},{accessorKey:"avg",header:"Avg",cell:({getValue:e})=>e().toFixed(2)},{accessorKey:"unit",header:"Unit",cell:({row:e})=>e.original.unit}]}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=F({type:t,selectors:[["app-perf-metrics-summary"]],inputs:{report:[1,"report"]},standalone:!0,features:[B],decls:2,vars:1,consts:[[1,"summary","d-flex","flex-column"],[1,"d-flex","align-items-flex-start"],[1,"cols-data","d-flex","align-items-flex-start","flex-column","q-body-xs"],[1,"summary-data","set-items"],["q-table","",1,"table",3,"showColumnDivider"],["q-thead",""],["q-tr",""],["q-tbody",""],["q-th",""],[3,"header"],["q-td",""]],template:function(n,o){if(n&1&&(f(0,"div",0),T(1,aq,2,0),g()),n&2){let r;u(),L((r=o.report())!=null&&r.root_events?1:-1)}},dependencies:[Fl,Qp,Zp,Xp,Yp,Jp,eh,Kp],styles:[".summary[_ngcontent-%COMP%]{background-color:var(--qds-background-neutral-4);border:1px solid var(--qds-border-subtle-1);border-top:none}.summary-data[_ngcontent-%COMP%]{display:flex;align-items:center;align-self:stretch;gap:.5rem;border-top:1px solid var(--qds-border-subtle-1)}.set-items[_ngcontent-%COMP%]{height:2rem;padding:0 .75rem}.cols-data[_ngcontent-%COMP%]{flex:1 0 0}.scroll-wrapper[_ngcontent-%COMP%]{overflow:auto}.table[_ngcontent-%COMP%]{margin:0 .65rem 1rem}.table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{font-size:.75rem}.table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{text-align:left}"]})}}return t})();var v1=(()=>{class t{transformPerfReport(e){if(!e?.messages)throw new Error("Invalid performance profiler report, missing expected profile messages");let n=this.categorizeMessagesByMethod(e.messages),{execute_events:o,sub_events:r}=this.processProfilingEvents(n);return{root_events:this.processRootEvents(n),sub_events:r,execute_events:o}}categorizeMessagesByMethod(e){let n=new Map;return e.forEach(o=>{n.has(o.method)||n.set(o.method,[]),n.get(o.method).push(o)}),n}processRootEvents(e){return[{name:m1,time:this.calculateInitTime(e),unit:mh},{name:f1,time:this.calculateDeinitTime(e),unit:mh},{name:uh,avg:Math.round(this.calculateExecuteIPS(e)*1e6)/1e6,unit:g1}]}calculateInitTime(e){let n=e.get("BACKEND_CREATE_FROM_BINARY")||[];if(n.length>0){let o=n[0];return o.appMetrics?o.appMetrics.stopTime-o.appMetrics.startTime:NaN}return["APP_CONTEXT_CREATE","APP_COMPOSE_GRAPHS","BACKEND_FINALIZE"].reduce((o,r)=>o+this.sumMessageDurations(e.get(r)||[]),0)}calculateDeinitTime(e){let n=e.get("BACKEND_DEINIT")||[];if(!n.length||!n[0].appMetrics)return NaN;let o=n[0];return o.appMetrics.stopTime-o.appMetrics.startTime}calculateExecuteIPS(e){let n=e.get("APP_EXECUTE_IPS")||[];if(!n.length||!n[0].profilingEvents)return NaN;let o=n[0],r=this.findEventValue(o.profilingEvents,"numInferences"),s=this.findEventValue(o.profilingEvents,"duration");return!r||!s||s<=0?NaN:1e6*r/s}sumMessageDurations(e){return e.reduce((n,o)=>o.appMetrics?n+(o.appMetrics.stopTime-o.appMetrics.startTime):n,0)}processProfilingEvents(e){let n=new Map,o=new Map;[...e.get("BACKEND_EXECUTE")||[],...e.get("BACKEND_EXECUTE_ASYNC")||[]].forEach(l=>{l.profilingEvents?.forEach(c=>{n.has(c.identifier)||n.set(c.identifier,{values:[],unit:this.processUnit(c.unit)}),n.get(c.identifier).values.push(c.value),(c["sub-events"]||[]).forEach(d=>{let p=this.processNodeName(d.identifier);o.has(p)||o.set(p,{values:[],unit:this.processUnit(d.unit)}),o.get(p).values.push(d.value)})})});let s=Array.from(n.entries()).map(([l,c])=>({identifier:l,unit:c.unit,min:Math.min(...c.values),max:Math.max(...c.values),avg:c.values.length?c.values.reduce((d,p)=>d+p,0)/c.values.length:0})),a=Array.from(o.entries()).map(([l,c])=>({name:l,unit:c.unit,min:Math.min(...c.values),max:Math.max(...c.values),avg:c.values.length?c.values.reduce((d,p)=>d+p,0)/c.values.length:0}));return{execute_events:s,sub_events:a}}processUnit(e){let n=e.toLowerCase();return n==="microsec"&&(n=mh),n}findEventValue(e,n){return e.find(r=>r.identifier===n)?.value}processNodeName(e){return e.replace(/^_+/,"").replace(/[: ]OpId.*$/,"")}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=ne({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var b1=()=>["info-icon-color"];function cq(t,i){if(t&1){let e=Z();f(0,"app-chart",8),z(1,"translate"),I("legendChanged",function(o){R(e);let r=v();return A(r.onLegendChanged(o))})("chartClicked",function(o){R(e);let r=v();return A(r.onChartClick(o))})("searchChanged",function(o){R(e);let r=v();return A(r.onSearch(o))})("sort",function(o){R(e);let r=v();return A(r.onSort(o))})("selectionNotFound",function(o){R(e);let r=v();return A(r.showNotFoundNotification(o))}),g()}if(t&2){let e=v();b("data",e.chartData())("filteredData",e.filteredChartData)("tooltipContent",G(1,6,"GRAPH_PANEL.PERFORMANCE_METRICS_TOOLTIP"))("highlight$",e.highlight$)("toggledLegendSeries",e.selectedSeries)("imageName",e.subtab().label)}}function dq(t,i){t&1&&(f(0,"div",9)(1,"span",10),z(2,"translate"),q(3),z(4,"translate"),g()()),t&2&&(u(),b("appTooltipInfo",G(2,3,"GRAPH_PANEL.PERFORMANCE_LIST_TOOLTIP"))("tooltipClasses",Ye(7,b1)),u(2),le(" ",G(4,5,"GRAPH_PANEL.LIST")," "))}function pq(t,i){if(t&1&&(M(0,"app-data-list",11),z(1,"translate")),t&2){let e=v(3);b("data",e.filteredChartData)("toggledSeries",e.selectedSeries)("nameCol",G(1,4,"NODE"))("highlight$",e.highlight$)}}function hq(t,i){if(t&1&&T(0,pq,2,6,"app-data-list",11),t&2){let e=v(2);L(e.isListOpened()?0:-1)}}function uq(t,i){if(t&1){let e=Z();f(0,"q-accordion-item",7),I("opened",function(){R(e);let o=v();return A(o.openList())})("closed",function(){R(e);let o=v();return A(o.closeList())}),T(1,dq,5,8,"ng-template",null,2,ke)(3,hq,1,1,"ng-template",null,3,ke),g()}if(t&2){let e=ue(2),n=ue(4),o=v();b("label",e)("startIcon",o.iconService.list)("expanded",o.isListOpened())("content",n)}}function mq(t,i){t&1&&(f(0,"div",9)(1,"span",10),z(2,"translate"),q(3),z(4,"translate"),g()()),t&2&&(u(),b("appTooltipInfo",G(2,3,"GRAPH_PANEL.PERFORMANCE_SUMMARY_TOOLTIP"))("tooltipClasses",Ye(7,b1)),u(2),le(" ",G(4,5,"GRAPH_PANEL.SUMMARY")," "))}function fq(t,i){if(t&1&&M(0,"app-perf-metrics-summary",12),t&2){let e=v();b("report",e.report())}}var y1=(()=>{class t{constructor(e,n,o,r,s,a){this.iconService=e,this.translateService=n,this.perfReportTransformService=o,this.notificationService=r,this.nodeHighlightService=s,this.nodeHighlightServiceV2=a,this.subtab=Ot.required(),this.file=Ot.required(),this.report=se(void 0),this.hasPerLayerData=Ie(()=>!!this.report()?.sub_events.length),this.chartData=Ie(()=>this.report()?.sub_events.length?this.getChartData():[]),this.isListOpened=se(!1),this.isSummaryOpened=se(!1),this.highlight$=new X,this.PERF_SERIES_TRANSLATION_MAP={avg:"AVG",min:"MIN",max:"MAX"},oo.graphV2Enabled?this.nodeHighlightServiceV2.selectedNode$.pipe($o()).subscribe(({nodeName:l})=>{this.openList(),requestAnimationFrame(()=>{this.highlight$.next(l)})}):this.nodeHighlightService.selectedNode$.pipe($o()).subscribe(l=>{this.openList(),requestAnimationFrame(()=>{this.highlight$.next(l)})}),_n(()=>Y(this,null,function*(){let l=this.file();l&&(yield this.processFile(l))}))}processFile(e){return Y(this,null,function*(){try{let n=JSON.parse(yield e.text()),o=this.perfReportTransformService.transformPerfReport(n);this.report.set(o),this.hasPerLayerData()?this.filteredChartData=this.chartData():this.openSummary(),this.initializeSelectedSeries()}catch(n){this.notificationService.notify({color:$i.ERROR,label:this.translateService.instant("INVALID_FILE",{filename:e.name}),autoHide:!1}),console.error(`Invalid visualized file request: ${n.message}`)}})}initializeSelectedSeries(){this.selectedSeries={[this.translateService.instant(`PERFORMANCE_METRICS.${this.PERF_SERIES_TRANSLATION_MAP.avg}`)]:!0}}getChartData(){let e=this.getSeriesData();return this.transformToDataSeries(e)}getSeriesData(){let e={avg:[],min:[],max:[]};for(let n of this.report().sub_events)e.avg.push({value:n.avg,unit:n.unit,name:n.name}),e.min.push({value:n.min,unit:n.unit,name:n.name}),e.max.push({value:n.max,unit:n.unit,name:n.name});return e}transformToDataSeries(e){return Object.keys(e).map(n=>({seriesName:this.translateService.instant(`PERFORMANCE_METRICS.${this.PERF_SERIES_TRANSLATION_MAP[n]}`),unit:e[n][0].unit,seriesOptions:{type:"bar"},data:e[n]}))}onChartClick(e){oo.graphV2Enabled?this.nodeHighlightServiceV2.highlightNodeInAllPanels(e.name,ae.PERF_SUMMARY):this.nodeHighlightService.highlightNode(e.name)}onLegendChanged(e){this.selectedSeries=e}onSearch(e){this.filteredChartData=e}onSort(e){this.filteredChartData=e}openList(){this.isListOpened.set(!0)}closeList(){this.isListOpened.set(!1)}openSummary(){this.isSummaryOpened.set(!0)}closeSummary(){this.isSummaryOpened.set(!1)}showNotFoundNotification(e){this.nodeHighlightService.showNotFoundNotification("PERFORMANCE_METRICS.NODE_NOT_FOUND",e)}static{this.\u0275fac=function(n){return new(n||t)(_(Ce),_(Ge),_(v1),_(si),_(qs),_(js))}}static{this.\u0275cmp=F({type:t,selectors:[["app-perf-metrics"]],viewQuery:function(n,o){if(n&1&&Ee(gg,5),n&2){let r;me(r=fe())&&(o.dataList=r.first)}},inputs:{subtab:[1,"subtab"],file:[1,"file"]},standalone:!0,features:[B],decls:8,vars:6,consts:[["summaryLabel",""],["perfMetricsSummaryPanel",""],["listLabel",""],["perfMetricsList",""],[3,"data","filteredData","tooltipContent","highlight$","toggledLegendSeries","imageName"],["multiple","true",1,"netron-properties","flex-grow-1"],["size","s",3,"label","startIcon","expanded","content"],["size","s",3,"opened","closed","label","startIcon","expanded","content"],[3,"legendChanged","chartClicked","searchChanged","sort","selectionNotFound","data","filteredData","tooltipContent","highlight$","toggledLegendSeries","imageName"],[1,"d-flex","w-100","align-items-center","gap-8"],["tooltipPosition","right",3,"appTooltipInfo","tooltipClasses"],[3,"data","toggledSeries","nameCol","highlight$"],[3,"report"]],template:function(n,o){if(n&1){let r=Z();T(0,cq,2,8,"app-chart",4),f(1,"q-accordion",5),T(2,uq,5,4,"q-accordion-item",6),f(3,"q-accordion-item",7),I("opened",function(){return R(r),A(o.openSummary())})("closed",function(){return R(r),A(o.closeSummary())}),T(4,mq,5,8,"ng-template",null,0,ke)(6,fq,1,1,"ng-template",null,1,ke),g()()}if(n&2){let r=ue(5),s=ue(7);L(o.hasPerLayerData()?0:-1),u(2),L(o.hasPerLayerData()?2:-1),u(),b("label",r)("startIcon",o.iconService.fileText)("expanded",o.isSummaryOpened())("content",s)}},dependencies:[Le,ri,Di,Ii,_1,be,Ne,GE,gg,ci]})}}return t})();function gq(t,i){if(t&1&&M(0,"app-perf-metrics",1),t&2){let e=v();b("subtab",e.subtab)("file",e.performancePanelService.fileMap().get(e.subtab.id))}}var C1=(()=>{class t{constructor(e){this.performancePanelService=e}static{this.\u0275fac=function(n){return new(n||t)(_(wo))}}static{this.\u0275cmp=F({type:t,selectors:[["app-performance-sub-panel"]],inputs:{subtab:"subtab"},standalone:!0,features:[ze([]),B],decls:2,vars:1,consts:[[1,"flex-column-grow","pt-16","performance-sub-panel","overflow-auto"],[3,"subtab","file"]],template:function(n,o){n&1&&(f(0,"div",0),T(1,gq,1,2,"app-perf-metrics",1),g()),n&2&&(u(),L(o.subtab?1:-1))},dependencies:[y1],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;flex:1;overflow:hidden}"]})}}return t})();var _q=(t,i)=>i.id;function vq(t,i){if(t&1&&M(0,"app-performance-sub-panel",1),t&2){let e=v().$implicit;b("subtab",e)}}function bq(t,i){if(t&1&&T(0,vq,1,1,"app-performance-sub-panel",1),t&2){let e=i.$implicit,n=v();L((n.performancePanelService.activeSubtab==null?null:n.performancePanelService.activeSubtab.id)===e.id?0:-1)}}var w1=(()=>{class t{constructor(e,n){this.iconService=e,this.performancePanelService=n,this.classList="flex-column-grow",this.panelTypes=ae}onActiveSubtabUpdated(e){this.performancePanelService.setActiveSubtabIndex(e)}onSubtabClosed(e){this.performancePanelService.removeSubtab(e)}static{this.\u0275fac=function(n){return new(n||t)(_(Ce),_(wo))}}static{this.\u0275cmp=F({type:t,selectors:[["app-performance-panel"]],hostVars:2,hostBindings:function(n,o){n&2&&Pi(o.classList)},standalone:!0,features:[B],decls:3,vars:3,consts:[[3,"activeSubtabUpdated","subtabClosed","panelType","subtabs","activeSubtabIndex"],[3,"subtab"]],template:function(n,o){n&1&&(f(0,"app-subtabs",0),I("activeSubtabUpdated",function(s){return o.onActiveSubtabUpdated(s)})("subtabClosed",function(s){return o.onSubtabClosed(s)}),g(),Pe(1,bq,1,1,null,null,_q)),n&2&&(b("panelType",o.panelTypes.OPTRACE_SUMMARY)("subtabs",o.performancePanelService.subtabs)("activeSubtabIndex",o.performancePanelService.activeSubtabIndex),u(),Oe(o.performancePanelService.subtabs))},dependencies:[rr,C1,be]})}}return t})();function yq(t,i){if(t&1&&(M(0,"q-inline-alert",1),z(1,"translate")),t&2){let e=v();tt("label",G(1,2,"QHAS_ERROR.UNABLE_TO_LOAD")),b("description",e.schemaError().message)}}function Cq(t,i){if(t&1){let e=Z();f(0,"app-htp-analysis-summary",3),I("schemaError",function(o){R(e);let r=v();return A(r.schemaError.set(o))}),g()}if(t&2){let e=v();b("file",e.qhasPanelService.fileMap().get(e.qhasId))}}var S1=(()=>{class t{constructor(e){this.qhasPanelService=e,this.schemaError=se(void 0)}static{this.\u0275fac=function(n){return new(n||t)(_(Po))}}static{this.\u0275cmp=F({type:t,selectors:[["app-qhas-sub-panel"]],inputs:{qhasId:"qhasId"},standalone:!0,features:[B],decls:3,vars:1,consts:[["id","qhas-container",1,"flex-column-grow","overflow-auto"],["color","negative",1,"flex-grow-1","align-items-center","align-self-center","d-flex",3,"label","description"],[1,"flex-column-grow",3,"file"],[1,"flex-column-grow",3,"schemaError","file"]],template:function(n,o){n&1&&(f(0,"div",0),T(1,yq,2,4,"q-inline-alert",1)(2,Cq,1,1,"app-htp-analysis-summary",2),g()),n&2&&(u(),L(o.schemaError()?1:o.qhasPanelService.fileMap().get(o.qhasId)?2:-1))},dependencies:[FE,Ko,Xo,be,Ne],styles:["#qhas-container[_ngcontent-%COMP%]{padding-right:1rem;padding-top:1rem}#qhas-container[_ngcontent-%COMP%] .vcl-htp-analysis-summary--bottom-charts-container{container-type:unset}@media (max-width: 1250px){#qhas-container[_ngcontent-%COMP%] .vcl-htp-analysis--chart-container.grid-chart-container{grid-template-columns:1fr}}"]})}}return t})();var wq=(t,i)=>i.id;function Sq(t,i){if(t&1&&M(0,"app-qhas-sub-panel",1),t&2){let e=v().$implicit;b("qhasId",e.id)}}function Eq(t,i){if(t&1&&T(0,Sq,1,1,"app-qhas-sub-panel",1),t&2){let e=i.$implicit,n=v();L((n.qhasPanelService.activeSubtab==null?null:n.qhasPanelService.activeSubtab.id)===e.id?0:-1)}}var E1=(()=>{class t{constructor(e){this.qhasPanelService=e,this.panelTypes=ae}onActiveSubtabUpdated(e){this.qhasPanelService.setActiveSubtabIndex(e)}onSubtabClosed(e){this.qhasPanelService.removeSubtab(e)}static{this.\u0275fac=function(n){return new(n||t)(_(Po))}}static{this.\u0275cmp=F({type:t,selectors:[["app-qhas-panel"]],standalone:!0,features:[B],decls:3,vars:3,consts:[[3,"activeSubtabUpdated","subtabClosed","panelType","subtabs","activeSubtabIndex"],[1,"flex-column-grow","overflow-hidden",3,"qhasId"]],template:function(n,o){n&1&&(f(0,"app-subtabs",0),I("activeSubtabUpdated",function(s){return o.onActiveSubtabUpdated(s)})("subtabClosed",function(s){return o.onSubtabClosed(s)}),g(),Pe(1,Eq,1,1,null,null,wq)),n&2&&(b("panelType",o.panelTypes.QHAS_REPORT)("subtabs",o.qhasPanelService.subtabs)("activeSubtabIndex",o.qhasPanelService.activeSubtabIndex),u(),Oe(o.qhasPanelService.subtabs))},dependencies:[mt,rr,S1],styles:[".vcl-recursive-table--title-container h6{margin:0} .vcl-htp-analysis-summary--root .q-tabs--nav{padding-left:8px}"]})}}return t})();var Tq=["pane",""];function xq(t,i){if(t&1){let e=Z();f(0,"q-button",11),z(1,"translate"),I("click",function(o){R(e),v();let r=ue(8);return A(r.toggle(o))}),g()}if(t&2){let e=v();tt("qTooltip",G(1,2,"PANEL_CONTROLS.MORE")),b("startIcon",e.iconService.ellipsisVertical)}}function Pq(t,i){t&1&&M(0,"app-graph-panel")}function Oq(t,i){t&1&&M(0,"app-performance-panel",8)}function Iq(t,i){t&1&&M(0,"app-optrace-panel",8)}function Dq(t,i){t&1&&M(0,"app-qhas-panel",9)}function Mq(t,i){t&1&&M(0,"app-op-tensor-mappings",10)}var T1=(()=>{class t{constructor(e,n,o,r,s){this.iconService=e,this.windowService=n,this.translate=o,this.workspaceService=r,this.appConfig=s,this.classList="flex-column-grow w-100",this.panelTypes=ae,this.isExpanded=Ie(()=>this.windowService.expandedPanels().includes(this.activeTab?.panelType)),this.expandTootipText=Ie(()=>this.isExpanded()?"PANEL_CONTROLS.EXIT_EXPAND":"PANEL_CONTROLS.EXPAND"),this.showExpandTooltip=!1,this.panelControls=[],!this.workspaceService.webServerMode()&&this.appConfig.ui.showClosePanel&&this.panelControls.push({label:this.translate.instant("PANEL_CONTROLS.CLOSE"),command:()=>this.windowService.closePanel(this.activeTab)})}get activeTab(){let{panelTabs:e,activeTabIndex:n}=this.pane;return e[n]}onActiveTabUpdated(e){this.windowService.setActiveTab(this.pane,e)}onToggleExpand(){this.showExpandTooltip=!1,this.windowService.toggleExpand(this.activeTab)}onCollapsePanel(){this.windowService.collapsePanel(this.activeTab)}static{this.\u0275fac=function(n){return new(n||t)(_(Ce),_(Si),_(Ge),_(di),_(St))}}static{this.\u0275cmp=F({type:t,selectors:[["app-panel-container","pane",""]],hostVars:2,hostBindings:function(n,o){n&2&&Pi(o.classList)},inputs:{pane:"pane"},standalone:!0,features:[B],attrs:Tq,decls:16,vars:14,consts:[["menu",""],[1,"panel-tabs-wrapper","d-flex","justify-content-between","align-items-stretch"],[1,"panel-tabs",3,"activeTabUpdated","activeTabIndex","tabData"],["data-testid","btn-expand-panel","qTooltipPlacement","top","variant","ghost",3,"mouseenter","mouseleave","click","qTooltip","qTooltipVisible","startIcon"],["data-testid","btn-collapse-panel","qTooltipPlacement","top","variant","ghost",3,"click","qTooltip","startIcon"],["data-testid","menu-more-panel-control-options","appendTo","portal",3,"items"],["data-testid","btn-more-panel-control-options","qTooltipPlacement","top","variant","ghost",3,"qTooltip","startIcon"],[1,"flex-column-grow","overflow-hidden"],[1,"overflow-hidden"],[1,"overflow-hidden","flex-column-grow"],[1,"h-100"],["data-testid","btn-more-panel-control-options","qTooltipPlacement","top","variant","ghost",3,"click","qTooltip","startIcon"]],template:function(n,o){if(n&1){let r=Z();f(0,"div",1)(1,"app-draggable-tabs",2),I("activeTabUpdated",function(a){return R(r),A(o.onActiveTabUpdated(a))}),g(),f(2,"div")(3,"q-button",3),z(4,"translate"),I("mouseenter",function(){return R(r),A(o.showExpandTooltip=!0)})("mouseleave",function(){return R(r),A(o.showExpandTooltip=!1)})("click",function(){return R(r),A(o.onToggleExpand())}),g(),f(5,"q-button",4),z(6,"translate"),I("click",function(){return R(r),A(o.onCollapsePanel())}),g(),M(7,"q-menu",5,0),T(9,xq,2,4,"q-button",6),g()(),f(10,"div",7),T(11,Pq,1,0,"app-graph-panel")(12,Oq,1,0,"app-performance-panel",8)(13,Iq,1,0,"app-optrace-panel",8)(14,Dq,1,0,"app-qhas-panel",9)(15,Mq,1,0,"app-op-tensor-mappings",10),g()}if(n&2){let r;u(),b("activeTabIndex",o.pane.activeTabIndex)("tabData",o.pane.panelTabs),u(2),tt("qTooltip",G(4,10,o.expandTootipText())),b("qTooltipVisible",o.showExpandTooltip)("startIcon",o.isExpanded()?o.iconService.minimize2:o.iconService.maximize2),u(2),tt("qTooltip",G(6,12,"PANEL_CONTROLS.COLLAPSE")),b("startIcon",o.iconService.squareArrowOutDownLeftIcon),u(2),b("items",o.panelControls),u(2),L(o.panelControls.length?9:-1),u(2),L((r=o.activeTab==null?null:o.activeTab.panelType)===o.panelTypes.GRAPH?11:r===o.panelTypes.PERF_SUMMARY?12:r===o.panelTypes.OPTRACE_SUMMARY?13:r===o.panelTypes.QHAS_REPORT?14:r===o.panelTypes.OP_TENSOR_MAPPINGS?15:-1)}},dependencies:[Ds,tC,w1,BE,E1,Lt,Yt,Gi,Yo,Le,st,be,Ne,sC],styles:[`[_nghost-%COMP%]{background:var(--qds-background-neutral-2)}.panel-tabs-wrapper[_ngcontent-%COMP%]{border-bottom:1px solid var(--qds-border-default-1)}.panel-tabs[_ngcontent-%COMP%]{margin-bottom:-1px}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
`]})}}return t})();var Rq=(t,i,e,n)=>({"width.%":t,"height.%":i,"minWidth.px":e,"minHeight.px":n}),x1=t=>({pane:t});function Aq(t,i){if(t&1&&M(0,"app-panel-container",7),t&2){let e=v().pane,n=v();Fe("expanded-panel",n.windowService.activeExpandedPanel()===e.panelTabs[0].panelType),b("pane",e),et("data-testid","pane-"+e.panelTabs[0].panelType)}}function kq(t,i){t&1&&He(0)}function Nq(t,i){if(t&1){let e=Z();f(0,"app-resize-handle",12),I("resized",function(){R(e);let o=v(5);return A(o.onResize())}),g()}if(t&2){let e=v(2).$implicit;v();let n=ue(1),o=v().pane;b("direction",o.split.direction)("parentEl",n)("resizable1",e)("resizable2",e.nextDisplayedPane)}}function Lq(t,i){if(t&1&&(f(0,"div",9),T(1,kq,1,0,"ng-container",10),g(),T(2,Nq,1,4,"app-resize-handle",11)),t&2){let e=v().$implicit,n=v(2).pane;v();let o=ue(1);Fe("flex-column",n.split.direction==="vertical"),b("ngStyle",ec(6,Rq,e.width,e.height,e.minWidth,e.minHeight)),u(),b("ngTemplateOutlet",o)("ngTemplateOutletContext",ut(11,x1,e)),u(),L(e.nextDisplayedPane?2:-1)}}function Fq(t,i){if(t&1&&T(0,Lq,3,13),t&2){let e=i.$implicit;L(e.isDisplayed?0:-1)}}function Vq(t,i){if(t&1&&(f(0,"div",8,2),Pe(2,Fq,1,1,null,null,gn),g()),t&2){let e=v().pane;Fe("flex-column",e.split.direction==="vertical"),u(2),Oe(e.split.panes)}}function Bq(t,i){if(t&1&&T(0,Aq,1,4,"app-panel-container",5)(1,Vq,4,2,"div",6),t&2){let e=i.pane;L(e.split?1:0)}}function Hq(t,i){if(t&1){let e=Z();f(0,"app-file-dropper",13),I("fileLoaded",function(o){R(e);let r=v();return A(r.onFileLoaded(o))}),g()}t&2&&b("showIcon",!0)}function jq(t,i){t&1&&He(0)}function qq(t,i){if(t&1&&T(0,jq,1,0,"ng-container",10),t&2){let e=v(2),n=ue(1);b("ngTemplateOutlet",n)("ngTemplateOutletContext",ut(2,x1,e.windowService.rootPane()))}}function zq(t,i){t&1&&(f(0,"div",15),M(1,"img",17),g())}function Gq(t,i){if(t&1){let e=Z();f(0,"div",19),I("click",function(){let o=R(e),r=v(4);return A(r.restorePanel(o))}),f(1,"div",20),M(2,"q-icon",21),g(),f(3,"span",22),q(4),g()()}if(t&2){let e=i,n=v().$implicit;et("data-testid","collapsed-panel-"+n),u(2),b("icon",e.icon),et("data-testid","collapsed-panel-icon-"+n),u(),et("data-testid","collapsed-panel-label-"+n),u(),le(" ",e.label," ")}}function $q(t,i){if(t&1&&T(0,Gq,5,5,"div",18),t&2){let e,n=i.$implicit,o=v(3);L((e=o.windowService.panelTabs[n])?0:-1,e)}}function Uq(t,i){if(t&1&&(f(0,"div",16),Pe(1,$q,1,1,null,null,gn),g()),t&2){let e=v(2);u(),Oe(e.windowService.collapsedPanels())}}function Wq(t,i){if(t&1&&(f(0,"div",14),T(1,qq,1,4,"ng-container"),z(2,"async"),T(3,zq,2,0,"div",15),g(),T(4,Uq,3,0,"div",16)),t&2){let e=v();u(),L(e.windowService.displayedPanels().length?1:G(2,2,e.spinnerService.getLoadingStatus())===!1?3:-1),u(3),L(e.windowService.collapsedPanels().length?4:-1)}}var P1=(()=>{class t{constructor(e,n,o,r,s){this.spinnerService=e,this.windowService=n,this.workspaceService=o,this.route=r,this.appConfig=s,this.showEmptyWorkspaceFileDropper=Ie(()=>!this.workspaceService.webServerMode()&&this.appConfig.ui.showEmptyWorkspaceFileDropper)}ngOnInit(){this.spinnerService.wait();let{platform:e}=this.appConfig.environment,n=this.route.snapshot.paramMap.get("workspaceId");e==="web"?this.handleWebWindow(n):e==="electron-undocked"&&this.handleUndockedWindow(n),this.spinnerService.stop()}onFileLoaded(e){return Y(this,null,function*(){yield this.workspaceService.visualizeFiles(e,!0)})}onResize(){this.windowService.updateLocalStorage()}restorePanel(e){this.windowService.restorePanel(e)}handleWebWindow(e){this.workspaceService.webServerMode.set(this.route.snapshot.queryParamMap.get("mode")==="jupyter"),this.workspaceService.webServerMode()&&this.workspaceService.initializePanelWebsocket({query:{id:e}})}handleUndockedWindow(e){this.workspaceService.localStorageKeySuffix=e,this.workspaceService.initializeWorkspaceTabs(new Set([e]));let n=this.workspaceService.getWorkspaces()[0];n&&this.workspaceService.workspaceOpened$.next(n)}static{this.\u0275fac=function(n){return new(n||t)(_(Ms),_(Si),_(di),_(wc),_(St))}}static{this.\u0275cmp=F({type:t,selectors:[["app-panels-window"]],standalone:!0,features:[B],decls:6,vars:1,consts:[["paneTemplate",""],["panelsWindow",""],["splitEl",""],[1,"d-flex","flex-column","h-100","w-100"],[1,"file-dropper","h-100",3,"showIcon"],[1,"overflow-hidden",3,"pane","expanded-panel"],[1,"split-container","d-flex","h-100","w-100",3,"flex-column"],[1,"overflow-hidden",3,"pane"],[1,"split-container","d-flex","h-100","w-100"],[1,"d-flex","pane",3,"ngStyle"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"direction","parentEl","resizable1","resizable2"],[3,"resized","direction","parentEl","resizable1","resizable2"],[1,"file-dropper","h-100",3,"fileLoaded","showIcon"],[1,"flex-grow-1","overflow-hidden"],[1,"d-flex","justify-content-center","align-items-center","h-100"],["data-testid","collapsed-panels",1,"collapsed-panels","d-flex"],["src","./assets/images/icon.png","alt","Background Logo",1,"background-logo"],[1,"collapsed-panel-item","d-flex","position-relative","align-items-center","q-font-body-xs-strong"],[1,"collapsed-panel-item","d-flex","position-relative","align-items-center","q-font-body-xs-strong",3,"click"],[1,"icon-wrapper","d-flex","align-items-center","justify-content-center"],[3,"icon"],[1,"tab-label"]],template:function(n,o){n&1&&(T(0,Bq,2,1,"ng-template",null,0,ke),f(2,"div",3,1),T(4,Hq,1,1,"app-file-dropper",4)(5,Wq,5,4),g()),n&2&&(u(4),L(o.showEmptyWorkspaceFileDropper()&&o.windowService.isEmptyWorkspace()?4:5))},dependencies:[T1,Gn,oi,or,Od,Ve,Dt,qi,ss],styles:["[_nghost-%COMP%]{flex:1;overflow:hidden}.background-logo[_ngcontent-%COMP%]{width:8rem;opacity:25%}.collapsed-panels[_ngcontent-%COMP%]{height:2.5rem;border-top:1px solid var(--qds-border-subtle-1);background-color:var(--qds-background-neutral-1)}.collapsed-panel-item[_ngcontent-%COMP%]{cursor:pointer;min-width:0;min-height:2.3rem;color:var(--qds-text-accent-1);padding:.3rem .7rem;border-right:1px solid var(--qds-border-subtle-1)}.collapsed-panel-item[_ngcontent-%COMP%]:hover{background-color:var(--qds-background-neutral-2);color:var(--qds-text-primary-1)}.collapsed-panel-item[_ngcontent-%COMP%] .icon-wrapper[_ngcontent-%COMP%]{width:1rem;height:1rem;border-radius:1px;margin-right:.25rem;padding:.1rem}.collapsed-panel-item[_ngcontent-%COMP%] .tab-label[_ngcontent-%COMP%]{max-width:8rem}.file-dropper[_ngcontent-%COMP%]{margin:2rem}.expanded-panel[_ngcontent-%COMP%]{position:absolute;inset:0;z-index:9}"]})}}return t})();var O1=[{path:"",component:Ty,resolve:{windowService:()=>je(Si).setWorkspace(void 0),performancePanelService:()=>je(wo).setWorkspace(void 0),graphPanelService:()=>je(bt).setWorkspace(void 0),qhasPanelService:()=>je(Po).setWorkspace(void 0),optracePanelService:()=>je(So).setWorkspace(void 0)}},{path:"workspaces/:workspaceId",component:P1,resolve:{windowService:t=>je(Si).setWorkspace(t.params.workspaceId),performancePanelService:t=>je(wo).setWorkspace(t.params.workspaceId),graphPanelService:t=>je(bt).setWorkspace(t.params.workspaceId),qhasPanelService:t=>je(Po).setWorkspace(t.params.workspaceId),optracePanelService:t=>je(So).setWorkspace(t.params.workspaceId),opTensorMappingsPanelService:t=>je(zs).setWorkspace(t.params.workspaceId)}},{path:"",loadChildren:()=>import("./chunk-NFKTPX3Z.js").then(t=>t.HomeRoutingModule)}];oo.production&&void 0;function Qq(t){return new pd(t,["./assets/i18n/common/","./assets/i18n/files/","./assets/i18n/graph/","./assets/i18n/panels/","./assets/i18n/panels/qhas/","./assets/i18n/workspaces/"])}function Yq(t){return()=>new Promise(i=>t.use("en").subscribe(()=>i()))}function Xq(t){return()=>t.initialize()}function Kq(){return dd(lb,window?.electronAPI?.appConfig??{})}o_(wy,{providers:[Rg(Th,Mc,Ve,Gi,Lt,Dt,Gi,hv.pick(cb),c0,T0,l_,hs,Ts,sn,Ss,be.forRoot({loader:{provide:g_,useFactory:Qq,deps:[Jg]}})),{provide:tc,useFactory:Yq,deps:[Wn],multi:!0},Nu,{provide:tc,useFactory:Xq,deps:[Nu],multi:!0},{provide:tc,useFactory:()=>ab(["Can't get DOM width or height"]),multi:!0},Si,sb(),u_(O1,m_()),e_(),{provide:St,useValue:Kq()}]}).catch(t=>console.error(t));export{Qq as HttpLoaderFactory,Xq as initializeNavigationTracker,Yq as initializeTranslations,Kq as resolveAppConfig};
|