xinference 1.10.0__py3-none-any.whl → 1.11.0__py3-none-any.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.
Potentially problematic release.
This version of xinference might be problematic. Click here for more details.
- xinference/_version.py +3 -3
- xinference/api/restful_api.py +473 -31
- xinference/client/restful/async_restful_client.py +178 -8
- xinference/client/restful/restful_client.py +151 -3
- xinference/core/supervisor.py +99 -53
- xinference/core/worker.py +10 -0
- xinference/deploy/cmdline.py +15 -0
- xinference/model/audio/core.py +21 -6
- xinference/model/audio/indextts2.py +166 -0
- xinference/model/audio/model_spec.json +58 -21
- xinference/model/image/model_spec.json +159 -90
- xinference/model/image/stable_diffusion/core.py +13 -4
- xinference/model/llm/__init__.py +6 -2
- xinference/model/llm/llm_family.json +1299 -174
- xinference/model/llm/mlx/distributed_models/core.py +41 -0
- xinference/model/llm/mlx/distributed_models/qwen2.py +1 -2
- xinference/model/llm/sglang/core.py +44 -11
- xinference/model/llm/tool_parsers/deepseek_r1_tool_parser.py +94 -32
- xinference/model/llm/tool_parsers/qwen_tool_parser.py +29 -4
- xinference/model/llm/transformers/chatglm.py +3 -0
- xinference/model/llm/transformers/core.py +129 -36
- xinference/model/llm/transformers/multimodal/minicpmv45.py +340 -0
- xinference/model/llm/transformers/multimodal/qwen2_vl.py +34 -8
- xinference/model/llm/transformers/utils.py +23 -0
- xinference/model/llm/utils.py +48 -32
- xinference/model/llm/vllm/core.py +207 -72
- xinference/model/utils.py +74 -31
- xinference/thirdparty/audiotools/__init__.py +10 -0
- xinference/thirdparty/audiotools/core/__init__.py +4 -0
- xinference/thirdparty/audiotools/core/audio_signal.py +1682 -0
- xinference/thirdparty/audiotools/core/display.py +194 -0
- xinference/thirdparty/audiotools/core/dsp.py +390 -0
- xinference/thirdparty/audiotools/core/effects.py +647 -0
- xinference/thirdparty/audiotools/core/ffmpeg.py +211 -0
- xinference/thirdparty/audiotools/core/loudness.py +320 -0
- xinference/thirdparty/audiotools/core/playback.py +252 -0
- xinference/thirdparty/audiotools/core/templates/__init__.py +0 -0
- xinference/thirdparty/audiotools/core/templates/headers.html +322 -0
- xinference/thirdparty/audiotools/core/templates/pandoc.css +407 -0
- xinference/thirdparty/audiotools/core/templates/widget.html +52 -0
- xinference/thirdparty/audiotools/core/util.py +671 -0
- xinference/thirdparty/audiotools/core/whisper.py +97 -0
- xinference/thirdparty/audiotools/data/__init__.py +3 -0
- xinference/thirdparty/audiotools/data/datasets.py +517 -0
- xinference/thirdparty/audiotools/data/preprocess.py +81 -0
- xinference/thirdparty/audiotools/data/transforms.py +1592 -0
- xinference/thirdparty/audiotools/metrics/__init__.py +6 -0
- xinference/thirdparty/audiotools/metrics/distance.py +131 -0
- xinference/thirdparty/audiotools/metrics/quality.py +159 -0
- xinference/thirdparty/audiotools/metrics/spectral.py +247 -0
- xinference/thirdparty/audiotools/ml/__init__.py +5 -0
- xinference/thirdparty/audiotools/ml/accelerator.py +184 -0
- xinference/thirdparty/audiotools/ml/decorators.py +440 -0
- xinference/thirdparty/audiotools/ml/experiment.py +90 -0
- xinference/thirdparty/audiotools/ml/layers/__init__.py +2 -0
- xinference/thirdparty/audiotools/ml/layers/base.py +328 -0
- xinference/thirdparty/audiotools/ml/layers/spectral_gate.py +127 -0
- xinference/thirdparty/audiotools/post.py +140 -0
- xinference/thirdparty/audiotools/preference.py +600 -0
- xinference/thirdparty/fish_speech/fish_speech/text/chn_text_norm/text.py +1 -1
- xinference/thirdparty/indextts/BigVGAN/ECAPA_TDNN.py +656 -0
- xinference/thirdparty/indextts/BigVGAN/__init__.py +0 -0
- xinference/thirdparty/indextts/BigVGAN/activations.py +122 -0
- xinference/thirdparty/indextts/BigVGAN/alias_free_activation/__init__.py +0 -0
- xinference/thirdparty/indextts/BigVGAN/alias_free_activation/cuda/.gitignore +1 -0
- xinference/thirdparty/indextts/BigVGAN/alias_free_activation/cuda/__init__.py +0 -0
- xinference/thirdparty/indextts/BigVGAN/alias_free_activation/cuda/activation1d.py +76 -0
- xinference/thirdparty/indextts/BigVGAN/alias_free_activation/cuda/anti_alias_activation.cpp +23 -0
- xinference/thirdparty/indextts/BigVGAN/alias_free_activation/cuda/anti_alias_activation_cuda.cu +256 -0
- xinference/thirdparty/indextts/BigVGAN/alias_free_activation/cuda/compat.h +29 -0
- xinference/thirdparty/indextts/BigVGAN/alias_free_activation/cuda/load.py +121 -0
- xinference/thirdparty/indextts/BigVGAN/alias_free_activation/cuda/type_shim.h +92 -0
- xinference/thirdparty/indextts/BigVGAN/alias_free_activation/torch/__init__.py +6 -0
- xinference/thirdparty/indextts/BigVGAN/alias_free_activation/torch/act.py +31 -0
- xinference/thirdparty/indextts/BigVGAN/alias_free_activation/torch/filter.py +102 -0
- xinference/thirdparty/indextts/BigVGAN/alias_free_activation/torch/resample.py +58 -0
- xinference/thirdparty/indextts/BigVGAN/alias_free_torch/__init__.py +6 -0
- xinference/thirdparty/indextts/BigVGAN/alias_free_torch/act.py +29 -0
- xinference/thirdparty/indextts/BigVGAN/alias_free_torch/filter.py +96 -0
- xinference/thirdparty/indextts/BigVGAN/alias_free_torch/resample.py +49 -0
- xinference/thirdparty/indextts/BigVGAN/bigvgan.py +534 -0
- xinference/thirdparty/indextts/BigVGAN/models.py +451 -0
- xinference/thirdparty/indextts/BigVGAN/nnet/CNN.py +546 -0
- xinference/thirdparty/indextts/BigVGAN/nnet/__init__.py +0 -0
- xinference/thirdparty/indextts/BigVGAN/nnet/linear.py +89 -0
- xinference/thirdparty/indextts/BigVGAN/nnet/normalization.py +670 -0
- xinference/thirdparty/indextts/BigVGAN/utils.py +101 -0
- xinference/thirdparty/indextts/__init__.py +0 -0
- xinference/thirdparty/indextts/cli.py +65 -0
- xinference/thirdparty/indextts/gpt/__init__.py +0 -0
- xinference/thirdparty/indextts/gpt/conformer/__init__.py +0 -0
- xinference/thirdparty/indextts/gpt/conformer/attention.py +312 -0
- xinference/thirdparty/indextts/gpt/conformer/embedding.py +163 -0
- xinference/thirdparty/indextts/gpt/conformer/subsampling.py +348 -0
- xinference/thirdparty/indextts/gpt/conformer_encoder.py +520 -0
- xinference/thirdparty/indextts/gpt/model.py +713 -0
- xinference/thirdparty/indextts/gpt/model_v2.py +747 -0
- xinference/thirdparty/indextts/gpt/perceiver.py +317 -0
- xinference/thirdparty/indextts/gpt/transformers_beam_search.py +1013 -0
- xinference/thirdparty/indextts/gpt/transformers_generation_utils.py +4747 -0
- xinference/thirdparty/indextts/gpt/transformers_gpt2.py +1878 -0
- xinference/thirdparty/indextts/gpt/transformers_modeling_utils.py +5525 -0
- xinference/thirdparty/indextts/infer.py +690 -0
- xinference/thirdparty/indextts/infer_v2.py +739 -0
- xinference/thirdparty/indextts/s2mel/dac/__init__.py +16 -0
- xinference/thirdparty/indextts/s2mel/dac/__main__.py +36 -0
- xinference/thirdparty/indextts/s2mel/dac/model/__init__.py +4 -0
- xinference/thirdparty/indextts/s2mel/dac/model/base.py +294 -0
- xinference/thirdparty/indextts/s2mel/dac/model/dac.py +400 -0
- xinference/thirdparty/indextts/s2mel/dac/model/discriminator.py +228 -0
- xinference/thirdparty/indextts/s2mel/dac/model/encodec.py +320 -0
- xinference/thirdparty/indextts/s2mel/dac/nn/__init__.py +3 -0
- xinference/thirdparty/indextts/s2mel/dac/nn/layers.py +33 -0
- xinference/thirdparty/indextts/s2mel/dac/nn/loss.py +368 -0
- xinference/thirdparty/indextts/s2mel/dac/nn/quantize.py +339 -0
- xinference/thirdparty/indextts/s2mel/dac/utils/__init__.py +123 -0
- xinference/thirdparty/indextts/s2mel/dac/utils/decode.py +95 -0
- xinference/thirdparty/indextts/s2mel/dac/utils/encode.py +94 -0
- xinference/thirdparty/indextts/s2mel/hf_utils.py +12 -0
- xinference/thirdparty/indextts/s2mel/modules/alias_free_torch/__init__.py +5 -0
- xinference/thirdparty/indextts/s2mel/modules/alias_free_torch/act.py +29 -0
- xinference/thirdparty/indextts/s2mel/modules/alias_free_torch/filter.py +96 -0
- xinference/thirdparty/indextts/s2mel/modules/alias_free_torch/resample.py +57 -0
- xinference/thirdparty/indextts/s2mel/modules/audio.py +82 -0
- xinference/thirdparty/indextts/s2mel/modules/bigvgan/activations.py +120 -0
- xinference/thirdparty/indextts/s2mel/modules/bigvgan/alias_free_activation/cuda/__init__.py +0 -0
- xinference/thirdparty/indextts/s2mel/modules/bigvgan/alias_free_activation/cuda/activation1d.py +77 -0
- xinference/thirdparty/indextts/s2mel/modules/bigvgan/alias_free_activation/cuda/anti_alias_activation.cpp +23 -0
- xinference/thirdparty/indextts/s2mel/modules/bigvgan/alias_free_activation/cuda/anti_alias_activation_cuda.cu +246 -0
- xinference/thirdparty/indextts/s2mel/modules/bigvgan/alias_free_activation/cuda/compat.h +29 -0
- xinference/thirdparty/indextts/s2mel/modules/bigvgan/alias_free_activation/cuda/load.py +86 -0
- xinference/thirdparty/indextts/s2mel/modules/bigvgan/alias_free_activation/cuda/type_shim.h +92 -0
- xinference/thirdparty/indextts/s2mel/modules/bigvgan/alias_free_activation/torch/__init__.py +6 -0
- xinference/thirdparty/indextts/s2mel/modules/bigvgan/alias_free_activation/torch/act.py +30 -0
- xinference/thirdparty/indextts/s2mel/modules/bigvgan/alias_free_activation/torch/filter.py +101 -0
- xinference/thirdparty/indextts/s2mel/modules/bigvgan/alias_free_activation/torch/resample.py +58 -0
- xinference/thirdparty/indextts/s2mel/modules/bigvgan/bigvgan.py +492 -0
- xinference/thirdparty/indextts/s2mel/modules/bigvgan/config.json +63 -0
- xinference/thirdparty/indextts/s2mel/modules/bigvgan/env.py +18 -0
- xinference/thirdparty/indextts/s2mel/modules/bigvgan/meldataset.py +354 -0
- xinference/thirdparty/indextts/s2mel/modules/bigvgan/utils.py +99 -0
- xinference/thirdparty/indextts/s2mel/modules/campplus/DTDNN.py +115 -0
- xinference/thirdparty/indextts/s2mel/modules/campplus/classifier.py +70 -0
- xinference/thirdparty/indextts/s2mel/modules/campplus/layers.py +253 -0
- xinference/thirdparty/indextts/s2mel/modules/commons.py +632 -0
- xinference/thirdparty/indextts/s2mel/modules/diffusion_transformer.py +257 -0
- xinference/thirdparty/indextts/s2mel/modules/encodec.py +292 -0
- xinference/thirdparty/indextts/s2mel/modules/flow_matching.py +171 -0
- xinference/thirdparty/indextts/s2mel/modules/gpt_fast/generate.py +436 -0
- xinference/thirdparty/indextts/s2mel/modules/gpt_fast/model.py +360 -0
- xinference/thirdparty/indextts/s2mel/modules/gpt_fast/quantize.py +622 -0
- xinference/thirdparty/indextts/s2mel/modules/hifigan/f0_predictor.py +55 -0
- xinference/thirdparty/indextts/s2mel/modules/hifigan/generator.py +454 -0
- xinference/thirdparty/indextts/s2mel/modules/layers.py +354 -0
- xinference/thirdparty/indextts/s2mel/modules/length_regulator.py +141 -0
- xinference/thirdparty/indextts/s2mel/modules/openvoice/__init__.py +0 -0
- xinference/thirdparty/indextts/s2mel/modules/openvoice/api.py +186 -0
- xinference/thirdparty/indextts/s2mel/modules/openvoice/attentions.py +465 -0
- xinference/thirdparty/indextts/s2mel/modules/openvoice/checkpoints_v2/converter/config.json +57 -0
- xinference/thirdparty/indextts/s2mel/modules/openvoice/commons.py +160 -0
- xinference/thirdparty/indextts/s2mel/modules/openvoice/mel_processing.py +183 -0
- xinference/thirdparty/indextts/s2mel/modules/openvoice/models.py +499 -0
- xinference/thirdparty/indextts/s2mel/modules/openvoice/modules.py +598 -0
- xinference/thirdparty/indextts/s2mel/modules/openvoice/openvoice_app.py +275 -0
- xinference/thirdparty/indextts/s2mel/modules/openvoice/se_extractor.py +153 -0
- xinference/thirdparty/indextts/s2mel/modules/openvoice/transforms.py +209 -0
- xinference/thirdparty/indextts/s2mel/modules/openvoice/utils.py +194 -0
- xinference/thirdparty/indextts/s2mel/modules/quantize.py +229 -0
- xinference/thirdparty/indextts/s2mel/modules/rmvpe.py +631 -0
- xinference/thirdparty/indextts/s2mel/modules/vocos/__init__.py +4 -0
- xinference/thirdparty/indextts/s2mel/modules/vocos/heads.py +164 -0
- xinference/thirdparty/indextts/s2mel/modules/vocos/helpers.py +71 -0
- xinference/thirdparty/indextts/s2mel/modules/vocos/loss.py +114 -0
- xinference/thirdparty/indextts/s2mel/modules/vocos/models.py +118 -0
- xinference/thirdparty/indextts/s2mel/modules/vocos/modules.py +213 -0
- xinference/thirdparty/indextts/s2mel/modules/vocos/pretrained.py +51 -0
- xinference/thirdparty/indextts/s2mel/modules/vocos/spectral_ops.py +192 -0
- xinference/thirdparty/indextts/s2mel/modules/wavenet.py +174 -0
- xinference/thirdparty/indextts/s2mel/optimizers.py +96 -0
- xinference/thirdparty/indextts/s2mel/wav2vecbert_extract.py +148 -0
- xinference/thirdparty/indextts/utils/__init__.py +0 -0
- xinference/thirdparty/indextts/utils/arch_util.py +120 -0
- xinference/thirdparty/indextts/utils/checkpoint.py +34 -0
- xinference/thirdparty/indextts/utils/common.py +121 -0
- xinference/thirdparty/indextts/utils/feature_extractors.py +50 -0
- xinference/thirdparty/indextts/utils/front.py +536 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/__init__.py +0 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/amphion_codec/codec.py +427 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/amphion_codec/quantize/__init__.py +11 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/amphion_codec/quantize/factorized_vector_quantize.py +150 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/amphion_codec/quantize/lookup_free_quantize.py +77 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/amphion_codec/quantize/residual_vq.py +177 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/amphion_codec/quantize/vector_quantize.py +401 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/amphion_codec/vocos.py +881 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/codec_dataset.py +264 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/codec_inference.py +515 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/codec_sampler.py +126 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/codec_trainer.py +166 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/facodec/__init__.py +0 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/facodec/alias_free_torch/__init__.py +5 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/facodec/alias_free_torch/act.py +29 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/facodec/alias_free_torch/filter.py +96 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/facodec/alias_free_torch/resample.py +57 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/facodec/facodec_dataset.py +98 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/facodec/facodec_inference.py +137 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/facodec/facodec_trainer.py +776 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/facodec/modules/JDC/__init__.py +1 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/facodec/modules/JDC/bst.t7 +0 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/facodec/modules/JDC/model.py +219 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/facodec/modules/attentions.py +437 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/facodec/modules/commons.py +331 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/facodec/modules/gradient_reversal.py +35 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/facodec/modules/layers.py +460 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/facodec/modules/quantize.py +741 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/facodec/modules/style_encoder.py +110 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/facodec/modules/wavenet.py +224 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/facodec/optimizer.py +104 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/kmeans/repcodec_model.py +210 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/kmeans/vocos.py +850 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/melvqgan/melspec.py +108 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/ns3_codec/README.md +216 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/ns3_codec/__init__.py +6 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/ns3_codec/alias_free_torch/__init__.py +5 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/ns3_codec/alias_free_torch/act.py +29 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/ns3_codec/alias_free_torch/filter.py +96 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/ns3_codec/alias_free_torch/resample.py +57 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/ns3_codec/facodec.py +1222 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/ns3_codec/gradient_reversal.py +35 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/ns3_codec/melspec.py +102 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/ns3_codec/quantize/__init__.py +7 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/ns3_codec/quantize/fvq.py +116 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/ns3_codec/quantize/rvq.py +87 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/ns3_codec/transformer.py +234 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/speechtokenizer/model.py +184 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/speechtokenizer/modules/__init__.py +27 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/speechtokenizer/modules/conv.py +346 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/speechtokenizer/modules/lstm.py +46 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/speechtokenizer/modules/norm.py +37 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/speechtokenizer/modules/quantization/__init__.py +14 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/speechtokenizer/modules/quantization/ac.py +317 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/speechtokenizer/modules/quantization/core_vq.py +388 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/speechtokenizer/modules/quantization/distrib.py +135 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/speechtokenizer/modules/quantization/vq.py +125 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/speechtokenizer/modules/seanet.py +414 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/vevo/vevo_repcodec.py +592 -0
- xinference/thirdparty/indextts/utils/maskgct/models/tts/maskgct/ckpt/wav2vec2bert_stats.pt +0 -0
- xinference/thirdparty/indextts/utils/maskgct/models/tts/maskgct/llama_nar.py +650 -0
- xinference/thirdparty/indextts/utils/maskgct/models/tts/maskgct/maskgct_s2a.py +503 -0
- xinference/thirdparty/indextts/utils/maskgct_utils.py +259 -0
- xinference/thirdparty/indextts/utils/text_utils.py +41 -0
- xinference/thirdparty/indextts/utils/typical_sampling.py +30 -0
- xinference/thirdparty/indextts/utils/utils.py +93 -0
- xinference/thirdparty/indextts/utils/webui_utils.py +42 -0
- xinference/thirdparty/indextts/utils/xtransformers.py +1247 -0
- xinference/thirdparty/indextts/vqvae/__init__.py +0 -0
- xinference/thirdparty/indextts/vqvae/xtts_dvae.py +395 -0
- xinference/thirdparty/melo/text/chinese_mix.py +2 -2
- xinference/types.py +9 -0
- xinference/ui/gradio/media_interface.py +66 -8
- xinference/ui/web/ui/build/asset-manifest.json +6 -6
- xinference/ui/web/ui/build/index.html +1 -1
- xinference/ui/web/ui/build/static/css/main.5ea97072.css +2 -0
- xinference/ui/web/ui/build/static/css/main.5ea97072.css.map +1 -0
- xinference/ui/web/ui/build/static/js/main.45e78536.js +3 -0
- xinference/ui/web/ui/build/static/js/{main.1086c759.js.LICENSE.txt → main.45e78536.js.LICENSE.txt} +0 -7
- xinference/ui/web/ui/build/static/js/main.45e78536.js.map +1 -0
- xinference/ui/web/ui/node_modules/.cache/babel-loader/089c38df5f52348d212ed868dda5c518a42e0c2762caed4175487c0405830c35.json +1 -0
- xinference/ui/web/ui/node_modules/.cache/babel-loader/2b6e3a5b6eb2c5c5f2d007e68cd46c372721cd52bf63508adcdb21ecf79241d8.json +1 -0
- xinference/ui/web/ui/node_modules/.cache/babel-loader/2d887825fd07a56f872eda4420da25fba0b5b62a23bdcc6c6da1a5281887f618.json +1 -0
- xinference/ui/web/ui/node_modules/.cache/babel-loader/4001f9c3e64e73a4f2158826650c174a59d5e3f89ddecddf17cbb6bb688cc4ca.json +1 -0
- xinference/ui/web/ui/node_modules/.cache/babel-loader/4a7018a69e6b7f90fc313248c2aa86f2a8f1eb1db120df586047a8023549b44b.json +1 -0
- xinference/ui/web/ui/node_modules/.cache/babel-loader/64b12aaa1c1d1bf53820ada8a63769067c0ccc5aab46b32348eb1917ae7f2a11.json +1 -0
- xinference/ui/web/ui/node_modules/.cache/babel-loader/7275b67c78ec76ce38a686bb8a576d8c9cecf54e1573614c84859d538efb9be5.json +1 -0
- xinference/ui/web/ui/node_modules/.cache/babel-loader/a68b6ee3b31eadc051fb95ce8f8ccb9c2e8b52c60f290dbab545a1917e065282.json +1 -0
- xinference/ui/web/ui/node_modules/.cache/babel-loader/ae8771cc37693feb160fa8727231312a0c54ef2d1d1ca893be568cd70016ca7e.json +1 -0
- xinference/ui/web/ui/node_modules/.cache/babel-loader/bb4e8722d2d41d87f1fce3661bc8937bffe9448e231fc5f0462630849e851592.json +1 -0
- xinference/ui/web/ui/node_modules/.cache/babel-loader/be6aada1ee4adc2bbf65dbe56d17db32bb3b5478be05d6b527805a8ba6cfb2b9.json +1 -0
- xinference/ui/web/ui/node_modules/.cache/babel-loader/de91c352653c233cf0cb6674e6e04049a44fd0e1156560de65d5c4620521391e.json +1 -0
- xinference/ui/web/ui/node_modules/.cache/babel-loader/e85f7002fc325c83b9c9cd8a1619e5b3ebc701d30e811afc284b88e6ae710cb5.json +1 -0
- xinference/ui/web/ui/node_modules/.cache/babel-loader/e8b603c78944bf3d213639078bfe155ff5c0dfa4048a93cbb967cad6a4eb4ff3.json +1 -0
- xinference/ui/web/ui/node_modules/.cache/babel-loader/ea2a26361204e70cf1018d6990fb6354bed82b3ac69690391e0f100385e7abb7.json +1 -0
- xinference/ui/web/ui/node_modules/.cache/babel-loader/f05535160a508b2a312de546a6de234776c613db276479ea4253c0b1bdeeb7d6.json +1 -0
- xinference/ui/web/ui/node_modules/.cache/babel-loader/f09ba9e11106bd59a0de10cc85c55084097729dcab575f43dfcf07375961ed87.json +1 -0
- xinference/ui/web/ui/node_modules/.package-lock.json +0 -33
- xinference/ui/web/ui/package-lock.json +0 -34
- xinference/ui/web/ui/package.json +0 -1
- xinference/ui/web/ui/src/locales/en.json +9 -3
- xinference/ui/web/ui/src/locales/ja.json +9 -3
- xinference/ui/web/ui/src/locales/ko.json +9 -3
- xinference/ui/web/ui/src/locales/zh.json +9 -3
- {xinference-1.10.0.dist-info → xinference-1.11.0.dist-info}/METADATA +24 -6
- {xinference-1.10.0.dist-info → xinference-1.11.0.dist-info}/RECORD +296 -77
- xinference/ui/web/ui/build/static/css/main.013f296b.css +0 -2
- xinference/ui/web/ui/build/static/css/main.013f296b.css.map +0 -1
- xinference/ui/web/ui/build/static/js/main.1086c759.js +0 -3
- xinference/ui/web/ui/build/static/js/main.1086c759.js.map +0 -1
- xinference/ui/web/ui/node_modules/.cache/babel-loader/0b0f77000cc1b482ca091cfbcae511dfe02f08916971645fad21d0b1234d04a2.json +0 -1
- xinference/ui/web/ui/node_modules/.cache/babel-loader/1c5f8ff423a7c9202bea60b15680f04b1e9964b445b0da3f86c6ff70cf24e797.json +0 -1
- xinference/ui/web/ui/node_modules/.cache/babel-loader/44ce7993e344980e3ed4f13e8f69237d4a5dfc60e37ca6b54f51f8ee1357bd67.json +0 -1
- xinference/ui/web/ui/node_modules/.cache/babel-loader/4aec1cc414ac3ebb3481d3d915e4db597d9127de813291346eacb8554ab170d4.json +0 -1
- xinference/ui/web/ui/node_modules/.cache/babel-loader/644cfec52f3c57a6e222ce60f112237a1efefe9835efd9aad857a685f53d8eed.json +0 -1
- xinference/ui/web/ui/node_modules/.cache/babel-loader/663436f72af53fe0d72394f56d003fa4e0bba489e5bb4e483fd34b00f84637f7.json +0 -1
- xinference/ui/web/ui/node_modules/.cache/babel-loader/69db82ca9bfe27fe417cc6cf2b1716b09be9c6f0cd198530f12bfc60e801bbcf.json +0 -1
- xinference/ui/web/ui/node_modules/.cache/babel-loader/85087e27618d740c236bf159f30e0219db443ab55f0997388eed5fde6f9e90cc.json +0 -1
- xinference/ui/web/ui/node_modules/.cache/babel-loader/88b07838348864aa86c672be3bbca1e9f58f6f3a2881b32070ec27f4e7b449d1.json +0 -1
- xinference/ui/web/ui/node_modules/.cache/babel-loader/8b8cd408ccfbe115acef27ccfa5b233da8597131a2a5712add13e1e4d5d4504b.json +0 -1
- xinference/ui/web/ui/node_modules/.cache/babel-loader/a23824fe746b9c6ca5eee9159b5764d1ff1653c1d856288c0f75c742bbb0023b.json +0 -1
- xinference/ui/web/ui/node_modules/.cache/babel-loader/a3eb18af328280b139693c9092dff2a0ef8c9a967e6c8956ceee0996611f1984.json +0 -1
- xinference/ui/web/ui/node_modules/.cache/babel-loader/bc1aacc65a102db325ca61bcd2f681e1ae22c36a1f1d98a6ff5e4ad49dc7544f.json +0 -1
- xinference/ui/web/ui/node_modules/.cache/babel-loader/c682fd521747c19dae437d83ce3235a306ce6b68e24a117bc57c27ebb8d1f1ca.json +0 -1
- xinference/ui/web/ui/node_modules/.cache/babel-loader/d5c224be7081f18cba1678b7874a9782eba895df004874ff8f243f94ba79942a.json +0 -1
- xinference/ui/web/ui/node_modules/.cache/babel-loader/f7f18bfb539b036a6a342176dd98a85df5057a884a8da978d679f2a0264883d0.json +0 -1
- xinference/ui/web/ui/node_modules/clipboard/.babelrc.json +0 -11
- xinference/ui/web/ui/node_modules/clipboard/.eslintrc.json +0 -24
- xinference/ui/web/ui/node_modules/clipboard/.prettierrc.json +0 -9
- xinference/ui/web/ui/node_modules/clipboard/bower.json +0 -18
- xinference/ui/web/ui/node_modules/clipboard/composer.json +0 -25
- xinference/ui/web/ui/node_modules/clipboard/package.json +0 -63
- xinference/ui/web/ui/node_modules/delegate/package.json +0 -31
- xinference/ui/web/ui/node_modules/good-listener/bower.json +0 -11
- xinference/ui/web/ui/node_modules/good-listener/package.json +0 -35
- xinference/ui/web/ui/node_modules/select/bower.json +0 -13
- xinference/ui/web/ui/node_modules/select/package.json +0 -29
- xinference/ui/web/ui/node_modules/tiny-emitter/package.json +0 -53
- {xinference-1.10.0.dist-info → xinference-1.11.0.dist-info}/WHEEL +0 -0
- {xinference-1.10.0.dist-info → xinference-1.11.0.dist-info}/entry_points.txt +0 -0
- {xinference-1.10.0.dist-info → xinference-1.11.0.dist-info}/licenses/LICENSE +0 -0
- {xinference-1.10.0.dist-info → xinference-1.11.0.dist-info}/top_level.txt +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"ast":null,"code":"import _regeneratorRuntime from\"/home/runner/work/inference/inference/xinference/ui/web/ui/node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js\";import _objectSpread from\"/home/runner/work/inference/inference/xinference/ui/web/ui/node_modules/@babel/runtime/helpers/esm/objectSpread2.js\";import _asyncToGenerator from\"/home/runner/work/inference/inference/xinference/ui/web/ui/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";import _slicedToArray from\"/home/runner/work/inference/inference/xinference/ui/web/ui/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";import{TabContext,TabList,TabPanel}from'@mui/lab';import{Box,FormControl,Tab}from'@mui/material';import React,{useContext,useEffect,useState}from'react';import{useTranslation}from'react-i18next';import{useNavigate}from'react-router-dom';import{ApiContext}from'../../components/apiContext';import fetchWrapper from'../../components/fetchWrapper';import HotkeyFocusTextField from'../../components/hotkeyFocusTextField';import ModelCard from'./modelCard';import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";var customType=['llm','embedding','rerank','image','audio','flexible'];var LaunchCustom=function LaunchCustom(_ref){var gpuAvailable=_ref.gpuAvailable;var endPoint=useContext(ApiContext).endPoint;var _useState=useState([]),_useState2=_slicedToArray(_useState,2),registrationData=_useState2[0],setRegistrationData=_useState2[1];var _useContext=useContext(ApiContext),isCallingApi=_useContext.isCallingApi,setIsCallingApi=_useContext.setIsCallingApi;var _useContext2=useContext(ApiContext),isUpdatingModel=_useContext2.isUpdatingModel;// States used for filtering\nvar _useState3=useState(''),_useState4=_slicedToArray(_useState3,2),searchTerm=_useState4[0],setSearchTerm=_useState4[1];var _useState5=useState(sessionStorage.getItem('subType')),_useState6=_slicedToArray(_useState5,2),value=_useState6[0],setValue=_useState6[1];var _useTranslation=useTranslation(),t=_useTranslation.t;var navigate=useNavigate();var handleTabChange=function handleTabChange(_,newValue){var type=newValue.split('/')[3]==='llm'?'LLM':newValue.split('/')[3];getData(type);setValue(newValue);navigate(newValue);sessionStorage.setItem('subType',newValue);};var handleSearchChange=function handleSearchChange(event){setSearchTerm(event.target.value);};var filter=function filter(registration){if(!registration||typeof searchTerm!=='string')return false;var modelName=registration.model_name?registration.model_name.toLowerCase():'';return modelName.includes(searchTerm.toLowerCase());};useEffect(function(){var type=sessionStorage.getItem('subType').split('/')[3];getData(type==='llm'?'LLM':type);},[]);var getData=/*#__PURE__*/function(){var _ref2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(type){var data,customRegistrations,newData;return _regeneratorRuntime().wrap(function _callee2$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:if(!(isCallingApi||isUpdatingModel)){_context2.next=2;break;}return _context2.abrupt(\"return\");case 2:_context2.prev=2;setIsCallingApi(true);_context2.next=6;return fetchWrapper.get(\"/v1/model_registrations/\".concat(type));case 6:data=_context2.sent;customRegistrations=data.filter(function(data){return!data.is_builtin;});_context2.next=10;return Promise.all(customRegistrations.map(/*#__PURE__*/function(){var _ref3=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(registration){var desc;return _regeneratorRuntime().wrap(function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:_context.next=2;return fetchWrapper.get(\"/v1/model_registrations/\".concat(type,\"/\").concat(registration.model_name));case 2:desc=_context.sent;return _context.abrupt(\"return\",_objectSpread(_objectSpread({},desc),{},{is_builtin:registration.is_builtin}));case 4:case\"end\":return _context.stop();}},_callee);}));return function(_x2){return _ref3.apply(this,arguments);};}()));case 10:newData=_context2.sent;setRegistrationData(newData);_context2.next=17;break;case 14:_context2.prev=14;_context2.t0=_context2[\"catch\"](2);console.error('Error:',_context2.t0);case 17:_context2.prev=17;setIsCallingApi(false);return _context2.finish(17);case 20:case\"end\":return _context2.stop();}},_callee2,null,[[2,14,17,20]]);}));return function getData(_x){return _ref2.apply(this,arguments);};}();var handlecustomDelete=function handlecustomDelete(model_name){setRegistrationData(registrationData.filter(function(item){return item.model_name!==model_name;}));};var style={display:'grid',gridTemplateColumns:'repeat(auto-fill, minmax(300px, 1fr))',paddingLeft:'2rem',paddingBottom:'2rem',gridGap:'2rem 0rem'};return/*#__PURE__*/_jsx(Box,{m:\"20px\",children:/*#__PURE__*/_jsxs(TabContext,{value:value,children:[/*#__PURE__*/_jsx(Box,{sx:{borderBottom:1,borderColor:'divider'},children:/*#__PURE__*/_jsxs(TabList,{value:value,onChange:handleTabChange,\"aria-label\":\"tabs\",children:[/*#__PURE__*/_jsx(Tab,{label:t('model.languageModels'),value:\"/launch_model/custom/llm\"}),/*#__PURE__*/_jsx(Tab,{label:t('model.embeddingModels'),value:\"/launch_model/custom/embedding\"}),/*#__PURE__*/_jsx(Tab,{label:t('model.rerankModels'),value:\"/launch_model/custom/rerank\"}),/*#__PURE__*/_jsx(Tab,{label:t('model.imageModels'),value:\"/launch_model/custom/image\"}),/*#__PURE__*/_jsx(Tab,{label:t('model.audioModels'),value:\"/launch_model/custom/audio\"}),/*#__PURE__*/_jsx(Tab,{label:t('model.flexibleModels'),value:\"/launch_model/custom/flexible\"})]})}),customType.map(function(item){return/*#__PURE__*/_jsxs(TabPanel,{value:\"/launch_model/custom/\".concat(item),sx:{padding:0},children:[/*#__PURE__*/_jsx(\"div\",{style:{display:'grid',gridTemplateColumns:'1fr',margin:'30px 2rem'},children:/*#__PURE__*/_jsx(FormControl,{variant:\"outlined\",margin:\"normal\",children:/*#__PURE__*/_jsx(HotkeyFocusTextField,{id:\"search\",type:\"search\",label:t('launchModel.search'),value:searchTerm,onChange:handleSearchChange,size:\"small\",hotkey:\"Enter\",t:t})})}),/*#__PURE__*/_jsx(\"div\",{style:style,children:registrationData.filter(function(registration){return filter(registration);}).map(function(filteredRegistration){return/*#__PURE__*/_jsx(ModelCard,{url:endPoint,modelData:filteredRegistration,gpuAvailable:gpuAvailable,is_custom:true,modelType:item==='llm'?'LLM':item,onHandlecustomDelete:handlecustomDelete},filteredRegistration.model_name);})})]},item);})]})});};export default LaunchCustom;","map":{"version":3,"names":["TabContext","TabList","TabPanel","Box","FormControl","Tab","React","useContext","useEffect","useState","useTranslation","useNavigate","ApiContext","fetchWrapper","HotkeyFocusTextField","ModelCard","jsx","_jsx","jsxs","_jsxs","customType","LaunchCustom","_ref","gpuAvailable","endPoint","_useState","_useState2","_slicedToArray","registrationData","setRegistrationData","_useContext","isCallingApi","setIsCallingApi","_useContext2","isUpdatingModel","_useState3","_useState4","searchTerm","setSearchTerm","_useState5","sessionStorage","getItem","_useState6","value","setValue","_useTranslation","t","navigate","handleTabChange","_","newValue","type","split","getData","setItem","handleSearchChange","event","target","filter","registration","modelName","model_name","toLowerCase","includes","_ref2","_asyncToGenerator","_regeneratorRuntime","mark","_callee2","data","customRegistrations","newData","wrap","_callee2$","_context2","prev","next","abrupt","get","concat","sent","is_builtin","Promise","all","map","_ref3","_callee","desc","_callee$","_context","_objectSpread","stop","_x2","apply","arguments","t0","console","error","finish","_x","handlecustomDelete","item","style","display","gridTemplateColumns","paddingLeft","paddingBottom","gridGap","m","children","sx","borderBottom","borderColor","onChange","label","padding","margin","variant","id","size","hotkey","filteredRegistration","url","modelData","is_custom","modelType","onHandlecustomDelete"],"sources":["/home/runner/work/inference/inference/xinference/ui/web/ui/src/scenes/launch_model/launchCustom.js"],"sourcesContent":["import { TabContext, TabList, TabPanel } from '@mui/lab'\nimport { Box, FormControl, Tab } from '@mui/material'\nimport React, { useContext, useEffect, useState } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { useNavigate } from 'react-router-dom'\n\nimport { ApiContext } from '../../components/apiContext'\nimport fetchWrapper from '../../components/fetchWrapper'\nimport HotkeyFocusTextField from '../../components/hotkeyFocusTextField'\nimport ModelCard from './modelCard'\n\nconst customType = ['llm', 'embedding', 'rerank', 'image', 'audio', 'flexible']\n\nconst LaunchCustom = ({ gpuAvailable }) => {\n let endPoint = useContext(ApiContext).endPoint\n const [registrationData, setRegistrationData] = useState([])\n const { isCallingApi, setIsCallingApi } = useContext(ApiContext)\n const { isUpdatingModel } = useContext(ApiContext)\n\n // States used for filtering\n const [searchTerm, setSearchTerm] = useState('')\n const [value, setValue] = useState(sessionStorage.getItem('subType'))\n const { t } = useTranslation()\n\n const navigate = useNavigate()\n const handleTabChange = (_, newValue) => {\n const type =\n newValue.split('/')[3] === 'llm' ? 'LLM' : newValue.split('/')[3]\n getData(type)\n setValue(newValue)\n navigate(newValue)\n sessionStorage.setItem('subType', newValue)\n }\n\n const handleSearchChange = (event) => {\n setSearchTerm(event.target.value)\n }\n\n const filter = (registration) => {\n if (!registration || typeof searchTerm !== 'string') return false\n const modelName = registration.model_name\n ? registration.model_name.toLowerCase()\n : ''\n return modelName.includes(searchTerm.toLowerCase())\n }\n\n useEffect(() => {\n const type = sessionStorage.getItem('subType').split('/')[3]\n getData(type === 'llm' ? 'LLM' : type)\n }, [])\n\n const getData = async (type) => {\n if (isCallingApi || isUpdatingModel) return\n try {\n setIsCallingApi(true)\n\n const data = await fetchWrapper.get(`/v1/model_registrations/${type}`)\n const customRegistrations = data.filter((data) => !data.is_builtin)\n\n const newData = await Promise.all(\n customRegistrations.map(async (registration) => {\n const desc = await fetchWrapper.get(\n `/v1/model_registrations/${type}/${registration.model_name}`\n )\n\n return {\n ...desc,\n is_builtin: registration.is_builtin,\n }\n })\n )\n setRegistrationData(newData)\n } catch (error) {\n console.error('Error:', error)\n } finally {\n setIsCallingApi(false)\n }\n }\n\n const handlecustomDelete = (model_name) => {\n setRegistrationData(\n registrationData.filter((item) => {\n return item.model_name !== model_name\n })\n )\n }\n\n const style = {\n display: 'grid',\n gridTemplateColumns: 'repeat(auto-fill, minmax(300px, 1fr))',\n paddingLeft: '2rem',\n paddingBottom: '2rem',\n gridGap: '2rem 0rem',\n }\n\n return (\n <Box m=\"20px\">\n <TabContext value={value}>\n <Box sx={{ borderBottom: 1, borderColor: 'divider' }}>\n <TabList value={value} onChange={handleTabChange} aria-label=\"tabs\">\n <Tab\n label={t('model.languageModels')}\n value=\"/launch_model/custom/llm\"\n />\n <Tab\n label={t('model.embeddingModels')}\n value=\"/launch_model/custom/embedding\"\n />\n <Tab\n label={t('model.rerankModels')}\n value=\"/launch_model/custom/rerank\"\n />\n <Tab\n label={t('model.imageModels')}\n value=\"/launch_model/custom/image\"\n />\n <Tab\n label={t('model.audioModels')}\n value=\"/launch_model/custom/audio\"\n />\n <Tab\n label={t('model.flexibleModels')}\n value=\"/launch_model/custom/flexible\"\n />\n </TabList>\n </Box>\n {customType.map((item) => (\n <TabPanel\n key={item}\n value={`/launch_model/custom/${item}`}\n sx={{ padding: 0 }}\n >\n <div\n style={{\n display: 'grid',\n gridTemplateColumns: '1fr',\n margin: '30px 2rem',\n }}\n >\n <FormControl variant=\"outlined\" margin=\"normal\">\n <HotkeyFocusTextField\n id=\"search\"\n type=\"search\"\n label={t('launchModel.search')}\n value={searchTerm}\n onChange={handleSearchChange}\n size=\"small\"\n hotkey=\"Enter\"\n t={t}\n />\n </FormControl>\n </div>\n <div style={style}>\n {registrationData\n .filter((registration) => filter(registration))\n .map((filteredRegistration) => (\n <ModelCard\n key={filteredRegistration.model_name}\n url={endPoint}\n modelData={filteredRegistration}\n gpuAvailable={gpuAvailable}\n is_custom={true}\n modelType={item === 'llm' ? 'LLM' : item}\n onHandlecustomDelete={handlecustomDelete}\n />\n ))}\n </div>\n </TabPanel>\n ))}\n </TabContext>\n </Box>\n )\n}\n\nexport default LaunchCustom\n"],"mappings":"+kBAAA,OAASA,UAAU,CAAEC,OAAO,CAAEC,QAAQ,KAAQ,UAAU,CACxD,OAASC,GAAG,CAAEC,WAAW,CAAEC,GAAG,KAAQ,eAAe,CACrD,MAAO,CAAAC,KAAK,EAAIC,UAAU,CAAEC,SAAS,CAAEC,QAAQ,KAAQ,OAAO,CAC9D,OAASC,cAAc,KAAQ,eAAe,CAC9C,OAASC,WAAW,KAAQ,kBAAkB,CAE9C,OAASC,UAAU,KAAQ,6BAA6B,CACxD,MAAO,CAAAC,YAAY,KAAM,+BAA+B,CACxD,MAAO,CAAAC,oBAAoB,KAAM,uCAAuC,CACxE,MAAO,CAAAC,SAAS,KAAM,aAAa,QAAAC,GAAA,IAAAC,IAAA,gCAAAC,IAAA,IAAAC,KAAA,yBAEnC,GAAM,CAAAC,UAAU,CAAG,CAAC,KAAK,CAAE,WAAW,CAAE,QAAQ,CAAE,OAAO,CAAE,OAAO,CAAE,UAAU,CAAC,CAE/E,GAAM,CAAAC,YAAY,CAAG,QAAf,CAAAA,YAAYA,CAAAC,IAAA,CAAyB,IAAnB,CAAAC,YAAY,CAAAD,IAAA,CAAZC,YAAY,CAClC,GAAI,CAAAC,QAAQ,CAAGjB,UAAU,CAACK,UAAU,CAAC,CAACY,QAAQ,CAC9C,IAAAC,SAAA,CAAgDhB,QAAQ,CAAC,EAAE,CAAC,CAAAiB,UAAA,CAAAC,cAAA,CAAAF,SAAA,IAArDG,gBAAgB,CAAAF,UAAA,IAAEG,mBAAmB,CAAAH,UAAA,IAC5C,IAAAI,WAAA,CAA0CvB,UAAU,CAACK,UAAU,CAAC,CAAxDmB,YAAY,CAAAD,WAAA,CAAZC,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,KAAK,CAAG,KAAK,CAAGA,IAAK,CACzCyB,oBAAoB,CAAE1B,kBAAmB,EANpCqB,oBAAoB,CAAC5D,UAO3B,CAAC,EACH,CAAC,CACD,CAAC,GAtCDwC,IAuCG,CAAC,EACZ,CAAC,EACQ,CAAC,CACV,CAAC,CAEV,CAAC,CAED,cAAe,CAAAhF,YAAY","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"ast":null,"code":"import _toConsumableArray from\"/home/runner/work/inference/inference/xinference/ui/web/ui/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\";import _objectSpread from\"/home/runner/work/inference/inference/xinference/ui/web/ui/node_modules/@babel/runtime/helpers/esm/objectSpread2.js\";import _defineProperty from\"/home/runner/work/inference/inference/xinference/ui/web/ui/node_modules/@babel/runtime/helpers/esm/defineProperty.js\";import _slicedToArray from\"/home/runner/work/inference/inference/xinference/ui/web/ui/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";import{AddCircle}from'@mui/icons-material';import DeleteIcon from'@mui/icons-material/Delete';import{Box,IconButton,Snackbar,TextField}from'@mui/material';import React,{useEffect,useState}from'react';import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";var AddValue=function AddValue(_ref){var customData=_ref.customData,pairData=_ref.pairData,onGetArr=_ref.onGetArr,onJudgeArr=_ref.onJudgeArr;var _useState=useState(false),_useState2=_slicedToArray(_useState,2),openSnackbar=_useState2[0],setOpenSnackbar=_useState2[1];var _useState3=useState([]),_useState4=_slicedToArray(_useState3,2),arr=_useState4[0],setArr=_useState4[1];var _useState5=useState(0),_useState6=_slicedToArray(_useState5,2),arrId=_useState6[0],setArrId=_useState6[1];useEffect(function(){onGetArr(arr);},[arr]);useEffect(function(){if(!Array.isArray(pairData))return;var dataArr=[];pairData.forEach(function(item,index){dataArr.push(_defineProperty({id:index},customData.value,item));});setArrId(pairData.length);setArr(dataArr);},[pairData]);var updateArr=function updateArr(index,type,newValue){setArr(arr.map(function(pair,subIndex){if(subIndex===index){return _objectSpread(_objectSpread({},pair),{},_defineProperty({},type,newValue));}return pair;}));};var handleDeleteArr=function handleDeleteArr(index){setArr(arr.filter(function(_,subIndex){return index!==subIndex;}));onGetArr(arr);};return/*#__PURE__*/_jsxs(\"div\",{children:[/*#__PURE__*/_jsxs(Box,{children:[/*#__PURE__*/_jsxs(\"div\",{style:{display:'flex',alignItems:'center',margin:'20px 0 0 15px'},children:[/*#__PURE__*/_jsx(\"div\",{children:customData.title}),/*#__PURE__*/_jsx(IconButton,{color:\"primary\",onClick:function onClick(){setArrId(arrId+1);var obj={id:arrId};obj[customData.value]='';onJudgeArr(arr,[customData.value])?setArr([].concat(_toConsumableArray(arr),[obj])):setOpenSnackbar(true);},children:/*#__PURE__*/_jsx(AddCircle,{})})]}),/*#__PURE__*/_jsx(Box,{children:arr.map(function(item,index){return/*#__PURE__*/_jsx(Box,{children:/*#__PURE__*/_jsxs(\"div\",{style:{display:'flex',justifyContent:'space-between',alignItems:'center',marginTop:'10px',marginLeft:'10px'},children:[/*#__PURE__*/_jsx(TextField,{className:\"textHighlight\",label:customData.value,value:item[customData.value],onChange:function onChange(e){updateArr(index,customData.value,e.target.value);},fullWidth:true}),/*#__PURE__*/_jsx(IconButton,{\"aria-label\":\"delete\",onClick:function onClick(){return handleDeleteArr(index);},style:{marginLeft:'10px'},children:/*#__PURE__*/_jsx(DeleteIcon,{})})]})},item.id);})})]}),/*#__PURE__*/_jsx(Snackbar,{anchorOrigin:{vertical:'top',horizontal:'center'},open:openSnackbar,onClose:function onClose(){return setOpenSnackbar(false);},message:\"Please fill in the complete parameters before adding!!\"},'top'+'center')]});};export default AddValue;","map":{"version":3,"names":["AddCircle","DeleteIcon","Box","IconButton","Snackbar","TextField","React","useEffect","useState","jsx","_jsx","jsxs","_jsxs","AddValue","_ref","customData","pairData","onGetArr","onJudgeArr","_useState","_useState2","_slicedToArray","openSnackbar","setOpenSnackbar","_useState3","_useState4","arr","setArr","_useState5","_useState6","arrId","setArrId","Array","isArray","dataArr","forEach","item","index","push","_defineProperty","id","value","length","updateArr","type","newValue","map","pair","subIndex","_objectSpread","handleDeleteArr","filter","_","children","style","display","alignItems","margin","title","color","onClick","obj","concat","_toConsumableArray","justifyContent","marginTop","marginLeft","className","label","onChange","e","target","fullWidth","anchorOrigin","vertical","horizontal","open","onClose","message"],"sources":["/home/runner/work/inference/inference/xinference/ui/web/ui/src/scenes/launch_model/components/addValue.js"],"sourcesContent":["import { AddCircle } from '@mui/icons-material'\nimport DeleteIcon from '@mui/icons-material/Delete'\nimport { Box, IconButton, Snackbar, TextField } from '@mui/material'\nimport React, { useEffect, useState } from 'react'\n\nconst AddValue = ({ customData, pairData, onGetArr, onJudgeArr }) => {\n const [openSnackbar, setOpenSnackbar] = useState(false)\n const [arr, setArr] = useState([])\n const [arrId, setArrId] = useState(0)\n\n useEffect(() => {\n onGetArr(arr)\n }, [arr])\n\n useEffect(() => {\n if (!Array.isArray(pairData)) return\n const dataArr = []\n pairData.forEach((item, index) => {\n dataArr.push({\n id: index,\n [customData.value]: item,\n })\n })\n setArrId(pairData.length)\n setArr(dataArr)\n }, [pairData])\n\n const updateArr = (index, type, newValue) => {\n setArr(\n arr.map((pair, subIndex) => {\n if (subIndex === index) {\n return { ...pair, [type]: newValue }\n }\n return pair\n })\n )\n }\n\n const handleDeleteArr = (index) => {\n setArr(\n arr.filter((_, subIndex) => {\n return index !== subIndex\n })\n )\n onGetArr(arr)\n }\n\n return (\n <div>\n <Box>\n <div\n style={{\n display: 'flex',\n alignItems: 'center',\n margin: '20px 0 0 15px',\n }}\n >\n <div>{customData.title}</div>\n <IconButton\n color=\"primary\"\n onClick={() => {\n setArrId(arrId + 1)\n let obj = { id: arrId }\n obj[customData.value] = ''\n onJudgeArr(arr, [customData.value])\n ? setArr([...arr, obj])\n : setOpenSnackbar(true)\n }}\n >\n <AddCircle />\n </IconButton>\n </div>\n <Box>\n {arr.map((item, index) => {\n return (\n <Box key={item.id}>\n <div\n style={{\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'center',\n marginTop: '10px',\n marginLeft: '10px',\n }}\n >\n <TextField\n className=\"textHighlight\"\n label={customData.value}\n value={item[customData.value]}\n onChange={(e) => {\n updateArr(index, customData.value, e.target.value)\n }}\n fullWidth\n />\n <IconButton\n aria-label=\"delete\"\n onClick={() => handleDeleteArr(index)}\n style={{ marginLeft: '10px' }}\n >\n <DeleteIcon />\n </IconButton>\n </div>\n </Box>\n )\n })}\n </Box>\n </Box>\n <Snackbar\n anchorOrigin={{ vertical: 'top', horizontal: 'center' }}\n open={openSnackbar}\n onClose={() => setOpenSnackbar(false)}\n message=\"Please fill in the complete parameters before adding!!\"\n key={'top' + 'center'}\n />\n </div>\n )\n}\n\nexport default AddValue\n"],"mappings":"ykBAAA,OAASA,SAAS,KAAQ,qBAAqB,CAC/C,MAAO,CAAAC,UAAU,KAAM,4BAA4B,CACnD,OAASC,GAAG,CAAEC,UAAU,CAAEC,QAAQ,CAAEC,SAAS,KAAQ,eAAe,CACpE,MAAO,CAAAC,KAAK,EAAIC,SAAS,CAAEC,QAAQ,KAAQ,OAAO,QAAAC,GAAA,IAAAC,IAAA,gCAAAC,IAAA,IAAAC,KAAA,yBAElD,GAAM,CAAAC,QAAQ,CAAG,QAAX,CAAAA,QAAQA,CAAAC,IAAA,CAAuD,IAAjD,CAAAC,UAAU,CAAAD,IAAA,CAAVC,UAAU,CAAEC,QAAQ,CAAAF,IAAA,CAARE,QAAQ,CAAEC,QAAQ,CAAAH,IAAA,CAARG,QAAQ,CAAEC,UAAU,CAAAJ,IAAA,CAAVI,UAAU,CAC5D,IAAAC,SAAA,CAAwCX,QAAQ,CAAC,KAAK,CAAC,CAAAY,UAAA,CAAAC,cAAA,CAAAF,SAAA,IAAhDG,YAAY,CAAAF,UAAA,IAAEG,eAAe,CAAAH,UAAA,IACpC,IAAAI,UAAA,CAAsBhB,QAAQ,CAAC,E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AE,eAAe,CAC/BR,UAAU,CAAE,QAAQ,CACpBS,SAAS,CAAE,MAAM,CACjBC,UAAU,CAAE,MACd,CAAE,CAAAb,QAAA,eAEF3C,IAAA,CAACL,SAAS,EACR8D,SAAS,CAAC,eAAe,CACzBC,KAAK,CAAErD,UAAU,CAAC0B,KAAM,CACxBA,KAAK,CAAEL,IAAI,CAACrB,UAAU,CAAC0B,KAAK,CAAE,CAC9B4B,QAAQ,CAAE,SAAAA,SAACC,CAAC,CAAK,CACf3B,SAAS,CAACN,KAAK,CAAEtB,UAAU,CAAC0B,KAAK,CAAE6B,CAAC,CAACC,MAAM,CAAC9B,KAAK,CAAC,CACpD,CAAE,CACF+B,SAAS,MACV,CAAC,cACF9D,IAAA,CAACP,UAAU,EACT,aAAW,QAAQ,CACnByD,OAAO,CAAE,SAAAA,QAAA,QAAM,CAAAV,eAAe,CAACb,KAAK,CAAC,EAAC,CACtCiB,KAAK,CAAE,CAAEY,UAAU,CAAE,MAAO,CAAE,CAAAb,QAAA,cAE9B3C,IAAA,CAACT,UAAU,GAAE,CAAC,CACJ,CAAC,EACV,CAAC,EA1BEmC,IAAI,CAACI,EA2BV,CAAC,CAEV,CAAC,CAAC,CACC,CAAC,EACH,CAAC,cACN9B,IAAA,CAACN,QAAQ,EACPqE,YAAY,CAAE,CAAEC,QAAQ,CAAE,KAAK,CAAEC,UAAU,CAAE,QAAS,CAAE,CACxDC,IAAI,CAAEtD,YAAa,CACnBuD,OAAO,CAAE,SAAAA,QAAA,QAAM,CAAAtD,eAAe,CAAC,KAAK,CAAC,EAAC,CACtCuD,OAAO,CAAC,wDAAwD,EAC3D,KAAK,CAAG,QACd,CAAC,EACC,CAAC,CAEV,CAAC,CAED,cAAe,CAAAjE,QAAQ","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"ast":null,"code":"var getEndpoint=function getEndpoint(){var endPoint='';if(!process.env.NODE_ENV||process.env.NODE_ENV==='development'){endPoint='http://127.0.0.1:9997';}else{var fullUrl=window.location.href;endPoint=fullUrl.split('/ui')[0];}return endPoint;};var isValidBearerToken=function isValidBearerToken(token){return token!==''&&token!==undefined&&token!==null&&token.length>10;};var toReadableSize=function toReadableSize(size){var res_size=size/Math.pow(1024.0,2);return res_size.toFixed(2)+'MiB';};export{getEndpoint,isValidBearerToken,toReadableSize};","map":{"version":3,"names":["getEndpoint","endPoint","process","env","NODE_ENV","fullUrl","window","location","href","split","isValidBearerToken","token","undefined","length","toReadableSize","size","res_size","Math","pow","toFixed"],"sources":["/home/runner/work/inference/inference/xinference/ui/web/ui/src/components/utils.js"],"sourcesContent":["const getEndpoint = () => {\n let endPoint = ''\n if (!process.env.NODE_ENV || process.env.NODE_ENV === 'development') {\n endPoint = 'http://127.0.0.1:9997'\n } else {\n const fullUrl = window.location.href\n endPoint = fullUrl.split('/ui')[0]\n }\n return endPoint\n}\n\nconst isValidBearerToken = (token) => {\n return (\n token !== '' && token !== undefined && token !== null && token.length > 10\n )\n}\n\nconst toReadableSize = (size) => {\n const res_size = size / 1024.0 ** 2\n return res_size.toFixed(2) + 'MiB'\n}\n\nexport { getEndpoint, isValidBearerToken, toReadableSize }\n"],"mappings":"AAAA,GAAM,CAAAA,WAAW,CAAG,QAAd,CAAAA,WAAWA,CAAA,CAAS,CACxB,GAAI,CAAAC,QAAQ,CAAG,EAAE,CACjB,GAAI,CAACC,OAAO,CAACC,GAAG,CAACC,QAAQ,EAAIF,OAAO,CAACC,GAAG,CAACC,QAAQ,GAAK,aAAa,CAAE,CACnEH,QAAQ,CAAG,uBAAuB,CACpC,CAAC,IAAM,CACL,GAAM,CAAAI,OAAO,CAAGC,MAAM,CAACC,QAAQ,CAACC,IAAI,CACpCP,QAAQ,CAAGI,OAAO,CAACI,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CACpC,CACA,MAAO,CAAAR,QAAQ,CACjB,CAAC,CAED,GAAM,CAAAS,kBAAkB,CAAG,QAArB,CAAAA,kBAAkBA,CAAIC,KAAK,CAAK,CACpC,MACE,CAAAA,KAAK,GAAK,EAAE,EAAIA,KAAK,GAAKC,SAAS,EAAID,KAAK,GAAK,IAAI,EAAIA,KAAK,CAACE,MAAM,CAAG,EAAE,CAE9E,CAAC,CAED,GAAM,CAAAC,cAAc,CAAG,QAAjB,CAAAA,cAAcA,CAAIC,IAAI,CAAK,CAC/B,GAAM,CAAAC,QAAQ,CAAGD,IAAI,CAAAE,IAAA,CAAAC,GAAA,CAAG,MAAM,CAAI,CAAC,EACnC,MAAO,CAAAF,QAAQ,CAACG,OAAO,CAAC,CAAC,CAAC,CAAG,KAAK,CACpC,CAAC,CAED,OAASnB,WAAW,CAAEU,kBAAkB,CAAEI,cAAc","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"ast":null,"code":"/*!\n * clipboard.js v2.0.11\n * https://clipboardjs.com/\n *\n * Licensed MIT © Zeno Rocha\n */\n(function webpackUniversalModuleDefinition(root, factory) {\n if (typeof exports === 'object' && typeof module === 'object') module.exports = factory();else if (typeof define === 'function' && define.amd) define([], factory);else if (typeof exports === 'object') exports[\"ClipboardJS\"] = factory();else root[\"ClipboardJS\"] = factory();\n})(this, function () {\n return /******/function () {\n // webpackBootstrap\n /******/\n var __webpack_modules__ = {\n /***/686: ( /***/function _(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n // EXPORTS\n __webpack_require__.d(__webpack_exports__, {\n \"default\": function _default() {\n return /* binding */clipboard;\n }\n });\n\n // EXTERNAL MODULE: ./node_modules/tiny-emitter/index.js\n var tiny_emitter = __webpack_require__(279);\n var tiny_emitter_default = /*#__PURE__*/__webpack_require__.n(tiny_emitter);\n // EXTERNAL MODULE: ./node_modules/good-listener/src/listen.js\n var listen = __webpack_require__(370);\n var listen_default = /*#__PURE__*/__webpack_require__.n(listen);\n // EXTERNAL MODULE: ./node_modules/select/src/select.js\n var src_select = __webpack_require__(817);\n var select_default = /*#__PURE__*/__webpack_require__.n(src_select);\n ; // CONCATENATED MODULE: ./src/common/command.js\n /**\n * Executes a given operation type.\n * @param {String} type\n * @return {Boolean}\n */\n function command(type) {\n try {\n return document.execCommand(type);\n } catch (err) {\n return false;\n }\n }\n ; // CONCATENATED MODULE: ./src/actions/cut.js\n\n /**\n * Cut action wrapper.\n * @param {String|HTMLElement} target\n * @return {String}\n */\n\n var ClipboardActionCut = function ClipboardActionCut(target) {\n var selectedText = select_default()(target);\n command('cut');\n return selectedText;\n };\n\n /* harmony default export */\n var actions_cut = ClipboardActionCut;\n ; // CONCATENATED MODULE: ./src/common/create-fake-element.js\n /**\n * Creates a fake textarea element with a value.\n * @param {String} value\n * @return {HTMLElement}\n */\n function createFakeElement(value) {\n var isRTL = document.documentElement.getAttribute('dir') === 'rtl';\n var fakeElement = document.createElement('textarea'); // Prevent zooming on iOS\n\n fakeElement.style.fontSize = '12pt'; // Reset box model\n\n fakeElement.style.border = '0';\n fakeElement.style.padding = '0';\n fakeElement.style.margin = '0'; // Move element out of screen horizontally\n\n fakeElement.style.position = 'absolute';\n fakeElement.style[isRTL ? 'right' : 'left'] = '-9999px'; // Move element to the same position vertically\n\n var yPosition = window.pageYOffset || document.documentElement.scrollTop;\n fakeElement.style.top = \"\".concat(yPosition, \"px\");\n fakeElement.setAttribute('readonly', '');\n fakeElement.value = value;\n return fakeElement;\n }\n ; // CONCATENATED MODULE: ./src/actions/copy.js\n\n /**\n * Create fake copy action wrapper using a fake element.\n * @param {String} target\n * @param {Object} options\n * @return {String}\n */\n\n var fakeCopyAction = function fakeCopyAction(value, options) {\n var fakeElement = createFakeElement(value);\n options.container.appendChild(fakeElement);\n var selectedText = select_default()(fakeElement);\n command('copy');\n fakeElement.remove();\n return selectedText;\n };\n /**\n * Copy action wrapper.\n * @param {String|HTMLElement} target\n * @param {Object} options\n * @return {String}\n */\n\n var ClipboardActionCopy = function ClipboardActionCopy(target) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {\n container: document.body\n };\n var selectedText = '';\n if (typeof target === 'string') {\n selectedText = fakeCopyAction(target, options);\n } else if (target instanceof HTMLInputElement && !['text', 'search', 'url', 'tel', 'password'].includes(target === null || target === void 0 ? void 0 : target.type)) {\n // If input type doesn't support `setSelectionRange`. Simulate it. https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange\n selectedText = fakeCopyAction(target.value, options);\n } else {\n selectedText = select_default()(target);\n command('copy');\n }\n return selectedText;\n };\n\n /* harmony default export */\n var actions_copy = ClipboardActionCopy;\n ; // CONCATENATED MODULE: ./src/actions/default.js\n function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n return _typeof(obj);\n }\n\n /**\n * Inner function which performs selection from either `text` or `target`\n * properties and then executes copy or cut operations.\n * @param {Object} options\n */\n\n var ClipboardActionDefault = function ClipboardActionDefault() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n // Defines base properties passed from constructor.\n var _options$action = options.action,\n action = _options$action === void 0 ? 'copy' : _options$action,\n container = options.container,\n target = options.target,\n text = options.text; // Sets the `action` to be performed which can be either 'copy' or 'cut'.\n\n if (action !== 'copy' && action !== 'cut') {\n throw new Error('Invalid \"action\" value, use either \"copy\" or \"cut\"');\n } // Sets the `target` property using an element that will be have its content copied.\n\n if (target !== undefined) {\n if (target && _typeof(target) === 'object' && target.nodeType === 1) {\n if (action === 'copy' && target.hasAttribute('disabled')) {\n throw new Error('Invalid \"target\" attribute. Please use \"readonly\" instead of \"disabled\" attribute');\n }\n if (action === 'cut' && (target.hasAttribute('readonly') || target.hasAttribute('disabled'))) {\n throw new Error('Invalid \"target\" attribute. You can\\'t cut text from elements with \"readonly\" or \"disabled\" attributes');\n }\n } else {\n throw new Error('Invalid \"target\" value, use a valid Element');\n }\n } // Define selection strategy based on `text` property.\n\n if (text) {\n return actions_copy(text, {\n container: container\n });\n } // Defines which selection strategy based on `target` property.\n\n if (target) {\n return action === 'cut' ? actions_cut(target) : actions_copy(target, {\n container: container\n });\n }\n };\n\n /* harmony default export */\n var actions_default = ClipboardActionDefault;\n ; // CONCATENATED MODULE: ./src/clipboard.js\n function clipboard_typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n clipboard_typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n clipboard_typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n return clipboard_typeof(obj);\n }\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n }\n function _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n }\n function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n }\n function _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n return _possibleConstructorReturn(this, result);\n };\n }\n function _possibleConstructorReturn(self, call) {\n if (call && (clipboard_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n return _assertThisInitialized(self);\n }\n function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return self;\n }\n function _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n }\n function _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n }\n\n /**\n * Helper function to retrieve attribute value.\n * @param {String} suffix\n * @param {Element} element\n */\n\n function getAttributeValue(suffix, element) {\n var attribute = \"data-clipboard-\".concat(suffix);\n if (!element.hasAttribute(attribute)) {\n return;\n }\n return element.getAttribute(attribute);\n }\n /**\n * Base class which takes one or more elements, adds event listeners to them,\n * and instantiates a new `ClipboardAction` on each click.\n */\n\n var Clipboard = /*#__PURE__*/function (_Emitter) {\n _inherits(Clipboard, _Emitter);\n var _super = _createSuper(Clipboard);\n\n /**\n * @param {String|HTMLElement|HTMLCollection|NodeList} trigger\n * @param {Object} options\n */\n function Clipboard(trigger, options) {\n var _this;\n _classCallCheck(this, Clipboard);\n _this = _super.call(this);\n _this.resolveOptions(options);\n _this.listenClick(trigger);\n return _this;\n }\n /**\n * Defines if attributes would be resolved using internal setter functions\n * or custom functions that were passed in the constructor.\n * @param {Object} options\n */\n\n _createClass(Clipboard, [{\n key: \"resolveOptions\",\n value: function resolveOptions() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n this.action = typeof options.action === 'function' ? options.action : this.defaultAction;\n this.target = typeof options.target === 'function' ? options.target : this.defaultTarget;\n this.text = typeof options.text === 'function' ? options.text : this.defaultText;\n this.container = clipboard_typeof(options.container) === 'object' ? options.container : document.body;\n }\n /**\n * Adds a click event listener to the passed trigger.\n * @param {String|HTMLElement|HTMLCollection|NodeList} trigger\n */\n }, {\n key: \"listenClick\",\n value: function listenClick(trigger) {\n var _this2 = this;\n this.listener = listen_default()(trigger, 'click', function (e) {\n return _this2.onClick(e);\n });\n }\n /**\n * Defines a new `ClipboardAction` on each click event.\n * @param {Event} e\n */\n }, {\n key: \"onClick\",\n value: function onClick(e) {\n var trigger = e.delegateTarget || e.currentTarget;\n var action = this.action(trigger) || 'copy';\n var text = actions_default({\n action: action,\n container: this.container,\n target: this.target(trigger),\n text: this.text(trigger)\n }); // Fires an event based on the copy operation result.\n\n this.emit(text ? 'success' : 'error', {\n action: action,\n text: text,\n trigger: trigger,\n clearSelection: function clearSelection() {\n if (trigger) {\n trigger.focus();\n }\n window.getSelection().removeAllRanges();\n }\n });\n }\n /**\n * Default `action` lookup function.\n * @param {Element} trigger\n */\n }, {\n key: \"defaultAction\",\n value: function defaultAction(trigger) {\n return getAttributeValue('action', trigger);\n }\n /**\n * Default `target` lookup function.\n * @param {Element} trigger\n */\n }, {\n key: \"defaultTarget\",\n value: function defaultTarget(trigger) {\n var selector = getAttributeValue('target', trigger);\n if (selector) {\n return document.querySelector(selector);\n }\n }\n /**\n * Allow fire programmatically a copy action\n * @param {String|HTMLElement} target\n * @param {Object} options\n * @returns Text copied.\n */\n }, {\n key: \"defaultText\",\n /**\n * Default `text` lookup function.\n * @param {Element} trigger\n */\n value: function defaultText(trigger) {\n return getAttributeValue('text', trigger);\n }\n /**\n * Destroy lifecycle.\n */\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.listener.destroy();\n }\n }], [{\n key: \"copy\",\n value: function copy(target) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {\n container: document.body\n };\n return actions_copy(target, options);\n }\n /**\n * Allow fire programmatically a cut action\n * @param {String|HTMLElement} target\n * @returns Text cutted.\n */\n }, {\n key: \"cut\",\n value: function cut(target) {\n return actions_cut(target);\n }\n /**\n * Returns the support of the given action, or all actions if no action is\n * given.\n * @param {String} [action]\n */\n }, {\n key: \"isSupported\",\n value: function isSupported() {\n var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ['copy', 'cut'];\n var actions = typeof action === 'string' ? [action] : action;\n var support = !!document.queryCommandSupported;\n actions.forEach(function (action) {\n support = support && !!document.queryCommandSupported(action);\n });\n return support;\n }\n }]);\n return Clipboard;\n }(tiny_emitter_default());\n\n /* harmony default export */\n var clipboard = Clipboard;\n\n /***/\n }),\n /***/828: ( /***/function _(module) {\n var DOCUMENT_NODE_TYPE = 9;\n\n /**\n * A polyfill for Element.matches()\n */\n if (typeof Element !== 'undefined' && !Element.prototype.matches) {\n var proto = Element.prototype;\n proto.matches = proto.matchesSelector || proto.mozMatchesSelector || proto.msMatchesSelector || proto.oMatchesSelector || proto.webkitMatchesSelector;\n }\n\n /**\n * Finds the closest parent that matches a selector.\n *\n * @param {Element} element\n * @param {String} selector\n * @return {Function}\n */\n function closest(element, selector) {\n while (element && element.nodeType !== DOCUMENT_NODE_TYPE) {\n if (typeof element.matches === 'function' && element.matches(selector)) {\n return element;\n }\n element = element.parentNode;\n }\n }\n module.exports = closest;\n\n /***/\n }),\n /***/438: ( /***/function _(module, __unused_webpack_exports, __webpack_require__) {\n var closest = __webpack_require__(828);\n\n /**\n * Delegates event to a selector.\n *\n * @param {Element} element\n * @param {String} selector\n * @param {String} type\n * @param {Function} callback\n * @param {Boolean} useCapture\n * @return {Object}\n */\n function _delegate(element, selector, type, callback, useCapture) {\n var listenerFn = listener.apply(this, arguments);\n element.addEventListener(type, listenerFn, useCapture);\n return {\n destroy: function destroy() {\n element.removeEventListener(type, listenerFn, useCapture);\n }\n };\n }\n\n /**\n * Delegates event to a selector.\n *\n * @param {Element|String|Array} [elements]\n * @param {String} selector\n * @param {String} type\n * @param {Function} callback\n * @param {Boolean} useCapture\n * @return {Object}\n */\n function delegate(elements, selector, type, callback, useCapture) {\n // Handle the regular Element usage\n if (typeof elements.addEventListener === 'function') {\n return _delegate.apply(null, arguments);\n }\n\n // Handle Element-less usage, it defaults to global delegation\n if (typeof type === 'function') {\n // Use `document` as the first parameter, then apply arguments\n // This is a short way to .unshift `arguments` without running into deoptimizations\n return _delegate.bind(null, document).apply(null, arguments);\n }\n\n // Handle Selector-based usage\n if (typeof elements === 'string') {\n elements = document.querySelectorAll(elements);\n }\n\n // Handle Array-like based usage\n return Array.prototype.map.call(elements, function (element) {\n return _delegate(element, selector, type, callback, useCapture);\n });\n }\n\n /**\n * Finds closest match and invokes callback.\n *\n * @param {Element} element\n * @param {String} selector\n * @param {String} type\n * @param {Function} callback\n * @return {Function}\n */\n function listener(element, selector, type, callback) {\n return function (e) {\n e.delegateTarget = closest(e.target, selector);\n if (e.delegateTarget) {\n callback.call(element, e);\n }\n };\n }\n module.exports = delegate;\n\n /***/\n }),\n /***/879: ( /***/function _(__unused_webpack_module, exports) {\n /**\n * Check if argument is a HTML element.\n *\n * @param {Object} value\n * @return {Boolean}\n */\n exports.node = function (value) {\n return value !== undefined && value instanceof HTMLElement && value.nodeType === 1;\n };\n\n /**\n * Check if argument is a list of HTML elements.\n *\n * @param {Object} value\n * @return {Boolean}\n */\n exports.nodeList = function (value) {\n var type = Object.prototype.toString.call(value);\n return value !== undefined && (type === '[object NodeList]' || type === '[object HTMLCollection]') && 'length' in value && (value.length === 0 || exports.node(value[0]));\n };\n\n /**\n * Check if argument is a string.\n *\n * @param {Object} value\n * @return {Boolean}\n */\n exports.string = function (value) {\n return typeof value === 'string' || value instanceof String;\n };\n\n /**\n * Check if argument is a function.\n *\n * @param {Object} value\n * @return {Boolean}\n */\n exports.fn = function (value) {\n var type = Object.prototype.toString.call(value);\n return type === '[object Function]';\n };\n\n /***/\n }),\n /***/370: ( /***/function _(module, __unused_webpack_exports, __webpack_require__) {\n var is = __webpack_require__(879);\n var delegate = __webpack_require__(438);\n\n /**\n * Validates all params and calls the right\n * listener function based on its target type.\n *\n * @param {String|HTMLElement|HTMLCollection|NodeList} target\n * @param {String} type\n * @param {Function} callback\n * @return {Object}\n */\n function listen(target, type, callback) {\n if (!target && !type && !callback) {\n throw new Error('Missing required arguments');\n }\n if (!is.string(type)) {\n throw new TypeError('Second argument must be a String');\n }\n if (!is.fn(callback)) {\n throw new TypeError('Third argument must be a Function');\n }\n if (is.node(target)) {\n return listenNode(target, type, callback);\n } else if (is.nodeList(target)) {\n return listenNodeList(target, type, callback);\n } else if (is.string(target)) {\n return listenSelector(target, type, callback);\n } else {\n throw new TypeError('First argument must be a String, HTMLElement, HTMLCollection, or NodeList');\n }\n }\n\n /**\n * Adds an event listener to a HTML element\n * and returns a remove listener function.\n *\n * @param {HTMLElement} node\n * @param {String} type\n * @param {Function} callback\n * @return {Object}\n */\n function listenNode(node, type, callback) {\n node.addEventListener(type, callback);\n return {\n destroy: function destroy() {\n node.removeEventListener(type, callback);\n }\n };\n }\n\n /**\n * Add an event listener to a list of HTML elements\n * and returns a remove listener function.\n *\n * @param {NodeList|HTMLCollection} nodeList\n * @param {String} type\n * @param {Function} callback\n * @return {Object}\n */\n function listenNodeList(nodeList, type, callback) {\n Array.prototype.forEach.call(nodeList, function (node) {\n node.addEventListener(type, callback);\n });\n return {\n destroy: function destroy() {\n Array.prototype.forEach.call(nodeList, function (node) {\n node.removeEventListener(type, callback);\n });\n }\n };\n }\n\n /**\n * Add an event listener to a selector\n * and returns a remove listener function.\n *\n * @param {String} selector\n * @param {String} type\n * @param {Function} callback\n * @return {Object}\n */\n function listenSelector(selector, type, callback) {\n return delegate(document.body, selector, type, callback);\n }\n module.exports = listen;\n\n /***/\n }),\n /***/817: ( /***/function _(module) {\n function select(element) {\n var selectedText;\n if (element.nodeName === 'SELECT') {\n element.focus();\n selectedText = element.value;\n } else if (element.nodeName === 'INPUT' || element.nodeName === 'TEXTAREA') {\n var isReadOnly = element.hasAttribute('readonly');\n if (!isReadOnly) {\n element.setAttribute('readonly', '');\n }\n element.select();\n element.setSelectionRange(0, element.value.length);\n if (!isReadOnly) {\n element.removeAttribute('readonly');\n }\n selectedText = element.value;\n } else {\n if (element.hasAttribute('contenteditable')) {\n element.focus();\n }\n var selection = window.getSelection();\n var range = document.createRange();\n range.selectNodeContents(element);\n selection.removeAllRanges();\n selection.addRange(range);\n selectedText = selection.toString();\n }\n return selectedText;\n }\n module.exports = select;\n\n /***/\n }),\n /***/279: ( /***/function _(module) {\n function E() {\n // Keep this empty so it's easier to inherit from\n // (via https://github.com/lipsmack from https://github.com/scottcorgan/tiny-emitter/issues/3)\n }\n E.prototype = {\n on: function on(name, callback, ctx) {\n var e = this.e || (this.e = {});\n (e[name] || (e[name] = [])).push({\n fn: callback,\n ctx: ctx\n });\n return this;\n },\n once: function once(name, callback, ctx) {\n var self = this;\n function listener() {\n self.off(name, listener);\n callback.apply(ctx, arguments);\n }\n ;\n listener._ = callback;\n return this.on(name, listener, ctx);\n },\n emit: function emit(name) {\n var data = [].slice.call(arguments, 1);\n var evtArr = ((this.e || (this.e = {}))[name] || []).slice();\n var i = 0;\n var len = evtArr.length;\n for (i; i < len; i++) {\n evtArr[i].fn.apply(evtArr[i].ctx, data);\n }\n return this;\n },\n off: function off(name, callback) {\n var e = this.e || (this.e = {});\n var evts = e[name];\n var liveEvents = [];\n if (evts && callback) {\n for (var i = 0, len = evts.length; i < len; i++) {\n if (evts[i].fn !== callback && evts[i].fn._ !== callback) liveEvents.push(evts[i]);\n }\n }\n\n // Remove event from queue to prevent memory leak\n // Suggested by https://github.com/lazd\n // Ref: https://github.com/scottcorgan/tiny-emitter/commit/c6ebfaa9bc973b33d110a84a307742b7cf94c953#commitcomment-5024910\n\n liveEvents.length ? e[name] = liveEvents : delete e[name];\n return this;\n }\n };\n module.exports = E;\n module.exports.TinyEmitter = E;\n\n /***/\n })\n\n /******/\n };\n /************************************************************************/\n /******/ // The module cache\n /******/\n var __webpack_module_cache__ = {};\n /******/\n /******/ // The require function\n /******/\n function __webpack_require__(moduleId) {\n /******/ // Check if module is in cache\n /******/if (__webpack_module_cache__[moduleId]) {\n /******/return __webpack_module_cache__[moduleId].exports;\n /******/\n }\n /******/ // Create a new module (and put it into the cache)\n /******/\n var module = __webpack_module_cache__[moduleId] = {\n /******/ // no module.id needed\n /******/ // no module.loaded needed\n /******/exports: {}\n /******/\n };\n /******/\n /******/ // Execute the module function\n /******/\n __webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n /******/\n /******/ // Return the exports of the module\n /******/\n return module.exports;\n /******/\n }\n /******/\n /************************************************************************/\n /******/ /* webpack/runtime/compat get default export */\n /******/\n !function () {\n /******/ // getDefaultExport function for compatibility with non-harmony modules\n /******/__webpack_require__.n = function (module) {\n /******/var getter = module && module.__esModule ? /******/function () {\n return module['default'];\n } : /******/function () {\n return module;\n };\n /******/\n __webpack_require__.d(getter, {\n a: getter\n });\n /******/\n return getter;\n /******/\n };\n /******/\n }();\n /******/\n /******/ /* webpack/runtime/define property getters */\n /******/\n !function () {\n /******/ // define getter functions for harmony exports\n /******/__webpack_require__.d = function (exports, definition) {\n /******/for (var key in definition) {\n /******/if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n /******/Object.defineProperty(exports, key, {\n enumerable: true,\n get: definition[key]\n });\n /******/\n }\n /******/\n }\n /******/\n };\n /******/\n }();\n /******/\n /******/ /* webpack/runtime/hasOwnProperty shorthand */\n /******/\n !function () {\n /******/__webpack_require__.o = function (obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n };\n /******/\n }();\n /******/\n /************************************************************************/\n /******/ // module exports must be returned from runtime so entry inlining is disabled\n /******/ // startup\n /******/ // Load entry module and return exports\n /******/\n return __webpack_require__(686);\n /******/\n }().default;\n});","map":{"version":3,"names":["webpackUniversalModuleDefinition","root","factory","exports","module","define","amd","__webpack_modules__","_","__unused_webpack_module","__webpack_exports__","__webpack_require__","d","_default","clipboard","tiny_emitter","tiny_emitter_default","n","listen","listen_default","src_select","select_default","command","type","document","execCommand","err","ClipboardActionCut","target","selectedText","actions_cut","createFakeElement","value","isRTL","documentElement","getAttribute","fakeElement","createElement","style","fontSize","border","padding","margin","position","yPosition","window","pageYOffset","scrollTop","top","concat","setAttribute","fakeCopyAction","options","container","appendChild","remove","ClipboardActionCopy","arguments","length","undefined","body","HTMLInputElement","includes","actions_copy","_typeof","obj","Symbol","iterator","constructor","prototype","ClipboardActionDefault","_options$action","action","text","Error","nodeType","hasAttribute","actions_default","clipboard_typeof","_classCallCheck","instance","Constructor","TypeError","_defineProperties","props","i","descriptor","enumerable","configurable","writable","Object","defineProperty","key","_createClass","protoProps","staticProps","_inherits","subClass","superClass","create","_setPrototypeOf","o","p","setPrototypeOf","__proto__","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf","result","NewTarget","Reflect","construct","apply","_possibleConstructorReturn","self","call","_assertThisInitialized","ReferenceError","sham","Proxy","Date","toString","e","getPrototypeOf","getAttributeValue","suffix","element","attribute","Clipboard","_Emitter","_super","trigger","_this","resolveOptions","listenClick","defaultAction","defaultTarget","defaultText","_this2","listener","onClick","delegateTarget","currentTarget","emit","clearSelection","focus","getSelection","removeAllRanges","selector","querySelector","destroy","copy","cut","isSupported","actions","support","queryCommandSupported","forEach","DOCUMENT_NODE_TYPE","Element","matches","proto","matchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector","webkitMatchesSelector","closest","parentNode","__unused_webpack_exports","_delegate","callback","useCapture","listenerFn","addEventListener","removeEventListener","delegate","elements","bind","querySelectorAll","Array","map","node","HTMLElement","nodeList","string","String","fn","is","listenNode","listenNodeList","listenSelector","select","nodeName","isReadOnly","setSelectionRange","removeAttribute","selection","range","createRange","selectNodeContents","addRange","E","on","name","ctx","push","once","off","data","slice","evtArr","len","evts","liveEvents","TinyEmitter","__webpack_module_cache__","moduleId","getter","__esModule","a","definition","get","prop","hasOwnProperty","default"],"sources":["/home/runner/work/inference/inference/xinference/ui/web/ui/node_modules/clipboard/dist/clipboard.js"],"sourcesContent":["/*!\n * clipboard.js v2.0.11\n * https://clipboardjs.com/\n *\n * Licensed MIT © Zeno Rocha\n */\n(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ClipboardJS\"] = factory();\n\telse\n\t\troot[\"ClipboardJS\"] = factory();\n})(this, function() {\nreturn /******/ (function() { // webpackBootstrap\n/******/ \tvar __webpack_modules__ = ({\n\n/***/ 686:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, {\n \"default\": function() { return /* binding */ clipboard; }\n});\n\n// EXTERNAL MODULE: ./node_modules/tiny-emitter/index.js\nvar tiny_emitter = __webpack_require__(279);\nvar tiny_emitter_default = /*#__PURE__*/__webpack_require__.n(tiny_emitter);\n// EXTERNAL MODULE: ./node_modules/good-listener/src/listen.js\nvar listen = __webpack_require__(370);\nvar listen_default = /*#__PURE__*/__webpack_require__.n(listen);\n// EXTERNAL MODULE: ./node_modules/select/src/select.js\nvar src_select = __webpack_require__(817);\nvar select_default = /*#__PURE__*/__webpack_require__.n(src_select);\n;// CONCATENATED MODULE: ./src/common/command.js\n/**\n * Executes a given operation type.\n * @param {String} type\n * @return {Boolean}\n */\nfunction command(type) {\n try {\n return document.execCommand(type);\n } catch (err) {\n return false;\n }\n}\n;// CONCATENATED MODULE: ./src/actions/cut.js\n\n\n/**\n * Cut action wrapper.\n * @param {String|HTMLElement} target\n * @return {String}\n */\n\nvar ClipboardActionCut = function ClipboardActionCut(target) {\n var selectedText = select_default()(target);\n command('cut');\n return selectedText;\n};\n\n/* harmony default export */ var actions_cut = (ClipboardActionCut);\n;// CONCATENATED MODULE: ./src/common/create-fake-element.js\n/**\n * Creates a fake textarea element with a value.\n * @param {String} value\n * @return {HTMLElement}\n */\nfunction createFakeElement(value) {\n var isRTL = document.documentElement.getAttribute('dir') === 'rtl';\n var fakeElement = document.createElement('textarea'); // Prevent zooming on iOS\n\n fakeElement.style.fontSize = '12pt'; // Reset box model\n\n fakeElement.style.border = '0';\n fakeElement.style.padding = '0';\n fakeElement.style.margin = '0'; // Move element out of screen horizontally\n\n fakeElement.style.position = 'absolute';\n fakeElement.style[isRTL ? 'right' : 'left'] = '-9999px'; // Move element to the same position vertically\n\n var yPosition = window.pageYOffset || document.documentElement.scrollTop;\n fakeElement.style.top = \"\".concat(yPosition, \"px\");\n fakeElement.setAttribute('readonly', '');\n fakeElement.value = value;\n return fakeElement;\n}\n;// CONCATENATED MODULE: ./src/actions/copy.js\n\n\n\n/**\n * Create fake copy action wrapper using a fake element.\n * @param {String} target\n * @param {Object} options\n * @return {String}\n */\n\nvar fakeCopyAction = function fakeCopyAction(value, options) {\n var fakeElement = createFakeElement(value);\n options.container.appendChild(fakeElement);\n var selectedText = select_default()(fakeElement);\n command('copy');\n fakeElement.remove();\n return selectedText;\n};\n/**\n * Copy action wrapper.\n * @param {String|HTMLElement} target\n * @param {Object} options\n * @return {String}\n */\n\n\nvar ClipboardActionCopy = function ClipboardActionCopy(target) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {\n container: document.body\n };\n var selectedText = '';\n\n if (typeof target === 'string') {\n selectedText = fakeCopyAction(target, options);\n } else if (target instanceof HTMLInputElement && !['text', 'search', 'url', 'tel', 'password'].includes(target === null || target === void 0 ? void 0 : target.type)) {\n // If input type doesn't support `setSelectionRange`. Simulate it. https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange\n selectedText = fakeCopyAction(target.value, options);\n } else {\n selectedText = select_default()(target);\n command('copy');\n }\n\n return selectedText;\n};\n\n/* harmony default export */ var actions_copy = (ClipboardActionCopy);\n;// CONCATENATED MODULE: ./src/actions/default.js\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n\n\n/**\n * Inner function which performs selection from either `text` or `target`\n * properties and then executes copy or cut operations.\n * @param {Object} options\n */\n\nvar ClipboardActionDefault = function ClipboardActionDefault() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n // Defines base properties passed from constructor.\n var _options$action = options.action,\n action = _options$action === void 0 ? 'copy' : _options$action,\n container = options.container,\n target = options.target,\n text = options.text; // Sets the `action` to be performed which can be either 'copy' or 'cut'.\n\n if (action !== 'copy' && action !== 'cut') {\n throw new Error('Invalid \"action\" value, use either \"copy\" or \"cut\"');\n } // Sets the `target` property using an element that will be have its content copied.\n\n\n if (target !== undefined) {\n if (target && _typeof(target) === 'object' && target.nodeType === 1) {\n if (action === 'copy' && target.hasAttribute('disabled')) {\n throw new Error('Invalid \"target\" attribute. Please use \"readonly\" instead of \"disabled\" attribute');\n }\n\n if (action === 'cut' && (target.hasAttribute('readonly') || target.hasAttribute('disabled'))) {\n throw new Error('Invalid \"target\" attribute. You can\\'t cut text from elements with \"readonly\" or \"disabled\" attributes');\n }\n } else {\n throw new Error('Invalid \"target\" value, use a valid Element');\n }\n } // Define selection strategy based on `text` property.\n\n\n if (text) {\n return actions_copy(text, {\n container: container\n });\n } // Defines which selection strategy based on `target` property.\n\n\n if (target) {\n return action === 'cut' ? actions_cut(target) : actions_copy(target, {\n container: container\n });\n }\n};\n\n/* harmony default export */ var actions_default = (ClipboardActionDefault);\n;// CONCATENATED MODULE: ./src/clipboard.js\nfunction clipboard_typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { clipboard_typeof = function _typeof(obj) { return typeof obj; }; } else { clipboard_typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return clipboard_typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (clipboard_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n\n\n\n\n\n/**\n * Helper function to retrieve attribute value.\n * @param {String} suffix\n * @param {Element} element\n */\n\nfunction getAttributeValue(suffix, element) {\n var attribute = \"data-clipboard-\".concat(suffix);\n\n if (!element.hasAttribute(attribute)) {\n return;\n }\n\n return element.getAttribute(attribute);\n}\n/**\n * Base class which takes one or more elements, adds event listeners to them,\n * and instantiates a new `ClipboardAction` on each click.\n */\n\n\nvar Clipboard = /*#__PURE__*/function (_Emitter) {\n _inherits(Clipboard, _Emitter);\n\n var _super = _createSuper(Clipboard);\n\n /**\n * @param {String|HTMLElement|HTMLCollection|NodeList} trigger\n * @param {Object} options\n */\n function Clipboard(trigger, options) {\n var _this;\n\n _classCallCheck(this, Clipboard);\n\n _this = _super.call(this);\n\n _this.resolveOptions(options);\n\n _this.listenClick(trigger);\n\n return _this;\n }\n /**\n * Defines if attributes would be resolved using internal setter functions\n * or custom functions that were passed in the constructor.\n * @param {Object} options\n */\n\n\n _createClass(Clipboard, [{\n key: \"resolveOptions\",\n value: function resolveOptions() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n this.action = typeof options.action === 'function' ? options.action : this.defaultAction;\n this.target = typeof options.target === 'function' ? options.target : this.defaultTarget;\n this.text = typeof options.text === 'function' ? options.text : this.defaultText;\n this.container = clipboard_typeof(options.container) === 'object' ? options.container : document.body;\n }\n /**\n * Adds a click event listener to the passed trigger.\n * @param {String|HTMLElement|HTMLCollection|NodeList} trigger\n */\n\n }, {\n key: \"listenClick\",\n value: function listenClick(trigger) {\n var _this2 = this;\n\n this.listener = listen_default()(trigger, 'click', function (e) {\n return _this2.onClick(e);\n });\n }\n /**\n * Defines a new `ClipboardAction` on each click event.\n * @param {Event} e\n */\n\n }, {\n key: \"onClick\",\n value: function onClick(e) {\n var trigger = e.delegateTarget || e.currentTarget;\n var action = this.action(trigger) || 'copy';\n var text = actions_default({\n action: action,\n container: this.container,\n target: this.target(trigger),\n text: this.text(trigger)\n }); // Fires an event based on the copy operation result.\n\n this.emit(text ? 'success' : 'error', {\n action: action,\n text: text,\n trigger: trigger,\n clearSelection: function clearSelection() {\n if (trigger) {\n trigger.focus();\n }\n\n window.getSelection().removeAllRanges();\n }\n });\n }\n /**\n * Default `action` lookup function.\n * @param {Element} trigger\n */\n\n }, {\n key: \"defaultAction\",\n value: function defaultAction(trigger) {\n return getAttributeValue('action', trigger);\n }\n /**\n * Default `target` lookup function.\n * @param {Element} trigger\n */\n\n }, {\n key: \"defaultTarget\",\n value: function defaultTarget(trigger) {\n var selector = getAttributeValue('target', trigger);\n\n if (selector) {\n return document.querySelector(selector);\n }\n }\n /**\n * Allow fire programmatically a copy action\n * @param {String|HTMLElement} target\n * @param {Object} options\n * @returns Text copied.\n */\n\n }, {\n key: \"defaultText\",\n\n /**\n * Default `text` lookup function.\n * @param {Element} trigger\n */\n value: function defaultText(trigger) {\n return getAttributeValue('text', trigger);\n }\n /**\n * Destroy lifecycle.\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.listener.destroy();\n }\n }], [{\n key: \"copy\",\n value: function copy(target) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {\n container: document.body\n };\n return actions_copy(target, options);\n }\n /**\n * Allow fire programmatically a cut action\n * @param {String|HTMLElement} target\n * @returns Text cutted.\n */\n\n }, {\n key: \"cut\",\n value: function cut(target) {\n return actions_cut(target);\n }\n /**\n * Returns the support of the given action, or all actions if no action is\n * given.\n * @param {String} [action]\n */\n\n }, {\n key: \"isSupported\",\n value: function isSupported() {\n var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ['copy', 'cut'];\n var actions = typeof action === 'string' ? [action] : action;\n var support = !!document.queryCommandSupported;\n actions.forEach(function (action) {\n support = support && !!document.queryCommandSupported(action);\n });\n return support;\n }\n }]);\n\n return Clipboard;\n}((tiny_emitter_default()));\n\n/* harmony default export */ var clipboard = (Clipboard);\n\n/***/ }),\n\n/***/ 828:\n/***/ (function(module) {\n\nvar DOCUMENT_NODE_TYPE = 9;\n\n/**\n * A polyfill for Element.matches()\n */\nif (typeof Element !== 'undefined' && !Element.prototype.matches) {\n var proto = Element.prototype;\n\n proto.matches = proto.matchesSelector ||\n proto.mozMatchesSelector ||\n proto.msMatchesSelector ||\n proto.oMatchesSelector ||\n proto.webkitMatchesSelector;\n}\n\n/**\n * Finds the closest parent that matches a selector.\n *\n * @param {Element} element\n * @param {String} selector\n * @return {Function}\n */\nfunction closest (element, selector) {\n while (element && element.nodeType !== DOCUMENT_NODE_TYPE) {\n if (typeof element.matches === 'function' &&\n element.matches(selector)) {\n return element;\n }\n element = element.parentNode;\n }\n}\n\nmodule.exports = closest;\n\n\n/***/ }),\n\n/***/ 438:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar closest = __webpack_require__(828);\n\n/**\n * Delegates event to a selector.\n *\n * @param {Element} element\n * @param {String} selector\n * @param {String} type\n * @param {Function} callback\n * @param {Boolean} useCapture\n * @return {Object}\n */\nfunction _delegate(element, selector, type, callback, useCapture) {\n var listenerFn = listener.apply(this, arguments);\n\n element.addEventListener(type, listenerFn, useCapture);\n\n return {\n destroy: function() {\n element.removeEventListener(type, listenerFn, useCapture);\n }\n }\n}\n\n/**\n * Delegates event to a selector.\n *\n * @param {Element|String|Array} [elements]\n * @param {String} selector\n * @param {String} type\n * @param {Function} callback\n * @param {Boolean} useCapture\n * @return {Object}\n */\nfunction delegate(elements, selector, type, callback, useCapture) {\n // Handle the regular Element usage\n if (typeof elements.addEventListener === 'function') {\n return _delegate.apply(null, arguments);\n }\n\n // Handle Element-less usage, it defaults to global delegation\n if (typeof type === 'function') {\n // Use `document` as the first parameter, then apply arguments\n // This is a short way to .unshift `arguments` without running into deoptimizations\n return _delegate.bind(null, document).apply(null, arguments);\n }\n\n // Handle Selector-based usage\n if (typeof elements === 'string') {\n elements = document.querySelectorAll(elements);\n }\n\n // Handle Array-like based usage\n return Array.prototype.map.call(elements, function (element) {\n return _delegate(element, selector, type, callback, useCapture);\n });\n}\n\n/**\n * Finds closest match and invokes callback.\n *\n * @param {Element} element\n * @param {String} selector\n * @param {String} type\n * @param {Function} callback\n * @return {Function}\n */\nfunction listener(element, selector, type, callback) {\n return function(e) {\n e.delegateTarget = closest(e.target, selector);\n\n if (e.delegateTarget) {\n callback.call(element, e);\n }\n }\n}\n\nmodule.exports = delegate;\n\n\n/***/ }),\n\n/***/ 879:\n/***/ (function(__unused_webpack_module, exports) {\n\n/**\n * Check if argument is a HTML element.\n *\n * @param {Object} value\n * @return {Boolean}\n */\nexports.node = function(value) {\n return value !== undefined\n && value instanceof HTMLElement\n && value.nodeType === 1;\n};\n\n/**\n * Check if argument is a list of HTML elements.\n *\n * @param {Object} value\n * @return {Boolean}\n */\nexports.nodeList = function(value) {\n var type = Object.prototype.toString.call(value);\n\n return value !== undefined\n && (type === '[object NodeList]' || type === '[object HTMLCollection]')\n && ('length' in value)\n && (value.length === 0 || exports.node(value[0]));\n};\n\n/**\n * Check if argument is a string.\n *\n * @param {Object} value\n * @return {Boolean}\n */\nexports.string = function(value) {\n return typeof value === 'string'\n || value instanceof String;\n};\n\n/**\n * Check if argument is a function.\n *\n * @param {Object} value\n * @return {Boolean}\n */\nexports.fn = function(value) {\n var type = Object.prototype.toString.call(value);\n\n return type === '[object Function]';\n};\n\n\n/***/ }),\n\n/***/ 370:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar is = __webpack_require__(879);\nvar delegate = __webpack_require__(438);\n\n/**\n * Validates all params and calls the right\n * listener function based on its target type.\n *\n * @param {String|HTMLElement|HTMLCollection|NodeList} target\n * @param {String} type\n * @param {Function} callback\n * @return {Object}\n */\nfunction listen(target, type, callback) {\n if (!target && !type && !callback) {\n throw new Error('Missing required arguments');\n }\n\n if (!is.string(type)) {\n throw new TypeError('Second argument must be a String');\n }\n\n if (!is.fn(callback)) {\n throw new TypeError('Third argument must be a Function');\n }\n\n if (is.node(target)) {\n return listenNode(target, type, callback);\n }\n else if (is.nodeList(target)) {\n return listenNodeList(target, type, callback);\n }\n else if (is.string(target)) {\n return listenSelector(target, type, callback);\n }\n else {\n throw new TypeError('First argument must be a String, HTMLElement, HTMLCollection, or NodeList');\n }\n}\n\n/**\n * Adds an event listener to a HTML element\n * and returns a remove listener function.\n *\n * @param {HTMLElement} node\n * @param {String} type\n * @param {Function} callback\n * @return {Object}\n */\nfunction listenNode(node, type, callback) {\n node.addEventListener(type, callback);\n\n return {\n destroy: function() {\n node.removeEventListener(type, callback);\n }\n }\n}\n\n/**\n * Add an event listener to a list of HTML elements\n * and returns a remove listener function.\n *\n * @param {NodeList|HTMLCollection} nodeList\n * @param {String} type\n * @param {Function} callback\n * @return {Object}\n */\nfunction listenNodeList(nodeList, type, callback) {\n Array.prototype.forEach.call(nodeList, function(node) {\n node.addEventListener(type, callback);\n });\n\n return {\n destroy: function() {\n Array.prototype.forEach.call(nodeList, function(node) {\n node.removeEventListener(type, callback);\n });\n }\n }\n}\n\n/**\n * Add an event listener to a selector\n * and returns a remove listener function.\n *\n * @param {String} selector\n * @param {String} type\n * @param {Function} callback\n * @return {Object}\n */\nfunction listenSelector(selector, type, callback) {\n return delegate(document.body, selector, type, callback);\n}\n\nmodule.exports = listen;\n\n\n/***/ }),\n\n/***/ 817:\n/***/ (function(module) {\n\nfunction select(element) {\n var selectedText;\n\n if (element.nodeName === 'SELECT') {\n element.focus();\n\n selectedText = element.value;\n }\n else if (element.nodeName === 'INPUT' || element.nodeName === 'TEXTAREA') {\n var isReadOnly = element.hasAttribute('readonly');\n\n if (!isReadOnly) {\n element.setAttribute('readonly', '');\n }\n\n element.select();\n element.setSelectionRange(0, element.value.length);\n\n if (!isReadOnly) {\n element.removeAttribute('readonly');\n }\n\n selectedText = element.value;\n }\n else {\n if (element.hasAttribute('contenteditable')) {\n element.focus();\n }\n\n var selection = window.getSelection();\n var range = document.createRange();\n\n range.selectNodeContents(element);\n selection.removeAllRanges();\n selection.addRange(range);\n\n selectedText = selection.toString();\n }\n\n return selectedText;\n}\n\nmodule.exports = select;\n\n\n/***/ }),\n\n/***/ 279:\n/***/ (function(module) {\n\nfunction E () {\n // Keep this empty so it's easier to inherit from\n // (via https://github.com/lipsmack from https://github.com/scottcorgan/tiny-emitter/issues/3)\n}\n\nE.prototype = {\n on: function (name, callback, ctx) {\n var e = this.e || (this.e = {});\n\n (e[name] || (e[name] = [])).push({\n fn: callback,\n ctx: ctx\n });\n\n return this;\n },\n\n once: function (name, callback, ctx) {\n var self = this;\n function listener () {\n self.off(name, listener);\n callback.apply(ctx, arguments);\n };\n\n listener._ = callback\n return this.on(name, listener, ctx);\n },\n\n emit: function (name) {\n var data = [].slice.call(arguments, 1);\n var evtArr = ((this.e || (this.e = {}))[name] || []).slice();\n var i = 0;\n var len = evtArr.length;\n\n for (i; i < len; i++) {\n evtArr[i].fn.apply(evtArr[i].ctx, data);\n }\n\n return this;\n },\n\n off: function (name, callback) {\n var e = this.e || (this.e = {});\n var evts = e[name];\n var liveEvents = [];\n\n if (evts && callback) {\n for (var i = 0, len = evts.length; i < len; i++) {\n if (evts[i].fn !== callback && evts[i].fn._ !== callback)\n liveEvents.push(evts[i]);\n }\n }\n\n // Remove event from queue to prevent memory leak\n // Suggested by https://github.com/lazd\n // Ref: https://github.com/scottcorgan/tiny-emitter/commit/c6ebfaa9bc973b33d110a84a307742b7cf94c953#commitcomment-5024910\n\n (liveEvents.length)\n ? e[name] = liveEvents\n : delete e[name];\n\n return this;\n }\n};\n\nmodule.exports = E;\nmodule.exports.TinyEmitter = E;\n\n\n/***/ })\n\n/******/ \t});\n/************************************************************************/\n/******/ \t// The module cache\n/******/ \tvar __webpack_module_cache__ = {};\n/******/ \t\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(__webpack_module_cache__[moduleId]) {\n/******/ \t\t\treturn __webpack_module_cache__[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = __webpack_module_cache__[moduleId] = {\n/******/ \t\t\t// no module.id needed\n/******/ \t\t\t// no module.loaded needed\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/ \t\n/******/ \t\t// Execute the module function\n/******/ \t\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n/******/ \t\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/ \t\n/************************************************************************/\n/******/ \t/* webpack/runtime/compat get default export */\n/******/ \t!function() {\n/******/ \t\t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t\t__webpack_require__.n = function(module) {\n/******/ \t\t\tvar getter = module && module.__esModule ?\n/******/ \t\t\t\tfunction() { return module['default']; } :\n/******/ \t\t\t\tfunction() { return module; };\n/******/ \t\t\t__webpack_require__.d(getter, { a: getter });\n/******/ \t\t\treturn getter;\n/******/ \t\t};\n/******/ \t}();\n/******/ \t\n/******/ \t/* webpack/runtime/define property getters */\n/******/ \t!function() {\n/******/ \t\t// define getter functions for harmony exports\n/******/ \t\t__webpack_require__.d = function(exports, definition) {\n/******/ \t\t\tfor(var key in definition) {\n/******/ \t\t\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n/******/ \t\t\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n/******/ \t\t\t\t}\n/******/ \t\t\t}\n/******/ \t\t};\n/******/ \t}();\n/******/ \t\n/******/ \t/* webpack/runtime/hasOwnProperty shorthand */\n/******/ \t!function() {\n/******/ \t\t__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }\n/******/ \t}();\n/******/ \t\n/************************************************************************/\n/******/ \t// module exports must be returned from runtime so entry inlining is disabled\n/******/ \t// startup\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(686);\n/******/ })()\n.default;\n});"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,SAASA,gCAAgCA,CAACC,IAAI,EAAEC,OAAO,EAAE;EACzD,IAAG,OAAOC,OAAO,KAAK,QAAQ,IAAI,OAAOC,MAAM,KAAK,QAAQ,EAC3DA,MAAM,CAACD,OAAO,GAAGD,OAAO,CAAC,CAAC,CAAC,KACvB,IAAG,OAAOG,MAAM,KAAK,UAAU,IAAIA,MAAM,CAACC,GAAG,EACjDD,MAAM,CAAC,EAAE,EAAEH,OAAO,CAAC,CAAC,KAChB,IAAG,OAAOC,OAAO,KAAK,QAAQ,EAClCA,OAAO,CAAC,aAAa,CAAC,GAAGD,OAAO,CAAC,CAAC,CAAC,KAEnCD,IAAI,CAAC,aAAa,CAAC,GAAGC,OAAO,CAAC,CAAC;AACjC,CAAC,EAAE,IAAI,EAAE,YAAW;EACpB,OAAO,QAAU,YAAW;IAAE;IAC9B;IAAU,IAAIK,mBAAmB,GAAI;MAErC,KAAM,GAAG,IACT,KAAO,SAAAC,EAASC,uBAAuB,EAAEC,mBAAmB,EAAEC,mBAAmB,EAAE;QAEnF,YAAY;;QAEZ;QACAA,mBAAmB,CAACC,CAAC,CAACF,mBAAmB,EAAE;UACzC,SAAS,EAAE,SAAAG,SAAA,EAAW;YAAE,OAAO,aAAcC,SAAS;UAAE;QAC1D,CAAC,CAAC;;QAEF;QACA,IAAIC,YAAY,GAAGJ,mBAAmB,CAAC,GAAG,CAAC;QAC3C,IAAI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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"ast":null,"code":"import _objectSpread from\"/home/runner/work/inference/inference/xinference/ui/web/ui/node_modules/@babel/runtime/helpers/esm/objectSpread2.js\";import _toConsumableArray from\"/home/runner/work/inference/inference/xinference/ui/web/ui/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\";import _slicedToArray from\"/home/runner/work/inference/inference/xinference/ui/web/ui/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";import{Box,Button,ButtonGroup,Chip,FormControl,InputLabel,MenuItem,Select}from'@mui/material';import React,{useContext,useEffect,useState}from'react';import{useCookies}from'react-cookie';import{useTranslation}from'react-i18next';import{ApiContext}from'../../components/apiContext';import fetchWrapper from'../../components/fetchWrapper';import HotkeyFocusTextField from'../../components/hotkeyFocusTextField';import ModelCard from'./modelCard';import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";var LaunchModelComponent=function LaunchModelComponent(_ref){var modelType=_ref.modelType,gpuAvailable=_ref.gpuAvailable,featureModels=_ref.featureModels;var _useContext=useContext(ApiContext),isCallingApi=_useContext.isCallingApi,setIsCallingApi=_useContext.setIsCallingApi,endPoint=_useContext.endPoint;var _useContext2=useContext(ApiContext),isUpdatingModel=_useContext2.isUpdatingModel;var _useContext3=useContext(ApiContext),setErrorMsg=_useContext3.setErrorMsg;var _useCookies=useCookies(['token']),_useCookies2=_slicedToArray(_useCookies,1),cookie=_useCookies2[0];var _useState=useState([]),_useState2=_slicedToArray(_useState,2),registrationData=_useState2[0],setRegistrationData=_useState2[1];// States used for filtering\nvar _useState3=useState(''),_useState4=_slicedToArray(_useState3,2),searchTerm=_useState4[0],setSearchTerm=_useState4[1];var _useState5=useState(''),_useState6=_slicedToArray(_useState5,2),status=_useState6[0],setStatus=_useState6[1];var _useState7=useState([]),_useState8=_slicedToArray(_useState7,2),statusArr=_useState8[0],setStatusArr=_useState8[1];var _useState9=useState([]),_useState10=_slicedToArray(_useState9,2),completeDeleteArr=_useState10[0],setCompleteDeleteArr=_useState10[1];var _useState11=useState([]),_useState12=_slicedToArray(_useState11,2),collectionArr=_useState12[0],setCollectionArr=_useState12[1];var _useState13=useState([]),_useState14=_slicedToArray(_useState13,2),filterArr=_useState14[0],setFilterArr=_useState14[1];var _useTranslation=useTranslation(),t=_useTranslation.t;var _useState15=useState('featured'),_useState16=_slicedToArray(_useState15,2),modelListType=_useState16[0],setModelListType=_useState16[1];var _useState17=useState({type:modelType,modelAbility:'',options:[]}),_useState18=_slicedToArray(_useState17,2),modelAbilityData=_useState18[0],setModelAbilityData=_useState18[1];var filter=function filter(registration){if(searchTerm!==''){if(!registration||typeof searchTerm!=='string')return false;var modelName=registration.model_name?registration.model_name.toLowerCase():'';var modelDescription=registration.model_description?registration.model_description.toLowerCase():'';if(!modelName.includes(searchTerm.toLowerCase())&&!modelDescription.includes(searchTerm.toLowerCase())){return false;}}if(modelListType==='featured'){if(featureModels.length&&!featureModels.includes(registration.model_name)&&!(collectionArr!==null&&collectionArr!==void 0&&collectionArr.includes(registration.model_name))){return false;}}if(modelAbilityData.modelAbility&&(Array.isArray(registration.model_ability)&®istration.model_ability.indexOf(modelAbilityData.modelAbility)<0||typeof registration.model_ability==='string'&®istration.model_ability!==modelAbilityData.modelAbility))return false;if(completeDeleteArr.includes(registration.model_name)){var _registration$model_s;(_registration$model_s=registration.model_specs)===null||_registration$model_s===void 0?void 0:_registration$model_s.forEach(function(item){item.cache_status=Array.isArray(item)?[false]:false;});}if(statusArr.length===1){if(statusArr[0]==='cached'){var _registration$model_s2;var judge=((_registration$model_s2=registration.model_specs)===null||_registration$model_s2===void 0?void 0:_registration$model_s2.some(function(spec){return filterCache(spec);}))||(registration===null||registration===void 0?void 0:registration.cache_status);return judge&&!completeDeleteArr.includes(registration.model_name);}else{return collectionArr===null||collectionArr===void 0?void 0:collectionArr.includes(registration.model_name);}}else if(statusArr.length>1){var _registration$model_s3;var _judge=((_registration$model_s3=registration.model_specs)===null||_registration$model_s3===void 0?void 0:_registration$model_s3.some(function(spec){return filterCache(spec);}))||(registration===null||registration===void 0?void 0:registration.cache_status);return _judge&&!completeDeleteArr.includes(registration.model_name)&&(collectionArr===null||collectionArr===void 0?void 0:collectionArr.includes(registration.model_name));}return true;};var filterCache=function filterCache(spec){if(Array.isArray(spec.cache_status)){var _spec$cache_status;return(_spec$cache_status=spec.cache_status)===null||_spec$cache_status===void 0?void 0:_spec$cache_status.some(function(cs){return cs;});}else{return spec.cache_status===true;}};var handleCompleteDelete=function handleCompleteDelete(model_name){setCompleteDeleteArr([].concat(_toConsumableArray(completeDeleteArr),[model_name]));};function getUniqueModelAbilities(arr){var uniqueAbilities=new Set();arr.forEach(function(item){if(Array.isArray(item.model_ability)){item.model_ability.forEach(function(ability){uniqueAbilities.add(ability);});}});return Array.from(uniqueAbilities);}var update=function update(){if(isCallingApi||isUpdatingModel||cookie.token!=='no_auth'&&!sessionStorage.getItem('token'))return;try{setIsCallingApi(true);fetchWrapper.get(\"/v1/model_registrations/\".concat(modelType,\"?detailed=true\")).then(function(data){var builtinRegistrations=data.filter(function(v){return v.is_builtin;});setModelAbilityData(_objectSpread(_objectSpread({},modelAbilityData),{},{options:getUniqueModelAbilities(builtinRegistrations)}));setRegistrationData(builtinRegistrations);var collectionData=JSON.parse(localStorage.getItem('collectionArr'));setCollectionArr(collectionData);}).catch(function(error){console.error('Error:',error);if(error.response.status!==403&&error.response.status!==401){setErrorMsg(error.message);}});}catch(error){console.error('Error:',error);}finally{setIsCallingApi(false);}};useEffect(function(){update();},[cookie.token]);var getCollectionArr=function getCollectionArr(data){setCollectionArr(data);};var handleChangeFilter=function handleChangeFilter(type,value){var typeMap={modelAbility:{setter:function setter(value){setModelAbilityData(_objectSpread(_objectSpread({},modelAbilityData),{},{modelAbility:value}));},filterArr:modelAbilityData.options},status:{setter:setStatus,filterArr:[]}};var _ref2=typeMap[type]||{},setter=_ref2.setter,excludeArr=_ref2.filterArr;if(!setter)return;setter(value);var updatedFilterArr=[].concat(_toConsumableArray(filterArr.filter(function(item){return!excludeArr.includes(item);})),[value]);setFilterArr(updatedFilterArr);if(type==='status'){setStatusArr(updatedFilterArr.filter(function(item){return!_toConsumableArray(modelAbilityData.options).includes(item);}));}};var handleDeleteChip=function handleDeleteChip(item){setFilterArr(filterArr.filter(function(subItem){return subItem!==item;}));if(item===modelAbilityData.modelAbility){setModelAbilityData(_objectSpread(_objectSpread({},modelAbilityData),{},{modelAbility:''}));}else{setStatusArr(statusArr.filter(function(subItem){return subItem!==item;}));if(item===status)setStatus('');}};var handleModelType=function handleModelType(newModelType){if(newModelType!==null){setModelListType(newModelType);}};function getLabel(item){var translation=t(\"launchModel.\".concat(item));return translation===\"launchModel.\".concat(item)?item:translation;}return/*#__PURE__*/_jsxs(Box,{m:\"20px\",children:[/*#__PURE__*/_jsxs(\"div\",{style:{display:'grid',gridTemplateColumns:function(){var hasAbility=modelAbilityData.options.length>0;var hasFeature=featureModels.length>0;var baseColumns=hasAbility?['200px','150px']:['200px'];var altColumns=hasAbility?['150px','150px']:['150px'];var columns=hasFeature?[].concat(baseColumns,['150px','1fr']):[].concat(altColumns,['1fr']);return columns.join(' ');}(),columnGap:'20px',margin:'30px 2rem',alignItems:'center'},children:[featureModels.length>0&&/*#__PURE__*/_jsx(FormControl,{sx:{minWidth:120},size:\"small\",children:/*#__PURE__*/_jsxs(ButtonGroup,{children:[/*#__PURE__*/_jsx(Button,{fullWidth:true,onClick:function onClick(){return handleModelType('featured');},variant:modelListType==='featured'?'contained':'outlined',children:t('launchModel.featured')}),/*#__PURE__*/_jsx(Button,{fullWidth:true,onClick:function onClick(){return handleModelType('all');},variant:modelListType==='all'?'contained':'outlined',children:t('launchModel.all')})]})}),modelAbilityData.options.length>0&&/*#__PURE__*/_jsxs(FormControl,{sx:{minWidth:120},size:\"small\",children:[/*#__PURE__*/_jsx(InputLabel,{id:\"ability-select-label\",children:t('launchModel.modelAbility')}),/*#__PURE__*/_jsx(Select,{id:\"ability\",labelId:\"ability-select-label\",label:\"Model Ability\",onChange:function onChange(e){return handleChangeFilter('modelAbility',e.target.value);},value:modelAbilityData.modelAbility,size:\"small\",sx:{width:'150px'},children:modelAbilityData.options.map(function(item){return/*#__PURE__*/_jsx(MenuItem,{value:item,children:getLabel(item)},item);})})]}),/*#__PURE__*/_jsxs(FormControl,{sx:{minWidth:120},size:\"small\",children:[/*#__PURE__*/_jsx(InputLabel,{id:\"select-status\",children:t('launchModel.status')}),/*#__PURE__*/_jsxs(Select,{id:\"status\",labelId:\"select-status\",label:t('launchModel.status'),onChange:function onChange(e){return handleChangeFilter('status',e.target.value);},value:status,size:\"small\",sx:{width:'150px'},children:[/*#__PURE__*/_jsx(MenuItem,{value:\"cached\",children:t('launchModel.cached')}),/*#__PURE__*/_jsx(MenuItem,{value:\"favorite\",children:t('launchModel.favorite')})]})]}),/*#__PURE__*/_jsx(FormControl,{sx:{marginTop:1},variant:\"outlined\",margin:\"normal\",children:/*#__PURE__*/_jsx(HotkeyFocusTextField,{id:\"search\",type:\"search\",label:t('launchModel.search'),value:searchTerm,onChange:function onChange(e){return setSearchTerm(e.target.value);},size:\"small\",hotkey:\"Enter\",t:t})})]}),/*#__PURE__*/_jsx(\"div\",{style:{margin:'0 0 30px 30px'},children:filterArr.map(function(item,index){return/*#__PURE__*/_jsx(Chip,{label:getLabel(item),variant:\"outlined\",size:\"small\",color:\"primary\",style:{marginRight:10},onDelete:function onDelete(){return handleDeleteChip(item);}},index);})}),/*#__PURE__*/_jsx(\"div\",{style:{display:'grid',gridTemplateColumns:'repeat(auto-fill, minmax(300px, 1fr))',paddingLeft:'2rem',gridGap:'2rem 0rem'},children:registrationData.filter(function(registration){return filter(registration);}).sort(function(a,b){if(modelListType==='featured'){var indexA=featureModels.indexOf(a.model_name);var indexB=featureModels.indexOf(b.model_name);return(indexA!==-1?indexA:Infinity)-(indexB!==-1?indexB:Infinity);}return 0;}).map(function(filteredRegistration){return/*#__PURE__*/_jsx(ModelCard,{url:endPoint,modelData:filteredRegistration,gpuAvailable:gpuAvailable,modelType:modelType,onHandleCompleteDelete:handleCompleteDelete,onGetCollectionArr:getCollectionArr},filteredRegistration.model_name);})})]});};export default LaunchModelComponent;","map":{"version":3,"names":["Box","Button","ButtonGroup","Chip","FormControl","InputLabel","MenuItem","Select","React","useContext","useEffect","useState","useCookies","useTranslation","ApiContext","fetchWrapper","HotkeyFocusTextField","ModelCard","jsx","_jsx","jsxs","_jsxs","LaunchModelComponent","_ref","modelType","gpuAvailable","featureModels","_useContext","isCallingApi","setIsCallingApi","endPoint","_useContext2","isUpdatingModel","_useContext3","setErrorMsg","_useCookies","_useCookies2","_slicedToArray","cookie","_useState","_useState2","registrationData","setRegistrationData","_useState3","_useState4","searchTerm","setSearchTerm","_useState5","_useState6","status","setStatus","_useState7","_useState8","statusArr","setStatusArr","_useState9","_useState10","completeDeleteArr","setCompleteDeleteArr","_useState11","_useState12","collectionArr","setCollectionArr","_useState13","_useState14","filterArr","setFilterArr","_useTranslation","t","_useState15","_useState16","modelListType","setModelListType","_useState17","type","modelAbility","options","_useState18","modelAbilityData","setModelAbilityData","filter","registration","modelName","model_name","toLowerCase","modelDescription","model_description","includes","length","Array","isArray","model_ability","indexOf","_registration$model_s","model_specs","forEach","item","cache_status","_registration$model_s2","judge","some","spec","filterCache","_registration$model_s3","_spec$cache_status","cs","handleCompleteDelete","concat","_toConsumableArray","getUniqueModelAbilities","arr","uniqueAbilities","Set","ability","add","from","update","token","sessionStorage","getItem","get","then","data","builtinRegistrations","v","is_builtin","_objectSpread","collectionData","JSON","parse","localStorage","catch","error","console","response","message","getCollectionArr","handleChangeFilter","value","typeMap","setter","_ref2","excludeArr","updatedFilterArr","handleDeleteChip","subItem","handleModelType","newModelType","getLabel","translation","m","children","style","display","gridTemplateColumns","hasAbility","hasFeature","baseColumns","altColumns","columns","join","columnGap","margin","alignItems","sx","minWidth","size","fullWidth","onClick","variant","id","labelId","label","onChange","e","target","width","map","marginTop","hotkey","index","color","marginRight","onDelete","paddingLeft","gridGap","sort","a","b","indexA","indexB","Infinity","filteredRegistration","url","modelData","onHandleCompleteDelete","onGetCollectionArr"],"sources":["/home/runner/work/inference/inference/xinference/ui/web/ui/src/scenes/launch_model/LaunchModel.js"],"sourcesContent":["import {\n Box,\n Button,\n ButtonGroup,\n Chip,\n FormControl,\n InputLabel,\n MenuItem,\n Select,\n} from '@mui/material'\nimport React, { useContext, useEffect, useState } from 'react'\nimport { useCookies } from 'react-cookie'\nimport { useTranslation } from 'react-i18next'\n\nimport { ApiContext } from '../../components/apiContext'\nimport fetchWrapper from '../../components/fetchWrapper'\nimport HotkeyFocusTextField from '../../components/hotkeyFocusTextField'\nimport ModelCard from './modelCard'\n\nconst LaunchModelComponent = ({ modelType, gpuAvailable, featureModels }) => {\n const { isCallingApi, setIsCallingApi, endPoint } = useContext(ApiContext)\n const { isUpdatingModel } = useContext(ApiContext)\n const { setErrorMsg } = useContext(ApiContext)\n const [cookie] = useCookies(['token'])\n\n const [registrationData, setRegistrationData] = useState([])\n // States used for filtering\n const [searchTerm, setSearchTerm] = useState('')\n const [status, setStatus] = useState('')\n const [statusArr, setStatusArr] = useState([])\n const [completeDeleteArr, setCompleteDeleteArr] = useState([])\n const [collectionArr, setCollectionArr] = useState([])\n const [filterArr, setFilterArr] = useState([])\n const { t } = useTranslation()\n const [modelListType, setModelListType] = useState('featured')\n const [modelAbilityData, setModelAbilityData] = useState({\n type: modelType,\n modelAbility: '',\n options: [],\n })\n\n const filter = (registration) => {\n if (searchTerm !== '') {\n if (!registration || typeof searchTerm !== 'string') return false\n const modelName = registration.model_name\n ? registration.model_name.toLowerCase()\n : ''\n const modelDescription = registration.model_description\n ? registration.model_description.toLowerCase()\n : ''\n\n if (\n !modelName.includes(searchTerm.toLowerCase()) &&\n !modelDescription.includes(searchTerm.toLowerCase())\n ) {\n return false\n }\n }\n\n if (modelListType === 'featured') {\n if (\n featureModels.length &&\n !featureModels.includes(registration.model_name) &&\n !collectionArr?.includes(registration.model_name)\n ) {\n return false\n }\n }\n\n if (\n modelAbilityData.modelAbility &&\n ((Array.isArray(registration.model_ability) &&\n registration.model_ability.indexOf(modelAbilityData.modelAbility) <\n 0) ||\n (typeof registration.model_ability === 'string' &&\n registration.model_ability !== modelAbilityData.modelAbility))\n )\n return false\n\n if (completeDeleteArr.includes(registration.model_name)) {\n registration.model_specs?.forEach((item) => {\n item.cache_status = Array.isArray(item) ? [false] : false\n })\n }\n\n if (statusArr.length === 1) {\n if (statusArr[0] === 'cached') {\n const judge =\n registration.model_specs?.some((spec) => filterCache(spec)) ||\n registration?.cache_status\n return judge && !completeDeleteArr.includes(registration.model_name)\n } else {\n return collectionArr?.includes(registration.model_name)\n }\n } else if (statusArr.length > 1) {\n const judge =\n registration.model_specs?.some((spec) => filterCache(spec)) ||\n registration?.cache_status\n return (\n judge &&\n !completeDeleteArr.includes(registration.model_name) &&\n collectionArr?.includes(registration.model_name)\n )\n }\n\n return true\n }\n\n const filterCache = (spec) => {\n if (Array.isArray(spec.cache_status)) {\n return spec.cache_status?.some((cs) => cs)\n } else {\n return spec.cache_status === true\n }\n }\n\n const handleCompleteDelete = (model_name) => {\n setCompleteDeleteArr([...completeDeleteArr, model_name])\n }\n\n function getUniqueModelAbilities(arr) {\n const uniqueAbilities = new Set()\n\n arr.forEach((item) => {\n if (Array.isArray(item.model_ability)) {\n item.model_ability.forEach((ability) => {\n uniqueAbilities.add(ability)\n })\n }\n })\n\n return Array.from(uniqueAbilities)\n }\n\n const update = () => {\n if (\n isCallingApi ||\n isUpdatingModel ||\n (cookie.token !== 'no_auth' && !sessionStorage.getItem('token'))\n )\n return\n\n try {\n setIsCallingApi(true)\n\n fetchWrapper\n .get(`/v1/model_registrations/${modelType}?detailed=true`)\n .then((data) => {\n const builtinRegistrations = data.filter((v) => v.is_builtin)\n setModelAbilityData({\n ...modelAbilityData,\n options: getUniqueModelAbilities(builtinRegistrations),\n })\n setRegistrationData(builtinRegistrations)\n const collectionData = JSON.parse(\n localStorage.getItem('collectionArr')\n )\n setCollectionArr(collectionData)\n })\n .catch((error) => {\n console.error('Error:', error)\n if (error.response.status !== 403 && error.response.status !== 401) {\n setErrorMsg(error.message)\n }\n })\n } catch (error) {\n console.error('Error:', error)\n } finally {\n setIsCallingApi(false)\n }\n }\n\n useEffect(() => {\n update()\n }, [cookie.token])\n\n const getCollectionArr = (data) => {\n setCollectionArr(data)\n }\n\n const handleChangeFilter = (type, value) => {\n const typeMap = {\n modelAbility: {\n setter: (value) => {\n setModelAbilityData({\n ...modelAbilityData,\n modelAbility: value,\n })\n },\n filterArr: modelAbilityData.options,\n },\n status: { setter: setStatus, filterArr: [] },\n }\n\n const { setter, filterArr: excludeArr } = typeMap[type] || {}\n if (!setter) return\n\n setter(value)\n\n const updatedFilterArr = [\n ...filterArr.filter((item) => !excludeArr.includes(item)),\n value,\n ]\n\n setFilterArr(updatedFilterArr)\n\n if (type === 'status') {\n setStatusArr(\n updatedFilterArr.filter(\n (item) => ![...modelAbilityData.options].includes(item)\n )\n )\n }\n }\n\n const handleDeleteChip = (item) => {\n setFilterArr(\n filterArr.filter((subItem) => {\n return subItem !== item\n })\n )\n if (item === modelAbilityData.modelAbility) {\n setModelAbilityData({\n ...modelAbilityData,\n modelAbility: '',\n })\n } else {\n setStatusArr(\n statusArr.filter((subItem) => {\n return subItem !== item\n })\n )\n if (item === status) setStatus('')\n }\n }\n\n const handleModelType = (newModelType) => {\n if (newModelType !== null) {\n setModelListType(newModelType)\n }\n }\n\n function getLabel(item) {\n const translation = t(`launchModel.${item}`)\n return translation === `launchModel.${item}` ? item : translation\n }\n\n return (\n <Box m=\"20px\">\n <div\n style={{\n display: 'grid',\n gridTemplateColumns: (() => {\n const hasAbility = modelAbilityData.options.length > 0\n const hasFeature = featureModels.length > 0\n\n const baseColumns = hasAbility ? ['200px', '150px'] : ['200px']\n const altColumns = hasAbility ? ['150px', '150px'] : ['150px']\n\n const columns = hasFeature\n ? [...baseColumns, '150px', '1fr']\n : [...altColumns, '1fr']\n\n return columns.join(' ')\n })(),\n columnGap: '20px',\n margin: '30px 2rem',\n alignItems: 'center',\n }}\n >\n {featureModels.length > 0 && (\n <FormControl sx={{ minWidth: 120 }} size=\"small\">\n <ButtonGroup>\n <Button\n fullWidth\n onClick={() => handleModelType('featured')}\n variant={\n modelListType === 'featured' ? 'contained' : 'outlined'\n }\n >\n {t('launchModel.featured')}\n </Button>\n <Button\n fullWidth\n onClick={() => handleModelType('all')}\n variant={modelListType === 'all' ? 'contained' : 'outlined'}\n >\n {t('launchModel.all')}\n </Button>\n </ButtonGroup>\n </FormControl>\n )}\n {modelAbilityData.options.length > 0 && (\n <FormControl sx={{ minWidth: 120 }} size=\"small\">\n <InputLabel id=\"ability-select-label\">\n {t('launchModel.modelAbility')}\n </InputLabel>\n <Select\n id=\"ability\"\n labelId=\"ability-select-label\"\n label=\"Model Ability\"\n onChange={(e) =>\n handleChangeFilter('modelAbility', e.target.value)\n }\n value={modelAbilityData.modelAbility}\n size=\"small\"\n sx={{ width: '150px' }}\n >\n {modelAbilityData.options.map((item) => (\n <MenuItem key={item} value={item}>\n {getLabel(item)}\n </MenuItem>\n ))}\n </Select>\n </FormControl>\n )}\n <FormControl sx={{ minWidth: 120 }} size=\"small\">\n <InputLabel id=\"select-status\">{t('launchModel.status')}</InputLabel>\n <Select\n id=\"status\"\n labelId=\"select-status\"\n label={t('launchModel.status')}\n onChange={(e) => handleChangeFilter('status', e.target.value)}\n value={status}\n size=\"small\"\n sx={{ width: '150px' }}\n >\n <MenuItem value=\"cached\">{t('launchModel.cached')}</MenuItem>\n <MenuItem value=\"favorite\">{t('launchModel.favorite')}</MenuItem>\n </Select>\n </FormControl>\n\n <FormControl sx={{ marginTop: 1 }} variant=\"outlined\" margin=\"normal\">\n <HotkeyFocusTextField\n id=\"search\"\n type=\"search\"\n label={t('launchModel.search')}\n value={searchTerm}\n onChange={(e) => setSearchTerm(e.target.value)}\n size=\"small\"\n hotkey=\"Enter\"\n t={t}\n />\n </FormControl>\n </div>\n <div style={{ margin: '0 0 30px 30px' }}>\n {filterArr.map((item, index) => (\n <Chip\n key={index}\n label={getLabel(item)}\n variant=\"outlined\"\n size=\"small\"\n color=\"primary\"\n style={{ marginRight: 10 }}\n onDelete={() => handleDeleteChip(item)}\n />\n ))}\n </div>\n <div\n style={{\n display: 'grid',\n gridTemplateColumns: 'repeat(auto-fill, minmax(300px, 1fr))',\n paddingLeft: '2rem',\n gridGap: '2rem 0rem',\n }}\n >\n {registrationData\n .filter((registration) => filter(registration))\n .sort((a, b) => {\n if (modelListType === 'featured') {\n const indexA = featureModels.indexOf(a.model_name)\n const indexB = featureModels.indexOf(b.model_name)\n return (\n (indexA !== -1 ? indexA : Infinity) -\n (indexB !== -1 ? indexB : Infinity)\n )\n }\n return 0\n })\n .map((filteredRegistration) => (\n <ModelCard\n key={filteredRegistration.model_name}\n url={endPoint}\n modelData={filteredRegistration}\n gpuAvailable={gpuAvailable}\n modelType={modelType}\n onHandleCompleteDelete={handleCompleteDelete}\n onGetCollectionArr={getCollectionArr}\n />\n ))}\n </div>\n </Box>\n )\n}\n\nexport default LaunchModelComponent\n"],"mappings":"ubAAA,OACEA,GAAG,CACHC,MAAM,CACNC,WAAW,CACXC,IAAI,CACJC,WAAW,CACXC,UAAU,CACVC,QAAQ,CACRC,MAAM,KACD,eAAe,CACtB,MAAO,CAAAC,KAAK,EAAIC,UAAU,CAAEC,SAAS,CAAEC,QAAQ,KAAQ,OAAO,CAC9D,OAASC,UAAU,KAAQ,cAAc,CACzC,OAASC,cAAc,KAAQ,eAAe,CAE9C,OAASC,UAAU,KAAQ,6BAA6B,CACxD,MAAO,CAAAC,YAAY,KAAM,+BAA+B,CACxD,MAAO,CAAAC,oBAAoB,KAAM,uCAAuC,CACxE,MAAO,CAAAC,SAAS,KAAM,aAAa,QAAAC,GAAA,IAAAC,IAAA,gCAAAC,IAAA,IAAAC,KAAA,yBAEnC,GAAM,CAAAC,oBAAoB,CAAG,QAAvB,CAAAA,oBAAoBA,CAAAC,IA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,KAAK,CAAE,CACLC,OAAO,CAAE,MAAM,CACfC,mBAAmB,CAAE,uCAAuC,CAC5D8B,WAAW,CAAE,MAAM,CACnBC,OAAO,CAAE,WACX,CAAE,CAAAlC,QAAA,CAED9G,gBAAgB,CACduC,MAAM,CAAC,SAACC,YAAY,QAAK,CAAAD,MAAM,CAACC,YAAY,CAAC,GAAC,CAC9CyG,IAAI,CAAC,SAACC,CAAC,CAAEC,CAAC,CAAK,CACd,GAAIrH,aAAa,GAAK,UAAU,CAAE,CAChC,GAAM,CAAAsH,MAAM,CAAGnK,aAAa,CAACkE,OAAO,CAAC+F,CAAC,CAACxG,UAAU,CAAC,CAClD,GAAM,CAAA2G,MAAM,CAAGpK,aAAa,CAACkE,OAAO,CAACgG,CAAC,CAACzG,UAAU,CAAC,CAClD,MACE,CAAC0G,MAAM,GAAK,CAAC,CAAC,CAAGA,MAAM,CAAGE,QAAQ,GACjCD,MAAM,GAAK,CAAC,CAAC,CAAGA,MAAM,CAAGC,QAAQ,CAAC,CAEvC,CACA,MAAO,EAAC,CACV,CAAC,CAAC,CACDd,GAAG,CAAC,SAACe,oBAAoB,qBACxB7K,IAAA,CAACF,SAAS,EAERgL,GAAG,CAAEnK,QAAS,CACdoK,SAAS,CAAEF,oBAAqB,CAChCvK,YAAY,CAAEA,YAAa,CAC3BD,SAAS,CAAEA,SAAU,CACrB2K,sBAAsB,CAAEzF,oBAAqB,CAC7C0F,kBAAkB,CAAE5D,gBAAiB,EANhCwD,oBAAoB,CAAC7G,UAO3B,CAAC,EACH,CAAC,CACD,CAAC,EACH,CAAC,CAEV,CAAC,CAED,cAAe,CAAA7D,oBAAoB","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"ast":null,"code":"import _toConsumableArray from\"/home/runner/work/inference/inference/xinference/ui/web/ui/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\";import _objectSpread from\"/home/runner/work/inference/inference/xinference/ui/web/ui/node_modules/@babel/runtime/helpers/esm/objectSpread2.js\";import _defineProperty from\"/home/runner/work/inference/inference/xinference/ui/web/ui/node_modules/@babel/runtime/helpers/esm/defineProperty.js\";import _slicedToArray from\"/home/runner/work/inference/inference/xinference/ui/web/ui/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";import{AddCircle}from'@mui/icons-material';import DeleteIcon from'@mui/icons-material/Delete';import{Alert,Autocomplete,Box,IconButton,Snackbar,TextField}from'@mui/material';import React,{useEffect,useState}from'react';import{useTranslation}from'react-i18next';import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";var AddPair=function AddPair(_ref){var customData=_ref.customData,pairData=_ref.pairData,_ref$tipOptions=_ref.tipOptions,tipOptions=_ref$tipOptions===void 0?[]:_ref$tipOptions,onGetArr=_ref.onGetArr,onJudgeArr=_ref.onJudgeArr;var _useState=useState(false),_useState2=_slicedToArray(_useState,2),openSnackbar=_useState2[0],setOpenSnackbar=_useState2[1];var _useState3=useState([]),_useState4=_slicedToArray(_useState3,2),arr=_useState4[0],setArr=_useState4[1];var _useState5=useState(0),_useState6=_slicedToArray(_useState5,2),arrId=_useState6[0],setArrId=_useState6[1];var _useState7=useState(-1),_useState8=_slicedToArray(_useState7,2),defaultIndex=_useState8[0],setDefaultIndex=_useState8[1];var _useState9=useState(false),_useState10=_slicedToArray(_useState9,2),isNotUniqueKey=_useState10[0],setIsNotUniqueKey=_useState10[1];var _useTranslation=useTranslation(),t=_useTranslation.t;useEffect(function(){onGetArr(arr);},[arr]);useEffect(function(){if(!Array.isArray(pairData))return;var dataArr=[];pairData.forEach(function(item,index){var _dataArr$push;dataArr.push((_dataArr$push={id:index},_defineProperty(_dataArr$push,customData.key,item[customData.key]),_defineProperty(_dataArr$push,customData.value,item[customData.value]),_dataArr$push));});setArrId(pairData.length);setArr(dataArr);},[pairData]);var updateArr=function updateArr(index,type,newValue){setArr(arr.map(function(pair,subIndex){if(subIndex===index){return _objectSpread(_objectSpread({},pair),{},_defineProperty({},type,newValue));}return pair;}));if(type===customData.key){setDefaultIndex(-1);setIsNotUniqueKey(false);arr.forEach(function(pair){if(pair[customData.key]===newValue){setDefaultIndex(index);setIsNotUniqueKey(true);}});}};var handleDeleteArr=function handleDeleteArr(index){setDefaultIndex(-1);setArr(arr.filter(function(_,subIndex){return index!==subIndex;}));onGetArr(arr);};return/*#__PURE__*/_jsxs(\"div\",{children:[/*#__PURE__*/_jsxs(Box,{children:[/*#__PURE__*/_jsxs(\"div\",{style:{display:'flex',alignItems:'center',margin:'20px 0 0 15px'},children:[/*#__PURE__*/_jsx(\"div\",{children:customData.title}),/*#__PURE__*/_jsx(IconButton,{color:\"primary\",onClick:function onClick(){setArrId(arrId+1);var obj={id:arrId};obj[customData.key]='';obj[customData.value]='';onJudgeArr(arr,[customData.key,customData.value])?setArr([].concat(_toConsumableArray(arr),[obj])):setOpenSnackbar(true);},children:/*#__PURE__*/_jsx(AddCircle,{})})]}),/*#__PURE__*/_jsx(Box,{children:arr.map(function(item,index){return/*#__PURE__*/_jsxs(Box,{children:[/*#__PURE__*/_jsxs(\"div\",{style:{display:'flex',justifyContent:'space-between',alignItems:'center',marginTop:'10px',marginLeft:'10px'},children:[tipOptions.length?/*#__PURE__*/_jsx(Autocomplete,{style:{width:'44%'},disablePortal:true,options:tipOptions,groupBy:function groupBy(){return t('components.suggestsCommonParameters');},value:item[customData.key],inputValue:item[customData.key],onInputChange:function onInputChange(_,newValue){updateArr(index,customData.key,newValue);},renderInput:function renderInput(params){return/*#__PURE__*/_jsx(TextField,_objectSpread(_objectSpread({className:\"textHighlight\"},params),{},{label:customData.key}));}}):/*#__PURE__*/_jsx(TextField,{className:\"textHighlight\",label:customData.key,value:item[customData.key],onChange:function onChange(e){updateArr(index,customData.key,e.target.value);},style:{width:'44%'}}),/*#__PURE__*/_jsx(TextField,{className:\"textHighlight\",label:customData.value,value:item[customData.value],onChange:function onChange(e){updateArr(index,customData.value,e.target.value);},style:{width:'44%'}}),/*#__PURE__*/_jsx(IconButton,{\"aria-label\":\"delete\",onClick:function onClick(){return handleDeleteArr(index);},style:{marginLeft:'10px'},children:/*#__PURE__*/_jsx(DeleteIcon,{})})]}),isNotUniqueKey&&defaultIndex===index&&/*#__PURE__*/_jsxs(Alert,{severity:\"error\",children:[customData.key,\" must be unique\"]})]},item.id);})})]}),/*#__PURE__*/_jsx(Snackbar,{anchorOrigin:{vertical:'top',horizontal:'center'},open:openSnackbar,onClose:function onClose(){return setOpenSnackbar(false);},message:\"Please fill in the complete parameters before adding!!\"},'top'+'center')]});};export default AddPair;","map":{"version":3,"names":["AddCircle","DeleteIcon","Alert","Autocomplete","Box","IconButton","Snackbar","TextField","React","useEffect","useState","useTranslation","jsx","_jsx","jsxs","_jsxs","AddPair","_ref","customData","pairData","_ref$tipOptions","tipOptions","onGetArr","onJudgeArr","_useState","_useState2","_slicedToArray","openSnackbar","setOpenSnackbar","_useState3","_useState4","arr","setArr","_useState5","_useState6","arrId","setArrId","_useState7","_useState8","defaultIndex","setDefaultIndex","_useState9","_useState10","isNotUniqueKey","setIsNotUniqueKey","_useTranslation","t","Array","isArray","dataArr","forEach","item","index","_dataArr$push","push","id","_defineProperty","key","value","length","updateArr","type","newValue","map","pair","subIndex","_objectSpread","handleDeleteArr","filter","_","children","style","display","alignItems","margin","title","color","onClick","obj","concat","_toConsumableArray","justifyContent","marginTop","marginLeft","width","disablePortal","options","groupBy","inputValue","onInputChange","renderInput","params","className","label","onChange","e","target","severity","anchorOrigin","vertical","horizontal","open","onClose","message"],"sources":["/home/runner/work/inference/inference/xinference/ui/web/ui/src/scenes/launch_model/components/addPair.js"],"sourcesContent":["import { AddCircle } from '@mui/icons-material'\nimport DeleteIcon from '@mui/icons-material/Delete'\nimport {\n Alert,\n Autocomplete,\n Box,\n IconButton,\n Snackbar,\n TextField,\n} from '@mui/material'\nimport React, { useEffect, useState } from 'react'\nimport { useTranslation } from 'react-i18next'\n\nconst AddPair = ({\n customData,\n pairData,\n tipOptions = [],\n onGetArr,\n onJudgeArr,\n}) => {\n const [openSnackbar, setOpenSnackbar] = useState(false)\n const [arr, setArr] = useState([])\n const [arrId, setArrId] = useState(0)\n const [defaultIndex, setDefaultIndex] = useState(-1)\n const [isNotUniqueKey, setIsNotUniqueKey] = useState(false)\n\n const { t } = useTranslation()\n\n useEffect(() => {\n onGetArr(arr)\n }, [arr])\n\n useEffect(() => {\n if (!Array.isArray(pairData)) return\n const dataArr = []\n pairData.forEach((item, index) => {\n dataArr.push({\n id: index,\n [customData.key]: item[customData.key],\n [customData.value]: item[customData.value],\n })\n })\n setArrId(pairData.length)\n setArr(dataArr)\n }, [pairData])\n\n const updateArr = (index, type, newValue) => {\n setArr(\n arr.map((pair, subIndex) => {\n if (subIndex === index) {\n return { ...pair, [type]: newValue }\n }\n return pair\n })\n )\n if (type === customData.key) {\n setDefaultIndex(-1)\n setIsNotUniqueKey(false)\n arr.forEach((pair) => {\n if (pair[customData.key] === newValue) {\n setDefaultIndex(index)\n setIsNotUniqueKey(true)\n }\n })\n }\n }\n\n const handleDeleteArr = (index) => {\n setDefaultIndex(-1)\n setArr(\n arr.filter((_, subIndex) => {\n return index !== subIndex\n })\n )\n onGetArr(arr)\n }\n\n return (\n <div>\n <Box>\n <div\n style={{\n display: 'flex',\n alignItems: 'center',\n margin: '20px 0 0 15px',\n }}\n >\n <div>{customData.title}</div>\n <IconButton\n color=\"primary\"\n onClick={() => {\n setArrId(arrId + 1)\n let obj = { id: arrId }\n obj[customData.key] = ''\n obj[customData.value] = ''\n onJudgeArr(arr, [customData.key, customData.value])\n ? setArr([...arr, obj])\n : setOpenSnackbar(true)\n }}\n >\n <AddCircle />\n </IconButton>\n </div>\n <Box>\n {arr.map((item, index) => {\n return (\n <Box key={item.id}>\n <div\n style={{\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'center',\n marginTop: '10px',\n marginLeft: '10px',\n }}\n >\n {tipOptions.length ? (\n <Autocomplete\n style={{ width: '44%' }}\n disablePortal\n options={tipOptions}\n groupBy={() => t('components.suggestsCommonParameters')}\n value={item[customData.key]}\n inputValue={item[customData.key]}\n onInputChange={(_, newValue) => {\n updateArr(index, customData.key, newValue)\n }}\n renderInput={(params) => (\n <TextField\n className=\"textHighlight\"\n {...params}\n label={customData.key}\n />\n )}\n />\n ) : (\n <TextField\n className=\"textHighlight\"\n label={customData.key}\n value={item[customData.key]}\n onChange={(e) => {\n updateArr(index, customData.key, e.target.value)\n }}\n style={{ width: '44%' }}\n />\n )}\n <TextField\n className=\"textHighlight\"\n label={customData.value}\n value={item[customData.value]}\n onChange={(e) => {\n updateArr(index, customData.value, e.target.value)\n }}\n style={{ width: '44%' }}\n />\n <IconButton\n aria-label=\"delete\"\n onClick={() => handleDeleteArr(index)}\n style={{ marginLeft: '10px' }}\n >\n <DeleteIcon />\n </IconButton>\n </div>\n {isNotUniqueKey && defaultIndex === index && (\n <Alert severity=\"error\">\n {customData.key} must be unique\n </Alert>\n )}\n </Box>\n )\n })}\n </Box>\n </Box>\n <Snackbar\n anchorOrigin={{ vertical: 'top', horizontal: 'center' }}\n open={openSnackbar}\n onClose={() => setOpenSnackbar(false)}\n message=\"Please fill in the complete parameters before adding!!\"\n key={'top' + 'center'}\n />\n </div>\n )\n}\n\nexport default AddPair\n"],"mappings":"ykBAAA,OAASA,SAAS,KAAQ,qBAAqB,CAC/C,MAAO,CAAAC,UAAU,KAAM,4BAA4B,CACnD,OACEC,KAAK,CACLC,YAAY,CACZC,GAAG,CACHC,UAAU,CACVC,QAAQ,CACRC,SAAS,KACJ,eAAe,CACtB,MAAO,CAAAC,KAAK,EAAIC,SAAS,CAAEC,QAAQ,KAAQ,OAAO,CAClD,OAASC,cAAc,KAAQ,eAAe,QAAAC,GAAA,IAAAC,IAAA,gCAAAC,IAAA,IAAAC,KAAA,yBAE9C,GAAM,CAAAC,OAAO,CAAG,QAAV,CAAAA,OAAOA,CAAAC,IAAA,CAMP,IALJ,CAAAC,UAAU,CAAAD,IAAA,C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tC2E,OAAO,CAAC,wDAAwD,EAC3D,KAAK,CAAG,QACd,CAAC,EACC,CAAC,CAEV,CAAC,CAED,cAAe,CAAAvF,OAAO","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"ast":null,"code":"import _slicedToArray from\"/home/runner/work/inference/inference/xinference/ui/web/ui/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";import'./style.css';import FilterNoneIcon from'@mui/icons-material/FilterNone';import{Alert,Snackbar,Tooltip}from'@mui/material';import ClipboardJS from'clipboard';import React,{useState}from'react';import{useTranslation}from'react-i18next';import{jsx as _jsx}from\"react/jsx-runtime\";import{Fragment as _Fragment}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";var CopyComponent=function CopyComponent(_ref){var tip=_ref.tip,_text=_ref.text;var _useTranslation=useTranslation(),t=_useTranslation.t;var _useState=useState(false),_useState2=_slicedToArray(_useState,2),isCopySuccess=_useState2[0],setIsCopySuccess=_useState2[1];var handleCopy=function handleCopy(){var clipboard=new ClipboardJS('.copyText',{text:function text(){return _text;}});clipboard.on('success',function(e){e.clearSelection();setIsCopySuccess(true);});};return/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(Tooltip,{title:tip,placement:\"top\",children:/*#__PURE__*/_jsx(FilterNoneIcon,{className:\"copyText\",onClick:handleCopy})}),/*#__PURE__*/_jsx(Snackbar,{anchorOrigin:{vertical:'top',horizontal:'center'},open:isCopySuccess,autoHideDuration:1500,onClose:function onClose(){return setIsCopySuccess(false);},children:/*#__PURE__*/_jsx(Alert,{severity:\"success\",variant:\"filled\",sx:{width:'100%'},children:t('components.copySuccess')})})]});};export default CopyComponent;","map":{"version":3,"names":["FilterNoneIcon","Alert","Snackbar","Tooltip","ClipboardJS","React","useState","useTranslation","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","CopyComponent","_ref","tip","text","_useTranslation","t","_useState","_useState2","_slicedToArray","isCopySuccess","setIsCopySuccess","handleCopy","clipboard","on","e","clearSelection","children","title","placement","className","onClick","anchorOrigin","vertical","horizontal","open","autoHideDuration","onClose","severity","variant","sx","width"],"sources":["/home/runner/work/inference/inference/xinference/ui/web/ui/src/components/copyComponent/copyComponent.js"],"sourcesContent":["import './style.css'\n\nimport FilterNoneIcon from '@mui/icons-material/FilterNone'\nimport { Alert, Snackbar, Tooltip } from '@mui/material'\nimport ClipboardJS from 'clipboard'\nimport React, { useState } from 'react'\nimport { useTranslation } from 'react-i18next'\n\nconst CopyComponent = ({ tip, text }) => {\n const { t } = useTranslation()\n const [isCopySuccess, setIsCopySuccess] = useState(false)\n\n const handleCopy = () => {\n const clipboard = new ClipboardJS('.copyText', {\n text: () => text,\n })\n\n clipboard.on('success', (e) => {\n e.clearSelection()\n setIsCopySuccess(true)\n })\n }\n\n return (\n <>\n <Tooltip title={tip} placement=\"top\">\n <FilterNoneIcon className=\"copyText\" onClick={handleCopy} />\n </Tooltip>\n <Snackbar\n anchorOrigin={{ vertical: 'top', horizontal: 'center' }}\n open={isCopySuccess}\n autoHideDuration={1500}\n onClose={() => setIsCopySuccess(false)}\n >\n <Alert severity=\"success\" variant=\"filled\" sx={{ width: '100%' }}>\n {t('components.copySuccess')}\n </Alert>\n </Snackbar>\n </>\n )\n}\n\nexport default CopyComponent\n"],"mappings":"gJAAA,MAAO,aAAa,CAEpB,MAAO,CAAAA,cAAc,KAAM,gCAAgC,CAC3D,OAASC,KAAK,CAAEC,QAAQ,CAAEC,OAAO,KAAQ,eAAe,CACxD,MAAO,CAAAC,WAAW,KAAM,WAAW,CACnC,MAAO,CAAAC,KAAK,EAAIC,QAAQ,KAAQ,OAAO,CACvC,OAASC,cAAc,KAAQ,eAAe,QAAAC,GAAA,IAAAC,IAAA,gCAAAC,QAAA,IAAAC,SAAA,gCAAAC,IAAA,IAAAC,KAAA,yBAE9C,GAAM,CAAAC,aAAa,CAAG,QAAhB,CAAAA,aAAaA,CAAAC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,CAAC,SAAS,CAACC,OAAO,CAAC,QAAQ,CAACC,EAAE,CAAE,CAAEC,KAAK,CAAE,MAAO,CAAE,CAAAd,QAAA,CAC9DX,CAAC,CAAC,wBAAwB,CAAC,CACvB,CAAC,CACA,CAAC,EACX,CAAC,CAEP,CAAC,CAED,cAAe,CAAAL,aAAa","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"ast":null,"code":"import _toConsumableArray from\"/home/runner/work/inference/inference/xinference/ui/web/ui/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\";import _slicedToArray from\"/home/runner/work/inference/inference/xinference/ui/web/ui/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";import AddIcon from'@mui/icons-material/Add';import DeleteIcon from'@mui/icons-material/Delete';import{Button,TextField}from'@mui/material';import React,{useEffect,useState}from'react';import{useTranslation}from'react-i18next';import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";var AddVirtualenv=function AddVirtualenv(_ref){var virtualenv=_ref.virtualenv,onChangeVirtualenv=_ref.onChangeVirtualenv,scrollRef=_ref.scrollRef;var _useTranslation=useTranslation(),t=_useTranslation.t;var _useState=useState(function(){return virtualenv.packages.map(function(){return\"\".concat(Date.now(),\"-\").concat(Math.random());});}),_useState2=_slicedToArray(_useState,2),packageKeys=_useState2[0],setPackageKeys=_useState2[1];useEffect(function(){handleScrollBottom();setPackageKeys(function(prevKeys){var lengthDiff=virtualenv.packages.length-prevKeys.length;if(lengthDiff>0){return[].concat(_toConsumableArray(prevKeys),_toConsumableArray(new Array(lengthDiff).fill(0).map(function(){return\"\".concat(Date.now(),\"-\").concat(Math.random());})));}else if(lengthDiff<0){return prevKeys.slice(0,virtualenv.packages.length);}return prevKeys;});},[virtualenv.packages]);var handleScrollBottom=function handleScrollBottom(){scrollRef.current.scrollTo({top:scrollRef.current.scrollHeight,behavior:'smooth'});};return/*#__PURE__*/_jsxs(\"div\",{children:[/*#__PURE__*/_jsx(\"label\",{style:{marginBottom:'20px',marginRight:'20px'},children:t('registerModel.packages')}),/*#__PURE__*/_jsx(Button,{variant:\"contained\",size:\"small\",endIcon:/*#__PURE__*/_jsx(AddIcon,{}),onClick:function onClick(){return onChangeVirtualenv('add');},children:t('registerModel.more')}),/*#__PURE__*/_jsx(\"div\",{children:virtualenv.packages.map(function(item,index){return/*#__PURE__*/_jsxs(\"div\",{style:{display:'flex',alignItems:'center',gap:5,marginTop:'10px',marginLeft:50},children:[/*#__PURE__*/_jsx(TextField,{style:{width:'100%'},size:\"small\",value:item,onChange:function onChange(e){onChangeVirtualenv('change',index,e.target.value);}}),/*#__PURE__*/_jsx(DeleteIcon,{onClick:function onClick(){return onChangeVirtualenv('delete',index);},style:{cursor:'pointer',color:'#1976d2'}})]},packageKeys[index]);})})]});};export default AddVirtualenv;","map":{"version":3,"names":["AddIcon","DeleteIcon","Button","TextField","React","useEffect","useState","useTranslation","jsx","_jsx","jsxs","_jsxs","AddVirtualenv","_ref","virtualenv","onChangeVirtualenv","scrollRef","_useTranslation","t","_useState","packages","map","concat","Date","now","Math","random","_useState2","_slicedToArray","packageKeys","setPackageKeys","handleScrollBottom","prevKeys","lengthDiff","length","_toConsumableArray","Array","fill","slice","current","scrollTo","top","scrollHeight","behavior","children","style","marginBottom","marginRight","variant","size","endIcon","onClick","item","index","display","alignItems","gap","marginTop","marginLeft","width","value","onChange","e","target","cursor","color"],"sources":["/home/runner/work/inference/inference/xinference/ui/web/ui/src/scenes/register_model/components/addVirtualenv.js"],"sourcesContent":["import AddIcon from '@mui/icons-material/Add'\nimport DeleteIcon from '@mui/icons-material/Delete'\nimport { Button, TextField } from '@mui/material'\nimport React, { useEffect, useState } from 'react'\nimport { useTranslation } from 'react-i18next'\n\nconst AddVirtualenv = ({ virtualenv, onChangeVirtualenv, scrollRef }) => {\n const { t } = useTranslation()\n\n const [packageKeys, setPackageKeys] = useState(() =>\n virtualenv.packages.map(() => `${Date.now()}-${Math.random()}`)\n )\n\n useEffect(() => {\n handleScrollBottom()\n setPackageKeys((prevKeys) => {\n const lengthDiff = virtualenv.packages.length - prevKeys.length\n\n if (lengthDiff > 0) {\n return [\n ...prevKeys,\n ...new Array(lengthDiff)\n .fill(0)\n .map(() => `${Date.now()}-${Math.random()}`),\n ]\n } else if (lengthDiff < 0) {\n return prevKeys.slice(0, virtualenv.packages.length)\n }\n\n return prevKeys\n })\n }, [virtualenv.packages])\n\n const handleScrollBottom = () => {\n scrollRef.current.scrollTo({\n top: scrollRef.current.scrollHeight,\n behavior: 'smooth',\n })\n }\n\n return (\n <div>\n <label style={{ marginBottom: '20px', marginRight: '20px' }}>\n {t('registerModel.packages')}\n </label>\n <Button\n variant=\"contained\"\n size=\"small\"\n endIcon={<AddIcon />}\n onClick={() => onChangeVirtualenv('add')}\n >\n {t('registerModel.more')}\n </Button>\n\n <div>\n {virtualenv.packages.map((item, index) => (\n <div\n key={packageKeys[index]}\n style={{\n display: 'flex',\n alignItems: 'center',\n gap: 5,\n marginTop: '10px',\n marginLeft: 50,\n }}\n >\n <TextField\n style={{ width: '100%' }}\n size=\"small\"\n value={item}\n onChange={(e) => {\n onChangeVirtualenv('change', index, e.target.value)\n }}\n />\n <DeleteIcon\n onClick={() => onChangeVirtualenv('delete', index)}\n style={{ cursor: 'pointer', color: '#1976d2' }}\n />\n </div>\n ))}\n </div>\n </div>\n )\n}\n\nexport default AddVirtualenv\n"],"mappings":"wSAAA,MAAO,CAAAA,OAAO,KAAM,yBAAyB,CAC7C,MAAO,CAAAC,UAAU,KAAM,4BAA4B,CACnD,OAASC,MAAM,CAAEC,SAAS,KAAQ,eAAe,CACjD,MAAO,CAAAC,KAAK,EAAIC,SAAS,CAAEC,QAAQ,KAAQ,OAAO,CAClD,OAASC,cAAc,KAAQ,eAAe,QAAAC,GAAA,IAAAC,IAAA,gCAAAC,IAAA,IAAAC,KAAA,yBAE9C,GAAM,CAAAC,aAAa,CAAG,QAAhB,C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,CAAES,CAAC,CAACC,MAAM,CAACH,KAAK,CAAC,CACrD,CAAE,CACH,CAAC,cACFnD,IAAA,CAACR,UAAU,EACTkD,OAAO,CAAE,SAAAA,QAAA,QAAM,CAAApC,kBAAkB,CAAC,QAAQ,CAAEsC,KAAK,CAAC,EAAC,CACnDR,KAAK,CAAE,CAAEmB,MAAM,CAAE,SAAS,CAAEC,KAAK,CAAE,SAAU,CAAE,CAChD,CAAC,GApBGpC,WAAW,CAACwB,KAAK,CAqBnB,CAAC,EACP,CAAC,CACC,CAAC,EACH,CAAC,CAEV,CAAC,CAED,cAAe,CAAAzC,aAAa","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"ast":null,"code":"import{useTheme}from'@mui/material';import React,{useEffect}from'react';import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";var Drawer=function Drawer(_ref){var isOpen=_ref.isOpen,onClose=_ref.onClose,children=_ref.children;var theme=useTheme();useEffect(function(){if(isOpen){document.body.style.overflow='hidden';}else{document.body.style.overflow='';}return function(){document.body.style.overflow='';};},[isOpen]);return/*#__PURE__*/_jsxs(\"div\",{className:\"drawer \".concat(isOpen?'open':''),children:[/*#__PURE__*/_jsx(\"div\",{className:\"drawer-overlay\",onClick:onClose}),/*#__PURE__*/_jsx(\"div\",{className:\"drawer-content\",style:theme.palette.mode==='dark'?{backgroundColor:'#272727'}:{},children:isOpen&&children})]});};export default Drawer;","map":{"version":3,"names":["useTheme","React","useEffect","jsx","_jsx","jsxs","_jsxs","Drawer","_ref","isOpen","onClose","children","theme","document","body","style","overflow","className","concat","onClick","palette","mode","backgroundColor"],"sources":["/home/runner/work/inference/inference/xinference/ui/web/ui/src/scenes/launch_model/components/drawer.js"],"sourcesContent":["import { useTheme } from '@mui/material'\nimport React, { useEffect } from 'react'\n\nconst Drawer = ({ isOpen, onClose, children }) => {\n const theme = useTheme()\n\n useEffect(() => {\n if (isOpen) {\n document.body.style.overflow = 'hidden'\n } else {\n document.body.style.overflow = ''\n }\n\n return () => {\n document.body.style.overflow = ''\n }\n }, [isOpen])\n\n return (\n <div className={`drawer ${isOpen ? 'open' : ''}`}>\n <div className=\"drawer-overlay\" onClick={onClose}></div>\n <div\n className=\"drawer-content\"\n style={\n theme.palette.mode === 'dark' ? { backgroundColor: '#272727' } : {}\n }\n >\n {isOpen && children}\n </div>\n </div>\n )\n}\n\nexport default Drawer\n"],"mappings":"AAAA,OAASA,QAAQ,KAAQ,eAAe,CACxC,MAAO,CAAAC,KAAK,EAAIC,SAAS,KAAQ,OAAO,QAAAC,GAAA,IAAAC,IAAA,gCAAAC,IAAA,IAAAC,KAAA,yBAExC,GAAM,CAAAC,MAAM,CAAG,QAAT,CAAAA,MAAMA,CAAAC,IAAA,CAAsC,IAAhC,CAAAC,MAAM,CAAAD,IAAA,CAANC,MAAM,CAAEC,OAAO,CAAAF,IAAA,CAAPE,OAAO,CAAEC,QAAQ,CAAAH,IAAA,CAARG,QAAQ,CACzC,GAAM,CAAAC,KAAK,CAAGZ,QAAQ,CAAC,CAAC,CAExBE,SAAS,CAAC,UAAM,CACd,GAAIO,MAAM,CAAE,CACVI,QAAQ,CAACC,IAAI,CAACC,KAAK,CAACC,QAAQ,CAAG,QAAQ,CACzC,CAAC,IAAM,CACLH,QAAQ,CAACC,IAAI,CAACC,KAAK,CAACC,QAAQ,CAAG,EAAE,CACnC,CAEA,MAAO,WAAM,CACXH,QAAQ,CAACC,IAAI,CAACC,KAAK,CAACC,QAAQ,CAAG,EAAE,CACnC,CAAC,CACH,CAAC,CAAE,CAACP,MAAM,CAAC,CAAC,CAEZ,mBACEH,KAAA,QAAKW,SAAS,WAAAC,MAAA,CAAYT,MAAM,CAAG,MAAM,CAAG,EAAE,CAAG,CAAAE,QAAA,eAC/CP,IAAA,QAAKa,SAAS,CAAC,gBAAgB,CAACE,OAAO,CAAET,OAAQ,CAAM,CAAC,cACxDN,IAAA,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