streamlit-nightly 1.33.1.dev20240415__py2.py3-none-any.whl → 1.33.1.dev20240417__py2.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.
- streamlit/components/v1/custom_component.py +2 -0
- streamlit/delta_generator.py +0 -5
- streamlit/elements/__init__.py +0 -57
- streamlit/elements/arrow_vega_lite.py +8 -1
- streamlit/elements/form.py +5 -1
- streamlit/elements/lib/column_types.py +2 -2
- streamlit/elements/spinner.py +16 -30
- streamlit/elements/utils.py +36 -1
- streamlit/elements/widgets/button.py +21 -2
- streamlit/elements/widgets/camera_input.py +3 -0
- streamlit/elements/widgets/chat.py +8 -1
- streamlit/elements/widgets/checkbox.py +3 -1
- streamlit/elements/widgets/color_picker.py +3 -0
- streamlit/elements/widgets/data_editor.py +10 -1
- streamlit/elements/widgets/file_uploader.py +3 -0
- streamlit/elements/widgets/multiselect.py +4 -1
- streamlit/elements/widgets/number_input.py +3 -0
- streamlit/elements/widgets/radio.py +4 -0
- streamlit/elements/widgets/select_slider.py +4 -0
- streamlit/elements/widgets/selectbox.py +3 -1
- streamlit/elements/widgets/slider.py +3 -1
- streamlit/elements/widgets/text_widgets.py +4 -2
- streamlit/elements/widgets/time_widgets.py +4 -1
- streamlit/runtime/caching/__init__.py +1 -19
- streamlit/runtime/caching/cache_errors.py +0 -38
- streamlit/runtime/caching/cached_message_replay.py +27 -69
- streamlit/runtime/fragment.py +1 -1
- streamlit/runtime/legacy_caching/__init__.py +2 -12
- streamlit/runtime/legacy_caching/caching.py +1 -80
- streamlit/runtime/scriptrunner/script_run_context.py +4 -0
- streamlit/static/asset-manifest.json +4 -4
- streamlit/static/index.html +1 -1
- streamlit/static/static/js/3092.152fd2b7.chunk.js +1 -0
- streamlit/static/static/js/43.05a14cc7.chunk.js +1 -0
- streamlit/static/static/js/{main.4a20073e.js → main.f215a056.js} +2 -2
- streamlit/type_util.py +11 -0
- {streamlit_nightly-1.33.1.dev20240415.dist-info → streamlit_nightly-1.33.1.dev20240417.dist-info}/METADATA +1 -1
- {streamlit_nightly-1.33.1.dev20240415.dist-info → streamlit_nightly-1.33.1.dev20240417.dist-info}/RECORD +43 -43
- streamlit/static/static/js/3092.ad569cc8.chunk.js +0 -1
- streamlit/static/static/js/43.9ae03282.chunk.js +0 -1
- /streamlit/static/static/js/{main.4a20073e.js.LICENSE.txt → main.f215a056.js.LICENSE.txt} +0 -0
- {streamlit_nightly-1.33.1.dev20240415.data → streamlit_nightly-1.33.1.dev20240417.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.33.1.dev20240415.dist-info → streamlit_nightly-1.33.1.dev20240417.dist-info}/WHEEL +0 -0
- {streamlit_nightly-1.33.1.dev20240415.dist-info → streamlit_nightly-1.33.1.dev20240417.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.33.1.dev20240415.dist-info → streamlit_nightly-1.33.1.dev20240417.dist-info}/top_level.txt +0 -0
streamlit/type_util.py
CHANGED
@@ -855,6 +855,17 @@ def is_colum_type_arrow_incompatible(column: Series[Any] | Index) -> bool:
|
|
855
855
|
]:
|
856
856
|
return True
|
857
857
|
|
858
|
+
if str(column.dtype) in {
|
859
|
+
# These period types are not yet supported by our frontend impl.
|
860
|
+
# See comments in Quiver.ts for more details.
|
861
|
+
"period[B]",
|
862
|
+
"period[N]",
|
863
|
+
"period[ns]",
|
864
|
+
"period[U]",
|
865
|
+
"period[us]",
|
866
|
+
}:
|
867
|
+
return True
|
868
|
+
|
858
869
|
if column.dtype == "object":
|
859
870
|
# The dtype of mixed type columns is always object, the actual type of the column
|
860
871
|
# values can be determined via the infer_dtype function:
|
@@ -10,7 +10,7 @@ streamlit/config_option.py,sha256=7kfzt-xhJs3awfyIHsyRaTBSxLpz1RioobDl5uXV37g,11
|
|
10
10
|
streamlit/config_util.py,sha256=-MGb5eBrsZvNmqywmiBmo27ll1F9OmCDX4toGWglv2c,6015
|
11
11
|
streamlit/constants.py,sha256=KhNjCeooky2bbW7QMX3ijOA5enHIOgj6Xo4TBhtTJNE,798
|
12
12
|
streamlit/cursor.py,sha256=LUDB6o7xyGb1it_8rl5QU_N3MRhFCdtnd9tuTx78abU,6001
|
13
|
-
streamlit/delta_generator.py,sha256=
|
13
|
+
streamlit/delta_generator.py,sha256=mXAQ8sr2hh0zrh9Inuh3gE3LiZ3PQTvzK5fIwiXPxvM,33936
|
14
14
|
streamlit/deprecation_util.py,sha256=3JxWWS424v1kQ-qOq-9sQNYPQ8_UERH3QpYtkWxLP74,6516
|
15
15
|
streamlit/development.py,sha256=iO-KQc62Do9uSwoa5vV2tfImqz3QPhJ1Md6DETcnHkc,813
|
16
16
|
streamlit/echo.py,sha256=s0tT_IXxh7BLHOapRS8syE5Tnm4Djm3-oKO0J0MY1wI,4077
|
@@ -30,7 +30,7 @@ streamlit/source_util.py,sha256=21c98etHrDfg_MyLMohG7ByrEC52THuUP-E7pkCcmiE,5749
|
|
30
30
|
streamlit/string_util.py,sha256=qq_o0K7Raizzsebu_KgfBSm3TiovIlKpdowdpmGB_Kk,4808
|
31
31
|
streamlit/temporary_directory.py,sha256=eBv5q0CR9GApa-itZBaGtqQKMl248H0HojEVKzkS9cc,1627
|
32
32
|
streamlit/time_util.py,sha256=IoZTYEqz1qX_vzieLeuyjHhF5fpDmqc49DYFK4Gsy4w,2844
|
33
|
-
streamlit/type_util.py,sha256=
|
33
|
+
streamlit/type_util.py,sha256=trWCi-MoGi-rvyOGr1hjcsswvJiZgK2aGe5Hg00R_r4,44770
|
34
34
|
streamlit/url_util.py,sha256=iU1lpZhzW4ZjhjBhSdw39OzixnThIsxhXpDP-ZIgUT8,3019
|
35
35
|
streamlit/user_info.py,sha256=dqNEEanUVJDLhn4cTmeFG1iUfSQFDWuMQjjQHmDtE6I,3472
|
36
36
|
streamlit/util.py,sha256=5fna6hGM_WBZugMjzIXqqFD41JrFL3QBicfcAmjyefw,6379
|
@@ -49,19 +49,19 @@ streamlit/components/v1/__init__.py,sha256=I7xa1wfGQY84U_nWWsq1i_HO5kCQ7f0BE5_dE
|
|
49
49
|
streamlit/components/v1/component_arrow.py,sha256=BvqxXmK3tx6zv3Ah0YzVYRNpwJBfh42Yh73VlK-q1PE,4125
|
50
50
|
streamlit/components/v1/component_registry.py,sha256=akLvKVy1x84j21V4jPPt8icxTCSpWdfxSY8o83T8z8w,3773
|
51
51
|
streamlit/components/v1/components.py,sha256=6D51UudnEwOMvMqoZsAlaSiYqY8yXSezlIzdCgdlG0Q,1274
|
52
|
-
streamlit/components/v1/custom_component.py,sha256=
|
52
|
+
streamlit/components/v1/custom_component.py,sha256=N2EUTVWV7owZ0DtiY0CKYrUECHhyTd5b7ZLlc_anHl4,9170
|
53
53
|
streamlit/connections/__init__.py,sha256=WSOEtrwhiNYti89iCk3O7I83rurZl8gXoM8tA2d_E-U,1083
|
54
54
|
streamlit/connections/base_connection.py,sha256=8rzoGovDem0o3FzJTikP0IRdL7i3lBqHhyESBnER9no,7465
|
55
55
|
streamlit/connections/snowflake_connection.py,sha256=z8yUWzHnoDOriydUc6KbDQStI5emvmqkEUtGf0c-AFc,12517
|
56
56
|
streamlit/connections/snowpark_connection.py,sha256=eoOfCTCI6BMByN9lZn42Z_c7Z3dLGYZZLmM8ouhj-ig,8184
|
57
57
|
streamlit/connections/sql_connection.py,sha256=rL2CPWpXuAt0WMxfNScKkWQrbLJ4aFaLRPmkcKDdQy4,12141
|
58
58
|
streamlit/connections/util.py,sha256=3Ryc93a5KstsVwQl6ug5cmb8F-WQoD4c0mBWNPLoFsY,3022
|
59
|
-
streamlit/elements/__init__.py,sha256=
|
59
|
+
streamlit/elements/__init__.py,sha256=Vrf1yVMOcTyhUPnYvsfyeL96Vpd5z8KoSV5ZzTcTQgU,616
|
60
60
|
streamlit/elements/alert.py,sha256=ic40ejcwgg-ZmLlKmzV7QlY9Xi7dxsvS0tZEARnWqgQ,5171
|
61
61
|
streamlit/elements/altair_utils.py,sha256=dYDP5CiZp7DX3gNX6hXaGw5fgVKuWB4yLTfTVprp8bI,1222
|
62
62
|
streamlit/elements/arrow.py,sha256=GLy6vwgFRohoiF6e2m2i59NnuvgTO9k69VWkYlBcfyE,14636
|
63
63
|
streamlit/elements/arrow_altair.py,sha256=CXUKBQTkVjTimK9zYfxiKAh2GmDNRQQftSdLm5pSgZ8,57049
|
64
|
-
streamlit/elements/arrow_vega_lite.py,sha256=
|
64
|
+
streamlit/elements/arrow_vega_lite.py,sha256=4qbKvKQXLtLNcZ-FWLeBWK1Usaps-kabh1T2PnscKto,7579
|
65
65
|
streamlit/elements/balloons.py,sha256=QnORgG96Opga1SVg8tUBOm-l3nMpKWmjvy1crcS2XaU,1482
|
66
66
|
streamlit/elements/bokeh_chart.py,sha256=4Py_NZaxU22iR6WIvE8fxv3wnJqRRMIvouIiMA7EOqA,3916
|
67
67
|
streamlit/elements/code.py,sha256=zltCajNi2DTPev4w19bdCoq_AJkWs9wRxnn4WEci6qM,2476
|
@@ -70,7 +70,7 @@ streamlit/elements/dialog_decorator.py,sha256=_oYCNvbHLgCfqRW65-U6KDIqX4jqFzvXB_
|
|
70
70
|
streamlit/elements/doc_string.py,sha256=f8dXHGNw71VnNkQZvCcvT6Jl5fXezMEcVyd2UW6YAWQ,16168
|
71
71
|
streamlit/elements/empty.py,sha256=2veIOulNv0F1I7a2Oe3NwybWwFwh4y5rYp4hx2Ave08,3818
|
72
72
|
streamlit/elements/exception.py,sha256=E9D_GugKrV1qNsrBlycLTT7aFmazzWYfBlOsRYBq9Z8,9121
|
73
|
-
streamlit/elements/form.py,sha256=
|
73
|
+
streamlit/elements/form.py,sha256=zpUDFtL3dwuXQBSmrw8Wh02HLdFRtuoFtr7i49HSkc8,12068
|
74
74
|
streamlit/elements/graphviz_chart.py,sha256=4MSPLdVoaWXm6-frpGwgtwjpVjxN2LuPMFiUgh3eAg8,4557
|
75
75
|
streamlit/elements/heading.py,sha256=lf49oaqnoJAy5wPxtvoQ_R6olmGSQy9PVJX0PXufgac,10617
|
76
76
|
streamlit/elements/html.py,sha256=YI0D_pNPAFaq6nx04vadb1JD_aADbmNgNQRvPUp-x7w,2810
|
@@ -86,14 +86,14 @@ streamlit/elements/plotly_chart.py,sha256=qUr1oB7qD88HuswyPea2cJams-lD_0_E14J8Hw
|
|
86
86
|
streamlit/elements/progress.py,sha256=8ke3Q517tK5sLjBjrCs8HcG_ZdQco17NypyXGNxUKoM,5627
|
87
87
|
streamlit/elements/pyplot.py,sha256=TdYPt2K5tOCTO0OiLzN7LEBuy2ty_6SKXfGzmzFQNYw,6441
|
88
88
|
streamlit/elements/snow.py,sha256=WHqk8zmfOr5iD0R-wLlAdlIkDDbiaayguTVmA4e7V_Q,1439
|
89
|
-
streamlit/elements/spinner.py,sha256=
|
89
|
+
streamlit/elements/spinner.py,sha256=ZMJlO-J77lpQZbRPvqJ80ur9u11dBUwJr6JgDct8TLY,2934
|
90
90
|
streamlit/elements/text.py,sha256=-g2LYiJpP2OAdllpd7Df9rhTehIOEuiZN7-u1jwKEio,1856
|
91
91
|
streamlit/elements/toast.py,sha256=aDbRXoJxQLXfvLyUTbvVEqYIDJbRysJ7N4i3NsRuBjc,3547
|
92
|
-
streamlit/elements/utils.py,sha256=
|
92
|
+
streamlit/elements/utils.py,sha256=E4jQojL-QNnUJe6Ktlxz3mXPRgtjgEq902DCYjWePrA,8458
|
93
93
|
streamlit/elements/write.py,sha256=k5sg5u6JqMcLFD_BtNaJbefTVE22eN_0GaBueVZCrV0,20480
|
94
94
|
streamlit/elements/lib/__init__.py,sha256=Vrf1yVMOcTyhUPnYvsfyeL96Vpd5z8KoSV5ZzTcTQgU,616
|
95
95
|
streamlit/elements/lib/column_config_utils.py,sha256=zkm0bY2dYFIhnnIpjZB2nAO9FM7waaSiDKUrSjYXtPU,17226
|
96
|
-
streamlit/elements/lib/column_types.py,sha256=
|
96
|
+
streamlit/elements/lib/column_types.py,sha256=bwxIb1irrYMHBV-BVTfDZV_7SjzqWuqkcQBMBDhwDJA,51087
|
97
97
|
streamlit/elements/lib/dialog.py,sha256=IflTt5K7iWJPao689D-zXmKK5gd4FwEvtqRBqjOa4ug,5685
|
98
98
|
streamlit/elements/lib/dicttools.py,sha256=NC0mMAu1vixFmth-SNLDbaLJ8A02v6AuU1GjJNR8Ydo,3839
|
99
99
|
streamlit/elements/lib/mutable_status_container.py,sha256=FdC9jtvz8br5lhBD9e0V_y3dxDtS7ifoBLfgWiWwDRI,6634
|
@@ -101,21 +101,21 @@ streamlit/elements/lib/pandas_styler_utils.py,sha256=KXaslcPlLdIVk6GgMILHqYc2AY3
|
|
101
101
|
streamlit/elements/lib/streamlit_plotly_theme.py,sha256=DgMP_PWTfFO5J__q8bGxoT3ey5z727582wDD_u3UaPU,8307
|
102
102
|
streamlit/elements/lib/subtitle_utils.py,sha256=eYfsTAKub-55nx0kik9T6nJ8dTyeUazPbMNfkIP-BNg,6246
|
103
103
|
streamlit/elements/widgets/__init__.py,sha256=Vrf1yVMOcTyhUPnYvsfyeL96Vpd5z8KoSV5ZzTcTQgU,616
|
104
|
-
streamlit/elements/widgets/button.py,sha256=
|
105
|
-
streamlit/elements/widgets/camera_input.py,sha256=
|
106
|
-
streamlit/elements/widgets/chat.py,sha256=
|
107
|
-
streamlit/elements/widgets/checkbox.py,sha256=
|
108
|
-
streamlit/elements/widgets/color_picker.py,sha256=
|
109
|
-
streamlit/elements/widgets/data_editor.py,sha256=
|
110
|
-
streamlit/elements/widgets/file_uploader.py,sha256
|
111
|
-
streamlit/elements/widgets/multiselect.py,sha256=
|
112
|
-
streamlit/elements/widgets/number_input.py,sha256=
|
113
|
-
streamlit/elements/widgets/radio.py,sha256=
|
114
|
-
streamlit/elements/widgets/select_slider.py,sha256=
|
115
|
-
streamlit/elements/widgets/selectbox.py,sha256
|
116
|
-
streamlit/elements/widgets/slider.py,sha256=
|
117
|
-
streamlit/elements/widgets/text_widgets.py,sha256=
|
118
|
-
streamlit/elements/widgets/time_widgets.py,sha256=
|
104
|
+
streamlit/elements/widgets/button.py,sha256=NHx6uCcg631vQTfYn-pI_2cBurafKVpkW7U3PtZcTss,31409
|
105
|
+
streamlit/elements/widgets/camera_input.py,sha256=lBQ6WFukuXaE1fXr7SUfOe6GVmy9wexgihQYs8fzUqE,8924
|
106
|
+
streamlit/elements/widgets/chat.py,sha256=eV9jomuAkFGpX-8hzjmAbqaQ4gO7nFsapL0cHYZlLcA,13445
|
107
|
+
streamlit/elements/widgets/checkbox.py,sha256=Q755WAbQBB1pwQ_5_6JSy25bPD3rTPt87zzDDFACQRY,12139
|
108
|
+
streamlit/elements/widgets/color_picker.py,sha256=f4HHx4fF60QVty0rNDy09PDTUQ-gjtHtLX41nv0Jhvw,8925
|
109
|
+
streamlit/elements/widgets/data_editor.py,sha256=gOHJqwXw92RjBMTvFoa1y4Ob_UyXtc4rvL2Rbu4-lk4,35827
|
110
|
+
streamlit/elements/widgets/file_uploader.py,sha256=7SRnF2T20PjylzMUYPqsIm788KfWR9nJo_-CZWAdwVk,17437
|
111
|
+
streamlit/elements/widgets/multiselect.py,sha256=cQpxdHIGJ5CnMr5Qeg8_kDMNSqNTfQ7WMA9IttnPjJk,13354
|
112
|
+
streamlit/elements/widgets/number_input.py,sha256=wHAZHOLqwfNzmlWRbzZx96P20ucl4Gio2hNm-IuISU0,17627
|
113
|
+
streamlit/elements/widgets/radio.py,sha256=yKYpnk84GeOnVTs1f_Bs1QwHO7ACuXzvsL-bRKpzTbw,12416
|
114
|
+
streamlit/elements/widgets/select_slider.py,sha256=Q5CP3PvNiOCfaRDOSHSUwZE-OMgFEuBBoMj6M_JvaJY,13225
|
115
|
+
streamlit/elements/widgets/selectbox.py,sha256=-RYnh2Zx1ClUWbwqFetgYCPe7-YWjVxHuaLJf6wEEXM,11256
|
116
|
+
streamlit/elements/widgets/slider.py,sha256=_RjK8zC1VsVtq2oLvTdxPKm8f72L-vRQeiO_ZfHNZ2k,26434
|
117
|
+
streamlit/elements/widgets/text_widgets.py,sha256=M3KBUACtn3b8dAwolYBAXclqAP5L9ByeWdneFZnG_Ks,21538
|
118
|
+
streamlit/elements/widgets/time_widgets.py,sha256=wRne_4M7eCU8He1L3RljbPiFAmV5zjmrLZd_itUjZX8,29179
|
119
119
|
streamlit/external/__init__.py,sha256=Vrf1yVMOcTyhUPnYvsfyeL96Vpd5z8KoSV5ZzTcTQgU,616
|
120
120
|
streamlit/external/langchain/__init__.py,sha256=sAzaNf4Cje3cJikPBVvF7pj1sEdEvUfKIEY_Z6Zk8cA,814
|
121
121
|
streamlit/external/langchain/streamlit_callback_handler.py,sha256=kKrusABDJ__KaA_mPnTxumSSYKQjYExaQsoMlELZZGI,15280
|
@@ -281,7 +281,7 @@ streamlit/runtime/connection_factory.py,sha256=7ImsODVThE6coSyYmyLGREutcULiZuyR9
|
|
281
281
|
streamlit/runtime/credentials.py,sha256=U02X0aRktpvDrU4_RDpWuJjXK2m_UX9t6SIWC4aNH70,11500
|
282
282
|
streamlit/runtime/forward_msg_cache.py,sha256=YjoFV9BsvskZywI67AsyNSHfk-bAY2SjruG7Ks4hKi8,9805
|
283
283
|
streamlit/runtime/forward_msg_queue.py,sha256=gz7_XnoMVJrKLgghbGcmtihi5SM0qVo_qcOQZBj2ZAA,5550
|
284
|
-
streamlit/runtime/fragment.py,sha256=
|
284
|
+
streamlit/runtime/fragment.py,sha256=iZ6YG0OMGwiobON1uQXpSa_Q-JFX-mM4o6teK91aVAc,11558
|
285
285
|
streamlit/runtime/media_file_manager.py,sha256=z6qcjWk1YiNbvRj3r9vSFZuoDzRscVr9CpNmTJs2Mgc,8510
|
286
286
|
streamlit/runtime/media_file_storage.py,sha256=hQkMC__XRjshEUD73QCSrX3vrfOOO0U7Vf1Uc6qiP90,4375
|
287
287
|
streamlit/runtime/memory_media_file_storage.py,sha256=voiscKQAwKdhIExlsnCaZDRKrKso2yU7KlA92Cgqu2M,6331
|
@@ -296,28 +296,28 @@ streamlit/runtime/session_manager.py,sha256=u0grNXRzDoK6Z_4z4dEF1YsICG6D8qUdY5bB
|
|
296
296
|
streamlit/runtime/stats.py,sha256=2ldQwWI5DjobZZqXWwwsWgwaj4KWRqWjHmPzgGVXWL8,3807
|
297
297
|
streamlit/runtime/uploaded_file_manager.py,sha256=gkCGjX-d1eyrnHPNz4n-CC-fbFM-FGL1f9JK5ODJXME,4784
|
298
298
|
streamlit/runtime/websocket_session_manager.py,sha256=BWxC1ycURgIH9b_f28_UTsBiVWDobMnCG213fW7wMik,6443
|
299
|
-
streamlit/runtime/caching/__init__.py,sha256=
|
299
|
+
streamlit/runtime/caching/__init__.py,sha256=9aiBQcMFOI43R8_sugdnNH-hiis1wOy8LZ33a7BwNHk,4370
|
300
300
|
streamlit/runtime/caching/cache_data_api.py,sha256=gGbAzsV8nZDBOkdoOt1cZDqgaGE12wHD0o8_RHZj0wI,26158
|
301
|
-
streamlit/runtime/caching/cache_errors.py,sha256=
|
301
|
+
streamlit/runtime/caching/cache_errors.py,sha256=HmSvK8FoamP86ALegGjJK8VjsuyAISIga52tf2N5iEQ,4768
|
302
302
|
streamlit/runtime/caching/cache_resource_api.py,sha256=zZF1M-pRj2kAm4__YGkZb-LelbNYbDesL5KvZG16yjI,21322
|
303
303
|
streamlit/runtime/caching/cache_type.py,sha256=P21JWouFWU0qXQyHbM3y3A1pLZud90ALGeO4bQ5Pvew,1131
|
304
304
|
streamlit/runtime/caching/cache_utils.py,sha256=aT7Q3y4pdRB7QfdEdYbpkDfwZ5E7rshVdIfbkmlMAm8,16719
|
305
|
-
streamlit/runtime/caching/cached_message_replay.py,sha256=
|
305
|
+
streamlit/runtime/caching/cached_message_replay.py,sha256=ETf4CLB49LLrQPJVdaiRlyerwNEB9pdgXUgrREB10z0,17358
|
306
306
|
streamlit/runtime/caching/hashing.py,sha256=jBITAKAWfWRJizaHB-7y_SgoF4DJnuqpwL-ETGRdPwY,18986
|
307
307
|
streamlit/runtime/caching/storage/__init__.py,sha256=b3JyzTI6Nyc3htcNZAq_f-XP3jMqnW2UNEbK3bm8bVs,965
|
308
308
|
streamlit/runtime/caching/storage/cache_storage_protocol.py,sha256=pz_cjjCbXc-uQScBTyLK95u-gKcPorHQhCXKnvZmKMw,8922
|
309
309
|
streamlit/runtime/caching/storage/dummy_cache_storage.py,sha256=IVQJs1KH3kkn0dc8YsLs3F7FX9wn2ZzTmyRgCTg7MYo,1945
|
310
310
|
streamlit/runtime/caching/storage/in_memory_cache_storage_wrapper.py,sha256=VT5DysXStpsZiQo2fAkx6TXY_ijoon2ki338HjEIvzI,5389
|
311
311
|
streamlit/runtime/caching/storage/local_disk_cache_storage.py,sha256=twJksa2WB274njsSP2vJM0JgfUC5OGm_4-hvtGVpePE,9311
|
312
|
-
streamlit/runtime/legacy_caching/__init__.py,sha256=
|
313
|
-
streamlit/runtime/legacy_caching/caching.py,sha256=
|
312
|
+
streamlit/runtime/legacy_caching/__init__.py,sha256=5W9_RWP0Yn7n76rJ-mkDhCdvaGce3X6OOOhLFKQAFAc,759
|
313
|
+
streamlit/runtime/legacy_caching/caching.py,sha256=8P69PcEdEPMByEyeT1kjHhhLW5F_YocfV7stMFz-JXE,27873
|
314
314
|
streamlit/runtime/legacy_caching/hashing.py,sha256=zOLEwjAvWizVz-mZFQIDwQgb0mK3EoG7nhEnX9eEXNE,35033
|
315
315
|
streamlit/runtime/scriptrunner/__init__.py,sha256=QpX77DVR8S2lhf7tC_5dcYRyJ2290_NHX4j6WL-N6Bo,1159
|
316
316
|
streamlit/runtime/scriptrunner/magic.py,sha256=R9cip4qAwb-8jvErueWdXrsumavxFf7Y-4dCeHUD29s,9116
|
317
317
|
streamlit/runtime/scriptrunner/magic_funcs.py,sha256=_npS_w-0riPNr1-dPyOSjqrwTXoeSR-gXWFkChQ5Yjc,1056
|
318
318
|
streamlit/runtime/scriptrunner/script_cache.py,sha256=ZpaB4T50_GYfhMc2dajSMXWCmS3kaUJ_tPHNVt_flBg,2856
|
319
319
|
streamlit/runtime/scriptrunner/script_requests.py,sha256=oGSvQ12To4eWX3Rp5edbBkWTFcyxKTIa0HPQnh_m-bw,8027
|
320
|
-
streamlit/runtime/scriptrunner/script_run_context.py,sha256=
|
320
|
+
streamlit/runtime/scriptrunner/script_run_context.py,sha256=41zu9DQ71xed17XMAdEV2mPJLRyUFGEuZw4PqYH1u4w,8818
|
321
321
|
streamlit/runtime/scriptrunner/script_runner.py,sha256=QT9Xs8pUzSLYpUZLQTat9MQvmdD1okeEYOWfmnRSe4Q,29911
|
322
322
|
streamlit/runtime/state/__init__.py,sha256=UpfNfPrWJ6rVdD-qc0IP_bwZ4MrcNUjyU9wEKDK-eWM,1528
|
323
323
|
streamlit/runtime/state/common.py,sha256=RjuB3wNG_XXrkEsqa9eg1f5JLheIqvKiVpxoT3YptUI,7992
|
@@ -327,9 +327,9 @@ streamlit/runtime/state/safe_session_state.py,sha256=StGh9V-tm7MCfohgw5FFfwz8tDw
|
|
327
327
|
streamlit/runtime/state/session_state.py,sha256=jOIrZD94Cn1wrLdPZIcMYPxiGK1gbus1pD4FXSYp4Q4,27500
|
328
328
|
streamlit/runtime/state/session_state_proxy.py,sha256=k2JJ9ZX7rMYjpzeGy0WZaBKYaWnXxrbJC5jqdnRQ3jI,5119
|
329
329
|
streamlit/runtime/state/widgets.py,sha256=zVSL90_lqQWX81qZSbqfxpC2yxjJOtLndOnn7ehPBNk,11223
|
330
|
-
streamlit/static/asset-manifest.json,sha256
|
330
|
+
streamlit/static/asset-manifest.json,sha256=-5oWRkT_yW3q_KXMxL3n-lyxATVniihXvybOqNHspSM,14380
|
331
331
|
streamlit/static/favicon.png,sha256=if5cVgw7azxKOvV5FpGixga7JLn23rfnHcy1CdWI1-E,1019
|
332
|
-
streamlit/static/index.html,sha256=
|
332
|
+
streamlit/static/index.html,sha256=G-HW10HLxkMHxxhr2PIjBCW5fi8pqRTZb-pW2TjyTHs,891
|
333
333
|
streamlit/static/static/css/2411.8b8f33d6.chunk.css,sha256=4m2lbj1eVFXSaGCRBHZNhqyRz-4Ce9KogjJPxIq6On8,33275
|
334
334
|
streamlit/static/static/css/3092.95a45cfe.chunk.css,sha256=QE-zWROIblgpsp6h00VK9cgGrvagmJ8gBzSbnADMOG0,12090
|
335
335
|
streamlit/static/static/css/43.e3b876c5.chunk.css,sha256=XExLUUHInaWJp_m8TtBWhQ88SUuxZl6Jnnw5NA6rwI4,2633
|
@@ -349,7 +349,7 @@ streamlit/static/static/js/2634.1249dc7a.chunk.js,sha256=ooBylJmLOo0jk_qnlG2369-
|
|
349
349
|
streamlit/static/static/js/2736.914069e5.chunk.js,sha256=ZVsDzMpsAe8QsON5x2wT3ZaLMS5FMgGcd5xk0df6vuY,3636801
|
350
350
|
streamlit/static/static/js/2736.914069e5.chunk.js.LICENSE.txt,sha256=3um48k2qRrjJ1ttbm5NwUEbuLCivKvuUsVaOUlfcNYQ,2051
|
351
351
|
streamlit/static/static/js/3053.7e70ec3b.chunk.js,sha256=w__PpwDgSoGYpVF_yvIn0lvww0DjIJeITvXKcYfLwd8,3259
|
352
|
-
streamlit/static/static/js/3092.
|
352
|
+
streamlit/static/static/js/3092.152fd2b7.chunk.js,sha256=CNpdMOnp82NkxeppNqvBQ3yk3TovjzoJqZYRlCwEqaA,43574
|
353
353
|
streamlit/static/static/js/3301.1d1b10bb.chunk.js,sha256=TbgR_nsEaMzQT3WmvPZ6hCClKcUGkwd8rytZwnSH-LY,1931
|
354
354
|
streamlit/static/static/js/3513.e3e7300a.chunk.js,sha256=ybcGq4OZki8ZBq7DcYO1wtXeONq5-OWT-cJzFJnTNIk,929
|
355
355
|
streamlit/static/static/js/3631.be5c35fa.chunk.js,sha256=OzF7d8fqPR2XqRzc2JgG-HilB9pW5XQvav0qNal78lg,5288
|
@@ -361,7 +361,7 @@ streamlit/static/static/js/4177.69f9f18d.chunk.js,sha256=BEIcTqNGD5WEz9IlGOGHKQh
|
|
361
361
|
streamlit/static/static/js/4185.935c68ec.chunk.js,sha256=LbdByu99FRVfmkmAaHgXOVBFlxDaR-zJyJMeTnYI--o,6486
|
362
362
|
streamlit/static/static/js/4253.749d5244.chunk.js,sha256=UP0ycQ9KIgPv05x2hS57QSrhPDFIQtHa8OgI5V-BiZU,395952
|
363
363
|
streamlit/static/static/js/4253.749d5244.chunk.js.LICENSE.txt,sha256=6s4mSSf8NHGJqUCFAj3VgMXZuNYyAzshKRhvxYZTQoU,281
|
364
|
-
streamlit/static/static/js/43.
|
364
|
+
streamlit/static/static/js/43.05a14cc7.chunk.js,sha256=xteopUnIOR-vtvymtMDP7wzWS_KqGhJEQ1bLW5vKM2g,8631
|
365
365
|
streamlit/static/static/js/4319.a6745434.chunk.js,sha256=ZL-_6BnEAWrs2XTSIFrnT9m5L28r7BckmDA32EWbnRk,2412
|
366
366
|
streamlit/static/static/js/4477.e10e4373.chunk.js,sha256=QrFcTqscFOn0zFUDP8AAVhDCXTwB7lL75O2zq_5840k,20661
|
367
367
|
streamlit/static/static/js/4500.b6f348d1.chunk.js,sha256=-lgkjMD-44gw_WlOjkI7v7Ruq1GV0-ZaN6r59gdBJEk,587
|
@@ -399,8 +399,8 @@ streamlit/static/static/js/937.a1248039.chunk.js.LICENSE.txt,sha256=KAhbcQ1jd_N8
|
|
399
399
|
streamlit/static/static/js/9656.8c935274.chunk.js,sha256=3VB6NT0EQErJUX2SYLQpmNAp19sWI45AbNOQLVjcvII,22113
|
400
400
|
streamlit/static/static/js/9758.6e6d8662.chunk.js,sha256=3Gtwgkru2xQTl1mCxFjILQ_Ppb8DMKySHY5YVhm9ihY,2119
|
401
401
|
streamlit/static/static/js/9865.fd93213d.chunk.js,sha256=Ul2N951ZrAXpJOWo4SV4AKlymjMMNPJxpea3uRt8B_Y,4011
|
402
|
-
streamlit/static/static/js/main.
|
403
|
-
streamlit/static/static/js/main.
|
402
|
+
streamlit/static/static/js/main.f215a056.js,sha256=mFq6UDoWfmuHzJDQy0NJfarZvjyMoPZpu3Q5vL7_-dk,4389247
|
403
|
+
streamlit/static/static/js/main.f215a056.js.LICENSE.txt,sha256=YTeqT7R6idssTgnyi3gf0tRiq18-LiPeDOpsWcnbi34,3184
|
404
404
|
streamlit/static/static/media/KaTeX_AMS-Regular.73ea273a72f4aca30ca5.woff2,sha256=DN04fJWQoan5eUVgAi27WWVKfYbxh6oMgUla1C06cwg,28076
|
405
405
|
streamlit/static/static/media/KaTeX_AMS-Regular.853be92419a6c3766b9a.ttf,sha256=aFNIQLz90r_7bw6N60hoTdAefwTqKBMmdXevuQbeHRM,63632
|
406
406
|
streamlit/static/static/media/KaTeX_AMS-Regular.d562e886c52f12660a41.woff,sha256=MNqR6EyJP4deJSaJ-uvcWQsocRReitx_mp1NvYzgslE,33516
|
@@ -518,9 +518,9 @@ streamlit/web/server/server_util.py,sha256=FptUF-CjFh78VjeTQDi3R78m7E64MDe3wcklg
|
|
518
518
|
streamlit/web/server/stats_request_handler.py,sha256=cL__KbJFIhdhf1Zt6skbLehUqT-jo56x1HARxogZDOI,3680
|
519
519
|
streamlit/web/server/upload_file_request_handler.py,sha256=YPDmKWUnaGH9d4QNcMEsY5k1YIz_q-xW1K5fmgHaDzc,4966
|
520
520
|
streamlit/web/server/websocket_headers.py,sha256=07SkWLcOxbyldl7UcBzrMKY9ZojypCQACiKoh5FcH7Y,1870
|
521
|
-
streamlit_nightly-1.33.1.
|
522
|
-
streamlit_nightly-1.33.1.
|
523
|
-
streamlit_nightly-1.33.1.
|
524
|
-
streamlit_nightly-1.33.1.
|
525
|
-
streamlit_nightly-1.33.1.
|
526
|
-
streamlit_nightly-1.33.1.
|
521
|
+
streamlit_nightly-1.33.1.dev20240417.data/scripts/streamlit.cmd,sha256=ZEYM3vBJSp-k7vwSJ3ba5NzEk9-qHdSeLvGYAAe1mMw,676
|
522
|
+
streamlit_nightly-1.33.1.dev20240417.dist-info/METADATA,sha256=XQReKk_mUb2F2KjT_--jz8B2HqNETl7aVbkX68C-NL0,8528
|
523
|
+
streamlit_nightly-1.33.1.dev20240417.dist-info/WHEEL,sha256=DZajD4pwLWue70CAfc7YaxT1wLUciNBvN_TTcvXpltE,110
|
524
|
+
streamlit_nightly-1.33.1.dev20240417.dist-info/entry_points.txt,sha256=uNJ4DwGNXEhOK0USwSNanjkYyR-Bk7eYQbJFDrWyOgY,53
|
525
|
+
streamlit_nightly-1.33.1.dev20240417.dist-info/top_level.txt,sha256=V3FhKbm7G2LnR0s4SytavrjIPNIhvcsAGXfYHAwtQzw,10
|
526
|
+
streamlit_nightly-1.33.1.dev20240417.dist-info/RECORD,,
|
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[3092],{49839:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Nt});var i=n(66845),o=n(67930),a=n(6998),r=n(17330),l=n(57463),s=n(97943),d=n(41342),c=n(17875),u=n(87814),m=n(62622),h=n(16295),p=n(50641),g=n(25621),f=n(34367),b=n(31011),v=n(21e3),y=n(68411),w=n(9003),x=n(81354),C=n(46927),E=n(1515),M=n(92627);const T=(0,E.Z)("div",{target:"e2wxzia1"})((e=>{let{theme:t,locked:n,target:i}=e;return{padding:"0.5rem 0 0.5rem 0.5rem",position:"absolute",top:n?"-2.4rem":"-1rem",right:t.spacing.none,transition:"none",...!n&&{opacity:0,"&:active, &:focus-visible, &:hover":{transition:"opacity 150ms 100ms, top 100ms 100ms",opacity:1,top:"-2.4rem"},...i&&{["".concat(i,":hover &, ").concat(i,":active &, ").concat(i,":focus-visible &")]:{transition:"opacity 150ms 100ms, top 100ms 100ms",opacity:1,top:"-2.4rem"}}}}}),""),k=(0,E.Z)("div",{target:"e2wxzia0"})((e=>{let{theme:t}=e;return{color:(0,M.Iy)(t)?t.colors.fadedText60:t.colors.bodyText,display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-end",boxShadow:"1px 2px 8px rgba(0, 0, 0, 0.08)",borderRadius:t.radii.lg,backgroundColor:t.colors.lightenedBg05,width:"fit-content",zIndex:t.zIndices.sidebar+1}}),"");var R=n(40864);function N(e){let{label:t,show_label:n,icon:i,onClick:o}=e;const a=(0,g.u)(),r=n?t:"";return(0,R.jsx)("div",{"data-testid":"stElementToolbarButton",children:(0,R.jsx)(y.Z,{content:(0,R.jsx)(v.ZP,{source:t,allowHTML:!1,style:{fontSize:a.fontSizes.sm}}),placement:y.u.TOP,onMouseEnterDelay:1e3,inline:!0,children:(0,R.jsxs)(w.ZP,{onClick:e=>{o&&o(),e.stopPropagation()},kind:x.nW.ELEMENT_TOOLBAR,children:[i&&(0,R.jsx)(C.Z,{content:i,size:"md",testid:"stElementToolbarButtonIcon"}),r&&(0,R.jsx)("span",{children:r})]})})})}const S=e=>{let{onExpand:t,onCollapse:n,isFullScreen:i,locked:o,children:a,target:r,disableFullscreenMode:l}=e;return(0,R.jsx)(T,{className:"stElementToolbar","data-testid":"stElementToolbar",locked:o||i,target:r,children:(0,R.jsxs)(k,{children:[a,t&&!l&&!i&&(0,R.jsx)(N,{label:"Fullscreen",icon:f.i,onClick:()=>t()}),n&&!l&&i&&(0,R.jsx)(N,{label:"Close fullscreen",icon:b.m,onClick:()=>n()})]})})};var _=n(38145),I=n.n(_),O=n(96825),D=n.n(O),F=n(29724),A=n.n(F),H=n(52347),z=n(53608),V=n.n(z);n(87717),n(55842);const j=["true","t","yes","y","on","1"],L=["false","f","no","n","off","0"];function W(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e="\u26a0\ufe0f ".concat(e),{kind:o.p6.Text,readonly:!0,allowOverlay:!0,data:e+(t?"\n\n".concat(t,"\n"):""),displayData:e,isError:!0}}function B(e){return e.hasOwnProperty("isError")&&e.isError}function Y(e){return e.hasOwnProperty("isMissingValue")&&e.isMissingValue}function Z(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]?{kind:o.p6.Loading,allowOverlay:!1,isMissingValue:!0}:{kind:o.p6.Loading,allowOverlay:!1}}function P(e,t){const n=t?"faded":"normal";return{kind:o.p6.Text,data:"",displayData:"",allowOverlay:!0,readonly:e,style:n}}function q(e){return{id:e.id,title:e.title,hasMenu:!1,themeOverride:e.themeOverride,icon:e.icon,...e.isStretched&&{grow:e.isIndex?1:3},...e.width&&{width:e.width}}}function J(e,t){return(0,p.le)(e)?t||{}:(0,p.le)(t)?e||{}:D()(e,t)}function U(e){if((0,p.le)(e))return[];if("number"===typeof e||"boolean"===typeof e)return[e];if("string"===typeof e){if(""===e)return[];if(!e.trim().startsWith("[")||!e.trim().endsWith("]"))return e.split(",");try{return JSON.parse(e)}catch(t){return[e]}}try{const t=JSON.parse(JSON.stringify(e,((e,t)=>"bigint"===typeof t?Number(t):t)));return Array.isArray(t)?t.map((e=>["string","number","boolean","null"].includes(typeof e)?e:K(e))):[K(t)]}catch(t){return[K(e)]}}function K(e){try{try{return I()(e)}catch(t){return JSON.stringify(e,((e,t)=>"bigint"===typeof t?Number(t):t))}}catch(t){return"[".concat(typeof e,"]")}}function G(e){if((0,p.le)(e))return null;if("boolean"===typeof e)return e;const t=K(e).toLowerCase().trim();return""===t?null:!!j.includes(t)||!L.includes(t)&&void 0}function X(e){if((0,p.le)(e))return null;if(Array.isArray(e))return NaN;if("string"===typeof e){if(0===e.trim().length)return null;try{const t=A().unformat(e.trim());if((0,p.bb)(t))return t}catch(t){}}else if(e instanceof Int32Array)return Number(e[0]);return Number(e)}function Q(e,t,n){return Number.isNaN(e)||!Number.isFinite(e)?"":(0,p.le)(t)||""===t?(0===n&&(e=Math.round(e)),A()(e).format((0,p.bb)(n)?"0,0.".concat("0".repeat(n)):"0,0.[0000]")):"percent"===t?new Intl.NumberFormat(void 0,{style:"percent",minimumFractionDigits:2,maximumFractionDigits:2}).format(e):["compact","scientific","engineering"].includes(t)?new Intl.NumberFormat(void 0,{notation:t}).format(e):"duration[ns]"===t?V().duration(e/1e6,"milliseconds").humanize():(0,H.sprintf)(t,e)}function $(e,t){return"locale"===t?new Intl.DateTimeFormat(void 0,{dateStyle:"medium",timeStyle:"medium"}).format(e.toDate()):"distance"===t?e.fromNow():"relative"===t?e.calendar():e.format(t)}function ee(e){if((0,p.le)(e))return null;if(e instanceof Date)return isNaN(e.getTime())?void 0:e;if("string"===typeof e&&0===e.trim().length)return null;try{const t=Number(e);if(!isNaN(t)){let e=t;t>=10**18?e=t/1e3**3:t>=10**15?e=t/1e6:t>=10**12&&(e=t/1e3);const n=V().unix(e).utc();if(n.isValid())return n.toDate()}if("string"===typeof e){const t=V().utc(e);if(t.isValid())return t.toDate();const n=V().utc(e,[V().HTML5_FMT.TIME_MS,V().HTML5_FMT.TIME_SECONDS,V().HTML5_FMT.TIME]);if(n.isValid())return n.toDate()}}catch(t){return}}function te(e){if(e%1===0)return 0;let t=e.toString();return-1!==t.indexOf("e")&&(t=e.toLocaleString("fullwide",{useGrouping:!1,maximumFractionDigits:20})),-1===t.indexOf(".")?0:t.split(".")[1].length}const ne=new RegExp(/(\r\n|\n|\r)/gm);function ie(e){return-1!==e.indexOf("\n")?e.replace(ne," "):e}var oe=n(23849),ae=n(28391);function re(e){const t={kind:o.p6.Text,data:"",displayData:"",allowOverlay:!0,contentAlignment:e.contentAlignment,readonly:!0,style:e.isIndex?"faded":"normal"};return{...e,kind:"object",sortMode:"default",isEditable:!1,getCell(e){try{const n=(0,p.bb)(e)?K(e):null,i=(0,p.bb)(n)?ie(n):"";return{...t,data:n,displayData:i,isMissingValue:(0,p.le)(e)}}catch(n){return W(K(e),"The value cannot be interpreted as a string. Error: ".concat(n))}},getCellValue:e=>void 0===e.data?null:e.data}}re.isEditableType=!1;const le=re;function se(e){const t=e.columnTypeOptions||{};let n;if(t.validate)try{n=new RegExp(t.validate,"us")}catch(r){n="Invalid validate regex: ".concat(t.validate,".\nError: ").concat(r)}const i={kind:o.p6.Text,data:"",displayData:"",allowOverlay:!0,contentAlignment:e.contentAlignment,readonly:!e.isEditable,style:e.isIndex?"faded":"normal"},a=i=>{if((0,p.le)(i))return!e.isRequired;let o=K(i),a=!1;return t.max_chars&&o.length>t.max_chars&&(o=o.slice(0,t.max_chars),a=!0),!(n instanceof RegExp&&!1===n.test(o))&&(!a||o)};return{...e,kind:"text",sortMode:"default",validateInput:a,getCell(e,t){if("string"===typeof n)return W(K(e),n);if(t){const t=a(e);if(!1===t)return W(K(e),"Invalid input.");"string"===typeof t&&(e=t)}try{const t=(0,p.bb)(e)?K(e):null,n=(0,p.bb)(t)?ie(t):"";return{...i,isMissingValue:(0,p.le)(t),data:t,displayData:n}}catch(r){return W("Incompatible value","The value cannot be interpreted as string. Error: ".concat(r))}},getCellValue:e=>void 0===e.data?null:e.data}}se.isEditableType=!0;const de=se;function ce(e,t){return e=t.startsWith("+")||t.startsWith("-")?e.utcOffset(t,!1):e.tz(t)}function ue(e,t,n,i,a,r,l){var s;const d=J({format:n,step:i,timezone:l},t.columnTypeOptions);let c,u,m;if((0,p.bb)(d.timezone))try{var h;c=(null===(h=ce(V()(),d.timezone))||void 0===h?void 0:h.utcOffset())||void 0}catch(b){}(0,p.bb)(d.min_value)&&(u=ee(d.min_value)||void 0),(0,p.bb)(d.max_value)&&(m=ee(d.max_value)||void 0);const g={kind:o.p6.Custom,allowOverlay:!0,copyData:"",readonly:!t.isEditable,contentAlign:t.contentAlignment,style:t.isIndex?"faded":"normal",data:{kind:"date-picker-cell",date:void 0,displayDate:"",step:(null===(s=d.step)||void 0===s?void 0:s.toString())||"1",format:a,min:u,max:m}},f=e=>{const n=ee(e);return null===n?!t.isRequired:void 0!==n&&(!((0,p.bb)(u)&&r(n)<r(u))&&!((0,p.bb)(m)&&r(n)>r(m)))};return{...t,kind:e,sortMode:"default",validateInput:f,getCell(e,t){if(!0===t){const t=f(e);if(!1===t)return W(K(e),"Invalid input.");t instanceof Date&&(e=t)}const i=ee(e);let o="",a="",r=c;if(void 0===i)return W(K(e),"The value cannot be interpreted as a datetime object.");if(null!==i){let e=V().utc(i);if(!e.isValid())return W(K(i),"This should never happen. Please report this bug. \nError: ".concat(e.toString()));if(d.timezone){try{e=ce(e,d.timezone)}catch(b){return W(e.toISOString(),"Failed to adjust to the provided timezone: ".concat(d.timezone,". \nError: ").concat(b))}r=e.utcOffset()}try{a=$(e,d.format||n)}catch(b){return W(e.toISOString(),"Failed to format the date for rendering with: ".concat(d.format,". \nError: ").concat(b))}o=$(e,n)}return{...g,copyData:o,isMissingValue:(0,p.le)(i),data:{...g.data,date:i,displayDate:a,timezoneOffset:r}}},getCellValue(e){var t;return(0,p.le)(null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.date)?null:r(e.data.date)}}}function me(e){var t,n,i,o,a;let r="YYYY-MM-DD HH:mm:ss";(null===(t=e.columnTypeOptions)||void 0===t?void 0:t.step)>=60?r="YYYY-MM-DD HH:mm":(null===(n=e.columnTypeOptions)||void 0===n?void 0:n.step)<1&&(r="YYYY-MM-DD HH:mm:ss.SSS");const l=null===(i=e.arrowType)||void 0===i||null===(o=i.meta)||void 0===o?void 0:o.timezone,s=(0,p.bb)(l)||(0,p.bb)(null===e||void 0===e||null===(a=e.columnTypeOptions)||void 0===a?void 0:a.timezone);return ue("datetime",e,s?r+"Z":r,1,"datetime-local",(e=>s?e.toISOString():e.toISOString().replace("Z","")),l)}function he(e){var t,n;let i="HH:mm:ss";return(null===(t=e.columnTypeOptions)||void 0===t?void 0:t.step)>=60?i="HH:mm":(null===(n=e.columnTypeOptions)||void 0===n?void 0:n.step)<1&&(i="HH:mm:ss.SSS"),ue("time",e,i,1,"time",(e=>e.toISOString().split("T")[1].replace("Z","")))}function pe(e){return ue("date",e,"YYYY-MM-DD",1,"date",(e=>e.toISOString().split("T")[0]))}function ge(e){const t={kind:o.p6.Boolean,data:!1,allowOverlay:!1,contentAlign:e.contentAlignment,readonly:!e.isEditable,style:e.isIndex?"faded":"normal"};return{...e,kind:"checkbox",sortMode:"default",getCell(e){let n=null;return n=G(e),void 0===n?W(K(e),"The value cannot be interpreted as boolean."):{...t,data:n,isMissingValue:(0,p.le)(n)}},getCellValue:e=>void 0===e.data?null:e.data}}me.isEditableType=!0,he.isEditableType=!0,pe.isEditableType=!0,ge.isEditableType=!0;const fe=ge;function be(e){return e.startsWith("int")&&!e.startsWith("interval")||"range"===e||e.startsWith("uint")}function ve(e){const t=ae.fu.getTypeName(e.arrowType),n=J({step:be(t)?1:void 0,min_value:t.startsWith("uint")?0:void 0,format:"timedelta64[ns]"===t?"duration[ns]":void 0},e.columnTypeOptions),i=(0,p.le)(n.min_value)||n.min_value<0,a=(0,p.bb)(n.step)&&!Number.isNaN(n.step)?te(n.step):void 0,r={kind:o.p6.Number,data:void 0,displayData:"",readonly:!e.isEditable,allowOverlay:!0,contentAlign:e.contentAlignment||"right",style:e.isIndex?"faded":"normal",allowNegative:i,fixedDecimals:a},l=t=>{let i=X(t);if((0,p.le)(i))return!e.isRequired;if(Number.isNaN(i))return!1;let o=!1;return(0,p.bb)(n.max_value)&&i>n.max_value&&(i=n.max_value,o=!0),!((0,p.bb)(n.min_value)&&i<n.min_value)&&(!o||i)};return{...e,kind:"number",sortMode:"smart",validateInput:l,getCell(e,t){if(!0===t){const t=l(e);if(!1===t)return W(K(e),"Invalid input.");"number"===typeof t&&(e=t)}let i=X(e),o="";if((0,p.bb)(i)){if(Number.isNaN(i))return W(K(e),"The value cannot be interpreted as a number.");if((0,p.bb)(a)&&(s=i,i=0===(d=a)?Math.trunc(s):Math.trunc(s*10**d)/10**d),Number.isInteger(i)&&!Number.isSafeInteger(i))return W(K(e),"The value is larger than the maximum supported integer values in number columns (2^53).");try{o=Q(i,n.format,a)}catch(c){return W(K(i),(0,p.bb)(n.format)?"Failed to format the number based on the provided format configuration: (".concat(n.format,"). Error: ").concat(c):"Failed to format the number. Error: ".concat(c))}}var s,d;return{...r,data:i,displayData:o,isMissingValue:(0,p.le)(i)}},getCellValue:e=>void 0===e.data?null:e.data}}ve.isEditableType=!0;const ye=ve;function we(e){let t="string";const n=J({options:"bool"===ae.fu.getTypeName(e.arrowType)?[!0,!1]:[]},e.columnTypeOptions),i=new Set(n.options.map((e=>typeof e)));1===i.size&&(i.has("number")||i.has("bigint")?t="number":i.has("boolean")&&(t="boolean"));const a={kind:o.p6.Custom,allowOverlay:!0,copyData:"",contentAlign:e.contentAlignment,readonly:!e.isEditable,data:{kind:"dropdown-cell",allowedValues:[...!0!==e.isRequired?[null]:[],...n.options.filter((e=>null!==e&&""!==e)).map((e=>K(e)))],value:"",readonly:!e.isEditable}};return{...e,kind:"selectbox",sortMode:"default",getCell(e,t){let n=null;return(0,p.bb)(e)&&""!==e&&(n=K(e)),t&&!a.data.allowedValues.includes(n)?W(K(n),"The value is not part of the allowed options."):{...a,isMissingValue:null===n,copyData:n||"",data:{...a.data,value:n}}},getCellValue(e){var n,i,o,a,r,l,s;return(0,p.le)(null===(n=e.data)||void 0===n?void 0:n.value)||""===(null===(i=e.data)||void 0===i?void 0:i.value)?null:"number"===t?null!==(a=X(null===(r=e.data)||void 0===r?void 0:r.value))&&void 0!==a?a:null:"boolean"===t?null!==(l=G(null===(s=e.data)||void 0===s?void 0:s.value))&&void 0!==l?l:null:null===(o=e.data)||void 0===o?void 0:o.value}}}we.isEditableType=!0;const xe=we;function Ce(e){const t={kind:o.p6.Bubble,data:[],allowOverlay:!0,contentAlign:e.contentAlignment,style:e.isIndex?"faded":"normal"};return{...e,kind:"list",sortMode:"default",isEditable:!1,getCell(e){const n=(0,p.le)(e)?[]:U(e);return{...t,data:n,isMissingValue:(0,p.le)(e),copyData:(0,p.le)(e)?"":K(n.map((e=>"string"===typeof e&&e.includes(",")?e.replace(/,/g," "):e)))}},getCellValue:e=>(0,p.le)(e.data)||Y(e)?null:e.data}}Ce.isEditableType=!1;const Ee=Ce;function Me(e,t,n){const i=new RegExp("".concat(e,"[,\\s].*{(?:[^}]*[\\s;]{1})?").concat(t,":\\s*([^;}]+)[;]?.*}"),"gm");n=n.replace(/{/g," {");const o=i.exec(n);if(o)return o[1].trim()}function Te(e,t){const n=e.types.index[t],i=e.indexNames[t];let o=!0;return"range"===ae.fu.getTypeName(n)&&(o=!1),{id:"index-".concat(t),name:i,title:i,isEditable:o,arrowType:n,isIndex:!0,isHidden:!1}}function ke(e,t){const n=e.columns[0][t];let i,o=e.types.data[t];if((0,p.le)(o)&&(o={meta:null,numpy_type:"object",pandas_type:"object"}),"categorical"===ae.fu.getTypeName(o)){const n=e.getCategoricalOptions(t);(0,p.bb)(n)&&(i={options:n})}return{id:"column-".concat(n,"-").concat(t),name:n,title:n,isEditable:!0,arrowType:o,columnTypeOptions:i,isIndex:!1,isHidden:!1}}function Re(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;const i=e.arrowType?ae.fu.getTypeName(e.arrowType):null;let a;if("object"===e.kind)a=e.getCell((0,p.bb)(t.content)?ie(ae.fu.format(t.content,t.contentType,t.field)):null);else if(["time","date","datetime"].includes(e.kind)&&(0,p.bb)(t.content)&&("number"===typeof t.content||"bigint"===typeof t.content)){var r,l;let n;var s,d,c;if("time"===i&&(0,p.bb)(null===(r=t.field)||void 0===r||null===(l=r.type)||void 0===l?void 0:l.unit))n=V().unix(ae.fu.convertToSeconds(t.content,null!==(s=null===(d=t.field)||void 0===d||null===(c=d.type)||void 0===c?void 0:c.unit)&&void 0!==s?s:0)).utc().toDate();else n=V().utc(Number(t.content)).toDate();a=e.getCell(n)}else if("decimal"===i){const n=(0,p.le)(t.content)?null:ae.fu.format(t.content,t.contentType,t.field);a=e.getCell(n)}else a=e.getCell(t.content);if(B(a))return a;if(!e.isEditable){if((0,p.bb)(t.displayContent)){var u;const e=ie(t.displayContent);a.kind===o.p6.Text||a.kind===o.p6.Number||a.kind===o.p6.Uri?a={...a,displayData:e}:a.kind===o.p6.Custom&&"date-picker-cell"===(null===(u=a.data)||void 0===u?void 0:u.kind)&&(a={...a,data:{...a.data,displayDate:e}})}n&&t.cssId&&(a=function(e,t,n){const i={},o=Me(t,"color",n);o&&(i.textDark=o);const a=Me(t,"background-color",n);return a&&(i.bgCell=a),"yellow"===a&&void 0===o&&(i.textDark="#31333F"),i?{...e,themeOverride:i}:e}(a,t.cssId,n))}return a}function Ne(e){const t=e.columnTypeOptions||{};let n,i;if(t.validate)try{n=new RegExp(t.validate,"us")}catch(l){n="Invalid validate regex: ".concat(t.validate,".\nError: ").concat(l)}if(!(0,p.le)(t.display_text)&&t.display_text.includes("(")&&t.display_text.includes(")"))try{i=new RegExp(t.display_text,"us")}catch(l){i=void 0}const a={kind:o.p6.Uri,readonly:!e.isEditable,allowOverlay:!0,contentAlign:e.contentAlignment,style:e.isIndex?"faded":"normal",hoverEffect:!0,data:"",displayData:"",copyData:""},r=i=>{if((0,p.le)(i))return!e.isRequired;const o=K(i);return!(t.max_chars&&o.length>t.max_chars)&&!(n instanceof RegExp&&!1===n.test(o))};return{...e,kind:"link",sortMode:"default",validateInput:r,getCell(e,o){if((0,p.le)(e))return{...a,data:null,isMissingValue:!0,onClickUri:()=>{}};const s=e;if("string"===typeof n)return W(K(s),n);if(o){if(!1===r(s))return W(K(s),"Invalid input.")}let d="";return s&&(d=void 0!==i?function(e,t){if((0,p.le)(t))return"";try{const n=t.match(e);return n&&void 0!==n[1]?decodeURI(n[1]):t}catch(l){return t}}(i,s):t.display_text||s),{...a,data:s,displayData:d,isMissingValue:(0,p.le)(s),onClickUri:e=>{window.open(s.startsWith("www.")?"https://".concat(s):s,"_blank","noopener,noreferrer"),e.preventDefault()},copyData:s}},getCellValue:e=>(0,p.le)(e.data)?null:e.data}}Ne.isEditableType=!0;const Se=Ne;function _e(e){const t={kind:o.p6.Image,data:[],displayData:[],readonly:!0,allowOverlay:!0,contentAlign:e.contentAlignment||"center",style:e.isIndex?"faded":"normal"};return{...e,kind:"image",sortMode:"default",isEditable:!1,getCell(e){const n=(0,p.bb)(e)?[K(e)]:[];return{...t,data:n,isMissingValue:!(0,p.bb)(e),displayData:n}},getCellValue:e=>void 0===e.data||0===e.data.length?null:e.data[0]}}_e.isEditableType=!1;const Ie=_e;function Oe(e){const t=be(ae.fu.getTypeName(e.arrowType)),n=J({min_value:0,max_value:t?100:1,step:t?1:.01,format:t?"%3d%%":"percent"},e.columnTypeOptions);let i;try{i=Q(n.max_value,n.format)}catch(l){i=K(n.max_value)}const a=(0,p.le)(n.step)||Number.isNaN(n.step)?void 0:te(n.step),r={kind:o.p6.Custom,allowOverlay:!1,copyData:"",contentAlign:e.contentAlignment,data:{kind:"range-cell",min:n.min_value,max:n.max_value,step:n.step,value:n.min_value,label:String(n.min_value),measureLabel:i,readonly:!0}};return{...e,kind:"progress",sortMode:"smart",isEditable:!1,getCell(e){if((0,p.le)(e))return Z();if((0,p.le)(n.min_value)||(0,p.le)(n.max_value)||Number.isNaN(n.min_value)||Number.isNaN(n.max_value)||n.min_value>=n.max_value)return W("Invalid min/max parameters","The min_value (".concat(n.min_value,") and max_value (").concat(n.max_value,") parameters must be valid numbers."));if((0,p.le)(n.step)||Number.isNaN(n.step))return W("Invalid step parameter","The step parameter (".concat(n.step,") must be a valid number."));const t=X(e);if(Number.isNaN(t)||(0,p.le)(t))return W(K(e),"The value cannot be interpreted as a number.");if(Number.isInteger(t)&&!Number.isSafeInteger(t))return W(K(e),"The value is larger than the maximum supported integer values in number columns (2^53).");let i="";try{i=Q(t,n.format,a)}catch(l){return W(K(t),(0,p.bb)(n.format)?"Failed to format the number based on the provided format configuration: (".concat(n.format,"). Error: ").concat(l):"Failed to format the number. Error: ".concat(l))}const o=Math.min(n.max_value,Math.max(n.min_value,t));return{...r,isMissingValue:(0,p.le)(e),copyData:String(t),data:{...r.data,value:o,label:i}}},getCellValue(e){var t,n;return e.kind===o.p6.Loading||void 0===(null===(t=e.data)||void 0===t?void 0:t.value)?null:null===(n=e.data)||void 0===n?void 0:n.value}}}Oe.isEditableType=!1;const De=Oe;function Fe(e,t,n){const i=J({y_min:0,y_max:1},t.columnTypeOptions),a={kind:o.p6.Custom,allowOverlay:!1,copyData:"",contentAlign:t.contentAlignment,data:{kind:"sparkline-cell",values:[],displayValues:[],graphKind:n,yAxis:[i.y_min,i.y_max]}};return{...t,kind:e,sortMode:"default",isEditable:!1,getCell(e){if((0,p.le)(i.y_min)||(0,p.le)(i.y_max)||Number.isNaN(i.y_min)||Number.isNaN(i.y_max)||i.y_min>=i.y_max)return W("Invalid min/max y-axis configuration","The y_min (".concat(i.y_min,") and y_max (").concat(i.y_max,") configuration options must be valid numbers."));if((0,p.le)(e))return Z();const t=U(e),n=[];let o=[];if(0===t.length)return Z();let r=Number.MIN_SAFE_INTEGER,l=Number.MAX_SAFE_INTEGER;for(let i=0;i<t.length;i++){const e=X(t[i]);if(Number.isNaN(e)||(0,p.le)(e))return W(K(t),"The value cannot be interpreted as a numeric array. ".concat(K(e)," is not a number."));e>r&&(r=e),e<l&&(l=e),n.push(e)}return o=n.length>0&&(r>i.y_max||l<i.y_min)?n.map((e=>r-l===0?r>(i.y_max||1)?i.y_max||1:i.y_min||0:((i.y_max||1)-(i.y_min||0))*((e-l)/(r-l))+(i.y_min||0))):n,{...a,copyData:n.join(","),data:{...a.data,values:o,displayValues:n.map((e=>Q(e)))},isMissingValue:(0,p.le)(e)}},getCellValue(e){var t,n;return e.kind===o.p6.Loading||void 0===(null===(t=e.data)||void 0===t?void 0:t.values)?null:null===(n=e.data)||void 0===n?void 0:n.values}}}function Ae(e){return Fe("line_chart",e,"line")}function He(e){return Fe("bar_chart",e,"bar")}function ze(e){return Fe("area_chart",e,"area")}Ae.isEditableType=!1,He.isEditableType=!1,ze.isEditableType=!1;const Ve=new Map(Object.entries({object:le,text:de,checkbox:fe,selectbox:xe,list:Ee,number:ye,link:Se,datetime:me,date:pe,time:he,line_chart:Ae,bar_chart:He,area_chart:ze,image:Ie,progress:De})),je=[],Le="_index",We="_pos:",Be={small:75,medium:200,large:400};function Ye(e){if(!(0,p.le)(e))return"number"===typeof e?e:e in Be?Be[e]:void 0}function Ze(e,t){if(!t)return e;let n;return t.has(e.name)&&e.name!==Le?n=t.get(e.name):t.has("".concat(We).concat(e.indexNumber))?n=t.get("".concat(We).concat(e.indexNumber)):e.isIndex&&t.has(Le)&&(n=t.get(Le)),n?D()({...e},{title:n.label,width:Ye(n.width),isEditable:(0,p.bb)(n.disabled)?!n.disabled:void 0,isHidden:n.hidden,isRequired:n.required,columnTypeOptions:n.type_config,contentAlignment:n.alignment,defaultValue:n.default,help:n.help}):e}function Pe(e){var t;const n=null===(t=e.columnTypeOptions)||void 0===t?void 0:t.type;let i;return(0,p.bb)(n)&&(Ve.has(n)?i=Ve.get(n):(0,oe.KE)("Unknown column type configured in column configuration: ".concat(n))),(0,p.le)(i)&&(i=function(e){let t=e?ae.fu.getTypeName(e):null;return t?(t=t.toLowerCase().trim(),["unicode","empty"].includes(t)?de:["datetime","datetimetz"].includes(t)?me:"time"===t?he:"date"===t?pe:["object","bytes"].includes(t)?le:["bool"].includes(t)?fe:["int8","int16","int32","int64","uint8","uint16","uint32","uint64","float16","float32","float64","float96","float128","range","decimal"].includes(t)?ye:"categorical"===t?xe:t.startsWith("list")?Ee:le):le}(e.arrowType)),i}const qe=function(e,t,n){const o=(0,g.u)(),a=i.useMemo((()=>function(e){if(!e)return new Map;try{return new Map(Object.entries(JSON.parse(e)))}catch(t){return(0,oe.H)(t),new Map}}(e.columns)),[e.columns]),r=e.useContainerWidth||(0,p.bb)(e.width)&&e.width>0;return{columns:i.useMemo((()=>{let i=function(e){const t=[],{dimensions:n}=e,i=n.headerColumns,o=n.dataColumns;if(0===i&&0===o)return t.push({id:"empty-index",title:"",indexNumber:0,isEditable:!1,isIndex:!0}),t;for(let a=0;a<i;a++){const n={...Te(e,a),indexNumber:a};t.push(n)}for(let a=0;a<o;a++){const n={...ke(e,a),indexNumber:a+i};t.push(n)}return t}(t).map((t=>{let i={...t,...Ze(t,a),isStretched:r};const l=Pe(i);return(e.editingMode===h.Eh.EditingMode.READ_ONLY||n||!1===l.isEditableType)&&(i={...i,isEditable:!1}),e.editingMode!==h.Eh.EditingMode.READ_ONLY&&1==i.isEditable&&(i={...i,icon:"editable"},i.isRequired&&e.editingMode===h.Eh.EditingMode.DYNAMIC&&(i={...i,isHidden:!1})),l(i,o)})).filter((e=>!e.isHidden));if(e.columnOrder&&e.columnOrder.length>0){const t=[];i.forEach((e=>{e.isIndex&&t.push(e)})),e.columnOrder.forEach((e=>{const n=i.find((t=>t.name===e));n&&!n.isIndex&&t.push(n)})),i=t}return i.length>0?i:[le({id:"empty-index",title:"",indexNumber:0,isEditable:!1,isIndex:!0})]}),[t,a,r,n,e.editingMode,e.columnOrder,o])}};function Je(e){return e.isIndex?Le:(0,p.le)(e.name)?"":e.name}const Ue=class{constructor(e){this.editedCells=new Map,this.addedRows=[],this.deletedRows=[],this.numRows=0,this.numRows=e}toJson(e){const t=new Map;e.forEach((e=>{t.set(e.indexNumber,e)}));const n={edited_rows:{},added_rows:[],deleted_rows:[]};this.editedCells.forEach(((e,i,o)=>{const a={};e.forEach(((e,n,i)=>{const o=t.get(n);o&&(a[Je(o)]=o.getCellValue(e))})),n.edited_rows[i]=a})),this.addedRows.forEach((e=>{const i={};let o=!1;e.forEach(((e,n,a)=>{const r=t.get(n);if(r){const t=r.getCellValue(e);r.isRequired&&r.isEditable&&Y(e)&&(o=!0),(0,p.bb)(t)&&(i[Je(r)]=t)}})),o||n.added_rows.push(i)})),n.deleted_rows=this.deletedRows;return JSON.stringify(n,((e,t)=>void 0===t?null:t))}fromJson(e,t){this.editedCells=new Map,this.addedRows=[],this.deletedRows=[];const n=JSON.parse(e),i=new Map;t.forEach((e=>{i.set(e.indexNumber,e)}));const o=new Map;t.forEach((e=>{o.set(Je(e),e)})),Object.keys(n.edited_rows).forEach((e=>{const t=Number(e),i=n.edited_rows[e];Object.keys(i).forEach((e=>{const n=i[e],a=o.get(e);if(a){const e=a.getCell(n);var r;if(e)this.editedCells.has(t)||this.editedCells.set(t,new Map),null===(r=this.editedCells.get(t))||void 0===r||r.set(a.indexNumber,e)}}))})),n.added_rows.forEach((e=>{const t=new Map;Object.keys(e).forEach((n=>{const i=e[n],a=o.get(n);if(a){const e=a.getCell(i);e&&t.set(a.indexNumber,e)}})),this.addedRows.push(t)})),this.deletedRows=n.deleted_rows}isAddedRow(e){return e>=this.numRows}getCell(e,t){if(this.isAddedRow(t))return this.addedRows[t-this.numRows].get(e);const n=this.editedCells.get(t);return void 0!==n?n.get(e):void 0}setCell(e,t,n){if(this.isAddedRow(t)){if(t-this.numRows>=this.addedRows.length)return;this.addedRows[t-this.numRows].set(e,n)}else{void 0===this.editedCells.get(t)&&this.editedCells.set(t,new Map);this.editedCells.get(t).set(e,n)}}addRow(e){this.addedRows.push(e)}deleteRows(e){e.sort(((e,t)=>t-e)).forEach((e=>{this.deleteRow(e)}))}deleteRow(e){(0,p.le)(e)||e<0||(this.isAddedRow(e)?this.addedRows.splice(e-this.numRows,1):(this.deletedRows.includes(e)||(this.deletedRows.push(e),this.deletedRows=this.deletedRows.sort(((e,t)=>e-t))),this.editedCells.delete(e)))}getOriginalRowIndex(e){let t=e;for(let n=0;n<this.deletedRows.length&&!(this.deletedRows[n]>t);n++)t+=1;return t}getNumRows(){return this.numRows+this.addedRows.length-this.deletedRows.length}};var Ke=n(35704);const Ge=function(){const e=(0,g.u)(),t=i.useMemo((()=>({editable:e=>'<svg xmlns="http://www.w3.org/2000/svg" height="40" viewBox="0 96 960 960" width="40" fill="'.concat(e.bgColor,'"><path d="m800.641 679.743-64.384-64.384 29-29q7.156-6.948 17.642-6.948 10.485 0 17.742 6.948l29 29q6.948 7.464 6.948 17.95 0 10.486-6.948 17.434l-29 29Zm-310.64 246.256v-64.383l210.82-210.821 64.384 64.384-210.821 210.82h-64.383Zm-360-204.872v-50.254h289.743v50.254H130.001Zm0-162.564v-50.255h454.615v50.255H130.001Zm0-162.307v-50.255h454.615v50.255H130.001Z"/></svg>')})),[]);return{theme:i.useMemo((()=>({accentColor:e.colors.primary,accentFg:e.colors.white,accentLight:(0,Ke.DZ)(e.colors.primary,.9),borderColor:e.colors.fadedText05,horizontalBorderColor:e.colors.fadedText05,fontFamily:e.genericFonts.bodyFont,bgSearchResult:(0,Ke.DZ)(e.colors.primary,.9),resizeIndicatorColor:e.colors.primary,bgIconHeader:e.colors.fadedText60,fgIconHeader:e.colors.white,bgHeader:e.colors.bgMix,bgHeaderHasFocus:e.colors.secondaryBg,bgHeaderHovered:e.colors.secondaryBg,textHeader:e.colors.fadedText60,textHeaderSelected:e.colors.white,textGroupHeader:e.colors.fadedText60,headerFontStyle:"".concat(e.fontSizes.sm),baseFontStyle:e.fontSizes.sm,editorFontSize:e.fontSizes.sm,textDark:e.colors.bodyText,textMedium:(0,Ke.DZ)(e.colors.bodyText,.2),textLight:e.colors.fadedText40,textBubble:e.colors.fadedText60,bgCell:e.colors.bgColor,bgCellMedium:e.colors.bgColor,cellHorizontalPadding:8,cellVerticalPadding:3,bgBubble:e.colors.secondaryBg,bgBubbleSelected:e.colors.secondaryBg,linkColor:e.colors.linkText,drilldownBorder:e.colors.darkenedBgMix25})),[e]),tableBorderRadius:e.radii.lg,headerIcons:t}};const Xe=function(e,t,n,o){return{getCellContent:i.useCallback((i=>{let[a,r]=i;if(a>t.length-1)return W("Column index out of bounds.","This should never happen. Please report this bug.");if(r>n-1)return W("Row index out of bounds.","This should never happen. Please report this bug.");const l=t[a],s=l.indexNumber,d=o.current.getOriginalRowIndex(r);if(l.isEditable||o.current.isAddedRow(d)){const e=o.current.getCell(s,d);if(void 0!==e)return e}try{return Re(l,e.getCell(d+1,s),e.cssStyles)}catch(c){return(0,oe.H)(c),W("Error during cell creation.","This should never happen. Please report this bug. \nError: ".concat(c))}}),[t,n,e,o])}};var Qe=n(32700);const $e=function(e,t,n){const[o,a]=i.useState(),{getCellContent:r,getOriginalIndex:l}=(0,Qe.fF)({columns:t.map((e=>q(e))),getCellContent:n,rows:e,sort:o}),s=i.useMemo((()=>function(e,t){return void 0===t?e:e.map((e=>e.id===t.column.id?{...e,title:"asc"===t.direction?"\u2191 ".concat(e.title):"\u2193 ".concat(e.title)}:e))}(t,o)),[t,o]),d=i.useCallback((e=>{let t="asc";const n=s[e];if(o&&o.column.id===n.id){if("asc"!==o.direction)return void a(void 0);t="desc"}a({column:q(n),direction:t,mode:n.sortMode})}),[o,s]);return{columns:s,sortColumn:d,getOriginalIndex:l,getCellContent:r}},et=",",tt='"',nt='"',it="\n",ot=new RegExp("[".concat([et,tt,it].join(""),"]"));function at(e){return e.map((e=>function(e){if((0,p.le)(e))return"";const t=K(e);if(ot.test(t))return"".concat(tt).concat(t.replace(new RegExp(tt,"g"),nt+tt)).concat(tt);return t}(e))).join(et)+it}const rt=function(e,t,o){return{exportToCsv:i.useCallback((async()=>{try{const i=await n.e(5345).then(n.bind(n,95345)),a=(new Date).toISOString().slice(0,16).replace(":","-"),r="".concat(a,"_export.csv"),l=await i.showSaveFilePicker({suggestedName:r,types:[{accept:{"text/csv":[".csv"]}}],excludeAcceptAllOption:!1}),s=new TextEncoder,d=await l.createWritable();await d.write(s.encode("\ufeff"));const c=t.map((e=>e.name));await d.write(s.encode(at(c)));for(let n=0;n<o;n++){const i=[];t.forEach(((t,o,a)=>{i.push(t.getCellValue(e([o,n])))})),await d.write(s.encode(at(i)))}await d.close()}catch(i){(0,oe.KE)("Failed to export data as CSV",i)}}),[t,o,e])}};const lt=function(e,t,n,o,a,r,l){const s=i.useCallback(((t,i)=>{let[r,s]=t;const d=e[r];if(!d.isEditable)return;const c=d.indexNumber,u=n.current.getOriginalRowIndex(a(s)),m=o([r,s]),h=d.getCellValue(m),p=d.getCellValue(i);if(!B(m)&&p===h)return;const g=d.getCell(p,!0);B(g)?(0,oe.KE)("Not applying the cell edit since it causes this error:\n ".concat(g.data)):(n.current.setCell(c,u,{...g,lastUpdated:performance.now()}),l())}),[e,n,a,o,l]),d=i.useCallback((()=>{if(t)return;const i=new Map;e.forEach((e=>{i.set(e.indexNumber,e.getCell(e.defaultValue))})),n.current.addRow(i)}),[e,n,t]),c=i.useCallback((()=>{t||(d(),l())}),[d,l,t]),u=i.useCallback((i=>{var o;if(i.rows.length>0){if(t)return!0;const e=i.rows.toArray().map((e=>n.current.getOriginalRowIndex(a(e))));return n.current.deleteRows(e),l(!0),!1}if(null!==(o=i.current)&&void 0!==o&&o.range){const t=[],n=i.current.range;for(let i=n.y;i<n.y+n.height;i++)for(let o=n.x;o<n.x+n.width;o++){const n=e[o];n.isEditable&&!n.isRequired&&(t.push({cell:[o,i]}),s([o,i],n.getCell(null)))}return t.length>0&&(l(),r(t)),!1}return!0}),[e,n,t,r,a,l,s]),m=i.useCallback(((i,s)=>{const[c,u]=i,m=[];for(let h=0;h<s.length;h++){const i=s[h];if(h+u>=n.current.getNumRows()){if(t)break;d()}for(let t=0;t<i.length;t++){const r=i[t],l=h+u,s=t+c;if(s>=e.length)break;const d=e[s];if(d.isEditable){const e=d.getCell(r,!0);if((0,p.bb)(e)&&!B(e)){const t=d.indexNumber,i=n.current.getOriginalRowIndex(a(l)),r=d.getCellValue(o([s,l]));d.getCellValue(e)!==r&&(n.current.setCell(t,i,{...e,lastUpdated:performance.now()}),m.push({cell:[s,l]}))}}}m.length>0&&(l(),r(m))}return!1}),[e,n,t,a,o,d,l,r]),h=i.useCallback(((t,n)=>{const i=t[0];if(i>=e.length)return!0;const o=e[i];if(o.validateInput){const e=o.validateInput(o.getCellValue(n));return!0===e||!1===e?e:o.getCell(e)}return!0}),[e]);return{onCellEdited:s,onPaste:m,onRowAppended:c,onDelete:u,validateCell:h}};const st=function(e,t){const[n,o]=i.useState(),a=i.useRef(null),r=i.useCallback((n=>{if(clearTimeout(a.current),a.current=0,o(void 0),("header"===n.kind||"cell"===n.kind)&&n.location){const i=n.location[0],r=n.location[1];let l;if(i<0||i>=e.length)return;const s=e[i];if("header"===n.kind&&(0,p.bb)(s))l=s.help;else if("cell"===n.kind){const e=t([i,r]);s.isRequired&&s.isEditable&&Y(e)?l="\u26a0\ufe0f Please fill out this cell.":function(e){return e.hasOwnProperty("tooltip")&&""!==e.tooltip}(e)&&(l=e.tooltip)}l&&(a.current=setTimeout((()=>{l&&o({content:l,left:n.bounds.x+n.bounds.width/2,top:n.bounds.y})}),600))}}),[e,t,o,a]);return{tooltip:n,clearTooltip:i.useCallback((()=>{o(void 0)}),[o]),onItemHovered:r}};var dt=n(39806),ct=n(97613),ut=n(5527),mt=n(85e3),ht=n(37538);const pt=function(e){return{drawCell:i.useCallback(((t,n)=>{const{cell:i,theme:o,ctx:a,rect:r}=t,l=t.col;if(Y(i)&&l<e.length){const i=e[l];return["checkbox","line_chart","bar_chart","progress"].includes(i.kind)?n():(e=>{const{cell:t,theme:n,ctx:i}=e;(0,dt.L6)({...e,theme:{...n,textDark:n.textLight,headerFontFull:"".concat(n.headerFontStyle," ").concat(n.fontFamily),baseFontFull:"".concat(n.baseFontStyle," ").concat(n.fontFamily),markerFontFull:"".concat(n.markerFontStyle," ").concat(n.fontFamily)},spriteManager:{},hyperWrapping:!1},"None",t.contentAlign),i.fillStyle=n.textDark})(t),void(i.isRequired&&i.isEditable&&function(e,t,n){e.save(),e.beginPath(),e.moveTo(t.x+t.width-8,t.y+1),e.lineTo(t.x+t.width,t.y+1),e.lineTo(t.x+t.width,t.y+1+8),e.fillStyle=n.accentColor,e.fill(),e.restore()}(a,r,o))}n()}),[e]),customRenderers:i.useMemo((()=>[ct.Z,ut.Z,mt.Z,ht.ZP,...je]),[])}};const gt=function(e){const[t,n]=(0,i.useState)((()=>new Map)),o=i.useCallback(((e,i,o,a)=>{e.id&&n(new Map(t).set(e.id,a))}),[t]);return{columns:i.useMemo((()=>e.map((e=>e.id&&t.has(e.id)&&void 0!==t.get(e.id)?{...e,width:t.get(e.id),grow:0}:e))),[e,t]),onColumnResize:o}},ft=2,bt=35,vt=50+ft,yt=2*bt+ft;const wt=function(e,t,n,o,a){let r,l=function(e){return Math.max(e*bt+ft,yt)}(t+1+(e.editingMode===h.Eh.EditingMode.DYNAMIC?1:0)),s=Math.min(l,400);e.height&&(s=Math.max(e.height,yt),l=Math.max(e.height,l)),o&&(s=Math.min(s,o),l=Math.min(l,o),e.height||(s=l));let d=n;e.useContainerWidth?r=n:e.width&&(r=Math.min(Math.max(e.width,vt),n),d=Math.min(Math.max(e.width,d),n));const[c,u]=i.useState({width:r||"100%",height:s});return i.useLayoutEffect((()=>{e.useContainerWidth&&"100%"===c.width&&u({width:n,height:c.height})}),[n]),i.useLayoutEffect((()=>{u({width:c.width,height:s})}),[t]),i.useLayoutEffect((()=>{u({width:r||"100%",height:c.height})}),[r]),i.useLayoutEffect((()=>{u({width:c.width,height:s})}),[s]),i.useLayoutEffect((()=>{if(a){const t=e.useContainerWidth||(0,p.bb)(e.width)&&e.width>0;u({width:t?d:"100%",height:l})}else u({width:r||"100%",height:s})}),[a]),{minHeight:yt,maxHeight:l,minWidth:vt,maxWidth:d,resizableSize:c,setResizableSize:u}},xt=(0,E.Z)("img",{target:"e24uaba0"})((()=>({maxWidth:"100%",maxHeight:"600px",objectFit:"scale-down"})),""),Ct=e=>{let{urls:t}=e;const n=t&&t.length>0?t[0]:"";return n.startsWith("http")?(0,R.jsx)("a",{href:n,target:"_blank",rel:"noreferrer noopener",children:(0,R.jsx)(xt,{src:n})}):(0,R.jsx)(xt,{src:n})};var Et=n(31572),Mt=n(13553),Tt=n(80152);const kt=function(e){let{top:t,left:n,content:o,clearTooltip:a}=e;const[r,l]=i.useState(!0),s=(0,g.u)(),{colors:d,fontSizes:c,radii:u}=s,m=i.useCallback((()=>{l(!1),a()}),[a,l]);return(0,R.jsx)(Et.Z,{content:(0,R.jsx)(Tt.Uo,{className:"stTooltipContent",children:(0,R.jsx)(v.ZP,{style:{fontSize:c.sm},source:o,allowHTML:!1})}),placement:Mt.r4.top,accessibilityType:Mt.SI.tooltip,showArrow:!1,popoverMargin:5,onClickOutside:m,onEsc:m,overrides:{Body:{style:{borderTopLeftRadius:u.md,borderTopRightRadius:u.md,borderBottomLeftRadius:u.md,borderBottomRightRadius:u.md,paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important",backgroundColor:"transparent"}},Inner:{style:{backgroundColor:(0,M.Iy)(s)?d.bgColor:d.secondaryBg,color:d.bodyText,fontSize:c.sm,fontWeight:"normal",paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important"}}},isOpen:r,children:(0,R.jsx)("div",{className:"stTooltipTarget","data-testid":"stTooltipTarget",style:{position:"fixed",top:t,left:n}})})},Rt=(0,E.Z)("div",{target:"e1w7nams0"})((e=>{let{hasCustomizedScrollbars:t,theme:n}=e;return{position:"relative",display:"inline-block","& .glideDataEditor":{height:"100%",minWidth:"100%",borderRadius:n.radii.lg},"& .dvn-scroller":{...!t&&{scrollbarWidth:"thin"},overflowX:"auto !important",overflowY:"auto !important"}}}),"");n(2739),n(24665);const Nt=(0,m.Z)((function(e){let{element:t,data:n,width:m,height:g,disabled:f,widgetMgr:b,isFullScreen:v,disableFullscreenMode:y,expand:w,collapse:x,fragmentId:C}=e;const E=i.useRef(null),M=i.useRef(null),T=i.useRef(null),{theme:k,headerIcons:_,tableBorderRadius:I}=Ge(),[O,D]=i.useState(!0),[F,A]=i.useState(!1),[H,z]=i.useState(!1),[V,j]=i.useState(!1),L=i.useMemo((()=>window.matchMedia&&window.matchMedia("(pointer: coarse)").matches),[]),W=i.useMemo((()=>window.navigator.userAgent.includes("Mac OS")&&window.navigator.userAgent.includes("Safari")||window.navigator.userAgent.includes("Chrome")),[]),[B,Y]=i.useState({columns:o.EV.empty(),rows:o.EV.empty(),current:void 0}),Z=i.useCallback((()=>{Y({columns:o.EV.empty(),rows:o.EV.empty(),current:void 0})}),[]),J=i.useCallback((()=>{Y({columns:B.columns,rows:B.rows,current:void 0})}),[B]),U=i.useCallback((e=>{var t;null===(t=M.current)||void 0===t||t.updateCells(e)}),[]);(0,p.le)(t.editingMode)&&(t.editingMode=h.Eh.EditingMode.READ_ONLY);const{READ_ONLY:K,DYNAMIC:G}=h.Eh.EditingMode,X=n.dimensions,Q=Math.max(0,X.rows-1),$=0===Q&&!(t.editingMode===G&&X.dataColumns>0),ee=Q>15e4,te=i.useRef(new Ue(Q)),[ne,ie]=i.useState(te.current.getNumRows());i.useEffect((()=>{te.current=new Ue(Q),ie(te.current.getNumRows())}),[Q]);const oe=i.useCallback((()=>{te.current=new Ue(Q),ie(te.current.getNumRows())}),[Q]),{columns:ae}=qe(t,n,f);i.useEffect((()=>{if(t.editingMode!==K){const e=b.getStringValue(t);e&&(te.current.fromJson(e,ae),ie(te.current.getNumRows()))}}),[]);const{getCellContent:re}=Xe(n,ae,ne,te),{columns:le,sortColumn:se,getOriginalIndex:de,getCellContent:ce}=$e(Q,ae,re),ue=i.useCallback((function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];ne!==te.current.getNumRows()&&ie(te.current.getNumRows()),e&&Z(),(0,p.Ds)(100,(()=>{const e=te.current.toJson(le);let i=b.getStringValue(t);void 0===i&&(i=new Ue(0).toJson([])),e!==i&&b.setStringValue(t,e,{fromUi:n},C)}))()}),[b,t,ne,Z,le]),{exportToCsv:me}=rt(ce,le,ne),{onCellEdited:he,onPaste:pe,onRowAppended:ge,onDelete:fe,validateCell:be}=lt(le,t.editingMode!==G,te,ce,de,U,ue),{tooltip:ve,clearTooltip:ye,onItemHovered:we}=st(le,ce),{drawCell:xe,customRenderers:Ce}=pt(le),Ee=i.useMemo((()=>le.map((e=>q(e)))),[le]),{columns:Me,onColumnResize:Te}=gt(Ee),{minHeight:ke,maxHeight:Re,minWidth:Ne,maxWidth:Se,resizableSize:_e,setResizableSize:Ie}=wt(t,ne,m,g,v),Oe=i.useCallback((e=>{let[t,n]=e;return{...P(!0,!1),displayData:"empty",contentAlign:"center",allowOverlay:!1,themeOverride:{textDark:k.textLight},span:[0,Math.max(le.length-1,0)]}}),[le,k.textLight]);i.useEffect((()=>{const e=new u.K;return e.manageFormClearListener(b,t.formId,oe),()=>{e.disconnect()}}),[t.formId,oe,b]);const De=!$&&t.editingMode===G&&!f,Fe=B.rows.length>0,Ae=void 0!==B.current,He=$?0:le.filter((e=>e.isIndex)).length;return i.useEffect((()=>{setTimeout((()=>{if(T.current&&M.current){var e,t;const n=null===(e=T.current)||void 0===e||null===(t=e.querySelector(".dvn-stack"))||void 0===t?void 0:t.getBoundingClientRect();n&&(z(n.height>T.current.clientHeight),j(n.width>T.current.clientWidth))}}),1)}),[_e,ne,Me]),i.useEffect((()=>{J()}),[v]),(0,R.jsxs)(Rt,{"data-testid":"stDataFrame",className:"stDataFrame",hasCustomizedScrollbars:W,ref:T,onMouseDown:e=>{if(T.current&&W){const t=T.current.getBoundingClientRect();V&&t.height-7<e.clientY-t.top&&e.stopPropagation(),H&&t.width-7<e.clientX-t.left&&e.stopPropagation()}},onBlur:e=>{O||L||e.currentTarget.contains(e.relatedTarget)||J()},children:[(0,R.jsxs)(S,{isFullScreen:v,disableFullscreenMode:y,locked:Fe||Ae||L&&O,onExpand:w,onCollapse:x,target:Rt,children:[De&&Fe&&(0,R.jsx)(N,{label:"Delete row(s)",icon:l.H,onClick:()=>{fe&&(fe(B),ye())}}),De&&!Fe&&(0,R.jsx)(N,{label:"Add row",icon:s.m,onClick:()=>{ge&&(D(!0),ge(),ye())}}),!ee&&!$&&(0,R.jsx)(N,{label:"Download as CSV",icon:d.k,onClick:()=>me()}),!$&&(0,R.jsx)(N,{label:"Search",icon:c.o,onClick:()=>{F?A(!1):(D(!0),A(!0)),ye()}})]}),(0,R.jsx)(r.e,{"data-testid":"stDataFrameResizable",ref:E,defaultSize:_e,style:{border:"1px solid ".concat(k.borderColor),borderRadius:"".concat(I)},minHeight:ke,maxHeight:Re,minWidth:Ne,maxWidth:Se,size:_e,enable:{top:!1,right:!1,bottom:!1,left:!1,topRight:!1,bottomRight:!0,bottomLeft:!1,topLeft:!1},grid:[1,bt],snapGap:bt/3,onResizeStop:(e,t,n,i)=>{E.current&&Ie({width:E.current.size.width,height:Re-E.current.size.height===ft?E.current.size.height+ft:E.current.size.height})},children:(0,R.jsx)(a.F,{className:"glideDataEditor",ref:M,columns:Me,rows:$?1:ne,minColumnWidth:50,maxColumnWidth:1e3,maxColumnAutoWidth:500,rowHeight:bt,headerHeight:bt,getCellContent:$?Oe:ce,onColumnResize:L?void 0:Te,resizeIndicator:"header",freezeColumns:He,smoothScrollX:!0,smoothScrollY:!0,verticalBorder:!0,getCellsForSelection:!0,rowMarkers:"none",rangeSelect:L?"cell":"rect",columnSelect:"none",rowSelect:"none",onItemHovered:we,keybindings:{downFill:!0},onKeyDown:e=>{(e.ctrlKey||e.metaKey)&&"f"===e.key&&(A((e=>!e)),e.stopPropagation(),e.preventDefault())},showSearch:F,onSearchClose:()=>{A(!1),ye()},onHeaderClicked:$||ee?void 0:se,gridSelection:B,onGridSelectionChange:e=>{(O||L)&&(Y(e),void 0!==ve&&ye())},theme:k,onMouseMove:e=>{"out-of-bounds"===e.kind&&O?D(!1):"out-of-bounds"===e.kind||O||D(!0)},fixedShadowX:!0,fixedShadowY:!0,experimental:{scrollbarWidthOverride:0,...W&&{paddingBottom:V?-6:void 0,paddingRight:H?-6:void 0}},drawCell:xe,customRenderers:Ce,imageEditorOverride:Ct,headerIcons:_,validateCell:be,onPaste:!1,...!$&&t.editingMode!==K&&!f&&{fillHandle:!L,onCellEdited:he,onPaste:pe,onDelete:fe},...!$&&t.editingMode===G&&{trailingRowOptions:{sticky:!1,tint:!0},rowMarkerTheme:{bgCell:k.bgHeader,bgCellMedium:k.bgHeader},rowMarkers:"checkbox",rowSelectionMode:"multi",rowSelect:f?"none":"multi",onRowAppended:f?void 0:ge,onHeaderClicked:void 0}})}),ve&&ve.content&&(0,R.jsx)(kt,{top:ve.top,left:ve.left,content:ve.content,clearTooltip:ye})]})}),!0)},87814:(e,t,n)=>{n.d(t,{K:()=>o});var i=n(50641);class o{constructor(){this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}manageFormClearListener(e,t,n){null!=this.formClearListener&&this.lastWidgetMgr===e&&this.lastFormId===t||(this.disconnect(),(0,i.bM)(t)&&(this.formClearListener=e.addFormClearedListener(t,n),this.lastWidgetMgr=e,this.lastFormId=t))}disconnect(){var e;null===(e=this.formClearListener)||void 0===e||e.disconnect(),this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}}}}]);
|
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[43],{10043:(t,e,o)=>{o.r(e),o.d(e,{default:()=>D});var n=o(66845),i=o(25621),a=o(41558),s=o(95199),r=o(60784),l=o(23849),d=o(62622),c=o(63765),h=o(28391),g=o(96825),u=o.n(g),m=o(99394),f=o.n(m),p=o(92627);function b(t,e){const o={font:e.genericFonts.bodyFont,background:e.colors.bgColor,fieldTitle:"verbal",autosize:{type:"fit",contains:"padding"},title:{align:"left",anchor:"start",color:e.colors.headingColor,titleFontStyle:"normal",fontWeight:e.fontWeights.bold,fontSize:e.fontSizes.smPx+2,orient:"top",offset:26},header:{titleFontWeight:e.fontWeights.normal,titleFontSize:e.fontSizes.mdPx,titleColor:(0,p.Xy)(e),titleFontStyle:"normal",labelFontSize:e.fontSizes.twoSmPx,labelFontWeight:e.fontWeights.normal,labelColor:(0,p.Xy)(e),labelFontStyle:"normal"},axis:{labelFontSize:e.fontSizes.twoSmPx,labelFontWeight:e.fontWeights.normal,labelColor:(0,p.Xy)(e),labelFontStyle:"normal",titleFontWeight:e.fontWeights.normal,titleFontSize:e.fontSizes.smPx,titleColor:(0,p.Xy)(e),titleFontStyle:"normal",ticks:!1,gridColor:(0,p.ny)(e),domain:!1,domainWidth:1,domainColor:(0,p.ny)(e),labelFlush:!0,labelFlushOffset:1,labelBound:!1,labelLimit:100,titlePadding:e.spacing.lgPx,labelPadding:e.spacing.lgPx,labelSeparation:e.spacing.twoXSPx,labelOverlap:!0},legend:{labelFontSize:e.fontSizes.smPx,labelFontWeight:e.fontWeights.normal,labelColor:(0,p.Xy)(e),titleFontSize:e.fontSizes.smPx,titleFontWeight:e.fontWeights.normal,titleFontStyle:"normal",titleColor:(0,p.Xy)(e),titlePadding:5,labelPadding:e.spacing.lgPx,columnPadding:e.spacing.smPx,rowPadding:e.spacing.twoXSPx,padding:7,symbolStrokeWidth:4},range:{category:(0,p.iY)(e),diverging:(0,p.ru)(e),ramp:(0,p.Gy)(e),heatmap:(0,p.Gy)(e)},view:{columns:1,strokeWidth:0,stroke:"transparent",continuousHeight:350,continuousWidth:400},concat:{columns:1},facet:{columns:1},mark:{tooltip:!0,...(0,p.Iy)(e)?{color:"#0068C9"}:{color:"#83C9FF"}},bar:{binSpacing:e.spacing.twoXSPx,discreteBandSize:{band:.85}},axisDiscrete:{grid:!1},axisXPoint:{grid:!1},axisTemporal:{grid:!1},axisXBand:{grid:!1}};return t?f()({},o,t,((t,e)=>Array.isArray(e)?e:void 0)):o}const y=(0,o(1515).Z)("div",{target:"egd2k5h0"})((t=>{let{theme:e}=t;return{"&.vega-embed":{"&:hover summary, .vega-embed:focus summary":{background:"transparent"},"&.has-actions":{paddingRight:0},".vega-actions":{zIndex:e.zIndices.popupMenu,backgroundColor:e.colors.bgColor,boxShadow:"rgb(0 0 0 / 16%) 0px 4px 16px",border:"1px solid ".concat(e.colors.fadedText10),a:{fontFamily:e.genericFonts.bodyFont,fontWeight:e.fontWeights.normal,fontSize:e.fontSizes.md,margin:0,padding:"".concat(e.spacing.twoXS," ").concat(e.spacing.twoXL),color:e.colors.bodyText},"a:hover":{backgroundColor:e.colors.secondaryBg,color:e.colors.bodyText},":before":{content:"none"},":after":{content:"none"}},summary:{opacity:0,height:"auto",zIndex:e.zIndices.menuButton,border:"none",boxShadow:"none",borderRadius:e.radii.lg,color:e.colors.fadedText10,backgroundColor:"transparent",transition:"opacity 300ms 150ms,transform 300ms 150ms","&:active, &:focus-visible, &:hover":{border:"none",boxShadow:"none",color:e.colors.bodyText,opacity:"1 !important",background:e.colors.darkenedBgMix25}}}}}),"");var w=o(40864);const v={DATAFRAME_INDEX:"(index)"},x="source",S=new Set([h.GI.DatetimeIndex,h.GI.Float64Index,h.GI.Int64Index,h.GI.RangeIndex,h.GI.UInt64Index]);class F extends n.PureComponent{constructor(){super(...arguments),this.vegaView=void 0,this.vegaFinalizer=void 0,this.defaultDataName=x,this.element=null,this.state={error:void 0},this.finalizeView=()=>{this.vegaFinalizer&&this.vegaFinalizer(),this.vegaFinalizer=void 0,this.vegaView=void 0},this.generateSpec=()=>{var t,e;const{element:o,theme:n}=this.props,i=JSON.parse(o.spec),{useContainerWidth:a}=o;if("streamlit"===o.vegaLiteTheme?i.config=b(i.config,n):"streamlit"===(null===(t=i.usermeta)||void 0===t||null===(e=t.embedOptions)||void 0===e?void 0:e.theme)?(i.config=b(i.config,n),i.usermeta.embedOptions.theme=void 0):i.config=function(t,e){const{colors:o,fontSizes:n,genericFonts:i}=e,a={labelFont:i.bodyFont,titleFont:i.bodyFont,labelFontSize:n.twoSmPx,titleFontSize:n.twoSmPx},s={background:o.bgColor,axis:{labelColor:o.bodyText,titleColor:o.bodyText,gridColor:(0,p.ny)(e),...a},legend:{labelColor:o.bodyText,titleColor:o.bodyText,...a},title:{color:o.bodyText,subtitleColor:o.bodyText,...a},header:{labelColor:o.bodyText,titleColor:o.bodyText,...a},view:{stroke:(0,p.ny)(e),continuousHeight:350,continuousWidth:400},mark:{tooltip:!0}};return t?u()({},s,t):s}(i.config,n),this.props.height?(i.width=this.props.width,i.height=this.props.height):a&&(i.width=this.props.width),i.padding||(i.padding={}),null==i.padding.bottom&&(i.padding.bottom=20),i.datasets)throw new Error("Datasets should not be passed as part of the spec");return i}}async componentDidMount(){try{await this.createView()}catch(t){const e=(0,c.b)(t);this.setState({error:e})}}componentWillUnmount(){this.finalizeView()}async componentDidUpdate(t){const{element:e,theme:o}=t,{element:n,theme:i}=this.props,a=e.spec,{spec:s}=n;if(!this.vegaView||a!==s||o!==i||t.width!==this.props.width||t.height!==this.props.height||t.element.vegaLiteTheme!==this.props.element.vegaLiteTheme){(0,l.ji)("Vega spec changed.");try{await this.createView()}catch(u){const t=(0,c.b)(u);this.setState({error:t})}return}const r=e.data,{data:d}=n;(r||d)&&this.updateData(this.defaultDataName,r,d);const h=z(e)||{},g=z(n)||{};for(const[l,c]of Object.entries(g)){const t=l||this.defaultDataName,e=h[t];this.updateData(t,e,c)}for(const l of Object.keys(h))g.hasOwnProperty(l)||l===this.defaultDataName||this.updateData(l,null,null);this.vegaView.resize().runAsync()}updateData(t,e,o){if(!this.vegaView)throw new Error("Chart has not been drawn yet");if(!o||0===o.data.numRows){return void(this.vegaView._runtime.data.hasOwnProperty(t)&&this.vegaView.remove(t,s.truthy))}if(!e||0===e.data.numRows)return void this.vegaView.insert(t,C(o));const{dataRows:n,dataColumns:i}=e.dimensions,{dataRows:a,dataColumns:r}=o.dimensions;if(function(t,e,o,n,i,a){if(o!==a)return!1;if(e>=i)return!1;if(0===e)return!1;const s=a-1,r=e-1;if(t.getDataValue(0,s)!==n.getDataValue(0,s)||t.getDataValue(r,s)!==n.getDataValue(r,s))return!1;return!0}(e,n,i,o,a,r))n<a&&this.vegaView.insert(t,C(o,n));else{const e=s.changeset().remove(s.truthy).insert(C(o));this.vegaView.change(t,e),(0,l.ji)("Had to clear the ".concat(t," dataset before inserting data through Vega view."))}}async createView(){if((0,l.ji)("Creating a new Vega view."),!this.element)throw Error("Element missing.");this.finalizeView();const t=this.props.element,e=this.generateSpec(),o={ast:!0,expr:r.N,tooltip:{disableDefaultStyle:!0},defaultStyle:!1,forceActionsMenu:!0},{vgSpec:n,view:i,finalize:s}=await(0,a.ZP)(this.element,e,o);this.vegaView=i,this.vegaFinalizer=s;const d=function(t){const e=z(t);if(null==e)return null;const o={};for(const[n,i]of Object.entries(e))o[n]=C(i);return o}(t),c=d?Object.keys(d):[];if(1===c.length){const[t]=c;this.defaultDataName=t}else 0===c.length&&n.data&&(this.defaultDataName=x);const h=function(t){const e=t.data;if(!e||0===e.data.numRows)return null;return C(e)}(t);if(h&&i.insert(this.defaultDataName,h),d)for(const[a,r]of Object.entries(d))i.insert(a,r);await i.runAsync(),this.vegaView.resize().runAsync()}render(){if(this.state.error)throw this.state.error;return(0,w.jsx)(y,{"data-testid":"stArrowVegaLiteChart",ref:t=>{this.element=t}})}}function z(t){var e;if(0===(null===(e=t.datasets)||void 0===e?void 0:e.length))return null;const o={};return t.datasets.forEach((t=>{if(!t)return;const e=t.hasName?t.name:null;o[e]=t.data})),o}function C(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(t.isEmpty())return[];const o=[],{dataRows:n,dataColumns:i}=t.dimensions,a=h.fu.getTypeName(t.types.index[0]),s=S.has(a);for(let r=e;r<n;r++){const e={};if(s){const o=t.getIndexValue(r,0);e[v.DATAFRAME_INDEX]="bigint"===typeof o?Number(o):o}for(let o=0;o<i;o++){const n=t.getDataValue(r,o),i=t.types.data[o],a=h.fu.getTypeName(i);if("datetimetz"!==a&&(n instanceof Date||Number.isFinite(n))&&(a.startsWith("datetime")||"date"===a)){const i=60*new Date(n).getTimezoneOffset()*1e3;e[t.columns[0][o]]=n.valueOf()+i}else e[t.columns[0][o]]="bigint"===typeof n?Number(n):n}o.push(e)}return o}const D=(0,i.b)((0,d.Z)(F))}}]);
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|