streamlit-nightly 1.52.3.dev20260101__py3-none-any.whl → 1.52.3.dev20260102__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 +1 -1
- streamlit/__main__.py +1 -1
- streamlit/auth_util.py +1 -1
- 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/components/v2/__init__.py +1 -1
- streamlit/components/v2/bidi_component/__init__.py +1 -1
- streamlit/components/v2/bidi_component/constants.py +1 -1
- streamlit/components/v2/bidi_component/main.py +1 -1
- streamlit/components/v2/bidi_component/serialization.py +1 -1
- streamlit/components/v2/bidi_component/state.py +1 -1
- streamlit/components/v2/component_definition_resolver.py +1 -1
- streamlit/components/v2/component_file_watcher.py +1 -1
- streamlit/components/v2/component_manager.py +1 -1
- streamlit/components/v2/component_manifest_handler.py +1 -1
- streamlit/components/v2/component_path_utils.py +1 -1
- streamlit/components/v2/component_registry.py +1 -1
- streamlit/components/v2/get_bidi_component_manager.py +1 -1
- streamlit/components/v2/manifest_scanner.py +1 -1
- streamlit/components/v2/presentation.py +1 -1
- streamlit/components/v2/types.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/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/layout_utils.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/shortcut_utils.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/pdf.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/space.py +1 -1
- streamlit/elements/spinner.py +1 -1
- 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 +1 -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/ArrowData_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.pyi +1 -1
- streamlit/proto/AutoRerun_pb2.pyi +1 -1
- streamlit/proto/BackMsg_pb2.pyi +1 -1
- streamlit/proto/Balloons_pb2.pyi +1 -1
- streamlit/proto/BidiComponent_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/ButtonLikeIconPosition_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/DateTimeInput_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.pyi +1 -1
- streamlit/proto/GapSize_pb2.pyi +1 -1
- streamlit/proto/GitInfo_pb2.pyi +1 -1
- streamlit/proto/GraphVizChart_pb2.pyi +1 -1
- streamlit/proto/Heading_pb2.pyi +1 -1
- streamlit/proto/HeightConfig_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/Space_pb2.pyi +1 -1
- streamlit/proto/Spinner_pb2.pyi +1 -1
- streamlit/proto/TextAlignmentConfig_pb2.pyi +1 -1
- 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/Transient_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/WidthConfig_pb2.pyi +1 -1
- streamlit/proto/__init__.py +1 -1
- streamlit/runtime/__init__.py +1 -1
- streamlit/runtime/app_session.py +1 -1
- 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/caching/ttl_cleanup_cache.py +1 -1
- streamlit/runtime/connection_factory.py +1 -1
- streamlit/runtime/context.py +1 -1
- streamlit/runtime/context_util.py +1 -1
- streamlit/runtime/credentials.py +1 -1
- streamlit/runtime/download_data_util.py +1 -1
- streamlit/runtime/forward_msg_cache.py +1 -1
- streamlit/runtime/forward_msg_queue.py +1 -1
- streamlit/runtime/fragment.py +1 -1
- 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 +1 -1
- streamlit/runtime/pages_manager.py +1 -1
- streamlit/runtime/runtime.py +1 -1
- 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 +1 -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 +1 -1
- streamlit/runtime/scriptrunner_utils/__init__.py +1 -1
- streamlit/runtime/scriptrunner_utils/exceptions.py +1 -1
- streamlit/runtime/scriptrunner_utils/script_requests.py +1 -1
- streamlit/runtime/scriptrunner_utils/script_run_context.py +1 -1
- streamlit/runtime/secrets.py +1 -1
- streamlit/runtime/session_manager.py +1 -1
- streamlit/runtime/state/__init__.py +1 -1
- streamlit/runtime/state/common.py +1 -1
- streamlit/runtime/state/presentation.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/theme_util.py +1 -1
- streamlit/runtime/uploaded_file_manager.py +1 -1
- streamlit/runtime/websocket_session_manager.py +1 -1
- streamlit/source_util.py +1 -1
- streamlit/static/index.html +2 -2
- streamlit/static/manifest.json +299 -299
- streamlit/static/static/js/{ErrorOutline.esm.bKqSjdNS.js → ErrorOutline.esm.0yuPC2le.js} +1 -1
- streamlit/static/static/js/{FileDownload.esm.DYcl0HsS.js → FileDownload.esm.3-xCz5Dn.js} +1 -1
- streamlit/static/static/js/{FileHelper.BG4elCiu.js → FileHelper.B7p1stfH.js} +1 -1
- streamlit/static/static/js/{FormClearHelper.CcrsaZUN.js → FormClearHelper.2gb34MMC.js} +1 -1
- streamlit/static/static/js/InputInstructions.CMaz--YN.js +1 -0
- streamlit/static/static/js/Particles.DD6E7DiG.js +1 -0
- streamlit/static/static/js/{ProgressBar.D54tj-jr.js → ProgressBar.CBHvskJx.js} +1 -1
- streamlit/static/static/js/{StreamlitSyntaxHighlighter.D6tqIUNe.js → StreamlitSyntaxHighlighter.Cbd0Ng31.js} +1 -1
- streamlit/static/static/js/{TableChart.esm.BsEqAKaW.js → TableChart.esm.DkPOnPiP.js} +1 -1
- streamlit/static/static/js/Toolbar.uViLYWIL.js +1 -0
- streamlit/static/static/js/{WidgetLabelHelpIconInline.tetiwgyt.js → WidgetLabelHelpIconInline.DrQP-jZR.js} +1 -1
- streamlit/static/static/js/{base-input.bCQ8S-FY.js → base-input.CWLDgMIQ.js} +1 -1
- streamlit/static/static/js/{checkbox.SvhUmEPl.js → checkbox.lSnX8MiZ.js} +1 -1
- streamlit/static/static/js/{createDownloadLinkElement.mdzy2wqu.js → createDownloadLinkElement.qE-XPzHd.js} +1 -1
- streamlit/static/static/js/{data-grid-overlay-editor.BRpG6UuQ.js → data-grid-overlay-editor.CixSgiOW.js} +1 -1
- streamlit/static/static/js/{downloader.BFho_Alx.js → downloader.BR9PJ-pW.js} +1 -1
- streamlit/static/static/js/{embed.CjSf3HQ8.js → embed.C4scQ-hW.js} +1 -1
- streamlit/static/static/js/{es6.DnRofDlD.js → es6.NjGX1Pno.js} +2 -2
- streamlit/static/static/js/{formatNumber.CtWVEKkt.js → formatNumber.DwAT32vb.js} +1 -1
- streamlit/static/static/js/{iconPosition.Docx9KVT.js → iconPosition.BF4yacmi.js} +1 -1
- streamlit/static/static/js/{iframeResizer.contentWindow.DPJjr14X.js → iframeResizer.contentWindow.BGF3G8-a.js} +1 -1
- streamlit/static/static/js/{index.-Uw_gjRk.js → index.-zR4Ojkd.js} +1 -1
- streamlit/static/static/js/{index.BkQCUqLQ.js → index.47QtlXbw.js} +2 -2
- streamlit/static/static/js/{index.D9DEa36h.js → index.AbRqTgeF.js} +1 -1
- streamlit/static/static/js/{index.BWwP9fh8.js → index.B2FiJl2X.js} +1 -1
- streamlit/static/static/js/{index.C40Nq5m8.js → index.BD8Aa49F.js} +1 -1
- streamlit/static/static/js/{index.8C-cS-O4.js → index.BDI5MuEQ.js} +2 -2
- streamlit/static/static/js/index.BMEupOtG.js +1 -0
- streamlit/static/static/js/index.BMxizVm_.js +1 -0
- streamlit/static/static/js/{index.CqMzbjp5.js → index.BO_-eOf-.js} +1 -1
- streamlit/static/static/js/{index.zN5Ficl0.js → index.BQm1_d2O.js} +2 -2
- streamlit/static/static/js/{index.DYR3j5ZF.js → index.B_rx628n.js} +1 -1
- streamlit/static/static/js/index.BdVxH2a1.js +2 -0
- streamlit/static/static/js/index.BduCcO_U.js +1 -0
- streamlit/static/static/js/{index.B4jgy50K.js → index.Bh-DEB0O.js} +1 -1
- streamlit/static/static/js/index.BibdADOD.js +1 -0
- streamlit/static/static/js/index.BsbD_ZbU.js +1 -0
- streamlit/static/static/js/{index.BZFLbiyp.js → index.Bu9qeYdI.js} +1 -1
- streamlit/static/static/js/index.BxQj1n_M.js +1 -0
- streamlit/static/static/js/{index.CggOKbv5.js → index.C1zhyjFt.js} +1 -1
- streamlit/static/static/js/{index.B-k1aQD6.js → index.C3Czde8V.js} +1 -1
- streamlit/static/static/js/{index.DzWfLgsQ.js → index.C4N9_AWk.js} +1 -1
- streamlit/static/static/js/{index.CNXi20U2.js → index.CSPw4GmF.js} +1 -1
- streamlit/static/static/js/{index.C8fg6FO8.js → index.CU6HHyYl.js} +2 -2
- streamlit/static/static/js/{index.D5m5f2G-.js → index.CW9ezGuy.js} +1 -1
- streamlit/static/static/js/{index.2hZ1_TTv.js → index.CYAiwpaf.js} +1 -1
- streamlit/static/static/js/{index.C3MpZoqE.js → index.Cd-5Vmzk.js} +1 -1
- streamlit/static/static/js/index.Ce0tmU7o.js +1 -0
- streamlit/static/static/js/index.Cio1dNsf.js +1 -0
- streamlit/static/static/js/index.CrqhxXJA.js +1 -0
- streamlit/static/static/js/{index.BakUx9hH.js → index.CsbjfvSm.js} +1 -1
- streamlit/static/static/js/{index.8I6SAQDm.js → index.D1JGP_72.js} +1 -1
- streamlit/static/static/js/{index.qg9M6uCh.js → index.DD6jbP16.js} +1 -1
- streamlit/static/static/js/{index.s88CwlpG.js → index.DEF4aL6h.js} +8 -8
- streamlit/static/static/js/{index.Dodgg4y_.js → index.DLYqRljk.js} +1 -1
- streamlit/static/static/js/index.DPeqx79l.js +7 -0
- streamlit/static/static/js/{index.Zx7pc4Ib.js → index.DPn1549d.js} +1 -1
- streamlit/static/static/js/{index.Bd9Ju7cE.js → index.DUS_Khvb.js} +1 -1
- streamlit/static/static/js/{index.CTdvJfB7.js → index.D_zZYX-F.js} +2 -2
- streamlit/static/static/js/index.DgxjQf8D.js +1 -0
- streamlit/static/static/js/{index.3BdSdx9Q.js → index.DkQIXYcv.js} +1 -1
- streamlit/static/static/js/{index.DF31ixLt.js → index.Duio3diQ.js} +2 -2
- streamlit/static/static/js/index.DwRMR_Ao.js +1 -0
- streamlit/static/static/js/index.Es18h2ap.js +1 -0
- streamlit/static/static/js/{index.BE-_bdmf.js → index.L46XQsIY.js} +2 -2
- streamlit/static/static/js/{index.DQm9mE0T.js → index.ayxJkxJS.js} +24 -24
- streamlit/static/static/js/index.dPnBpGLy.js +1 -0
- streamlit/static/static/js/{index.HrvNEmn1.js → index.iV4zN5GV.js} +1 -1
- streamlit/static/static/js/index.x9TEvcRW.js +1 -0
- streamlit/static/static/js/{input.DnsJ8I9O.js → input.BViGVyAy.js} +1 -1
- streamlit/static/static/js/{main.Cs9yv8mP.js → main.DCurQa2X.js} +1 -1
- streamlit/static/static/js/{memory.CnMAyKwP.js → memory.CeqRSVmL.js} +1 -1
- streamlit/static/static/js/{number-overlay-editor.CMfbFJmW.js → number-overlay-editor.BNei35vX.js} +1 -1
- streamlit/static/static/js/{pandasStylerUtils.pLaEIPZw.js → pandasStylerUtils.BQNPcCRH.js} +1 -1
- streamlit/static/static/js/{sandbox.BcdOGz3D.js → sandbox.Bkc6ExUI.js} +1 -1
- streamlit/static/static/js/styled-components.C0Ar4ws1.js +1 -0
- streamlit/static/static/js/{throttle.DM63_0Ui.js → throttle.DpJVqfiM.js} +1 -1
- streamlit/static/static/js/{timepicker.pd9YKJun.js → timepicker.plxFjD2l.js} +1 -1
- streamlit/static/static/js/{toConsumableArray.C-vxP4eC.js → toConsumableArray.nocm-m15.js} +1 -1
- streamlit/static/static/js/uniqueId.BgdRqRrS.js +1 -0
- streamlit/static/static/js/{useBasicWidgetState.S1_DeDAF.js → useBasicWidgetState.CD1aG6-a.js} +1 -1
- streamlit/static/static/js/{useIntlLocale.BwbkZTj-.js → useIntlLocale.DLuHgCFO.js} +1 -1
- streamlit/static/static/js/{useTextInputAutoExpand.DJy7lTuU.js → useTextInputAutoExpand.5E_gpUfB.js} +1 -1
- streamlit/static/static/js/{useUpdateUiValue.KsXqwLCs.js → useUpdateUiValue.DWX5Hfxx.js} +1 -1
- streamlit/static/static/js/{useWaveformController.DQSftrKy.js → useWaveformController.B3tf7xqQ.js} +1 -1
- streamlit/static/static/js/{withCalculatedWidth.Cf1aBuuB.js → withCalculatedWidth.kZou334h.js} +1 -1
- streamlit/static/static/js/withFullScreenWrapper.DGTtbbLe.js +1 -0
- 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 +1 -1
- streamlit/user_info.py +1 -1
- 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 +1 -1
- streamlit/web/server/bidi_component_request_handler.py +1 -1
- streamlit/web/server/browser_websocket_handler.py +1 -1
- streamlit/web/server/component_file_utils.py +1 -1
- 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 +1 -1
- streamlit/web/server/oidc_mixin.py +1 -1
- streamlit/web/server/routes.py +1 -1
- streamlit/web/server/server.py +1 -1
- streamlit/web/server/server_util.py +1 -1
- streamlit/web/server/stats_request_handler.py +1 -1
- streamlit/web/server/upload_file_request_handler.py +1 -1
- streamlit/web/server/websocket_headers.py +1 -1
- {streamlit_nightly-1.52.3.dev20260101.data → streamlit_nightly-1.52.3.dev20260102.data}/scripts/streamlit.cmd +1 -1
- {streamlit_nightly-1.52.3.dev20260101.dist-info → streamlit_nightly-1.52.3.dev20260102.dist-info}/METADATA +1 -1
- streamlit_nightly-1.52.3.dev20260102.dist-info/RECORD +630 -0
- streamlit/static/static/js/InputInstructions.B-hrhnKS.js +0 -1
- streamlit/static/static/js/Particles.C1lQDBme.js +0 -1
- streamlit/static/static/js/Toolbar.COFccaTT.js +0 -1
- streamlit/static/static/js/index.B-2OnxuC.js +0 -1
- streamlit/static/static/js/index.BPDinT9W.js +0 -1
- streamlit/static/static/js/index.BWYs56td.js +0 -1
- streamlit/static/static/js/index.Bt-J_LLo.js +0 -1
- streamlit/static/static/js/index.BukrvZZ2.js +0 -1
- streamlit/static/static/js/index.CFRlw_Q4.js +0 -1
- streamlit/static/static/js/index.CoOQHuCm.js +0 -1
- streamlit/static/static/js/index.D3xfIqy_.js +0 -1
- streamlit/static/static/js/index.D67NXgZL.js +0 -1
- streamlit/static/static/js/index.DEUimtV1.js +0 -1
- streamlit/static/static/js/index.DK27W5ov.js +0 -1
- streamlit/static/static/js/index.DWUM7LrZ.js +0 -1
- streamlit/static/static/js/index.DaxZAmvz.js +0 -2
- streamlit/static/static/js/index.Dq9InAZx.js +0 -1
- streamlit/static/static/js/index.DtZbhbEr.js +0 -7
- streamlit/static/static/js/index.f-UZuoZE.js +0 -1
- streamlit/static/static/js/styled-components.571s8DEN.js +0 -1
- streamlit/static/static/js/uniqueId.Cx7-DRlG.js +0 -1
- streamlit/static/static/js/withFullScreenWrapper.BBQ6--wm.js +0 -1
- streamlit_nightly-1.52.3.dev20260101.dist-info/RECORD +0 -630
- {streamlit_nightly-1.52.3.dev20260101.dist-info → streamlit_nightly-1.52.3.dev20260102.dist-info}/WHEEL +0 -0
- {streamlit_nightly-1.52.3.dev20260101.dist-info → streamlit_nightly-1.52.3.dev20260102.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.52.3.dev20260101.dist-info → streamlit_nightly-1.52.3.dev20260102.dist-info}/top_level.txt +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aw as j,j as m,ax as U,ae as z,P as $,ay as _,q as X,az as q,m as G,e as Z,r as s,l as J,aA as K,L as Q,o as oo,p as to,ab as ro,ac as eo}from"./index.
|
|
1
|
+
import{aw as j,j as m,ax as U,ae as z,P as $,ay as _,q as X,az as q,m as G,e as Z,r as s,l as J,aA as K,L as Q,o as oo,p as to,ab as ro,ac as eo}from"./index.ayxJkxJS.js";import{h as x}from"./moment.C7qA8nIE.js";import{u as no,D as ao,a as so}from"./useIntlLocale.DLuHgCFO.js";import{u as io}from"./useBasicWidgetState.CD1aG6-a.js";import{S as lo}from"./styled-components.C0Ar4ws1.js";import{E as co}from"./ErrorOutline.esm.0yuPC2le.js";import"./timepicker.plxFjD2l.js";import"./input.BViGVyAy.js";import"./base-input.CWLDgMIQ.js";import"./FormClearHelper.2gb34MMC.js";const po=({theme:o,isInSidebar:t,step:r,minTime:c,maxTime:u,disabled:p,clearable:g,error:e})=>({Popover:{props:{ignoreBoundary:t,placement:U.bottomLeft,overrides:{Body:{style:{marginTop:o.spacing.px}}}}},CalendarContainer:{style:{fontSize:o.fontSizes.sm,paddingRight:o.spacing.sm,paddingLeft:o.spacing.sm,paddingBottom:o.spacing.none,paddingTop:o.spacing.sm}},Week:{style:{fontSize:o.fontSizes.sm}},Day:{style:({$pseudoHighlighted:i,$pseudoSelected:a,$selected:T,$isHovered:y})=>({fontSize:o.fontSizes.sm,lineHeight:o.lineHeights.base,"::before":{backgroundColor:T||a||i||y?`${o.colors.darkenedBgMix15} !important`:o.colors.transparent},"::after":{borderColor:o.colors.transparent},...G(o)&&y&&a&&!T?{color:o.colors.secondaryBg}:{}})},PrevButton:{style:()=>({display:"flex",alignItems:"center",justifyContent:"center",":active":{backgroundColor:o.colors.transparent},":focus":{backgroundColor:o.colors.transparent,outline:0}})},NextButton:{style:()=>({display:"flex",alignItems:"center",justifyContent:"center",":active":{backgroundColor:o.colors.transparent},":focus":{backgroundColor:o.colors.transparent,outline:0}})},Input:{props:{maskChar:null,endEnhancer:e&&m(q,{content:m(X,{source:e,allowHTML:!1}),placement:$.TOP_RIGHT,error:!0,children:m(_,{content:co,size:"lg"})}),overrides:{EndEnhancer:{style:{color:e?o.colors.redTextColor:o.colors.grayTextColor,backgroundColor:o.colors.transparent}},Root:{style:({$isFocused:i})=>{const a=z(o.colors,i);return{borderLeftWidth:o.sizes.borderWidth,borderRightWidth:o.sizes.borderWidth,borderTopWidth:o.sizes.borderWidth,borderBottomWidth:o.sizes.borderWidth,paddingRight:o.spacing.twoXS,borderTopColor:a,borderRightColor:a,borderBottomColor:a,borderLeftColor:a,...e&&{backgroundColor:o.colors.redBackgroundColor}}}},ClearIcon:{props:{overrides:{Svg:{style:{color:o.colors.grayTextColor,padding:o.spacing.threeXS,height:o.sizes.clearIconSize,width:o.sizes.clearIconSize,":hover":{fill:o.colors.bodyText}}}}}},InputContainer:{style:{backgroundColor:"transparent"}},Input:{style:{fontWeight:o.fontWeights.normal,paddingRight:o.spacing.sm,paddingLeft:o.spacing.md,paddingBottom:o.spacing.sm,paddingTop:o.spacing.sm,lineHeight:o.lineHeights.inputWidget,"::placeholder":{color:o.colors.fadedText60},...e&&{color:o.colors.redTextColor}},props:{"data-testid":"stDateTimeInputField"}}}}},TimeSelectContainer:{style:{paddingTop:o.spacing.none,paddingBottom:o.spacing.none}},TimeSelectFormControl:{style:{marginBottom:o.spacing.none},props:{overrides:{Label:{component:()=>null}}}},TimeSelect:{props:{step:r,format:"24",disabled:p,nullable:g,minTime:c,maxTime:u,overrides:{Select:{props:{disabled:p,overrides:{ControlContainer:{style:({$isFocused:i})=>{const a=z(o.colors,i);return{height:o.sizes.minElementHeight,borderLeftWidth:o.sizes.borderWidth,borderRightWidth:o.sizes.borderWidth,borderTopWidth:o.sizes.borderWidth,borderBottomWidth:o.sizes.borderWidth,borderTopColor:a,borderRightColor:a,borderBottomColor:a,borderLeftColor:a}}},IconsContainer:{style:()=>({paddingRight:o.spacing.sm})},ValueContainer:{style:()=>({lineHeight:o.lineHeights.inputWidget,paddingRight:o.spacing.sm,paddingLeft:o.spacing.md,paddingBottom:o.spacing.sm,paddingTop:o.spacing.sm})},SingleValue:{style:{fontWeight:o.fontWeights.normal},props:{"data-testid":"stDateTimeInputTimeDisplay"}},Dropdown:{style:()=>({paddingTop:o.spacing.none,paddingBottom:o.spacing.none,boxShadow:"none",maxHeight:o.sizes.maxDropdownHeight})},DropdownListItem:{component:lo},Popover:{props:{ignoreBoundary:t,overrides:{Body:{style:()=>({marginTop:o.spacing.px})}}}},Placeholder:{style:()=>({color:o.colors.fadedText60})},SelectArrow:{component:j,props:{overrides:{Svg:{style:()=>({width:o.iconSizes.xl,height:o.iconSizes.xl})}}}}}}}}}}}),h="YYYY/MM/DD, HH:mm",go=(o,t)=>{const r=o.getStringArrayValue(t);return r&&r.length>0?r[0]:null},uo=o=>o.default?.length?o.default[0]:null,fo=o=>o.value?.length?o.value[0]:null,k=o=>{let t;if(Array.isArray(o)?t=o.find(c=>c instanceof Date):t=o,!t||Number.isNaN(t.getTime()))return null;const r=new Date(t.getTime());return r.setSeconds(0,0),r},b=o=>{if(Z(o)||o==="")return null;const t=x(o,h,!0);return t.isValid()?k(t.toDate()):null},B=(o,t)=>o.getFullYear()===t.getFullYear()&&o.getMonth()===t.getMonth()&&o.getDate()===t.getDate(),I=(o,t)=>{const r=new Date(o.getTime());return r.setHours(t.getHours(),t.getMinutes(),0,0),r},mo=(o,t,r,c)=>{const u=b(o.min),p=b(o.max),g=e=>{t.setStringArrayValue(o,e?[e]:[],{fromUi:r.fromUi},c)};if(r.value){const e=b(r.value);if(e){u&&e<u||p&&e>p||g(r.value);return}}g(r.value)};function bo({disabled:o,element:t,widgetMgr:r,fragmentId:c}){const u=J(),p=s.useContext(K),g=s.useRef(null),[e,i]=io({getStateFromWidgetMgr:go,getDefaultStateFromProto:uo,getCurrStateFromProto:fo,updateWidgetMgrState:mo,element:t,widgetMgr:r,fragmentId:c}),{locale:a}=s.useContext(Q),T=no(a),y=t.step?Number(t.step):900,l=s.useMemo(()=>b(t.min),[t.min]),d=s.useMemo(()=>b(t.max),[t.max]),C=s.useMemo(()=>b(e),[e]),[n,v]=s.useState(C),[M,L]=s.useState(C);C!==M&&(v(C),L(C));const H=l??void 0,V=d??void 0,A=s.useMemo(()=>{if(!(!n||!l))return B(n,l)?I(n,l):void 0},[n,l]),E=s.useMemo(()=>{if(!(!n||!d))return B(n,d)?I(n,d):void 0},[n,d]),P=t.format.replaceAll(/[a-zA-Z]/g,"9"),D=`${t.format.replaceAll("Y","y").replaceAll("D","d")}, HH:mm`,w=`${P}, 99:99`,R=`${t.format}, HH:MM`,W=(t.default&&t.default.length>0?t.default[0]:"").length===0&&!o,F=s.useMemo(()=>{if(!n)return null;if(l&&n<l||d&&n>d){const f=x(l).format(D),S=x(d).format(D);return`**Error**: Date and time set outside allowed range. Please select a date and time between ${f} and ${S}.`}return null},[n,l,d,D]),O=s.useCallback(({date:f})=>{const S=k(f);v(S),g.current?.open?.()},[]),N=s.useCallback(()=>{const f=n?x(n).format(h):null;f!==e&&i({value:f,fromUi:!0})},[n,e,i]),Y=po({theme:u,isInSidebar:p,step:y,minTime:A,maxTime:E,disabled:o,clearable:W,error:F});return oo("div",{className:"stDateTimeInput","data-testid":"stDateTimeInput",children:[m(eo,{label:t.label,disabled:o,labelVisibility:to(t.labelVisibility?.value),children:t.help&&m(ro,{content:t.help,label:t.label})}),m(so,{ref:g,locale:T,density:ao.high,value:n,onChange:O,onClose:N,minDate:H,maxDate:V,disabled:o,timeSelectStart:!0,formatString:D,mask:w,placeholder:R,clearable:W,overrides:Y,"aria-label":t.label})]})}const ko=s.memo(bo);export{ko as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as n,E as X,_ as q,F as k,bd as T,e as
|
|
1
|
+
import{r as n,E as X,_ as q,F as k,bd as T,e as b,n as G,W as lt,l as ct,k as ut,aa as dt,aR as O,o as z,j as c,p as pt,ab as ft,ac as mt,ad as bt,Z as gt,ay as j}from"./index.ayxJkxJS.js";import{I as ht}from"./InputInstructions.CMaz--YN.js";import{u as yt}from"./useBasicWidgetState.CD1aG6-a.js";import{s as It}from"./sprintf.DpPCfzXw.js";import{u as Tt}from"./uniqueId.BgdRqRrS.js";import{I as Ct}from"./input.BViGVyAy.js";import"./FormClearHelper.2gb34MMC.js";import"./base-input.CWLDgMIQ.js";var Z=n.forwardRef(function(t,e){var a={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return n.createElement(X,q({iconAttrs:a,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},t,{ref:e}),n.createElement("path",{d:"M0 3v2h8V3H0z"}))});Z.displayName="Minus";var J=n.forwardRef(function(t,e){var a={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return n.createElement(X,q({iconAttrs:a,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},t,{ref:e}),n.createElement("path",{d:"M3 0v3H0v2h3v3h2V5h3V3H5V0H3z"}))});J.displayName="Plus";const St=k("div",{target:"eaeic2i0"})(({theme:t})=>({display:"flex",flexDirection:"row",flexWrap:"nowrap",alignItems:"center",height:t.sizes.minElementHeight,borderWidth:t.sizes.borderWidth,borderStyle:"solid",borderColor:t.colors.widgetBorderColor??t.colors.secondaryBg,transitionDuration:"200ms",transitionProperty:"border",transitionTimingFunction:"cubic-bezier(0.2, 0.8, 0.4, 1)",borderRadius:t.radii.default,overflow:"hidden","&.focused":{borderColor:t.colors.primary},input:{MozAppearance:"textfield","&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{WebkitAppearance:"none",margin:t.spacing.none}}})),wt=k("div",{target:"eaeic2i1"})({display:"flex",flexDirection:"row",alignSelf:"stretch"}),K=k("button",{target:"eaeic2i2"})(({theme:t})=>({margin:t.spacing.none,border:"none",height:t.sizes.full,display:"flex",alignItems:"center",width:t.sizes.numberInputControlsWidth,justifyContent:"center",color:t.colors.bodyText,transition:"color 300ms, backgroundColor 300ms",backgroundColor:t.colors.secondaryBg,"&:hover:enabled, &:focus:enabled":{color:t.colors.white,backgroundColor:t.colors.primary,transition:"none",outline:"none"},"&:active":{outline:"none",border:"none"},"&:disabled":{cursor:"not-allowed",color:t.colors.fadedText40}})),vt=k("div",{target:"eaeic2i3"})(({theme:t,clearable:e})=>({position:"absolute",marginRight:t.spacing.twoXS,left:0,right:`calc(${t.sizes.numberInputControlsWidth} * 2 + ${e?"1em":"0em"})`})),xt=lt.getLogger("NumberInput");function Vt(t){return b(t)||t===""?void 0:t}const M=({value:t,format:e,step:a,dataType:u})=>{if(b(t))return null;let r=Vt(e);if(b(r)&&G(a)){const d=a.toString();u===T.DataType.FLOAT&&a!==0&&d.includes(".")&&(r=`%0.${d.split(".")[1].length}f`)}if(b(r))return t.toString();try{return It.sprintf(r,t)}catch(d){return xt.warn(`Error in sprintf(${r}, ${t}): ${d}`),String(t)}},kt=(t,e,a)=>b(t)?!1:t-e>=a,Dt=(t,e,a)=>b(t)?!1:t+e<=a,Nt=({step:t,dataType:e})=>t||(e===T.DataType.INT?1:.01);function _(t,e){return e.dataType===T.DataType.INT?t.getIntValue(e):t.getDoubleValue(e)}function Et(t){return t.default??null}function Rt(t){return t.value??t.default??null}function Ft(t,e,a,u){switch(t.dataType){case T.DataType.INT:e.setIntValue(t,a.value,{fromUi:a.fromUi},u);break;case T.DataType.FLOAT:e.setDoubleValue(t,a.value,{fromUi:a.fromUi},u);break;default:throw new Error("Invalid data type")}}const Wt=({disabled:t,element:e,widgetMgr:a,fragmentId:u})=>{const r=ct(),{dataType:d,formId:g,default:C,format:D,icon:N,min:h,max:y}=e,{width:B,elementRef:Q}=ut(),s=n.useMemo(()=>Nt({step:e.step,dataType:e.dataType}),[e.step,e.dataType]),I=n.useCallback(o=>M({value:o,dataType:d,format:D,step:s}),[d,D,s]),[p,w]=n.useState(!1),[m,S]=n.useState(()=>{const o=_(a,e)??C??null;return M({value:o,dataType:d,format:D,step:s})}),[L,U]=yt({getStateFromWidgetMgr:_,getDefaultStateFromProto:Et,getCurrStateFromProto:Rt,updateWidgetMgrState:Ft,element:e,widgetMgr:a,fragmentId:u,onFormCleared:n.useCallback(()=>{const o=C??null;w(!1),S(I(o))},[C,I])}),[P,A]=n.useState(!1),E=n.useRef(null),[H]=n.useState(()=>Tt("number_input_")),$=dt({formId:g}),Y=$?a.allowFormEnterToSubmit(g):p,tt=P&&B>r.breakpoints.hideWidgetDetails;n.useEffect(()=>{p||S(I(L))},[L,p,I]);const f=n.useCallback(({value:o,fromUi:i})=>{if(G(o)&&(h>o||o>y)){E.current?.reportValidity();return}const V=o??C??null;U({value:V,fromUi:i}),w(!1),S(I(V))},[h,y,C,I,U]),et=n.useCallback(()=>{A(!0)},[]);n.useEffect(()=>{const o=E.current;if(o){const i=V=>{V.preventDefault()};return o.addEventListener("wheel",i),()=>{o.removeEventListener("wheel",i)}}},[]);const R=b(e.default)&&!t,ot=n.useCallback(o=>{const{value:i}=o.target;i===""?(w(!0),S(null)):(w(!0),S(i))},[]),l=n.useMemo(()=>{if(m===null||m==="")return null;if(e.dataType===T.DataType.INT){const i=parseInt(m,10);return isNaN(i)?null:i}const o=parseFloat(m);return isNaN(o)?null:o},[m,e.dataType]),v=kt(l,s,h),x=Dt(l,s,y),rt=n.useCallback(()=>{p&&f({value:l,fromUi:!0}),A(!1)},[p,l,f]),F=n.useCallback(()=>{if(x){const o=(l??h)+s;f({value:o,fromUi:!0})}},[l,h,s,x,f]),W=n.useCallback(()=>{if(v){const o=(l??y)-s;f({value:o,fromUi:!0})}},[l,y,s,v,f]),nt=n.useCallback(o=>{const{key:i}=o;switch(i){case"ArrowUp":o.preventDefault(),F();break;case"ArrowDown":o.preventDefault(),W();break}},[F,W]),at=n.useCallback(o=>{o.key==="Enter"&&(p&&f({value:l,fromUi:!0}),a.allowFormEnterToSubmit(g)&&a.submitForm(g,u))},[p,l,f,a,g,u]),it=O(r.iconSizes.lg)+2*O(r.spacing.twoXS),st=N?r.breakpoints.hideNumberInputControls+it:r.breakpoints.hideNumberInputControls;return z("div",{className:"stNumberInput","data-testid":"stNumberInput",ref:Q,children:[c(mt,{label:e.label,disabled:t,labelVisibility:pt(e.labelVisibility?.value),htmlFor:H,children:e.help&&c(ft,{content:e.help,label:e.label})}),z(St,{className:P?"focused":"","data-testid":"stNumberInputContainer",children:[c(Ct,{type:"number",inputRef:E,value:m??"",placeholder:e.placeholder,onBlur:rt,onFocus:et,onChange:ot,onKeyPress:at,onKeyDown:nt,clearable:R,clearOnEscape:R,disabled:t,"aria-label":e.label,startEnhancer:e.icon&&c(gt,{"data-testid":"stNumberInputIcon",iconValue:e.icon,size:"lg"}),id:H,overrides:{ClearIconContainer:{style:{padding:0}},ClearIcon:{props:{overrides:{Svg:{style:{color:r.colors.grayTextColor,padding:r.spacing.threeXS,height:r.sizes.clearIconSize,width:r.sizes.clearIconSize,":hover":{fill:r.colors.bodyText}}}}}},Input:{props:{"data-testid":"stNumberInputField",step:s,min:h,max:y,type:"number",inputMode:""},style:{fontWeight:r.fontWeights.normal,lineHeight:r.lineHeights.inputWidget,paddingRight:r.spacing.sm,paddingLeft:r.spacing.md,paddingBottom:r.spacing.sm,paddingTop:r.spacing.sm,"::placeholder":{color:r.colors.fadedText60}}},InputContainer:{style:()=>({borderTopRightRadius:0,borderBottomRightRadius:0})},Root:{style:{borderTopRightRadius:0,borderBottomRightRadius:0,borderTopLeftRadius:0,borderBottomLeftRadius:0,borderLeftWidth:0,borderRightWidth:0,borderTopWidth:0,borderBottomWidth:0,paddingRight:0,paddingLeft:N?r.spacing.sm:0}},StartEnhancer:{style:{paddingLeft:0,paddingRight:0,minWidth:r.iconSizes.lg,color:bt(N)?r.colors.fadedText60:"inherit"}}}}),B>st&&z(wt,{children:[c(K,{"data-testid":"stNumberInputStepDown",onClick:W,disabled:!v||t,tabIndex:-1,children:c(j,{content:Z,size:"xs",color:v?"inherit":r.colors.fadedText40})}),c(K,{"data-testid":"stNumberInputStepUp",onClick:F,disabled:!x||t,tabIndex:-1,children:c(j,{content:J,size:"xs",color:x?"inherit":r.colors.fadedText40})})]})]}),tt&&c(vt,{clearable:R,children:c(ht,{dirty:p,value:m??"",inForm:$,allowEnterToSubmit:Y})})]})},Ot=n.memo(Wt);export{Ot as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as n,E as H,_ as D,F as P,ai as he,o as k,j as U,az as ge,P as ve,b as me,B as Se,ay as q,bP as re,am as be,ag as ye,bh as Ce,l as Ue,bQ as we,k as Me,ak as Ee,e as L,W as xe,bi as Ie,p as Fe,ab as Re,ac as Pe,a0 as _e,bR as ke,bS as Oe}from"./index.ayxJkxJS.js";import{U as ie}from"./UploadFileInfo.Dr-zDST7.js";import{u as Te}from"./FormClearHelper.2gb34MMC.js";import{P as We,S as Le}from"./ProgressBar.CBHvskJx.js";import{b as Be}from"./urls.BwSlolu9.js";var oe=n.forwardRef(function(e,a){var d={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return n.createElement(H,D({iconAttrs:d,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:a}),n.createElement("rect",{width:24,height:24,fill:"none"}),n.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"}))});oe.displayName="SwitchCamera";var ne=n.forwardRef(function(e,a){var d={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return n.createElement(H,D({iconAttrs:d,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},e,{ref:a}),n.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"}))});ne.displayName="Video";var ae=n.forwardRef(function(e,a){var d={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return n.createElement(H,D({iconAttrs:d,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},e,{ref:a}),n.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"}))});ae.displayName="X";function Ve(e,a){switch(e){case"xsmall":return{padding:`${a.spacing.twoXS} ${a.spacing.sm}`,fontSize:a.fontSizes.sm};case"small":return{padding:`${a.spacing.twoXS} ${a.spacing.md}`};case"large":return{padding:`${a.spacing.md} ${a.spacing.md}`};default:return{padding:`${a.spacing.xs} ${a.spacing.md}`}}}const se=P("div",{target:"e1dr6u8s0"})({position:"relative",overflow:"hidden",width:"100%",objectFit:"contain"}),G=P("div",{target:"e1dr6u8s1"})(({theme:e,width:a})=>({backgroundColor:e.colors.secondaryBg,borderRadius:`${e.radii.default} ${e.radii.default} 0 0`,width:"100%",height:a*9/16,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"})),je=P("p",{target:"e1dr6u8s2"})(({theme:e})=>({marginTop:e.spacing.sm,textAlign:"center"})),ze=P("img",{target:"e1dr6u8s3"})(({theme:e,opacity:a})=>({borderRadius:`${e.radii.default} ${e.radii.default} 0 0`,objectFit:"contain",opacity:a})),Ae=P("a",{target:"e1dr6u8s4"})(({theme:e})=>({color:e.colors.link,textDecoration:e.linkUnderline?"underline":"none",display:"block"})),$e=P("span",{target:"e1dr6u8s5"})({display:"flex",alignItems:"center"}),Ne=P("div",{target:"e1dr6u8s6"})(({theme:e})=>({position:"absolute",top:e.spacing.lg,right:e.spacing.lg,zIndex:e.zIndices.priority,color:e.colors.fadedText40,mixBlendMode:"difference",opacity:.6})),He=P("div",{target:"e1dr6u8s8"})({height:"fit-content",width:"100%",position:"absolute",bottom:0}),De=P("button",{target:"e1dr6u8s9"})(({theme:e})=>({position:"relative",display:"inline-flex",flexDirection:"column",alignItems:"center",justifyContent:"center",backgroundColor:e.colors.lightenedBg05,border:`${e.sizes.borderWidth} solid ${e.colors.borderColor}`,borderRadius:`0 0 ${e.radii.default} ${e.radii.default}`,"&:hover":{borderColor:e.colors.primary,color:e.colors.primary},"&:active":{color:e.colors.white,borderColor:e.colors.primary,backgroundColor:e.colors.primary},"&:focus:not(:active)":{borderColor:e.colors.primary,color:e.colors.primary},"&:disabled, &:disabled:hover, &:disabled:active":{color:e.colors.fadedText40,borderColor:e.colors.borderColor,backgroundColor:e.colors.lightenedBg05,cursor:"not-allowed"},fontWeight:e.fontWeights.normal,padding:`${e.spacing.xs} ${e.spacing.md}`,margin:e.spacing.none,lineHeight:e.lineHeights.base,color:"inherit",width:"100%",userSelect:"none","&:focus":{outline:"none"},"&:focus-visible":{boxShadow:he(e)},...Ve("medium",e)}));function qe({disabled:e,onClick:a,children:d,progress:g}){return k(De,{disabled:e||!1,onClick:a||(()=>{}),progress:g||null,"data-testid":"stCameraInputButton",children:[d,g?U(He,{children:U(We,{value:g,size:Le.EXTRASMALL,overrides:{Bar:{style:{borderTopLeftRadius:0,borderTopRightRadius:0}},BarProgress:{style:{borderTopLeftRadius:0,borderTopRightRadius:0}},BarContainer:{style:{borderTopLeftRadius:0,borderTopRightRadius:0}}}})}):null]})}const le=n.memo(qe);var j=(function(e){return e.USER="user",e.ENVIRONMENT="environment",e})({});const Ge=({switchFacingMode:e})=>U(Ne,{"data-testid":"stCameraInputSwitchButton",children:U(ge,{content:"Switch camera",placement:ve.TOP_RIGHT,children:U(me,{kind:Se.MINIMAL,onClick:e,children:U(q,{content:oe,size:"twoXL",color:re.white})})})}),Xe=n.memo(Ge);var z={exports:{}},Qe=z.exports,te;function Je(){return te||(te=1,(function(e,a){(function(g,v){e.exports=v(be())})(Qe,function(d){return(function(g){var v={};function p(o){if(v[o])return v[o].exports;var f=v[o]={i:o,l:!1,exports:{}};return g[o].call(f.exports,f,f.exports,p),f.l=!0,f.exports}return p.m=g,p.c=v,p.d=function(o,f,m){p.o(o,f)||Object.defineProperty(o,f,{enumerable:!0,get:m})},p.r=function(o){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},p.t=function(o,f){if(f&1&&(o=p(o)),f&8||f&4&&typeof o=="object"&&o&&o.__esModule)return o;var m=Object.create(null);if(p.r(m),Object.defineProperty(m,"default",{enumerable:!0,value:o}),f&2&&typeof o!="string")for(var F in o)p.d(m,F,(function(I){return o[I]}).bind(null,F));return m},p.n=function(o){var f=o&&o.__esModule?function(){return o.default}:function(){return o};return p.d(f,"a",f),f},p.o=function(o,f){return Object.prototype.hasOwnProperty.call(o,f)},p.p="",p(p.s="./src/react-webcam.tsx")})({"./src/react-webcam.tsx":(function(g,v,p){p.r(v);var o=p("react"),f=(function(){var b=function(i,t){return b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var l in s)s.hasOwnProperty(l)&&(r[l]=s[l])},b(i,t)};return function(i,t){b(i,t);function r(){this.constructor=i}i.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}})(),m=function(){return m=Object.assign||function(b){for(var i,t=1,r=arguments.length;t<r;t++){i=arguments[t];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(b[s]=i[s])}return b},m.apply(this,arguments)},F=function(b,i){var t={};for(var r in b)Object.prototype.hasOwnProperty.call(b,r)&&i.indexOf(r)<0&&(t[r]=b[r]);if(b!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(b);s<r.length;s++)i.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(b,r[s])&&(t[r[s]]=b[r[s]]);return t};(function(){typeof window>"u"||(navigator.mediaDevices===void 0&&(navigator.mediaDevices={}),navigator.mediaDevices.getUserMedia===void 0&&(navigator.mediaDevices.getUserMedia=function(i){var t=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia;return t?new Promise(function(r,s){t.call(navigator,i,r,s)}):Promise.reject(new Error("getUserMedia is not implemented in this browser"))}))})();function I(){return!!(navigator.mediaDevices&&navigator.mediaDevices.getUserMedia)}var R=(function(b){f(i,b);function i(t){var r=b.call(this,t)||this;return r.canvas=null,r.ctx=null,r.requestUserMediaId=0,r.unmounted=!1,r.state={hasUserMedia:!1},r}return i.prototype.componentDidMount=function(){var t=this,r=t.state,s=t.props;if(this.unmounted=!1,!I()){s.onUserMediaError("getUserMedia not supported");return}r.hasUserMedia||this.requestUserMedia(),s.children&&typeof s.children!="function"&&console.warn("children must be a function")},i.prototype.componentDidUpdate=function(t){var r=this.props;if(!I()){r.onUserMediaError("getUserMedia not supported");return}var s=JSON.stringify(t.audioConstraints)!==JSON.stringify(r.audioConstraints),l=JSON.stringify(t.videoConstraints)!==JSON.stringify(r.videoConstraints),M=t.minScreenshotWidth!==r.minScreenshotWidth,y=t.minScreenshotHeight!==r.minScreenshotHeight;(l||M||y)&&(this.canvas=null,this.ctx=null),(s||l)&&(this.stopAndCleanup(),this.requestUserMedia())},i.prototype.componentWillUnmount=function(){this.unmounted=!0,this.stopAndCleanup()},i.stopMediaStream=function(t){t&&(t.getVideoTracks&&t.getAudioTracks?(t.getVideoTracks().map(function(r){t.removeTrack(r),r.stop()}),t.getAudioTracks().map(function(r){t.removeTrack(r),r.stop()})):t.stop())},i.prototype.stopAndCleanup=function(){var t=this.state;t.hasUserMedia&&(i.stopMediaStream(this.stream),t.src&&window.URL.revokeObjectURL(t.src))},i.prototype.getScreenshot=function(t){var r=this,s=r.state,l=r.props;if(!s.hasUserMedia)return null;var M=this.getCanvas(t);return M&&M.toDataURL(l.screenshotFormat,l.screenshotQuality)},i.prototype.getCanvas=function(t){var r=this,s=r.state,l=r.props;if(!this.video||!s.hasUserMedia||!this.video.videoHeight)return null;if(!this.ctx){var M=this.video.videoWidth,y=this.video.videoHeight;if(!this.props.forceScreenshotSourceSize){var C=M/y;M=l.minScreenshotWidth||this.video.clientWidth,y=M/C,l.minScreenshotHeight&&y<l.minScreenshotHeight&&(y=l.minScreenshotHeight,M=y*C)}this.canvas=document.createElement("canvas"),this.canvas.width=t?.width||M,this.canvas.height=t?.height||y,this.ctx=this.canvas.getContext("2d")}var x=this,w=x.ctx,S=x.canvas;return w&&S&&(S.width=t?.width||S.width,S.height=t?.height||S.height,l.mirrored&&(w.translate(S.width,0),w.scale(-1,1)),w.imageSmoothingEnabled=l.imageSmoothing,w.drawImage(this.video,0,0,t?.width||S.width,t?.height||S.height),l.mirrored&&(w.scale(-1,1),w.translate(-S.width,0))),S},i.prototype.requestUserMedia=function(){var t=this,r=this.props,s=function(y,C){var x={video:typeof C<"u"?C:!0};r.audio&&(x.audio=typeof y<"u"?y:!0),t.requestUserMediaId++;var w=t.requestUserMediaId;navigator.mediaDevices.getUserMedia(x).then(function(S){t.unmounted||w!==t.requestUserMediaId?i.stopMediaStream(S):t.handleUserMedia(null,S)}).catch(function(S){t.handleUserMedia(S)})};if("mediaDevices"in navigator)s(r.audioConstraints,r.videoConstraints);else{var l=function(y){return{optional:[{sourceId:y}]}},M=function(y){var C=y.deviceId;return typeof C=="string"?C:Array.isArray(C)&&C.length>0?C[0]:typeof C=="object"&&C.ideal?C.ideal:null};MediaStreamTrack.getSources(function(y){var C=null,x=null;y.forEach(function(_){_.kind==="audio"?C=_.id:_.kind==="video"&&(x=_.id)});var w=M(r.audioConstraints);w&&(C=w);var S=M(r.videoConstraints);S&&(x=S),s(l(C),l(x))})}},i.prototype.handleUserMedia=function(t,r){var s=this.props;if(t||!r){this.setState({hasUserMedia:!1}),s.onUserMediaError(t);return}this.stream=r;try{this.video&&(this.video.srcObject=r),this.setState({hasUserMedia:!0})}catch{this.setState({hasUserMedia:!0,src:window.URL.createObjectURL(r)})}s.onUserMedia(r)},i.prototype.render=function(){var t=this,r=this,s=r.state,l=r.props,M=l.audio;l.forceScreenshotSourceSize;var y=l.disablePictureInPicture;l.onUserMedia,l.onUserMediaError,l.screenshotFormat,l.screenshotQuality,l.minScreenshotWidth,l.minScreenshotHeight,l.audioConstraints,l.videoConstraints,l.imageSmoothing;var C=l.mirrored,x=l.style,w=x===void 0?{}:x,S=l.children,_=F(l,["audio","forceScreenshotSourceSize","disablePictureInPicture","onUserMedia","onUserMediaError","screenshotFormat","screenshotQuality","minScreenshotWidth","minScreenshotHeight","audioConstraints","videoConstraints","imageSmoothing","mirrored","style","children"]),A=C?m(m({},w),{transform:(w.transform||"")+" scaleX(-1)"}):w,B={getScreenshot:this.getScreenshot.bind(this)};return o.createElement(o.Fragment,null,o.createElement("video",m({autoPlay:!0,disablePictureInPicture:y,src:s.src,muted:!M,playsInline:!0,ref:function(V){t.video=V},style:A},_)),S&&S(B))},i.defaultProps={audio:!1,disablePictureInPicture:!1,forceScreenshotSourceSize:!1,imageSmoothing:!0,mirrored:!1,onUserMedia:function(){},onUserMediaError:function(){},screenshotFormat:"image/webp",screenshotQuality:.92},i})(o.Component);v.default=R}),react:(function(g,v){g.exports=d})}).default})})(z)),z.exports}var Ke=Je();const Ye=ye(Ke),Ze=({width:e})=>k(G,{width:e,children:[U(q,{size:"threeXL",color:re.gray60,content:ne}),k(je,{children:["This app would like to use your camera.",U(Ae,{href:Be,rel:"noopener noreferrer",target:"_blank",children:"Learn how to allow access."})]})]}),et=({handleCapture:e,width:a,disabled:d,clearPhotoInProgress:g,setClearPhotoInProgress:v,facingMode:p,setFacingMode:o,testOverride:f})=>{const[m,F]=n.useState(f||"pending"),I=n.useRef(null),[R,b]=n.useState(a),i=n.useCallback(Ce(1e3,b),[]);n.useEffect(()=>{i(a)},[a,i]);function t(){if(I.current!==null){const s=I.current.getScreenshot();e(s)}}const r=Ue();return k(se,{"data-testid":"stCameraInputWebcamComponent",children:[m!=="success"&&!d&&!g?U(Ze,{width:R}):we()&&U(Xe,{switchFacingMode:o}),U(G,{"data-testid":"stCameraInputWebcamStyledBox",hidden:m!=="success"&&!d&&!g,width:R,children:!d&&U(Ye,{audio:!1,ref:I,screenshotFormat:"image/jpeg",screenshotQuality:1,width:R,height:R*9/16,style:{borderRadius:`${r.radii.default} ${r.radii.default} 0 0`},onUserMediaError:()=>{F("error")},onUserMedia:()=>{F("success"),v(!1)},videoConstraints:{width:{ideal:R},facingMode:p}})}),U(le,{onClick:t,disabled:m!=="success"||d||g,children:"Take Photo"})]})},tt=n.memo(et),ce="RESTORED_FROM_WIDGET",rt=150,it=xe.getLogger("CameraInput"),N=e=>{const a=e.filter(d=>d.status.type==="uploaded").map(d=>{const{name:g,size:v,status:p}=d,{fileId:o,fileUrls:f}=p;return new ke({fileId:o,fileUrls:f,name:g,size:v})});return new Oe({uploadedFileInfo:a})},ot=(e,a)=>{const d=a.getFileUploaderStateValue(e);if(L(d))return{files:[],nextLocalId:1,imgSrc:null};const{uploadedFileInfo:g}=d;if(L(g)||g.length===0)return{files:[],nextLocalId:1,imgSrc:null};let v=1;const p=g.map(o=>{const f=o.name,m=o.size,F=o.fileId,I=o.fileUrls,R=new ie(f,m,v,{type:"uploaded",fileId:F,fileUrls:I});return v+=1,R});return{files:p,nextLocalId:v,imgSrc:p.length>0?ce:null}};function nt(e,a){return fetch(e).then(d=>d.arrayBuffer()).then(d=>new File([d],a,{type:"image/jpeg"}))}const at=({element:e,widgetMgr:a,uploadClient:d,disabled:g,fragmentId:v,testOverride:p})=>{const{width:o,elementRef:f}=Me(),m=n.useRef(null);m.current===null&&(m.current=ot(e,a));const{files:F,nextLocalId:I,imgSrc:R}=m.current,b=n.useRef(I),[i,t]=n.useState(()=>F),r=n.useRef(i);n.useLayoutEffect(()=>{r.current=i},[i]);const[s,l]=n.useState(()=>R),[M,y]=n.useState(!1),[C,x]=n.useState(!0),[w,S]=n.useState(!1),[_,A]=n.useState(j.USER),B=n.useCallback(()=>{const c=b.current;return b.current+=1,c},[]),V=n.useMemo(()=>{const c=u=>u.status.type==="uploading";return i.some(c)?"updating":"ready"},[i]),$=n.useMemo(()=>{if(i.length>0&&i[i.length-1].status.type==="uploading")return i[i.length-1].status.progress},[i]),de=n.useCallback(()=>{A(c=>c===j.USER?j.ENVIRONMENT:j.USER)},[]),O=n.useCallback(c=>r.current.find(u=>u.id===c),[]),X=n.useCallback(c=>{Ee.flushSync(()=>{t(u=>[...u,c])})},[]),Q=n.useCallback(c=>{t(u=>u.filter(h=>h.id!==c))},[]),T=n.useCallback((c,u)=>{t(h=>h.map(E=>E.id===c?u:E))},[]),J=n.useCallback((c,u)=>{y(!1);const h=O(c);L(h)||h.status.type!=="uploading"||T(h.id,h.setStatus({type:"uploaded",fileId:u.fileId,fileUrls:u}))},[O,T]),K=n.useCallback((c,u)=>{const h=O(u);if(L(h)||h.status.type!=="uploading")return;const E=Math.round(c.loaded*100/c.total);h.status.progress!==E&&T(u,h.setStatus({type:"uploading",abortController:h.status.abortController,progress:E}))},[O,T]),Y=n.useCallback((c,u)=>{const h=new AbortController,E=new ie(u.name,u.size,B(),{type:"uploading",abortController:h,progress:1});X(E),d.uploadFile(e,c.uploadUrl,u,W=>K(W,E.id),h.signal).then(()=>J(E.id,c)).catch(W=>{W instanceof DOMException&&W.name==="AbortError"||T(E.id,E.setStatus({type:"error",errorMessage:W?W.toString():"Unknown error"}))})},[X,e,B,J,K,T,d]),Z=n.useCallback(c=>{const u=O(c);L(u)||(u.status.type==="uploading"&&u.status.abortController.abort(),u.status.type==="uploaded"&&u.status.fileUrls.deleteUrl&&d.deleteFile(u.status.fileUrls.deleteUrl),Q(c))},[O,Q,d]),ee=n.useCallback(c=>{if(c===null)return Promise.resolve();l(c),y(!0),x(!1);const u=h=>new Promise(E=>setTimeout(E,h));return nt(c,`camera-input-${new Date().toISOString().replace(/:/g,"_")}.jpg`).then(h=>d.fetchFileURLs([h]).then(E=>({file:h,fileUrls:E[0]}))).then(({file:h,fileUrls:E})=>Y(E,h)).then(()=>u(rt)).then(()=>{x(!0)}).catch(h=>{it.error(h)})},[d,Y]),ue=n.useCallback(c=>{ee(c)},[ee]),fe=n.useCallback(()=>{i.length!==0&&(i.forEach(c=>Z(c.id)),l(null),S(!0))},[i,Z]);n.useEffect(()=>{a.getFileUploaderStateValue(e)===void 0&&a.setFileUploaderStateValue(e,N(i),{fromUi:!1},v)},[]),n.useEffect(()=>{if(V!=="ready")return;const c=N(i),u=a.getFileUploaderStateValue(e);Ie(c,u)||a.setFileUploaderStateValue(e,c,{fromUi:!0},v)},[V,i,a,e,v]);const pe=n.useCallback(()=>{t([]),l(null);const c=N([]);a.setFileUploaderStateValue(e,c,{fromUi:!0},v)},[e,v,a]);return Te({element:e,widgetMgr:a,onFormCleared:pe}),k(se,{className:"stCameraInput","data-testid":"stCameraInput",ref:f,children:[U(Pe,{label:e.label,disabled:g,labelVisibility:Fe(e.labelVisibility?.value),children:e.help&&U(Re,{content:e.help,label:e.label})}),s?k(_e,{children:[U(G,{width:o,children:s!==ce&&U(ze,{src:s,alt:"Snapshot",opacity:M||!C?"50%":"100%",width:o,height:o*9/16})}),U(le,{onClick:fe,progress:$,disabled:!!$||g,children:$?"Uploading...":k($e,{children:[U(q,{content:ae,margin:"0 xs 0 0",size:"sm"})," Clear photo"]})})]}):U(tt,{handleCapture:ue,width:o,disabled:g,clearPhotoInProgress:w,setClearPhotoInProgress:S,facingMode:_,setFacingMode:de,testOverride:p})]})},ft=n.memo(at);export{ft as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{F as i,a4 as m,r as c,j as n,b3 as p}from"./index.ayxJkxJS.js";import{P as d,R as f}from"./Particles.DD6E7DiG.js";const g=""+new URL("../media/balloon-0.Czj7AKwE.png",import.meta.url).href,B=""+new URL("../media/balloon-1.CNvFFrND.png",import.meta.url).href,h=""+new URL("../media/balloon-2.DTvC6B1t.png",import.meta.url).href,L=""+new URL("../media/balloon-3.CgSk4tbL.png",import.meta.url).href,u=""+new URL("../media/balloon-4.mbtFrzxf.png",import.meta.url).href,x=""+new URL("../media/balloon-5.CSwkUfRA.png",import.meta.url).href,t=300,e=121,s=20,A=80,_=1e3,b=m("from{transform:translateY(calc(100vh + ",t,"px));}to{transform:translateY(0);}"),I=i("img",{target:"e19msdho0"})(({theme:o})=>({position:"fixed",top:`${-t}px`,marginLeft:`${-e/2}px`,zIndex:o.zIndices.balloons,left:`${Math.random()*(A-s)+s}vw`,animationDelay:`${Math.random()*_}ms`,height:`${t}px`,width:`${e}px`,pointerEvents:"none",animationDuration:"750ms",animationName:b,animationTimingFunction:"ease-in",animationDirection:"normal",animationIterationCount:1,opacity:1})),M=30,l=[g,B,h,L,u,x],w=l.length,E=({particleType:o,resourceCrossOriginMode:r})=>{const a=l[o];return n(I,{src:a,crossOrigin:p(r,a)})},N=({scriptRunId:o})=>n(f,{children:n(d,{className:"stBalloons","data-testid":"stBalloons",scriptRunId:o,numParticleTypes:w,numParticles:M,ParticleComponent:E})}),P=c.memo(N);export{M as NUM_BALLOONS,P as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,E as z,_ as L,L as Te,e as de,n as P,aM as ie,bW as ze,bS as Le,bR as De,F as g,j as n,Z as Be,o as F,B as Ve,ay as We,b as Me,p as Ne,ab as Oe,P as He,ac as $e}from"./index.ayxJkxJS.js";import{u as je}from"./useWaveformController.B3tf7xqQ.js";import{T as _e,a as ce}from"./Toolbar.uViLYWIL.js";import{u as Xe,F as Ge}from"./FormClearHelper.2gb34MMC.js";import{c as qe}from"./createDownloadLinkElement.qE-XPzHd.js";import{E as Ke}from"./urls.BwSlolu9.js";import{F as Ze,D as Je}from"./FileDownload.esm.3-xCz5Dn.js";var ue=t.forwardRef(function(e,r){var o={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return t.createElement(z,L({iconAttrs:o,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:r}),t.createElement("g",{fill:"none"},t.createElement("rect",{width:24,height:24}),t.createElement("rect",{width:24,height:24}),t.createElement("rect",{width:24,height:24})),t.createElement("path",{d:"M12 14c1.66 0 3-1.34 3-3V5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3z"}),t.createElement("path",{d:"M17 11c0 2.76-2.24 5-5 5s-5-2.24-5-5H5c0 3.53 2.61 6.43 6 6.92V21h2v-3.08c3.39-.49 6-3.39 6-6.92h-2z"}))});ue.displayName="Mic";var fe=t.forwardRef(function(e,r){var o={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return t.createElement(z,L({iconAttrs:o,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:r}),t.createElement("rect",{width:24,height:24,fill:"none"}),t.createElement("path",{d:"M8 19c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2s-2 .9-2 2v10c0 1.1.9 2 2 2zm6-12v10c0 1.1.9 2 2 2s2-.9 2-2V7c0-1.1-.9-2-2-2s-2 .9-2 2z"}))});fe.displayName="Pause";var pe=t.forwardRef(function(e,r){var o={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return t.createElement(z,L({iconAttrs:o,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:r}),t.createElement("rect",{width:24,height:24,fill:"none"}),t.createElement("path",{d:"M8 6.82v10.36c0 .79.87 1.27 1.54.84l8.14-5.18a1 1 0 000-1.69L9.54 5.98A.998.998 0 008 6.82z"}))});pe.displayName="PlayArrow";var ge=t.forwardRef(function(e,r){var o={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return t.createElement(z,L({iconAttrs:o,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:r}),t.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),t.createElement("path",{d:"M17.65 6.35a7.95 7.95 0 00-6.48-2.31c-3.67.37-6.69 3.35-7.1 7.02C3.52 15.91 7.27 20 12 20a7.98 7.98 0 007.21-4.56c.32-.67-.16-1.44-.9-1.44-.37 0-.72.2-.88.53a5.994 5.994 0 01-6.8 3.31c-2.22-.49-4.01-2.3-4.48-4.52A6.002 6.002 0 0112 6c1.66 0 3.14.69 4.22 1.78l-1.51 1.51c-.63.63-.19 1.71.7 1.71H19c.55 0 1-.45 1-1V6.41c0-.89-1.08-1.34-1.71-.71l-.64.65z"}))});ge.displayName="Refresh";var me=t.forwardRef(function(e,r){var o={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return t.createElement(z,L({iconAttrs:o,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:r}),t.createElement("g",{fill:"none"},t.createElement("rect",{width:24,height:24}),t.createElement("rect",{width:24,height:24})),t.createElement("path",{fillRule:"evenodd",d:"M9 16h6c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1H9c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1zm3-14C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z"}))});me.displayName="StopCircle";const Qe=(e,r)=>{const{enforceDownloadInNewTab:o=!1}=t.useContext(Te);return t.useCallback(()=>{if(!e)return;const l=qe({enforceDownloadInNewTab:o,url:e,filename:r});l.style.display="none",document.body.appendChild(l),l.click(),document.body.removeChild(l)},[e,o,r])},$=({widgetMgr:e,id:r,formId:o,key:c,defaultValue:l})=>{t.useEffect(()=>{const s=e.getElementState(r,c);de(s)&&P(l)&&e.setElementState(r,c,l)},[e,r,c,l]);const[w,d]=t.useState(e.getElementState(r,c)??l),h=t.useCallback(s=>{e.setElementState(r,c,s),d(s)},[e,r,c]),b=t.useMemo(()=>({formId:o||""}),[o]),y=t.useCallback(()=>h(l),[l,h]);return Xe({element:b,widgetMgr:e,onFormCleared:y}),[w,h]},Ye=async({files:e,uploadClient:r,widgetMgr:o,widgetInfo:c,fragmentId:l,signal:w})=>{let d=[];try{d=await r.fetchFileURLs(e)}catch(s){return{successfulUploads:[],failedUploads:e.map(i=>({file:i,error:ie(s)}))}}const h=ze(e,d),b=[],y=[];return await Promise.all(h.map(async([s,i])=>{if(!s||!i?.uploadUrl||!i.fileId)return{file:s,fileUrl:i,error:new Error("No upload URL found")};try{await r.uploadFile({id:i.fileId,formId:c.formId||""},i.uploadUrl,s,void 0,w),b.push({fileUrl:i,file:s})}catch(N){const u=ie(N);y.push({file:s,error:u})}})),o.setFileUploaderStateValue(c,new Le({uploadedFileInfo:b.map(({file:s,fileUrl:i})=>new De({fileId:i.fileId,fileUrls:i,name:s.webkitRelativePath||s.name,size:s.size}))}),{fromUi:!0},l),{successfulUploads:b,failedUploads:y}},et=g("div",{target:"e18uw4vz0"})(),se=g("div",{target:"e18uw4vz1"})(({theme:e,disabled:r})=>({height:e.sizes.largestElementHeight,width:"100%",background:e.colors.secondaryBg,borderRadius:e.radii.default,marginBottom:e.spacing.twoXS,display:"flex",alignItems:"center",position:"relative",paddingLeft:e.spacing.xs,paddingRight:e.spacing.sm,border:e.colors.widgetBorderColor?`${e.sizes.borderWidth} solid ${e.colors.widgetBorderColor}`:void 0,cursor:r?"not-allowed":"auto",overflow:"hidden"})),tt=g("div",{target:"e18uw4vz2"})({flex:1}),rt=g("div",{target:"e18uw4vz3"})(({show:e,theme:r})=>({display:e?"block":"none",position:"relative",height:r.sizes.largestElementHeight,"& > div":{position:"absolute",top:0,left:0,width:"100%",height:"100%",display:"flex",alignItems:"center"}})),ot=g("span",{target:"e18uw4vz4"})(({theme:e,isPlayingOrRecording:r,disabled:o})=>({margin:e.spacing.sm,fontFamily:e.fonts.monospace,color:o?e.colors.fadedText40:r?e.colors.bodyText:e.colors.fadedText60,backgroundColor:e.colors.secondaryBg,fontSize:e.fontSizes.sm})),he=g("div",{target:"e18uw4vz5"})({width:"100%",textAlign:"center",overflow:"hidden"}),be=g("span",{target:"e18uw4vz6"})(({theme:e})=>({color:e.colors.bodyText})),nt=g("a",{target:"e18uw4vz7"})(({theme:e})=>({color:e.colors.link,textDecoration:e.linkUnderline?"underline":"none"})),at=g("div",{target:"e18uw4vz8"})(({theme:e})=>({flex:1,height:e.sizes.largestElementHeight,display:"flex",justifyContent:"center",alignItems:"center"})),lt=g("div",{target:"e18uw4vz9"})(({theme:e})=>{const r="0.625em";return{opacity:.2,width:"100%",height:r,backgroundSize:r,backgroundImage:`radial-gradient(${e.colors.fadedText10} 40%, transparent 40%)`,backgroundRepeat:"repeat"}}),it=g("span",{target:"e18uw4vz10"})(({theme:e})=>({"& > button":{color:e.colors.primary,padding:e.spacing.threeXS},"& > button:hover, & > button:focus":{color:e.colors.redColor}})),ct=g("span",{target:"e18uw4vz11"})(({theme:e})=>({"& > button":{padding:e.spacing.threeXS,color:e.colors.fadedText60},"& > button:hover, & > button:focus":{color:e.colors.bodyText}})),ye=g("span",{target:"e18uw4vz12"})(({theme:e})=>({"& > button":{padding:e.spacing.threeXS,color:e.colors.fadedText60},"& > button:hover, & > button:focus":{color:e.colors.bodyText}})),j=g("div",{target:"e18uw4vz13"})(({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",flexGrow:0,flexShrink:1,padding:e.spacing.xs,gap:e.spacing.twoXS,marginRight:e.spacing.twoXS})),T=({onClick:e,disabled:r,ariaLabel:o,iconContent:c})=>n(Me,{kind:Ve.BORDERLESS_ICON,onClick:e,disabled:r,"aria-label":o,containerWidth:!0,"data-testid":"stAudioInputActionButton",children:n(We,{content:c,size:"lg",color:"inherit"})}),st=({disabled:e,stopRecording:r})=>n(it,{children:n(T,{onClick:r,disabled:e,ariaLabel:"Stop recording",iconContent:me})}),dt=({disabled:e,isPlaying:r,onClickPlayPause:o})=>n(ye,{children:r?n(T,{onClick:o,disabled:e,ariaLabel:"Pause",iconContent:fe}):n(T,{onClick:o,disabled:e,ariaLabel:"Play",iconContent:pe})}),ut=({disabled:e,startRecording:r})=>n(ct,{children:n(T,{onClick:r,disabled:e,ariaLabel:"Record",iconContent:ue})}),ft=({onClick:e})=>n(ye,{children:n(T,{disabled:!1,onClick:e,ariaLabel:"Reset",iconContent:ge})}),pt=({disabled:e,isRecording:r,isPlaying:o,isUploading:c,isError:l,recordingUrlExists:w,startRecording:d,stopRecording:h,onClickPlayPause:b,onClear:y})=>l?n(j,{children:n(ft,{onClick:y})}):c?n(j,{children:n(Be,{size:"base",iconValue:"spinner"})}):F(j,{children:[r?n(st,{disabled:e,stopRecording:h}):n(ut,{disabled:e,startRecording:d}),w&&n(dt,{disabled:e,isPlaying:o,onClickPlayPause:b})]}),gt=t.memo(pt),mt=()=>n(he,{children:n(be,{children:"An error has occurred, please try again."})}),ht=t.memo(mt),R="00:00",k=e=>{const r=Math.floor(e/1e3),o=Math.floor(r/60),c=Math.floor(o/60),l=r%60,w=o%60,d=l.toString().padStart(2,"0"),h=w.toString().padStart(2,"0"),b=c.toString().padStart(2,"0");return o<60?`${h}:${d}`:`${b}:${h}:${d}`},bt=()=>F(he,{children:[n(be,{children:"This app would like to use your microphone."})," ",n(nt,{href:Ke,rel:"noopener noreferrer",target:"_blank",children:"Learn how to allow access."})]}),yt=t.memo(bt),vt=()=>n(at,{children:n(lt,{})}),wt=t.memo(vt),St=({element:e,uploadClient:r,widgetMgr:o,fragmentId:c,disabled:l})=>{const w=t.useRef(null),[d,h]=t.useState(!1),[b,y]=t.useState(!1),[s,i]=t.useState(!1),[N,u]=t.useState(R),[D,B]=$({widgetMgr:o,id:e.id,key:"deleteFileUrl",defaultValue:null}),[m,V]=$({widgetMgr:o,id:e.id,key:"recordingUrl",defaultValue:null}),[O,A]=$({widgetMgr:o,id:e.id,formId:e.formId,key:"recordingTime",defaultValue:R}),I=t.useRef(null),S=t.useRef(null),f=t.useRef(null),_=e.id,C=e.formId,ve=t.useCallback(async a=>{I.current&&I.current.abort();const v=new AbortController;I.current=v;try{if(y(!0),P(C)&&o.setFormsWithUploadsInProgress(new Set([C])),v.signal.aborted)return;let p;try{p=URL.createObjectURL(a),S.current&&S.current!==p&&URL.revokeObjectURL(S.current),S.current=p}catch{i(!0),y(!1),P(C)&&o.setFormsWithUploadsInProgress(new Set);return}if(v.signal.aborted){URL.revokeObjectURL(p),S.current=null;return}V(p);const Ue=new Date().toISOString().slice(0,16).replace(/:/g,"-"),Pe=new File([a],`${Ue}_audio.wav`,{type:a.type});try{const{successfulUploads:Fe,failedUploads:xe}=await Ye({files:[Pe],uploadClient:r,widgetMgr:o,widgetInfo:{id:_,formId:C},fragmentId:c,signal:v.signal});if(v.signal.aborted)return;if(xe.length>0){i(!0);return}i(!1);const le=Fe[0];le?.fileUrl?.deleteUrl&&B(le.fileUrl.deleteUrl)}catch{v.signal.aborted||i(!0)}finally{P(C)&&o.setFormsWithUploadsInProgress(new Set),v.signal.aborted||y(!1)}}catch{v.signal.aborted||(i(!0),y(!1)),P(C)&&o.setFormsWithUploadsInProgress(new Set)}},[r,o,_,C,c,B,V]),W=t.useRef(null),X=je({containerRef:w,sampleRate:e.sampleRate??void 0,waveformPadding:4,events:{onPermissionDenied:()=>{h(!0)},onError:()=>{i(!0)},onRecordStart:()=>{A(R),u(R)},onRecordReady:()=>{const a=k(W.current?.playback.getDurationMs()??0);A(a),u(a)},onApprove:ve,onCancel:()=>{A(R),u(R)},onProgressMs:a=>{A(k(a))},onPlaybackPause:()=>{u(k(W.current?.playback.getCurrentTimeMs()??0))},onPlaybackFinish:()=>{u(k(W.current?.playback.getDurationMs()??0))}}});W.current=X;const{state:M,isPlaybackPlaying:U,start:G,stop:q,approve:K,cancel:Z,playback:{play:J,pause:Q,load:Y,getCurrentTimeMs:x,getDurationMs:ee}}=X,E=t.useCallback(async({updateWidgetManager:a,deleteFile:v})=>{const p=m;if(p&&S.current===p&&(URL.revokeObjectURL(p),S.current=null),f.current&&(cancelAnimationFrame(f.current),f.current=null),V(null),B(null),u(R),A(R),Z(),a&&o.setFileUploaderStateValue(e,{},{fromUi:!0},c),v&&D)try{await r.deleteFile(D)}catch{}P(p)&&URL.revokeObjectURL(p)},[D,m,r,Z,e,o,c,A,B,V]);t.useEffect(()=>{const a=()=>{U&&(u(k(x())),f.current=requestAnimationFrame(a))};return U?f.current=requestAnimationFrame(a):f.current&&(cancelAnimationFrame(f.current),f.current=null),()=>{f.current&&(cancelAnimationFrame(f.current),f.current=null)}},[U,x]),t.useEffect(()=>{if(!m)return;let a=!1;return u(O),(async()=>{try{if(await Y(m),a)return;const p=ee();p>0&&u(k(p))}catch{a||i(!0)}})(),()=>{a=!0}},[m,O,Y,ee]),t.useEffect(()=>{if(de(C))return;const a=new Ge;return a.manageFormClearListener(o,C,()=>{E({updateWidgetManager:!0,deleteFile:!1})}),()=>a.disconnect()},[C,E,o]),t.useEffect(()=>()=>{I.current&&(I.current.abort(),I.current=null),f.current&&(cancelAnimationFrame(f.current),f.current=null),S.current&&(URL.revokeObjectURL(S.current),S.current=null)},[]);const we=t.useCallback(async()=>{try{if(U){const a=x();Q(),u(k(a))}else M==="idle"&&m&&(x()<=100&&u(R),await J())}catch{i(!0)}},[U,x,Q,J,m,M]),te=t.useCallback(async()=>{m&&await E({updateWidgetManager:!1,deleteFile:!0});try{u(R),await G()}catch{}},[E,m,G]),re=t.useCallback(async()=>{try{const{blob:a}=await q();await K(a)}catch{i(!0)}},[K,q]),oe=Qe(m,"recording.wav"),Se=t.useCallback(()=>{te()},[te]),Ce=t.useCallback(()=>{re()},[re]),Re=t.useCallback(()=>{E({updateWidgetManager:!1,deleteFile:!0}),i(!1)},[E]),Ee=t.useCallback(()=>{oe()},[oe]),ke=t.useCallback(()=>{E({updateWidgetManager:!0,deleteFile:!0})},[E]),H=M==="recording",ne=U,Ae=H?O:N,ae=M==="idle"&&!d&&!m,Ie=d||ae||s;return F(et,{className:"stAudioInput","data-testid":"stAudioInput",children:[n($e,{label:e.label,disabled:l,labelVisibility:Ne(e.labelVisibility?.value),children:e.help&&n(Oe,{content:e.help,placement:He.TOP,label:e.label})}),F(se,{disabled:l,children:[F(_e,{isFullScreen:!1,disableFullscreenMode:!0,target:se,children:[m&&n(ce,{label:"Download as WAV",icon:Ze,onClick:Ee}),D&&n(ce,{label:"Clear recording",icon:Je,onClick:ke})]}),n(gt,{isRecording:H,isPlaying:ne,isUploading:b,isError:s,recordingUrlExists:!!m,startRecording:Se,stopRecording:Ce,onClickPlayPause:()=>{we()},onClear:Re,disabled:l||d}),F(tt,{children:[s&&n(ht,{}),ae&&n(wt,{}),d&&n(yt,{}),n(rt,{"data-testid":"stAudioInputWaveSurfer",ref:w,show:!Ie})]}),n(ot,{isPlayingOrRecording:H||ne,disabled:l,"data-testid":"stAudioInputWaveformTimeCode",children:Ae})]})]})},Pt=t.memo(St);export{Pt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{F as s,r as p,Y as x,l as b,j as i,a as k,P as
|
|
1
|
+
import{F as s,r as p,Y as x,l as b,j as i,a as k,P as v,o as y,Z as g,q as L}from"./index.ayxJkxJS.js";import{m as C}from"./iconPosition.BF4yacmi.js";const S=s("div",{target:"e175gajv0"})({display:"flex",flexDirection:"column",width:"100%"}),P=s("a",{target:"e175gajv1"})(({disabled:e,isCurrentPage:r,theme:o})=>({textDecoration:"none",width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start",gap:o.spacing.sm,borderRadius:o.radii.default,paddingLeft:o.spacing.sm,paddingRight:o.spacing.sm,marginTop:o.spacing.threeXS,marginBottom:o.spacing.threeXS,lineHeight:o.lineHeights.menuItem,backgroundColor:r?o.colors.darkenedBgMix15:"transparent","&:hover":{backgroundColor:r?o.colors.darkenedBgMix25:o.colors.darkenedBgMix15},"&:active,&:visited,&:hover":{textDecoration:"none"},"&:focus":{outline:"none"},"&:focus-visible":{backgroundColor:o.colors.darkenedBgMix15},"@media print":{paddingLeft:o.spacing.none},...e?{borderColor:o.colors.borderColor,backgroundColor:o.colors.transparent,color:o.colors.fadedText40,cursor:"not-allowed","&:hover":{color:o.colors.fadedText40,backgroundColor:o.colors.transparent}}:{}})),T=s("span",{target:"e175gajv2"})(({disabled:e,theme:r})=>({color:r.colors.bodyText,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",display:"table-cell",...e?{borderColor:r.colors.borderColor,backgroundColor:r.colors.transparent,color:r.colors.fadedText40,cursor:"not-allowed"}:{}}));function h(e){let r=e.page;if(e.queryString)if(e.external)try{const o=new URL(e.page);new URLSearchParams(e.queryString).forEach((t,a)=>o.searchParams.append(a,t)),r=o.toString()}catch{const[o,n]=r.split("#");r=o+(o.includes("?")?"&":"?")+e.queryString+(n?"#"+n:"")}else r+=(r.includes("?")?"&":"?")+e.queryString;return r}function w(e){const{onPageChange:r,currentPageScriptHash:o}=p.useContext(x),{colors:n}=b(),{disabled:t,element:a}=e,l=o===a.pageScriptHash,u=d=>{a.external?t&&d.preventDefault():(d.preventDefault(),t||r(a.pageScriptHash,a.queryString))},c=C(a.iconPosition),f=h(a);return i("div",{className:"stPageLink","data-testid":"stPageLink",children:i(k,{help:a.help,placement:v.TOP_RIGHT,containerWidth:!0,children:i(S,{children:y(P,{"data-testid":"stPageLink-NavLink",disabled:t,isCurrentPage:l,href:f,target:a.external?"_blank":"",rel:"noreferrer",onClick:u,children:[a.icon&&c==="left"&&i(g,{size:"lg",color:t?n.fadedText40:n.bodyText,iconValue:a.icon}),i(T,{disabled:t,children:i(L,{source:a.label,allowHTML:!1,isLabel:!0,boldLabel:l,largerLabel:!0,disableLinks:!0})}),a.icon&&c==="right"&&i(g,{size:"lg",color:t?n.fadedText40:n.bodyText,iconValue:a.icon})]})})})})}const j=p.memo(w);export{j as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{F as a,r as t,n as i,j as d,e}from"./index.
|
|
1
|
+
import{F as a,r as t,n as i,j as d,e}from"./index.ayxJkxJS.js";import{D as c,a as l}from"./IFrameUtil.DefezniK.js";const m=a("iframe",{target:"eu9re3w0"})(({theme:o,disableScrolling:r})=>({width:"100%",height:"100%",colorScheme:"normal",border:"none",padding:o.spacing.none,margin:o.spacing.none,overflow:r?"hidden":void 0}));function n(o){return e(o)||o===""?void 0:o}function g({element:o}){const r=n(o.src),s=i(r)?void 0:n(o.srcdoc);return d(m,{className:"stIFrame","data-testid":"stIFrame",allow:l,disableScrolling:!o.scrolling,src:r,srcDoc:s,scrolling:o.scrolling?"auto":"no",sandbox:c,title:"st.iframe",tabIndex:o.tabIndex??void 0})}const F=t.memo(g);export{F as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as a,E as B,_ as X,l as $,e as L,R as Q,Q as K,be as j,bf as z,bg as Y,bh as Z,n as k,bi as M,W as P,X as q,k as ee,b9 as te,bj as ne,j as R,o as re,b2 as se}from"./index.
|
|
1
|
+
import{r as a,E as B,_ as X,l as $,e as L,R as Q,Q as K,be as j,bf as z,bg as Y,bh as Z,n as k,bi as M,W as P,X as q,k as ee,b9 as te,bj as ne,j as R,o as re,b2 as se}from"./index.ayxJkxJS.js";import{w as oe,E as ae}from"./withFullScreenWrapper.DGTtbbLe.js";import{a as _,S as H,T as ce}from"./Toolbar.uViLYWIL.js";import{R as ie}from"./index.DEF4aL6h.js";import{a as J,c as le,b as ue,e as fe,t as de,S as me,d as pe}from"./embed.C4scQ-hW.js";import{u as he}from"./FormClearHelper.2gb34MMC.js";import{T as ge}from"./TableChart.esm.DkPOnPiP.js";import"./moment.C7qA8nIE.js";import"./pandasStylerUtils.BQNPcCRH.js";import"./numbro.B9_PXfzp.js";import"./_baseIndexOf.BTknn6Gb.js";import"./index.8HslT92O.js";import"./main.DCurQa2X.js";import"./throttle.DpJVqfiM.js";import"./formatNumber.DwAT32vb.js";import"./sprintf.DpPCfzXw.js";import"./formatMoment.C6Hwn6X5.js";import"./checkbox.lSnX8MiZ.js";import"./createDownloadLinkElement.qE-XPzHd.js";import"./toConsumableArray.nocm-m15.js";import"./FileDownload.esm.3-xCz5Dn.js";import"./_arrayIncludes.B19Iyn2B.js";import"./threshold.CUNQbqMA.js";import"./value.DaKxGC7O.js";import"./timer.BZio6gjG.js";var U=a.forwardRef(function(n,e){var s={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return a.createElement(B,X({iconAttrs:s,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},n,{ref:e}),a.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),a.createElement("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14zM7 10h2v7H7zm4-3h2v10h-2zm4 6h2v4h-2z"}))});U.displayName="InsertChart";const Se=20;function ye(n){"params"in n&&"encoding"in n&&n.params.forEach(e=>{"select"in e&&(["interval","point"].includes(e.select)&&(e.select={type:e.select}),"type"in e.select&&e.select.type==="point"&&!("encodings"in e.select)&&L(e.select.encodings)&&(e.select.encodings=Object.keys(n.encoding)))})}const be=(n,e,s,r,f,l,u,p)=>{const t=JSON.parse(n);if(r==="streamlit"?t.config=J(t.config,l):t.usermeta?.embedOptions?.theme==="streamlit"?(t.config=J(t.config,l),t.usermeta.embedOptions.theme=void 0):t.config=le(t.config,l),t.title&&(typeof t.title=="string"&&(t.title={text:t.title}),t.title.limit=t.title.limit??Math.max(u-40,0)),s&&(t.height=p),e&&(t.width=u,"vconcat"in t&&t.vconcat.forEach(o=>{o===null||typeof o!="object"||"hconcat"in o||"vconcat"in o||"concat"in o||"layer"in o||(o.width=u)})),t.padding||(t.padding={}),L(t.padding.bottom)&&(t.padding.bottom=Se),t.datasets)throw new Error("Datasets should not be passed as part of the spec");return f.length>0&&ye(t),t},we=(n,e,s,r,f)=>{const l=$(),{id:u,formId:p,spec:t,data:o,datasets:c,vegaLiteTheme:d,selectionMode:i}=n,h=a.useMemo(()=>i,[JSON.stringify(i)]),S=a.useMemo(()=>be(t,r,f,d,h,l,e,s),[t,r,f,d,h,l,e,s]);return{id:u,formId:p,vegaLiteTheme:d,spec:S,selectionMode:h,data:o,datasets:c,useContainerWidth:r}},Ce={DATAFRAME_INDEX:"(index)"};function Ee(n){return!n||n.dimensions.numDataRows===0?null:F(n)}function Ne(n){const e=I(n);if(L(e))return null;const s={};for(const[r,f]of Object.entries(e))s[r]=F(f);return s}function I(n){if(n?.length===0)return null;const e={};return n.forEach(s=>{if(!s)return;const r=s.hasName?s.name:null;e[r]=s.data}),e}function F(n,e=0){if(n.dimensions.numDataRows===0)return[];const s=[],{numDataRows:r,numDataColumns:f,numIndexColumns:l}=n.dimensions,u=n.columnTypes[0]??void 0,p=u&&u.type===Q.INDEX&&(K(u)||j(u)||z(u));for(let t=e;t<r;t++){const o={};if(p){const{content:c}=n.getCell(t,0);o[Ce.DATAFRAME_INDEX]=typeof c=="bigint"?Number(c):c}for(let c=0;c<f;c++){const d=c+l,{content:i,contentType:h}=n.getCell(t,d);if((i instanceof Date||typeof i=="number"&&Number.isFinite(i))&&(j(h)||z(h))&&!Y(h)){const S=new Date(i).getTimezoneOffset()*60*1e3;o[n.columnNames[0][d]]=i.valueOf()+S}else o[n.columnNames[0][d]]=typeof i=="bigint"?Number(i):i}s.push(o)}return s}const De=150,Ve=P.getLogger("useVegaLiteSelections"),Oe=(n,e,s)=>{const{id:r,formId:f,selectionMode:l}=n,u=a.useCallback(t=>{l.forEach(c=>{t.addSignalListener(c,Z(De,(d,i)=>{const h=t.getState({data:(E,v)=>l.some(g=>`${g}_store`===E),recurse:!1});k(h)&&e.setElementState(r,"viewState",h);let S=i;"vlPoint"in i&&"or"in i.vlPoint&&(S=i.vlPoint.or);const V={id:r,formId:f},N=JSON.parse(e.getStringValue(V)||"{}"),D={selection:{...N?.selection||{},[d]:S||{}}};M(N,D)||e.setStringValue(V,JSON.stringify(D),{fromUi:!0},s)}))});const o=e.getElementState(r,"viewState");if(k(o))try{return t.setState(o)}catch(c){Ve.warn("Failed to restore view state",c)}return t},[r,l,e,f,s]),p=a.useCallback(()=>{const t={selection:{}};l.forEach(i=>{t.selection[i]={}});const o={id:r,formId:f},c=e.getStringValue(o),d=c?JSON.parse(c):t;M(d,t)||e.setStringValue(o,JSON.stringify(t),{fromUi:!0},s)},[r,f,s,l,e]);return{maybeConfigureSelections:u,onFormCleared:p}},W="source",Te=P.getLogger("useVegaEmbed");function ve(n,e,s){const r=a.useRef(null),f=a.useRef(null),l=a.useRef(W),u=a.useRef(null),p=a.useRef([]),t=a.useRef(null),o=a.useRef([]),[c,d]=a.useState(!1),{maybeConfigureSelections:i,onFormCleared:h}=Oe(n,e,s);he({widgetMgr:e,element:n,onFormCleared:h});const{data:S,datasets:V}=n;a.useEffect(()=>{t.current=S,o.current=V,r.current===null&&(u.current=S,p.current=V)},[S,V]);const N=a.useCallback(()=>{f.current&&f.current(),f.current=null,r.current=null},[]),D=a.useCallback(async(g,b)=>{if(g.current===null)throw new Error("Element missing.");d(!0);try{N();const w={ast:!0,expr:ue,tooltip:{disableDefaultStyle:!0},defaultStyle:!1,forceActionsMenu:!0},{vgSpec:y,view:A,finalize:T}=await fe(g.current,b,w);r.current=i(A),f.current=T;const m=Ne(o.current),C=m?Object.keys(m):[];if(C.length===1){const[x]=C;l.current=x}else C.length===0&&y.data&&(l.current=W);const O=Ee(t.current);if(O&&r.current.insert(l.current,O),m)for(const[x,G]of Object.entries(m))r.current.insert(x,G);return await r.current.runAsync(),await r.current.resize().runAsync(),u.current=t.current,p.current=o.current,r.current}finally{d(!1)}},[N,i]),E=a.useCallback((g,b,w,y)=>{if(!y||y.dimensions.numDataRows===0){try{g.remove(b,de)}catch{}return}if(!w||w.dimensions.numDataRows===0){g.insert(b,F(y));return}y.hash!==w.hash&&(g.data(b,F(y)),Te.info(`Had to clear the ${b} dataset before inserting data through Vega view.`))},[]),v=a.useCallback(async(g,b)=>{if(r.current===null||c)return null;const w=u.current,y=p.current;(w||g)&&E(r.current,l.current,w,g);const A=I(y)??{},T=I(b)??{};for(const[m,C]of Object.entries(T)){const O=m||l.current,x=A[O];E(r.current,O,x,C)}for(const m of Object.keys(A))!Object.hasOwn(T,m)&&m!==l.current&&E(r.current,m,null,null);return await r.current?.resize().runAsync(),u.current=g,p.current=b,r.current},[E,c]);return{createView:D,updateView:v,finalizeView:N}}function Ae(n){try{const e=typeof n=="string"?JSON.parse(n):n;return!!(e.facet||e.encoding?.row||e.encoding?.column||e.encoding?.facet)}catch{return!1}}function Re(n){try{const e=typeof n=="string"?JSON.parse(n):n;return!("vconcat"in e)||!Array.isArray(e.vconcat)?!1:e.vconcat.some(s=>s!==null&&typeof s=="object"&&("hconcat"in s||"vconcat"in s||"concat"in s||"layer"in s))}catch{return!1}}const xe=({disableFullscreenMode:n,element:e,fragmentId:s,widgetMgr:r,widthConfig:f,heightConfig:l})=>{const[u,p]=a.useState(!1),[t,o]=a.useState(!1),{expanded:c,height:d,width:i,expand:h,collapse:S}=q(ae),{width:V,height:N,elementRef:D}=ee([u],0),E=te(f)||e.useContainerWidth,v=ne(l),g=Ae(e.spec),b=Re(e.spec),w=we(e,g?i??0:V,(c?d:N)??0,c&&!b?!0:E,c?!0:v),{createView:y,updateView:A,finalizeView:T}=ve(w,r,s),{data:m,datasets:C,spec:O}=w;return a.useLayoutEffect(()=>(D.current!==null&&y(D,O),T),[y,T,O,i,d,u,D]),a.useEffect(()=>{A(m,C)},[m,C]),a.useEffect(()=>{m||C?.[0]?.data?o(!0):o(!1)},[m,C]),u?R(ie,{data:m??C[0]?.data,height:d??N??void 0,width:f??void 0,customToolbarActions:[R(_,{label:"Show chart",icon:U,onClick:()=>{p(!1)}},"show-chart")]}):re(H,{height:v?c?d:"100%":d,useContainerWidth:c?!0:E,children:[R(ce,{target:H,isFullScreen:c,onExpand:h,onCollapse:S,disableFullscreenMode:n,children:t&&R(_,{label:"Show data",icon:ge,onClick:()=>{p(!0)}})}),R(se,{styles:[me]}),R(pe,{"data-testid":"stVegaLiteChart",className:"stVegaLiteChart",useContainerWidth:E,useContainerHeight:v,ref:D})]})},Fe=oe(xe),st=a.memo(Fe);export{me as StyledVegaLiteChartTooltips,J as applyStreamlitTheme,st as default};
|