streamlit-nightly 1.41.2.dev20250107__py2.py3-none-any.whl → 1.41.2.dev20250109__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/__init__.py +11 -2
- streamlit/__main__.py +1 -1
- streamlit/auth_util.py +209 -0
- streamlit/cli_util.py +1 -1
- streamlit/column_config.py +1 -1
- streamlit/commands/__init__.py +1 -1
- streamlit/commands/echo.py +1 -1
- streamlit/commands/execution_control.py +1 -1
- streamlit/commands/experimental_query_params.py +1 -1
- streamlit/commands/logo.py +1 -1
- streamlit/commands/navigation.py +1 -1
- streamlit/commands/page_config.py +1 -1
- streamlit/components/__init__.py +1 -1
- streamlit/components/lib/__init__.py +1 -1
- streamlit/components/lib/local_component_registry.py +1 -1
- streamlit/components/types/__init__.py +1 -1
- streamlit/components/types/base_component_registry.py +1 -1
- streamlit/components/types/base_custom_component.py +1 -1
- streamlit/components/v1/__init__.py +1 -1
- streamlit/components/v1/component_arrow.py +1 -1
- streamlit/components/v1/component_registry.py +1 -1
- streamlit/components/v1/components.py +1 -1
- streamlit/components/v1/custom_component.py +1 -1
- streamlit/config.py +1 -1
- streamlit/config_option.py +1 -1
- streamlit/config_util.py +1 -1
- streamlit/connections/__init__.py +1 -1
- streamlit/connections/base_connection.py +1 -1
- streamlit/connections/snowflake_connection.py +1 -1
- streamlit/connections/snowpark_connection.py +1 -1
- streamlit/connections/sql_connection.py +1 -1
- streamlit/connections/util.py +1 -1
- streamlit/cursor.py +1 -1
- streamlit/dataframe_util.py +1 -1
- streamlit/delta_generator.py +1 -1
- streamlit/delta_generator_singletons.py +1 -1
- streamlit/deprecation_util.py +1 -1
- streamlit/development.py +1 -1
- streamlit/elements/__init__.py +1 -1
- streamlit/elements/alert.py +1 -1
- streamlit/elements/arrow.py +1 -1
- streamlit/elements/balloons.py +1 -1
- streamlit/elements/bokeh_chart.py +1 -1
- streamlit/elements/code.py +1 -1
- streamlit/elements/deck_gl_json_chart.py +1 -1
- streamlit/elements/dialog_decorator.py +1 -1
- streamlit/elements/doc_string.py +1 -1
- streamlit/elements/empty.py +1 -1
- streamlit/elements/exception.py +1 -1
- streamlit/elements/form.py +1 -1
- streamlit/elements/graphviz_chart.py +1 -1
- streamlit/elements/heading.py +1 -1
- streamlit/elements/html.py +1 -1
- streamlit/elements/iframe.py +1 -1
- streamlit/elements/image.py +1 -1
- streamlit/elements/json.py +1 -1
- streamlit/elements/layouts.py +1 -1
- streamlit/elements/lib/__init__.py +1 -1
- streamlit/elements/lib/built_in_chart_utils.py +1 -1
- streamlit/elements/lib/color_util.py +1 -1
- streamlit/elements/lib/column_config_utils.py +1 -1
- streamlit/elements/lib/column_types.py +1 -1
- streamlit/elements/lib/dialog.py +1 -1
- streamlit/elements/lib/dicttools.py +1 -1
- streamlit/elements/lib/event_utils.py +1 -1
- streamlit/elements/lib/file_uploader_utils.py +1 -1
- streamlit/elements/lib/form_utils.py +1 -1
- streamlit/elements/lib/image_utils.py +1 -1
- streamlit/elements/lib/js_number.py +1 -1
- streamlit/elements/lib/mutable_status_container.py +1 -1
- streamlit/elements/lib/options_selector_utils.py +1 -1
- streamlit/elements/lib/pandas_styler_utils.py +1 -1
- streamlit/elements/lib/policies.py +1 -1
- streamlit/elements/lib/streamlit_plotly_theme.py +1 -1
- streamlit/elements/lib/subtitle_utils.py +1 -1
- streamlit/elements/lib/utils.py +1 -1
- streamlit/elements/map.py +1 -1
- streamlit/elements/markdown.py +1 -1
- streamlit/elements/media.py +1 -1
- streamlit/elements/metric.py +1 -1
- streamlit/elements/plotly_chart.py +1 -1
- streamlit/elements/progress.py +1 -1
- streamlit/elements/pyplot.py +1 -1
- streamlit/elements/snow.py +1 -1
- streamlit/elements/spinner.py +14 -7
- streamlit/elements/text.py +1 -1
- streamlit/elements/toast.py +1 -1
- streamlit/elements/vega_charts.py +1 -1
- streamlit/elements/widgets/__init__.py +1 -1
- streamlit/elements/widgets/audio_input.py +1 -1
- streamlit/elements/widgets/button.py +1 -1
- streamlit/elements/widgets/button_group.py +1 -1
- streamlit/elements/widgets/camera_input.py +1 -1
- streamlit/elements/widgets/chat.py +1 -1
- streamlit/elements/widgets/checkbox.py +1 -1
- streamlit/elements/widgets/color_picker.py +1 -1
- streamlit/elements/widgets/data_editor.py +1 -1
- streamlit/elements/widgets/file_uploader.py +1 -1
- streamlit/elements/widgets/multiselect.py +1 -1
- streamlit/elements/widgets/number_input.py +1 -1
- streamlit/elements/widgets/radio.py +1 -1
- streamlit/elements/widgets/select_slider.py +1 -1
- streamlit/elements/widgets/selectbox.py +1 -1
- streamlit/elements/widgets/slider.py +1 -1
- streamlit/elements/widgets/text_widgets.py +1 -1
- streamlit/elements/widgets/time_widgets.py +1 -1
- streamlit/elements/write.py +1 -1
- streamlit/emojis.py +1 -1
- streamlit/env_util.py +1 -1
- streamlit/error_util.py +1 -1
- streamlit/errors.py +5 -1
- streamlit/external/__init__.py +1 -1
- streamlit/external/langchain/__init__.py +1 -1
- streamlit/external/langchain/streamlit_callback_handler.py +1 -1
- streamlit/file_util.py +1 -1
- streamlit/git_util.py +1 -1
- streamlit/hello/__init__.py +1 -1
- streamlit/hello/animation_demo.py +1 -1
- streamlit/hello/dataframe_demo.py +1 -1
- streamlit/hello/hello.py +1 -1
- streamlit/hello/mapping_demo.py +1 -1
- streamlit/hello/plotting_demo.py +1 -1
- streamlit/hello/streamlit_app.py +1 -1
- streamlit/hello/utils.py +1 -1
- streamlit/logger.py +1 -1
- streamlit/material_icon_names.py +1 -1
- streamlit/navigation/__init__.py +1 -1
- streamlit/navigation/page.py +1 -1
- streamlit/net_util.py +1 -1
- streamlit/platform.py +1 -1
- streamlit/proto/Alert_pb2.pyi +1 -1
- streamlit/proto/AppPage_pb2.pyi +1 -1
- streamlit/proto/ArrowNamedDataSet_pb2.pyi +1 -1
- streamlit/proto/ArrowVegaLiteChart_pb2.pyi +1 -1
- streamlit/proto/Arrow_pb2.pyi +1 -1
- streamlit/proto/AudioInput_pb2.pyi +1 -1
- streamlit/proto/Audio_pb2.pyi +1 -1
- streamlit/proto/AuthRedirect_pb2.py +27 -0
- streamlit/proto/AuthRedirect_pb2.pyi +41 -0
- streamlit/proto/AutoRerun_pb2.pyi +1 -1
- streamlit/proto/BackMsg_pb2.pyi +1 -1
- streamlit/proto/Balloons_pb2.pyi +1 -1
- streamlit/proto/Block_pb2.pyi +1 -1
- streamlit/proto/BokehChart_pb2.pyi +1 -1
- streamlit/proto/ButtonGroup_pb2.pyi +1 -1
- streamlit/proto/Button_pb2.pyi +1 -1
- streamlit/proto/CameraInput_pb2.pyi +1 -1
- streamlit/proto/ChatInput_pb2.pyi +1 -1
- streamlit/proto/Checkbox_pb2.pyi +1 -1
- streamlit/proto/ClientState_pb2.pyi +1 -1
- streamlit/proto/Code_pb2.pyi +1 -1
- streamlit/proto/ColorPicker_pb2.pyi +1 -1
- streamlit/proto/Common_pb2.pyi +1 -1
- streamlit/proto/Components_pb2.pyi +1 -1
- streamlit/proto/DataFrame_pb2.pyi +1 -1
- streamlit/proto/DateInput_pb2.pyi +1 -1
- streamlit/proto/DeckGlJsonChart_pb2.pyi +1 -1
- streamlit/proto/Delta_pb2.pyi +1 -1
- streamlit/proto/DocString_pb2.pyi +1 -1
- streamlit/proto/DownloadButton_pb2.pyi +1 -1
- streamlit/proto/Element_pb2.pyi +1 -1
- streamlit/proto/Empty_pb2.pyi +1 -1
- streamlit/proto/Exception_pb2.pyi +1 -1
- streamlit/proto/Favicon_pb2.pyi +1 -1
- streamlit/proto/FileUploader_pb2.pyi +1 -1
- streamlit/proto/ForwardMsg_pb2.py +12 -9
- streamlit/proto/ForwardMsg_pb2.pyi +34 -4
- streamlit/proto/GitInfo_pb2.pyi +1 -1
- streamlit/proto/GraphVizChart_pb2.pyi +1 -1
- streamlit/proto/Heading_pb2.pyi +1 -1
- streamlit/proto/Html_pb2.pyi +1 -1
- streamlit/proto/IFrame_pb2.pyi +1 -1
- streamlit/proto/Image_pb2.pyi +1 -1
- streamlit/proto/Json_pb2.pyi +1 -1
- streamlit/proto/LabelVisibilityMessage_pb2.pyi +1 -1
- streamlit/proto/LinkButton_pb2.pyi +1 -1
- streamlit/proto/Logo_pb2.pyi +1 -1
- streamlit/proto/Markdown_pb2.pyi +1 -1
- streamlit/proto/Metric_pb2.pyi +1 -1
- streamlit/proto/MetricsEvent_pb2.pyi +1 -1
- streamlit/proto/MultiSelect_pb2.pyi +1 -1
- streamlit/proto/NamedDataSet_pb2.pyi +1 -1
- streamlit/proto/Navigation_pb2.pyi +1 -1
- streamlit/proto/NewSession_pb2.pyi +1 -1
- streamlit/proto/NumberInput_pb2.pyi +1 -1
- streamlit/proto/PageConfig_pb2.pyi +1 -1
- streamlit/proto/PageInfo_pb2.pyi +1 -1
- streamlit/proto/PageLink_pb2.pyi +1 -1
- streamlit/proto/PageNotFound_pb2.pyi +1 -1
- streamlit/proto/PageProfile_pb2.pyi +1 -1
- streamlit/proto/PagesChanged_pb2.pyi +1 -1
- streamlit/proto/ParentMessage_pb2.pyi +1 -1
- streamlit/proto/PlotlyChart_pb2.pyi +1 -1
- streamlit/proto/Progress_pb2.pyi +1 -1
- streamlit/proto/Radio_pb2.pyi +1 -1
- streamlit/proto/RootContainer_pb2.pyi +1 -1
- streamlit/proto/Selectbox_pb2.pyi +1 -1
- streamlit/proto/SessionEvent_pb2.pyi +1 -1
- streamlit/proto/SessionStatus_pb2.pyi +1 -1
- streamlit/proto/Skeleton_pb2.pyi +1 -1
- streamlit/proto/Slider_pb2.pyi +1 -1
- streamlit/proto/Snow_pb2.pyi +1 -1
- streamlit/proto/Spinner_pb2.py +2 -2
- streamlit/proto/Spinner_pb2.pyi +6 -2
- streamlit/proto/TextArea_pb2.pyi +1 -1
- streamlit/proto/TextInput_pb2.pyi +1 -1
- streamlit/proto/Text_pb2.pyi +1 -1
- streamlit/proto/TimeInput_pb2.pyi +1 -1
- streamlit/proto/Toast_pb2.pyi +1 -1
- streamlit/proto/VegaLiteChart_pb2.pyi +1 -1
- streamlit/proto/Video_pb2.pyi +1 -1
- streamlit/proto/WidgetStates_pb2.pyi +1 -1
- streamlit/proto/__init__.py +1 -1
- streamlit/runtime/__init__.py +1 -1
- streamlit/runtime/app_session.py +6 -4
- streamlit/runtime/caching/__init__.py +1 -1
- streamlit/runtime/caching/cache_data_api.py +1 -1
- streamlit/runtime/caching/cache_errors.py +1 -1
- streamlit/runtime/caching/cache_resource_api.py +1 -1
- streamlit/runtime/caching/cache_type.py +1 -1
- streamlit/runtime/caching/cache_utils.py +1 -1
- streamlit/runtime/caching/cached_message_replay.py +1 -1
- streamlit/runtime/caching/hashing.py +1 -1
- streamlit/runtime/caching/legacy_cache_api.py +1 -1
- streamlit/runtime/caching/storage/__init__.py +1 -1
- streamlit/runtime/caching/storage/cache_storage_protocol.py +1 -1
- streamlit/runtime/caching/storage/dummy_cache_storage.py +1 -1
- streamlit/runtime/caching/storage/in_memory_cache_storage_wrapper.py +1 -1
- streamlit/runtime/caching/storage/local_disk_cache_storage.py +1 -1
- streamlit/runtime/connection_factory.py +1 -1
- streamlit/runtime/context.py +1 -1
- streamlit/runtime/credentials.py +1 -1
- streamlit/runtime/forward_msg_cache.py +1 -1
- streamlit/runtime/forward_msg_queue.py +33 -5
- streamlit/runtime/fragment.py +2 -2
- streamlit/runtime/media_file_manager.py +1 -1
- streamlit/runtime/media_file_storage.py +1 -1
- streamlit/runtime/memory_media_file_storage.py +1 -1
- streamlit/runtime/memory_session_storage.py +1 -1
- streamlit/runtime/memory_uploaded_file_manager.py +1 -1
- streamlit/runtime/metrics_util.py +2 -1
- streamlit/runtime/pages_manager.py +1 -1
- streamlit/runtime/runtime.py +14 -3
- streamlit/runtime/runtime_util.py +1 -1
- streamlit/runtime/script_data.py +1 -1
- streamlit/runtime/scriptrunner/__init__.py +1 -1
- streamlit/runtime/scriptrunner/exec_code.py +34 -1
- streamlit/runtime/scriptrunner/magic.py +1 -1
- streamlit/runtime/scriptrunner/magic_funcs.py +1 -1
- streamlit/runtime/scriptrunner/script_cache.py +1 -1
- streamlit/runtime/scriptrunner/script_runner.py +22 -11
- streamlit/runtime/scriptrunner_utils/__init__.py +1 -1
- streamlit/runtime/scriptrunner_utils/exceptions.py +1 -1
- streamlit/runtime/scriptrunner_utils/script_requests.py +2 -1
- streamlit/runtime/scriptrunner_utils/script_run_context.py +2 -2
- streamlit/runtime/secrets.py +1 -1
- streamlit/runtime/session_manager.py +2 -2
- streamlit/runtime/state/__init__.py +1 -1
- streamlit/runtime/state/common.py +1 -1
- streamlit/runtime/state/query_params.py +1 -1
- streamlit/runtime/state/query_params_proxy.py +1 -1
- streamlit/runtime/state/safe_session_state.py +1 -1
- streamlit/runtime/state/session_state.py +1 -1
- streamlit/runtime/state/session_state_proxy.py +1 -1
- streamlit/runtime/state/widgets.py +1 -1
- streamlit/runtime/stats.py +1 -1
- streamlit/runtime/uploaded_file_manager.py +1 -1
- streamlit/runtime/websocket_session_manager.py +2 -2
- streamlit/source_util.py +1 -1
- streamlit/static/index.html +2 -2
- streamlit/static/static/js/{FileDownload.esm.Dod29kzi.js → FileDownload.esm.C6kraHI_.js} +1 -1
- streamlit/static/static/js/{FormClearHelper.0CIwSBFI.js → FormClearHelper.Tmz_sTQ8.js} +1 -1
- streamlit/static/static/js/{Hooks.D0iBCSJR.js → Hooks.ChcK58kV.js} +1 -1
- streamlit/static/static/js/{InputInstructions.BGz0VNnm.js → InputInstructions.CWlmC2Qh.js} +1 -1
- streamlit/static/static/js/{ProgressBar.BaPlfiH4.js → ProgressBar.C2LLZx-o.js} +1 -1
- streamlit/static/static/js/RenderInPortalIfExists.BFB9tinI.js +1 -0
- streamlit/static/static/js/Toolbar.DVKl5Ty9.js +1 -0
- streamlit/static/static/js/{base-input.Fk16kR45.js → base-input.C7heAUz7.js} +1 -1
- streamlit/static/static/js/{createSuper.B8NDjS0T.js → createSuper.BGkH3lYW.js} +1 -1
- streamlit/static/static/js/{data-grid-overlay-editor.C0oC7OWz.js → data-grid-overlay-editor.Cuw9mHAA.js} +1 -1
- streamlit/static/static/js/{downloader.BLJWoPl1.js → downloader.Dt0tCM6a.js} +1 -1
- streamlit/static/static/js/{es6.D9yZ4-e5.js → es6.DEWLLkEJ.js} +2 -2
- streamlit/static/static/js/{getPrototypeOf.DKKmv0PS.js → getPrototypeOf.BobjvJFE.js} +1 -1
- streamlit/static/static/js/{iframeResizer.contentWindow.Du2ek_IY.js → iframeResizer.contentWindow.Cb2nEQV3.js} +1 -1
- streamlit/static/static/js/index.2xRq6cMk.js +1 -0
- streamlit/static/static/js/{index.ncJlJcLt.js → index.3dqlv1Xq.js} +1 -1
- streamlit/static/static/js/index.4hESrvbj.js +1 -0
- streamlit/static/static/js/index.8LNY4OIb.js +4 -0
- streamlit/static/static/js/{index.Cfmr2hoW.js → index.B59J81FK.js} +1 -1
- streamlit/static/static/js/{index.CxrCMTqd.js → index.BAlqqBcw.js} +1 -1
- streamlit/static/static/js/index.BBm-I8-2.js +1 -0
- streamlit/static/static/js/{index.UMKksAwF.js → index.BEEgvyV0.js} +1 -1
- streamlit/static/static/js/{index.B8MC65SU.js → index.BSITpAz8.js} +29 -29
- streamlit/static/static/js/{index.K_IYAbRz.js → index.BU-BMiNz.js} +51 -51
- streamlit/static/static/js/{index.DcJiNltm.js → index.BbullfwT.js} +7 -7
- streamlit/static/static/js/index.BhvVhqgM.js +1 -0
- streamlit/static/static/js/index.Bo2RO7c-.js +1 -0
- streamlit/static/static/js/{index.C2_hseSo.js → index.BwUNY-jU.js} +1 -1
- streamlit/static/static/js/{index.C73yVjC9.js → index.C4ggakh6.js} +1 -1
- streamlit/static/static/js/index.C6zLaEWH.js +1 -0
- streamlit/static/static/js/{index.CaORMlLk.js → index.CJKd6KIo.js} +1 -1
- streamlit/static/static/js/{index.DCosyf4Y.js → index.CJrSPe9e.js} +1 -1
- streamlit/static/static/js/{index.clUXhmTv.js → index.CKpkbBQ4.js} +13 -13
- streamlit/static/static/js/{index.D-s5XFne.js → index.CKyzSK7k.js} +1 -1
- streamlit/static/static/js/{index.d_eIUHvJ.js → index.CWzMR4Qn.js} +2 -2
- streamlit/static/static/js/{index.DdG-jRFd.js → index.Caaf3Sch.js} +1 -1
- streamlit/static/static/js/{index.DU9T3IwS.js → index.CdNirCmM.js} +1 -1
- streamlit/static/static/js/{index.BAADbUet.js → index.CksJdg_n.js} +1 -1
- streamlit/static/static/js/{index.BZAVJreZ.js → index.Cq6-Dj2J.js} +1 -1
- streamlit/static/static/js/{index.CTvaDQgd.js → index.CsnZSzHc.js} +2 -2
- streamlit/static/static/js/index.D2_ysKuQ.js +1 -0
- streamlit/static/static/js/{index.BGyFJsxB.js → index.DA-jgmvJ.js} +1 -1
- streamlit/static/static/js/{index.CgHOvdK_.js → index.DSOFf22B.js} +1 -1
- streamlit/static/static/js/index.DTQeyNXN.js +1 -0
- streamlit/static/static/js/{index.CzDEy16B.js → index.De91xhMb.js} +1 -1
- streamlit/static/static/js/{index.CCLqv4q8.js → index.DeX4c3dx.js} +2 -2
- streamlit/static/static/js/{index.BEr9HRGP.js → index.IRVXqVyf.js} +1 -1
- streamlit/static/static/js/{index.DxFUMDyF.js → index.b1jbiVGt.js} +1 -1
- streamlit/static/static/js/{index.HXS4cXj6.js → index.bQJeNN28.js} +2 -2
- streamlit/static/static/js/{index.CGSuEM6K.js → index.kz_FxQ30.js} +1 -1
- streamlit/static/static/js/{index.BY0L_QLh.js → index.n7L72_oq.js} +2 -2
- streamlit/static/static/js/{input.BX19stYv.js → input.qSadM7Tx.js} +1 -1
- streamlit/static/static/js/{memory.DrUTC0E1.js → memory.CROZv0Mn.js} +1 -1
- streamlit/static/static/js/{mergeWith.DthgK8_y.js → mergeWith.CO-Rv2Zo.js} +1 -1
- streamlit/static/static/js/{number-overlay-editor.17BCi9Ve.js → number-overlay-editor.BRQhYKOF.js} +1 -1
- streamlit/static/static/js/{sandbox.5Hd92fh0.js → sandbox.CZKLDBgs.js} +1 -1
- streamlit/static/static/js/{slicedToArray.Bu7hUD78.js → slicedToArray.D36w_Bc8.js} +1 -1
- streamlit/static/static/js/{textarea.B2pXMKyh.js → textarea.DvzSPS_8.js} +1 -1
- streamlit/static/static/js/{timepicker.5G_63qYl.js → timepicker.FNAmrJ96.js} +1 -1
- streamlit/static/static/js/{uniqueId.B7repv29.js → uniqueId.BNjI9ROI.js} +1 -1
- streamlit/static/static/js/{useBasicWidgetState.ZoM17KXF.js → useBasicWidgetState.B8IH-5cn.js} +1 -1
- streamlit/static/static/js/{useOnInputChange.DK_jsnv_.js → useOnInputChange.B1QB2TNw.js} +1 -1
- streamlit/static/static/js/{withFullScreenWrapper.ByjGCoNh.js → withFullScreenWrapper.BT91IT4-.js} +1 -1
- streamlit/string_util.py +1 -1
- streamlit/temporary_directory.py +1 -1
- streamlit/testing/__init__.py +1 -1
- streamlit/testing/v1/__init__.py +1 -1
- streamlit/testing/v1/app_test.py +1 -1
- streamlit/testing/v1/element_tree.py +1 -1
- streamlit/testing/v1/local_script_runner.py +1 -1
- streamlit/testing/v1/util.py +1 -1
- streamlit/time_util.py +1 -1
- streamlit/type_util.py +1 -1
- streamlit/url_util.py +24 -1
- streamlit/user_info.py +94 -27
- streamlit/util.py +1 -1
- streamlit/version.py +1 -1
- streamlit/watcher/__init__.py +1 -1
- streamlit/watcher/event_based_path_watcher.py +1 -1
- streamlit/watcher/folder_black_list.py +1 -1
- streamlit/watcher/local_sources_watcher.py +1 -1
- streamlit/watcher/path_watcher.py +1 -1
- streamlit/watcher/polling_path_watcher.py +1 -1
- streamlit/watcher/util.py +1 -1
- streamlit/web/__init__.py +1 -1
- streamlit/web/bootstrap.py +1 -1
- streamlit/web/cache_storage_manager_config.py +1 -1
- streamlit/web/cli.py +1 -1
- streamlit/web/server/__init__.py +1 -1
- streamlit/web/server/app_static_file_handler.py +1 -1
- streamlit/web/server/authlib_tornado_integration.py +58 -0
- streamlit/web/server/browser_websocket_handler.py +72 -6
- streamlit/web/server/component_request_handler.py +1 -1
- streamlit/web/server/media_file_handler.py +1 -1
- streamlit/web/server/oauth_authlib_routes.py +176 -0
- streamlit/web/server/oidc_mixin.py +108 -0
- streamlit/web/server/routes.py +6 -4
- streamlit/web/server/server.py +41 -4
- streamlit/web/server/server_util.py +25 -1
- streamlit/web/server/stats_request_handler.py +1 -1
- streamlit/web/server/upload_file_request_handler.py +3 -2
- streamlit/web/server/websocket_headers.py +1 -1
- {streamlit_nightly-1.41.2.dev20250107.data → streamlit_nightly-1.41.2.dev20250109.data}/scripts/streamlit.cmd +1 -1
- {streamlit_nightly-1.41.2.dev20250107.dist-info → streamlit_nightly-1.41.2.dev20250109.dist-info}/METADATA +14 -2
- streamlit_nightly-1.41.2.dev20250109.dist-info/RECORD +560 -0
- {streamlit_nightly-1.41.2.dev20250107.dist-info → streamlit_nightly-1.41.2.dev20250109.dist-info}/WHEEL +1 -1
- streamlit/static/static/js/RenderInPortalIfExists.CDLwOGJN.js +0 -1
- streamlit/static/static/js/Toolbar.U2Q07lHA.js +0 -1
- streamlit/static/static/js/index.C9Sks6cD.js +0 -1
- streamlit/static/static/js/index.CIPlrA_8.js +0 -1
- streamlit/static/static/js/index.CKwgjL0N.js +0 -1
- streamlit/static/static/js/index.Chl3QVe6.js +0 -1
- streamlit/static/static/js/index.Cnd636WC.js +0 -4
- streamlit/static/static/js/index.DbcRQLkk.js +0 -1
- streamlit/static/static/js/index.DnCNih03.js +0 -1
- streamlit/static/static/js/index.NpAsSk7C.js +0 -1
- streamlit/static/static/js/index.n6SGF_yN.js +0 -1
- streamlit/vendor/ipython/__init__.py +0 -0
- streamlit/vendor/ipython/modified_sys_path.py +0 -67
- streamlit_nightly-1.41.2.dev20250107.dist-info/RECORD +0 -556
- {streamlit_nightly-1.41.2.dev20250107.dist-info → streamlit_nightly-1.41.2.dev20250109.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.41.2.dev20250107.dist-info → streamlit_nightly-1.41.2.dev20250109.dist-info}/top_level.txt +0 -0
@@ -1 +0,0 @@
|
|
1
|
-
import{n as t,aZ as e,am as o,j as s,ag as i}from"./index.B8MC65SU.js";import{P as l}from"./ProgressBar.BaPlfiH4.js";const d=t("div",{target:"eg8e9hd0"})(({theme:a})=>({paddingBottom:a.spacing.sm,lineHeight:"normal",color:e(a)}));function c({element:a,width:r}){return o("div",{className:"stProgress","data-testid":"stProgress",children:[s(d,{children:s(i,{source:a.text,allowHTML:!1,isLabel:!0})}),s(l,{value:a.value,width:r})]})}export{c as default};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{n as t,D as d,j as c,aQ as l,aR as g,A as e}from"./index.B8MC65SU.js";const f=t("iframe",{target:"etgi5ab0"})(({theme:o,disableScrolling:i})=>({colorScheme:"normal",border:"none",padding:o.spacing.none,margin:o.spacing.none,overflow:i?"hidden":void 0}));function F({element:o,width:i}){const s=o.hasWidth?o.width:i,n=r(o.src),a=d(n)?void 0:r(o.srcdoc);return c(f,{className:"stIFrame","data-testid":"stIFrame",allow:l,disableScrolling:!o.scrolling,src:n,srcDoc:a,width:s,height:o.height,scrolling:o.scrolling?"auto":"no",sandbox:g,title:"st.iframe"})}function r(o){return e(o)||o===""?void 0:o}export{F as default};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{n as U,r as s,b3 as V,j as l}from"./index.B8MC65SU.js";const P=U("iframe",{target:"e1iolsnz0"})(({theme:a})=>({colorScheme:"normal",border:"none",padding:a.spacing.none,margin:a.spacing.none,width:"100%",aspectRatio:"16 / 9"})),R=528;function w({element:a,width:f,endpoints:m,elementMgr:c}){const i=s.useRef(null),{type:E,url:p,startTime:n,subtitles:v,endTime:d,loop:u,autoplay:T,muted:h}=a,S=s.useMemo(()=>{if(!a.id)return!0;const e=c.getElementState(a.id,"preventAutoplay");return e||c.setElementState(a.id,"preventAutoplay",!0),e??!1},[a.id,c]);s.useEffect(()=>{i.current&&(i.current.currentTime=n)},[n]),s.useEffect(()=>{const e=i.current,t=()=>{e&&(e.currentTime=a.startTime)};return e&&e.addEventListener("loadedmetadata",t),()=>{e&&e.removeEventListener("loadedmetadata",t)}},[a]),s.useEffect(()=>{const e=i.current;if(!e)return;let t=!1;const o=()=>{d>0&&e.currentTime>=d&&(u?(e.currentTime=n||0,e.play()):t||(t=!0,e.pause()))};return d>0&&e.addEventListener("timeupdate",o),()=>{e&&d>0&&e.removeEventListener("timeupdate",o)}},[d,u,n]),s.useEffect(()=>{const e=i.current;if(!e)return;const t=()=>{u&&(e.currentTime=n||0,e.play())};return e.addEventListener("ended",t),()=>{e&&e.removeEventListener("ended",t)}},[u,n]);const g=e=>{const{startTime:t,endTime:o,loop:L,autoplay:N,muted:b}=a,r=new URL(e);if(t&&!isNaN(t)&&r.searchParams.append("start",t.toString()),o&&!isNaN(o)&&r.searchParams.append("end",o.toString()),L){r.searchParams.append("loop","1");const y=r.pathname.split("/").pop();y&&r.searchParams.append("playlist",y)}return N&&r.searchParams.append("autoplay","1"),b&&r.searchParams.append("mute","1"),r.toString()};return E===V.Type.YOUTUBE_IFRAME?l(P,{className:"stVideo","data-testid":"stVideo",title:p,src:g(p),allow:"autoplay; encrypted-media",allowFullScreen:!0}):l("video",{className:"stVideo","data-testid":"stVideo",ref:i,controls:!0,muted:h,autoPlay:T&&!S,src:m.buildMediaURL(p),style:{width:f,height:f===0?R:void 0},crossOrigin:void 0,children:v&&v.map((e,t)=>l("track",{kind:"captions",src:m.buildMediaURL(`${e.url}`),label:`${e.label}`,default:t===0},t))})}export{w as default};
|
@@ -1,4 +0,0 @@
|
|
1
|
-
import{r as c,E as ie,_ as oe,c3 as Rt,c4 as R,c5 as L,c6 as Lt,R as lt,c7 as d,n as m,am as S,j as p,b9 as T,ba as Z,aU as Q,aT as kt,c8 as Bt,c9 as Vt,aK as Ht,F as Nt,ae as Wt,b4 as $t,aH as Xe,A as j,b6 as Kt,b5 as Xt,bc as Yt,bp as Gt,bd as qt,aY as Jt,be as Zt}from"./index.B8MC65SU.js";import{F as Qt}from"./FormClearHelper.0CIwSBFI.js";import{S as er,P as tr}from"./ProgressBar.BaPlfiH4.js";import{u as rr}from"./Hooks.D0iBCSJR.js";import{U as q}from"./UploadFileInfo.C-jY39rj.js";var ct=c.forwardRef(function(e,r){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return c.createElement(ie,oe({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:r}),c.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),c.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"}))});ct.displayName="Clear";var ut=c.forwardRef(function(e,r){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return c.createElement(ie,oe({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:r}),c.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),c.createElement("path",{d:"M19.35 10.04A7.49 7.49 0 0012 4C9.11 4 6.6 5.64 5.35 8.04A5.994 5.994 0 000 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM19 18H6c-2.21 0-4-1.79-4-4 0-2.05 1.53-3.76 3.56-3.97l1.07-.11.5-.95A5.469 5.469 0 0112 6c2.62 0 4.88 1.86 5.39 4.43l.3 1.5 1.53.11A2.98 2.98 0 0122 15c0 1.65-1.35 3-3 3zM8 13h2.55v3h2.9v-3H16l-4-4z"}))});ut.displayName="CloudUpload";var pt=c.forwardRef(function(e,r){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return c.createElement(ie,oe({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:r}),c.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}))});pt.displayName="Error";var ft=c.forwardRef(function(e,r){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return c.createElement(ie,oe({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:r}),c.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),c.createElement("path",{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zM6 20V4h7v5h5v11H6z"}))});ft.displayName="InsertDriveFile";var P;(function(e){e.Gigabyte="gb",e.Megabyte="mb",e.Kilobyte="kb",e.Byte="b"})(P||(P={}));const Se=Rt()?1024:1e3,ee=["gb","mb","kb","b"],ae=(e,r,t=1)=>{if(r||(r="b"),t<0&&(t=0),e<0)throw new Error("Size must be greater than or equal to 0");const n=ee.indexOf(r),i=e/Se;return n&&e>Se/2?ae(i,ee[n-1],t):`${e.toFixed(t)}${r.toUpperCase()}`},nr=(e,r,t)=>{if(e<0)throw Error("Size must be 0 or greater");const n=ee.findIndex(l=>l===r),i=ee.findIndex(l=>l===t);if(n===-1||i===-1)throw Error("Unexpected byte unit provided");if(n===i)return e;const o=Math.abs(n-i),s=Se**o;return n>i?e/s:e*s};var ir=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function V(e,r){var t=or(e);if(typeof t.path!="string"){var n=e.webkitRelativePath;Object.defineProperty(t,"path",{value:typeof r=="string"?r:typeof n=="string"&&n.length>0?n:e.name,writable:!1,configurable:!1,enumerable:!0})}return t}function or(e){var r=e.name,t=r&&r.lastIndexOf(".")!==-1;if(t&&!e.type){var n=r.split(".").pop().toLowerCase(),i=ir.get(n);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var ar=[".DS_Store","Thumbs.db"];function sr(e){return R(this,void 0,void 0,function(){return L(this,function(r){return te(e)&&lr(e)?[2,fr(e.dataTransfer,e.type)]:cr(e)?[2,ur(e)]:Array.isArray(e)&&e.every(function(t){return"getFile"in t&&typeof t.getFile=="function"})?[2,pr(e)]:[2,[]]})})}function lr(e){return te(e.dataTransfer)}function cr(e){return te(e)&&te(e.target)}function te(e){return typeof e=="object"&&e!==null}function ur(e){return Ee(e.target.files).map(function(r){return V(r)})}function pr(e){return R(this,void 0,void 0,function(){var r;return L(this,function(t){switch(t.label){case 0:return[4,Promise.all(e.map(function(n){return n.getFile()}))];case 1:return r=t.sent(),[2,r.map(function(n){return V(n)})]}})})}function fr(e,r){return R(this,void 0,void 0,function(){var t,n;return L(this,function(i){switch(i.label){case 0:return e===null?[2,[]]:e.items?(t=Ee(e.items).filter(function(o){return o.kind==="file"}),r!=="drop"?[2,t]:[4,Promise.all(t.map(dr))]):[3,2];case 1:return n=i.sent(),[2,Ye(dt(n))];case 2:return[2,Ye(Ee(e.files).map(function(o){return V(o)}))]}})})}function Ye(e){return e.filter(function(r){return ar.indexOf(r.name)===-1})}function Ee(e){if(e===null)return[];for(var r=[],t=0;t<e.length;t++){var n=e[t];r.push(n)}return r}function dr(e){if(typeof e.webkitGetAsEntry!="function")return Ge(e);var r=e.webkitGetAsEntry();return r&&r.isDirectory?gt(r):Ge(e)}function dt(e){return e.reduce(function(r,t){return Lt(r,Array.isArray(t)?dt(t):[t])},[])}function Ge(e){var r=e.getAsFile();if(!r)return Promise.reject(e+" is not a File");var t=V(r);return Promise.resolve(t)}function gr(e){return R(this,void 0,void 0,function(){return L(this,function(r){return[2,e.isDirectory?gt(e):mr(e)]})})}function gt(e){var r=e.createReader();return new Promise(function(t,n){var i=[];function o(){var s=this;r.readEntries(function(l){return R(s,void 0,void 0,function(){var f,w,v;return L(this,function(y){switch(y.label){case 0:if(l.length)return[3,5];y.label=1;case 1:return y.trys.push([1,3,,4]),[4,Promise.all(i)];case 2:return f=y.sent(),t(f),[3,4];case 3:return w=y.sent(),n(w),[3,4];case 4:return[3,6];case 5:v=Promise.all(l.map(gr)),i.push(v),o(),y.label=6;case 6:return[2]}})})},function(l){n(l)})}o()})}function mr(e){return R(this,void 0,void 0,function(){return L(this,function(r){return[2,new Promise(function(t,n){e.file(function(i){var o=V(i,e.fullPath);t(o)},function(i){n(i)})})]})})}var hr=function(e,r){if(e&&r){var t=Array.isArray(r)?r:r.split(","),n=e.name||"",i=(e.type||"").toLowerCase(),o=i.replace(/\/.*$/,"");return t.some(function(s){var l=s.trim().toLowerCase();return l.charAt(0)==="."?n.toLowerCase().endsWith(l):l.endsWith("/*")?o===l.replace(/\/.*$/,""):i===l})}return!0};function qe(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),t.push.apply(t,n)}return t}function Je(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?qe(Object(t),!0).forEach(function(n){mt(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):qe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function mt(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Ze(e,r){return Fr(e)||br(e,r)||yr(e,r)||vr()}function vr(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
2
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yr(e,r){if(e){if(typeof e=="string")return Qe(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Qe(e,r)}}function Qe(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function br(e,r){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n=[],i=!0,o=!1,s,l;try{for(t=t.call(e);!(i=(s=t.next()).done)&&(n.push(s.value),!(r&&n.length===r));i=!0);}catch(f){o=!0,l=f}finally{try{!i&&t.return!=null&&t.return()}finally{if(o)throw l}}return n}}function Fr(e){if(Array.isArray(e))return e}var wr="file-invalid-type",Dr="file-too-large",xr="file-too-small",Sr="too-many-files",Er=function(r){r=Array.isArray(r)&&r.length===1?r[0]:r;var t=Array.isArray(r)?"one of ".concat(r.join(", ")):r;return{code:wr,message:"File type must be ".concat(t)}},et=function(r){return{code:Dr,message:"File is larger than ".concat(r," ").concat(r===1?"byte":"bytes")}},tt=function(r){return{code:xr,message:"File is smaller than ".concat(r," ").concat(r===1?"byte":"bytes")}},Ar={code:Sr,message:"Too many files"};function ht(e,r){var t=e.type==="application/x-moz-file"||hr(e,r);return[t,t?null:Er(r)]}function vt(e,r,t){if(B(e.size))if(B(r)&&B(t)){if(e.size>t)return[!1,et(t)];if(e.size<r)return[!1,tt(r)]}else{if(B(r)&&e.size<r)return[!1,tt(r)];if(B(t)&&e.size>t)return[!1,et(t)]}return[!0,null]}function B(e){return e!=null}function Or(e){var r=e.files,t=e.accept,n=e.minSize,i=e.maxSize,o=e.multiple,s=e.maxFiles;return!o&&r.length>1||o&&s>=1&&r.length>s?!1:r.every(function(l){var f=ht(l,t),w=Ze(f,1),v=w[0],y=vt(l,n,i),O=Ze(y,1),I=O[0];return v&&I})}function re(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function J(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(r){return r==="Files"||r==="application/x-moz-file"}):!!e.target&&!!e.target.files}function rt(e){e.preventDefault()}function Ir(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function Cr(e){return e.indexOf("Edge/")!==-1}function Pr(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return Ir(e)||Cr(e)}function A(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return function(n){for(var i=arguments.length,o=new Array(i>1?i-1:0),s=1;s<i;s++)o[s-1]=arguments[s];return r.some(function(l){return!re(n)&&l&&l.apply(void 0,[n].concat(o)),re(n)})}}function zr(){return"showOpenFilePicker"in window}function Ur(e){return e=typeof e=="string"?e.split(","):e,[{description:"everything",accept:Array.isArray(e)?e.filter(function(r){return r==="audio/*"||r==="video/*"||r==="image/*"||r==="text/*"||/\w+\/[-+.\w]+/g.test(r)}).reduce(function(r,t){return Je(Je({},r),{},mt({},t,[]))},{}):{}}]}function _r(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function Mr(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}var jr=["children"],Tr=["open"],Rr=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],Lr=["refKey","onChange","onClick"];function kr(e){return Hr(e)||Vr(e)||yt(e)||Br()}function Br(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
3
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vr(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Hr(e){if(Array.isArray(e))return Ae(e)}function xe(e,r){return $r(e)||Wr(e,r)||yt(e,r)||Nr()}function Nr(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
4
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yt(e,r){if(e){if(typeof e=="string")return Ae(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Ae(e,r)}}function Ae(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function Wr(e,r){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n=[],i=!0,o=!1,s,l;try{for(t=t.call(e);!(i=(s=t.next()).done)&&(n.push(s.value),!(r&&n.length===r));i=!0);}catch(f){o=!0,l=f}finally{try{!i&&t.return!=null&&t.return()}finally{if(o)throw l}}return n}}function $r(e){if(Array.isArray(e))return e}function nt(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),t.push.apply(t,n)}return t}function g(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?nt(Object(t),!0).forEach(function(n){Oe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):nt(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Oe(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function ne(e,r){if(e==null)return{};var t=Kr(e,r),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],!(r.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(t[n]=e[n])}return t}function Kr(e,r){if(e==null)return{};var t={},n=Object.keys(e),i,o;for(o=0;o<n.length;o++)i=n[o],!(r.indexOf(i)>=0)&&(t[i]=e[i]);return t}var se=c.forwardRef(function(e,r){var t=e.children,n=ne(e,jr),i=Xr(n),o=i.open,s=ne(i,Tr);return c.useImperativeHandle(r,function(){return{open:o}},[o]),lt.createElement(c.Fragment,null,t(g(g({},s),{},{open:o})))});se.displayName="Dropzone";var bt={disabled:!1,getFilesFromEvent:sr,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0};se.defaultProps=bt;se.propTypes={children:d.func,accept:d.oneOfType([d.string,d.arrayOf(d.string)]),multiple:d.bool,preventDropOnDocument:d.bool,noClick:d.bool,noKeyboard:d.bool,noDrag:d.bool,noDragEventsBubbling:d.bool,minSize:d.number,maxSize:d.number,maxFiles:d.number,disabled:d.bool,getFilesFromEvent:d.func,onFileDialogCancel:d.func,onFileDialogOpen:d.func,useFsAccessApi:d.bool,onDragEnter:d.func,onDragLeave:d.func,onDragOver:d.func,onDrop:d.func,onDropAccepted:d.func,onDropRejected:d.func,validator:d.func};var Ie={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]};function Xr(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=g(g({},bt),e),t=r.accept,n=r.disabled,i=r.getFilesFromEvent,o=r.maxSize,s=r.minSize,l=r.multiple,f=r.maxFiles,w=r.onDragEnter,v=r.onDragLeave,y=r.onDragOver,O=r.onDrop,I=r.onDropAccepted,le=r.onDropRejected,ce=r.onFileDialogCancel,ue=r.onFileDialogOpen,Pe=r.useFsAccessApi,pe=r.preventDropOnDocument,ze=r.noClick,fe=r.noKeyboard,Ue=r.noDrag,C=r.noDragEventsBubbling,de=r.validator,ge=c.useMemo(function(){return typeof ue=="function"?ue:it},[ue]),H=c.useMemo(function(){return typeof ce=="function"?ce:it},[ce]),D=c.useRef(null),x=c.useRef(null),Pt=c.useReducer(Yr,Ie),_e=xe(Pt,2),N=_e[0],F=_e[1],zt=N.isFocused,Me=N.isFileDialogActive,je=N.draggedFiles,W=c.useRef(typeof window<"u"&&window.isSecureContext&&Pe&&zr()),Te=function(){!W.current&&Me&&setTimeout(function(){if(x.current){var u=x.current.files;u.length||(F({type:"closeDialog"}),H())}},300)};c.useEffect(function(){return window.addEventListener("focus",Te,!1),function(){window.removeEventListener("focus",Te,!1)}},[x,Me,H,W]);var z=c.useRef([]),Re=function(u){D.current&&D.current.contains(u.target)||(u.preventDefault(),z.current=[])};c.useEffect(function(){return pe&&(document.addEventListener("dragover",rt,!1),document.addEventListener("drop",Re,!1)),function(){pe&&(document.removeEventListener("dragover",rt),document.removeEventListener("drop",Re))}},[D,pe]);var Le=c.useCallback(function(a){a.preventDefault(),a.persist(),Y(a),z.current=[].concat(kr(z.current),[a.target]),J(a)&&Promise.resolve(i(a)).then(function(u){re(a)&&!C||(F({draggedFiles:u,isDragActive:!0,type:"setDraggedFiles"}),w&&w(a))})},[i,w,C]),ke=c.useCallback(function(a){a.preventDefault(),a.persist(),Y(a);var u=J(a);if(u&&a.dataTransfer)try{a.dataTransfer.dropEffect="copy"}catch{}return u&&y&&y(a),!1},[y,C]),Be=c.useCallback(function(a){a.preventDefault(),a.persist(),Y(a);var u=z.current.filter(function(b){return D.current&&D.current.contains(b)}),h=u.indexOf(a.target);h!==-1&&u.splice(h,1),z.current=u,!(u.length>0)&&(F({isDragActive:!1,type:"setDraggedFiles",draggedFiles:[]}),J(a)&&v&&v(a))},[D,v,C]),$=c.useCallback(function(a,u){var h=[],b=[];a.forEach(function(E){var k=ht(E,t),M=xe(k,2),he=M[0],ve=M[1],ye=vt(E,s,o),G=xe(ye,2),be=G[0],Fe=G[1],we=de?de(E):null;if(he&&be&&!we)h.push(E);else{var De=[ve,Fe];we&&(De=De.concat(we)),b.push({file:E,errors:De.filter(function(Tt){return Tt})})}}),(!l&&h.length>1||l&&f>=1&&h.length>f)&&(h.forEach(function(E){b.push({file:E,errors:[Ar]})}),h.splice(0)),F({acceptedFiles:h,fileRejections:b,type:"setFiles"}),O&&O(h,b,u),b.length>0&&le&&le(b,u),h.length>0&&I&&I(h,u)},[F,l,t,s,o,f,O,I,le,de]),K=c.useCallback(function(a){a.preventDefault(),a.persist(),Y(a),z.current=[],J(a)&&Promise.resolve(i(a)).then(function(u){re(a)&&!C||$(u,a)}),F({type:"reset"})},[i,$,C]),U=c.useCallback(function(){if(W.current){F({type:"openDialog"}),ge();var a={multiple:l,types:Ur(t)};window.showOpenFilePicker(a).then(function(u){return i(u)}).then(function(u){$(u,null),F({type:"closeDialog"})}).catch(function(u){_r(u)?(H(u),F({type:"closeDialog"})):Mr(u)&&(W.current=!1,x.current&&(x.current.value=null,x.current.click()))});return}x.current&&(F({type:"openDialog"}),ge(),x.current.value=null,x.current.click())},[F,ge,H,Pe,$,t,l]),Ve=c.useCallback(function(a){!D.current||!D.current.isEqualNode(a.target)||(a.key===" "||a.key==="Enter"||a.keyCode===32||a.keyCode===13)&&(a.preventDefault(),U())},[D,U]),He=c.useCallback(function(){F({type:"focus"})},[]),Ne=c.useCallback(function(){F({type:"blur"})},[]),We=c.useCallback(function(){ze||(Pr()?setTimeout(U,0):U())},[ze,U]),_=function(u){return n?null:u},me=function(u){return fe?null:_(u)},X=function(u){return Ue?null:_(u)},Y=function(u){C&&u.stopPropagation()},Ut=c.useMemo(function(){return function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},u=a.refKey,h=u===void 0?"ref":u,b=a.role,E=a.onKeyDown,k=a.onFocus,M=a.onBlur,he=a.onClick,ve=a.onDragEnter,ye=a.onDragOver,G=a.onDragLeave,be=a.onDrop,Fe=ne(a,Rr);return g(g(Oe({onKeyDown:me(A(E,Ve)),onFocus:me(A(k,He)),onBlur:me(A(M,Ne)),onClick:_(A(he,We)),onDragEnter:X(A(ve,Le)),onDragOver:X(A(ye,ke)),onDragLeave:X(A(G,Be)),onDrop:X(A(be,K)),role:typeof b=="string"&&b!==""?b:"button"},h,D),!n&&!fe?{tabIndex:0}:{}),Fe)}},[D,Ve,He,Ne,We,Le,ke,Be,K,fe,Ue,n]),_t=c.useCallback(function(a){a.stopPropagation()},[]),Mt=c.useMemo(function(){return function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},u=a.refKey,h=u===void 0?"ref":u,b=a.onChange,E=a.onClick,k=ne(a,Lr),M=Oe({accept:t,multiple:l,type:"file",style:{display:"none"},onChange:_(A(b,K)),onClick:_(A(E,_t)),tabIndex:-1},h,x);return g(g({},M),k)}},[x,t,l,K,n]),$e=je.length,Ke=$e>0&&Or({files:je,accept:t,minSize:s,maxSize:o,multiple:l,maxFiles:f}),jt=$e>0&&!Ke;return g(g({},N),{},{isDragAccept:Ke,isDragReject:jt,isFocused:zt&&!n,getRootProps:Ut,getInputProps:Mt,rootRef:D,inputRef:x,open:_(U)})}function Yr(e,r){switch(r.type){case"focus":return g(g({},e),{},{isFocused:!0});case"blur":return g(g({},e),{},{isFocused:!1});case"openDialog":return g(g({},Ie),{},{isFileDialogActive:!0});case"closeDialog":return g(g({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":var t=r.isDragActive,n=r.draggedFiles;return g(g({},e),{},{draggedFiles:n,isDragActive:t});case"setFiles":return g(g({},e),{},{acceptedFiles:r.acceptedFiles,fileRejections:r.fileRejections});case"reset":return g({},Ie);default:return e}}function it(){}const Ft=m("section",{target:"es2srfl0"})(({isDisabled:e,theme:r})=>({display:"flex",alignItems:"center",padding:r.spacing.lg,backgroundColor:r.colors.secondaryBg,borderRadius:r.radii.default,":focus":{outline:"none"},":focus-visible":{boxShadow:`0 0 0 1px ${r.colors.primary}`},color:e?r.colors.gray:r.colors.bodyText})),wt=m("div",{target:"es2srfl1"})({marginRight:"auto",alignItems:"center",display:"flex"}),Dt=m("span",{target:"es2srfl2"})(({theme:e})=>({color:e.colors.darkenedBgMix100,marginRight:e.spacing.lg})),Gr=m("span",{target:"es2srfl3"})(({theme:e})=>({marginBottom:e.spacing.twoXS})),qr=m("div",{target:"es2srfl4"})({display:"flex",flexDirection:"column"}),xt=m("div",{target:"es2srfl5"})(({theme:e})=>({left:0,right:0,lineHeight:e.lineHeights.tight,paddingTop:e.spacing.md,paddingLeft:e.spacing.lg,paddingRight:e.spacing.lg})),Jr=m("ul",{target:"es2srfl6"})(({theme:e})=>({listStyleType:"none",margin:e.spacing.none,padding:e.spacing.none})),St=m("li",{target:"es2srfl7"})(({theme:e})=>({margin:e.spacing.none,padding:e.spacing.none})),Et=m("div",{target:"es2srfl8"})(({theme:e})=>({display:"flex",alignItems:"baseline",flex:1,paddingLeft:e.spacing.lg,overflow:"hidden"})),At=m("div",{target:"es2srfl9"})(({theme:e})=>({marginRight:e.spacing.sm,marginBottom:e.spacing.twoXS,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"})),Ot=m("div",{target:"es2srfl10"})(({theme:e})=>({display:"flex",alignItems:"center",marginBottom:e.spacing.twoXS})),Zr=m("span",{target:"es2srfl11"})(({theme:e})=>({marginRight:e.spacing.twoXS})),Qr=m("div",{target:"es2srfl12"})(({theme:e})=>({display:"flex",padding:e.spacing.twoXS,color:e.colors.darkenedBgMix100})),It=m("small",{target:"es2srfl13"})(({theme:e})=>({color:e.colors.danger,fontSize:e.fontSizes.sm,height:e.fontSizes.sm,lineHeight:e.fontSizes.sm,display:"flex",alignItems:"center",whiteSpace:"nowrap"})),Ct=m("span",{target:"es2srfl14"})({}),ot=e=>({[Ft]:{display:"flex",flexDirection:"column",alignItems:"flex-start"},[wt]:{marginBottom:e.spacing.lg},[Dt]:{display:"none"},[xt]:{paddingRight:e.spacing.lg},[Ot]:{maxWidth:"inherit",flex:1,alignItems:"flex-start",marginBottom:e.spacing.sm},[At]:{width:e.sizes.full},[Et]:{flexDirection:"column"},[It]:{height:"auto",whiteSpace:"initial"},[Ct]:{display:"none"},[St]:{margin:e.spacing.none,padding:e.spacing.none}}),en=m("div",{target:"es2srfl15"})(({theme:e})=>e.inSidebar?ot(e):{[`@media (max-width: ${e.breakpoints.sm})`]:ot(e)});var at;(function(e){e.DANGER="danger"})(at||(at={}));const Ce=m("small",{target:"e1w6nwfl0"})(({kind:e,theme:r})=>{const{danger:t,fadedText60:n}=r.colors;return{color:e==="danger"?t:n,fontSize:r.fontSizes.sm,lineHeight:r.lineHeights.tight}}),tn=({multiple:e,acceptedExtensions:r,maxSizeBytes:t})=>S(wt,{"data-testid":"stFileUploaderDropzoneInstructions",children:[p(Dt,{children:p(T,{content:ut,size:"threeXL"})}),S(qr,{children:[S(Gr,{children:["Drag and drop file",e?"s":""," here"]}),S(Ce,{children:[`Limit ${ae(t,P.Byte,0)} per file`,r.length?` • ${r.map(n=>n.replace(/^\./,"").toUpperCase()).join(", ")}`:null]})]})]}),rn=({onDrop:e,multiple:r,acceptedExtensions:t,maxSizeBytes:n,disabled:i,label:o})=>p(se,{onDrop:e,multiple:r,accept:t.length?t:void 0,maxSize:n,disabled:i,useFsAccessApi:!1,children:({getRootProps:s,getInputProps:l})=>S(Ft,{...s(),"data-testid":"stFileUploaderDropzone",isDisabled:i,"aria-label":o,children:[p("input",{"data-testid":"stFileUploaderDropzoneInput",...l()}),p(tn,{multiple:r,acceptedExtensions:t,maxSizeBytes:n}),p(Z,{kind:Q.SECONDARY,disabled:i,size:kt.SMALL,children:"Browse files"})]})}),nn=m("div",{target:"e1vdeh0w0"})(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"space-between",paddingBottom:e.spacing.twoXS,marginBottom:e.spacing.twoXS})),on=m("div",{target:"e1vdeh0w1"})(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",color:e.colors.fadedText40})),an=({currentPage:e,totalPages:r,onNext:t,onPrevious:n})=>S(nn,{"data-testid":"stFileUploaderPagination",children:[p(Ce,{children:`Showing page ${e} of ${r}`}),S(on,{children:[p(Z,{onClick:n,kind:Q.MINIMAL,children:p(T,{content:Bt,size:"xl"})}),p(Z,{onClick:t,kind:Q.MINIMAL,children:p(T,{content:Vt,size:"xl"})})]})]}),st=(e,r)=>Math.ceil(e.length/r),sn=e=>Ht(({pageSize:t,items:n,resetOnAdd:i,...o})=>{const[s,l]=c.useState(0),[f,w]=c.useState(st(n,t)),v=rr(n);c.useEffect(()=>{v&&v.length!==n.length&&w(st(n,t)),v&&v.length<n.length?i&&l(0):s+1>=f&&l(f-1)},[n,s,t,v,i,f]);const y=()=>{l(Math.min(s+1,f-1))},O=()=>{l(Math.max(0,s-1))},I=n.slice(s*t,s*t+t);return S(Nt,{children:[p(e,{items:I,...o}),n.length>t?p(an,{pageSize:t,totalPages:f,currentPage:s+1,onNext:y,onPrevious:O}):null]})},e),ln=({fileInfo:e})=>e.status.type==="uploading"?p(tr,{value:e.status.progress,size:er.SMALL}):e.status.type==="error"?S(It,{children:[p(Zr,{"data-testid":"stFileUploaderFileErrorMessage",children:e.status.errorMessage}),p(Ct,{children:p(T,{content:pt,size:"lg"})})]}):e.status.type==="uploaded"?p(Ce,{children:ae(e.size,P.Byte)}):null,cn=({fileInfo:e,onDelete:r})=>S(Ot,{className:"stFileUploaderFile","data-testid":"stFileUploaderFile",children:[p(Qr,{children:p(T,{content:ft,size:"twoXL"})}),S(Et,{className:"stFileUploaderFileData",children:[p(At,{className:"stFileUploaderFileName","data-testid":"stFileUploaderFileName",title:e.name,children:e.name}),p(ln,{fileInfo:e})]}),p("div",{"data-testid":"stFileUploaderDeleteBtn",children:p(Z,{onClick:()=>r(e.id),kind:Q.MINIMAL,children:p(T,{content:ct,size:"lg"})})})]}),un=({items:e,onDelete:r})=>p(Jr,{children:e.map(t=>p(St,{children:p(cn,{fileInfo:t,onDelete:r})},t.id))}),pn=sn(un),fn=e=>p(xt,{children:p(pn,{...e})});class yn extends lt.PureComponent{constructor(r){super(r),this.formClearHelper=new Qt,this.localFileIdCounter=1,this.forceUpdatingStatus=!1,this.componentDidUpdate=()=>{if(this.status!=="ready")return;const t=this.createWidgetValue(),{element:n,widgetMgr:i,fragmentId:o}=this.props,s=i.getFileUploaderStateValue(n);Wt(t,s)||i.setFileUploaderStateValue(n,t,{fromUi:!0},o)},this.reset=()=>{this.setState({files:[]})},this.dropHandler=(t,n)=>{const{element:i}=this.props,{multipleFiles:o}=i;if(!o&&t.length===0&&n.length>1){const s=n.findIndex(l=>l.errors.length===1&&l.errors[0].code==="too-many-files");s>=0&&(t.push(n[s].file),n.splice(s,1))}if(this.props.uploadClient.fetchFileURLs(t).then(s=>{if(!o&&t.length>0){const l=this.state.files.find(f=>f.status.type!=="error");l&&(this.forceUpdatingStatus=!0,this.deleteFile(l.id),this.forceUpdatingStatus=!1)}$t(s,t).forEach(([l,f])=>{this.uploadFile(l,f)})}).catch(s=>{this.addFiles(t.map(l=>new q(l.name,l.size,this.nextLocalFileId(),{type:"error",errorMessage:s})))}),n.length>0){const s=n.map(l=>{const{file:f}=l;return new q(f.name,f.size,this.nextLocalFileId(),{type:"error",errorMessage:this.getErrorMessage(l.errors[0].code,l.file)})});this.addFiles(s)}},this.uploadFile=(t,n)=>{const i=Xe.CancelToken.source(),o=new q(n.name,n.size,this.nextLocalFileId(),{type:"uploading",cancelToken:i,progress:1});this.addFile(o),this.props.uploadClient.uploadFile(this.props.element,t.uploadUrl,n,s=>this.onUploadProgress(s,o.id),i.token).then(()=>this.onUploadComplete(o.id,t)).catch(s=>{Xe.isCancel(s)||this.updateFile(o.id,o.setStatus({type:"error",errorMessage:s?s.toString():"Unknown error"}))})},this.onUploadComplete=(t,n)=>{const i=this.getFile(t);j(i)||i.status.type!=="uploading"||this.updateFile(i.id,i.setStatus({type:"uploaded",fileId:n.fileId,fileUrls:n}))},this.getErrorMessage=(t,n)=>{switch(t){case"file-too-large":return`File must be ${ae(this.maxUploadSizeInBytes,P.Byte)} or smaller.`;case"file-invalid-type":return`${n.type} files are not allowed.`;case"file-too-small":return"File size is too small.";case"too-many-files":return"Only one file is allowed.";default:return"Unexpected error. Please try again."}},this.deleteFile=t=>{const n=this.getFile(t);j(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(t))},this.addFile=t=>{this.setState(n=>({files:[...n.files,t]}))},this.addFiles=t=>{this.setState(n=>({files:[...n.files,...t]}))},this.removeFile=t=>{this.setState(n=>({files:n.files.filter(i=>i.id!==t)}))},this.getFile=t=>this.state.files.find(n=>n.id===t),this.updateFile=(t,n)=>{this.setState(i=>({files:i.files.map(o=>o.id===t?n:o)}))},this.onUploadProgress=(t,n)=>{const i=this.getFile(n);if(j(i)||i.status.type!=="uploading")return;const o=Math.round(t.loaded*100/t.total);i.status.progress!==o&&this.updateFile(n,i.setStatus({type:"uploading",cancelToken:i.status.cancelToken,progress:o}))},this.onFormCleared=()=>{this.setState({files:[]},()=>{const t=this.createWidgetValue();if(j(t))return;const{widgetMgr:n,element:i,fragmentId:o}=this.props;n.setFileUploaderStateValue(i,t,{fromUi:!0},o)})},this.state=this.initialValue}get initialValue(){const r={files:[],newestServerFileId:0},{widgetMgr:t,element:n}=this.props,i=t.getFileUploaderStateValue(n);if(j(i))return r;const{uploadedFileInfo:o}=i;return j(o)||o.length===0?r:{files:o.map(s=>{const l=s.name,f=s.size,w=s.fileId,v=s.fileUrls;return new q(l,f,this.nextLocalFileId(),{type:"uploaded",fileId:w,fileUrls:v})})}}componentWillUnmount(){this.formClearHelper.disconnect()}get maxUploadSizeInBytes(){const r=this.props.element.maxUploadSizeMb;return nr(r,P.Megabyte,P.Byte)}get status(){const r=t=>t.status.type==="uploading";return this.state.files.some(r)||this.forceUpdatingStatus?"updating":"ready"}componentDidMount(){const r=this.createWidgetValue(),{element:t,widgetMgr:n,fragmentId:i}=this.props;n.getFileUploaderStateValue(t)===void 0&&n.setFileUploaderStateValue(t,r,{fromUi:!1},i)}createWidgetValue(){const r=this.state.files.filter(t=>t.status.type==="uploaded").map(t=>{const{name:n,size:i,status:o}=t,{fileId:s,fileUrls:l}=o;return new Kt({fileId:s,fileUrls:l,name:n,size:i})});return new Xt({uploadedFileInfo:r})}render(){var l;const{files:r}=this.state,{element:t,disabled:n,widgetMgr:i}=this.props,o=t.type;this.formClearHelper.manageFormClearListener(i,t.formId,this.onFormCleared);const s=r.slice().reverse();return S(en,{className:"stFileUploader","data-testid":"stFileUploader",children:[p(Zt,{label:t.label,disabled:n,labelVisibility:Yt((l=t.labelVisibility)==null?void 0:l.value),children:t.help&&p(Gt,{children:p(qt,{content:t.help,placement:Jt.TOP_RIGHT})})}),p(rn,{onDrop:this.dropHandler,multiple:t.multipleFiles,acceptedExtensions:o,maxSizeBytes:this.maxUploadSizeInBytes,label:t.label,disabled:n}),s.length>0&&p(fn,{items:s,pageSize:3,onDelete:this.deleteFile,resetOnAdd:!0})]})}nextLocalFileId(){return this.localFileIdCounter++}}export{yn as default};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{n as R,r as o,a0 as U,ca as I,am as k,j as u,bc as z,bp as H,bd as L,aY as B,be as D,cc as j}from"./index.B8MC65SU.js";import{u as O}from"./uniqueId.B7repv29.js";import{u as _,a as K,b as q}from"./useOnInputChange.DK_jsnv_.js";import{a as w}from"./useBasicWidgetState.ZoM17KXF.js";import{I as A}from"./InputInstructions.BGz0VNnm.js";import{I as G}from"./input.BX19stYv.js";import"./inputUtils.CQWz5UKz.js";import"./FormClearHelper.0CIwSBFI.js";import"./base-input.Fk16kR45.js";const N=R("div",{target:"e6m0wlp0"})(({width:e})=>({position:"relative",width:e}));function rt({disabled:e,element:t,widgetMgr:s,width:n,fragmentId:m}){var g;const[r,l]=o.useState(S(s,t)??null),[i,d]=o.useState(!1),W=o.useCallback(()=>{l(t.default??null),d(!0)},[t.default]),[y,p]=w({getStateFromWidgetMgr:S,getDefaultStateFromProto:Y,getCurrStateFromProto:$,updateWidgetMgrState:J,element:t,widgetMgr:s,fragmentId:m,onFormCleared:W});_(y,r,l,i);const[T,h]=o.useState(!1),a=U(),[f]=o.useState(()=>O("text_input_")),{placeholder:x,formId:b}=t,c=o.useCallback(()=>{d(!1),p({value:r,fromUi:!0})},[r,p]),C=I({formId:b})?s.allowFormEnterToSubmit(b):i,V=T&&n>a.breakpoints.hideWidgetDetails,F=o.useCallback(()=>{i&&c(),h(!1)},[i,c]),v=o.useCallback(()=>{h(!0)},[]),E=K({formId:t.formId,maxChars:t.maxChars,setDirty:d,setUiValue:l,setValueWithSource:p}),P=q(t.formId,c,i,s,m);return k(N,{className:"stTextInput","data-testid":"stTextInput",width:n,children:[u(D,{label:t.label,disabled:e,labelVisibility:z((g=t.labelVisibility)==null?void 0:g.value),htmlFor:f,children:t.help&&u(H,{children:u(L,{content:t.help,placement:B.TOP_RIGHT})})}),u(G,{value:r??"",placeholder:x,onBlur:F,onFocus:v,onChange:E,onKeyPress:P,"aria-label":t.label,disabled:e,id:f,type:Q(t),autoComplete:t.autocomplete,overrides:{Input:{style:{minWidth:0,"::placeholder":{opacity:"0.7"},lineHeight:a.lineHeights.inputWidget,paddingRight:a.spacing.sm,paddingLeft:a.spacing.sm,paddingBottom:a.spacing.sm,paddingTop:a.spacing.sm}},Root:{props:{"data-testid":"stTextInputRootElement"},style:{height:a.sizes.minElementHeight,borderLeftWidth:a.sizes.borderWidth,borderRightWidth:a.sizes.borderWidth,borderTopWidth:a.sizes.borderWidth,borderBottomWidth:a.sizes.borderWidth}}}}),V&&u(A,{dirty:i,value:r??"",maxLength:t.maxChars,inForm:I({formId:t.formId}),allowEnterToSubmit:C})]})}function S(e,t){return e.getStringValue(t)??null}function Y(e){return e.default??null}function $(e){return e.value??null}function J(e,t,s,n){t.setStringValue(e,s.value,{fromUi:s.fromUi},n)}function Q(e){return e.type===j.Type.PASSWORD?"password":"text"}export{rt as default};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{n as l,am as g,j as s}from"./index.B8MC65SU.js";import{S as m,T as y}from"./Toolbar.U2Q07lHA.js";import{w as h,u as W,E as b}from"./withFullScreenWrapper.ByjGCoNh.js";const F=l("div",{target:"e1kqg1ss0"})(({theme:t})=>({display:"flex",flexDirection:"row",flexWrap:"wrap",rowGap:t.spacing.lg,maxWidth:"100%",width:"fit-content"})),O=l("div",{target:"e1kqg1ss1"})(({theme:t})=>({display:"flex",flexDirection:"column",alignItems:"stretch",width:"auto",flexGrow:0,">img":{borderRadius:t.radii.default}})),E=l("div",{target:"e1kqg1ss2"})(({theme:t})=>({fontFamily:t.genericFonts.bodyFont,fontSize:t.fontSizes.sm,color:t.colors.fadedText60,textAlign:"center",marginTop:t.spacing.xs,wordWrap:"break-word",padding:t.spacing.threeXS}));var p;(function(t){t[t.OriginalWidth=-1]="OriginalWidth",t[t.ColumnWidth=-2]="ColumnWidth",t[t.AutoWidth=-3]="AutoWidth",t[t.MinImageOrContainer=-4]="MinImageOrContainer",t[t.MaxImageOrContainer=-5]="MaxImageOrContainer"})(p||(p={}));function M({element:t,width:u,endpoints:f,disableFullscreenMode:x}){const{expanded:i,width:w,height:o,expand:C,collapse:I}=W(b),d=i?w:u;let a;const n=t.width;if([-1,-3,-4].includes(n))a=void 0;else if([-2,-5].includes(n))a=d;else if(n>0)a=n;else throw Error(`Invalid image width: ${n}`);const e={};return o&&i?(e.maxHeight=o,e.objectFit="contain"):(e.width=a,e.maxWidth="100%"),g(m,{width:d,height:o,useContainerWidth:i,topCentered:!0,children:[s(y,{target:m,isFullScreen:i,onExpand:C,onCollapse:I,disableFullscreenMode:x}),s(F,{className:"stImage","data-testid":"stImage",children:t.imgs.map((S,c)=>{const r=S;return g(O,{"data-testid":"stImageContainer",children:[s("img",{style:e,src:f.buildMediaURL(r.url),alt:c.toString()}),r.caption&&s(E,{"data-testid":"stImageCaption",style:e,children:` ${r.caption} `})]},c)})})]})}const q=h(M);export{q as default};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{r as o,E as X,_ as q,n as x,az as lt,ca as ut,D as Y,cl as I,A as f,am as z,j as u,bc as ct,bp as dt,bd as pt,aY as ft,be as bt,b9 as G}from"./index.B8MC65SU.js";import{s as mt}from"./sprintf.C-r3gIuM.js";import{u as yt}from"./uniqueId.B7repv29.js";import{u as gt}from"./FormClearHelper.0CIwSBFI.js";import{I as It}from"./InputInstructions.BGz0VNnm.js";import{I as ht}from"./input.BX19stYv.js";import"./base-input.Fk16kR45.js";var J=o.forwardRef(function(t,e){var r={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return o.createElement(X,q({iconAttrs:r,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},t,{ref:e}),o.createElement("path",{d:"M0 3v2h8V3H0z"}))});J.displayName="Minus";var Q=o.forwardRef(function(t,e){var r={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return o.createElement(X,q({iconAttrs:r,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},t,{ref:e}),o.createElement("path",{d:"M3 0v3H0v2h3v3h2V5h3V3H5V0H3z"}))});Q.displayName="Plus";const Ct=x("div",{target:"e6j74ky0"})(({theme:t})=>({display:"flex",flexDirection:"row",flexWrap:"nowrap",alignItems:"center",height:t.sizes.minElementHeight,borderWidth:t.sizes.borderWidth,borderStyle:"solid",borderColor:t.colors.widgetBorderColor||t.colors.widgetBackgroundColor||t.colors.bgColor,transitionDuration:"200ms",transitionProperty:"border",transitionTimingFunction:"cubic-bezier(0.2, 0.8, 0.4, 1)",borderRadius:t.radii.default,overflow:"hidden","&.focused":{borderColor:t.colors.primary},input:{MozAppearance:"textfield","&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{WebkitAppearance:"none",margin:t.spacing.none}}})),Tt=x("div",{target:"e6j74ky1"})({display:"flex",flexDirection:"row",alignSelf:"stretch"}),K=x("button",{target:"e6j74ky2"})(({theme:t})=>({margin:t.spacing.none,border:"none",height:t.sizes.full,display:"flex",alignItems:"center",width:t.sizes.numberInputControlsWidth,justifyContent:"center",color:t.colors.bodyText,transition:"color 300ms, backgroundColor 300ms",backgroundColor:t.colors.widgetBackgroundColor||t.colors.secondaryBg,"&:hover:enabled, &:focus:enabled":{color:t.colors.white,backgroundColor:t.colors.primary,transition:"none",outline:"none"},"&:active":{outline:"none",border:"none"},"&:last-of-type":{borderTopRightRadius:t.radii.default,borderBottomRightRadius:t.radii.default},"&:disabled":{cursor:"not-allowed",color:t.colors.fadedText40}})),wt=x("div",{target:"e6j74ky3"})(({theme:t,clearable:e})=>({position:"absolute",marginRight:t.spacing.twoXS,left:0,right:`calc(${t.sizes.numberInputControlsWidth} * 2 + ${e?"1em":"0em"})`}));function kt(t){return f(t)||t===""?void 0:t}const St=t=>(t.element.dataType===I.DataType.INT?t.widgetMgr.getIntValue(t.element):t.widgetMgr.getDoubleValue(t.element))??t.element.default??null,M=({step:t,dataType:e})=>t||(e===I.DataType.INT?1:.01),W=({value:t,format:e,step:r,dataType:h})=>{if(f(t))return null;let a=kt(e);if(f(a)&&Y(r)){const c=r.toString();h===I.DataType.FLOAT&&r!==0&&c.includes(".")&&(a=`%0.${c.split(".")[1].length}f`)}if(f(a))return t.toString();try{return mt.sprintf(a,t)}catch{return String(t)}},Vt=(t,e,r)=>f(t)?!1:t-e>=r,vt=(t,e,r)=>f(t)?!1:t+e<=r,xt=({disabled:t,element:e,widgetMgr:r,width:h,theme:a,fragmentId:c})=>{var $;const{dataType:w,id:D,formId:p,default:B,format:A}=e,b=e.hasMin?e.min:-1/0,m=e.hasMax?e.max:1/0,[s,Z]=o.useState(M(e)),U=St({element:e,widgetMgr:r}),[y,C]=o.useState(!1),[i,T]=o.useState(U),[H,k]=o.useState(W({value:U,...e,step:s})),[P,j]=o.useState(!1),R=o.useRef(null),L=o.useRef(yt("number_input_")),S=Vt(i,s,b),V=vt(i,s,m),O=ut({formId:p}),tt=O?r.allowFormEnterToSubmit(p):y,et=P&&h>a.breakpoints.hideWidgetDetails;o.useEffect(()=>{Z(M({step:e.step,dataType:e.dataType}))},[e.dataType,e.step]);const l=o.useCallback(({value:n,source:d})=>{var g;if(Y(n)&&(b>n||n>m))(g=R.current)==null||g.reportValidity();else{const v=n??B??null;switch(w){case I.DataType.INT:r.setIntValue({id:D,formId:p},v,d,c);break;case I.DataType.FLOAT:r.setDoubleValue({id:D,formId:p},v,d,c);break;default:throw new Error("Invalid data type")}C(!1),T(v),k(W({value:v,dataType:w,format:A,step:s}))}},[b,m,R,r,c,s,w,D,p,B,A]),ot=o.useCallback(()=>{y&&l({value:i,source:{fromUi:!0}}),j(!1)},[y,i,l]),rt=o.useCallback(()=>{j(!0)},[]),_=o.useCallback(()=>{const{value:n}=e;e.setValue=!1,T(n??null),k(W({value:n??null,...e,step:s})),l({value:n??null,source:{fromUi:!1}})},[e,s,l]);o.useEffect(()=>{e.setValue?_():l({value:i,source:{fromUi:!1}})},[]),e.setValue&&_();const N=f(e.default)&&!t,nt=o.useCallback(()=>{const n=e.default??null;T(n),l({value:n,source:{fromUi:!0}})},[e]);gt({element:e,widgetMgr:r,onFormCleared:nt});const at=n=>{const{value:d}=n.target;if(d==="")C(!0),T(null),k(null);else{let g;e.dataType===I.DataType.INT?g=parseInt(d,10):g=parseFloat(d),C(!0),T(g),k(d)}},F=o.useCallback(()=>{V&&(C(!0),l({value:(i??b)+s,source:{fromUi:!0}}))},[i,b,s,V]),E=o.useCallback(()=>{S&&(C(!0),l({value:(i??m)-s,source:{fromUi:!0}}))},[i,m,s,S]),st=o.useCallback(n=>{const{key:d}=n;switch(d){case"ArrowUp":n.preventDefault(),F();break;case"ArrowDown":n.preventDefault(),E();break}},[F,E]),it=o.useCallback(n=>{n.key==="Enter"&&(y&&l({value:i,source:{fromUi:!0}}),r.allowFormEnterToSubmit(p)&&r.submitForm(p,c))},[y,i,l,r,p,c]);return z("div",{className:"stNumberInput","data-testid":"stNumberInput",style:{width:h},children:[u(bt,{label:e.label,disabled:t,labelVisibility:ct(($=e.labelVisibility)==null?void 0:$.value),htmlFor:L.current,children:e.help&&u(dt,{children:u(pt,{content:e.help,placement:ft.TOP_RIGHT})})}),z(Ct,{className:P?"focused":"","data-testid":"stNumberInputContainer",children:[u(ht,{type:"number",inputRef:R,value:H??"",placeholder:e.placeholder,onBlur:ot,onFocus:rt,onChange:at,onKeyPress:it,onKeyDown:st,clearable:N,clearOnEscape:N,disabled:t,"aria-label":e.label,id:L.current,overrides:{ClearIconContainer:{style:{padding:0}},ClearIcon:{props:{overrides:{Svg:{style:{color:a.colors.darkGray,padding:a.spacing.threeXS,height:a.sizes.clearIconSize,width:a.sizes.clearIconSize,":hover":{fill:a.colors.bodyText}}}}}},Input:{props:{"data-testid":"stNumberInputField",step:s,min:b,max:m,type:"number",inputMode:""},style:{lineHeight:a.lineHeights.inputWidget,paddingRight:a.spacing.sm,paddingLeft:a.spacing.sm,paddingBottom:a.spacing.sm,paddingTop:a.spacing.sm}},InputContainer:{style:()=>({borderTopRightRadius:0,borderBottomRightRadius:0})},Root:{style:{borderTopRightRadius:0,borderBottomRightRadius:0,borderLeftWidth:0,borderRightWidth:0,borderTopWidth:0,borderBottomWidth:0,paddingRight:0}}}}),h>a.breakpoints.hideNumberInputControls&&z(Tt,{children:[u(K,{"data-testid":"stNumberInputStepDown",onClick:E,disabled:!S||t,tabIndex:-1,children:u(G,{content:J,size:"xs",color:S?"inherit":"disabled"})}),u(K,{"data-testid":"stNumberInputStepUp",onClick:F,disabled:!V||t,tabIndex:-1,children:u(G,{content:Q,size:"xs",color:V?"inherit":"disabled"})})]})]}),et&&u(wt,{clearable:N,children:u(It,{dirty:y,value:H??"",inForm:O,allowEnterToSubmit:tt})})]})},Bt=lt(xt);export{Bt as default};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{n as e,b7 as t,i as d,R as l,al as c,bN as p,j as i,bO as g,am as S,ag as u}from"./index.B8MC65SU.js";const b=e(t,{shouldForwardProp:d,target:"edrijs90"})(({theme:s,usingCustomTheme:r})=>({fontSize:s.fontSizes.sm,width:s.sizes.spinnerSize,height:s.sizes.spinnerSize,borderWidth:s.sizes.spinnerThickness,radius:s.radii.md,justifyContents:"center",padding:s.spacing.none,margin:s.spacing.none,borderColor:s.colors.borderColor,borderTopColor:r?s.colors.primary:s.colors.blue70,flexGrow:0,flexShrink:0})),C=e("div",{target:"edrijs91"})(({theme:s,width:r,cache:n})=>({width:r,...n?{paddingBottom:s.spacing.lg,background:`linear-gradient(to bottom, ${s.colors.bgColor} 0%, ${s.colors.bgColor} 80%, transparent 100%)`}:null})),f=e("div",{target:"edrijs92"})(({theme:s})=>({display:"flex",gap:s.spacing.sm,alignItems:"center",width:"100%"}));function y({width:s,element:r}){const{activeTheme:n}=l.useContext(c),a=!p(n),{cache:o}=r;return i(C,{className:g({stSpinner:!0,stCacheSpinner:o}),"data-testid":"stSpinner",width:s,cache:o,children:S(f,{children:[i(b,{usingCustomTheme:a}),i(u,{source:r.text,allowHTML:!1})]})})}export{y as default};
|
File without changes
|
@@ -1,67 +0,0 @@
|
|
1
|
-
# BSD 3-Clause License
|
2
|
-
#
|
3
|
-
# - Copyright (c) 2008-Present, IPython Development Team
|
4
|
-
# - Copyright (c) 2001-2007, Fernando Perez <fernando.perez@colorado.edu>
|
5
|
-
# - Copyright (c) 2001, Janko Hauser <jhauser@zscout.de>
|
6
|
-
# - Copyright (c) 2001, Nathaniel Gray <n8gray@caltech.edu>
|
7
|
-
#
|
8
|
-
# All rights reserved.
|
9
|
-
#
|
10
|
-
# Redistribution and use in source and binary forms, with or without
|
11
|
-
# modification, are permitted provided that the following conditions are met:
|
12
|
-
#
|
13
|
-
# * Redistributions of source code must retain the above copyright notice, this
|
14
|
-
# list of conditions and the following disclaimer.
|
15
|
-
|
16
|
-
# * Redistributions in binary form must reproduce the above copyright notice,
|
17
|
-
# this list of conditions and the following disclaimer in the documentation
|
18
|
-
# and/or other materials provided with the distribution.
|
19
|
-
|
20
|
-
# * Neither the name of the copyright holder nor the names of its
|
21
|
-
# contributors may be used to endorse or promote products derived from
|
22
|
-
# this software without specific prior written permission.
|
23
|
-
|
24
|
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
25
|
-
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
26
|
-
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
27
|
-
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
28
|
-
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
29
|
-
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
30
|
-
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
31
|
-
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
32
|
-
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
33
|
-
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
34
|
-
|
35
|
-
# Code modified from IPython (BSD license)
|
36
|
-
# Source: https://github.com/ipython/ipython/blob/master/IPython/utils/syspathcontext.py#L42
|
37
|
-
|
38
|
-
import sys
|
39
|
-
|
40
|
-
from streamlit import util
|
41
|
-
|
42
|
-
|
43
|
-
class modified_sys_path:
|
44
|
-
"""A context for prepending a directory to sys.path for a second."""
|
45
|
-
|
46
|
-
def __init__(self, main_script_path: str):
|
47
|
-
self._main_script_path = main_script_path
|
48
|
-
self._added_path = False
|
49
|
-
|
50
|
-
def __repr__(self) -> str:
|
51
|
-
return util.repr_(self)
|
52
|
-
|
53
|
-
def __enter__(self):
|
54
|
-
if self._main_script_path not in sys.path:
|
55
|
-
sys.path.insert(0, self._main_script_path)
|
56
|
-
self._added_path = True
|
57
|
-
|
58
|
-
def __exit__(self, type, value, traceback):
|
59
|
-
if self._added_path:
|
60
|
-
try:
|
61
|
-
sys.path.remove(self._main_script_path)
|
62
|
-
except ValueError:
|
63
|
-
# It's already removed.
|
64
|
-
pass
|
65
|
-
|
66
|
-
# Returning False causes any exceptions to be re-raised.
|
67
|
-
return False
|