streamlit-nightly 1.53.2.dev20260131__py3-none-any.whl → 1.53.2.dev20260202__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.
Files changed (189) hide show
  1. streamlit/commands/execution_control.py +2 -2
  2. streamlit/delta_generator.py +2 -0
  3. streamlit/elements/lib/column_types.py +6 -2
  4. streamlit/elements/lib/utils.py +6 -6
  5. streamlit/elements/markdown.py +0 -1
  6. streamlit/elements/metric.py +2 -1
  7. streamlit/elements/widgets/button_group.py +6 -276
  8. streamlit/elements/widgets/feedback.py +322 -0
  9. streamlit/elements/widgets/number_input.py +2 -1
  10. streamlit/elements/widgets/slider.py +2 -1
  11. streamlit/material_icon_names.py +1 -1
  12. streamlit/proto/AudioInput_pb2.py +4 -4
  13. streamlit/proto/AudioInput_pb2.pyi +3 -3
  14. streamlit/proto/Audio_pb2.py +2 -2
  15. streamlit/proto/BackMsg_pb2.pyi +2 -10
  16. streamlit/proto/Balloons_pb2.pyi +0 -2
  17. streamlit/proto/Block_pb2.py +35 -35
  18. streamlit/proto/ButtonGroup_pb2.py +10 -12
  19. streamlit/proto/ButtonGroup_pb2.pyi +6 -41
  20. streamlit/proto/Button_pb2.py +2 -2
  21. streamlit/proto/CameraInput_pb2.py +4 -4
  22. streamlit/proto/CameraInput_pb2.pyi +3 -3
  23. streamlit/proto/ChatInput_pb2.py +2 -2
  24. streamlit/proto/Checkbox_pb2.py +6 -6
  25. streamlit/proto/Checkbox_pb2.pyi +3 -3
  26. streamlit/proto/Code_pb2.py +2 -2
  27. streamlit/proto/ColorPicker_pb2.py +4 -4
  28. streamlit/proto/ColorPicker_pb2.pyi +3 -3
  29. streamlit/proto/Common_pb2.py +6 -6
  30. streamlit/proto/DateInput_pb2.py +4 -4
  31. streamlit/proto/DateInput_pb2.pyi +3 -3
  32. streamlit/proto/DateTimeInput_pb2.py +4 -4
  33. streamlit/proto/DateTimeInput_pb2.pyi +3 -3
  34. streamlit/proto/DeckGlJsonChart_pb2.py +2 -2
  35. streamlit/proto/Delta_pb2.py +2 -2
  36. streamlit/proto/DocString_pb2.py +1 -1
  37. streamlit/proto/Element_pb2.py +4 -4
  38. streamlit/proto/Element_pb2.pyi +9 -9
  39. streamlit/proto/Feedback_pb2.py +28 -0
  40. streamlit/proto/Feedback_pb2.pyi +93 -0
  41. streamlit/proto/FileUploader_pb2.py +4 -4
  42. streamlit/proto/FileUploader_pb2.pyi +3 -3
  43. streamlit/proto/ForwardMsg_pb2.py +8 -8
  44. streamlit/proto/GraphVizChart_pb2.py +2 -2
  45. streamlit/proto/IFrame_pb2.py +3 -3
  46. streamlit/proto/Image_pb2.py +4 -4
  47. streamlit/proto/Image_pb2.pyi +1 -7
  48. streamlit/proto/{BokehChart_pb2.py → LabelVisibility_pb2.py} +7 -5
  49. streamlit/proto/{LabelVisibilityMessage_pb2.pyi → LabelVisibility_pb2.pyi} +14 -14
  50. streamlit/proto/Markdown_pb2.py +4 -4
  51. streamlit/proto/Markdown_pb2.pyi +1 -5
  52. streamlit/proto/Metric_pb2.py +10 -10
  53. streamlit/proto/Metric_pb2.pyi +3 -3
  54. streamlit/proto/MultiSelect_pb2.py +4 -4
  55. streamlit/proto/MultiSelect_pb2.pyi +3 -3
  56. streamlit/proto/NewSession_pb2.py +38 -26
  57. streamlit/proto/NewSession_pb2.pyi +42 -8
  58. streamlit/proto/NumberInput_pb2.py +6 -6
  59. streamlit/proto/NumberInput_pb2.pyi +3 -3
  60. streamlit/proto/PlotlyChart_pb2.py +2 -2
  61. streamlit/proto/Radio_pb2.py +4 -4
  62. streamlit/proto/Radio_pb2.pyi +3 -3
  63. streamlit/proto/Selectbox_pb2.py +4 -4
  64. streamlit/proto/Selectbox_pb2.pyi +3 -6
  65. streamlit/proto/Slider_pb2.py +8 -8
  66. streamlit/proto/Slider_pb2.pyi +3 -3
  67. streamlit/proto/Snow_pb2.pyi +0 -2
  68. streamlit/proto/TextArea_pb2.py +4 -4
  69. streamlit/proto/TextArea_pb2.pyi +3 -3
  70. streamlit/proto/TextInput_pb2.py +6 -6
  71. streamlit/proto/TextInput_pb2.pyi +3 -3
  72. streamlit/proto/TimeInput_pb2.py +4 -4
  73. streamlit/proto/TimeInput_pb2.pyi +3 -3
  74. streamlit/proto/Video_pb2.py +2 -2
  75. streamlit/static/index.html +2 -2
  76. streamlit/static/manifest.json +324 -309
  77. streamlit/static/static/css/{index.BUP6fTcR.css → index.C8MrxwGF.css} +1 -1
  78. streamlit/static/static/js/{ErrorOutline.esm.DC6KVDKK.js → ErrorOutline.esm.CLuz0rSD.js} +1 -1
  79. streamlit/static/static/js/{FileDownload.esm.Z9hRQIHi.js → FileDownload.esm.CO68LcnZ.js} +1 -1
  80. streamlit/static/static/js/{FileHelper.DqvW90pm.js → FileHelper.DAXgY6Ug.js} +1 -1
  81. streamlit/static/static/js/{FormClearHelper.DTFnX0js.js → FormClearHelper.zxJ53Nym.js} +1 -1
  82. streamlit/static/static/js/{InputInstructions.CdzsN_Va.js → InputInstructions.CCbg8esE.js} +1 -1
  83. streamlit/static/static/js/{Particles.12xFSjcn.js → Particles.BJw0A-zv.js} +1 -1
  84. streamlit/static/static/js/{ProgressBar.Dg-oMbWg.js → ProgressBar.BrrHeAEh.js} +2 -2
  85. streamlit/static/static/js/{StreamlitSyntaxHighlighter.rbzmcipw.js → StreamlitSyntaxHighlighter.DvPLy3zk.js} +1 -1
  86. streamlit/static/static/js/{TableChart.esm.CzJtGIR-.js → TableChart.esm.BawvAi5p.js} +1 -1
  87. streamlit/static/static/js/{Toolbar.COH7NaOE.js → Toolbar.CbpscbNb.js} +1 -1
  88. streamlit/static/static/js/{WidgetLabelHelpIconInline.Dlc8f0Ji.js → WidgetLabelHelpIconInline.DA4S2HFP.js} +1 -1
  89. streamlit/static/static/js/{base-input.Q-zJLgRK.js → base-input.BKKl2eBF.js} +1 -1
  90. streamlit/static/static/js/{checkbox.BKgWNdeI.js → checkbox.CB43AKV4.js} +1 -1
  91. streamlit/static/static/js/{createDownloadLinkElement.6oO-YlYv.js → createDownloadLinkElement.jVwF96ey.js} +1 -1
  92. streamlit/static/static/js/data-grid-overlay-editor.CxQizSv7.js +1 -0
  93. streamlit/static/static/js/{downloader.BBXcXdX1.js → downloader.CKlIgsy5.js} +1 -1
  94. streamlit/static/static/js/{embed.CJzOXYBF.js → embed.BhRb_2n8.js} +1 -1
  95. streamlit/static/static/js/{es6.CdxPQzwJ.js → es6.DPyfPmWm.js} +2 -2
  96. streamlit/static/static/js/formatNumber.DtfMnnPx.js +1 -0
  97. streamlit/static/static/js/{iconPosition.BVScIr6G.js → iconPosition.DkZAlu_k.js} +1 -1
  98. streamlit/static/static/js/{iframeResizer.contentWindow.D_QHVqPM.js → iframeResizer.contentWindow.l5sQWLra.js} +1 -1
  99. streamlit/static/static/js/{index.CxoREvnF.js → index.465nmxtO.js} +2 -2
  100. streamlit/static/static/js/{index.BqbKiDp2.js → index.6J1N4is3.js} +1 -1
  101. streamlit/static/static/js/{index.CrY1BsL3.js → index.AZ9T4EqJ.js} +1 -1
  102. streamlit/static/static/js/{index.6DFY6LUF.js → index.BAK0CG1Q.js} +1 -1
  103. streamlit/static/static/js/{index.BxQxTpWl.js → index.BLD3tJ2C.js} +1 -1
  104. streamlit/static/static/js/{index.BQnLeHnr.js → index.BUlT_mOL.js} +3 -3
  105. streamlit/static/static/js/{index.Dud7RRHc.js → index.Bc_FQ4Wb.js} +1 -1
  106. streamlit/static/static/js/{index.DRoJNzFX.js → index.BpCj2-sQ.js} +1 -1
  107. streamlit/static/static/js/{index.BED2_zc7.js → index.BzO83wKm.js} +1 -1
  108. streamlit/static/static/js/index.CAoX2tlo.js +2 -0
  109. streamlit/static/static/js/{index.bQJYmJ2T.js → index.CBbYMKZp.js} +1 -1
  110. streamlit/static/static/js/{index.DyfvmNCy.js → index.CL7it7tU.js} +1 -1
  111. streamlit/static/static/js/{index.BDtN2n7T.js → index.CL_icBXS.js} +1 -1
  112. streamlit/static/static/js/{index.DAnczAW2.js → index.C_19KWNs.js} +1 -1
  113. streamlit/static/static/js/index.CaU3Uv_L.js +1 -0
  114. streamlit/static/static/js/{index.B80gSxrS.js → index.Ccye_uLl.js} +1 -1
  115. streamlit/static/static/js/{index.YULCxEtm.js → index.CiS4giQ2.js} +1 -1
  116. streamlit/static/static/js/{index.iXh5nbLZ.js → index.Ck64OQhV.js} +1 -1
  117. streamlit/static/static/js/{index.D9v2Y8Gk.js → index.CmbqbRMZ.js} +1 -1
  118. streamlit/static/static/js/{index.DAfIQKfP.js → index.CsEZTo6L.js} +2 -2
  119. streamlit/static/static/js/{index.BtOoVQt7.js → index.CsIENsKH.js} +1 -1
  120. streamlit/static/static/js/{index.CUYi3FrD.js → index.Cwg8nWw5.js} +1 -1
  121. streamlit/static/static/js/{index.GieKl4BG.js → index.D83azq2w.js} +1 -1
  122. streamlit/static/static/js/{index.CvtybR-u.js → index.DDr-BLbJ.js} +1 -1
  123. streamlit/static/static/js/{index.CBE2cIbj.js → index.DKoJr0Se.js} +1 -1
  124. streamlit/static/static/js/{index.DyXcT2tD.js → index.DL_ywOgf.js} +2 -2
  125. streamlit/static/static/js/{index.BiCbrx53.js → index.DR6V0uBJ.js} +1 -1
  126. streamlit/static/static/js/index.DZOGT9vX.js +1 -0
  127. streamlit/static/static/js/{index.BSpYHDvk.js → index.Dac9Jib-.js} +1 -1
  128. streamlit/static/static/js/{index.DCe7fo-m.js → index.DiBeetOH.js} +1 -1
  129. streamlit/static/static/js/{index.DrcbvB2t.js → index.DjuMEZ6m.js} +1 -1
  130. streamlit/static/static/js/{index.DU68jVpM.js → index.DmWUXdjc.js} +5 -5
  131. streamlit/static/static/js/{index._1zqETQ9.js → index.DpSc4e1j.js} +1 -1
  132. streamlit/static/static/js/{index.Biyf9aUg.js → index.DzdPUxsx.js} +2 -2
  133. streamlit/static/static/js/{index.C5oqIM3a.js → index.FioS1Y9m.js} +1 -1
  134. streamlit/static/static/js/{index.DZmBuE3z.js → index.L9pOjBEn.js} +3 -3
  135. streamlit/static/static/js/{index.DAyGxxdm.js → index.LjqoQCm5.js} +3 -3
  136. streamlit/static/static/js/{index.mSdC1FV6.js → index.OizPL4jg.js} +1 -1
  137. streamlit/static/static/js/{index.BSYebegS.js → index.Q2t_iBn0.js} +1 -1
  138. streamlit/static/static/js/index.WIMtx3m0.js +2 -0
  139. streamlit/static/static/js/index.Y9wPTZIf.js +1 -0
  140. streamlit/static/static/js/{index.BqxwnMem.js → index.YutgmD9x.js} +2 -2
  141. streamlit/static/static/js/{index.nL1fkE1D.js → index.b_f-McZ5.js} +1 -1
  142. streamlit/static/static/js/{index.y-pa6LIX.js → index.e6Ry6-Ft.js} +1 -1
  143. streamlit/static/static/js/index.hnu9U-5g.js +1 -0
  144. streamlit/static/static/js/{index.D6OexhdL.js → index.rvbQETlC.js} +1 -1
  145. streamlit/static/static/js/index.w7yKy9fh.js +6 -0
  146. streamlit/static/static/js/{index.BxMkW82k.js → index.y0h42OXL.js} +1 -1
  147. streamlit/static/static/js/{index.CPc_uZux.js → index.y5HxPwg9.js} +42 -42
  148. streamlit/static/static/js/{index.DNfyKqhQ.js → index.yHLCvUGh.js} +1 -1
  149. streamlit/static/static/js/{input.BcC6sPE_.js → input.CAtwSQ27.js} +1 -1
  150. streamlit/static/static/js/{main.TU5_aabd.js → main.VeMVx6VI.js} +1 -1
  151. streamlit/static/static/js/{memory.By_OTlI4.js → memory.CxS_lIUn.js} +1 -1
  152. streamlit/static/static/js/number-overlay-editor.CoqRgZW_.js +9 -0
  153. streamlit/static/static/js/{pandasStylerUtils.3IiIKU9-.js → pandasStylerUtils.DGWgd5sM.js} +1 -1
  154. streamlit/static/static/js/{sandbox.DnxTbWzV.js → sandbox.2mSqEau0.js} +1 -1
  155. streamlit/static/static/js/sprintfjs.CsoVVZ9k.js +1 -0
  156. streamlit/static/static/js/{styled-components.BeEcZ0vW.js → styled-components.BShfh7J8.js} +1 -1
  157. streamlit/static/static/js/{throttle.emUyC44c.js → throttle.Fq1DQK4p.js} +1 -1
  158. streamlit/static/static/js/{timepicker.DZ_ZufYF.js → timepicker.DmyY-qtn.js} +1 -1
  159. streamlit/static/static/js/{toConsumableArray.DDV1bN1-.js → toConsumableArray.Dvd9AIqV.js} +1 -1
  160. streamlit/static/static/js/uniqueId.CCajdEK8.js +1 -0
  161. streamlit/static/static/js/{useBasicWidgetState.DvpdEDYZ.js → useBasicWidgetState.COLQ5AFB.js} +1 -1
  162. streamlit/static/static/js/{useIntlLocale.BBDLbTq9.js → useIntlLocale.kdIj0ego.js} +1 -1
  163. streamlit/static/static/js/{useTextInputAutoExpand.BIApLJKn.js → useTextInputAutoExpand.DkuG1C1S.js} +1 -1
  164. streamlit/static/static/js/{useUpdateUiValue.DQ4RuJNC.js → useUpdateUiValue.-UI_JsjT.js} +1 -1
  165. streamlit/static/static/js/{useWaveformController.B0olyXLQ.js → useWaveformController.C5PTwL6I.js} +1 -1
  166. streamlit/static/static/js/{withCalculatedWidth.DYeqePuh.js → withCalculatedWidth.BREyS0pJ.js} +1 -1
  167. streamlit/static/static/js/{withFullScreenWrapper.DtkUCO_d.js → withFullScreenWrapper.DYDiEOrW.js} +1 -1
  168. streamlit/static/static/media/MaterialSymbols-Rounded.CnH1S47a.woff2 +0 -0
  169. streamlit/testing/v1/app_test.py +21 -5
  170. streamlit/testing/v1/element_tree.py +65 -2
  171. {streamlit_nightly-1.53.2.dev20260131.dist-info → streamlit_nightly-1.53.2.dev20260202.dist-info}/METADATA +1 -1
  172. {streamlit_nightly-1.53.2.dev20260131.dist-info → streamlit_nightly-1.53.2.dev20260202.dist-info}/RECORD +175 -173
  173. streamlit/proto/BokehChart_pb2.pyi +0 -56
  174. streamlit/proto/LabelVisibilityMessage_pb2.py +0 -28
  175. streamlit/static/static/js/data-grid-overlay-editor.CO0xdNiG.js +0 -1
  176. streamlit/static/static/js/formatNumber.DB5irY8c.js +0 -1
  177. streamlit/static/static/js/index.BBTKOM0z.js +0 -6
  178. streamlit/static/static/js/index.CE2WIFD1.js +0 -2
  179. streamlit/static/static/js/index.Cpu2p5bH.js +0 -1
  180. streamlit/static/static/js/index.CtbETWQK.js +0 -2
  181. streamlit/static/static/js/index.DhRAGiPR.js +0 -1
  182. streamlit/static/static/js/index.tuFFlbxa.js +0 -1
  183. streamlit/static/static/js/number-overlay-editor.FSRaRpbU.js +0 -9
  184. streamlit/static/static/js/sprintf.DpPCfzXw.js +0 -1
  185. streamlit/static/static/js/uniqueId.DTwvAE-J.js +0 -1
  186. streamlit/static/static/media/MaterialSymbols-Rounded.C7IFxh57.woff2 +0 -0
  187. {streamlit_nightly-1.53.2.dev20260131.dist-info → streamlit_nightly-1.53.2.dev20260202.dist-info}/WHEEL +0 -0
  188. {streamlit_nightly-1.53.2.dev20260131.dist-info → streamlit_nightly-1.53.2.dev20260202.dist-info}/entry_points.txt +0 -0
  189. {streamlit_nightly-1.53.2.dev20260131.dist-info → streamlit_nightly-1.53.2.dev20260202.dist-info}/top_level.txt +0 -0
