streamlit-nightly 1.44.2.dev20250415__py3-none-any.whl → 1.44.2.dev20250417__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/__init__.py +5 -1
- streamlit/elements/lib/file_uploader_utils.py +3 -2
- streamlit/proto/MetricsEvent_pb2.py +4 -4
- streamlit/proto/MetricsEvent_pb2.pyi +4 -1
- streamlit/proto/NewSession_pb2.py +4 -4
- streamlit/proto/NewSession_pb2.pyi +4 -1
- streamlit/runtime/app_session.py +8 -6
- streamlit/runtime/metrics_util.py +36 -2
- streamlit/static/index.html +1 -1
- streamlit/static/static/js/{ErrorOutline.esm.DpSDsEwX.js → ErrorOutline.esm.D1YnfxHk.js} +1 -1
- streamlit/static/static/js/{FileDownload.esm.DRAkCta9.js → FileDownload.esm.CLJXxgV6.js} +1 -1
- streamlit/static/static/js/{FileHelper.B8weo4vC.js → FileHelper.BHzgawSh.js} +1 -1
- streamlit/static/static/js/{FormClearHelper.D-LphorD.js → FormClearHelper.CiT2avpL.js} +1 -1
- streamlit/static/static/js/{Hooks.Bi7tTkGd.js → Hooks.C7DoFAsE.js} +1 -1
- streamlit/static/static/js/{InputInstructions.CfaxjFap.js → InputInstructions.1ktgI5Zf.js} +1 -1
- streamlit/static/static/js/{ProgressBar.B4UgMGDS.js → ProgressBar.B-m8Pcc_.js} +2 -2
- streamlit/static/static/js/{RenderInPortalIfExists.Cyv8zNLx.js → RenderInPortalIfExists.UlyqzBTE.js} +1 -1
- streamlit/static/static/js/{Toolbar.CCh_4t83.js → Toolbar.Bu3GiYVX.js} +1 -1
- streamlit/static/static/js/{base-input.DQIDgbB-.js → base-input.Dku6WvpS.js} +4 -4
- streamlit/static/static/js/{checkbox.CFH_6mHD.js → checkbox.mz5gOMKJ.js} +2 -2
- streamlit/static/static/js/{createSuper.D4-ztb_I.js → createSuper.C0BzpJjg.js} +1 -1
- streamlit/static/static/js/{data-grid-overlay-editor.Bh5xenBN.js → data-grid-overlay-editor.DiqoYT48.js} +1 -1
- streamlit/static/static/js/{downloader.BLirGk7N.js → downloader.CAP3tiYQ.js} +1 -1
- streamlit/static/static/js/{es6.an6cInSd.js → es6.DqL75OZp.js} +2 -2
- streamlit/static/static/js/{iframeResizer.contentWindow.BqW3H8tT.js → iframeResizer.contentWindow.C9cMqH_8.js} +1 -1
- streamlit/static/static/js/{index.VmnqRsXk.js → index.0ur-mug2.js} +1 -1
- streamlit/static/static/js/{index.Byb6VTEN.js → index.2NBXJp_l.js} +1 -1
- streamlit/static/static/js/index.B0n_vnpx.js +3 -0
- streamlit/static/static/js/index.B2Dp1gHJ.js +1 -0
- streamlit/static/static/js/index.B49PYj78.js +1 -0
- streamlit/static/static/js/{index.B4f6JJgu.js → index.B9zQLzcb.js} +1 -1
- streamlit/static/static/js/{index.DlLtTPOa.js → index.BMq-uQqp.js} +1 -1
- streamlit/static/static/js/{index.Bg2Se7Yz.js → index.BQLXsaDk.js} +2 -2
- streamlit/static/static/js/{index.Woz42eYH.js → index.BTKYbohA.js} +1 -1
- streamlit/static/static/js/{index.BP4BAODr.js → index.BWwi0-8w.js} +1 -1
- streamlit/static/static/js/{index.BGqvY5qt.js → index.BXFSjo3B.js} +1 -1
- streamlit/static/static/js/{index.Bh4ilwGH.js → index.BZhXwgKt.js} +1 -1
- streamlit/static/static/js/{index.XbFLAb00.js → index.BaXHw-8Q.js} +1 -1
- streamlit/static/static/js/{index.D84g5Ioc.js → index.BfGvICUE.js} +1 -1
- streamlit/static/static/js/{index.BLr_rSka.js → index.Bfm4YOP_.js} +1 -1
- streamlit/static/static/js/{index.DeV1lu7_.js → index.C89_PWNN.js} +2 -2
- streamlit/static/static/js/{index.BFGrALdH.js → index.CC65c-T9.js} +1 -1
- streamlit/static/static/js/{index.BX7m08G2.js → index.CNictWM2.js} +1 -1
- streamlit/static/static/js/index.CVScnAor.js +1 -0
- streamlit/static/static/js/{index.BBeK6_p7.js → index.CW6Jh2uG.js} +1 -1
- streamlit/static/static/js/{index.DIzecMyl.js → index.CfxnI87h.js} +1 -1
- streamlit/static/static/js/index.CmT6dLLy.js +1 -0
- streamlit/static/static/js/{index.B1VulLzc.js → index.CnEhB-fE.js} +78 -78
- streamlit/static/static/js/{index.B7TWpGOg.js → index.CxREAMVk.js} +6 -6
- streamlit/static/static/js/{index.RaDZFZ7O.js → index.DMl1udgs.js} +1 -1
- streamlit/static/static/js/{index.7EHeCBEL.js → index.DlKg7FR2.js} +1 -1
- streamlit/static/static/js/{index.Dx6BIgX5.js → index.DtkU_G3Z.js} +1 -1
- streamlit/static/static/js/{index.BNrCbTAI.js → index.Dv1t4-PM.js} +2 -2
- streamlit/static/static/js/{index.fQ7ekjBK.js → index.IROfSyE9.js} +1 -1
- streamlit/static/static/js/index.ZmGLVwWD.js +1 -0
- streamlit/static/static/js/{index.Czs3SnEY.js → index.e6kwCR7s.js} +1 -1
- streamlit/static/static/js/{index.ONaU2JWb.js → index.gBUUVGOM.js} +1 -1
- streamlit/static/static/js/{index.DN_iIZPM.js → index.gI1I4ciB.js} +1 -1
- streamlit/static/static/js/{index.BqDL9XdN.js → index.ltG9E0Ez.js} +2 -2
- streamlit/static/static/js/{index.BiulHWQY.js → index.o5IBEZ9z.js} +1 -1
- streamlit/static/static/js/{index.CTgm0tf2.js → index.tTEmROeK.js} +2 -2
- streamlit/static/static/js/{index.B4mz1g3p.js → index.zZel4nfV.js} +1 -1
- streamlit/static/static/js/{input.BlFR_aSs.js → input.BmYm0CET.js} +2 -2
- streamlit/static/static/js/{memory.CIFxKzYD.js → memory.9cXtH-RQ.js} +1 -1
- streamlit/static/static/js/{mergeWith.DkWqXWlC.js → mergeWith.OMNzEmuQ.js} +1 -1
- streamlit/static/static/js/{number-overlay-editor.C_GJSWmK.js → number-overlay-editor.nGsU-IsU.js} +1 -1
- streamlit/static/static/js/{possibleConstructorReturn.6fU7Ey-A.js → possibleConstructorReturn.CKIaFpbd.js} +1 -1
- streamlit/static/static/js/{sandbox.sXki2ZXo.js → sandbox.rqJvxxMI.js} +1 -1
- streamlit/static/static/js/{textarea.7d3kK4wj.js → textarea.B4MNRqGE.js} +2 -2
- streamlit/static/static/js/{timepicker.x_jFErWh.js → timepicker.BKET0TV7.js} +4 -4
- streamlit/static/static/js/{toConsumableArray.BPJIfTVP.js → toConsumableArray.BV-SUrrM.js} +1 -1
- streamlit/static/static/js/{uniqueId.wPSWLsMO.js → uniqueId.BmEYrlc2.js} +1 -1
- streamlit/static/static/js/{useBasicWidgetState.BGHxUZDu.js → useBasicWidgetState.BctdjMds.js} +1 -1
- streamlit/static/static/js/useOnInputChange.BJkQTmTx.js +1 -0
- streamlit/static/static/js/withFullScreenWrapper.Bgp3yFiP.js +1 -0
- streamlit/type_util.py +0 -1
- streamlit/user_info.py +44 -5
- {streamlit_nightly-1.44.2.dev20250415.dist-info → streamlit_nightly-1.44.2.dev20250417.dist-info}/METADATA +1 -1
- {streamlit_nightly-1.44.2.dev20250415.dist-info → streamlit_nightly-1.44.2.dev20250417.dist-info}/RECORD +83 -83
- streamlit/static/static/js/index.2o-NgFGe.js +0 -1
- streamlit/static/static/js/index.BC2K_mou.js +0 -1
- streamlit/static/static/js/index.BEVtO2Ts.js +0 -3
- streamlit/static/static/js/index.DPHQ-k-c.js +0 -1
- streamlit/static/static/js/index.DxkrGZ4c.js +0 -1
- streamlit/static/static/js/index.j2U8rE_N.js +0 -1
- streamlit/static/static/js/useOnInputChange.l7dUdah_.js +0 -1
- streamlit/static/static/js/withFullScreenWrapper.BkB-qCNh.js +0 -1
- {streamlit_nightly-1.44.2.dev20250415.data → streamlit_nightly-1.44.2.dev20250417.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.44.2.dev20250415.dist-info → streamlit_nightly-1.44.2.dev20250417.dist-info}/WHEEL +0 -0
- {streamlit_nightly-1.44.2.dev20250415.dist-info → streamlit_nightly-1.44.2.dev20250417.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.44.2.dev20250415.dist-info → streamlit_nightly-1.44.2.dev20250417.dist-info}/top_level.txt +0 -0
streamlit/user_info.py
CHANGED
@@ -29,6 +29,10 @@ from streamlit.auth_util import (
|
|
29
29
|
is_authlib_installed,
|
30
30
|
validate_auth_credentials,
|
31
31
|
)
|
32
|
+
from streamlit.deprecation_util import (
|
33
|
+
make_deprecated_name_warning,
|
34
|
+
show_deprecation_warning,
|
35
|
+
)
|
32
36
|
from streamlit.errors import StreamlitAPIException, StreamlitAuthError
|
33
37
|
from streamlit.proto.ForwardMsg_pb2 import ForwardMsg
|
34
38
|
from streamlit.runtime.metrics_util import gather_metrics
|
@@ -55,14 +59,14 @@ def login(provider: str | None = None) -> None:
|
|
55
59
|
the user authenticates their identity, they are redirected back to the
|
56
60
|
home page of your app. Streamlit stores a cookie with the user's identity
|
57
61
|
information in the user's browser . You can access the identity information
|
58
|
-
through |st.
|
62
|
+
through |st.user|_. Call ``st.logout()`` to remove the cookie
|
59
63
|
and start a new session.
|
60
64
|
|
61
65
|
You can use any OIDC provider, including Google, Microsoft, Okta, and more.
|
62
66
|
You must configure the provider through secrets management. Although OIDC
|
63
67
|
is an extension of OAuth 2.0, you can't use generic OAuth providers.
|
64
68
|
Streamlit parses the user's identity token and surfaces its attributes in
|
65
|
-
``st.
|
69
|
+
``st.user``. If the provider returns an access token, that
|
66
70
|
token is ignored. Therefore, this command will not allow your app to act on
|
67
71
|
behalf of a user in a secure system.
|
68
72
|
|
@@ -491,10 +495,10 @@ class UserInfoProxy(Mapping[str, Union[str, bool, None]]):
|
|
491
495
|
raise AttributeError(f'st.experimental_user has no attribute "{key}".')
|
492
496
|
|
493
497
|
def __setattr__(self, name: str, value: str | None) -> NoReturn:
|
494
|
-
raise StreamlitAPIException("st.
|
498
|
+
raise StreamlitAPIException("st.user cannot be modified")
|
495
499
|
|
496
500
|
def __setitem__(self, name: str, value: str | None) -> NoReturn:
|
497
|
-
raise StreamlitAPIException("st.
|
501
|
+
raise StreamlitAPIException("st.user cannot be modified")
|
498
502
|
|
499
503
|
def __iter__(self) -> Iterator[str]:
|
500
504
|
return iter(_get_user_info())
|
@@ -507,7 +511,7 @@ class UserInfoProxy(Mapping[str, Union[str, bool, None]]):
|
|
507
511
|
Get user info as a dictionary.
|
508
512
|
|
509
513
|
This method primarily exists for internal use and is not needed for
|
510
|
-
most cases. ``st.
|
514
|
+
most cases. ``st.user`` returns an object that inherits from
|
511
515
|
``dict`` by default.
|
512
516
|
|
513
517
|
Returns
|
@@ -516,3 +520,38 @@ class UserInfoProxy(Mapping[str, Union[str, bool, None]]):
|
|
516
520
|
A dictionary of the current user's information.
|
517
521
|
"""
|
518
522
|
return _get_user_info()
|
523
|
+
|
524
|
+
|
525
|
+
has_shown_experimental_user_warning = False
|
526
|
+
|
527
|
+
|
528
|
+
def maybe_show_deprecated_user_warning() -> None:
|
529
|
+
"""Show a deprecation warning for the experimental_user alias."""
|
530
|
+
global has_shown_experimental_user_warning # noqa: PLW0603
|
531
|
+
|
532
|
+
if not has_shown_experimental_user_warning:
|
533
|
+
has_shown_experimental_user_warning = True
|
534
|
+
show_deprecation_warning(
|
535
|
+
make_deprecated_name_warning(
|
536
|
+
"experimental_user",
|
537
|
+
"user",
|
538
|
+
"2025-11-06",
|
539
|
+
)
|
540
|
+
)
|
541
|
+
|
542
|
+
|
543
|
+
class DeprecatedUserInfoProxy(UserInfoProxy):
|
544
|
+
"""
|
545
|
+
A deprecated alias for UserInfoProxy.
|
546
|
+
|
547
|
+
This class is deprecated and will be removed in a future version of
|
548
|
+
Streamlit.
|
549
|
+
"""
|
550
|
+
|
551
|
+
def __getattribute__(self, name: str):
|
552
|
+
maybe_show_deprecated_user_warning()
|
553
|
+
return super().__getattribute__(name)
|
554
|
+
|
555
|
+
def __getitem__(self, key: str):
|
556
|
+
maybe_show_deprecated_user_warning()
|
557
|
+
return super().__getitem__(key)
|
@@ -1,4 +1,4 @@
|
|
1
|
-
streamlit/__init__.py,sha256=
|
1
|
+
streamlit/__init__.py,sha256=JPvwMAOUrMAXccsBG_MJ6omYFdfw614c9J2kcmR03ZA,9817
|
2
2
|
streamlit/__main__.py,sha256=G3Ka6wgeICpC1gI872L7jGQhY4ukAFo3lgnYIqtoBIo,868
|
3
3
|
streamlit/auth_util.py,sha256=T_fe3wXFOoAGNyrxhS8r-SeXMqvWGtU3j9EvQvES8Pc,8496
|
4
4
|
streamlit/cli_util.py,sha256=usVophgZtkDBxqYfiGx07W8NA_d4RUJ7P_EFTgSP-jQ,3383
|
@@ -27,9 +27,9 @@ streamlit/source_util.py,sha256=6xnOW5DC12W2kFep0e7bA8JbqkLX03zMk9JeFHsaEPU,3099
|
|
27
27
|
streamlit/string_util.py,sha256=k6lEDr6HTEsFkVwPJJRlecnHcNMAed-rtdXyWETyspA,6546
|
28
28
|
streamlit/temporary_directory.py,sha256=otAeky0FY-Y8MQtKkFo7QoG6oBclz6IkPUl1hS4gRAc,1627
|
29
29
|
streamlit/time_util.py,sha256=YgsoqQbFPxRhfeWko2C_ah7XkaWrAAE5wjQewQyS92g,2493
|
30
|
-
streamlit/type_util.py,sha256=
|
30
|
+
streamlit/type_util.py,sha256=Tb9huUrKRw5nFIEr5NVeqnH7OLYMGwYh1l7BTR6YWkg,12810
|
31
31
|
streamlit/url_util.py,sha256=akEWwAXTr3D8vyI1CyRcYQPUrMRJvFBWqB8bfIoteY4,3465
|
32
|
-
streamlit/user_info.py,sha256=
|
32
|
+
streamlit/user_info.py,sha256=4xaceJOnnlhJUFQfrnZvUCgO-ddfA2fvzoZj9-MYhFg,21065
|
33
33
|
streamlit/util.py,sha256=AW1Dl076JlnO6oSbDhYnoMJ46QWatqns3jffPHY0znU,2349
|
34
34
|
streamlit/version.py,sha256=Id-r1xqJGJ5ptTPF-_XZpuCIXLqIq5hb8yKOX4IA1Dg,763
|
35
35
|
streamlit/commands/__init__.py,sha256=M4sIyiinWL04bSC-QUcfYDB8Gr-h0uXGjTmL6o2v8jc,616
|
@@ -96,7 +96,7 @@ streamlit/elements/lib/column_types.py,sha256=vxskqk8muMGDkQpR-ZGHnDwd-qEyNeo3Jj
|
|
96
96
|
streamlit/elements/lib/dialog.py,sha256=nRFvrVwKZhORJROu0NcjSHcAP0pukj664WcXU66TJGs,5357
|
97
97
|
streamlit/elements/lib/dicttools.py,sha256=L_WZK_88z_AfVKxRJaSTTD6B3BBr00zZzoxW0FSBX-w,3887
|
98
98
|
streamlit/elements/lib/event_utils.py,sha256=bDmxX4N43uUZXz-b_qJgyYYTAbNNAQqQvSuozQwPr9c,1544
|
99
|
-
streamlit/elements/lib/file_uploader_utils.py,sha256=
|
99
|
+
streamlit/elements/lib/file_uploader_utils.py,sha256=QK0-QuugpUfSLwLg1vuIDIZ4gLWujt5vD2jW09sFEPM,2248
|
100
100
|
streamlit/elements/lib/form_utils.py,sha256=jAJIUrWEddiGw4HEQZvOh-NH7MMxcCrN5J7p4w1HJMY,2587
|
101
101
|
streamlit/elements/lib/image_utils.py,sha256=C3N0PXF6S4gTP5_kiLUW3LJHsIvX0mffgyWe09P4Rqg,15737
|
102
102
|
streamlit/elements/lib/js_number.py,sha256=zxILTUy3ePrTwxxIFEpIudb1OfSvzyxz1fT_Q8T0jMY,3524
|
@@ -232,16 +232,16 @@ streamlit/proto/Markdown_pb2.py,sha256=t5v_MejkjlkQO3uXGwQEw07KdTt7pYA9iKCVw2yVP
|
|
232
232
|
streamlit/proto/Markdown_pb2.pyi,sha256=9o21tPhp2IKSMH1lrx608PzpdLULIS_a71iiRckOeHY,3195
|
233
233
|
streamlit/proto/Metric_pb2.py,sha256=-fSPUVlL1DXRMFx-CN3xq7Z6WNnZ7yCyL9jKJ9OkB3I,2172
|
234
234
|
streamlit/proto/Metric_pb2.pyi,sha256=-pzrMUBClOqunenFRRs4Qy8S67Cd6uHsA8rYyskE664,4153
|
235
|
-
streamlit/proto/MetricsEvent_pb2.py,sha256=
|
236
|
-
streamlit/proto/MetricsEvent_pb2.pyi,sha256=
|
235
|
+
streamlit/proto/MetricsEvent_pb2.py,sha256=rEHgloPPhAJPxitMZBNm2TjiqCMk4l7qY-wBjrTSD34,3392
|
236
|
+
streamlit/proto/MetricsEvent_pb2.pyi,sha256=N0UUXzzc2_5BctFIKsq465fHx82qTyxD4yqlonlR-hQ,8938
|
237
237
|
streamlit/proto/MultiSelect_pb2.py,sha256=HUY28rogdzYqfumBwN7kRHK_6d4xXmd6mDX1PdgCaEI,2211
|
238
238
|
streamlit/proto/MultiSelect_pb2.pyi,sha256=RPIFFiphFrIXMASlyvILt_5P0_jaC3uflMl8z5CYgMM,4321
|
239
239
|
streamlit/proto/NamedDataSet_pb2.py,sha256=cWRrGJRex35yZSApkPUWtfX31CHh2puULXQuRTV0Flg,1480
|
240
240
|
streamlit/proto/NamedDataSet_pb2.pyi,sha256=grlQwakjdOU2COd9SkGBNckr8aFgbwjh9d_MeUWmJLc,2014
|
241
241
|
streamlit/proto/Navigation_pb2.py,sha256=eE74-8jcZ7vE6faM4YZY3joDvsDA03iqFuKuilXsucU,1727
|
242
242
|
streamlit/proto/Navigation_pb2.pyi,sha256=tCtrov8MwVn4TsbZNsb9JfZc--7UhUWjUsItubgAXKY,3328
|
243
|
-
streamlit/proto/NewSession_pb2.py,sha256=
|
244
|
-
streamlit/proto/NewSession_pb2.pyi,sha256=
|
243
|
+
streamlit/proto/NewSession_pb2.py,sha256=0VUr2dS9J0e2JBfqe1WwmB7EyRNr8lemsjr4eKq7dWE,6445
|
244
|
+
streamlit/proto/NewSession_pb2.pyi,sha256=9_zkby_W1oNq4bzouKLZSc3i6YjjUmQe1UIXHwWT2Vs,23201
|
245
245
|
streamlit/proto/NumberInput_pb2.py,sha256=C-A4tvfVkkpV140QyyOaDFc21aJ91HYJVJR5eFI3FQk,2519
|
246
246
|
streamlit/proto/NumberInput_pb2.pyi,sha256=DL29tmWEyD5eGmngfyd5Ecw8G7-qJiE7tpFpx1QPx8k,5227
|
247
247
|
streamlit/proto/PageConfig_pb2.py,sha256=_5or911zwhhoscapOlhdI7sCGUtjLfXKRGoqRbp62mA,2291
|
@@ -300,7 +300,7 @@ streamlit/proto/__init__.py,sha256=WJu86eq4nAb-pIORVP6xRkKHJwAJQcekPW2dRflPl-c,6
|
|
300
300
|
streamlit/proto/openmetrics_data_model_pb2.py,sha256=dWlhXENjgvIGCMnAumDVQkLA4TQQzP77G5pncI6oP9I,6424
|
301
301
|
streamlit/proto/openmetrics_data_model_pb2.pyi,sha256=dmABrepaNR5S9kA1UPfQGXqY_ARAUuLmQBqG1Xn_HUY,20319
|
302
302
|
streamlit/runtime/__init__.py,sha256=hJe0wzCysHGQwTcq6YxdFqiElH2Y9_8fmhtBFkHiDuc,1523
|
303
|
-
streamlit/runtime/app_session.py,sha256=
|
303
|
+
streamlit/runtime/app_session.py,sha256=Z9Nedmp8z3Y4G8YC64SVP21L6KzUvlpxr45ZAGgBaLA,39890
|
304
304
|
streamlit/runtime/connection_factory.py,sha256=3Deb5YO0dimhoPPHg1x9aAwHLGOO3RYVXrLVhpQuyN4,15487
|
305
305
|
streamlit/runtime/context.py,sha256=9L04c0UrT5MH3wP-CoENf2DC1JHv6H6hHdJGgMwRv3c,10618
|
306
306
|
streamlit/runtime/credentials.py,sha256=OYc_Z1M9mk3toUb5Dr_YBex9DmM0rVUqcrO4rBVM2DE,11253
|
@@ -312,7 +312,7 @@ streamlit/runtime/media_file_storage.py,sha256=ME_4J_2UHw-CZULB7z18yg_qCzEdN7QDq
|
|
312
312
|
streamlit/runtime/memory_media_file_storage.py,sha256=_5sP20GkXyg8vcb4rDrs1GWIDuPTeSeFoAGrcsvY9y0,6242
|
313
313
|
streamlit/runtime/memory_session_storage.py,sha256=snqzNRfvbStkKPsyqBRkvF0XCkww7Huvmb4nLQm1uWQ,3001
|
314
314
|
streamlit/runtime/memory_uploaded_file_manager.py,sha256=uSXahvNjmnCVWMUpF4UckApUoP9qOHIB7Vji_eZ-YQQ,4487
|
315
|
-
streamlit/runtime/metrics_util.py,sha256=
|
315
|
+
streamlit/runtime/metrics_util.py,sha256=iguoTpv1hOIt_DXy-3bFJ7Uf2bZk8RAqNp-LqiQkQY8,16256
|
316
316
|
streamlit/runtime/pages_manager.py,sha256=Q5lN6DIHxOSiDjkbPFYiXMyw1wIFLRM6oZk1FmrTw2E,6214
|
317
317
|
streamlit/runtime/runtime.py,sha256=Yx4ZLhwrn49oOUY46fqWWXua8o_A5T1SzPOxFXVDq2c,27266
|
318
318
|
streamlit/runtime/runtime_util.py,sha256=lC7wwKhGy-moob4KeGo4HS29ItBsV82H0pBu6fAyS1g,3990
|
@@ -355,84 +355,84 @@ streamlit/runtime/state/session_state.py,sha256=GPKLjSShq4iUOvNcMNV8HfECSR251R1g
|
|
355
355
|
streamlit/runtime/state/session_state_proxy.py,sha256=Z_Hw4214J1l7SjrnrFnCwul7p32yaKK2wpFtrghKEAQ,5585
|
356
356
|
streamlit/runtime/state/widgets.py,sha256=ofGjJppIwiqFN9DpBtXQakQifNpxZOVYNPCSyvCWo8Y,5319
|
357
357
|
streamlit/static/favicon.png,sha256=if5cVgw7azxKOvV5FpGixga7JLn23rfnHcy1CdWI1-E,1019
|
358
|
-
streamlit/static/index.html,sha256=
|
358
|
+
streamlit/static/index.html,sha256=86Y0J0qkIxbKo6j7raCa_JSyf6RR1xgcdih_Eahb9SQ,1837
|
359
359
|
streamlit/static/static/css/index.C5t3M85E.css,sha256=PtcvtHSL-nWJWgVsI19C3yv4M-FvjXSxlSvGCUlpVvY,18462
|
360
360
|
streamlit/static/static/css/index.DqDwtg6_.css,sha256=Hpm4hV8BU7p5GSEu5gjVFkYdQv7qXM4LPiQDKp7vPMA,31692
|
361
361
|
streamlit/static/static/css/index.DzuxGC_t.css,sha256=1D1iN9VtJEU7H_zye_YV2guXskYkxI7PXbq1YXw5JOw,35092
|
362
|
-
streamlit/static/static/js/ErrorOutline.esm.
|
363
|
-
streamlit/static/static/js/FileDownload.esm.
|
364
|
-
streamlit/static/static/js/FileHelper.
|
365
|
-
streamlit/static/static/js/FormClearHelper.
|
366
|
-
streamlit/static/static/js/Hooks.
|
367
|
-
streamlit/static/static/js/InputInstructions.
|
368
|
-
streamlit/static/static/js/ProgressBar.
|
369
|
-
streamlit/static/static/js/RenderInPortalIfExists.
|
370
|
-
streamlit/static/static/js/Toolbar.
|
362
|
+
streamlit/static/static/js/ErrorOutline.esm.D1YnfxHk.js,sha256=g--E0HLkijbMZ06u9j_KOnyy71WFHlbC7eU8Tf3Yfl8,499
|
363
|
+
streamlit/static/static/js/FileDownload.esm.CLJXxgV6.js,sha256=5BqtEzymUrTlfcJH4FGb2fIhpXfA36KVQtnA-LjXznQ,918
|
364
|
+
streamlit/static/static/js/FileHelper.BHzgawSh.js,sha256=p587N2CfSIT2VARYb927S2dxb79ZMbjTjZ2ahJc6GtI,61609
|
365
|
+
streamlit/static/static/js/FormClearHelper.CiT2avpL.js,sha256=OCdMGAqYyKbD8rxXzQNlSHFzTj1lmOjJkU4FWX_Xdvk,631
|
366
|
+
streamlit/static/static/js/Hooks.C7DoFAsE.js,sha256=IsNcGLAvhiBkHfnNWIJcbtASh8Wn15RttFt70h0JJLg,140
|
367
|
+
streamlit/static/static/js/InputInstructions.1ktgI5Zf.js,sha256=yXBL8hnBCZzM-9YhGRJngVv1_QD5HYa7WhoY9XItxSI,899
|
368
|
+
streamlit/static/static/js/ProgressBar.B-m8Pcc_.js,sha256=NcfC4FSdjYMaqVaO2LLso1g15cNAffzlhRK5Mgz1_BQ,13318
|
369
|
+
streamlit/static/static/js/RenderInPortalIfExists.UlyqzBTE.js,sha256=8gokzXdA3j9sSKZRVpH-igTJJoEuQ6rjPSkHBfTL3Zs,523
|
370
|
+
streamlit/static/static/js/Toolbar.Bu3GiYVX.js,sha256=niNWwb_Pv1Imi6ICGR25kFq5rod9DwyQ3XzObeFicMQ,2817
|
371
371
|
streamlit/static/static/js/UploadFileInfo.C-jY39rj.js,sha256=Z_hcytEoaAX1saJgsfX1UoComwwlMcjCUZ8ldwuQJI8,151
|
372
|
-
streamlit/static/static/js/base-input.
|
373
|
-
streamlit/static/static/js/checkbox.
|
372
|
+
streamlit/static/static/js/base-input.Dku6WvpS.js,sha256=cgaprdpy3HMkmWfcdElNlKYWJ7fyYAjEzxC7iZqx4X4,21774
|
373
|
+
streamlit/static/static/js/checkbox.mz5gOMKJ.js,sha256=eyyrl3zmENiUBXoLMGOmSDVi7Kh3yQ3f0Ac6nD_OVsY,11243
|
374
374
|
streamlit/static/static/js/createDownloadLinkElement.DZMwyjvU.js,sha256=uB4db2cbWB2KYpRbQKK6xi-mLBiUQXQtsL5I3N6rMcU,242
|
375
|
-
streamlit/static/static/js/createSuper.
|
376
|
-
streamlit/static/static/js/data-grid-overlay-editor.
|
377
|
-
streamlit/static/static/js/downloader.
|
378
|
-
streamlit/static/static/js/es6.
|
379
|
-
streamlit/static/static/js/iframeResizer.contentWindow.
|
380
|
-
streamlit/static/static/js/index.
|
381
|
-
streamlit/static/static/js/index.
|
382
|
-
streamlit/static/static/js/index.
|
383
|
-
streamlit/static/static/js/index.
|
384
|
-
streamlit/static/static/js/index.
|
385
|
-
streamlit/static/static/js/index.
|
386
|
-
streamlit/static/static/js/index.
|
387
|
-
streamlit/static/static/js/index.
|
388
|
-
streamlit/static/static/js/index.
|
389
|
-
streamlit/static/static/js/index.
|
390
|
-
streamlit/static/static/js/index.
|
391
|
-
streamlit/static/static/js/index.
|
392
|
-
streamlit/static/static/js/index.
|
393
|
-
streamlit/static/static/js/index.
|
394
|
-
streamlit/static/static/js/index.
|
395
|
-
streamlit/static/static/js/index.
|
396
|
-
streamlit/static/static/js/index.
|
397
|
-
streamlit/static/static/js/index.
|
398
|
-
streamlit/static/static/js/index.
|
399
|
-
streamlit/static/static/js/index.
|
400
|
-
streamlit/static/static/js/index.
|
401
|
-
streamlit/static/static/js/index.
|
402
|
-
streamlit/static/static/js/index.
|
403
|
-
streamlit/static/static/js/index.
|
404
|
-
streamlit/static/static/js/index.
|
405
|
-
streamlit/static/static/js/index.
|
406
|
-
streamlit/static/static/js/index.
|
407
|
-
streamlit/static/static/js/index.
|
408
|
-
streamlit/static/static/js/index.
|
409
|
-
streamlit/static/static/js/index.
|
410
|
-
streamlit/static/static/js/index.
|
411
|
-
streamlit/static/static/js/index.
|
412
|
-
streamlit/static/static/js/index.
|
413
|
-
streamlit/static/static/js/index.
|
414
|
-
streamlit/static/static/js/index.
|
415
|
-
streamlit/static/static/js/index.fQ7ekjBK.js,sha256=yv7VZYo0pxYQj8SI0naUdvl455FU9nhB3MlkIB4Zlwo,1612
|
416
|
-
streamlit/static/static/js/index.j2U8rE_N.js,sha256=dg4v9XF8eOrec_XhX6O2mZeYgS0evr85TwYY9gFbrOo,890
|
375
|
+
streamlit/static/static/js/createSuper.C0BzpJjg.js,sha256=jZXeifl9sqP2ThyjFtVbXsyrjiHBx1fHruYvIjifyOM,394
|
376
|
+
streamlit/static/static/js/data-grid-overlay-editor.DiqoYT48.js,sha256=PhjQ8qShw-Fl3I_jW2qTS2vpvnybusd7xa4vSIHKQ0E,4142
|
377
|
+
streamlit/static/static/js/downloader.CAP3tiYQ.js,sha256=mvMCIocota-13GTtCJ8bXEuMvNv6SVCsf30tF3a-OmQ,2535
|
378
|
+
streamlit/static/static/js/es6.DqL75OZp.js,sha256=soqTVy2U_XfDRNdSgphRYNHla-reL9sJHe40HVrYzJU,15321
|
379
|
+
streamlit/static/static/js/iframeResizer.contentWindow.C9cMqH_8.js,sha256=60I_it3BWppCqIZYZychtrgB7tt4of0Usrq_3sfHZpA,14406
|
380
|
+
streamlit/static/static/js/index.0ur-mug2.js,sha256=yhP5mBExFtCA2hIqJwg19t-kSB1Wt15svUalZcWOiC4,2876
|
381
|
+
streamlit/static/static/js/index.2NBXJp_l.js,sha256=bwTKyjuyE5U7YopwnMjRz4tKmiNKEzuTyNj4oc7WrQ4,3619
|
382
|
+
streamlit/static/static/js/index.B0n_vnpx.js,sha256=p_PzZ1L3s-oM_npr89q9iMnl4Is49GtF7TgTHSmBv20,852045
|
383
|
+
streamlit/static/static/js/index.B2Dp1gHJ.js,sha256=KT5rtexkZCLCnRUPzgOUnTSAlCOF9GlLZyQGytJQ0-o,3956
|
384
|
+
streamlit/static/static/js/index.B49PYj78.js,sha256=a77US5_WCPU7AewG1oQ5nNiEX-nIH84xZ9YDdUDvj7o,19678
|
385
|
+
streamlit/static/static/js/index.B9zQLzcb.js,sha256=6TPCXO0oW6M0tHTuZTo-bNGqO_tDIXd_hNNzEzJBw8s,2599060
|
386
|
+
streamlit/static/static/js/index.BMq-uQqp.js,sha256=3o3A5M7nfrCgmAGKAUic3ICWmEod3Hsku6N2pWbN8xk,12825
|
387
|
+
streamlit/static/static/js/index.BQLXsaDk.js,sha256=Ccertnqx7t0lcgbZlmUH5iPQwqbLWaFPncRHfXbozyM,34827
|
388
|
+
streamlit/static/static/js/index.BTKYbohA.js,sha256=xDLkMpoi8mIaOiNRw35g-LAy82rbYRvsOQDHFrC9y9M,1277
|
389
|
+
streamlit/static/static/js/index.BWwi0-8w.js,sha256=JnErUeyNfzWZLPNS0odHZTIkFT5uXwg2tMX9nnOIyAs,954
|
390
|
+
streamlit/static/static/js/index.BXFSjo3B.js,sha256=SieHogGSu-ZiR3Zr6ztmXw_xTeTafnJf-FVSLPo-qUM,1333
|
391
|
+
streamlit/static/static/js/index.BZhXwgKt.js,sha256=ZTZ_kosPAbbkugYiVK-lJCd_Ltj7Zg7FF0u7vm7lfvs,3385535
|
392
|
+
streamlit/static/static/js/index.BaXHw-8Q.js,sha256=xtImO__7hQ63GOxH8OaU1bYTixQH8O1FwvjMYLL6rd8,2861
|
393
|
+
streamlit/static/static/js/index.BfGvICUE.js,sha256=RX17kapUkBo1i8HDRd5702lHDunSrU-cq6RzKs14xrA,718
|
394
|
+
streamlit/static/static/js/index.Bfm4YOP_.js,sha256=5tqoZTJKxTxLVelJulNOtD656_JmNZPRH9Ci0Of1-wY,7623
|
395
|
+
streamlit/static/static/js/index.C89_PWNN.js,sha256=OkzQfqXXpOr46JnB1_WLcNwhXHhIgE42vN__RKSAIo0,19017
|
396
|
+
streamlit/static/static/js/index.CC65c-T9.js,sha256=fmUG8OxzAEXXvEn5uGBQPa55rxUd4f4Ol-B-6CQ0soQ,24380
|
397
|
+
streamlit/static/static/js/index.CNictWM2.js,sha256=8TbTovQutFrpChzdH7m-erd679SC0T2caXtaKz4DT5k,12037
|
398
|
+
streamlit/static/static/js/index.CVScnAor.js,sha256=Av3w5lUvW85i0R6kyuddMZ-MOuPj-i1PIO_HOw-X40c,2044
|
399
|
+
streamlit/static/static/js/index.CW6Jh2uG.js,sha256=7IO_9adUd57WoF3WCMeXq1oNYUt0SLctl_ICN0m7lsI,22557
|
400
|
+
streamlit/static/static/js/index.CfxnI87h.js,sha256=4dTMAuwM--2kaBpKrJhJBtEne9NrDZeRAKwhC_iBHa4,443
|
401
|
+
streamlit/static/static/js/index.CmT6dLLy.js,sha256=VoCA9r205g-wVqe8c91G_W31GO1hjuNkoH5igqwr7EI,2432
|
402
|
+
streamlit/static/static/js/index.CnEhB-fE.js,sha256=58-N0gY1QTzy8nSz45tXHOeIMp6GVi1v4qhkExU2ayg,6829749
|
403
|
+
streamlit/static/static/js/index.CxREAMVk.js,sha256=Ns0_EVaV8Y4UYTlDcnmzJxG1rcvtcBsbyCGNi6O3mLE,434809
|
404
|
+
streamlit/static/static/js/index.DMl1udgs.js,sha256=aEoz2aFV6atedeagh830UuBFVUG9vf34wtgxaE9hF_k,4692504
|
405
|
+
streamlit/static/static/js/index.DlKg7FR2.js,sha256=RE0dIKaIQX8am_YIfP8lu4HQP_FVE2j9ekvf2Pcb3Cg,583
|
406
|
+
streamlit/static/static/js/index.DtkU_G3Z.js,sha256=eBx9kN6FoJ1-G-kV3qHFUbAu0GD9CJqOwRmjnBHJWw4,2396
|
407
|
+
streamlit/static/static/js/index.Dv1t4-PM.js,sha256=SNJKO5CoAG4x-0J55W0fBkrKjEtoaVNbH7KVZXTXPn4,9077
|
408
|
+
streamlit/static/static/js/index.IROfSyE9.js,sha256=RcWRWmd7zk8jACixPxLlV0LhSFfGvQgkdQCPm8lqzkM,1612
|
409
|
+
streamlit/static/static/js/index.ZmGLVwWD.js,sha256=L4MGy-BGmzsVKPE1YmpTFmUy7rmp3rC3PTCX_joesiY,890
|
410
|
+
streamlit/static/static/js/index.e6kwCR7s.js,sha256=o9O0Gv7303yXzQJBAsoBeidzMysooT9arlfOd4XltCU,617
|
411
|
+
streamlit/static/static/js/index.gBUUVGOM.js,sha256=HQgcEX_m802_9iPI3Zsv--icQiunL5FxpgOFS8Qb8oM,2837
|
412
|
+
streamlit/static/static/js/index.gI1I4ciB.js,sha256=nlOk2kqdj2IVmYRx9cBd5AaLlRbDZHG_y7ZdFFskuIU,2573
|
413
|
+
streamlit/static/static/js/index.ltG9E0Ez.js,sha256=-WPHjygv0bfzbPIlyU1sbAsXF1TSn0R9IcwfoH6yrnE,50259
|
414
|
+
streamlit/static/static/js/index.o5IBEZ9z.js,sha256=Whgps2WsgKAtt_tcSDKPT4qOOokSlTpPaO-XA1Lplt4,1571
|
417
415
|
streamlit/static/static/js/index.t--hEgTQ.js,sha256=x8bkF-D3ssO38DU9Rs19R_4n30Te6uzH9Vq8hVJ2EJ0,34982
|
418
|
-
streamlit/static/static/js/
|
416
|
+
streamlit/static/static/js/index.tTEmROeK.js,sha256=4lwL78NM6r4Smq_LXZoAT8dEfIN_qBntrC83bJM3NCc,852495
|
417
|
+
streamlit/static/static/js/index.zZel4nfV.js,sha256=PvikdMnDIwZLQNnaIp1gCX9z77m-EI2WgDQpXZ0Qtb4,128139
|
418
|
+
streamlit/static/static/js/input.BmYm0CET.js,sha256=YGiGKV0aDOl46_2KaCqVZf_fOLk5KB1AsH474bTIjE0,5244
|
419
419
|
streamlit/static/static/js/inputUtils.CQWz5UKz.js,sha256=-kt6oYYgvhFS0t0EV2qJE6f43GUao6rNeipUmv3RuV8,150
|
420
|
-
streamlit/static/static/js/memory.
|
421
|
-
streamlit/static/static/js/mergeWith.
|
422
|
-
streamlit/static/static/js/number-overlay-editor.
|
423
|
-
streamlit/static/static/js/possibleConstructorReturn.
|
424
|
-
streamlit/static/static/js/sandbox.
|
420
|
+
streamlit/static/static/js/memory.9cXtH-RQ.js,sha256=3OscqcpUUHX9TFCOV648t_InoStM6_LQGbKGvayeagw,3041
|
421
|
+
streamlit/static/static/js/mergeWith.OMNzEmuQ.js,sha256=H-S486l1T9LvZsOUmfc39OOZOrFJS0KxQzny2o4FuYs,198
|
422
|
+
streamlit/static/static/js/number-overlay-editor.nGsU-IsU.js,sha256=MM5nYw4AuHngvQ0_Zi3-X7_mI08ti6yGEULt3iX5a_A,16550
|
423
|
+
streamlit/static/static/js/possibleConstructorReturn.CKIaFpbd.js,sha256=sGrFW-ZFyLRmWATs3fXpsXu7RzqQ9nQn47HvCbnZtS0,1451
|
424
|
+
streamlit/static/static/js/sandbox.rqJvxxMI.js,sha256=iYYB7SMmO-_BpTNnWNJHdsZEuIy0U5IqewsOxWlEr5c,2960
|
425
425
|
streamlit/static/static/js/sprintf.D7DtBTRn.js,sha256=dLZEkTCGwWgkxMOITY-fqjbGVuUO9nFw7MwCANBdisk,3434
|
426
|
-
streamlit/static/static/js/textarea.
|
426
|
+
streamlit/static/static/js/textarea.B4MNRqGE.js,sha256=blHI9fgUS6L6bv6E9kbA0Dh3q_MSd0AbCAapg7fFNlk,5761
|
427
427
|
streamlit/static/static/js/threshold.DjX0wlsa.js,sha256=ToJ7upF_PGcC41-Cfe0gGTVgWb0yjhBbHTQrd4GD4gg,5693
|
428
|
-
streamlit/static/static/js/timepicker.
|
428
|
+
streamlit/static/static/js/timepicker.BKET0TV7.js,sha256=evG8nWHLFsKeuknbla2qfF574MslNYAK9fqPlZpYm0Q,89416
|
429
429
|
streamlit/static/static/js/timer.CAwTRJ_g.js,sha256=aNjItH3iW2RuvnLaZ54iUi50rhEiW93-1Rel2EyaRlQ,7408
|
430
|
-
streamlit/static/static/js/toConsumableArray.
|
431
|
-
streamlit/static/static/js/uniqueId.
|
432
|
-
streamlit/static/static/js/useBasicWidgetState.
|
433
|
-
streamlit/static/static/js/useOnInputChange.
|
430
|
+
streamlit/static/static/js/toConsumableArray.BV-SUrrM.js,sha256=0Hw8MTrfLUXzTU-TXgXrAVhVTjkY0SwsqIErWzNuDHg,1587
|
431
|
+
streamlit/static/static/js/uniqueId.BmEYrlc2.js,sha256=aUIUEJ5Mmm79r8s1vNMqBNGODZY7tgneGETLmWRkg3g,190
|
432
|
+
streamlit/static/static/js/useBasicWidgetState.BctdjMds.js,sha256=onR6RrK8bQk65_wAMEa5WSdfedbBIMT4hqkFVZ_Ni-w,960
|
433
|
+
streamlit/static/static/js/useOnInputChange.BJkQTmTx.js,sha256=7TJ0pj-a0EDQVyGiN6yz4JFgcfacPYbgDsfCoN1csjM,587
|
434
434
|
streamlit/static/static/js/value.CgPGBV_l.js,sha256=7g4Owjf_hP16pkcLYPvARUlzIjBgl9APVNw2hnHYtWY,15042
|
435
|
-
streamlit/static/static/js/withFullScreenWrapper.
|
435
|
+
streamlit/static/static/js/withFullScreenWrapper.Bgp3yFiP.js,sha256=hwY--XBhU3uiYVJEp1G2s5zgph3xEO6xV0Fm3wtKdEI,1528
|
436
436
|
streamlit/static/static/media/KaTeX_AMS-Regular.BQhdFMY1.woff2,sha256=DN04fJWQoan5eUVgAi27WWVKfYbxh6oMgUla1C06cwg,28076
|
437
437
|
streamlit/static/static/media/KaTeX_AMS-Regular.DMm9YOAa.woff,sha256=MNqR6EyJP4deJSaJ-uvcWQsocRReitx_mp1NvYzgslE,33516
|
438
438
|
streamlit/static/static/media/KaTeX_AMS-Regular.DRggAlZN.ttf,sha256=aFNIQLz90r_7bw6N60hoTdAefwTqKBMmdXevuQbeHRM,63632
|
@@ -556,9 +556,9 @@ streamlit/web/server/server_util.py,sha256=JXtdozKzvDP4dfqlV73PMDxSqhtRokpDpEFvt
|
|
556
556
|
streamlit/web/server/stats_request_handler.py,sha256=vMRWGfqItfI6OaqVyo3LIX3HjQ-OB6Y-LHOXPiihlGY,3641
|
557
557
|
streamlit/web/server/upload_file_request_handler.py,sha256=NvjQpUt7HWi5DE08tLig_UWevKcC7nA7PFOJ-aSkxwk,5033
|
558
558
|
streamlit/web/server/websocket_headers.py,sha256=FCzUc-829kNY5hgy2wGNZT0k4XgCw_nlLCdnb7pnNO4,2232
|
559
|
-
streamlit_nightly-1.44.2.
|
560
|
-
streamlit_nightly-1.44.2.
|
561
|
-
streamlit_nightly-1.44.2.
|
562
|
-
streamlit_nightly-1.44.2.
|
563
|
-
streamlit_nightly-1.44.2.
|
564
|
-
streamlit_nightly-1.44.2.
|
559
|
+
streamlit_nightly-1.44.2.dev20250417.data/scripts/streamlit.cmd,sha256=k9768SaQCkiYAPaTp7JtkhAHEHflNQfu6fAM4pri6zo,676
|
560
|
+
streamlit_nightly-1.44.2.dev20250417.dist-info/METADATA,sha256=uYLoLozrE7AauDFD9o8G0tfZn_j5C8G8M2AmD3WGoto,8933
|
561
|
+
streamlit_nightly-1.44.2.dev20250417.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
562
|
+
streamlit_nightly-1.44.2.dev20250417.dist-info/entry_points.txt,sha256=uNJ4DwGNXEhOK0USwSNanjkYyR-Bk7eYQbJFDrWyOgY,53
|
563
|
+
streamlit_nightly-1.44.2.dev20250417.dist-info/top_level.txt,sha256=V3FhKbm7G2LnR0s4SytavrjIPNIhvcsAGXfYHAwtQzw,10
|
564
|
+
streamlit_nightly-1.44.2.dev20250417.dist-info/RECORD,,
|
@@ -1 +0,0 @@
|
|
1
|
-
import{r as y,E as T,_ as O,n as I,J as K,C as P,j as f,bu as Y,ba as A,bp as Z,b5 as ee,bo as j,bB as z,d as te,g as re,aL as ie,z as ae,bC as ne,bD as oe,bE as se,R as le,l as de,aA as ce,M as x,bl as ue,bk as pe,br as he,bF as fe,bs as ge,bt as me,F as ve}from"./index.B1VulLzc.js";import{a as V}from"./index.t--hEgTQ.js";import{F as Se}from"./FormClearHelper.D-LphorD.js";import{U as L}from"./UploadFileInfo.C-jY39rj.js";import{P as ye,S as be}from"./ProgressBar.B4UgMGDS.js";var N=y.forwardRef(function(t,l){var r={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return y.createElement(T,O({iconAttrs:r,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},t,{ref:l}),y.createElement("path",{d:"M.5 1c-.28 0-.5.23-.5.5v4c0 .28.23.5.5.5h5c.28 0 .5-.22.5-.5V4l1 1h1V2H7L6 3V1.5c0-.28-.22-.5-.5-.5h-5z"}))});N.displayName="Video";var D=y.forwardRef(function(t,l){var r={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return y.createElement(T,O({iconAttrs:r,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},t,{ref:l}),y.createElement("path",{d:"M1.41 0L0 1.41l.72.72L2.5 3.94.72 5.72 0 6.41l1.41 1.44.72-.72 1.81-1.81 1.78 1.81.69.72 1.44-1.44-.72-.69-1.81-1.78 1.81-1.81.72-.72L6.41 0l-.69.72L3.94 2.5 2.13.72 1.41 0z"}))});D.displayName="X";var H=y.forwardRef(function(t,l){var r={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return y.createElement(T,O({iconAttrs:r,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:l}),y.createElement("rect",{width:24,height:24,fill:"none"}),y.createElement("path",{d:"M20 5h-3.17l-1.24-1.35A1.99 1.99 0 0014.12 3H9.88c-.56 0-1.1.24-1.48.65L7.17 5H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm-1.35 8.35l-2.79 2.79c-.32.32-.86.1-.86-.35v-1.75H9v1.75c0 .45-.54.67-.85.35l-2.79-2.79c-.2-.2-.2-.51 0-.71l2.79-2.79a.5.5 0 01.85.36v1.83h6v-1.83c0-.45.54-.67.85-.35l2.79 2.79c.2.19.2.51.01.7z"}))});H.displayName="SwitchCamera";var k;(function(t){t.XSMALL="xsmall",t.SMALL="small",t.MEDIUM="medium",t.LARGE="large"})(k||(k={}));function Me(t,l){switch(t){case"xsmall":return{padding:`${l.spacing.twoXS} ${l.spacing.sm}`,fontSize:l.fontSizes.sm};case"small":return{padding:`${l.spacing.twoXS} ${l.spacing.md}`};case"large":return{padding:`${l.spacing.md} ${l.spacing.md}`};default:return{padding:`${l.spacing.xs} ${l.spacing.md}`}}}const G=I("div",{target:"e47j7ja0"})({position:"relative",overflow:"hidden",width:"100%",objectFit:"contain"}),W=I("div",{target:"e47j7ja1"})(({theme:t,width:l})=>({backgroundColor:t.colors.secondaryBg,borderRadius:`${t.radii.default} ${t.radii.default} 0 0`,width:"100%",height:l*9/16,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"})),we=I("p",{target:"e47j7ja2"})(({theme:t})=>({marginTop:t.spacing.sm,textAlign:"center"})),Ce=I("img",{target:"e47j7ja3"})(({theme:t,opacity:l})=>({borderRadius:`${t.radii.default} ${t.radii.default} 0 0`,objectFit:"contain",opacity:l})),Ue=I("a",{target:"e47j7ja4"})(({theme:t})=>({color:t.colors.primary,display:"block",textDecoration:"none"})),Ie=I("span",{target:"e47j7ja5"})({display:"flex",alignItems:"center"}),Ee=I("div",{target:"e47j7ja6"})(({theme:t})=>({position:"absolute",top:t.spacing.lg,right:t.spacing.lg,zIndex:t.zIndices.priority,color:t.colors.fadedText40,mixBlendMode:"difference",opacity:.6})),Fe=I("div",{target:"e47j7ja8"})({height:"fit-content",width:"100%",position:"absolute",bottom:0}),Pe=I("button",{target:"e47j7ja9"})(({theme:t})=>({position:"relative",display:"inline-flex",flexDirection:"column",alignItems:"center",justifyContent:"center",backgroundColor:t.colors.lightenedBg05,border:`${t.sizes.borderWidth} solid ${t.colors.borderColor}`,borderRadius:`0 0 ${t.radii.default} ${t.radii.default}`,"&:hover":{borderColor:t.colors.primary,color:t.colors.primary},"&:active":{color:t.colors.white,borderColor:t.colors.primary,backgroundColor:t.colors.primary},"&:focus:not(:active)":{borderColor:t.colors.primary,color:t.colors.primary},"&:disabled, &:disabled:hover, &:disabled:active":{color:t.colors.fadedText40},fontWeight:t.fontWeights.normal,padding:`${t.spacing.xs} ${t.spacing.md}`,margin:t.spacing.none,lineHeight:t.lineHeights.base,color:"inherit",width:"100%",userSelect:"none","&:focus":{outline:"none"},"&:focus-visible":{boxShadow:`0 0 0 0.2rem ${K(t.colors.primary,.5)}`},...Me("medium",t)}));function Re({disabled:t,onClick:l,children:r,progress:n}){return P(Pe,{disabled:t||!1,onClick:l||(()=>{}),progress:n||null,"data-testid":"stCameraInputButton",children:[r,n?f(Fe,{children:f(ye,{value:n,size:be.EXTRASMALL,overrides:{Bar:{style:{borderTopLeftRadius:0,borderTopRightRadius:0}},BarProgress:{style:{borderTopLeftRadius:0,borderTopRightRadius:0}},BarContainer:{style:{borderTopLeftRadius:0,borderTopRightRadius:0}}}})}):null]})}const q=y.memo(Re);var F;(function(t){t.USER="user",t.ENVIRONMENT="environment"})(F||(F={}));const xe=({switchFacingMode:t})=>f(Ee,{"data-testid":"stCameraInputSwitchButton",children:f(Y,{content:"Switch camera",placement:A.TOP_RIGHT,children:f(Z,{kind:ee.MINIMAL,onClick:t,children:f(j,{content:H,size:"twoXL",color:z.white})})})}),_e=y.memo(xe);var _={exports:{}},Te=_.exports,B;function Oe(){return B||(B=1,function(t,l){(function(n,a){t.exports=a(te())})(Te,function(r){return function(n){var a={};function o(s){if(a[s])return a[s].exports;var p=a[s]={i:s,l:!1,exports:{}};return n[s].call(p.exports,p,p.exports,o),p.l=!0,p.exports}return o.m=n,o.c=a,o.d=function(s,p,g){o.o(s,p)||Object.defineProperty(s,p,{enumerable:!0,get:g})},o.r=function(s){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})},o.t=function(s,p){if(p&1&&(s=o(s)),p&8||p&4&&typeof s=="object"&&s&&s.__esModule)return s;var g=Object.create(null);if(o.r(g),Object.defineProperty(g,"default",{enumerable:!0,value:s}),p&2&&typeof s!="string")for(var U in s)o.d(g,U,(function(C){return s[C]}).bind(null,U));return g},o.n=function(s){var p=s&&s.__esModule?function(){return s.default}:function(){return s};return o.d(p,"a",p),p},o.o=function(s,p){return Object.prototype.hasOwnProperty.call(s,p)},o.p="",o(o.s="./src/react-webcam.tsx")}({"./src/react-webcam.tsx":function(n,a,o){o.r(a);var s=o("react"),p=function(){var m=function(u,e){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,d){i.__proto__=d}||function(i,d){for(var c in d)d.hasOwnProperty(c)&&(i[c]=d[c])},m(u,e)};return function(u,e){m(u,e);function i(){this.constructor=u}u.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)}}(),g=function(){return g=Object.assign||function(m){for(var u,e=1,i=arguments.length;e<i;e++){u=arguments[e];for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(m[d]=u[d])}return m},g.apply(this,arguments)},U=function(m,u){var e={};for(var i in m)Object.prototype.hasOwnProperty.call(m,i)&&u.indexOf(i)<0&&(e[i]=m[i]);if(m!=null&&typeof Object.getOwnPropertySymbols=="function")for(var d=0,i=Object.getOwnPropertySymbols(m);d<i.length;d++)u.indexOf(i[d])<0&&Object.prototype.propertyIsEnumerable.call(m,i[d])&&(e[i[d]]=m[i[d]]);return e};(function(){typeof window>"u"||(navigator.mediaDevices===void 0&&(navigator.mediaDevices={}),navigator.mediaDevices.getUserMedia===void 0&&(navigator.mediaDevices.getUserMedia=function(u){var e=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia;return e?new Promise(function(i,d){e.call(navigator,u,i,d)}):Promise.reject(new Error("getUserMedia is not implemented in this browser"))}))})();function C(){return!!(navigator.mediaDevices&&navigator.mediaDevices.getUserMedia)}var E=function(m){p(u,m);function u(e){var i=m.call(this,e)||this;return i.canvas=null,i.ctx=null,i.requestUserMediaId=0,i.unmounted=!1,i.state={hasUserMedia:!1},i}return u.prototype.componentDidMount=function(){var e=this,i=e.state,d=e.props;if(this.unmounted=!1,!C()){d.onUserMediaError("getUserMedia not supported");return}i.hasUserMedia||this.requestUserMedia(),d.children&&typeof d.children!="function"&&console.warn("children must be a function")},u.prototype.componentDidUpdate=function(e){var i=this.props;if(!C()){i.onUserMediaError("getUserMedia not supported");return}var d=JSON.stringify(e.audioConstraints)!==JSON.stringify(i.audioConstraints),c=JSON.stringify(e.videoConstraints)!==JSON.stringify(i.videoConstraints),M=e.minScreenshotWidth!==i.minScreenshotWidth,S=e.minScreenshotHeight!==i.minScreenshotHeight;(c||M||S)&&(this.canvas=null,this.ctx=null),(d||c)&&(this.stopAndCleanup(),this.requestUserMedia())},u.prototype.componentWillUnmount=function(){this.unmounted=!0,this.stopAndCleanup()},u.stopMediaStream=function(e){e&&(e.getVideoTracks&&e.getAudioTracks?(e.getVideoTracks().map(function(i){e.removeTrack(i),i.stop()}),e.getAudioTracks().map(function(i){e.removeTrack(i),i.stop()})):e.stop())},u.prototype.stopAndCleanup=function(){var e=this.state;e.hasUserMedia&&(u.stopMediaStream(this.stream),e.src&&window.URL.revokeObjectURL(e.src))},u.prototype.getScreenshot=function(e){var i=this,d=i.state,c=i.props;if(!d.hasUserMedia)return null;var M=this.getCanvas(e);return M&&M.toDataURL(c.screenshotFormat,c.screenshotQuality)},u.prototype.getCanvas=function(e){var i=this,d=i.state,c=i.props;if(!this.video||!d.hasUserMedia||!this.video.videoHeight)return null;if(!this.ctx){var M=this.video.videoWidth,S=this.video.videoHeight;if(!this.props.forceScreenshotSourceSize){var v=M/S;M=c.minScreenshotWidth||this.video.clientWidth,S=M/v,c.minScreenshotHeight&&S<c.minScreenshotHeight&&(S=c.minScreenshotHeight,M=S*v)}this.canvas=document.createElement("canvas"),this.canvas.width=(e==null?void 0:e.width)||M,this.canvas.height=(e==null?void 0:e.height)||S,this.ctx=this.canvas.getContext("2d")}var w=this,b=w.ctx,h=w.canvas;return b&&h&&(h.width=(e==null?void 0:e.width)||h.width,h.height=(e==null?void 0:e.height)||h.height,c.mirrored&&(b.translate(h.width,0),b.scale(-1,1)),b.imageSmoothingEnabled=c.imageSmoothing,b.drawImage(this.video,0,0,(e==null?void 0:e.width)||h.width,(e==null?void 0:e.height)||h.height),c.mirrored&&(b.scale(-1,1),b.translate(-h.width,0))),h},u.prototype.requestUserMedia=function(){var e=this,i=this.props,d=function(S,v){var w={video:typeof v<"u"?v:!0};i.audio&&(w.audio=typeof S<"u"?S:!0),e.requestUserMediaId++;var b=e.requestUserMediaId;navigator.mediaDevices.getUserMedia(w).then(function(h){e.unmounted||b!==e.requestUserMediaId?u.stopMediaStream(h):e.handleUserMedia(null,h)}).catch(function(h){e.handleUserMedia(h)})};if("mediaDevices"in navigator)d(i.audioConstraints,i.videoConstraints);else{var c=function(S){return{optional:[{sourceId:S}]}},M=function(S){var v=S.deviceId;return typeof v=="string"?v:Array.isArray(v)&&v.length>0?v[0]:typeof v=="object"&&v.ideal?v.ideal:null};MediaStreamTrack.getSources(function(S){var v=null,w=null;S.forEach(function(R){R.kind==="audio"?v=R.id:R.kind==="video"&&(w=R.id)});var b=M(i.audioConstraints);b&&(v=b);var h=M(i.videoConstraints);h&&(w=h),d(c(v),c(w))})}},u.prototype.handleUserMedia=function(e,i){var d=this.props;if(e||!i){this.setState({hasUserMedia:!1}),d.onUserMediaError(e);return}this.stream=i;try{this.video&&(this.video.srcObject=i),this.setState({hasUserMedia:!0})}catch{this.setState({hasUserMedia:!0,src:window.URL.createObjectURL(i)})}d.onUserMedia(i)},u.prototype.render=function(){var e=this,i=this,d=i.state,c=i.props,M=c.audio;c.forceScreenshotSourceSize;var S=c.disablePictureInPicture;c.onUserMedia,c.onUserMediaError,c.screenshotFormat,c.screenshotQuality,c.minScreenshotWidth,c.minScreenshotHeight,c.audioConstraints,c.videoConstraints,c.imageSmoothing;var v=c.mirrored,w=c.style,b=w===void 0?{}:w,h=c.children,R=U(c,["audio","forceScreenshotSourceSize","disablePictureInPicture","onUserMedia","onUserMediaError","screenshotFormat","screenshotQuality","minScreenshotWidth","minScreenshotHeight","audioConstraints","videoConstraints","imageSmoothing","mirrored","style","children"]),X=v?g(g({},b),{transform:(b.transform||"")+" scaleX(-1)"}):b,J={getScreenshot:this.getScreenshot.bind(this)};return s.createElement(s.Fragment,null,s.createElement("video",g({autoPlay:!0,disablePictureInPicture:S,src:d.src,muted:!M,playsInline:!0,ref:function(Q){e.video=Q},style:X},R)),h&&h(J))},u.defaultProps={audio:!1,disablePictureInPicture:!1,forceScreenshotSourceSize:!1,imageSmoothing:!0,mirrored:!1,onUserMedia:function(){},onUserMediaError:function(){},screenshotFormat:"image/webp",screenshotQuality:.92},u}(s.Component);a.default=E},react:function(n,a){n.exports=r}}).default})}(_)),_.exports}var je=Oe();const We=re(je);var $;(function(t){t.PENDING="pending",t.SUCCESS="success",t.ERROR="error"})($||($={}));const Ve=({width:t})=>P(W,{width:t,children:[f(j,{size:"threeXL",color:z.gray60,content:N}),P(we,{children:["This app would like to use your camera.",f(Ue,{href:oe,rel:"noopener noreferrer",target:"_blank",children:"Learn how to allow access."})]})]}),Le=({handleCapture:t,width:l,disabled:r,clearPhotoInProgress:n,setClearPhotoInProgress:a,facingMode:o,setFacingMode:s,testOverride:p})=>{const[g,U]=y.useState(p||"pending"),C=y.useRef(null),[E,m]=y.useState(l),u=y.useCallback(ie(1e3,m),[]);y.useEffect(()=>{u(l)},[l,u]);function e(){if(C.current!==null){const d=C.current.getScreenshot();t(d)}}const i=ae();return P(G,{"data-testid":"stCameraInputWebcamComponent",children:[g!=="success"&&!r&&!n?f(Ve,{width:E}):ne.isMobile&&f(_e,{switchFacingMode:s}),f(W,{"data-testid":"stCameraInputWebcamStyledBox",hidden:g!=="success"&&!r&&!n,width:E,children:!r&&f(We,{audio:!1,ref:C,screenshotFormat:"image/jpeg",screenshotQuality:1,width:E,height:E*9/16,style:{borderRadius:`${i.radii.default} ${i.radii.default} 0 0`},onUserMediaError:()=>{U("error")},onUserMedia:()=>{U("success"),a(!1)},videoConstraints:{width:{ideal:E},facingMode:o}})}),f(q,{onClick:e,disabled:g!=="success"||r||n,children:"Take Photo"})]})},ke=y.memo(Le),Be=150,$e=de.getLogger("CameraInput");class Ae extends le.PureComponent{constructor(l){super(l),this.localFileIdCounter=1,this.RESTORED_FROM_WIDGET_STRING="RESTORED_FROM_WIDGET",this.formClearHelper=new Se,this.getProgress=()=>{if(this.state.files.length>0&&this.state.files[this.state.files.length-1].status.type==="uploading")return this.state.files[this.state.files.length-1].status.progress},this.setClearPhotoInProgress=r=>{this.setState({clearPhotoInProgress:r})},this.setFacingMode=()=>{this.setState(r=>({facingMode:r.facingMode===F.USER?F.ENVIRONMENT:F.USER}))},this.handleCapture=r=>{if(r===null)return Promise.resolve();this.setState({imgSrc:r,shutter:!0,minShutterEffectPassed:!1});const n=a=>new Promise(o=>setTimeout(o,a));return ze(r,`camera-input-${new Date().toISOString().replace(/:/g,"_")}.jpg`).then(a=>this.props.uploadClient.fetchFileURLs([a]).then(o=>({file:a,fileUrls:o[0]}))).then(({file:a,fileUrls:o})=>this.uploadFile(o,a)).then(()=>n(Be)).then(()=>{this.setState((a,o)=>({imgSrc:r,shutter:a.shutter,minShutterEffectPassed:!0}))}).catch(a=>{$e.error(a)})},this.removeCapture=()=>{this.state.files.length!==0&&(this.state.files.forEach(r=>this.deleteFile(r.id)),this.setState({imgSrc:null,clearPhotoInProgress:!0}))},this.componentDidUpdate=()=>{if(this.status!=="ready")return;const r=this.createWidgetValue(),{element:n,widgetMgr:a,fragmentId:o}=this.props,s=a.getFileUploaderStateValue(n);ce(r,s)||a.setFileUploaderStateValue(n,r,{fromUi:!0},o)},this.onFormCleared=()=>{this.setState({files:[]},()=>{const r=this.createWidgetValue();if(x(r))return;this.setState({imgSrc:null});const{widgetMgr:n,element:a,fragmentId:o}=this.props;n.setFileUploaderStateValue(a,r,{fromUi:!0},o)})},this.deleteFile=r=>{const n=this.getFile(r);x(n)||(n.status.type==="uploading"&&n.status.cancelToken.cancel(),n.status.type==="uploaded"&&n.status.fileUrls.deleteUrl&&this.props.uploadClient.deleteFile(n.status.fileUrls.deleteUrl),this.removeFile(r))},this.addFile=r=>{this.setState(n=>({files:[...n.files,r]}))},this.removeFile=r=>{this.setState(n=>({files:n.files.filter(a=>a.id!==r)}))},this.getFile=r=>this.state.files.find(n=>n.id===r),this.updateFile=(r,n)=>{this.setState(a=>({files:a.files.map(o=>o.id===r?n:o)}))},this.onUploadComplete=(r,n)=>{this.setState(()=>({shutter:!1}));const a=this.getFile(r);x(a)||a.status.type!=="uploading"||this.updateFile(a.id,a.setStatus({type:"uploaded",fileId:n.fileId,fileUrls:n}))},this.onUploadProgress=(r,n)=>{const a=this.getFile(n);if(x(a)||a.status.type!=="uploading")return;const o=Math.round(r.loaded*100/r.total);a.status.progress!==o&&this.updateFile(n,a.setStatus({type:"uploading",cancelToken:a.status.cancelToken,progress:o}))},this.reset=()=>{this.setState({files:[],imgSrc:null})},this.uploadFile=(r,n)=>{const a=V.CancelToken.source(),o=new L(n.name,n.size,this.nextLocalFileId(),{type:"uploading",cancelToken:a,progress:1});this.addFile(o),this.props.uploadClient.uploadFile(this.props.element,r.uploadUrl,n,s=>this.onUploadProgress(s,o.id),a.token).then(()=>this.onUploadComplete(o.id,r)).catch(s=>{V.isCancel(s)||this.updateFile(o.id,o.setStatus({type:"error",errorMessage:s?s.toString():"Unknown error"}))})},this.state=this.initialValue}get initialValue(){const l={files:[],imgSrc:null,shutter:!1,minShutterEffectPassed:!0,clearPhotoInProgress:!1,facingMode:F.USER},{widgetMgr:r,element:n}=this.props,a=r.getFileUploaderStateValue(n);if(x(a))return l;const{uploadedFileInfo:o}=a;return x(o)||o.length===0?l:{files:o.map(s=>{const p=s.name,g=s.size,U=s.fileId,C=s.fileUrls;return new L(p,g,this.nextLocalFileId(),{type:"uploaded",fileId:U,fileUrls:C})}),imgSrc:o.length===0?"":this.RESTORED_FROM_WIDGET_STRING,shutter:!1,minShutterEffectPassed:!1,clearPhotoInProgress:!1,facingMode:F.USER}}componentWillUnmount(){this.formClearHelper.disconnect()}get status(){const l=r=>r.status.type==="uploading";return this.state.files.some(l)?"updating":"ready"}componentDidMount(){const l=this.createWidgetValue(),{element:r,widgetMgr:n,fragmentId:a}=this.props;n.getFileUploaderStateValue(r)===void 0&&n.setFileUploaderStateValue(r,l,{fromUi:!1},a)}createWidgetValue(){const l=this.state.files.filter(r=>r.status.type==="uploaded").map(r=>{const{name:n,size:a,status:o}=r;return new ue({fileId:o.fileId,fileUrls:o.fileUrls,name:n,size:a})});return new pe({uploadedFileInfo:l})}render(){var o;const{element:l,widgetMgr:r,disabled:n,width:a}=this.props;return this.formClearHelper.manageFormClearListener(r,l.formId,this.onFormCleared),P(G,{className:"stCameraInput","data-testid":"stCameraInput",children:[f(me,{label:l.label,disabled:n,labelVisibility:he((o=l.labelVisibility)==null?void 0:o.value),children:l.help&&f(fe,{children:f(ge,{content:l.help,placement:A.TOP_RIGHT})})}),this.state.imgSrc?P(ve,{children:[f(W,{width:a,children:this.state.imgSrc!==this.RESTORED_FROM_WIDGET_STRING&&f(Ce,{src:this.state.imgSrc,alt:"Snapshot",opacity:this.state.shutter||!this.state.minShutterEffectPassed?"50%":"100%",width:a,height:a*9/16})}),f(q,{onClick:this.removeCapture,progress:this.getProgress(),disabled:!!this.getProgress()||n,children:this.getProgress()?"Uploading...":P(Ie,{children:[f(j,{content:D,margin:"0 xs 0 0",size:"sm"})," Clear photo"]})})]}):f(ke,{handleCapture:this.handleCapture,width:a,disabled:n,clearPhotoInProgress:this.state.clearPhotoInProgress,setClearPhotoInProgress:this.setClearPhotoInProgress,facingMode:this.state.facingMode,setFacingMode:this.setFacingMode,testOverride:this.props.testOverride})]})}nextLocalFileId(){return this.localFileIdCounter++}}function ze(t,l){return fetch(t).then(r=>r.arrayBuffer()).then(r=>new File([r],l,{type:"image/jpeg"}))}const Xe=se(Ae);export{Xe as default};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{n as T,r,z as M,c1 as W,c2 as C,C as I,j as l,br as V,bF as O,bs as L,ba as N,bt as P,c0 as k,c3 as E,bY as $,c4 as A,bC as B}from"./index.B1VulLzc.js";import{a as F}from"./useBasicWidgetState.BGHxUZDu.js";import"./FormClearHelper.D-LphorD.js";const H=T("div",{target:"euzcfsp0"})(({theme:s})=>({"span[aria-disabled='true']":{background:s.colors.fadedText05}})),D=(s,t)=>s.getStringArrayValue(t),U=s=>s.default.map(t=>s.options[t])??null,j=s=>s.rawValues??null,G=(s,t,n,p)=>{t.setStringArrayValue(s,n.value,{fromUi:n.fromUi},p)},K=s=>{var S;const{element:t,widgetMgr:n,fragmentId:p}=s,e=M(),[i,m]=F({getStateFromWidgetMgr:D,getDefaultStateFromProto:U,getCurrStateFromProto:j,updateWidgetMgrState:G,element:t,widgetMgr:n,fragmentId:p}),h=t.maxSelections>0&&i.length>=t.maxSelections,f=r.useMemo(()=>{if(t.maxSelections===0)return"No results";if(i.length===t.maxSelections){const o=t.maxSelections!==1?"options":"option";return`You can only select up to ${t.maxSelections} ${o}. Remove an option first.`}return"No results"},[t.maxSelections,i.length]),y=r.useMemo(()=>i.map(o=>({value:o,label:o})),[i]),b=r.useCallback(o=>{var c,d;switch(o.type){case"remove":return W(i,(c=o.option)==null?void 0:c.value);case"clear":return[];case"select":return i.concat([(d=o.option)==null?void 0:d.value]);default:throw new Error(`State transition is unknown: ${o.type}`)}},[i]),v=r.useCallback(o=>{t.maxSelections&&o.type==="select"&&i.length>=t.maxSelections||m({value:b(o),fromUi:!0})},[t.maxSelections,b,m,i.length]),x=r.useCallback((o,c)=>{if(h)return[];const d=o.filter(R=>!i.includes(R.value));return C(d,c)},[h,i]),{options:u}=t;let a=s.disabled,g=t.placeholder;u.length===0&&(t.acceptNewOptions?g="Add options":(g="No options to select",a=!0));const z=u.map(o=>({label:o,value:o})),w=u.length>10;return I("div",{className:"stMultiSelect","data-testid":"stMultiSelect",children:[l(P,{label:t.label,disabled:a,labelVisibility:V((S=t.labelVisibility)==null?void 0:S.value),children:t.help&&l(O,{children:l(L,{content:t.help,placement:N.TOP_RIGHT})})}),l(H,{children:l(k,{creatable:t.acceptNewOptions??!1,options:z,labelKey:"label",valueKey:"value","aria-label":t.label,placeholder:g,type:A.select,multi:!0,onChange:v,value:y,disabled:a,size:"compact",noResultsMsg:f,filterOptions:x,closeOnSelect:!1,overrides:{Popover:{props:{overrides:{Body:{style:()=>({marginTop:e.spacing.px})}}}},SelectArrow:{component:$,props:{overrides:{Svg:{style:()=>({width:e.iconSizes.xl,height:e.iconSizes.xl})}}}},IconsContainer:{style:()=>({paddingRight:e.spacing.sm})},ControlContainer:{style:{minHeight:e.sizes.minElementHeight,borderLeftWidth:e.sizes.borderWidth,borderRightWidth:e.sizes.borderWidth,borderTopWidth:e.sizes.borderWidth,borderBottomWidth:e.sizes.borderWidth}},Placeholder:{style:()=>({flex:"inherit",color:a?e.colors.fadedText40:e.colors.fadedText60})},ValueContainer:{style:()=>({paddingLeft:e.spacing.sm,paddingTop:e.spacing.none,paddingBottom:e.spacing.none,paddingRight:e.spacing.none})},ClearIcon:{props:{overrides:{Svg:{style:{color:e.colors.darkGray,padding:e.spacing.threeXS,height:e.sizes.clearIconSize,width:e.sizes.clearIconSize,cursor:"pointer",":hover":{fill:e.colors.bodyText}}}}}},SearchIcon:{style:{color:e.colors.darkGray}},Tag:{props:{overrides:{Root:{style:{borderTopLeftRadius:e.radii.md,borderTopRightRadius:e.radii.md,borderBottomRightRadius:e.radii.md,borderBottomLeftRadius:e.radii.md,fontSize:e.fontSizes.md,paddingLeft:e.spacing.sm,marginLeft:e.spacing.none,marginRight:e.spacing.sm,height:`calc(${e.sizes.minElementHeight} - 2 * ${e.spacing.xs})`,maxWidth:`calc(100% - ${e.spacing.lg})`,cursor:"default !important"}},Action:{style:{paddingLeft:0}},ActionIcon:{props:{overrides:{Svg:{style:{width:"0.625em",height:"0.625em"}}}}}}}},MultiValue:{props:{overrides:{Root:{style:{fontSize:e.fontSizes.sm}}}}},Input:{props:{readOnly:B.isMobile&&w===!1?"readonly":null}},Dropdown:{component:E}}})})]})},q=r.memo(K);export{q as default};
|