@@ -1,56 +0,0 @@
1
- """
2
- @generated by mypy-protobuf. Do not edit manually!
3
- isort:skip_file
4
- *!
5
- Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-2026)
6
-
7
- Licensed under the Apache License, Version 2.0 (the "License");
8
- you may not use this file except in compliance with the License.
9
- You may obtain a copy of the License at
10
-
11
- http://www.apache.org/licenses/LICENSE-2.0
12
-
13
- Unless required by applicable law or agreed to in writing, software
14
- distributed under the License is distributed on an "AS IS" BASIS,
15
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
- See the License for the specific language governing permissions and
17
- limitations under the License.
18
- """
19
-
20
- from google.protobuf import descriptor as _descriptor
21
- from google.protobuf import message as _message
22
- import builtins as _builtins
23
- import sys
24
- import typing as _typing
25
-
26
- if sys.version_info >= (3, 10):
27
- from typing import TypeAlias as _TypeAlias
28
- else:
29
- from typing_extensions import TypeAlias as _TypeAlias
30
-
31
- DESCRIPTOR: _descriptor.FileDescriptor
32
-
33
- @_typing.final
34
- class BokehChart(_message.Message):
35
- DESCRIPTOR: _descriptor.Descriptor
36
-
37
- FIGURE_FIELD_NUMBER: _builtins.int
38
- USE_CONTAINER_WIDTH_FIELD_NUMBER: _builtins.int
39
- ELEMENT_ID_FIELD_NUMBER: _builtins.int
40
- figure: _builtins.str
41
- """A JSON-formatted string from the Bokeh chart figure."""
42
- use_container_width: _builtins.bool
43
- """If True, will overwrite the chart width spec to fit to container."""
44
- element_id: _builtins.str
45
- """A unique ID of this element."""
46
- def __init__(
47
- self,
48
- *,
49
- figure: _builtins.str = ...,
50
- use_container_width: _builtins.bool = ...,
51
- element_id: _builtins.str = ...,
52
- ) -> None: ...
53
- _ClearFieldArgType: _TypeAlias = _typing.Literal["element_id", b"element_id", "figure", b"figure", "use_container_width", b"use_container_width"] # noqa: Y015
54
- def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
55
-
56
- Global___BokehChart: _TypeAlias = BokehChart # noqa: Y015
@@ -1,28 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- # Generated by the protocol buffer compiler. DO NOT EDIT!
3
- # source: streamlit/proto/LabelVisibilityMessage.proto
4
- # Protobuf Python Version: 5.26.1
5
- """Generated protocol buffer code."""
6
- from google.protobuf import descriptor as _descriptor
7
- from google.protobuf import descriptor_pool as _descriptor_pool
8
- from google.protobuf import symbol_database as _symbol_database
9
- from google.protobuf.internal import builder as _builder
10
- # @@protoc_insertion_point(imports)
11
-
12
- _sym_db = _symbol_database.Default()
13
-
14
-
15
-
16
-
17
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n,streamlit/proto/LabelVisibilityMessage.proto\"\x99\x01\n\x16LabelVisibilityMessage\x12=\n\x05value\x18\x01 \x01(\x0e\x32..LabelVisibilityMessage.LabelVisibilityOptions\"@\n\x16LabelVisibilityOptions\x12\x0b\n\x07VISIBLE\x10\x00\x12\n\n\x06HIDDEN\x10\x01\x12\r\n\tCOLLAPSED\x10\x02\x62\x06proto3')
18
-
19
- _globals = globals()
20
- _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
21
- _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'streamlit.proto.LabelVisibilityMessage_pb2', _globals)
22
- if not _descriptor._USE_C_DESCRIPTORS:
23
- DESCRIPTOR._loaded_options = None
24
- _globals['_LABELVISIBILITYMESSAGE']._serialized_start=49
25
- _globals['_LABELVISIBILITYMESSAGE']._serialized_end=202
26
- _globals['_LABELVISIBILITYMESSAGE_LABELVISIBILITYOPTIONS']._serialized_start=138
27
- _globals['_LABELVISIBILITYMESSAGE_LABELVISIBILITYOPTIONS']._serialized_end=202
28
- # @@protoc_insertion_point(module_scope)
@@ -1 +0,0 @@
1
- import{r,aj as J}from"./index.CPc_uZux.js";import{s as Q,i as I,a as U,b as Z,T as ee,C as te,m as re}from"./index.DU68jVpM.js";import"./withFullScreenWrapper.DtkUCO_d.js";import"./Toolbar.COH7NaOE.js";import"./FormClearHelper.DTFnX0js.js";import"./moment.C7qA8nIE.js";import"./pandasStylerUtils.3IiIKU9-.js";import"./numbro.B9_PXfzp.js";import"./_baseIndexOf.BTknn6Gb.js";import"./index.8HslT92O.js";import"./main.TU5_aabd.js";import"./throttle.emUyC44c.js";import"./toConsumableArray.DDV1bN1-.js";import"./formatNumber.DB5irY8c.js";import"./sprintf.DpPCfzXw.js";import"./formatMoment.C6Hwn6X5.js";import"./checkbox.BKgWNdeI.js";import"./createDownloadLinkElement.6oO-YlYv.js";import"./FileDownload.esm.Z9hRQIHi.js";import"./_arrayIncludes.B19Iyn2B.js";const ie=()=>t=>t.targetX,ne=()=>t=>t.targetY,se=()=>t=>t.targetWidth,oe=()=>t=>t.targetHeight,ae=()=>t=>t.targetY+10,le=()=>t=>Math.max(0,(t.targetHeight-28)/2),de=Q("div")({name:"DataGridOverlayEditorStyle",class:"gdg-d19meir1",propsAsIs:!1,vars:{"d19meir1-0":[ne(),"px"],"d19meir1-1":[ie(),"px"],"d19meir1-2":[se(),"px"],"d19meir1-3":[oe(),"px"],"d19meir1-4":[ae(),"px"],"d19meir1-5":[le(),"px"]}});function ue(){const[t,s]=r.useState();return[t??void 0,s]}function ce(){const[t,s]=ue(),[n,h]=r.useState(0),[f,b]=r.useState(!0);r.useLayoutEffect(()=>{if(t===void 0||!("IntersectionObserver"in window))return;const o=new IntersectionObserver(a=>{a.length!==0&&b(a[0].isIntersecting)},{threshold:1});return o.observe(t),()=>o.disconnect()},[t]),r.useEffect(()=>{if(f||t===void 0)return;let o;const a=()=>{const{right:x}=t.getBoundingClientRect();h(m=>Math.min(m+window.innerWidth-x-10,0)),o=requestAnimationFrame(a)};return o=requestAnimationFrame(a),()=>{o!==void 0&&cancelAnimationFrame(o)}},[t,f]);const C=r.useMemo(()=>({transform:`translateX(${n}px)`}),[n]);return{ref:s,style:C}}const Te=t=>{const{target:s,content:n,onFinishEditing:h,forceEditMode:f,initialValue:b,imageEditorOverride:C,markdownDivCreateNode:o,highlight:a,className:x,theme:m,id:W,cell:p,bloom:w,portalElementRef:F,validateCell:g,getCellRenderer:P,provideEditor:T,isOutsideClick:X,customEventTarget:j,activation:O}=t,[l,A]=r.useState(f?n:void 0),S=r.useRef(l??n);S.current=l??n;const[y,k]=r.useState(()=>g===void 0?!0:!(I(n)&&g?.(p,n,S.current)===!1)),u=r.useCallback((e,i)=>{h(y?e:void 0,i)},[y,h]),K=r.useCallback(e=>{if(g!==void 0&&e!==void 0&&I(e)){const i=g(p,e,S.current);i===!1?k(!1):(typeof i=="object"&&(e=i),k(!0))}A(e)},[p,g]),E=r.useRef(!1),c=r.useRef(void 0),Y=r.useCallback(()=>{u(l,[0,0]),E.current=!0},[l,u]),L=r.useCallback((e,i)=>{u(e,i??c.current??[0,0]),E.current=!0},[u]),q=r.useCallback(async e=>{let i=!1;e.key==="Escape"?(e.stopPropagation(),e.preventDefault(),c.current=[0,0]):e.key==="Enter"&&!e.shiftKey?(e.stopPropagation(),e.preventDefault(),c.current=[0,1],i=!0):e.key==="Tab"&&(e.stopPropagation(),e.preventDefault(),c.current=[e.shiftKey?-1:1,0],i=!0),window.setTimeout(()=>{!E.current&&c.current!==void 0&&(u(i?l:void 0,c.current),E.current=!0)},0)},[u,l]),R=l??n,[d,B]=r.useMemo(()=>{if(U(n))return[];const e={...n,location:p,activation:O},i=T?.(e);return i!==void 0?[i,!1]:[P(n)?.provideEditor?.(e),!1]},[p,n,P,T,O]),{ref:$,style:z}=ce();let M=!0,_,N=!0,v;if(d!==void 0){M=d.disablePadding!==!0,N=d.disableStyling!==!0;const e=Z(d);e&&(v=d.styleOverride);const i=e?d.editor:d;_=r.createElement(i,{portalElementRef:F,isHighlighted:a,activation:O,onChange:K,value:R,initialValue:b,onFinishedEditing:L,validatedSelection:I(R)?R.selectionRange:void 0,forceEditMode:f,target:s,imageEditorOverride:C,markdownDivCreateNode:o,isValid:y,theme:m})}v={...v,...z};const V=F?.current??document.getElementById("portal");if(V===null)return console.error('Cannot open Data Grid overlay editor, because portal not found. Please, either provide a portalElementRef or add `<div id="portal" />` as the last child of your `<body>`.'),null;let D=N?"gdg-style":"gdg-unstyle";y||(D+=" gdg-invalid"),M&&(D+=" gdg-pad");const G=w?.[0]??1,H=w?.[1]??1;return J.createPortal(r.createElement(ee.Provider,{value:m},r.createElement(te,{style:re(m),className:x,onClickOutside:Y,isOutsideClick:X,customEventTarget:j},r.createElement(de,{ref:$,id:W,className:D,style:v,as:B===!0?"label":void 0,targetX:s.x-G,targetY:s.y-H,targetWidth:s.width+G*2,targetHeight:s.height+H*2},r.createElement("div",{className:"gdg-clip-region",onKeyDown:q},_)))),V)};export{Te as default};
@@ -1 +0,0 @@
1
- import{n as e}from"./numbro.B9_PXfzp.js";import{s as u}from"./sprintf.DpPCfzXw.js";import{e as m,n as s}from"./index.CPc_uZux.js";function o(t){if(t===0||Math.abs(t)>=1e-4)return 4;const n=t.toExponential().split("e");return Math.abs(parseInt(n[1],10))}function i(t,r={}){const n=navigator.languages;try{return new Intl.NumberFormat(n,r).format(t)}catch(a){if(a instanceof RangeError)return new Intl.NumberFormat(void 0,r).format(t);throw a}}function l(t,r,n){return Number.isNaN(t)||!Number.isFinite(t)?"":m(r)||r===""?s(n)?(n===0&&(t=Math.round(t)),e(t).format({thousandSeparated:!1,mantissa:n,trimMantissa:!1})):e(t).format({thousandSeparated:!1,mantissa:o(t),trimMantissa:!0}):r==="plain"?e(t).format({thousandSeparated:!1,mantissa:20,trimMantissa:!0}):r==="localized"?i(t,{minimumFractionDigits:n??void 0,maximumFractionDigits:n??void 0}):r==="percent"?i(t,{style:"percent",minimumFractionDigits:s(n)?Math.max(n-2,0):0,maximumFractionDigits:s(n)?Math.max(n-2,0):2}):r==="dollar"?i(t,{style:"currency",currency:"USD",currencyDisplay:"narrowSymbol",minimumFractionDigits:n??2,maximumFractionDigits:n??2}):r==="euro"?i(t,{style:"currency",currency:"EUR",currencyDisplay:"narrowSymbol",minimumFractionDigits:n??2,maximumFractionDigits:n??2}):r==="yen"?i(t,{style:"currency",currency:"JPY",currencyDisplay:"narrowSymbol",minimumFractionDigits:n??0,maximumFractionDigits:n??0}):["compact","scientific","engineering"].includes(r)?i(t,{notation:r}):r==="accounting"?e(t).format({thousandSeparated:!0,negative:"parenthesis",mantissa:n??2,trimMantissa:!1}):r==="bytes"?i(t,{notation:"compact",style:"unit",unit:"byte",unitDisplay:"narrow",maximumFractionDigits:1}).replace("BB","GB"):u.sprintf(r,t)}function y(t){if(t.trim()==="")return!1;const r=Number(t);return!Number.isNaN(r)&&Number.isFinite(r)}export{l as f,y as i};
@@ -1,6 +0,0 @@
1
- function ze(e,t){return function(){return e.apply(t,arguments)}}const{toString:ht}=Object.prototype,{getPrototypeOf:be}=Object,{iterator:re,toStringTag:Je}=Symbol,se=(e=>t=>{const n=ht.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),P=e=>(e=e.toLowerCase(),t=>se(t)===e),oe=e=>t=>typeof t===e,{isArray:M}=Array,I=oe("undefined");function V(e){return e!==null&&!I(e)&&e.constructor!==null&&!I(e.constructor)&&T(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Ve=P("ArrayBuffer");function mt(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Ve(e.buffer),t}const yt=oe("string"),T=oe("function"),We=oe("number"),W=e=>e!==null&&typeof e=="object",bt=e=>e===!0||e===!1,Y=e=>{if(se(e)!=="object")return!1;const t=be(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Je in e)&&!(re in e)},wt=e=>{if(!W(e)||V(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Et=P("Date"),gt=P("File"),St=P("Blob"),Rt=P("FileList"),Ot=e=>W(e)&&T(e.pipe),Tt=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||T(e.append)&&((t=se(e))==="formdata"||t==="object"&&T(e.toString)&&e.toString()==="[object FormData]"))},At=P("URLSearchParams"),[xt,Ct,Nt,Pt]=["ReadableStream","Request","Response","Headers"].map(P),Ft=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function K(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),M(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{if(V(e))return;const i=n?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let c;for(r=0;r<o;r++)c=i[r],t.call(null,e[c],c,e)}}function Ke(e,t){if(V(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const D=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,ve=e=>!I(e)&&e!==D;function pe(){const{caseless:e,skipUndefined:t}=ve(this)&&this||{},n={},r=(s,i)=>{const o=e&&Ke(n,i)||i;Y(n[o])&&Y(s)?n[o]=pe(n[o],s):Y(s)?n[o]=pe({},s):M(s)?n[o]=s.slice():(!t||!I(s))&&(n[o]=s)};for(let s=0,i=arguments.length;s<i;s++)arguments[s]&&K(arguments[s],r);return n}const _t=(e,t,n,{allOwnKeys:r}={})=>(K(t,(s,i)=>{n&&T(s)?e[i]=ze(s,n):e[i]=s},{allOwnKeys:r}),e),Ut=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Lt=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Bt=(e,t,n,r)=>{let s,i,o;const c={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)o=s[i],(!r||r(o,e,t))&&!c[o]&&(t[o]=e[o],c[o]=!0);e=n!==!1&&be(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kt=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Dt=e=>{if(!e)return null;if(M(e))return e;let t=e.length;if(!We(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},jt=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&be(Uint8Array)),qt=(e,t)=>{const r=(e&&e[re]).call(e);let s;for(;(s=r.next())&&!s.done;){const i=s.value;t.call(e,i[0],i[1])}},Ht=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},It=P("HTMLFormElement"),Mt=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),Ce=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),$t=P("RegExp"),Xe=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};K(n,(s,i)=>{let o;(o=t(s,i,e))!==!1&&(r[i]=o||s)}),Object.defineProperties(e,r)},zt=e=>{Xe(e,(t,n)=>{if(T(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(T(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Jt=(e,t)=>{const n={},r=s=>{s.forEach(i=>{n[i]=!0})};return M(e)?r(e):r(String(e).split(t)),n},Vt=()=>{},Wt=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Kt(e){return!!(e&&T(e.append)&&e[Je]==="FormData"&&e[re])}const vt=e=>{const t=new Array(10),n=(r,s)=>{if(W(r)){if(t.indexOf(r)>=0)return;if(V(r))return r;if(!("toJSON"in r)){t[s]=r;const i=M(r)?[]:{};return K(r,(o,c)=>{const d=n(o,s+1);!I(d)&&(i[c]=d)}),t[s]=void 0,i}}return r};return n(e,0)},Xt=P("AsyncFunction"),Gt=e=>e&&(W(e)||T(e))&&T(e.then)&&T(e.catch),Ge=((e,t)=>e?setImmediate:t?((n,r)=>(D.addEventListener("message",({source:s,data:i})=>{s===D&&i===n&&r.length&&r.shift()()},!1),s=>{r.push(s),D.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",T(D.postMessage)),Qt=typeof queueMicrotask<"u"?queueMicrotask.bind(D):typeof process<"u"&&process.nextTick||Ge,Zt=e=>e!=null&&T(e[re]),a={isArray:M,isArrayBuffer:Ve,isBuffer:V,isFormData:Tt,isArrayBufferView:mt,isString:yt,isNumber:We,isBoolean:bt,isObject:W,isPlainObject:Y,isEmptyObject:wt,isReadableStream:xt,isRequest:Ct,isResponse:Nt,isHeaders:Pt,isUndefined:I,isDate:Et,isFile:gt,isBlob:St,isRegExp:$t,isFunction:T,isStream:Ot,isURLSearchParams:At,isTypedArray:jt,isFileList:Rt,forEach:K,merge:pe,extend:_t,trim:Ft,stripBOM:Ut,inherits:Lt,toFlatObject:Bt,kindOf:se,kindOfTest:P,endsWith:kt,toArray:Dt,forEachEntry:qt,matchAll:Ht,isHTMLForm:It,hasOwnProperty:Ce,hasOwnProp:Ce,reduceDescriptors:Xe,freezeMethods:zt,toObjectSet:Jt,toCamelCase:Mt,noop:Vt,toFiniteNumber:Wt,findKey:Ke,global:D,isContextDefined:ve,isSpecCompliantForm:Kt,toJSONObject:vt,isAsyncFn:Xt,isThenable:Gt,setImmediate:Ge,asap:Qt,isIterable:Zt};function y(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}a.inherits(y,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:a.toJSONObject(this.config),code:this.code,status:this.status}}});const Qe=y.prototype,Ze={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Ze[e]={value:e}});Object.defineProperties(y,Ze);Object.defineProperty(Qe,"isAxiosError",{value:!0});y.from=(e,t,n,r,s,i)=>{const o=Object.create(Qe);a.toFlatObject(e,o,function(l){return l!==Error.prototype},f=>f!=="isAxiosError");const c=e&&e.message?e.message:"Error",d=t==null&&e?e.code:t;return y.call(o,c,d,n,r,s),e&&o.cause==null&&Object.defineProperty(o,"cause",{value:e,configurable:!0}),o.name=e&&e.name||"Error",i&&Object.assign(o,i),o};const Yt=null;function he(e){return a.isPlainObject(e)||a.isArray(e)}function Ye(e){return a.endsWith(e,"[]")?e.slice(0,-2):e}function Ne(e,t,n){return e?e.concat(t).map(function(s,i){return s=Ye(s),!n&&i?"["+s+"]":s}).join(n?".":""):t}function en(e){return a.isArray(e)&&!e.some(he)}const tn=a.toFlatObject(a,{},null,function(t){return/^is[A-Z]/.test(t)});function ie(e,t,n){if(!a.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=a.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,p){return!a.isUndefined(p[m])});const r=n.metaTokens,s=n.visitor||l,i=n.dots,o=n.indexes,d=(n.Blob||typeof Blob<"u"&&Blob)&&a.isSpecCompliantForm(t);if(!a.isFunction(s))throw new TypeError("visitor must be a function");function f(u){if(u===null)return"";if(a.isDate(u))return u.toISOString();if(a.isBoolean(u))return u.toString();if(!d&&a.isBlob(u))throw new y("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(u)||a.isTypedArray(u)?d&&typeof Blob=="function"?new Blob([u]):Buffer.from(u):u}function l(u,m,p){let E=u;if(u&&!p&&typeof u=="object"){if(a.endsWith(m,"{}"))m=r?m:m.slice(0,-2),u=JSON.stringify(u);else if(a.isArray(u)&&en(u)||(a.isFileList(u)||a.endsWith(m,"[]"))&&(E=a.toArray(u)))return m=Ye(m),E.forEach(function(g,O){!(a.isUndefined(g)||g===null)&&t.append(o===!0?Ne([m],O,i):o===null?m:m+"[]",f(g))}),!1}return he(u)?!0:(t.append(Ne(p,m,i),f(u)),!1)}const h=[],b=Object.assign(tn,{defaultVisitor:l,convertValue:f,isVisitable:he});function S(u,m){if(!a.isUndefined(u)){if(h.indexOf(u)!==-1)throw Error("Circular reference detected in "+m.join("."));h.push(u),a.forEach(u,function(E,x){(!(a.isUndefined(E)||E===null)&&s.call(t,E,a.isString(x)?x.trim():x,m,b))===!0&&S(E,m?m.concat(x):[x])}),h.pop()}}if(!a.isObject(e))throw new TypeError("data must be an object");return S(e),t}function Pe(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function we(e,t){this._pairs=[],e&&ie(e,this,t)}const et=we.prototype;et.append=function(t,n){this._pairs.push([t,n])};et.toString=function(t){const n=t?function(r){return t.call(this,r,Pe)}:Pe;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function nn(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function tt(e,t,n){if(!t)return e;const r=n&&n.encode||nn;a.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let i;if(s?i=s(t,n):i=a.isURLSearchParams(t)?t.toString():new we(t,n).toString(r),i){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Fe{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){a.forEach(this.handlers,function(r){r!==null&&t(r)})}}const nt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},rn=typeof URLSearchParams<"u"?URLSearchParams:we,sn=typeof FormData<"u"?FormData:null,on=typeof Blob<"u"?Blob:null,an={isBrowser:!0,classes:{URLSearchParams:rn,FormData:sn,Blob:on},protocols:["http","https","file","blob","url","data"]},Ee=typeof window<"u"&&typeof document<"u",me=typeof navigator=="object"&&navigator||void 0,cn=Ee&&(!me||["ReactNative","NativeScript","NS"].indexOf(me.product)<0),ln=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",un=Ee&&window.location.href||"http://localhost",fn=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ee,hasStandardBrowserEnv:cn,hasStandardBrowserWebWorkerEnv:ln,navigator:me,origin:un},Symbol.toStringTag,{value:"Module"})),R={...fn,...an};function dn(e,t){return ie(e,new R.classes.URLSearchParams,{visitor:function(n,r,s,i){return R.isNode&&a.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function pn(e){return a.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function hn(e){const t={},n=Object.keys(e);let r;const s=n.length;let i;for(r=0;r<s;r++)i=n[r],t[i]=e[i];return t}function rt(e){function t(n,r,s,i){let o=n[i++];if(o==="__proto__")return!0;const c=Number.isFinite(+o),d=i>=n.length;return o=!o&&a.isArray(s)?s.length:o,d?(a.hasOwnProp(s,o)?s[o]=[s[o],r]:s[o]=r,!c):((!s[o]||!a.isObject(s[o]))&&(s[o]=[]),t(n,r,s[o],i)&&a.isArray(s[o])&&(s[o]=hn(s[o])),!c)}if(a.isFormData(e)&&a.isFunction(e.entries)){const n={};return a.forEachEntry(e,(r,s)=>{t(pn(r),s,n,0)}),n}return null}function mn(e,t,n){if(a.isString(e))try{return(t||JSON.parse)(e),a.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const v={transitional:nt,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,i=a.isObject(t);if(i&&a.isHTMLForm(t)&&(t=new FormData(t)),a.isFormData(t))return s?JSON.stringify(rt(t)):t;if(a.isArrayBuffer(t)||a.isBuffer(t)||a.isStream(t)||a.isFile(t)||a.isBlob(t)||a.isReadableStream(t))return t;if(a.isArrayBufferView(t))return t.buffer;if(a.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return dn(t,this.formSerializer).toString();if((c=a.isFileList(t))||r.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return ie(c?{"files[]":t}:t,d&&new d,this.formSerializer)}}return i||s?(n.setContentType("application/json",!1),mn(t)):t}],transformResponse:[function(t){const n=this.transitional||v.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(a.isResponse(t)||a.isReadableStream(t))return t;if(t&&a.isString(t)&&(r&&!this.responseType||s)){const o=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t,this.parseReviver)}catch(c){if(o)throw c.name==="SyntaxError"?y.from(c,y.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:R.classes.FormData,Blob:R.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.forEach(["delete","get","head","post","put","patch"],e=>{v.headers[e]={}});const yn=a.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),bn=e=>{const t={};let n,r,s;return e&&e.split(`
2
- `).forEach(function(o){s=o.indexOf(":"),n=o.substring(0,s).trim().toLowerCase(),r=o.substring(s+1).trim(),!(!n||t[n]&&yn[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},_e=Symbol("internals");function J(e){return e&&String(e).trim().toLowerCase()}function ee(e){return e===!1||e==null?e:a.isArray(e)?e.map(ee):String(e)}function wn(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const En=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ue(e,t,n,r,s){if(a.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!a.isString(t)){if(a.isString(r))return t.indexOf(r)!==-1;if(a.isRegExp(r))return r.test(t)}}function gn(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Sn(e,t){const n=a.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,i,o){return this[r].call(this,t,s,i,o)},configurable:!0})})}let A=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function i(c,d,f){const l=J(d);if(!l)throw new Error("header name must be a non-empty string");const h=a.findKey(s,l);(!h||s[h]===void 0||f===!0||f===void 0&&s[h]!==!1)&&(s[h||d]=ee(c))}const o=(c,d)=>a.forEach(c,(f,l)=>i(f,l,d));if(a.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(a.isString(t)&&(t=t.trim())&&!En(t))o(bn(t),n);else if(a.isObject(t)&&a.isIterable(t)){let c={},d,f;for(const l of t){if(!a.isArray(l))throw TypeError("Object iterator must return a key-value pair");c[f=l[0]]=(d=c[f])?a.isArray(d)?[...d,l[1]]:[d,l[1]]:l[1]}o(c,n)}else t!=null&&i(n,t,r);return this}get(t,n){if(t=J(t),t){const r=a.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return wn(s);if(a.isFunction(n))return n.call(this,s,r);if(a.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=J(t),t){const r=a.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||ue(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function i(o){if(o=J(o),o){const c=a.findKey(r,o);c&&(!n||ue(r,r[c],c,n))&&(delete r[c],s=!0)}}return a.isArray(t)?t.forEach(i):i(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const i=n[r];(!t||ue(this,this[i],i,t,!0))&&(delete this[i],s=!0)}return s}normalize(t){const n=this,r={};return a.forEach(this,(s,i)=>{const o=a.findKey(r,i);if(o){n[o]=ee(s),delete n[i];return}const c=t?gn(i):String(i).trim();c!==i&&delete n[i],n[c]=ee(s),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return a.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&a.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
3
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[_e]=this[_e]={accessors:{}}).accessors,s=this.prototype;function i(o){const c=J(o);r[c]||(Sn(s,o),r[c]=!0)}return a.isArray(t)?t.forEach(i):i(t),this}};A.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);a.reduceDescriptors(A.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});a.freezeMethods(A);function fe(e,t){const n=this||v,r=t||n,s=A.from(r.headers);let i=r.data;return a.forEach(e,function(c){i=c.call(n,i,s.normalize(),t?t.status:void 0)}),s.normalize(),i}function st(e){return!!(e&&e.__CANCEL__)}function $(e,t,n){y.call(this,e??"canceled",y.ERR_CANCELED,t,n),this.name="CanceledError"}a.inherits($,y,{__CANCEL__:!0});function ot(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new y("Request failed with status code "+n.status,[y.ERR_BAD_REQUEST,y.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Rn(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function On(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,i=0,o;return t=t!==void 0?t:1e3,function(d){const f=Date.now(),l=r[i];o||(o=f),n[s]=d,r[s]=f;let h=i,b=0;for(;h!==s;)b+=n[h++],h=h%e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),f-o<t)return;const S=l&&f-l;return S?Math.round(b*1e3/S):void 0}}function Tn(e,t){let n=0,r=1e3/t,s,i;const o=(f,l=Date.now())=>{n=l,s=null,i&&(clearTimeout(i),i=null),e(...f)};return[(...f)=>{const l=Date.now(),h=l-n;h>=r?o(f,l):(s=f,i||(i=setTimeout(()=>{i=null,o(s)},r-h)))},()=>s&&o(s)]}const ne=(e,t,n=3)=>{let r=0;const s=On(50,250);return Tn(i=>{const o=i.loaded,c=i.lengthComputable?i.total:void 0,d=o-r,f=s(d),l=o<=c;r=o;const h={loaded:o,total:c,progress:c?o/c:void 0,bytes:d,rate:f||void 0,estimated:f&&c&&l?(c-o)/f:void 0,event:i,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(h)},n)},Ue=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Le=e=>(...t)=>a.asap(()=>e(...t)),An=R.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,R.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(R.origin),R.navigator&&/(msie|trident)/i.test(R.navigator.userAgent)):()=>!0,xn=R.hasStandardBrowserEnv?{write(e,t,n,r,s,i,o){if(typeof document>"u")return;const c=[`${e}=${encodeURIComponent(t)}`];a.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),a.isString(r)&&c.push(`path=${r}`),a.isString(s)&&c.push(`domain=${s}`),i===!0&&c.push("secure"),a.isString(o)&&c.push(`SameSite=${o}`),document.cookie=c.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Cn(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Nn(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function it(e,t,n){let r=!Cn(t);return e&&(r||n==!1)?Nn(e,t):t}const Be=e=>e instanceof A?{...e}:e;function q(e,t){t=t||{};const n={};function r(f,l,h,b){return a.isPlainObject(f)&&a.isPlainObject(l)?a.merge.call({caseless:b},f,l):a.isPlainObject(l)?a.merge({},l):a.isArray(l)?l.slice():l}function s(f,l,h,b){if(a.isUndefined(l)){if(!a.isUndefined(f))return r(void 0,f,h,b)}else return r(f,l,h,b)}function i(f,l){if(!a.isUndefined(l))return r(void 0,l)}function o(f,l){if(a.isUndefined(l)){if(!a.isUndefined(f))return r(void 0,f)}else return r(void 0,l)}function c(f,l,h){if(h in t)return r(f,l);if(h in e)return r(void 0,f)}const d={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:c,headers:(f,l,h)=>s(Be(f),Be(l),h,!0)};return a.forEach(Object.keys({...e,...t}),function(l){const h=d[l]||s,b=h(e[l],t[l],l);a.isUndefined(b)&&h!==c||(n[l]=b)}),n}const at=e=>{const t=q({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:i,headers:o,auth:c}=t;if(t.headers=o=A.from(o),t.url=tt(it(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&o.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),a.isFormData(n)){if(R.hasStandardBrowserEnv||R.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(a.isFunction(n.getHeaders)){const d=n.getHeaders(),f=["content-type","content-length"];Object.entries(d).forEach(([l,h])=>{f.includes(l.toLowerCase())&&o.set(l,h)})}}if(R.hasStandardBrowserEnv&&(r&&a.isFunction(r)&&(r=r(t)),r||r!==!1&&An(t.url))){const d=s&&i&&xn.read(i);d&&o.set(s,d)}return t},Pn=typeof XMLHttpRequest<"u",Fn=Pn&&function(e){return new Promise(function(n,r){const s=at(e);let i=s.data;const o=A.from(s.headers).normalize();let{responseType:c,onUploadProgress:d,onDownloadProgress:f}=s,l,h,b,S,u;function m(){S&&S(),u&&u(),s.cancelToken&&s.cancelToken.unsubscribe(l),s.signal&&s.signal.removeEventListener("abort",l)}let p=new XMLHttpRequest;p.open(s.method.toUpperCase(),s.url,!0),p.timeout=s.timeout;function E(){if(!p)return;const g=A.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),N={data:!c||c==="text"||c==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:g,config:e,request:p};ot(function(C){n(C),m()},function(C){r(C),m()},N),p=null}"onloadend"in p?p.onloadend=E:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(E)},p.onabort=function(){p&&(r(new y("Request aborted",y.ECONNABORTED,e,p)),p=null)},p.onerror=function(O){const N=O&&O.message?O.message:"Network Error",B=new y(N,y.ERR_NETWORK,e,p);B.event=O||null,r(B),p=null},p.ontimeout=function(){let O=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const N=s.transitional||nt;s.timeoutErrorMessage&&(O=s.timeoutErrorMessage),r(new y(O,N.clarifyTimeoutError?y.ETIMEDOUT:y.ECONNABORTED,e,p)),p=null},i===void 0&&o.setContentType(null),"setRequestHeader"in p&&a.forEach(o.toJSON(),function(O,N){p.setRequestHeader(N,O)}),a.isUndefined(s.withCredentials)||(p.withCredentials=!!s.withCredentials),c&&c!=="json"&&(p.responseType=s.responseType),f&&([b,u]=ne(f,!0),p.addEventListener("progress",b)),d&&p.upload&&([h,S]=ne(d),p.upload.addEventListener("progress",h),p.upload.addEventListener("loadend",S)),(s.cancelToken||s.signal)&&(l=g=>{p&&(r(!g||g.type?new $(null,e,p):g),p.abort(),p=null)},s.cancelToken&&s.cancelToken.subscribe(l),s.signal&&(s.signal.aborted?l():s.signal.addEventListener("abort",l)));const x=Rn(s.url);if(x&&R.protocols.indexOf(x)===-1){r(new y("Unsupported protocol "+x+":",y.ERR_BAD_REQUEST,e));return}p.send(i||null)})},_n=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,s;const i=function(f){if(!s){s=!0,c();const l=f instanceof Error?f:this.reason;r.abort(l instanceof y?l:new $(l instanceof Error?l.message:l))}};let o=t&&setTimeout(()=>{o=null,i(new y(`timeout ${t} of ms exceeded`,y.ETIMEDOUT))},t);const c=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(f=>{f.unsubscribe?f.unsubscribe(i):f.removeEventListener("abort",i)}),e=null)};e.forEach(f=>f.addEventListener("abort",i));const{signal:d}=r;return d.unsubscribe=()=>a.asap(c),d}},Un=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,s;for(;r<n;)s=r+t,yield e.slice(r,s),r=s},Ln=async function*(e,t){for await(const n of Bn(e))yield*Un(n,t)},Bn=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},ke=(e,t,n,r)=>{const s=Ln(e,t);let i=0,o,c=d=>{o||(o=!0,r&&r(d))};return new ReadableStream({async pull(d){try{const{done:f,value:l}=await s.next();if(f){c(),d.close();return}let h=l.byteLength;if(n){let b=i+=h;n(b)}d.enqueue(new Uint8Array(l))}catch(f){throw c(f),f}},cancel(d){return c(d),s.return()}},{highWaterMark:2})},De=64*1024,{isFunction:Z}=a,kn=(({Request:e,Response:t})=>({Request:e,Response:t}))(a.global),{ReadableStream:je,TextEncoder:qe}=a.global,He=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Dn=e=>{e=a.merge.call({skipUndefined:!0},kn,e);const{fetch:t,Request:n,Response:r}=e,s=t?Z(t):typeof fetch=="function",i=Z(n),o=Z(r);if(!s)return!1;const c=s&&Z(je),d=s&&(typeof qe=="function"?(u=>m=>u.encode(m))(new qe):async u=>new Uint8Array(await new n(u).arrayBuffer())),f=i&&c&&He(()=>{let u=!1;const m=new n(R.origin,{body:new je,method:"POST",get duplex(){return u=!0,"half"}}).headers.has("Content-Type");return u&&!m}),l=o&&c&&He(()=>a.isReadableStream(new r("").body)),h={stream:l&&(u=>u.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(u=>{!h[u]&&(h[u]=(m,p)=>{let E=m&&m[u];if(E)return E.call(m);throw new y(`Response type '${u}' is not supported`,y.ERR_NOT_SUPPORT,p)})});const b=async u=>{if(u==null)return 0;if(a.isBlob(u))return u.size;if(a.isSpecCompliantForm(u))return(await new n(R.origin,{method:"POST",body:u}).arrayBuffer()).byteLength;if(a.isArrayBufferView(u)||a.isArrayBuffer(u))return u.byteLength;if(a.isURLSearchParams(u)&&(u=u+""),a.isString(u))return(await d(u)).byteLength},S=async(u,m)=>{const p=a.toFiniteNumber(u.getContentLength());return p??b(m)};return async u=>{let{url:m,method:p,data:E,signal:x,cancelToken:g,timeout:O,onDownloadProgress:N,onUploadProgress:B,responseType:C,headers:ce,withCredentials:X="same-origin",fetchOptions:Se}=at(u),Re=t||fetch;C=C?(C+"").toLowerCase():"text";let G=_n([x,g&&g.toAbortSignal()],O),z=null;const k=G&&G.unsubscribe&&(()=>{G.unsubscribe()});let Oe;try{if(B&&f&&p!=="get"&&p!=="head"&&(Oe=await S(ce,E))!==0){let L=new n(m,{method:"POST",body:E,duplex:"half"}),H;if(a.isFormData(E)&&(H=L.headers.get("content-type"))&&ce.setContentType(H),L.body){const[le,Q]=Ue(Oe,ne(Le(B)));E=ke(L.body,De,le,Q)}}a.isString(X)||(X=X?"include":"omit");const F=i&&"credentials"in n.prototype,Te={...Se,signal:G,method:p.toUpperCase(),headers:ce.normalize().toJSON(),body:E,duplex:"half",credentials:F?X:void 0};z=i&&new n(m,Te);let U=await(i?Re(z,Se):Re(m,Te));const Ae=l&&(C==="stream"||C==="response");if(l&&(N||Ae&&k)){const L={};["status","statusText","headers"].forEach(xe=>{L[xe]=U[xe]});const H=a.toFiniteNumber(U.headers.get("content-length")),[le,Q]=N&&Ue(H,ne(Le(N),!0))||[];U=new r(ke(U.body,De,le,()=>{Q&&Q(),k&&k()}),L)}C=C||"text";let pt=await h[a.findKey(h,C)||"text"](U,u);return!Ae&&k&&k(),await new Promise((L,H)=>{ot(L,H,{data:pt,headers:A.from(U.headers),status:U.status,statusText:U.statusText,config:u,request:z})})}catch(F){throw k&&k(),F&&F.name==="TypeError"&&/Load failed|fetch/i.test(F.message)?Object.assign(new y("Network Error",y.ERR_NETWORK,u,z),{cause:F.cause||F}):y.from(F,F&&F.code,u,z)}}},jn=new Map,ct=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:s}=t,i=[r,s,n];let o=i.length,c=o,d,f,l=jn;for(;c--;)d=i[c],f=l.get(d),f===void 0&&l.set(d,f=c?new Map:Dn(t)),l=f;return f};ct();const ge={http:Yt,xhr:Fn,fetch:{get:ct}};a.forEach(ge,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Ie=e=>`- ${e}`,qn=e=>a.isFunction(e)||e===null||e===!1;function Hn(e,t){e=a.isArray(e)?e:[e];const{length:n}=e;let r,s;const i={};for(let o=0;o<n;o++){r=e[o];let c;if(s=r,!qn(r)&&(s=ge[(c=String(r)).toLowerCase()],s===void 0))throw new y(`Unknown adapter '${c}'`);if(s&&(a.isFunction(s)||(s=s.get(t))))break;i[c||"#"+o]=s}if(!s){const o=Object.entries(i).map(([d,f])=>`adapter ${d} `+(f===!1?"is not supported by the environment":"is not available in the build"));let c=n?o.length>1?`since :
4
- `+o.map(Ie).join(`
5
- `):" "+Ie(o[0]):"as no adapter specified";throw new y("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return s}const lt={getAdapter:Hn,adapters:ge};function de(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new $(null,e)}function Me(e){return de(e),e.headers=A.from(e.headers),e.data=fe.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),lt.getAdapter(e.adapter||v.adapter,e)(e).then(function(r){return de(e),r.data=fe.call(e,e.transformResponse,r),r.headers=A.from(r.headers),r},function(r){return st(r)||(de(e),r&&r.response&&(r.response.data=fe.call(e,e.transformResponse,r.response),r.response.headers=A.from(r.response.headers))),Promise.reject(r)})}const ut="1.13.2",ae={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ae[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const $e={};ae.transitional=function(t,n,r){function s(i,o){return"[Axios v"+ut+"] Transitional option '"+i+"'"+o+(r?". "+r:"")}return(i,o,c)=>{if(t===!1)throw new y(s(o," has been removed"+(n?" in "+n:"")),y.ERR_DEPRECATED);return n&&!$e[o]&&($e[o]=!0,console.warn(s(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,o,c):!0}};ae.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function In(e,t,n){if(typeof e!="object")throw new y("options must be an object",y.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const i=r[s],o=t[i];if(o){const c=e[i],d=c===void 0||o(c,i,e);if(d!==!0)throw new y("option "+i+" must be "+d,y.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new y("Unknown option "+i,y.ERR_BAD_OPTION)}}const te={assertOptions:In,validators:ae},_=te.validators;let j=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Fe,response:new Fe}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const i=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
6
- `+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=q(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:i}=n;r!==void 0&&te.assertOptions(r,{silentJSONParsing:_.transitional(_.boolean),forcedJSONParsing:_.transitional(_.boolean),clarifyTimeoutError:_.transitional(_.boolean)},!1),s!=null&&(a.isFunction(s)?n.paramsSerializer={serialize:s}:te.assertOptions(s,{encode:_.function,serialize:_.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),te.assertOptions(n,{baseUrl:_.spelling("baseURL"),withXsrfToken:_.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=i&&a.merge(i.common,i[n.method]);i&&a.forEach(["delete","get","head","post","put","patch","common"],u=>{delete i[u]}),n.headers=A.concat(o,i);const c=[];let d=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(d=d&&m.synchronous,c.unshift(m.fulfilled,m.rejected))});const f=[];this.interceptors.response.forEach(function(m){f.push(m.fulfilled,m.rejected)});let l,h=0,b;if(!d){const u=[Me.bind(this),void 0];for(u.unshift(...c),u.push(...f),b=u.length,l=Promise.resolve(n);h<b;)l=l.then(u[h++],u[h++]);return l}b=c.length;let S=n;for(;h<b;){const u=c[h++],m=c[h++];try{S=u(S)}catch(p){m.call(this,p);break}}try{l=Me.call(this,S)}catch(u){return Promise.reject(u)}for(h=0,b=f.length;h<b;)l=l.then(f[h++],f[h++]);return l}getUri(t){t=q(this.defaults,t);const n=it(t.baseURL,t.url,t.allowAbsoluteUrls);return tt(n,t.params,t.paramsSerializer)}};a.forEach(["delete","get","head","options"],function(t){j.prototype[t]=function(n,r){return this.request(q(r||{},{method:t,url:n,data:(r||{}).data}))}});a.forEach(["post","put","patch"],function(t){function n(r){return function(i,o,c){return this.request(q(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}j.prototype[t]=n(),j.prototype[t+"Form"]=n(!0)});let Mn=class ft{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(s=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](s);r._listeners=null}),this.promise.then=s=>{let i;const o=new Promise(c=>{r.subscribe(c),i=c}).then(s);return o.cancel=function(){r.unsubscribe(i)},o},t(function(i,o,c){r.reason||(r.reason=new $(i,o,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new ft(function(s){t=s}),cancel:t}}};function $n(e){return function(n){return e.apply(null,n)}}function zn(e){return a.isObject(e)&&e.isAxiosError===!0}const ye={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(ye).forEach(([e,t])=>{ye[t]=e});function dt(e){const t=new j(e),n=ze(j.prototype.request,t);return a.extend(n,j.prototype,t,{allOwnKeys:!0}),a.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return dt(q(e,s))},n}const w=dt(v);w.Axios=j;w.CanceledError=$;w.CancelToken=Mn;w.isCancel=st;w.VERSION=ut;w.toFormData=ie;w.AxiosError=y;w.Cancel=w.CanceledError;w.all=function(t){return Promise.all(t)};w.spread=$n;w.isAxiosError=zn;w.mergeConfig=q;w.AxiosHeaders=A;w.formToJSON=e=>rt(a.isHTMLForm(e)?new FormData(e):e);w.getAdapter=lt.getAdapter;w.HttpStatusCode=ye;w.default=w;const{Axios:Wn,AxiosError:Kn,CanceledError:vn,isCancel:Xn,CancelToken:Gn,VERSION:Qn,all:Zn,Cancel:Yn,isAxiosError:er,spread:tr,toFormData:nr,AxiosHeaders:rr,HttpStatusCode:sr,formToJSON:or,getAdapter:ir,mergeConfig:ar}=w;export{Wn as Axios,Kn as AxiosError,rr as AxiosHeaders,Yn as Cancel,Gn as CancelToken,vn as CanceledError,sr as HttpStatusCode,Qn as VERSION,Zn as all,w as default,or as formToJSON,ir as getAdapter,er as isAxiosError,Xn as isCancel,ar as mergeConfig,tr as spread,nr as toFormData};
@@ -1,2 +0,0 @@
1
- import{al as Ge,am as Q,r as _,bT as mt,an as bt,w as J,bi as yt,bj as Tt,z as se,l as kt,bU as Ot,bV as wt,bW as Rt,j as Z,q as De,o as xe,p as St,ab as Mt,ac as $t,bX as oe}from"./index.CPc_uZux.js";import{h as _t}from"./moment.C7qA8nIE.js";import{w as Et}from"./withCalculatedWidth.DYeqePuh.js";import{u as It}from"./useBasicWidgetState.DvpdEDYZ.js";import{f as Dt}from"./formatMoment.C6Hwn6X5.js";import{f as xt}from"./formatNumber.DB5irY8c.js";import"./FormClearHelper.DTFnX0js.js";import"./numbro.B9_PXfzp.js";import"./sprintf.DpPCfzXw.js";var ce={},H={},le={},de={},He;function Ce(){if(He)return de;He=1,Object.defineProperty(de,"__esModule",{value:!0}),de.Direction=void 0;var e;return(function(r){r.Right="to right",r.Left="to left",r.Down="to bottom",r.Up="to top"})(e||(de.Direction=e={})),de}var We;function Je(){return We||(We=1,(function(e){var r=le&&le.__spreadArray||function(i,s,u){if(u||arguments.length===2)for(var p=0,m=s.length,v;p<m;p++)(v||!(p in s))&&(v||(v=Array.prototype.slice.call(s,0,p)),v[p]=s[p]);return i.concat(v||Array.prototype.slice.call(s))};Object.defineProperty(e,"__esModule",{value:!0}),e.isIOS=e.useThumbOverlap=e.assertUnreachable=e.voidFn=e.getTrackBackground=e.replaceAt=e.schd=e.translate=e.getClosestThumbIndex=e.translateThumbs=e.getPaddingAndBorder=e.getMargin=e.checkInitialOverlap=e.checkValuesAgainstBoundaries=e.checkBoundaries=e.isVertical=e.relativeValue=e.normalizeValue=e.isStepDivisible=e.isTouchEvent=e.getStepDecimals=void 0;var n=Ge(),o=Ce(),h=function(i){var s=i.toString().split(".")[1];return s?s.length:0};e.getStepDecimals=h;function O(i){return i.touches&&i.touches.length||i.changedTouches&&i.changedTouches.length}e.isTouchEvent=O;function l(i,s,u){var p=(s-i)/u,m=8,v=Number(p.toFixed(m));return parseInt(v.toString(),10)===v}e.isStepDivisible=l;function g(i,s,u,p,m,v,b){var $=1e11;if(i=Math.round(i*$)/$,!v){var C=b[s-1],E=b[s+1];if(C&&C>i)return C;if(E&&E<i)return E}if(i>p)return p;if(i<u)return u;var U=Math.floor(i*$-u*$)%Math.floor(m*$),z=Math.floor(i*$-Math.abs(U)),W=U===0?i:z/$,A=Math.abs(U/$)<m/2?W:W+m,B=(0,e.getStepDecimals)(m);return parseFloat(A.toFixed(B))}e.normalizeValue=g;function F(i,s,u){return(i-s)/(u-s)}e.relativeValue=F;function V(i){return i===o.Direction.Up||i===o.Direction.Down}e.isVertical=V;function j(i,s,u){if(s>=u)throw new RangeError("min (".concat(s,") is equal/bigger than max (").concat(u,")"));if(i<s)throw new RangeError("value (".concat(i,") is smaller than min (").concat(s,")"));if(i>u)throw new RangeError("value (".concat(i,") is bigger than max (").concat(u,")"))}e.checkBoundaries=j;function I(i,s,u){return i<s?s:i>u?u:i}e.checkValuesAgainstBoundaries=I;function T(i){if(!(i.length<2)&&!i.slice(1).every(function(s,u){return i[u]<=s}))throw new RangeError("values={[".concat(i,"]} needs to be sorted when allowOverlap={false}"))}e.checkInitialOverlap=T;function d(i){var s=window.getComputedStyle(i);return{top:parseInt(s["margin-top"],10),bottom:parseInt(s["margin-bottom"],10),left:parseInt(s["margin-left"],10),right:parseInt(s["margin-right"],10)}}e.getMargin=d;function t(i){var s=window.getComputedStyle(i);return{top:parseInt(s["padding-top"],10)+parseInt(s["border-top-width"],10),bottom:parseInt(s["padding-bottom"],10)+parseInt(s["border-bottom-width"],10),left:parseInt(s["padding-left"],10)+parseInt(s["border-left-width"],10),right:parseInt(s["padding-right"],10)+parseInt(s["border-right-width"],10)}}e.getPaddingAndBorder=t;function a(i,s,u){var p=u?-1:1;i.forEach(function(m,v){return f(m,p*s[v].x,s[v].y)})}e.translateThumbs=a;function c(i,s,u,p){for(var m=0,v=L(i[0],s,u,p),b=1;b<i.length;b++){var $=L(i[b],s,u,p);$<v&&(v=$,m=b)}return m}e.getClosestThumbIndex=c;function f(i,s,u){i.style.transform="translate(".concat(s,"px, ").concat(u,"px)")}e.translate=f;var y=function(i){var s=[],u=null,p=function(){for(var m=[],v=0;v<arguments.length;v++)m[v]=arguments[v];s=m,!u&&(u=requestAnimationFrame(function(){u=null,i.apply(void 0,s)}))};return p};e.schd=y;function k(i,s,u){var p=i.slice(0);return p[s]=u,p}e.replaceAt=k;function D(i){var s=i.values,u=i.colors,p=i.min,m=i.max,v=i.direction,b=v===void 0?o.Direction.Right:v,$=i.rtl,C=$===void 0?!1:$;C&&b===o.Direction.Right?b=o.Direction.Left:C&&o.Direction.Left&&(b=o.Direction.Right);var E=s.slice(0).sort(function(z,W){return z-W}).map(function(z){return(z-p)/(m-p)*100}),U=E.reduce(function(z,W,A){return"".concat(z,", ").concat(u[A]," ").concat(W,"%, ").concat(u[A+1]," ").concat(W,"%")},"");return"linear-gradient(".concat(b,", ").concat(u[0]," 0%").concat(U,", ").concat(u[u.length-1]," 100%)")}e.getTrackBackground=D;function w(){}e.voidFn=w;function R(i){throw new Error("Didn't expect to get here")}e.assertUnreachable=R;var M=function(i,s,u,p,m){m===void 0&&(m=function(b){return b});var v=Math.ceil(r([i],Array.from(i.children),!0).reduce(function(b,$){var C=Math.ceil($.getBoundingClientRect().width);if($.innerText&&$.innerText.includes(u)&&$.childElementCount===0){var E=$.cloneNode(!0);E.innerHTML=m(s.toFixed(p)),E.style.visibility="hidden",document.body.appendChild(E),C=Math.ceil(E.getBoundingClientRect().width),document.body.removeChild(E)}return C>b?C:b},i.getBoundingClientRect().width));return v},P=function(i,s,u,p,m,v,b){b===void 0&&(b=function(E){return E});var $=[],C=function(E){var U=M(u[E],p[E],m,v,b),z=s[E].x;s.forEach(function(W,A){var B=W.x,G=M(u[A],p[A],m,v,b);E!==A&&(z>=B&&z<=B+G||z+U>=B&&z+U<=B+G)&&($.includes(A)||($.push(E),$.push(A),$=r(r([],$,!0),[E,A],!1),C(A)))})};return C(i),Array.from(new Set($.sort()))},S=function(i,s,u,p,m,v){p===void 0&&(p=.1),m===void 0&&(m=" - "),v===void 0&&(v=function(A){return A});var b=(0,e.getStepDecimals)(p),$=(0,n.useState)({}),C=$[0],E=$[1],U=(0,n.useState)(v(s[u].toFixed(b))),z=U[0],W=U[1];return(0,n.useEffect)(function(){if(i){var A=i.getThumbs();if(A.length<1)return;var B={},G=i.getOffsets(),ne=P(u,G,A,s,m,b,v),he=v(s[u].toFixed(b));if(ne.length){var ee=ne.reduce(function(te,ue,me,be){return te.length?r(r([],te,!0),[G[be[me]].x],!1):[G[be[me]].x]},[]);if(Math.min.apply(Math,ee)===G[u].x){var ge=[];ne.forEach(function(te){ge.push(s[te].toFixed(b))}),he=Array.from(new Set(ge.sort(function(te,ue){return parseFloat(te)-parseFloat(ue)}))).map(v).join(m);var pe=Math.min.apply(Math,ee),ve=Math.max.apply(Math,ee),Ie=A[ne[ee.indexOf(ve)]].getBoundingClientRect().width;B.left="".concat(Math.abs(pe-(ve+Ie))/2,"px"),B.transform="translate(-50%, 0)"}else B.visibility="hidden"}W(he),E(B)}},[i,s]),[z,C]};e.useThumbOverlap=S;function L(i,s,u,p){var m=i.getBoundingClientRect(),v=m.left,b=m.top,$=m.width,C=m.height;return V(p)?Math.abs(u-(b+C/2)):Math.abs(s-(v+$/2))}var x=function(){var i,s=((i=navigator.userAgentData)===null||i===void 0?void 0:i.platform)||navigator.platform;return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(s)||navigator.userAgent.includes("Mac")&&"ontouchend"in document};e.isIOS=x})(le)),le}var qe;function Ct(){if(qe)return H;qe=1;var e=H&&H.__extends||(function(){var I=function(T,d){return I=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,a){t.__proto__=a}||function(t,a){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(t[c]=a[c])},I(T,d)};return function(T,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");I(T,d);function t(){this.constructor=T}T.prototype=d===null?Object.create(d):(t.prototype=d.prototype,new t)}})(),r=H&&H.__createBinding||(Object.create?(function(I,T,d,t){t===void 0&&(t=d);var a=Object.getOwnPropertyDescriptor(T,d);(!a||("get"in a?!T.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return T[d]}}),Object.defineProperty(I,t,a)}):(function(I,T,d,t){t===void 0&&(t=d),I[t]=T[d]})),n=H&&H.__setModuleDefault||(Object.create?(function(I,T){Object.defineProperty(I,"default",{enumerable:!0,value:T})}):function(I,T){I.default=T}),o=H&&H.__importStar||function(I){if(I&&I.__esModule)return I;var T={};if(I!=null)for(var d in I)d!=="default"&&Object.prototype.hasOwnProperty.call(I,d)&&r(T,I,d);return n(T,I),T},h=H&&H.__spreadArray||function(I,T,d){if(d||arguments.length===2)for(var t=0,a=T.length,c;t<a;t++)(c||!(t in T))&&(c||(c=Array.prototype.slice.call(T,0,t)),c[t]=T[t]);return I.concat(c||Array.prototype.slice.call(T))};Object.defineProperty(H,"__esModule",{value:!0});var O=o(Ge()),l=Je(),g=Ce(),F=["ArrowRight","ArrowUp","k","PageUp"],V=["ArrowLeft","ArrowDown","j","PageDown"],j=(function(I){e(T,I);function T(d){var t=I.call(this,d)||this;if(t.trackRef=O.createRef(),t.thumbRefs=[],t.state={draggedTrackPos:[-1,-1],draggedThumbIndex:-1,thumbZIndexes:new Array(t.props.values.length).fill(0).map(function(a,c){return c}),isChanged:!1,markOffsets:[]},t.getOffsets=function(){var a=t.props,c=a.direction,f=a.values,y=a.min,k=a.max,D=t.trackRef.current;if(!D)return console.warn("No track element found."),[];var w=D.getBoundingClientRect(),R=(0,l.getPaddingAndBorder)(D);return t.getThumbs().map(function(M,P){var S={x:0,y:0},L=M.getBoundingClientRect(),x=(0,l.getMargin)(M);switch(c){case g.Direction.Right:return S.x=(x.left+R.left)*-1,S.y=((L.height-w.height)/2+R.top)*-1,S.x+=w.width*(0,l.relativeValue)(f[P],y,k)-L.width/2,S;case g.Direction.Left:return S.x=(x.right+R.right)*-1,S.y=((L.height-w.height)/2+R.top)*-1,S.x+=w.width-w.width*(0,l.relativeValue)(f[P],y,k)-L.width/2,S;case g.Direction.Up:return S.x=((L.width-w.width)/2+x.left+R.left)*-1,S.y=-R.left,S.y+=w.height-w.height*(0,l.relativeValue)(f[P],y,k)-L.height/2,S;case g.Direction.Down:return S.x=((L.width-w.width)/2+x.left+R.left)*-1,S.y=-R.left,S.y+=w.height*(0,l.relativeValue)(f[P],y,k)-L.height/2,S;default:return(0,l.assertUnreachable)(c)}})},t.getThumbs=function(){return t.trackRef&&t.trackRef.current?Array.from(t.trackRef.current.children).filter(function(a){return a.hasAttribute("aria-valuenow")}):(console.warn("No thumbs found in the track container. Did you forget to pass & spread the `props` param in renderTrack?"),[])},t.getTargetIndex=function(a){return t.getThumbs().findIndex(function(c){return c===a.target||c.contains(a.target)})},t.addTouchEvents=function(a){document.addEventListener("touchmove",t.schdOnTouchMove,{passive:!1}),document.addEventListener("touchend",t.schdOnEnd,{passive:!1}),document.addEventListener("touchcancel",t.schdOnEnd,{passive:!1})},t.addMouseEvents=function(a){document.addEventListener("mousemove",t.schdOnMouseMove),document.addEventListener("mouseup",t.schdOnEnd)},t.onMouseDownTrack=function(a){var c;if(!(a.button!==0||(0,l.isIOS)()))if(a.persist(),a.preventDefault(),t.addMouseEvents(a.nativeEvent),t.props.values.length>1&&t.props.draggableTrack){if(t.thumbRefs.some(function(y){var k;return(k=y.current)===null||k===void 0?void 0:k.contains(a.target)}))return;t.setState({draggedTrackPos:[a.clientX,a.clientY]},function(){return t.onMove(a.clientX,a.clientY)})}else{var f=(0,l.getClosestThumbIndex)(t.thumbRefs.map(function(y){return y.current}),a.clientX,a.clientY,t.props.direction);(c=t.thumbRefs[f].current)===null||c===void 0||c.focus(),t.setState({draggedThumbIndex:f},function(){return t.onMove(a.clientX,a.clientY)})}},t.onResize=function(){(0,l.translateThumbs)(t.getThumbs(),t.getOffsets(),t.props.rtl),t.calculateMarkOffsets()},t.onTouchStartTrack=function(a){var c;if(a.persist(),t.addTouchEvents(a.nativeEvent),t.props.values.length>1&&t.props.draggableTrack){if(t.thumbRefs.some(function(y){var k;return(k=y.current)===null||k===void 0?void 0:k.contains(a.target)}))return;t.setState({draggedTrackPos:[a.touches[0].clientX,a.touches[0].clientY]},function(){return t.onMove(a.touches[0].clientX,a.touches[0].clientY)})}else{var f=(0,l.getClosestThumbIndex)(t.thumbRefs.map(function(y){return y.current}),a.touches[0].clientX,a.touches[0].clientY,t.props.direction);(c=t.thumbRefs[f].current)===null||c===void 0||c.focus(),t.setState({draggedThumbIndex:f},function(){return t.onMove(a.touches[0].clientX,a.touches[0].clientY)})}},t.onMouseOrTouchStart=function(a){if(!t.props.disabled){var c=(0,l.isTouchEvent)(a);if(!(!c&&a.button!==0)){var f=t.getTargetIndex(a);f!==-1&&(c?t.addTouchEvents(a):t.addMouseEvents(a),t.setState({draggedThumbIndex:f,thumbZIndexes:t.state.thumbZIndexes.map(function(y,k){return k===f?Math.max.apply(Math,t.state.thumbZIndexes):y<=t.state.thumbZIndexes[f]?y:y-1})}))}}},t.onMouseMove=function(a){a.preventDefault(),t.onMove(a.clientX,a.clientY)},t.onTouchMove=function(a){a.preventDefault(),t.onMove(a.touches[0].clientX,a.touches[0].clientY)},t.onKeyDown=function(a){var c=t.props,f=c.values,y=c.onChange,k=c.step,D=c.rtl,w=c.direction,R=t.state.isChanged,M=t.getTargetIndex(a.nativeEvent),P=D||w===g.Direction.Left||w===g.Direction.Down?-1:1;M!==-1&&(F.includes(a.key)?(a.preventDefault(),t.setState({draggedThumbIndex:M,isChanged:!0}),y((0,l.replaceAt)(f,M,t.normalizeValue(f[M]+P*(a.key==="PageUp"?k*10:k),M)))):V.includes(a.key)?(a.preventDefault(),t.setState({draggedThumbIndex:M,isChanged:!0}),y((0,l.replaceAt)(f,M,t.normalizeValue(f[M]-P*(a.key==="PageDown"?k*10:k),M)))):a.key==="Tab"?t.setState({draggedThumbIndex:-1},function(){R&&t.fireOnFinalChange()}):R&&t.fireOnFinalChange())},t.onKeyUp=function(a){var c=t.state.isChanged;t.setState({draggedThumbIndex:-1},function(){c&&t.fireOnFinalChange()})},t.onMove=function(a,c){var f=t.state,y=f.draggedThumbIndex,k=f.draggedTrackPos,D=t.props,w=D.direction,R=D.min,M=D.max,P=D.onChange,S=D.values,L=D.step,x=D.rtl;if(y===-1&&k[0]===-1&&k[1]===-1)return null;var i=t.trackRef.current;if(!i)return null;var s=i.getBoundingClientRect(),u=(0,l.isVertical)(w)?s.height:s.width;if(k[0]!==-1&&k[1]!==-1){var p=a-k[0],m=c-k[1],v=0;switch(w){case g.Direction.Right:case g.Direction.Left:v=p/u*(M-R);break;case g.Direction.Down:case g.Direction.Up:v=m/u*(M-R);break;default:(0,l.assertUnreachable)(w)}if(x&&(v*=-1),Math.abs(v)>=L/2){for(var b=0;b<t.thumbRefs.length;b++){if(S[b]===M&&Math.sign(v)===1||S[b]===R&&Math.sign(v)===-1)return;var $=S[b]+v;$>M?v=M-S[b]:$<R&&(v=R-S[b])}for(var C=S.slice(0),b=0;b<t.thumbRefs.length;b++)C=(0,l.replaceAt)(C,b,t.normalizeValue(S[b]+v,b));t.setState({draggedTrackPos:[a,c]}),P(C)}}else{var E=0;switch(w){case g.Direction.Right:E=(a-s.left)/u*(M-R)+R;break;case g.Direction.Left:E=(u-(a-s.left))/u*(M-R)+R;break;case g.Direction.Down:E=(c-s.top)/u*(M-R)+R;break;case g.Direction.Up:E=(u-(c-s.top))/u*(M-R)+R;break;default:(0,l.assertUnreachable)(w)}x&&(E=M+R-E),Math.abs(S[y]-E)>=L/2&&P((0,l.replaceAt)(S,y,t.normalizeValue(E,y)))}},t.normalizeValue=function(a,c){var f=t.props,y=f.min,k=f.max,D=f.step,w=f.allowOverlap,R=f.values;return(0,l.normalizeValue)(a,c,y,k,D,w,R)},t.onEnd=function(a){if(a.preventDefault(),document.removeEventListener("mousemove",t.schdOnMouseMove),document.removeEventListener("touchmove",t.schdOnTouchMove),document.removeEventListener("mouseup",t.schdOnEnd),document.removeEventListener("touchend",t.schdOnEnd),document.removeEventListener("touchcancel",t.schdOnEnd),t.state.draggedThumbIndex===-1&&t.state.draggedTrackPos[0]===-1&&t.state.draggedTrackPos[1]===-1)return null;t.setState({draggedThumbIndex:-1,draggedTrackPos:[-1,-1]},function(){t.fireOnFinalChange()})},t.fireOnFinalChange=function(){t.setState({isChanged:!1});var a=t.props,c=a.onFinalChange,f=a.values;c&&c(f)},t.updateMarkRefs=function(a){if(!a.renderMark){t.numOfMarks=void 0,t.markRefs=void 0;return}t.numOfMarks=(a.max-a.min)/t.props.step,t.markRefs=[];for(var c=0;c<t.numOfMarks+1;c++)t.markRefs[c]=O.createRef()},t.calculateMarkOffsets=function(){if(!(!t.props.renderMark||!t.trackRef||!t.numOfMarks||!t.markRefs||t.trackRef.current===null)){for(var a=window.getComputedStyle(t.trackRef.current),c=parseInt(a.width,10),f=parseInt(a.height,10),y=parseInt(a.paddingLeft,10),k=parseInt(a.paddingTop,10),D=[],w=0;w<t.numOfMarks+1;w++){var R=9999,M=9999;if(t.markRefs[w].current){var P=t.markRefs[w].current.getBoundingClientRect();R=P.height,M=P.width}t.props.direction===g.Direction.Left||t.props.direction===g.Direction.Right?D.push([Math.round(c/t.numOfMarks*w+y-M/2),-Math.round((R-f)/2)]):D.push([Math.round(f/t.numOfMarks*w+k-R/2),-Math.round((M-c)/2)])}t.setState({markOffsets:D})}},d.step===0)throw new Error('"step" property should be a positive number');return t.schdOnMouseMove=(0,l.schd)(t.onMouseMove),t.schdOnTouchMove=(0,l.schd)(t.onTouchMove),t.schdOnEnd=(0,l.schd)(t.onEnd),t.thumbRefs=d.values.map(function(){return O.createRef()}),t.updateMarkRefs(d),t}return T.prototype.componentDidMount=function(){var d=this,t=this.props,a=t.values,c=t.min,f=t.step;this.resizeObserver=window.ResizeObserver?new window.ResizeObserver(this.onResize):{observe:function(){return window.addEventListener("resize",d.onResize)},unobserve:function(){return window.removeEventListener("resize",d.onResize)}},document.addEventListener("touchstart",this.onMouseOrTouchStart,{passive:!1}),document.addEventListener("mousedown",this.onMouseOrTouchStart,{passive:!1}),!this.props.allowOverlap&&(0,l.checkInitialOverlap)(this.props.values),this.props.values.forEach(function(y){return(0,l.checkBoundaries)(y,d.props.min,d.props.max)}),this.resizeObserver.observe(this.trackRef.current),(0,l.translateThumbs)(this.getThumbs(),this.getOffsets(),this.props.rtl),this.calculateMarkOffsets(),a.forEach(function(y){(0,l.isStepDivisible)(c,y,f)||console.warn("The `values` property is in conflict with the current `step`, `min`, and `max` properties. Please provide values that are accessible using the min, max, and step values.")})},T.prototype.componentDidUpdate=function(d,t){var a=this.props,c=a.max,f=a.min,y=a.step,k=a.values,D=a.rtl;(d.max!==c||d.min!==f||d.step!==y)&&this.updateMarkRefs(this.props),(0,l.translateThumbs)(this.getThumbs(),this.getOffsets(),D),(d.max!==c||d.min!==f||d.step!==y||t.markOffsets.length!==this.state.markOffsets.length)&&(this.calculateMarkOffsets(),k.forEach(function(w){(0,l.isStepDivisible)(f,w,y)||console.warn("The `values` property is in conflict with the current `step`, `min`, and `max` properties. Please provide values that are accessible using the min, max, and step values.")}))},T.prototype.componentWillUnmount=function(){var d={passive:!1};document.removeEventListener("mousedown",this.onMouseOrTouchStart,d),document.removeEventListener("mousemove",this.schdOnMouseMove),document.removeEventListener("touchmove",this.schdOnTouchMove),document.removeEventListener("touchstart",this.onMouseOrTouchStart),document.removeEventListener("mouseup",this.schdOnEnd),document.removeEventListener("touchend",this.schdOnEnd),this.resizeObserver.unobserve(this.trackRef.current)},T.prototype.render=function(){var d=this,t=this.props,a=t.label,c=t.labelledBy,f=t.renderTrack,y=t.renderThumb,k=t.renderMark,D=k===void 0?function(){return null}:k,w=t.values,R=t.min,M=t.max,P=t.allowOverlap,S=t.disabled,L=this.state,x=L.draggedThumbIndex,i=L.thumbZIndexes,s=L.markOffsets;return f({props:{style:{transform:"scale(1)",cursor:x>-1?"grabbing":this.props.draggableTrack?(0,l.isVertical)(this.props.direction)?"ns-resize":"ew-resize":w.length===1&&!S?"pointer":"inherit"},onMouseDown:S?l.voidFn:this.onMouseDownTrack,onTouchStart:S?l.voidFn:this.onTouchStartTrack,ref:this.trackRef},isDragged:this.state.draggedThumbIndex>-1,disabled:S,children:h(h([],s.map(function(u,p,m){return D({props:{style:d.props.direction===g.Direction.Left||d.props.direction===g.Direction.Right?{position:"absolute",left:"".concat(u[0],"px"),marginTop:"".concat(u[1],"px")}:{position:"absolute",top:"".concat(u[0],"px"),marginLeft:"".concat(u[1],"px")},key:"mark".concat(p),ref:d.markRefs[p]},index:p})}),!0),w.map(function(u,p){var m=d.state.draggedThumbIndex===p;return y({index:p,value:u,isDragged:m,props:{style:{position:"absolute",zIndex:i[p],cursor:S?"inherit":m?"grabbing":"grab",userSelect:"none",touchAction:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none"},key:p,tabIndex:S?void 0:0,"aria-valuemax":P?M:w[p+1]||M,"aria-valuemin":P?R:w[p-1]||R,"aria-valuenow":u,draggable:!1,ref:d.thumbRefs[p],"aria-label":a,"aria-labelledby":c,role:"slider",onKeyDown:S?l.voidFn:d.onKeyDown,onKeyUp:S?l.voidFn:d.onKeyUp}})}),!0)})},T.defaultProps={label:"Accessibility label",labelledBy:null,step:1,direction:g.Direction.Right,rtl:!1,disabled:!1,allowOverlap:!1,draggableTrack:!1,min:0,max:100},T})(O.Component);return H.default=j,H}var Ke;function Pt(){return Ke||(Ke=1,(function(e){var r=ce&&ce.__importDefault||function(O){return O&&O.__esModule?O:{default:O}};Object.defineProperty(e,"__esModule",{value:!0}),e.checkValuesAgainstBoundaries=e.relativeValue=e.useThumbOverlap=e.Direction=e.getTrackBackground=e.Range=void 0;var n=r(Ct());e.Range=n.default;var o=Je();Object.defineProperty(e,"getTrackBackground",{enumerable:!0,get:function(){return o.getTrackBackground}}),Object.defineProperty(e,"useThumbOverlap",{enumerable:!0,get:function(){return o.useThumbOverlap}}),Object.defineProperty(e,"relativeValue",{enumerable:!0,get:function(){return o.relativeValue}}),Object.defineProperty(e,"checkValuesAgainstBoundaries",{enumerable:!0,get:function(){return o.checkValuesAgainstBoundaries}});var h=Ce();Object.defineProperty(e,"Direction",{enumerable:!0,get:function(){return h.Direction}})})(ce)),ce}var Qe=Pt();function Xe(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(h){return Object.getOwnPropertyDescriptor(e,h).enumerable})),n.push.apply(n,o)}return n}function Te(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?Xe(Object(n),!0).forEach(function(o){Lt(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xe(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function Lt(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}var ke=Q("div",{position:"relative",width:"100%"});ke.displayName="Root";ke.displayName="Root";ke.displayName="StyledRoot";var Oe=Q("div",function(e){var r=e.$theme,n=e.$value,o=n===void 0?[]:n,h=e.$disabled,O=e.$isDragged,l=r.sizing,g="inherit";return h?g="not-allowed":O?g="grabbing":o.length===1&&(g="pointer"),{paddingTop:l.scale600,paddingBottom:l.scale600,paddingRight:l.scale600,paddingLeft:l.scale600,display:"flex",cursor:g,backgroundColor:r.colors.sliderTrackFill}});Oe.displayName="Track";Oe.displayName="Track";Oe.displayName="StyledTrack";var fe=Q("div",function(e){var r=e.$theme,n=e.$value,o=n===void 0?[]:n,h=e.$min,O=e.$max,l=e.$disabled,g=r.colors,F=r.borders,V=r.direction,j=r.borders.useRoundedCorners?F.radius100:0;return{borderTopLeftRadius:j,borderTopRightRadius:j,borderBottomRightRadius:j,borderBottomLeftRadius:j,background:Qe.getTrackBackground({values:o,colors:o.length===1?[l?g.borderOpaque:g.primary,l?g.backgroundSecondary:g.borderOpaque]:[l?g.backgroundSecondary:g.borderOpaque,l?g.borderOpaque:g.primary,l?g.backgroundSecondary:g.borderOpaque],min:h||0,max:O||0,rtl:V==="rtl"}),height:"2px",width:"100%",alignSelf:"center",cursor:l?"not-allowed":"inherit"}});fe.displayName="InnerTrack";fe.displayName="InnerTrack";fe.displayName="StyledInnerTrack";var we=Q("div",function(e){return{width:"4px",height:"2px",backgroundColor:e.$theme.colors.backgroundPrimary,marginLeft:"16px"}});we.displayName="Mark";we.displayName="Mark";we.displayName="StyledMark";var Re=Q("div",function(e){return Te(Te({},e.$theme.typography.font200),{},{color:e.$theme.colors.contentPrimary})});Re.displayName="Tick";Re.displayName="Tick";Re.displayName="StyledTick";var Se=Q("div",function(e){var r=e.$theme,n=r.sizing;return{display:"flex",justifyContent:"space-between",alignItems:"center",paddingRight:n.scale600,paddingLeft:n.scale600,paddingBottom:n.scale400}});Se.displayName="TickBar";Se.displayName="TickBar";Se.displayName="StyledTickBar";var Me=Q("div",function(e){var r=e.$theme,n=e.$value,o=n===void 0?[]:n,h=e.$thumbIndex,O=e.$disabled,l=o.length===2&&h===0,g=o.length===2&&h===1;return r.direction==="rtl"&&(g||l)&&(l=!l,g=!g),{height:"24px",width:"24px",borderTopLeftRadius:"24px",borderTopRightRadius:"24px",borderBottomLeftRadius:"24px",borderBottomRightRadius:"24px",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:O?r.colors.sliderHandleFillDisabled:r.colors.sliderHandleFill,outline:"none",boxShadow:e.$isFocusVisible?"0 0 0 3px ".concat(r.colors.accent):"0 1px 4px rgba(0, 0, 0, 0.12)",cursor:O?"not-allowed":"inherit"}});Me.displayName="Thumb";Me.displayName="Thumb";Me.displayName="StyledThumb";var $e=Q("div",function(e){var r=e.$disabled,n=e.$theme;return{position:"absolute",top:"-16px",width:"4px",height:"20px",backgroundColor:r?n.colors.sliderHandleFillDisabled:n.colors.sliderHandleInnerFill}});$e.displayName="InnerThumb";$e.displayName="InnerThumb";$e.displayName="StyledInnerThumb";var _e=Q("div",function(e){var r=e.$disabled,n=e.$theme;return Te(Te({position:"absolute",top:"-".concat(n.sizing.scale1400)},n.typography.font200),{},{backgroundColor:r?n.colors.sliderHandleFillDisabled:n.colors.sliderHandleInnerFill,color:n.colors.contentInversePrimary,paddingLeft:n.sizing.scale600,paddingRight:n.sizing.scale600,paddingTop:n.sizing.scale500,paddingBottom:n.sizing.scale500,borderBottomLeftRadius:"48px",borderBottomRightRadius:"48px",borderTopLeftRadius:"48px",borderTopRightRadius:"48px",whiteSpace:"nowrap"})});_e.displayName="ThumbValue";_e.displayName="ThumbValue";_e.displayName="StyledThumbValue";function Ye(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(h){return Object.getOwnPropertyDescriptor(e,h).enumerable})),n.push.apply(n,o)}return n}function At(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?Ye(Object(n),!0).forEach(function(o){Bt(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ye(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function Bt(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function X(){return X=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},X.apply(this,arguments)}function K(e,r){return zt(e)||jt(e,r)||Vt(e,r)||Ft()}function Ft(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vt(e,r){if(e){if(typeof e=="string")return Ze(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ze(e,r)}}function Ze(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,o=new Array(r);n<r;n++)o[n]=e[n];return o}function jt(e,r){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var o=[],h=!0,O=!1,l,g;try{for(n=n.call(e);!(h=(l=n.next()).done)&&(o.push(l.value),!(r&&o.length===r));h=!0);}catch(F){O=!0,g=F}finally{try{!h&&n.return!=null&&n.return()}finally{if(O)throw g}}return o}}function zt(e){if(Array.isArray(e))return e}var Nt=function(r){if(r.length>2||r.length===0)throw new Error("the value prop represents positions of thumbs, so its length can be only one or two");return r};function Ut(e){var r=e.overrides,n=r===void 0?{}:r,o=e.disabled,h=o===void 0?!1:o,O=e.marks,l=O===void 0?!1:O,g=e.onChange,F=g===void 0?function(){}:g,V=e.onFinalChange,j=V===void 0?function(){}:V,I=e.min,T=I===void 0?0:I,d=e.max,t=d===void 0?100:d,a=e.step,c=a===void 0?1:a,f=e.persistentThumb,y=f===void 0?!1:f,k=e.valueToLabel,D=k===void 0?function(Y){return Y}:k,w=e.value,R=_.useContext(mt),M=_.useState(!1),P=K(M,2),S=P[0],L=P[1],x=_.useState(!1),i=K(x,2),s=i[0],u=i[1],p=_.useState(!1),m=K(p,2),v=m[0],b=m[1],$=_.useState(-1),C=K($,2),E=C[0],U=C[1],z=_.useCallback(function(Y){bt(Y)&&b(!0);var N=Y.target.parentNode.firstChild===Y.target?0:1;U(N)},[]),W=_.useCallback(function(Y){v!==!1&&b(!1),U(-1)},[]),A=Nt(w),B={$disabled:h,$step:c,$min:T,$max:t,$marks:l,$value:A,$isFocusVisible:v},G=J(n.Root,ke),ne=K(G,2),he=ne[0],ee=ne[1],ge=J(n.Track,Oe),pe=K(ge,2),ve=pe[0],Ie=pe[1],te=J(n.InnerTrack,fe),ue=K(te,2),me=ue[0],be=ue[1],et=J(n.Thumb,Me),Le=K(et,2),tt=Le[0],rt=Le[1],nt=J(n.InnerThumb,$e),Ae=K(nt,2),at=Ae[0],it=Ae[1],ot=J(n.ThumbValue,_e),Be=K(ot,2),st=Be[0],ut=Be[1],ct=J(n.Tick,Re),Fe=K(ct,2),Ve=Fe[0],je=Fe[1],lt=J(n.TickBar,Se),ze=K(lt,2),dt=ze[0],ft=ze[1],ht=J(n.Mark,we),Ne=K(ht,2),gt=Ne[0],pt=Ne[1];return _.createElement(he,X({"data-baseweb":"slider"},B,ee,{onFocus:Tt(ee,z),onBlur:yt(ee,W)}),_.createElement(Qe.Range,X({step:c,min:T,max:t,values:A,disabled:h,onChange:function(N){return F({value:N})},onFinalChange:function(N){return j({value:N})},rtl:R.direction==="rtl",renderTrack:function(N){var re=N.props,q=N.children,ae=N.isDragged;return _.createElement(ve,X({onMouseDown:re.onMouseDown,onTouchStart:re.onTouchStart,$isDragged:ae},B,Ie),_.createElement(me,X({$isDragged:ae,ref:re.ref},B,be),q))},renderThumb:function(N){var re=N.props,q=N.index,ae=N.isDragged,Ue=y||(!!q&&s||!q&&S||ae)&&!h;return _.createElement(tt,X({},re,{onMouseEnter:function(){q===0?L(!0):u(!0)},onMouseLeave:function(){q===0?L(!1):u(!1)},$thumbIndex:q,$isDragged:ae,style:At({},re.style)},B,rt,{$isFocusVisible:v&&E===q}),Ue&&_.createElement(st,X({$thumbIndex:q,$isDragged:ae},B,ut),D(A[q])),Ue&&_.createElement(at,X({$thumbIndex:q,$isDragged:ae},B,it)))}},l?{renderMark:function(N){var re=N.props,q=N.index;return _.createElement(gt,X({$markIndex:q},re,B,pt))}}:{})),_.createElement(dt,X({},B,ft),_.createElement(Ve,X({},B,je),D(T)),_.createElement(Ve,X({},B,je),D(t))))}const Ht=se("div",{target:"e16ozfla0"})({position:"relative",":focus-within:has(:focus-visible)":{"--slider-focused":1}}),Wt=se("div",{target:"e16ozfla1"})(({disabled:e,theme:r,isDragged:n})=>({alignItems:"center",backgroundColor:e?r.colors.gray60:r.colors.primary,borderTopLeftRadius:"100%",borderTopRightRadius:"100%",borderBottomLeftRadius:"100%",borderBottomRightRadius:"100%",borderTopStyle:"none",borderBottomStyle:"none",borderRightStyle:"none",borderLeftStyle:"none",display:"flex",justifyContent:"center",height:r.sizes.sliderThumb,width:r.sizes.sliderThumb,boxShadow:n?r.shadows.focusRing:r.shadows.none,":focus":{outline:"none"},":focus-visible":{boxShadow:r.shadows.focusRing}})),qt=se("div",{target:"e16ozfla2"})(({disabled:e,theme:r})=>({fontFamily:r.genericFonts.bodyFont,fontSize:r.fontSizes.sm,color:e?r.colors.gray60:r.colors.primary,top:"-1.6em",position:"absolute",whiteSpace:"nowrap",backgroundColor:r.colors.transparent,lineHeight:r.lineHeights.base,fontWeight:r.fontWeights.normal,pointerEvents:"none"})),Kt=se("div",{target:"e16ozfla3"})({flex:1}),Xt=se("div",{target:"e16ozfla4"})(({theme:e})=>({position:"absolute",height:e.spacing.twoXS,left:`calc(${e.sizes.sliderThumb} / 2)`,right:`calc(${e.sizes.sliderThumb} / 2)`})),Yt=se("div",{target:"e16ozfla5"})(({theme:e,isHovered:r,isDisabled:n})=>({position:"absolute",left:0,right:0,top:"100%",display:"flex",justifyContent:"space-between",pointerEvents:"none",marginTop:`-${e.spacing.md}`,fontSize:e.fontSizes.sm,lineHeight:e.lineHeights.base,fontWeight:e.fontWeights.normal,color:n?e.colors.fadedText40:e.colors.fadedText60,opacity:r?1:"var(--slider-focused, 0)",transition:r?"none":"opacity 300ms 200ms"}));function Zt({minLabel:e,maxLabel:r,isHovered:n,isDisabled:o}){return xe(Yt,{"data-testid":"stSliderTickBar",isHovered:n,isDisabled:o,children:[Z(De,{source:e,allowHTML:!1,inheritFont:!0,isLabel:!0}),Z(De,{source:r,allowHTML:!1,inheritFont:!0,isLabel:!0})]})}function Ee(e){return e.type===oe.Type.SELECT_SLIDER}function Pe(e,r,n){return e.map((o,h)=>{const O=r.indexOf(o);return O>=0?O:n[h]??0})}function Gt(e,r){return e.map(n=>r[n]??"")}function Jt({disabled:e,element:r,widgetMgr:n,fragmentId:o}){const[h,O]=It({getStateFromWidgetMgr:Qt,getDefaultStateFromProto:er,getCurrStateFromProto:tr,updateWidgetMgrState:rr,element:r,widgetMgr:n,fragmentId:o}),[l,g]=_.useState(h),[F,V]=_.useState(!1),[j,I]=_.useState(!1),T=_.useCallback(()=>V(!0),[]),d=_.useCallback(()=>V(!1),[]),t=_.useRef(null),[a]=_.useState([]),[c]=_.useState([]),f=kt(),y=_.useRef(r);y.current=r;const k=l.map(x=>ye(x,r)),D=ye(r.min,r),w=ye(r.max,r);_.useEffect(()=>{g(h)},[h]),Ot(()=>{if(!Ee(r))return;const x=n.getStringArrayValue(r);if(x===void 0)return;const i=Pe(x,r.options,r.default);g(i)},[r.options],(x,i)=>wt(x[0],i[0]));const R=_.useCallback(({value:x})=>{O({value:x,fromUi:!0}),I(!1)},[O]),M=_.useCallback(({value:x})=>{g(x),I(!0)},[]),P=_.useCallback(_.forwardRef(function(i,s){const{$thumbIndex:u,$value:p}=i,m=u||0;a[m]=s,c[m]||=_.createRef();const v=Rt(i,["role","style","aria-valuemax","aria-valuemin","aria-valuenow","tabIndex","onKeyUp","onKeyDown","onMouseEnter","onMouseLeave","draggable"]),b=y.current,C=(p??[b.min])[m]??b.min,E=ye(C,b);return Z(Wt,{...v,disabled:i.$disabled===!0,isDragged:i.$isDragged===!0,ref:a[m],"aria-valuetext":E,"aria-label":b.label,children:Z(qt,{"data-testid":"stSliderThumbValue",disabled:i.$disabled===!0,ref:c[m],children:Z(De,{source:E,allowHTML:!1,inheritFont:!0,isLabel:!0})})})}),[]);_.useLayoutEffect(()=>{a.forEach((m,v)=>{m.current&&m.current.setAttribute("aria-valuetext",k[v])});const x=t.current??null,i=a[0].current,s=a[1]?.current,u=c[0].current,p=c[1]?.current;or(x,i,s,u,p)});const S=_.useCallback(({$disabled:x})=>({height:f.spacing.twoXS,...x?{background:f.colors.darkenedBgMix25}:{}}),[f.colors.darkenedBgMix25,f.spacing.twoXS]),L=_.useCallback(_.forwardRef(function(i,s){const{children:u,...p}=i;return xe(Kt,{children:[Z(Xt,{ref:s,children:u}),Z(fe,{...p,style:S({$disabled:i.$disabled})})]})}),[]);return xe(Ht,{ref:t,className:"stSlider","data-testid":"stSlider",onMouseEnter:T,onMouseLeave:d,children:[Z($t,{label:r.label,disabled:e,labelVisibility:St(r.labelVisibility?.value),children:r.help&&Z(Mt,{content:r.help,label:r.label})}),Z(Ut,{min:r.min,max:r.max,step:r.step,value:ir(l,r),onChange:M,onFinalChange:R,disabled:e,overrides:{Thumb:P,Track:{style:{backgroundColor:"none !important",paddingLeft:f.spacing.none,paddingRight:f.spacing.none,paddingTop:`calc((${f.sizes.minElementHeight} - ${f.spacing.twoXS}) / 2)`,paddingBottom:`calc((${f.sizes.minElementHeight} - ${f.spacing.twoXS}) / 2)`}},InnerTrack:L,TickBar:{component:Zt,props:{minLabel:D,maxLabel:w,isHovered:F||j,isDisabled:e}}}})]})}function Qt(e,r){if(Ee(r)){const n=e.getStringArrayValue(r);return n===void 0?void 0:Pe(n,r.options,r.default)}return e.getDoubleArrayValue(r)}function er(e){return e.default}function tr(e){if(Ee(e)){const r=e.rawValue;return r&&r.length>0?Pe(r,e.options,e.default):e.default}return e.value}function rr(e,r,n,o){if(Ee(e)){const h=Gt(n.value,e.options);r.setStringArrayValue(e,h,{fromUi:n.fromUi},o)}else r.setDoubleArrayValue(e,n.value,{fromUi:n.fromUi},o)}function nr(e){const{dataType:r}=e;return r===oe.DataType.DATETIME||r===oe.DataType.DATE||r===oe.DataType.TIME}function ar(e){const{dataType:r}=e;return r===oe.DataType.DATE?"date":r===oe.DataType.TIME?"time":"datetime"}function ye(e,r){const{format:n,options:o}=r;if(o.length>0)return o[e]??"";if(nr(r)){const h=_t.utc(e/1e3);return Dt(h,n,ar(r))}return xt(e,n)}function ir(e,r){const{min:n,max:o}=r;let h=e[0],O=e.length>1?e[1]:e[0];return h>O&&(h=O),h<n&&(h=n),h>o&&(h=o),O<n&&(O=n),O>o&&(O=o),e.length>1?[h,O]:[h]}function or(e,r,n,o,h){!e||!r||!o||(ie(e,r,o),n&&h&&(ie(e,n,h),sr(e,r,n,o,h)))}function ie(e,r,n){const o=e.getBoundingClientRect(),h=r.getBoundingClientRect(),O=n.getBoundingClientRect(),l=h.left+h.width/2,g=l-O.width/2<o.left,F=l+O.width/2>o.right;n.style.left=g?"0":"",n.style.right=F?"0":""}function sr(e,r,n,o,h){const l=e.getBoundingClientRect(),g=r.getBoundingClientRect(),F=n.getBoundingClientRect(),V=o.getBoundingClientRect(),j=h.getBoundingClientRect(),I=l.left+l.width/2,T=g.left+g.width/2,d=F.left+F.width/2,t=T-V.width/2>=l.left,a=d+j.width/2<=l.right,c=g.left-V.width>=l.left,f=F.right+j.width<=l.right,y=t?V.width/2:V.width,k=a?j.width/2:j.width,D=T+y;if(d-k-D>24){ie(e,r,o),ie(e,n,h);return}if(c&&f){o.style.left="",o.style.right=`${Math.round(g.width)}px`,h.style.left=`${Math.round(F.width)}px`,h.style.right="";return}T<I?(ie(e,r,o),h.style.left=`${Math.round(T+y+24-d)}px`,h.style.right=""):(ie(e,n,h),o.style.left="",o.style.right=`${-Math.round(d-k-24-T)}px`)}const mr=Et(_.memo(Jt));export{mr as default};
@@ -1 +0,0 @@
1
- import{r as i,E as Q,_ as K,bo as z,bp as k,l as Y,e as j,Q as Z,O as q,bq as M,br as _,bs as ee,bt as te,n as H,bu as J,V as B,W as ne,k as re,b8 as se,bv as oe,j as x,o as ae,b1 as ie}from"./index.CPc_uZux.js";import{w as ce,E as le}from"./withFullScreenWrapper.DtkUCO_d.js";import{a as P,S as U,T as ue}from"./Toolbar.COH7NaOE.js";import{R as fe}from"./index.DU68jVpM.js";import{a as W,c as de,b as me,e as pe,t as he,S as ge,d as ye}from"./embed.CJzOXYBF.js";import{u as Se}from"./FormClearHelper.DTFnX0js.js";import{T as be}from"./TableChart.esm.CzJtGIR-.js";import"./moment.C7qA8nIE.js";import"./pandasStylerUtils.3IiIKU9-.js";import"./numbro.B9_PXfzp.js";import"./_baseIndexOf.BTknn6Gb.js";import"./index.8HslT92O.js";import"./main.TU5_aabd.js";import"./throttle.emUyC44c.js";import"./toConsumableArray.DDV1bN1-.js";import"./formatNumber.DB5irY8c.js";import"./sprintf.DpPCfzXw.js";import"./formatMoment.C6Hwn6X5.js";import"./checkbox.BKgWNdeI.js";import"./createDownloadLinkElement.6oO-YlYv.js";import"./FileDownload.esm.Z9hRQIHi.js";import"./_arrayIncludes.B19Iyn2B.js";import"./threshold.CUNQbqMA.js";import"./value.DaKxGC7O.js";import"./timer.BZio6gjG.js";var $=i.forwardRef(function(t,e){var s={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return i.createElement(Q,K({iconAttrs:s,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:e}),i.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),i.createElement("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14zM7 10h2v7H7zm4-3h2v10h-2zm4 6h2v4h-2z"}))});$.displayName="InsertChart";function F(t,e){if(we(t,e),Array.isArray(t.layer))for(const s of t.layer)s&&typeof s=="object"&&F(s,e);for(const s of["vconcat","hconcat","concat"])if(Array.isArray(t[s]))for(const r of t[s])r&&typeof r=="object"&&F(r,e);("facet"in t||"repeat"in t)&&t.spec&&typeof t.spec=="object"&&F(t.spec,e)}function we(t,e){const s=t.encoding;if(!s)return;const r=s.color;if(!r)return;"value"in r&&z(r.value)&&(r.value=k(r.value,e));const c=r.scale;c&&Array.isArray(c.range)&&(c.range=c.range.map(o=>z(o)?k(o,e):o))}const Ce=20;function Ee(t){"params"in t&&"encoding"in t&&t.params.forEach(e=>{"select"in e&&(["interval","point"].includes(e.select)&&(e.select={type:e.select}),"type"in e.select&&e.select.type==="point"&&!("encodings"in e.select)&&j(e.select.encodings)&&(e.select.encodings=Object.keys(t.encoding)))})}const ve=(t,e,s,r,c,o,f,m)=>{const n=JSON.parse(t);if(typeof n.height=="number"&&n.height<=0&&delete n.height,typeof n.width=="number"&&n.width<=0&&delete n.width,r==="streamlit"?n.config=W(n.config,o):n.usermeta?.embedOptions?.theme==="streamlit"?(n.config=W(n.config,o),n.usermeta.embedOptions.theme=void 0):n.config=de(n.config,o),n.title&&(typeof n.title=="string"&&(n.title={text:n.title}),n.title.limit=n.title.limit??Math.max(f-40,0)),s&&m&&m>0&&(n.height=m),e&&f&&f>0&&(n.width=f,"vconcat"in n&&n.vconcat.forEach(a=>{a===null||typeof a!="object"||"hconcat"in a||"vconcat"in a||"concat"in a||"layer"in a||(a.width=f)})),n.padding||(n.padding={}),j(n.padding.bottom)&&(n.padding.bottom=Ce),n.datasets)throw new Error("Datasets should not be passed as part of the spec");return c.length>0&&Ee(n),F(n,o),n},Ne=(t,e,s,r,c)=>{const o=Y(),{id:f,formId:m,spec:n,data:a,datasets:l,vegaLiteTheme:d,selectionMode:u}=t,h=i.useMemo(()=>u,[JSON.stringify(u)]),y=i.useMemo(()=>ve(n,r,c,d,h,o,e,s),[n,r,c,d,h,o,e,s]);return{id:f,formId:m,vegaLiteTheme:d,spec:y,selectionMode:h,data:a,datasets:l,useContainerWidth:r}},Ae={DATAFRAME_INDEX:"(index)"};function Ve(t){return!t||t.dimensions.numDataRows===0?null:I(t)}function De(t){const e=L(t);if(j(e))return null;const s={};for(const[r,c]of Object.entries(e))s[r]=I(c);return s}function L(t){if(t?.length===0)return null;const e={};return t.forEach(s=>{if(!s)return;const r=s.hasName?s.name:null;e[r]=s.data}),e}function I(t,e=0){if(t.dimensions.numDataRows===0)return[];const s=[],{numDataRows:r,numDataColumns:c,numIndexColumns:o}=t.dimensions,f=t.columnTypes[0]??void 0,m=f?.type===Z.INDEX&&(q(f)||M(f)||_(f));for(let n=e;n<r;n++){const a={};if(m){const{content:l}=t.getCell(n,0);a[Ae.DATAFRAME_INDEX]=typeof l=="bigint"?Number(l):l}for(let l=0;l<c;l++){const d=l+o,{content:u,contentType:h}=t.getCell(n,d);if((u instanceof Date||typeof u=="number"&&Number.isFinite(u))&&(M(h)||_(h))&&!ee(h)){const y=new Date(u).getTimezoneOffset()*60*1e3;a[t.columnNames[0][d]]=u.valueOf()+y}else a[t.columnNames[0][d]]=typeof u=="bigint"?Number(u):u}s.push(a)}return s}const Oe=150,Te=B.getLogger("useVegaLiteSelections"),Re=(t,e,s)=>{const{id:r,formId:c,selectionMode:o}=t,f=i.useCallback(n=>{o.forEach(l=>{n.addSignalListener(l,te(Oe,(d,u)=>{const h=n.getState({data:(v,T)=>o.some(g=>`${g}_store`===v),recurse:!1});H(h)&&e.setElementState(r,"viewState",h);let y=u;"vlPoint"in u&&"or"in u.vlPoint&&(y=u.vlPoint.or);const A={id:r,formId:c},E=JSON.parse(e.getStringValue(A)||"{}"),N={selection:{...E?.selection||{},[d]:y||{}}};J(E,N)||e.setStringValue(A,JSON.stringify(N),{fromUi:!0},s)}))});const a=e.getElementState(r,"viewState");if(H(a))try{return n.setState(a)}catch(l){Te.warn("Failed to restore view state",l)}return n},[r,o,e,c,s]),m=i.useCallback(()=>{const n={selection:{}};o.forEach(u=>{n.selection[u]={}});const a={id:r,formId:c},l=e.getStringValue(a),d=l?JSON.parse(l):n;J(d,n)||e.setStringValue(a,JSON.stringify(n),{fromUi:!0},s)},[r,c,s,o,e]);return{maybeConfigureSelections:f,onFormCleared:m}},G="source",xe=B.getLogger("useVegaEmbed");function Fe(t,e,s){const r=i.useRef(null),c=i.useRef(null),o=i.useRef(G),f=i.useRef(null),m=i.useRef([]),n=i.useRef(null),a=i.useRef([]),[l,d]=i.useState(!1),{maybeConfigureSelections:u,onFormCleared:h}=Re(t,e,s);Se({widgetMgr:e,element:t,onFormCleared:h});const{data:y,datasets:A}=t;i.useEffect(()=>{n.current=y,a.current=A,r.current===null&&(f.current=y,m.current=A)},[y,A]);const E=i.useCallback(()=>{c.current&&c.current(),c.current=null,r.current=null},[]),N=i.useCallback(async(g,b)=>{if(g.current===null)throw new Error("Element missing.");d(!0);try{E();const w={ast:!0,expr:me,tooltip:{disableDefaultStyle:!0},defaultStyle:!1,forceActionsMenu:!0},{vgSpec:S,view:R,finalize:D}=await pe(g.current,b,w);r.current=u(R),c.current=D;const p=De(a.current),C=p?Object.keys(p):[];if(C.length===1){const[O]=C;o.current=O}else C.length===0&&S.data&&(o.current=G);const V=Ve(n.current);if(V&&r.current.insert(o.current,V),p)for(const[O,X]of Object.entries(p))r.current.insert(O,X);return await r.current.runAsync(),await r.current.resize().runAsync(),f.current=n.current,m.current=a.current,r.current}finally{d(!1)}},[E,u]),v=i.useCallback((g,b,w,S)=>{if(!S||S.dimensions.numDataRows===0){try{g.remove(b,he)}catch{}return}if(!w||w.dimensions.numDataRows===0){g.insert(b,I(S));return}S.hash!==w.hash&&(g.data(b,I(S)),xe.info(`Had to clear the ${b} dataset before inserting data through Vega view.`))},[]),T=i.useCallback(async(g,b)=>{if(r.current===null||l)return null;const w=f.current,S=m.current;(w||g)&&v(r.current,o.current,w,g);const R=L(S)??{},D=L(b)??{};for(const[p,C]of Object.entries(D)){const V=p||o.current,O=R[V];v(r.current,V,O,C)}for(const p of Object.keys(R))!Object.hasOwn(D,p)&&p!==o.current&&v(r.current,p,null,null);return await r.current?.resize().runAsync(),f.current=g,m.current=b,r.current},[v,l]);return{createView:N,updateView:T,finalizeView:E}}function Ie(t){try{const e=typeof t=="string"?JSON.parse(t):t;return!!(e.facet||e.encoding?.row||e.encoding?.column||e.encoding?.facet)}catch{return!1}}function Le(t){try{const e=typeof t=="string"?JSON.parse(t):t;return!("vconcat"in e)||!Array.isArray(e.vconcat)?!1:e.vconcat.some(s=>s!==null&&typeof s=="object"&&("hconcat"in s||"vconcat"in s||"concat"in s||"layer"in s))}catch{return!1}}const je=({disableFullscreenMode:t,element:e,fragmentId:s,widgetMgr:r,widthConfig:c,heightConfig:o})=>{const[f,m]=i.useState(!1),[n,a]=i.useState(!1),{expanded:l,height:d,width:u,expand:h,collapse:y}=ne(le),{width:A,height:E,elementRef:N}=re([f]),v=se(c)||e.useContainerWidth,T=oe(o),g=Ie(e.spec),b=Le(e.spec),w=Ne(e,g?u??0:A,(l?d:E)??0,l&&!b?!0:v,l?!0:T),{createView:S,updateView:R,finalizeView:D}=Fe(w,r,s),{data:p,datasets:C,spec:V}=w;if(i.useLayoutEffect(()=>(N.current!==null&&S(N,V),D),[S,D,V,u,d,f,N]),i.useEffect(()=>{R(p,C)},[p,C]),i.useEffect(()=>{p||C?.[0]?.data?a(!0):a(!1)},[p,C]),f){const O=d??(E>0?E:void 0);return x(fe,{data:p??C[0]?.data,height:O,width:c??void 0,customToolbarActions:[x(P,{label:"Show chart",icon:$,onClick:()=>{m(!1)}},"show-chart")]})}return ae(U,{height:T?l?d:"100%":d,useContainerWidth:l?!0:v,children:[x(ue,{target:U,isFullScreen:l,onExpand:h,onCollapse:y,disableFullscreenMode:t,children:n&&x(P,{label:"Show data",icon:be,onClick:()=>{m(!0)}})}),x(ie,{styles:[ge]}),x(ye,{"data-testid":"stVegaLiteChart",className:"stVegaLiteChart",useContainerWidth:v,useContainerHeight:T,ref:N})]})},ze=ce(je),ct=i.memo(ze);export{ge as StyledVegaLiteChartTooltips,W as applyStreamlitTheme,ct as default};
@@ -1,2 +0,0 @@
1
- import{am as q,w as J,r as c,b7 as Q,l as Y,b8 as ee,b9 as l,j as L,o as te,p as re,P as ne,ba as oe,ac as ie,bb as ae,b as ue,B as C,c as x,D as le}from"./index.CPc_uZux.js";import{W as ce}from"./WidgetLabelHelpIconInline.Dlc8f0Ji.js";import{u as se}from"./useBasicWidgetState.DvpdEDYZ.js";import"./FormClearHelper.DTFnX0js.js";var fe={secondary:"secondary"},N={default:"default"},pe={default:"default"},k=Object.freeze({radio:"radio",checkbox:"checkbox"}),z=q("div",function(e){var t=e.$shape,r=e.$length,n=e.$theme,o=r===1?void 0:t!==N.default?"-".concat(n.sizing.scale100):"-0.5px";return{display:"flex",marginLeft:o,marginRight:o}});z.displayName="StyledRoot";z.displayName="StyledRoot";function M(e){"@babel/helpers - typeof";return M=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},M(e)}function $(){return $=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},$.apply(this,arguments)}function X(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function de(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?X(Object(r),!0).forEach(function(n){V(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):X(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ye(e,t){return Se(e)||he(e,t)||me(e,t)||be()}function be(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function me(e,t){if(e){if(typeof e=="string")return K(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return K(e,t)}}function K(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function he(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],o=!0,i=!1,a,d;try{for(r=r.call(e);!(o=(a=r.next()).done)&&(n.push(a.value),!(t&&n.length===t));o=!0);}catch(s){i=!0,d=s}finally{try{!o&&r.return!=null&&r.return()}finally{if(i)throw d}}return n}}function Se(e){if(Array.isArray(e))return e}function ge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ve(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Oe(e,t,r){return t&&ve(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ee(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&G(e,t)}function G(e,t){return G=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},G(e,t)}function _e(e){var t=Le();return function(){var n=B(e),o;if(t){var i=B(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return we(this,o)}}function we(e,t){if(t&&(M(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return F(e)}function F(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Le(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function B(e){return B=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},B(e)}function V(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Re(e,t){return!Array.isArray(e)&&typeof e!="number"?!1:Array.isArray(e)?e.includes(t):e===t}var H=(function(e){Ee(r,e);var t=_e(r);function r(){var n;ge(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=t.call.apply(t,[this].concat(i)),V(F(n),"childRefs",{}),n}return Oe(r,[{key:"render",value:function(){var o=this,i=this.props,a=i.overrides,d=a===void 0?{}:a,s=i.mode,y=s===void 0?k.checkbox:s,S=i.children,b=i.selected,E=i.disabled,f=i.onClick,m=i.kind,v=i.shape,h=i.size,I=J(d.Root,z),_=ye(I,2),A=_[0],R=_[1],w=this.props["aria-label"]||this.props.ariaLabel,p=y===k.radio,W=c.Children.count(S);return c.createElement(Q.Consumer,null,function(Z){return c.createElement(A,$({"aria-label":w||Z.buttongroup.ariaLabel,"data-baseweb":"button-group",role:p?"radiogroup":"group",$shape:v,$length:S.length},R),c.Children.map(S,function(g,P){if(!c.isValidElement(g))return null;var D=g.props.isSelected?g.props.isSelected:Re(b,P);return p&&(o.childRefs[P]=c.createRef()),c.cloneElement(g,{disabled:E||g.props.disabled,isSelected:D,ref:p?o.childRefs[P]:void 0,tabIndex:!p||D||p&&(!b||b===-1)&&P===0?0:-1,onKeyDown:function(u){if(p){var O=Number(b)?Number(b):0;if(u.key==="ArrowUp"||u.key==="ArrowLeft"){u.preventDefault&&u.preventDefault();var T=O-1<0?W-1:O-1;f&&f(u,T),o.childRefs[T].current&&o.childRefs[T].current.focus()}if(u.key==="ArrowDown"||u.key==="ArrowRight"){u.preventDefault&&u.preventDefault();var j=O+1>W-1?0:O+1;f&&f(u,j),o.childRefs[j].current&&o.childRefs[j].current.focus()}}},kind:m,onClick:function(u){E||(g.props.onClick&&g.props.onClick(u),f&&f(u,P))},shape:v,size:h,overrides:de({BaseButton:{style:function(u){var O=u.$theme;return S.length===1?{}:v!==N.default?{marginLeft:O.sizing.scale100,marginRight:O.sizing.scale100}:{marginLeft:"0.5px",marginRight:"0.5px"}},props:{"aria-checked":D,role:p?"radio":"checkbox"}}},g.props.overrides)})}))})}}]),r})(c.Component);V(H,"defaultProps",{disabled:!1,onClick:function(){},shape:N.default,size:pe.default,kind:fe.secondary});function Pe(e,t){return t.includes(e)?t.filter(r=>r!==e):[...t,e]}function Ce(e,t,r){return e===l.ClickMode.MULTI_SELECT?Pe(t,r??[]):r?.includes(t)?[]:[t]}function ke(e){return e.length===0?-1:e[0]}function Be(e,t,r,n){t.setIntArrayValue(e,r.value,{fromUi:r.fromUi},n)}function Ie(e,t,r){const n=r===l.Style.PILLS?C.PILLS:r===l.Style.BORDERLESS?C.BORDERLESS_ICON:C.SEGMENTED_CONTROL,o=r===l.Style.BORDERLESS?x.XSMALL:x.MEDIUM,i=n===C.PILLS||n===C.SEGMENTED_CONTROL,a=r===l.Style.BORDERLESS?"lg":"base";return{element:L(le,{icon:t,label:e,iconSize:a,useSmallerFont:i}),kind:n,size:o}}function Ae(e,t,r,n){return r.indexOf(n)>-1?!0:t!==l.ClickMode.SINGLE_SELECT||e!==l.SelectionVisualization.ALL_UP_TO_SELECTED?!1:r.length>0&&n<r[0]}function De(e,t){return e&&(t=`${t}Active`),t}function Te(e,t,r){const n={flexWrap:"wrap",maxWidth:r?"100%":"fit-content",margin:"0 0"},o=r?"100%":"auto";switch(e){case l.Style.BORDERLESS:return{...n,columnGap:t.threeXS,rowGap:t.threeXS};case l.Style.PILLS:return{...n,columnGap:t.twoXS,rowGap:t.twoXS,width:o};case l.Style.SEGMENTED_CONTROL:return{...n,columnGap:t.none,rowGap:t.twoXS,width:o};default:return n}}function je(e,t,r,n,o,i,a){const d=Ae(r,n,o,t);let s=e.content,y=e.contentIcon;return d&&(s=e.selectedContent?e.selectedContent:s,y=e.selectedContentIcon?e.selectedContentIcon:y),c.forwardRef(function(b,E){const{element:f,kind:m,size:v}=Ie(s??"",y??void 0,i),h=De(!!(d&&!e.selectedContent&&!e.selectedContentIcon),m);return L(ue,{...b,size:v,kind:h,containerWidth:a,children:f})})}function Me(e,t){return e.getIntArrayValue(t)}function $e(e){return e.default??[]}function Ge(e){return e.value??[]}function Ne(e){const{disabled:t,element:r,fragmentId:n,widgetMgr:o,widthConfig:i}=e,{clickMode:a,options:d,selectionVisualization:s,style:y,label:S,labelVisibility:b,help:E}=r,f=Y(),[m,v]=se({getStateFromWidgetMgr:Me,getDefaultStateFromProto:$e,getCurrStateFromProto:Ge,updateWidgetMgrState:Be,element:r,widgetMgr:o,fragmentId:n}),h=ee(i),I=(R,w)=>{const p=Ce(a,w,m);v({value:p,fromUi:!0})};let _;a===l.ClickMode.SINGLE_SELECT?_=k.radio:a===l.ClickMode.MULTI_SELECT&&(_=k.checkbox);const A=c.useMemo(()=>d.map((R,w)=>{const p=je(R,w,s,a,m,y,h);return L(p,{},`${R.content}-${w}`)}),[a,d,s,y,m,h]);return te(ae,{className:"stButtonGroup","data-testid":"stButtonGroup",containerWidth:h,children:[L(ie,{label:S,disabled:t,labelVisibility:re(b?.value??oe.LabelVisibilityOptions.COLLAPSED),children:E&&L(ce,{content:E,placement:ne.TOP,label:S})}),L(H,{disabled:t,mode:_,onClick:I,selected:a===l.ClickMode.MULTI_SELECT?m:ke(m),overrides:{Root:{style:c.useCallback(()=>Te(y,f.spacing,h),[y,f.spacing,h])}},children:A})]})}const xe=c.memo(Ne);export{xe as default};
@@ -1 +0,0 @@
1
- import{r as l,E as S,_ as A,a_ as o,m as D,a$ as j,z as c,b0 as H,aA as v,l as P,k as G,o as f,j as a,p as q,q as x,P as F,ax as U,b1 as X,aa as Y}from"./index.CPc_uZux.js";import{e as J,S as K,a as Q,b as Z}from"./embed.CJzOXYBF.js";import{W as ee}from"./WidgetLabelHelpIconInline.Dlc8f0Ji.js";import{i as L,f as re}from"./formatNumber.DB5irY8c.js";import"./threshold.CUNQbqMA.js";import"./value.DaKxGC7O.js";import"./timer.BZio6gjG.js";import"./numbro.B9_PXfzp.js";import"./sprintf.DpPCfzXw.js";var z=l.forwardRef(function(e,r){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return l.createElement(S,A({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:r}),l.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),l.createElement("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}))});z.displayName="ArrowDownward";var b=l.forwardRef(function(e,r){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return l.createElement(S,A({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:r}),l.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),l.createElement("path",{d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"}))});b.displayName="ArrowUpward";function k(e,r){switch(r){case o.MetricColor.RED:return e.colors.redColor;case o.MetricColor.GREEN:return e.colors.greenColor;case o.MetricColor.ORANGE:return e.colors.orangeColor;case o.MetricColor.YELLOW:return e.colors.yellowColor;case o.MetricColor.BLUE:return e.colors.blueColor;case o.MetricColor.VIOLET:return e.colors.violetColor;case o.MetricColor.PRIMARY:return e.colors.primary;default:return e.colors.grayColor}}function V(e,r){const t=D(e);switch(r){case o.MetricColor.RED:return e.colors.redBackgroundColor;case o.MetricColor.GREEN:return e.colors.greenBackgroundColor;case o.MetricColor.ORANGE:return e.colors.orangeBackgroundColor;case o.MetricColor.YELLOW:return e.colors.yellowBackgroundColor;case o.MetricColor.BLUE:return e.colors.blueBackgroundColor;case o.MetricColor.VIOLET:return e.colors.violetBackgroundColor;case o.MetricColor.PRIMARY:return j(e.colors.primary,t?.9:.7);default:return e.colors.grayBackgroundColor}}function oe(e,r){switch(r){case o.MetricColor.RED:return e.colors.redTextColor;case o.MetricColor.GREEN:return e.colors.greenTextColor;case o.MetricColor.ORANGE:return e.colors.orangeTextColor;case o.MetricColor.YELLOW:return e.colors.yellowTextColor;case o.MetricColor.BLUE:return e.colors.blueTextColor;case o.MetricColor.VIOLET:return e.colors.violetTextColor;case o.MetricColor.PRIMARY:return e.colors.primary;default:return e.colors.grayTextColor}}const te=c("div",{target:"e132k71j0"})(({theme:e,showBorder:r})=>({height:"100%",...r&&{border:`${e.sizes.borderWidth} solid ${e.colors.borderColor}`,borderRadius:e.radii.default,overflow:"hidden"}})),ie=c("div",{target:"e132k71j1"})(({theme:e,showBorder:r})=>({...r&&{padding:`calc(${e.spacing.lg} - ${e.sizes.borderWidth})`}})),ae=c("div",{target:"e132k71j2"})(({theme:e,showBorder:r})=>({marginTop:r?void 0:e.spacing.lg,marginBottom:r?e.spacing.twoXL:void 0})),h=c("div",{target:"e132k71j3"})(({theme:e})=>({overflowWrap:"normal",textOverflow:"ellipsis",width:"100%",overflow:"hidden",whiteSpace:"nowrap",fontFamily:e.genericFonts.bodyFont,lineHeight:"normal",verticalAlign:"middle","& > div":{overflow:"hidden","& > p":{textOverflow:"ellipsis",overflow:"hidden"}}})),le=c(H,{target:"e132k71j4"})(({visibility:e})=>({marginBottom:0,display:e===v.Collapsed?"none":"grid",gridTemplateColumns:e===v.Collapsed?"initial":"auto 1fr",visibility:e===v.Hidden?"hidden":"visible"})),ne=c("div",{target:"e132k71j5"})(({theme:e})=>({fontSize:e.fontSizes.threeXL,color:e.colors.bodyText,paddingBottom:e.spacing.twoXS})),se=c("div",{target:"e132k71j6"})(({theme:e,metricColor:r,showArrow:t})=>({color:oe(e,r),backgroundColor:V(e,r),fontSize:e.fontSizes.sm,display:"inline-flex",flexDirection:"row",alignItems:"center",fontWeight:e.fontWeights.normal,borderRadius:e.radii.full,maxWidth:"100%",padding:`${e.spacing.threeXS} ${e.spacing.xs} ${e.spacing.threeXS} ${e.spacing.xs}`,...t&&{paddingLeft:e.spacing.twoXS}})),ce=1e3;function R(e,r){try{return re(Number(e),r)}catch{return e}}function de(e,r,t,i,p){const n=`metric_chart_${Math.random().toString(36).slice(2,10)}`,C=e.length===1?[e[0],e[0]]:e,s={$schema:"https://vega.github.io/schema/vega-lite/v5.json",width:Math.round(t),height:Math.round(Y("3.5rem")),data:{values:C.map((M,g)=>({x:g,y:M}))},layer:[{name:`${n}_mark`,mark:{type:"line",...r===o.ChartType.LINE&&{type:"line",strokeCap:"round",strokeWidth:i.sizes.metricStrokeWidth},...r===o.ChartType.BAR&&{type:"bar",cornerRadius:parseFloat(i.radii.full)},...r===o.ChartType.AREA&&{type:"area",color:V(i,p),opacity:1,line:{color:k(i,p),opacity:1,strokeWidth:i.sizes.metricStrokeWidth,strokeCap:"round"}}},encoding:{x:{field:"x",type:"quantitative",axis:null,scale:{zero:!1,nice:!1}},y:{field:"y",type:"quantitative",axis:null,scale:{zero:!1,nice:!1}}}},{name:`${n}_points`,mark:{type:"point",opacity:0},encoding:{x:{field:"x",type:"quantitative",axis:null,scale:{zero:!1,nice:!1}},y:{field:"y",type:"quantitative",axis:null,scale:{zero:!1,nice:!1}}},params:[{name:`${n}_hover_selection`,select:{type:"point",encodings:["x"],nearest:!0,on:e.length>ce?"mousemove{16}":"mousemove",clear:"mouseleave"}}]},{name:`${n}_highlighted_points`,transform:[{filter:{param:`${n}_hover_selection`,empty:!1}}],mark:{type:"point",filled:!0,size:65,tooltip:!0},encoding:{x:{field:"x",type:"quantitative",axis:null,scale:{zero:!1,nice:!1}},y:{field:"y",type:"quantitative",axis:null,scale:{zero:!1,nice:!1}}}}],config:{view:{stroke:null},padding:{left:-3,right:-3,top:2,bottom:2},...r===o.ChartType.BAR&&{padding:{left:0,right:0,top:2,bottom:2}},mark:{tooltip:{content:"encoding"},color:k(i,p)}}};return s.config=Q(s.config,i),s}function ue({element:e}){const r=P(),t=l.useRef(null),{width:i,elementRef:p}=G(),{MetricDirection:m}=o,{body:n,label:C,delta:s,direction:M,color:g,labelVisibility:B,help:E,showBorder:w,chartData:d,chartType:T,format:y}=e,N=y&&L(n)?R(n,y):n,$=y&&s&&L(s)?R(s,y):s;let u=null;switch(M){case m.DOWN:u=z;break;case m.UP:u=b;break;case m.NONE:break}const I="0 threeXS 0 0",W=s!=="";return l.useEffect(()=>{if(d&&d.length>0&&t.current&&i>0){const O=de(d,T,i,r,g);J(t.current,O,{actions:!1,renderer:"svg",ast:!0,expr:Z,tooltip:{theme:"custom",formatTooltip:_=>`${_.y}`}})}},[d,g,r,i,T,t]),f(te,{className:"stMetric","data-testid":"stMetric",showBorder:w,children:[f(ie,{showBorder:w,children:[f(le,{"data-testid":"stMetricLabel",visibility:q(B?.value),children:[a(h,{children:a(x,{source:C,allowHTML:!1,isLabel:!0})}),E&&a(ee,{content:E,placement:F.TOP_RIGHT,label:C})]}),a(ne,{"data-testid":"stMetricValue",children:a(h,{children:a(x,{source:N,allowHTML:!1,isLabel:!0,inheritFont:!0})})}),W&&f(se,{"data-testid":"stMetricDelta",metricColor:g,showArrow:u!==null,children:[u&&a(U,{testid:u===b?"stMetricDeltaIcon-Up":"stMetricDeltaIcon-Down",content:u,size:"md",margin:I}),a(h,{children:a(x,{source:$,allowHTML:!1,isLabel:!0,inheritFont:!0})})]})]}),d&&d.length>0&&f("div",{ref:p,children:[a(X,{styles:[K]}),a(ae,{ref:t,"data-testid":"stMetricChart",showBorder:w})]})]})}const xe=l.memo(ue);export{xe as default};
@@ -1 +0,0 @@
1
- import{r as a,E as G,_ as Y,z as k,bc as C,e as h,n as J,V as dt,l as pt,k as ft,a9 as mt,aa as V,o as B,j as d,p as bt,ab as ht,ac as gt,ad as yt,Y as It,ax as j}from"./index.CPc_uZux.js";import{I as Ct}from"./InputInstructions.CdzsN_Va.js";import{u as Tt}from"./useBasicWidgetState.DvpdEDYZ.js";import{s as St}from"./sprintf.DpPCfzXw.js";import{u as wt}from"./uniqueId.DTwvAE-J.js";import{I as vt}from"./input.BcC6sPE_.js";import"./FormClearHelper.DTFnX0js.js";import"./base-input.Q-zJLgRK.js";var Q=a.forwardRef(function(t,e){var r={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return a.createElement(G,Y({iconAttrs:r,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},t,{ref:e}),a.createElement("path",{d:"M0 3v2h8V3H0z"}))});Q.displayName="Minus";var Z=a.forwardRef(function(t,e){var r={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return a.createElement(G,Y({iconAttrs:r,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},t,{ref:e}),a.createElement("path",{d:"M3 0v3H0v2h3v3h2V5h3V3H5V0H3z"}))});Z.displayName="Plus";const xt=k("div",{target:"eaeic2i0"})(({theme:t})=>({display:"flex",flexDirection:"row",flexWrap:"nowrap",alignItems:"center",height:t.sizes.minElementHeight,borderWidth:t.sizes.borderWidth,borderStyle:"solid",borderColor:t.colors.widgetBorderColor??t.colors.secondaryBg,transitionDuration:"200ms",transitionProperty:"border",transitionTimingFunction:"cubic-bezier(0.2, 0.8, 0.4, 1)",borderRadius:t.radii.default,overflow:"hidden","&.focused":{borderColor:t.colors.primary},input:{MozAppearance:"textfield","&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{WebkitAppearance:"none",margin:t.spacing.none}}})),Dt=k("div",{target:"eaeic2i1"})({display:"flex",flexDirection:"row",alignSelf:"stretch"}),K=k("button",{target:"eaeic2i2"})(({theme:t})=>({margin:t.spacing.none,border:"none",height:t.sizes.full,display:"flex",alignItems:"center",width:t.sizes.numberInputControlsWidth,justifyContent:"center",color:t.colors.bodyText,transition:"color 300ms, backgroundColor 300ms",backgroundColor:t.colors.secondaryBg,"&:hover:enabled, &:focus:enabled":{color:t.colors.white,backgroundColor:t.colors.primary,transition:"none",outline:"none"},"&:active":{outline:"none",border:"none"},"&:disabled":{cursor:"not-allowed",color:t.colors.fadedText40}})),Vt=k("div",{target:"eaeic2i3"})(({theme:t,clearable:e})=>({position:"absolute",marginRight:t.spacing.twoXS,left:0,right:`calc(${t.sizes.numberInputControlsWidth} * 2 + ${e?"1em":"0em"})`})),kt=dt.getLogger("NumberInput");function Nt(t){return h(t)||t===""?void 0:t}const tt=t=>{const e=t.toString();if(e.includes("e-")){const r=e.match(/(\d+(?:\.\d+)?)e-(\d+)/);if(r){const s=(r[1]?.split(".")[1]||"").length,n=parseInt(r[2],10);return s+n}return 0}return(e.split(".")[1]||"").length},_=({value:t,format:e,step:r,dataType:s})=>{if(h(t))return null;let n=Nt(e);if(h(n)&&J(r)&&s===C.DataType.FLOAT&&r!==0){const l=tt(r);l>0&&(n=`%0.${l}f`)}if(h(n))return t.toString();try{return St.sprintf(n,t)}catch(l){return kt.warn(`Error in sprintf(${n}, ${t}): ${l}`),String(t)}},Et=(t,e,r)=>h(t)?!1:t-e>=r,Rt=(t,e,r)=>h(t)?!1:t+e<=r,X=(t,e,r)=>{const s=tt(e);if(s===0)switch(r){case"add":return t+e;case"subtract":return t-e}const n=Math.pow(10,s),l=Math.round(t*n),p=Math.round(e*n);switch(r){case"add":return(l+p)/n;case"subtract":return(l-p)/n}},Ft=({step:t,dataType:e})=>t||(e===C.DataType.INT?1:.01);function q(t,e){return e.dataType===C.DataType.INT?t.getIntValue(e):t.getDoubleValue(e)}function Wt(t){return t.default??null}function zt(t){return t.value??t.default??null}function Bt(t,e,r,s){switch(t.dataType){case C.DataType.INT:e.setIntValue(t,r.value,{fromUi:r.fromUi},s);break;case C.DataType.FLOAT:e.setDoubleValue(t,r.value,{fromUi:r.fromUi},s);break;default:throw new Error("Invalid data type")}}const Lt=({disabled:t,element:e,widgetMgr:r,fragmentId:s})=>{const n=pt(),{dataType:l,formId:p,default:T,format:N,icon:E,min:g,max:y}=e,{width:L,elementRef:et}=ft(),c=a.useMemo(()=>Ft({step:e.step,dataType:e.dataType}),[e.step,e.dataType]),I=a.useCallback(o=>_({value:o,dataType:l,format:N,step:c}),[l,N,c]),[f,w]=a.useState(!1),[b,S]=a.useState(()=>{const o=q(r,e)??T??null;return _({value:o,dataType:l,format:N,step:c})}),[P,U]=Tt({getStateFromWidgetMgr:q,getDefaultStateFromProto:Wt,getCurrStateFromProto:zt,updateWidgetMgrState:Bt,element:e,widgetMgr:r,fragmentId:s,onFormCleared:a.useCallback(()=>{const o=T??null;w(!1),S(I(o))},[T,I])}),[A,H]=a.useState(!1),R=a.useRef(null),[$]=a.useState(()=>wt("number_input_")),M=mt({formId:p}),nt=M?r.allowFormEnterToSubmit(p):f,rt=A&&L>V(n.breakpoints.hideWidgetDetails);a.useEffect(()=>{f||S(I(P))},[P,f,I]);const m=a.useCallback(({value:o,fromUi:i})=>{if(J(o)&&(g>o||o>y)){R.current?.reportValidity();return}const D=o??T??null;U({value:D,fromUi:i}),w(!1),S(I(D))},[g,y,T,I,U]),ot=a.useCallback(()=>{H(!0)},[]);a.useEffect(()=>{const o=R.current;if(o){const i=D=>{D.preventDefault()};return o.addEventListener("wheel",i),()=>{o.removeEventListener("wheel",i)}}},[]);const F=h(e.default)&&!t,at=a.useCallback(o=>{const{value:i}=o.target;i===""?(w(!0),S(null)):(w(!0),S(i))},[]),u=a.useMemo(()=>{if(b===null||b==="")return null;if(e.dataType===C.DataType.INT){const i=parseInt(b,10);return isNaN(i)?null:i}const o=parseFloat(b);return isNaN(o)?null:o},[b,e.dataType]),v=Et(u,c,g),x=Rt(u,c,y),st=a.useCallback(()=>{f&&m({value:u,fromUi:!0}),H(!1)},[f,u,m]),W=a.useCallback(()=>{if(x){const o=X(u??g,c,"add");m({value:o,fromUi:!0})}},[u,g,c,x,m]),z=a.useCallback(()=>{if(v){const o=X(u??y,c,"subtract");m({value:o,fromUi:!0})}},[u,y,c,v,m]),it=a.useCallback(o=>{const{key:i}=o;switch(i){case"ArrowUp":o.preventDefault(),W();break;case"ArrowDown":o.preventDefault(),z();break}},[W,z]),lt=a.useCallback(o=>{o.key==="Enter"&&(f&&m({value:u,fromUi:!0}),r.allowFormEnterToSubmit(p)&&r.submitForm(p,s))},[f,u,m,r,p,s]),ct=V(n.iconSizes.lg)+2*V(n.spacing.twoXS),O=V(n.breakpoints.hideNumberInputControls),ut=E?O+ct:O;return B("div",{className:"stNumberInput","data-testid":"stNumberInput",ref:et,children:[d(gt,{label:e.label,disabled:t,labelVisibility:bt(e.labelVisibility?.value),htmlFor:$,children:e.help&&d(ht,{content:e.help,label:e.label})}),B(xt,{className:A?"focused":"","data-testid":"stNumberInputContainer",children:[d(vt,{type:"number",inputRef:R,value:b??"",placeholder:e.placeholder,onBlur:st,onFocus:ot,onChange:at,onKeyPress:lt,onKeyDown:it,clearable:F,clearOnEscape:F,disabled:t,"aria-label":e.label,startEnhancer:e.icon&&d(It,{"data-testid":"stNumberInputIcon",iconValue:e.icon,size:"lg"}),id:$,overrides:{ClearIconContainer:{style:{padding:0}},ClearIcon:{props:{overrides:{Svg:{style:{color:n.colors.grayTextColor,padding:n.spacing.threeXS,height:n.sizes.clearIconSize,width:n.sizes.clearIconSize,":hover":{fill:n.colors.bodyText}}}}}},Input:{props:{"data-testid":"stNumberInputField",step:c,min:g,max:y,type:"number",inputMode:""},style:{fontWeight:n.fontWeights.normal,lineHeight:n.lineHeights.inputWidget,paddingRight:n.spacing.sm,paddingLeft:n.spacing.md,paddingBottom:n.spacing.sm,paddingTop:n.spacing.sm,"::placeholder":{color:n.colors.fadedText60}}},InputContainer:{style:()=>({borderTopRightRadius:0,borderBottomRightRadius:0})},Root:{style:{borderTopRightRadius:0,borderBottomRightRadius:0,borderTopLeftRadius:0,borderBottomLeftRadius:0,borderLeftWidth:0,borderRightWidth:0,borderTopWidth:0,borderBottomWidth:0,paddingRight:0,paddingLeft:E?n.spacing.sm:0}},StartEnhancer:{style:{paddingLeft:0,paddingRight:0,minWidth:n.iconSizes.lg,color:yt(E)?n.colors.fadedText60:"inherit"}}}}),L>ut&&B(Dt,{children:[d(K,{"data-testid":"stNumberInputStepDown",onClick:z,disabled:!v||t,tabIndex:-1,children:d(j,{content:Q,size:"xs",color:v?"inherit":n.colors.fadedText40})}),d(K,{"data-testid":"stNumberInputStepUp",onClick:W,disabled:!x||t,tabIndex:-1,children:d(j,{content:Z,size:"xs",color:x?"inherit":n.colors.fadedText40})})]})]}),rt&&d(Vt,{clearable:F,children:d(Ct,{dirty:f,value:b??"",inForm:M,allowEnterToSubmit:nt})})]})},Kt=a.memo(Lt);export{Kt as default};
@@ -1,9 +0,0 @@
1
- import{aB as X,r as B}from"./index.CPc_uZux.js";import{s as Be}from"./index.DU68jVpM.js";import"./withFullScreenWrapper.DtkUCO_d.js";import"./Toolbar.COH7NaOE.js";import"./FormClearHelper.DTFnX0js.js";import"./moment.C7qA8nIE.js";import"./pandasStylerUtils.3IiIKU9-.js";import"./numbro.B9_PXfzp.js";import"./_baseIndexOf.BTknn6Gb.js";import"./index.8HslT92O.js";import"./main.TU5_aabd.js";import"./throttle.emUyC44c.js";import"./toConsumableArray.DDV1bN1-.js";import"./formatNumber.DB5irY8c.js";import"./sprintf.DpPCfzXw.js";import"./formatMoment.C6Hwn6X5.js";import"./checkbox.BKgWNdeI.js";import"./createDownloadLinkElement.6oO-YlYv.js";import"./FileDownload.esm.Z9hRQIHi.js";import"./_arrayIncludes.B19Iyn2B.js";const Te=Be("div")({name:"NumberOverlayEditorStyle",class:"gdg-n15fjm3e",propsAsIs:!1});function pe(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r}var re;(function(e){e.event="event",e.props="prop"})(re||(re={}));function q(){}function Fe(e){var t,r=void 0;return function(){for(var n=[],a=arguments.length;a--;)n[a]=arguments[a];return t&&n.length===t.length&&n.every(function(i,l){return i===t[l]})||(t=n,r=e.apply(void 0,n)),r}}function ae(e){return!!(e||"").match(/\d/)}function Y(e){return e==null}function _e(e){return typeof e=="number"&&isNaN(e)}function Se(e){return Y(e)||_e(e)||typeof e=="number"&&!isFinite(e)}function xe(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function je(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}function Le(e,t,r){var n=je(r),a=e.search(/[1-9]/);return a=a===-1?e.length:a,e.substring(0,a)+e.substring(a,e.length).replace(n,"$1"+t)}function Me(e){var t=B.useRef(e);t.current=e;var r=B.useRef(function(){for(var n=[],a=arguments.length;a--;)n[a]=arguments[a];return t.current.apply(t,n)});return r.current}function se(e,t){t===void 0&&(t=!0);var r=e[0]==="-",n=r&&t;e=e.replace("-","");var a=e.split("."),i=a[0],l=a[1]||"";return{beforeDecimal:i,afterDecimal:l,hasNegation:r,addNegation:n}}function ke(e){if(!e)return e;var t=e[0]==="-";t&&(e=e.substring(1,e.length));var r=e.split("."),n=r[0].replace(/^0+/,"")||"0",a=r[1]||"";return(t?"-":"")+n+(a?"."+a:"")}function ye(e,t,r){for(var n="",a=r?"0":"",i=0;i<=t-1;i++)n+=e[i]||a;return n}function de(e,t){return Array(t+1).join(e)}function be(e){var t=e+"",r=t[0]==="-"?"-":"";r&&(t=t.substring(1));var n=t.split(/[eE]/g),a=n[0],i=n[1];if(i=Number(i),!i)return r+a;a=a.replace(".","");var l=1+i,m=a.length;return l<0?a="0."+de("0",Math.abs(l))+a:l>=m?a=a+de("0",l-m):a=(a.substring(0,l)||"0")+"."+a.substring(l),r+a}function ge(e,t,r){if(["","-"].indexOf(e)!==-1)return e;var n=(e.indexOf(".")!==-1||r)&&t,a=se(e),i=a.beforeDecimal,l=a.afterDecimal,m=a.hasNegation,p=parseFloat("0."+(l||"0")),S=l.length<=t?"0."+l:p.toFixed(t),h=S.split("."),c=i;i&&Number(h[0])&&(c=i.split("").reverse().reduce(function(I,C,g){return I.length>g?(Number(I[0])+Number(C)).toString()+I.substring(1,I.length):C+I},h[0]));var x=ye(h[1]||"",t,r),y=m?"-":"",s=n?".":"";return""+y+c+s+x}function H(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var r=e.createTextRange();return r.move("character",t),r.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var Ve=Fe(function(e,t){for(var r=0,n=0,a=e.length,i=t.length;e[r]===t[r]&&r<a;)r++;for(;e[a-1-n]===t[i-1-n]&&i-n>r&&a-n>r;)n++;return{from:{start:r,end:a-n},to:{start:r,end:i-n}}}),Pe=function(e,t){var r=Math.min(e.selectionStart,t);return{from:{start:r,end:e.selectionEnd},to:{start:r,end:t}}};function Ke(e,t,r){return Math.min(Math.max(e,t),r)}function ce(e){return Math.max(e.selectionStart,e.selectionEnd)}function We(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function Ue(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function $e(e){var t=e.currentValue,r=e.formattedValue,n=e.currentValueIndex,a=e.formattedValueIndex;return t[n]===r[a]}function Ge(e,t,r,n,a,i,l){l===void 0&&(l=$e);var m=a.findIndex(function(k){return k}),p=e.slice(0,m);!t&&!r.startsWith(p)&&(t=p,r=p+r,n=n+p.length);for(var S=r.length,h=e.length,c={},x=new Array(S),y=0;y<S;y++){x[y]=-1;for(var s=0,I=h;s<I;s++){var C=l({currentValue:r,lastValue:t,formattedValue:e,currentValueIndex:y,formattedValueIndex:s});if(C&&c[s]!==!0){x[y]=s,c[s]=!0;break}}}for(var g=n;g<S&&(x[g]===-1||!i(r[g]));)g++;var T=g===S||x[g]===-1?h:x[g];for(g=n-1;g>0&&x[g]===-1;)g--;var F=g===-1||x[g]===-1?0:x[g]+1;return F>T?T:n-F<T-n?F:T}function me(e,t,r,n){var a=e.length;if(t=Ke(t,0,a),n==="left"){for(;t>=0&&!r[t];)t--;t===-1&&(t=r.indexOf(!0))}else{for(;t<=a&&!r[t];)t++;t>a&&(t=r.lastIndexOf(!0))}return t===-1&&(t=a),t}function Ze(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),r=0,n=t.length;r<n;r++)t[r]=!!(ae(e[r])||ae(e[r-1]));return t}function Ne(e,t,r,n,a,i){i===void 0&&(i=q);var l=Me(function(s,I){var C,g;return Se(s)?(g="",C=""):typeof s=="number"||I?(g=typeof s=="number"?be(s):s,C=n(g)):(g=a(s,void 0),C=n(g)),{formattedValue:C,numAsString:g}}),m=B.useState(function(){return l(Y(e)?t:e,r)}),p=m[0],S=m[1],h=function(s,I){s.formattedValue!==p.formattedValue&&S({formattedValue:s.formattedValue,numAsString:s.value}),i(s,I)},c=e,x=r;Y(e)&&(c=p.numAsString,x=!0);var y=l(c,x);return B.useMemo(function(){S(y)},[y.formattedValue]),[p,h]}function qe(e){return e.replace(/[^0-9]/g,"")}function ze(e){return e}function He(e){var t=e.type;t===void 0&&(t="text");var r=e.displayType;r===void 0&&(r="input");var n=e.customInput,a=e.renderText,i=e.getInputRef,l=e.format;l===void 0&&(l=ze);var m=e.removeFormatting;m===void 0&&(m=qe);var p=e.defaultValue,S=e.valueIsNumericString,h=e.onValueChange,c=e.isAllowed,x=e.onChange;x===void 0&&(x=q);var y=e.onKeyDown;y===void 0&&(y=q);var s=e.onMouseUp;s===void 0&&(s=q);var I=e.onFocus;I===void 0&&(I=q);var C=e.onBlur;C===void 0&&(C=q);var g=e.value,T=e.getCaretBoundary;T===void 0&&(T=Ze);var F=e.isValidInputCharacter;F===void 0&&(F=ae);var k=e.isCharacterSame,j=pe(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),z=Ne(g,p,!!S,l,m,h),P=z[0],V=P.formattedValue,L=P.numAsString,W=z[1],M=B.useRef(),U=B.useRef({formattedValue:V,numAsString:L}),$=function(o,u){U.current={formattedValue:o.formattedValue,numAsString:o.value},W(o,u)},J=B.useState(!1),ee=J[0],d=J[1],f=B.useRef(null),N=B.useRef({setCaretTimeout:null,focusTimeout:null});B.useEffect(function(){return d(!0),function(){clearTimeout(N.current.setCaretTimeout),clearTimeout(N.current.focusTimeout)}},[]);var R=l,A=function(o,u){var v=parseFloat(u);return{formattedValue:o,value:u,floatValue:isNaN(v)?void 0:v}},E=function(o,u,v){o.selectionStart===0&&o.selectionEnd===o.value.length||(H(o,u),N.current.setCaretTimeout=setTimeout(function(){o.value===v&&o.selectionStart!==u&&H(o,u)},0))},O=function(o,u,v){return me(o,u,T(o),v)},Q=function(o,u,v){var w=T(u),_=Ge(u,V,o,v,w,F,k);return _=me(u,_,w),_},oe=function(o){var u=o.formattedValue;u===void 0&&(u="");var v=o.input,w=o.source,_=o.event,D=o.numAsString,b;if(v){var K=o.inputValue||v.value,G=ce(v);v.value=u,b=Q(K,u,G),b!==void 0&&E(v,b,u)}u!==V&&$(A(u,D),{event:_,source:w})};B.useEffect(function(){var o=U.current,u=o.formattedValue,v=o.numAsString;(V!==u||L!==v)&&$(A(V,L),{event:void 0,source:re.props})},[V,L]);var te=f.current?ce(f.current):void 0,ne=typeof window<"u"?B.useLayoutEffect:B.useEffect;ne(function(){var o=f.current;if(V!==U.current.formattedValue&&o){var u=Q(U.current.formattedValue,V,te);o.value=V,E(o,u,V)}},[V]);var ue=function(o,u,v){var w=u.target,_=M.current?Pe(M.current,w.selectionEnd):Ve(V,o),D=Object.assign(Object.assign({},_),{lastValue:V}),b=m(o,D),K=R(b);if(b=m(K,void 0),c&&!c(A(K,b))){var G=u.target,Z=ce(G),fe=Q(o,V,Z);return G.value=V,E(G,fe,V),!1}return oe({formattedValue:K,numAsString:b,inputValue:o,event:u,source:v,input:u.target}),!0},le=function(o,u){u===void 0&&(u=0);var v=o.selectionStart,w=o.selectionEnd;M.current={selectionStart:v,selectionEnd:w+u}},De=function(o){var u=o.target,v=u.value,w=ue(v,o,re.event);w&&x(o),M.current=void 0},Ie=function(o){var u=o.target,v=o.key,w=u.selectionStart,_=u.selectionEnd,D=u.value;D===void 0&&(D="");var b;v==="ArrowLeft"||v==="Backspace"?b=Math.max(w-1,0):v==="ArrowRight"?b=Math.min(w+1,D.length):v==="Delete"&&(b=w);var K=0;v==="Delete"&&w===_&&(K=1);var G=v==="ArrowLeft"||v==="ArrowRight";if(b===void 0||w!==_&&!G){y(o),le(u,K);return}var Z=b;if(G){var fe=v==="ArrowLeft"?"left":"right";Z=O(D,b,fe),Z!==b&&o.preventDefault()}else v==="Delete"&&!F(D[b])?Z=O(D,b,"right"):v==="Backspace"&&!F(D[b])&&(Z=O(D,b,"left"));Z!==b&&E(u,Z,D),y(o),le(u,K)},Ce=function(o){var u=o.target,v=function(){var w=u.selectionStart,_=u.selectionEnd,D=u.value;if(D===void 0&&(D=""),w===_){var b=O(D,w);b!==w&&E(u,b,D)}};v(),requestAnimationFrame(function(){v()}),s(o),le(u)},Ee=function(o){o.persist&&o.persist();var u=o.target,v=o.currentTarget;f.current=u,N.current.focusTimeout=setTimeout(function(){var w=u.selectionStart,_=u.selectionEnd,D=u.value;D===void 0&&(D="");var b=O(D,w);b!==w&&!(w===0&&_===D.length)&&E(u,b,D),I(Object.assign(Object.assign({},o),{currentTarget:v}))},0)},Re=function(o){f.current=null,clearTimeout(N.current.focusTimeout),clearTimeout(N.current.setCaretTimeout),C(o)},Ae=ee&&We()?"numeric":void 0,ve=Object.assign({inputMode:Ae},j,{type:t,value:V,onChange:De,onKeyDown:Ie,onMouseUp:Ce,onFocus:Ee,onBlur:Re});if(r==="text")return a?X.createElement(X.Fragment,null,a(V,j)||null):X.createElement("span",Object.assign({},j,{ref:i}),V);if(n){var Oe=n;return X.createElement(Oe,Object.assign({},ve,{ref:i}))}return X.createElement("input",Object.assign({},ve,{ref:i}))}function he(e,t){var r=t.decimalScale,n=t.fixedDecimalScale,a=t.prefix;a===void 0&&(a="");var i=t.suffix;i===void 0&&(i="");var l=t.allowNegative,m=t.thousandsGroupStyle;if(m===void 0&&(m="thousand"),e===""||e==="-")return e;var p=ie(t),S=p.thousandSeparator,h=p.decimalSeparator,c=r!==0&&e.indexOf(".")!==-1||r&&n,x=se(e,l),y=x.beforeDecimal,s=x.afterDecimal,I=x.addNegation;return r!==void 0&&(s=ye(s,r,!!n)),S&&(y=Le(y,S,m)),a&&(y=a+y),i&&(s=s+i),I&&(y="-"+y),e=y+(c&&h||"")+s,e}function ie(e){var t=e.decimalSeparator;t===void 0&&(t=".");var r=e.thousandSeparator,n=e.allowedDecimalSeparators;return r===!0&&(r=","),n||(n=[t,"."]),{decimalSeparator:t,thousandSeparator:r,allowedDecimalSeparators:n}}function Je(e,t){e===void 0&&(e="");var r=new RegExp("(-)"),n=new RegExp("(-)(.)*(-)"),a=r.test(e),i=n.test(e);return e=e.replace(/-/g,""),a&&!i&&t&&(e="-"+e),e}function Qe(e,t){return new RegExp("(^-)|[0-9]|"+xe(e),"g")}function Xe(e,t,r){return e===""?!0:!t?.match(/\d/)&&!r?.match(/\d/)&&typeof e=="string"&&!isNaN(Number(e))}function Ye(e,t,r){var n;t===void 0&&(t=Ue(e));var a=r.allowNegative,i=r.prefix;i===void 0&&(i="");var l=r.suffix;l===void 0&&(l="");var m=r.decimalScale,p=t.from,S=t.to,h=S.start,c=S.end,x=ie(r),y=x.allowedDecimalSeparators,s=x.decimalSeparator,I=e[c]===s;if(ae(e)&&(e===i||e===l)&&t.lastValue==="")return e;if(c-h===1&&y.indexOf(e[h])!==-1){var C=m===0?"":s;e=e.substring(0,h)+C+e.substring(h+1,e.length)}var g=function(f,N,R){var A=!1,E=!1;i.startsWith("-")?A=!1:f.startsWith("--")?(A=!1,E=!0):l.startsWith("-")&&f.length===l.length?A=!1:f[0]==="-"&&(A=!0);var O=A?1:0;return E&&(O=2),O&&(f=f.substring(O),N-=O,R-=O),{value:f,start:N,end:R,hasNegation:A}},T=g(e,h,c),F=T.hasNegation;n=T,e=n.value,h=n.start,c=n.end;var k=g(t.lastValue,p.start,p.end),j=k.start,z=k.end,P=k.value,V=e.substring(h,c);e.length&&P.length&&(j>P.length-l.length||z<i.length)&&!(V&&l.startsWith(V))&&(e=P);var L=0;e.startsWith(i)?L+=i.length:h<i.length&&(L=h),e=e.substring(L),c-=L;var W=e.length,M=e.length-l.length;e.endsWith(l)?W=M:(c>M||c>e.length-l.length)&&(W=c),e=e.substring(0,W),e=Je(F?"-"+e:e,a),e=(e.match(Qe(s))||[]).join("");var U=e.indexOf(s);e=e.replace(new RegExp(xe(s),"g"),function(f,N){return N===U?".":""});var $=se(e,a),J=$.beforeDecimal,ee=$.afterDecimal,d=$.addNegation;return S.end-S.start<p.end-p.start&&J===""&&I&&!parseFloat(ee)&&(e=d?"-":""),e}function et(e,t){var r=t.prefix;r===void 0&&(r="");var n=t.suffix;n===void 0&&(n="");var a=Array.from({length:e.length+1}).map(function(){return!0}),i=e[0]==="-";a.fill(!1,0,r.length+(i?1:0));var l=e.length;return a.fill(!1,l-n.length+1,l+1),a}function tt(e){var t=ie(e),r=t.thousandSeparator,n=t.decimalSeparator,a=e.prefix;a===void 0&&(a="");var i=e.allowNegative;if(i===void 0&&(i=!0),r===n)throw new Error(`
2
- Decimal separator can't be same as thousand separator.
3
- thousandSeparator: `+r+` (thousandSeparator = {true} is same as thousandSeparator = ",")
4
- decimalSeparator: `+n+` (default value for decimalSeparator is .)
5
- `);return a.startsWith("-")&&i&&(console.error(`
6
- Prefix can't start with '-' when allowNegative is true.
7
- prefix: `+a+`
8
- allowNegative: `+i+`
9
- `),i=!1),Object.assign(Object.assign({},e),{allowNegative:i})}function rt(e){e=tt(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var t=e.suffix,r=e.allowNegative,n=e.allowLeadingZeros,a=e.onKeyDown;a===void 0&&(a=q);var i=e.onBlur;i===void 0&&(i=q);var l=e.thousandSeparator,m=e.decimalScale,p=e.fixedDecimalScale,S=e.prefix;S===void 0&&(S="");var h=e.defaultValue,c=e.value,x=e.valueIsNumericString,y=e.onValueChange,s=pe(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),I=ie(e),C=I.decimalSeparator,g=I.allowedDecimalSeparators,T=function(d){return he(d,e)},F=function(d,f){return Ye(d,f,e)},k=Y(c)?h:c,j=x??Xe(k,S,t);Y(c)?Y(h)||(j=j||typeof h=="number"):j=j||typeof c=="number";var z=function(d){return Se(d)?d:(typeof d=="number"&&(d=be(d)),j&&typeof m=="number"?ge(d,m,!!p):d)},P=Ne(z(c),z(h),!!j,T,F,y),V=P[0],L=V.numAsString,W=V.formattedValue,M=P[1],U=function(d){var f=d.target,N=d.key,R=f.selectionStart,A=f.selectionEnd,E=f.value;if(E===void 0&&(E=""),(N==="Backspace"||N==="Delete")&&A<S.length){d.preventDefault();return}if(R!==A){a(d);return}N==="Backspace"&&E[0]==="-"&&R===S.length+1&&r&&H(f,1),m&&p&&(N==="Backspace"&&E[R-1]===C?(H(f,R-1),d.preventDefault()):N==="Delete"&&E[R]===C&&d.preventDefault()),g?.includes(N)&&E[R]===C&&H(f,R+1);var O=l===!0?",":l;N==="Backspace"&&E[R-1]===O&&H(f,R-1),N==="Delete"&&E[R]===O&&H(f,R+1),a(d)},$=function(d){var f=L;if(f.match(/\d/g)||(f=""),n||(f=ke(f)),p&&m&&(f=ge(f,m,p)),f!==L){var N=he(f,e);M({formattedValue:N,value:f,floatValue:parseFloat(f)},{event:d,source:re.event})}i(d)},J=function(d){return d===C?!0:ae(d)},ee=function(d){var f=d.currentValue,N=d.lastValue,R=d.formattedValue,A=d.currentValueIndex,E=d.formattedValueIndex,O=f[A],Q=R[E],oe=Ve(N,f),te=oe.to,ne=function(ue){return F(ue).indexOf(".")+S.length};return c===0&&p&&m&&f[te.start]===C&&ne(f)<A&&ne(R)>E?!1:A>=te.start&&A<te.end&&g&&g.includes(O)&&Q===C?!0:O===Q};return Object.assign(Object.assign({},s),{value:W,valueIsNumericString:!1,isValidInputCharacter:J,isCharacterSame:ee,onValueChange:M,format:T,removeFormatting:F,getCaretBoundary:function(d){return et(d,e)},onKeyDown:U,onBlur:$})}function at(e){var t=rt(e);return X.createElement(He,Object.assign({},t))}function we(){return Intl.NumberFormat()?.formatToParts(1.1)?.find(r=>r.type==="decimal")?.value??"."}function nt(){return we()==="."?",":"."}const Dt=e=>{const{value:t,onChange:r,disabled:n,highlight:a,validatedSelection:i,fixedDecimals:l,allowNegative:m,thousandSeparator:p,decimalSeparator:S}=e,h=B.useRef();return B.useLayoutEffect(()=>{if(i!==void 0){const c=typeof i=="number"?[i,null]:i;h.current?.setSelectionRange(c[0],c[1])}},[i]),B.createElement(Te,null,B.createElement(at,{autoFocus:!0,getInputRef:h,className:"gdg-input",onFocus:c=>c.target.setSelectionRange(a?0:c.target.value.length,c.target.value.length),disabled:n===!0,decimalScale:l,allowNegative:m,thousandSeparator:p??nt(),decimalSeparator:S??we(),value:Object.is(t,-0)?"-":t??"",onValueChange:r}))};export{Dt as default};
@@ -1 +0,0 @@
1
- var b={},x;function m(){return x||(x=1,(function(k){(function(){var i={not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function f(t){return v(S(t),arguments)}function w(t,o){return f.apply(null,[t].concat(o||[]))}function v(t,o){var n=1,c=t.length,e,p="",a,s,r,l,d,h,y,u;for(a=0;a<c;a++)if(typeof t[a]=="string")p+=t[a];else if(typeof t[a]=="object"){if(r=t[a],r.keys)for(e=o[n],s=0;s<r.keys.length;s++){if(e==null)throw new Error(f('[sprintf] Cannot access property "%s" of undefined value "%s"',r.keys[s],r.keys[s-1]));e=e[r.keys[s]]}else r.param_no?e=o[r.param_no]:e=o[n++];if(i.not_type.test(r.type)&&i.not_primitive.test(r.type)&&e instanceof Function&&(e=e()),i.numeric_arg.test(r.type)&&typeof e!="number"&&isNaN(e))throw new TypeError(f("[sprintf] expecting number but found %T",e));switch(i.number.test(r.type)&&(y=e>=0),r.type){case"b":e=parseInt(e,10).toString(2);break;case"c":e=String.fromCharCode(parseInt(e,10));break;case"d":case"i":e=parseInt(e,10);break;case"j":e=JSON.stringify(e,null,r.width?parseInt(r.width):0);break;case"e":e=r.precision?parseFloat(e).toExponential(r.precision):parseFloat(e).toExponential();break;case"f":e=r.precision?parseFloat(e).toFixed(r.precision):parseFloat(e);break;case"g":e=r.precision?String(Number(e.toPrecision(r.precision))):parseFloat(e);break;case"o":e=(parseInt(e,10)>>>0).toString(8);break;case"s":e=String(e),e=r.precision?e.substring(0,r.precision):e;break;case"t":e=String(!!e),e=r.precision?e.substring(0,r.precision):e;break;case"T":e=Object.prototype.toString.call(e).slice(8,-1).toLowerCase(),e=r.precision?e.substring(0,r.precision):e;break;case"u":e=parseInt(e,10)>>>0;break;case"v":e=e.valueOf(),e=r.precision?e.substring(0,r.precision):e;break;case"x":e=(parseInt(e,10)>>>0).toString(16);break;case"X":e=(parseInt(e,10)>>>0).toString(16).toUpperCase();break}i.json.test(r.type)?p+=e:(i.number.test(r.type)&&(!y||r.sign)?(u=y?"+":"-",e=e.toString().replace(i.sign,"")):u="",d=r.pad_char?r.pad_char==="0"?"0":r.pad_char.charAt(1):" ",h=r.width-(u+e).length,l=r.width&&h>0?d.repeat(h):"",p+=r.align?u+e+l:d==="0"?u+l+e:l+u+e)}return p}var g=Object.create(null);function S(t){if(g[t])return g[t];for(var o=t,n,c=[],e=0;o;){if((n=i.text.exec(o))!==null)c.push(n[0]);else if((n=i.modulo.exec(o))!==null)c.push("%");else if((n=i.placeholder.exec(o))!==null){if(n[2]){e|=1;var p=[],a=n[2],s=[];if((s=i.key.exec(a))!==null)for(p.push(s[1]);(a=a.substring(s[0].length))!=="";)if((s=i.key_access.exec(a))!==null)p.push(s[1]);else if((s=i.index_access.exec(a))!==null)p.push(s[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");n[2]=p}else e|=2;if(e===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");c.push({placeholder:n[0],param_no:n[1],keys:n[2],sign:n[3],pad_char:n[4],align:n[5],width:n[6],precision:n[7],type:n[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");o=o.substring(n[0].length)}return g[t]=c}k.sprintf=f,k.vsprintf=w,typeof window<"u"&&(window.sprintf=f,window.vsprintf=w)})()})(b)),b}var _=m();export{_ as s};
@@ -1 +0,0 @@
1
- import{J as i}from"./index.CPc_uZux.js";var n=0;function u(r){var t=++n;return i(r)+t}export{u};