streamlit-nightly 1.41.2.dev20241227__py2.py3-none-any.whl → 1.41.2.dev20250124__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 +16 -15
- 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 +18 -3
- streamlit/config_option.py +10 -19
- streamlit/config_util.py +1 -1
- streamlit/connections/__init__.py +1 -1
- streamlit/connections/base_connection.py +1 -1
- streamlit/connections/snowflake_connection.py +31 -50
- 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 +3 -3
- streamlit/delta_generator.py +7 -3
- 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 +25 -3
- streamlit/elements/balloons.py +1 -1
- streamlit/elements/bokeh_chart.py +1 -1
- streamlit/elements/code.py +9 -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 +8 -10
- 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 +3 -3
- 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 +20 -6
- streamlit/elements/widgets/__init__.py +1 -1
- streamlit/elements/widgets/audio_input.py +1 -1
- streamlit/elements/widgets/button.py +9 -8
- streamlit/elements/widgets/button_group.py +6 -4
- 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 +6 -5
- 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 +63 -3
- streamlit/elements/write.py +2 -2
- streamlit/emojis.py +2 -2
- streamlit/env_util.py +1 -1
- streamlit/error_util.py +9 -3
- 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 +2 -2
- streamlit/navigation/__init__.py +1 -1
- streamlit/navigation/page.py +7 -4
- 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.py +2 -2
- streamlit/proto/Code_pb2.pyi +5 -2
- 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 +29 -5
- streamlit/runtime/caching/__init__.py +1 -1
- streamlit/runtime/caching/cache_data_api.py +3 -3
- 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 +5 -4
- 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 +5 -5
- streamlit/runtime/connection_factory.py +1 -1
- streamlit/runtime/context.py +1 -1
- streamlit/runtime/credentials.py +5 -5
- streamlit/runtime/forward_msg_cache.py +4 -2
- 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 +4 -2
- streamlit/runtime/runtime.py +22 -6
- 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 +23 -12
- 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 +2 -2
- streamlit/runtime/state/query_params_proxy.py +15 -5
- 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 +3 -3
- streamlit/static/static/css/index.mUTQuMqR.css +1 -0
- streamlit/static/static/js/{FileDownload.esm.WslOojMp.js → FileDownload.esm.C1QvS8Zm.js} +1 -1
- streamlit/static/static/js/{FormClearHelper.DSgVZ-NK.js → FormClearHelper.mT4-5rFn.js} +1 -1
- streamlit/static/static/js/{Hooks.wzeYp0oD.js → Hooks.CVNEuaGG.js} +1 -1
- streamlit/static/static/js/InputInstructions.BCvAGBeC.js +1 -0
- streamlit/static/static/js/{ProgressBar.D1he2Gib.js → ProgressBar.CcQcYD9u.js} +2 -2
- streamlit/static/static/js/RenderInPortalIfExists.DHDG9PHn.js +1 -0
- streamlit/static/static/js/Toolbar.yTE_O6B7.js +1 -0
- streamlit/static/static/js/{base-input.gDrmzpbY.js → base-input.CQPY9_oN.js} +4 -4
- streamlit/static/static/js/createSuper.DE47Tkz4.js +1 -0
- streamlit/static/static/js/data-grid-overlay-editor.5JEQwfzp.js +1 -0
- streamlit/static/static/js/{downloader.B-SkHjg2.js → downloader.CX7_KkfB.js} +1 -1
- streamlit/static/static/js/{es6.DoVDVSd_.js → es6.Be2vwxoI.js} +2 -2
- streamlit/static/static/js/{iframeResizer.contentWindow.Exq_q4jU.js → iframeResizer.contentWindow.CFHofqC-.js} +1 -1
- streamlit/static/static/js/index.0OeiPvr3.js +1 -0
- streamlit/static/static/js/index.1GBg_Cdb.js +1 -0
- streamlit/static/static/js/index.4nNgvhbk.js +4 -0
- streamlit/static/static/js/index.5F9_LJ-9.js +1 -0
- streamlit/static/static/js/index.6v5ZgUAy.js +1 -0
- streamlit/static/static/js/index.8tVXPrLX.js +1 -0
- streamlit/static/static/js/index.AExANgn1.js +1 -0
- streamlit/static/static/js/index.AXOgS1NM.js +1 -0
- streamlit/static/static/js/index.B-xzXPZE.js +3 -0
- streamlit/static/static/js/index.B0pfFJGU.js +1 -0
- streamlit/static/static/js/index.BBjf7kH1.js +1 -0
- streamlit/static/static/js/index.BGICDmL0.js +201 -0
- streamlit/static/static/js/{index.rDDlhQFp.js → index.BOeLQ18h.js} +1 -1
- streamlit/static/static/js/index.BUgJRfqp.js +3 -0
- streamlit/static/static/js/index.BpeIAypN.js +1 -0
- streamlit/static/static/js/{index.BjQJsYG6.js → index.C0ZNaKGF.js} +1 -1
- streamlit/static/static/js/index.C3eR9AQ5.js +1 -0
- streamlit/static/static/js/index.CCmrDm8Z.js +2 -0
- streamlit/static/static/js/index.CHuo89tL.js +1 -0
- streamlit/static/static/js/index.Cbi_d9ak.js +197 -0
- streamlit/static/static/js/{index.CyRDf6c5.js → index.Cg7T4wJt.js} +3 -3
- streamlit/static/static/js/index.Ci3iebpl.js +1 -0
- streamlit/static/static/js/index.CjsaBedq.js +1 -0
- streamlit/static/static/js/{index.CLHVvMN0.js → index.CvqaNor_.js} +139 -128
- streamlit/static/static/js/index.D0lxtOCO.js +2 -0
- streamlit/static/static/js/index.D1AD4NsW.js +1 -0
- streamlit/static/static/js/{index.4lqQPLdu.js → index.DLjk_wlB.js} +1 -1
- streamlit/static/static/js/{index.DfwGDOWW.js → index.DNDhYAPI.js} +2 -2
- streamlit/static/static/js/index.DY6666R7.js +1 -0
- streamlit/static/static/js/{index.DaTKmBKa.js → index.Dkr_c_9x.js} +100 -100
- streamlit/static/static/js/{index.Bcz23DKe.js → index.Hhv6gSq2.js} +12 -12
- streamlit/static/static/js/{index.Bm2n8u7I.js → index.OM83ZHKg.js} +2 -2
- streamlit/static/static/js/index.SLleoa9s.js +1 -0
- streamlit/static/static/js/{index.2Rr5kbVL.js → index.XCwDes79.js} +1 -1
- streamlit/static/static/js/{index.B_RzfO7U.js → index.a6pesEXT.js} +1 -1
- streamlit/static/static/js/{index.CAkYXoVB.js → index.er3Zfn3e.js} +2 -2
- streamlit/static/static/js/{index.CZ-znj8N.js → index.mtSGfsND.js} +1 -1
- streamlit/static/static/js/{input.28wXD4uV.js → input.B07wSbwn.js} +2 -2
- streamlit/static/static/js/{memory.jbWyoc5k.js → memory.CC_p93jh.js} +1 -1
- streamlit/static/static/js/mergeWith.ivc75cD1.js +1 -0
- streamlit/static/static/js/number-overlay-editor.Db2Be6nq.js +9 -0
- streamlit/static/static/js/possibleConstructorReturn.BNprLGNF.js +1 -0
- streamlit/static/static/js/{sandbox.CfK9-cKf.js → sandbox.BlG3HhHL.js} +1 -1
- streamlit/static/static/js/{textarea.C5OZk1uL.js → textarea.Bz6Z-kmO.js} +2 -2
- streamlit/static/static/js/threshold.B8r8f5kt.js +1 -0
- streamlit/static/static/js/{timepicker.DEpQEk7W.js → timepicker.BMSb5NlP.js} +3 -3
- streamlit/static/static/js/timer.RueuYoQV.js +1 -0
- streamlit/static/static/js/toConsumableArray.uYLXBIlD.js +3 -0
- streamlit/static/static/js/uniqueId.BdisvZXg.js +1 -0
- streamlit/static/static/js/{useBasicWidgetState.C2DsWpWi.js → useBasicWidgetState.BJFGEQDL.js} +1 -1
- streamlit/static/static/js/{useOnInputChange.Bw6YkmJD.js → useOnInputChange.BmSN_ACz.js} +1 -1
- streamlit/static/static/js/value.iufjd77T.js +1 -0
- streamlit/static/static/js/withFullScreenWrapper.CbOOMX5j.js +1 -0
- streamlit/static/static/media/MaterialSymbols-Rounded.DzyB5T7Y.woff2 +0 -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 +2 -2
- streamlit/url_util.py +24 -1
- streamlit/user_info.py +445 -25
- 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 +5 -3
- streamlit/watcher/path_watcher.py +1 -1
- streamlit/watcher/polling_path_watcher.py +1 -1
- streamlit/watcher/util.py +87 -21
- streamlit/web/__init__.py +1 -1
- streamlit/web/bootstrap.py +22 -2
- 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 +73 -7
- 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.dev20241227.data → streamlit_nightly-1.41.2.dev20250124.data}/scripts/streamlit.cmd +1 -1
- {streamlit_nightly-1.41.2.dev20241227.dist-info → streamlit_nightly-1.41.2.dev20250124.dist-info}/METADATA +16 -4
- streamlit_nightly-1.41.2.dev20250124.dist-info/RECORD +560 -0
- {streamlit_nightly-1.41.2.dev20241227.dist-info → streamlit_nightly-1.41.2.dev20250124.dist-info}/WHEEL +1 -1
- streamlit/static/static/css/index.ZIJkhegp.css +0 -1
- streamlit/static/static/js/InputInstructions.DpTmOmkP.js +0 -1
- streamlit/static/static/js/RenderInPortalIfExists.CphMKHZ_.js +0 -1
- streamlit/static/static/js/Toolbar.YZjXpW2P.js +0 -1
- streamlit/static/static/js/_commonjs-dynamic-modules.TDtrdbi3.js +0 -1
- streamlit/static/static/js/createSuper.Cj3WfXha.js +0 -1
- streamlit/static/static/js/data-grid-overlay-editor.CXW3Vrt9.js +0 -1
- streamlit/static/static/js/getPrototypeOf.BZAK2f3t.js +0 -1
- streamlit/static/static/js/index.1auHKWgw.js +0 -3
- streamlit/static/static/js/index.2XFKVtzu.js +0 -1
- streamlit/static/static/js/index.B9O1l5Yf.js +0 -32
- streamlit/static/static/js/index.BjtDBCFh.js +0 -2
- streamlit/static/static/js/index.Bp-uIPRI.js +0 -1
- streamlit/static/static/js/index.BrGYP4fV.js +0 -1
- streamlit/static/static/js/index.BwUmNKlx.js +0 -1
- streamlit/static/static/js/index.CCVCD0op.js +0 -1
- streamlit/static/static/js/index.CP7C0jmi.js +0 -1
- streamlit/static/static/js/index.CVNaQiWI.js +0 -4
- streamlit/static/static/js/index.CX7qwffH.js +0 -1
- streamlit/static/static/js/index.CaCnIXu_.js +0 -1
- streamlit/static/static/js/index.Ck6XWYeb.js +0 -1
- streamlit/static/static/js/index.CmD2DSvp.js +0 -201
- streamlit/static/static/js/index.CnX4MRBV.js +0 -1
- streamlit/static/static/js/index.DR8k91Kp.js +0 -1
- streamlit/static/static/js/index.Dc0EFNHf.js +0 -197
- streamlit/static/static/js/index.M9USxdKN.js +0 -1
- streamlit/static/static/js/index.MCDV8ab_.js +0 -1
- streamlit/static/static/js/index.T4c5nSGV.js +0 -2
- streamlit/static/static/js/index.brVZtr01.js +0 -1
- streamlit/static/static/js/index.fm1fEqFi.js +0 -1
- streamlit/static/static/js/index.vm3Bds7I.js +0 -1
- streamlit/static/static/js/index.y_EIxzAg.js +0 -1
- streamlit/static/static/js/number-overlay-editor.D5dgP2YW.js +0 -9
- streamlit/static/static/js/slicedToArray.DVgs1NsC.js +0 -2
- streamlit/static/static/js/string.Bl9OLDCw.js +0 -1
- streamlit/static/static/js/threshold.skajmqVB.js +0 -1
- streamlit/static/static/js/timer.DwZfkapc.js +0 -1
- streamlit/static/static/js/uniqueId.OJw6SDpp.js +0 -1
- streamlit/static/static/js/withFullScreenWrapper.BjS0eA06.js +0 -1
- streamlit/static/static/media/MaterialSymbols-Rounded.MYSe4dsi.woff2 +0 -0
- streamlit/vendor/ipython/__init__.py +0 -0
- streamlit/vendor/ipython/modified_sys_path.py +0 -67
- streamlit_nightly-1.41.2.dev20241227.dist-info/RECORD +0 -556
- /streamlit/static/static/css/{index.B26BQfSF.css → index.Bmkmz40k.css} +0 -0
- /streamlit/static/static/css/{index.CG16XVnL.css → index.DzuxGC_t.css} +0 -0
- {streamlit_nightly-1.41.2.dev20241227.dist-info → streamlit_nightly-1.41.2.dev20250124.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.41.2.dev20241227.dist-info → streamlit_nightly-1.41.2.dev20250124.dist-info}/top_level.txt +0 -0
@@ -1 +0,0 @@
|
|
1
|
-
import{n as e,aV as t,i as d,R as l,a6 as c,bz as p,j as i,bA as g,a7 as S,a1 as u}from"./index.CLHVvMN0.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};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{r as o,E as M,_ as q,n as x,al as lt,bY as ut,D as Y,c6 as I,A as f,a7 as z,j as u,a_ as ct,bb as dt,a$ as pt,aK as ft,b0 as bt,aX as K}from"./index.CLHVvMN0.js";import{s as mt}from"./sprintf.C-r3gIuM.js";import{u as yt}from"./uniqueId.OJw6SDpp.js";import{u as gt}from"./FormClearHelper.DSgVZ-NK.js";import{I as It}from"./InputInstructions.DpTmOmkP.js";import{I as ht}from"./input.28wXD4uV.js";import"./base-input.gDrmzpbY.js";var J=o.forwardRef(function(t,e){var r={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return o.createElement(M,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(M,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"}),X=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,G=({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(G(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(G({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(X,{"data-testid":"stNumberInputStepDown",onClick:E,disabled:!S||t,tabIndex:-1,children:u(K,{content:J,size:"xs",color:S?"inherit":"disabled"})}),u(X,{"data-testid":"stNumberInputStepUp",onClick:F,disabled:!V||t,tabIndex:-1,children:u(K,{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,2 +0,0 @@
|
|
1
|
-
import{d as U,r as w,b2 as ee,br as pt,bc as vt,b3 as J,bs as mt,bt,n as be,Q as yt,M as Tt,ai as kt,a7 as Ue,j as ae,R as He,bP as Ot,a_ as wt,bb as Rt,a$ as St,aK as Mt,b0 as _t,G as $t,bQ as Ee}from"./index.CLHVvMN0.js";import{s as We}from"./sprintf.C-r3gIuM.js";import{a as Et}from"./useBasicWidgetState.C2DsWpWi.js";import"./FormClearHelper.DSgVZ-NK.js";var xe={},Ce={},De={},ce={};Object.defineProperty(ce,"__esModule",{value:!0});ce.Direction=void 0;var Ke;(function(t){t.Right="to right",t.Left="to left",t.Down="to bottom",t.Up="to top"})(Ke||(ce.Direction=Ke={}));(function(t){var r=U&&U.__spreadArray||function(o,u,l){if(l||arguments.length===2)for(var p=0,b=u.length,g;p<b;p++)(g||!(p in u))&&(g||(g=Array.prototype.slice.call(u,0,p)),g[p]=u[p]);return o.concat(g||Array.prototype.slice.call(u))};Object.defineProperty(t,"__esModule",{value:!0}),t.isIOS=t.useThumbOverlap=t.assertUnreachable=t.voidFn=t.getTrackBackground=t.replaceAt=t.schd=t.translate=t.getClosestThumbIndex=t.translateThumbs=t.getPaddingAndBorder=t.getMargin=t.checkInitialOverlap=t.checkValuesAgainstBoundaries=t.checkBoundaries=t.isVertical=t.relativeValue=t.normalizeValue=t.isStepDivisible=t.isTouchEvent=t.getStepDecimals=void 0;var n=w,e=ce,a=function(o){var u=o.toString().split(".")[1];return u?u.length:0};t.getStepDecimals=a;function i(o){return o.touches&&o.touches.length||o.changedTouches&&o.changedTouches.length}t.isTouchEvent=i;function s(o,u,l){var p=(u-o)/l,b=8,g=Number(p.toFixed(b));return parseInt(g.toString(),10)===g}t.isStepDivisible=s;function c(o,u,l,p,b,g,T){var k=1e11;if(o=Math.round(o*k)/k,!g){var C=T[u-1],_=T[u+1];if(C&&C>o)return C;if(_&&_<o)return _}if(o>p)return p;if(o<l)return l;var N=Math.floor(o*k-l*k)%Math.floor(b*k),j=Math.floor(o*k-Math.abs(N)),W=N===0?o:j/k,E=Math.abs(N/k)<b/2?W:W+b,I=(0,t.getStepDecimals)(b);return parseFloat(E.toFixed(I))}t.normalizeValue=c;function f(o,u,l){return(o-u)/(l-u)}t.relativeValue=f;function y(o){return o===e.Direction.Up||o===e.Direction.Down}t.isVertical=y;function d(o,u,l){if(u>=l)throw new RangeError("min (".concat(u,") is equal/bigger than max (").concat(l,")"));if(o<u)throw new RangeError("value (".concat(o,") is smaller than min (").concat(u,")"));if(o>l)throw new RangeError("value (".concat(o,") is bigger than max (").concat(l,")"))}t.checkBoundaries=d;function h(o,u,l){return o<u?u:o>l?l:o}t.checkValuesAgainstBoundaries=h;function v(o){if(!(o.length<2)&&!o.slice(1).every(function(u,l){return o[l]<=u}))throw new RangeError("values={[".concat(o,"]} needs to be sorted when allowOverlap={false}"))}t.checkInitialOverlap=v;function R(o){var u=window.getComputedStyle(o);return{top:parseInt(u["margin-top"],10),bottom:parseInt(u["margin-bottom"],10),left:parseInt(u["margin-left"],10),right:parseInt(u["margin-right"],10)}}t.getMargin=R;function m(o){var u=window.getComputedStyle(o);return{top:parseInt(u["padding-top"],10)+parseInt(u["border-top-width"],10),bottom:parseInt(u["padding-bottom"],10)+parseInt(u["border-bottom-width"],10),left:parseInt(u["padding-left"],10)+parseInt(u["border-left-width"],10),right:parseInt(u["padding-right"],10)+parseInt(u["border-right-width"],10)}}t.getPaddingAndBorder=m;function S(o,u,l){var p=l?-1:1;o.forEach(function(b,g){return L(b,p*u[g].x,u[g].y)})}t.translateThumbs=S;function B(o,u,l,p){for(var b=0,g=F(o[0],u,l,p),T=1;T<o.length;T++){var k=F(o[T],u,l,p);k<g&&(g=k,b=T)}return b}t.getClosestThumbIndex=B;function L(o,u,l){o.style.transform="translate(".concat(u,"px, ").concat(l,"px)")}t.translate=L;var D=function(o){var u=[],l=null,p=function(){for(var b=[],g=0;g<arguments.length;g++)b[g]=arguments[g];u=b,!l&&(l=requestAnimationFrame(function(){l=null,o.apply(void 0,u)}))};return p};t.schd=D;function M(o,u,l){var p=o.slice(0);return p[u]=l,p}t.replaceAt=M;function $(o){var u=o.values,l=o.colors,p=o.min,b=o.max,g=o.direction,T=g===void 0?e.Direction.Right:g,k=o.rtl,C=k===void 0?!1:k;C&&T===e.Direction.Right?T=e.Direction.Left:C&&e.Direction.Left&&(T=e.Direction.Right);var _=u.slice(0).sort(function(j,W){return j-W}).map(function(j){return(j-p)/(b-p)*100}),N=_.reduce(function(j,W,E){return"".concat(j,", ").concat(l[E]," ").concat(W,"%, ").concat(l[E+1]," ").concat(W,"%")},"");return"linear-gradient(".concat(T,", ").concat(l[0]," 0%").concat(N,", ").concat(l[l.length-1]," 100%)")}t.getTrackBackground=$;function H(){}t.voidFn=H;function A(o){throw new Error("Didn't expect to get here")}t.assertUnreachable=A;var x=function(o,u,l,p,b){b===void 0&&(b=function(T){return T});var g=Math.ceil(r([o],Array.from(o.children),!0).reduce(function(T,k){var C=Math.ceil(k.getBoundingClientRect().width);if(k.innerText&&k.innerText.includes(l)&&k.childElementCount===0){var _=k.cloneNode(!0);_.innerHTML=b(u.toFixed(p)),_.style.visibility="hidden",document.body.appendChild(_),C=Math.ceil(_.getBoundingClientRect().width),document.body.removeChild(_)}return C>T?C:T},o.getBoundingClientRect().width));return g},X=function(o,u,l,p,b,g,T){T===void 0&&(T=function(_){return _});var k=[],C=function(_){var N=x(l[_],p[_],b,g,T),j=u[_].x;u.forEach(function(W,E){var I=W.x,Q=x(l[E],p[E],b,g,T);_!==E&&(j>=I&&j<=I+Q||j+N>=I&&j+N<=I+Q)&&(k.includes(E)||(k.push(_),k.push(E),k=r(r([],k,!0),[_,E],!1),C(E)))})};return C(o),Array.from(new Set(k.sort()))},Z=function(o,u,l,p,b,g){p===void 0&&(p=.1),b===void 0&&(b=" - "),g===void 0&&(g=function(E){return E});var T=(0,t.getStepDecimals)(p),k=(0,n.useState)({}),C=k[0],_=k[1],N=(0,n.useState)(g(u[l].toFixed(T))),j=N[0],W=N[1];return(0,n.useEffect)(function(){if(o){var E=o.getThumbs();if(E.length<1)return;var I={},Q=o.getOffsets(),ie=X(l,Q,E,u,b,T,g),le=g(u[l].toFixed(T));if(ie.length){var te=ie.reduce(function(re,ue,ge,pe){return re.length?r(r([],re,!0),[Q[pe[ge]].x],!1):[Q[pe[ge]].x]},[]);if(Math.min.apply(Math,te)===Q[l].x){var de=[];ie.forEach(function(re){de.push(u[re].toFixed(T))}),le=Array.from(new Set(de.sort(function(re,ue){return parseFloat(re)-parseFloat(ue)}))).map(g).join(b);var fe=Math.min.apply(Math,te),he=Math.max.apply(Math,te),$e=E[ie[te.indexOf(he)]].getBoundingClientRect().width;I.left="".concat(Math.abs(fe-(he+$e))/2,"px"),I.transform="translate(-50%, 0)"}else I.visibility="hidden"}W(le),_(I)}},[o,u]),[j,C]};t.useThumbOverlap=Z;function F(o,u,l,p){var b=o.getBoundingClientRect(),g=b.left,T=b.top,k=b.width,C=b.height;return y(p)?Math.abs(l-(T+C/2)):Math.abs(u-(g+k/2))}var z=function(){var o,u=((o=navigator.userAgentData)===null||o===void 0?void 0:o.platform)||navigator.platform;return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(u)||navigator.userAgent.includes("Mac")&&"ontouchend"in document};t.isIOS=z})(De);var It=U&&U.__extends||function(){var t=function(r,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(e[i]=a[i])},t(r,n)};return function(r,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(r,n);function e(){this.constructor=r}r.prototype=n===null?Object.create(n):(e.prototype=n.prototype,new e)}}(),xt=U&&U.__createBinding||(Object.create?function(t,r,n,e){e===void 0&&(e=n);var a=Object.getOwnPropertyDescriptor(r,n);(!a||("get"in a?!r.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return r[n]}}),Object.defineProperty(t,e,a)}:function(t,r,n,e){e===void 0&&(e=n),t[e]=r[n]}),Ct=U&&U.__setModuleDefault||(Object.create?function(t,r){Object.defineProperty(t,"default",{enumerable:!0,value:r})}:function(t,r){t.default=r}),Dt=U&&U.__importStar||function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&xt(r,t,n);return Ct(r,t),r},Ge=U&&U.__spreadArray||function(t,r,n){if(n||arguments.length===2)for(var e=0,a=r.length,i;e<a;e++)(i||!(e in r))&&(i||(i=Array.prototype.slice.call(r,0,e)),i[e]=r[e]);return t.concat(i||Array.prototype.slice.call(r))};Object.defineProperty(Ce,"__esModule",{value:!0});var ve=Dt(w),O=De,P=ce,Pt=["ArrowRight","ArrowUp","k","PageUp"],Bt=["ArrowLeft","ArrowDown","j","PageDown"],At=function(t){It(r,t);function r(n){var e=t.call(this,n)||this;if(e.trackRef=ve.createRef(),e.thumbRefs=[],e.state={draggedTrackPos:[-1,-1],draggedThumbIndex:-1,thumbZIndexes:new Array(e.props.values.length).fill(0).map(function(a,i){return i}),isChanged:!1,markOffsets:[]},e.getOffsets=function(){var a=e.props,i=a.direction,s=a.values,c=a.min,f=a.max,y=e.trackRef.current;if(!y)return console.warn("No track element found."),[];var d=y.getBoundingClientRect(),h=(0,O.getPaddingAndBorder)(y);return e.getThumbs().map(function(v,R){var m={x:0,y:0},S=v.getBoundingClientRect(),B=(0,O.getMargin)(v);switch(i){case P.Direction.Right:return m.x=(B.left+h.left)*-1,m.y=((S.height-d.height)/2+h.top)*-1,m.x+=d.width*(0,O.relativeValue)(s[R],c,f)-S.width/2,m;case P.Direction.Left:return m.x=(B.right+h.right)*-1,m.y=((S.height-d.height)/2+h.top)*-1,m.x+=d.width-d.width*(0,O.relativeValue)(s[R],c,f)-S.width/2,m;case P.Direction.Up:return m.x=((S.width-d.width)/2+B.left+h.left)*-1,m.y=-h.left,m.y+=d.height-d.height*(0,O.relativeValue)(s[R],c,f)-S.height/2,m;case P.Direction.Down:return m.x=((S.width-d.width)/2+B.left+h.left)*-1,m.y=-h.left,m.y+=d.height*(0,O.relativeValue)(s[R],c,f)-S.height/2,m;default:return(0,O.assertUnreachable)(i)}})},e.getThumbs=function(){return e.trackRef&&e.trackRef.current?Array.from(e.trackRef.current.children).filter(function(a){return a.hasAttribute("aria-valuenow")}):(console.warn("No thumbs found in the track container. Did you forget to pass & spread the `props` param in renderTrack?"),[])},e.getTargetIndex=function(a){return e.getThumbs().findIndex(function(i){return i===a.target||i.contains(a.target)})},e.addTouchEvents=function(a){document.addEventListener("touchmove",e.schdOnTouchMove,{passive:!1}),document.addEventListener("touchend",e.schdOnEnd,{passive:!1}),document.addEventListener("touchcancel",e.schdOnEnd,{passive:!1})},e.addMouseEvents=function(a){document.addEventListener("mousemove",e.schdOnMouseMove),document.addEventListener("mouseup",e.schdOnEnd)},e.onMouseDownTrack=function(a){var i;if(!(a.button!==0||(0,O.isIOS)()))if(a.persist(),a.preventDefault(),e.addMouseEvents(a.nativeEvent),e.props.values.length>1&&e.props.draggableTrack){if(e.thumbRefs.some(function(c){var f;return(f=c.current)===null||f===void 0?void 0:f.contains(a.target)}))return;e.setState({draggedTrackPos:[a.clientX,a.clientY]},function(){return e.onMove(a.clientX,a.clientY)})}else{var s=(0,O.getClosestThumbIndex)(e.thumbRefs.map(function(c){return c.current}),a.clientX,a.clientY,e.props.direction);(i=e.thumbRefs[s].current)===null||i===void 0||i.focus(),e.setState({draggedThumbIndex:s},function(){return e.onMove(a.clientX,a.clientY)})}},e.onResize=function(){(0,O.translateThumbs)(e.getThumbs(),e.getOffsets(),e.props.rtl),e.calculateMarkOffsets()},e.onTouchStartTrack=function(a){var i;if(a.persist(),e.addTouchEvents(a.nativeEvent),e.props.values.length>1&&e.props.draggableTrack){if(e.thumbRefs.some(function(c){var f;return(f=c.current)===null||f===void 0?void 0:f.contains(a.target)}))return;e.setState({draggedTrackPos:[a.touches[0].clientX,a.touches[0].clientY]},function(){return e.onMove(a.touches[0].clientX,a.touches[0].clientY)})}else{var s=(0,O.getClosestThumbIndex)(e.thumbRefs.map(function(c){return c.current}),a.touches[0].clientX,a.touches[0].clientY,e.props.direction);(i=e.thumbRefs[s].current)===null||i===void 0||i.focus(),e.setState({draggedThumbIndex:s},function(){return e.onMove(a.touches[0].clientX,a.touches[0].clientY)})}},e.onMouseOrTouchStart=function(a){if(!e.props.disabled){var i=(0,O.isTouchEvent)(a);if(!(!i&&a.button!==0)){var s=e.getTargetIndex(a);s!==-1&&(i?e.addTouchEvents(a):e.addMouseEvents(a),e.setState({draggedThumbIndex:s,thumbZIndexes:e.state.thumbZIndexes.map(function(c,f){return f===s?Math.max.apply(Math,e.state.thumbZIndexes):c<=e.state.thumbZIndexes[s]?c:c-1})}))}}},e.onMouseMove=function(a){a.preventDefault(),e.onMove(a.clientX,a.clientY)},e.onTouchMove=function(a){a.preventDefault(),e.onMove(a.touches[0].clientX,a.touches[0].clientY)},e.onKeyDown=function(a){var i=e.props,s=i.values,c=i.onChange,f=i.step,y=i.rtl,d=i.direction,h=e.state.isChanged,v=e.getTargetIndex(a.nativeEvent),R=y||d===P.Direction.Left||d===P.Direction.Down?-1:1;v!==-1&&(Pt.includes(a.key)?(a.preventDefault(),e.setState({draggedThumbIndex:v,isChanged:!0}),c((0,O.replaceAt)(s,v,e.normalizeValue(s[v]+R*(a.key==="PageUp"?f*10:f),v)))):Bt.includes(a.key)?(a.preventDefault(),e.setState({draggedThumbIndex:v,isChanged:!0}),c((0,O.replaceAt)(s,v,e.normalizeValue(s[v]-R*(a.key==="PageDown"?f*10:f),v)))):a.key==="Tab"?e.setState({draggedThumbIndex:-1},function(){h&&e.fireOnFinalChange()}):h&&e.fireOnFinalChange())},e.onKeyUp=function(a){var i=e.state.isChanged;e.setState({draggedThumbIndex:-1},function(){i&&e.fireOnFinalChange()})},e.onMove=function(a,i){var s=e.state,c=s.draggedThumbIndex,f=s.draggedTrackPos,y=e.props,d=y.direction,h=y.min,v=y.max,R=y.onChange,m=y.values,S=y.step,B=y.rtl;if(c===-1&&f[0]===-1&&f[1]===-1)return null;var L=e.trackRef.current;if(!L)return null;var D=L.getBoundingClientRect(),M=(0,O.isVertical)(d)?D.height:D.width;if(f[0]!==-1&&f[1]!==-1){var $=a-f[0],H=i-f[1],A=0;switch(d){case P.Direction.Right:case P.Direction.Left:A=$/M*(v-h);break;case P.Direction.Down:case P.Direction.Up:A=H/M*(v-h);break;default:(0,O.assertUnreachable)(d)}if(B&&(A*=-1),Math.abs(A)>=S/2){for(var x=0;x<e.thumbRefs.length;x++){if(m[x]===v&&Math.sign(A)===1||m[x]===h&&Math.sign(A)===-1)return;var X=m[x]+A;X>v?A=v-m[x]:X<h&&(A=h-m[x])}for(var Z=m.slice(0),x=0;x<e.thumbRefs.length;x++)Z=(0,O.replaceAt)(Z,x,e.normalizeValue(m[x]+A,x));e.setState({draggedTrackPos:[a,i]}),R(Z)}}else{var F=0;switch(d){case P.Direction.Right:F=(a-D.left)/M*(v-h)+h;break;case P.Direction.Left:F=(M-(a-D.left))/M*(v-h)+h;break;case P.Direction.Down:F=(i-D.top)/M*(v-h)+h;break;case P.Direction.Up:F=(M-(i-D.top))/M*(v-h)+h;break;default:(0,O.assertUnreachable)(d)}B&&(F=v+h-F),Math.abs(m[c]-F)>=S/2&&R((0,O.replaceAt)(m,c,e.normalizeValue(F,c)))}},e.normalizeValue=function(a,i){var s=e.props,c=s.min,f=s.max,y=s.step,d=s.allowOverlap,h=s.values;return(0,O.normalizeValue)(a,i,c,f,y,d,h)},e.onEnd=function(a){if(a.preventDefault(),document.removeEventListener("mousemove",e.schdOnMouseMove),document.removeEventListener("touchmove",e.schdOnTouchMove),document.removeEventListener("mouseup",e.schdOnEnd),document.removeEventListener("touchend",e.schdOnEnd),document.removeEventListener("touchcancel",e.schdOnEnd),e.state.draggedThumbIndex===-1&&e.state.draggedTrackPos[0]===-1&&e.state.draggedTrackPos[1]===-1)return null;e.setState({draggedThumbIndex:-1,draggedTrackPos:[-1,-1]},function(){e.fireOnFinalChange()})},e.fireOnFinalChange=function(){e.setState({isChanged:!1});var a=e.props,i=a.onFinalChange,s=a.values;i&&i(s)},e.updateMarkRefs=function(a){if(!a.renderMark){e.numOfMarks=void 0,e.markRefs=void 0;return}e.numOfMarks=(a.max-a.min)/e.props.step,e.markRefs=[];for(var i=0;i<e.numOfMarks+1;i++)e.markRefs[i]=ve.createRef()},e.calculateMarkOffsets=function(){if(!(!e.props.renderMark||!e.trackRef||!e.numOfMarks||!e.markRefs||e.trackRef.current===null)){for(var a=window.getComputedStyle(e.trackRef.current),i=parseInt(a.width,10),s=parseInt(a.height,10),c=parseInt(a.paddingLeft,10),f=parseInt(a.paddingTop,10),y=[],d=0;d<e.numOfMarks+1;d++){var h=9999,v=9999;if(e.markRefs[d].current){var R=e.markRefs[d].current.getBoundingClientRect();h=R.height,v=R.width}e.props.direction===P.Direction.Left||e.props.direction===P.Direction.Right?y.push([Math.round(i/e.numOfMarks*d+c-v/2),-Math.round((h-s)/2)]):y.push([Math.round(s/e.numOfMarks*d+f-h/2),-Math.round((v-i)/2)])}e.setState({markOffsets:y})}},n.step===0)throw new Error('"step" property should be a positive number');return e.schdOnMouseMove=(0,O.schd)(e.onMouseMove),e.schdOnTouchMove=(0,O.schd)(e.onTouchMove),e.schdOnEnd=(0,O.schd)(e.onEnd),e.thumbRefs=n.values.map(function(){return ve.createRef()}),e.updateMarkRefs(n),e}return r.prototype.componentDidMount=function(){var n=this,e=this.props,a=e.values,i=e.min,s=e.step;this.resizeObserver=window.ResizeObserver?new window.ResizeObserver(this.onResize):{observe:function(){return window.addEventListener("resize",n.onResize)},unobserve:function(){return window.removeEventListener("resize",n.onResize)}},document.addEventListener("touchstart",this.onMouseOrTouchStart,{passive:!1}),document.addEventListener("mousedown",this.onMouseOrTouchStart,{passive:!1}),!this.props.allowOverlap&&(0,O.checkInitialOverlap)(this.props.values),this.props.values.forEach(function(c){return(0,O.checkBoundaries)(c,n.props.min,n.props.max)}),this.resizeObserver.observe(this.trackRef.current),(0,O.translateThumbs)(this.getThumbs(),this.getOffsets(),this.props.rtl),this.calculateMarkOffsets(),a.forEach(function(c){(0,O.isStepDivisible)(i,c,s)||console.warn("The `values` property is in conflict with the current `step`, `min`, and `max` properties. Please provide values that are accessible using the min, max, and step values.")})},r.prototype.componentDidUpdate=function(n,e){var a=this.props,i=a.max,s=a.min,c=a.step,f=a.values,y=a.rtl;(n.max!==i||n.min!==s||n.step!==c)&&this.updateMarkRefs(this.props),(0,O.translateThumbs)(this.getThumbs(),this.getOffsets(),y),(n.max!==i||n.min!==s||n.step!==c||e.markOffsets.length!==this.state.markOffsets.length)&&(this.calculateMarkOffsets(),f.forEach(function(d){(0,O.isStepDivisible)(s,d,c)||console.warn("The `values` property is in conflict with the current `step`, `min`, and `max` properties. Please provide values that are accessible using the min, max, and step values.")}))},r.prototype.componentWillUnmount=function(){var n={passive:!1};document.removeEventListener("mousedown",this.onMouseOrTouchStart,n),document.removeEventListener("mousemove",this.schdOnMouseMove),document.removeEventListener("touchmove",this.schdOnTouchMove),document.removeEventListener("touchstart",this.onMouseOrTouchStart),document.removeEventListener("mouseup",this.schdOnEnd),document.removeEventListener("touchend",this.schdOnEnd),this.resizeObserver.unobserve(this.trackRef.current)},r.prototype.render=function(){var n=this,e=this.props,a=e.label,i=e.labelledBy,s=e.renderTrack,c=e.renderThumb,f=e.renderMark,y=f===void 0?function(){return null}:f,d=e.values,h=e.min,v=e.max,R=e.allowOverlap,m=e.disabled,S=this.state,B=S.draggedThumbIndex,L=S.thumbZIndexes,D=S.markOffsets;return s({props:{style:{transform:"scale(1)",cursor:B>-1?"grabbing":this.props.draggableTrack?(0,O.isVertical)(this.props.direction)?"ns-resize":"ew-resize":d.length===1&&!m?"pointer":"inherit"},onMouseDown:m?O.voidFn:this.onMouseDownTrack,onTouchStart:m?O.voidFn:this.onTouchStartTrack,ref:this.trackRef},isDragged:this.state.draggedThumbIndex>-1,disabled:m,children:Ge(Ge([],D.map(function(M,$,H){return y({props:{style:n.props.direction===P.Direction.Left||n.props.direction===P.Direction.Right?{position:"absolute",left:"".concat(M[0],"px"),marginTop:"".concat(M[1],"px")}:{position:"absolute",top:"".concat(M[0],"px"),marginLeft:"".concat(M[1],"px")},key:"mark".concat($),ref:n.markRefs[$]},index:$})}),!0),d.map(function(M,$){var H=n.state.draggedThumbIndex===$;return c({index:$,value:M,isDragged:H,props:{style:{position:"absolute",zIndex:L[$],cursor:m?"inherit":H?"grabbing":"grab",userSelect:"none",touchAction:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none"},key:$,tabIndex:m?void 0:0,"aria-valuemax":R?v:d[$+1]||v,"aria-valuemin":R?h:d[$-1]||h,"aria-valuenow":M,draggable:!1,ref:n.thumbRefs[$],"aria-label":a,"aria-labelledby":i,role:"slider",onKeyDown:m?O.voidFn:n.onKeyDown,onKeyUp:m?O.voidFn:n.onKeyUp}})}),!0)})},r.defaultProps={label:"Accessibility label",labelledBy:null,step:1,direction:P.Direction.Right,rtl:!1,disabled:!1,allowOverlap:!1,draggableTrack:!1,min:0,max:100},r}(ve.Component);Ce.default=At;(function(t){var r=U&&U.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(t,"__esModule",{value:!0}),t.checkValuesAgainstBoundaries=t.relativeValue=t.useThumbOverlap=t.Direction=t.getTrackBackground=t.Range=void 0;var n=r(Ce);t.Range=n.default;var e=De;Object.defineProperty(t,"getTrackBackground",{enumerable:!0,get:function(){return e.getTrackBackground}}),Object.defineProperty(t,"useThumbOverlap",{enumerable:!0,get:function(){return e.useThumbOverlap}}),Object.defineProperty(t,"relativeValue",{enumerable:!0,get:function(){return e.relativeValue}}),Object.defineProperty(t,"checkValuesAgainstBoundaries",{enumerable:!0,get:function(){return e.checkValuesAgainstBoundaries}});var a=ce;Object.defineProperty(t,"Direction",{enumerable:!0,get:function(){return a.Direction}})})(xe);function Ye(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);r&&(e=e.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,e)}return n}function me(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?Ye(Object(n),!0).forEach(function(e){Ft(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ye(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Ft(t,r,n){return r in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}var ye=ee("div",{position:"relative",width:"100%"});ye.displayName="Root";ye.displayName="Root";ye.displayName="StyledRoot";var Te=ee("div",function(t){var r=t.$theme,n=t.$value,e=n===void 0?[]:n,a=t.$disabled,i=t.$isDragged,s=r.sizing,c="inherit";return a?c="not-allowed":i?c="grabbing":e.length===1&&(c="pointer"),{paddingTop:s.scale600,paddingBottom:s.scale600,paddingRight:s.scale600,paddingLeft:s.scale600,display:"flex",cursor:c,backgroundColor:r.colors.sliderTrackFill}});Te.displayName="Track";Te.displayName="Track";Te.displayName="StyledTrack";var ke=ee("div",function(t){var r=t.$theme,n=t.$value,e=n===void 0?[]:n,a=t.$min,i=t.$max,s=t.$disabled,c=r.colors,f=r.borders,y=r.direction,d=r.borders.useRoundedCorners?f.radius100:0;return{borderTopLeftRadius:d,borderTopRightRadius:d,borderBottomRightRadius:d,borderBottomLeftRadius:d,background:xe.getTrackBackground({values:e,colors:e.length===1?[s?c.borderOpaque:c.primary,s?c.backgroundSecondary:c.borderOpaque]:[s?c.backgroundSecondary:c.borderOpaque,s?c.borderOpaque:c.primary,s?c.backgroundSecondary:c.borderOpaque],min:a||0,max:i||0,rtl:y==="rtl"}),height:"2px",width:"100%",alignSelf:"center",cursor:s?"not-allowed":"inherit"}});ke.displayName="InnerTrack";ke.displayName="InnerTrack";ke.displayName="StyledInnerTrack";var Oe=ee("div",function(t){return{width:"4px",height:"2px",backgroundColor:t.$theme.colors.backgroundPrimary,marginLeft:"16px"}});Oe.displayName="Mark";Oe.displayName="Mark";Oe.displayName="StyledMark";var we=ee("div",function(t){return me(me({},t.$theme.typography.font200),{},{color:t.$theme.colors.contentPrimary})});we.displayName="Tick";we.displayName="Tick";we.displayName="StyledTick";var Re=ee("div",function(t){var r=t.$theme,n=r.sizing;return{display:"flex",justifyContent:"space-between",alignItems:"center",paddingRight:n.scale600,paddingLeft:n.scale600,paddingBottom:n.scale400}});Re.displayName="TickBar";Re.displayName="TickBar";Re.displayName="StyledTickBar";var Se=ee("div",function(t){var r=t.$theme,n=t.$value,e=n===void 0?[]:n,a=t.$thumbIndex,i=t.$disabled,s=e.length===2&&a===0,c=e.length===2&&a===1;return r.direction==="rtl"&&(c||s)&&(s=!s,c=!c),{height:"24px",width:"24px",borderTopLeftRadius:"24px",borderTopRightRadius:"24px",borderBottomLeftRadius:"24px",borderBottomRightRadius:"24px",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:i?r.colors.sliderHandleFillDisabled:r.colors.sliderHandleFill,outline:"none",boxShadow:t.$isFocusVisible?"0 0 0 3px ".concat(r.colors.accent):"0 1px 4px rgba(0, 0, 0, 0.12)",cursor:i?"not-allowed":"inherit"}});Se.displayName="Thumb";Se.displayName="Thumb";Se.displayName="StyledThumb";var Me=ee("div",function(t){var r=t.$disabled,n=t.$theme;return{position:"absolute",top:"-16px",width:"4px",height:"20px",backgroundColor:r?n.colors.sliderHandleFillDisabled:n.colors.sliderHandleInnerFill}});Me.displayName="InnerThumb";Me.displayName="InnerThumb";Me.displayName="StyledInnerThumb";var _e=ee("div",function(t){var r=t.$disabled,n=t.$theme;return me(me({position:"absolute",top:"-".concat(n.sizing.scale1400)},n.typography.font200),{},{backgroundColor:r?n.colors.sliderHandleFillDisabled:n.colors.sliderHandleInnerFill,color:n.colors.contentInversePrimary,paddingLeft:n.sizing.scale600,paddingRight:n.sizing.scale600,paddingTop:n.sizing.scale500,paddingBottom:n.sizing.scale500,borderBottomLeftRadius:"48px",borderBottomRightRadius:"48px",borderTopLeftRadius:"48px",borderTopRightRadius:"48px",whiteSpace:"nowrap"})});_e.displayName="ThumbValue";_e.displayName="ThumbValue";_e.displayName="StyledThumbValue";function qe(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);r&&(e=e.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,e)}return n}function Lt(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?qe(Object(n),!0).forEach(function(e){jt(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):qe(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function jt(t,r,n){return r in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function Y(){return Y=Object.assign?Object.assign.bind():function(t){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])}return t},Y.apply(this,arguments)}function G(t,r){return Ut(t)||Nt(t,r)||zt(t,r)||Vt()}function Vt(){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 zt(t,r){if(t){if(typeof t=="string")return Xe(t,r);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Xe(t,r)}}function Xe(t,r){(r==null||r>t.length)&&(r=t.length);for(var n=0,e=new Array(r);n<r;n++)e[n]=t[n];return e}function Nt(t,r){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var e=[],a=!0,i=!1,s,c;try{for(n=n.call(t);!(a=(s=n.next()).done)&&(e.push(s.value),!(r&&e.length===r));a=!0);}catch(f){i=!0,c=f}finally{try{!a&&n.return!=null&&n.return()}finally{if(i)throw c}}return e}}function Ut(t){if(Array.isArray(t))return t}var Ht=function(r){if(r.length>2||r.length===0)throw new Error("the value prop represents positions of thumbs, so its length can be only one or two");return r};function Wt(t){var r=t.overrides,n=r===void 0?{}:r,e=t.disabled,a=e===void 0?!1:e,i=t.marks,s=i===void 0?!1:i,c=t.onChange,f=c===void 0?function(){}:c,y=t.onFinalChange,d=y===void 0?function(){}:y,h=t.min,v=h===void 0?0:h,R=t.max,m=R===void 0?100:R,S=t.step,B=S===void 0?1:S,L=t.persistentThumb,D=L===void 0?!1:L,M=t.valueToLabel,$=M===void 0?function(q){return q}:M,H=t.value,A=w.useContext(pt),x=w.useState(!1),X=G(x,2),Z=X[0],F=X[1],z=w.useState(!1),o=G(z,2),u=o[0],l=o[1],p=w.useState(!1),b=G(p,2),g=b[0],T=b[1],k=w.useState(-1),C=G(k,2),_=C[0],N=C[1],j=w.useCallback(function(q){vt(q)&&T(!0);var V=q.target.parentNode.firstChild===q.target?0:1;N(V)},[]),W=w.useCallback(function(q){g!==!1&&T(!1),N(-1)},[]),E=Ht(H),I={$disabled:a,$step:B,$min:v,$max:m,$marks:s,$value:E,$isFocusVisible:g},Q=J(n.Root,ye),ie=G(Q,2),le=ie[0],te=ie[1],de=J(n.Track,Te),fe=G(de,2),he=fe[0],$e=fe[1],re=J(n.InnerTrack,ke),ue=G(re,2),ge=ue[0],pe=ue[1],Qe=J(n.Thumb,Se),Pe=G(Qe,2),Je=Pe[0],et=Pe[1],tt=J(n.InnerThumb,Me),Be=G(tt,2),rt=Be[0],nt=Be[1],at=J(n.ThumbValue,_e),Ae=G(at,2),it=Ae[0],ot=Ae[1],st=J(n.Tick,we),Fe=G(st,2),Le=Fe[0],je=Fe[1],ct=J(n.TickBar,Re),Ve=G(ct,2),ut=Ve[0],lt=Ve[1],dt=J(n.Mark,Oe),ze=G(dt,2),ft=ze[0],ht=ze[1];return w.createElement(le,Y({"data-baseweb":"slider"},I,te,{onFocus:mt(te,j),onBlur:bt(te,W)}),w.createElement(xe.Range,Y({step:B,min:v,max:m,values:E,disabled:a,onChange:function(V){return f({value:V})},onFinalChange:function(V){return d({value:V})},rtl:A.direction==="rtl",renderTrack:function(V){var ne=V.props,K=V.children,oe=V.isDragged;return w.createElement(he,Y({onMouseDown:ne.onMouseDown,onTouchStart:ne.onTouchStart,$isDragged:oe},I,$e),w.createElement(ge,Y({$isDragged:oe,ref:ne.ref},I,pe),K))},renderThumb:function(V){var ne=V.props,K=V.index,oe=V.isDragged,Ne=D||(!!K&&u||!K&&Z||oe)&&!a;return w.createElement(Je,Y({},ne,{onMouseEnter:function(){K===0?F(!0):l(!0)},onMouseLeave:function(){K===0?F(!1):l(!1)},$thumbIndex:K,$isDragged:oe,style:Lt({},ne.style)},I,et,{$isFocusVisible:g&&_===K}),Ne&&w.createElement(it,Y({$thumbIndex:K,$isDragged:oe},I,ot),$(E[K])),Ne&&w.createElement(rt,Y({$thumbIndex:K,$isDragged:oe},I,nt)))}},s?{renderMark:function(V){var ne=V.props,K=V.index;return w.createElement(ft,Y({$markIndex:K},ne,I,ht))}}:{})),w.createElement(ut,Y({},I,lt),w.createElement(Le,Y({},I,je),$(v)),w.createElement(Le,Y({},I,je),$(m))))}const Kt=be("div",{target:"ef46xkf0"})(({disabled:t,theme:r})=>({alignItems:"center",backgroundColor:t?r.colors.gray:r.colors.primary,borderTopLeftRadius:"100%",borderTopRightRadius:"100%",borderBottomLeftRadius:"100%",borderBottomRightRadius:"100%",borderTopStyle:"none",borderBottomStyle:"none",borderRightStyle:"none",borderLeftStyle:"none",boxShadow:"none",display:"flex",justifyContent:"center",height:r.sizes.sliderThumb,width:r.sizes.sliderThumb,":focus":{outline:"none"},":focus-visible":{boxShadow:`0 0 0 0.2rem ${yt(r.colors.primary,.5)}`}})),Gt=be("div",{target:"ef46xkf1"})(({disabled:t,theme:r})=>({fontFamily:r.genericFonts.codeFont,fontSize:r.fontSizes.sm,color:t?r.colors.gray:r.colors.primary,top:"-1.6em",position:"absolute",whiteSpace:"nowrap",backgroundColor:r.colors.transparent,lineHeight:r.lineHeights.base,fontWeight:r.fontWeights.normal,pointerEvents:"none"})),Yt=be("div",{target:"ef46xkf2"})(({theme:t})=>({fontSize:t.fontSizes.sm,paddingBottom:t.spacing.none,paddingLeft:t.spacing.none,paddingRight:t.spacing.none,paddingTop:"0.65em",justifyContent:"space-between",alignItems:"center",display:"flex"})),Ze=be("div",{target:"ef46xkf3"})(({disabled:t,theme:r})=>({lineHeight:r.lineHeights.base,fontWeight:r.fontWeights.normal,fontFamily:r.genericFonts.codeFont,color:t?r.colors.fadedText40:"inherit"})),qt=200;function Xt({disabled:t,element:r,widgetMgr:n,width:e,fragmentId:a}){var F;const[i,s]=Et({getStateFromWidgetMgr:Zt,getDefaultStateFromProto:Qt,getCurrStateFromProto:Jt,updateWidgetMgrState:er,element:r,widgetMgr:n,fragmentId:a}),[c,f]=w.useState(i),y=w.useRef(null),[d]=w.useState([]),[h]=w.useState([]),{colors:v,fonts:R,fontSizes:m,spacing:S}=Tt(),B={width:e},L=c.map(z=>Ie(z,r)),D=Ie(r.min,r),M=Ie(r.max,r),$=r.label;w.useEffect(()=>{f(i)},[i]);const H=w.useCallback(kt(qt,z=>{s({value:z,fromUi:!0})}),[]),A=w.useCallback(({value:z})=>{f(z),H(z)},[H]),x=w.useCallback(()=>Ue(Yt,{"data-testid":"stSliderTickBar",children:[ae(Ze,{disabled:t,"data-testid":"stSliderTickBarMin",children:D}),ae(Ze,{disabled:t,"data-testid":"stSliderTickBarMax",children:M})]}),[D,M,t]),X=w.useCallback(He.forwardRef(function(o,u){const{$thumbIndex:l}=o,p=l||0;d[p]=u,h[p]||(h[p]=He.createRef());const b=Ot(o,["role","style","aria-valuemax","aria-valuemin","aria-valuenow","tabIndex","onKeyUp","onKeyDown","onMouseEnter","onMouseLeave","draggable"]),g=L[p];return ae(Kt,{...b,disabled:o.$disabled===!0,ref:d[p],"aria-valuetext":g,"aria-label":$,children:ae(Gt,{"data-testid":"stSliderThumbValue",disabled:o.$disabled===!0,ref:h[p],children:g})})}),[]);w.useEffect(()=>{var b,g;h.map((T,k)=>{T.current&&(T.current.innerText=L[k])}),d.map((T,k)=>{T.current&&T.current.setAttribute("aria-valuetext",L[k])});const z=y.current??null,o=d[0].current,u=(b=d[1])==null?void 0:b.current,l=h[0].current,p=(g=h[1])==null?void 0:g.current;nr(z,o,u,l,p)});const Z=w.useCallback(({$disabled:z})=>({height:S.twoXS,...z?{background:v.darkenedBgMix25}:{}}),[v,S]);return Ue("div",{ref:y,className:"stSlider","data-testid":"stSlider",style:B,children:[ae(_t,{label:r.label,disabled:t,labelVisibility:wt((F=r.labelVisibility)==null?void 0:F.value),children:r.help&&ae(Rt,{children:ae(St,{content:r.help,placement:Mt.TOP_RIGHT})})}),ae(Wt,{min:r.min,max:r.max,step:r.step,value:rr(c,r),onChange:A,disabled:t,overrides:{Thumb:X,Tick:{style:{fontFamily:R.monospace}},Track:{style:{backgroundColor:"none !important",paddingBottom:S.none,paddingLeft:S.none,paddingRight:S.none,paddingTop:`calc(${m.sm} * 1.35)`}},InnerTrack:{style:Z},TickBar:x}})]})}function Zt(t,r){return t.getDoubleArrayValue(r)}function Qt(t){return t.default}function Jt(t){return t.value}function er(t,r,n,e){r.setDoubleArrayValue(t,n.value,{fromUi:n.fromUi},e)}function tr(t){const{dataType:r}=t;return r===Ee.DataType.DATETIME||r===Ee.DataType.DATE||r===Ee.DataType.TIME}function Ie(t,r){const{format:n,options:e}=r;return tr(r)?$t.utc(t/1e3).format(n):e.length>0?We.sprintf(n,e[t]):We.sprintf(n,t)}function rr(t,r){const{min:n,max:e}=r;let a=t[0],i=t.length>1?t[1]:t[0];return a>i&&(a=i),a<n&&(a=n),a>e&&(a=e),i<n&&(i=n),i>e&&(i=e),t.length>1?[a,i]:[a]}function nr(t,r,n,e,a){!t||!r||!e||(se(t,r,e),n&&a&&(se(t,n,a),ar(t,r,n,e,a)))}function se(t,r,n){const e=t.getBoundingClientRect(),a=r.getBoundingClientRect(),i=n.getBoundingClientRect(),s=a.left+a.width/2,c=s-i.width/2<e.left,f=s+i.width/2>e.right;n.style.left=c?"0":"",n.style.right=f?"0":""}function ar(t,r,n,e,a){const s=t.getBoundingClientRect(),c=r.getBoundingClientRect(),f=n.getBoundingClientRect(),y=e.getBoundingClientRect(),d=a.getBoundingClientRect(),h=s.left+s.width/2,v=c.left+c.width/2,R=f.left+f.width/2,m=v-y.width/2>=s.left,S=R+d.width/2<=s.right,B=c.left-y.width>=s.left,L=f.right+d.width<=s.right,D=m?y.width/2:y.width,M=S?d.width/2:d.width,$=v+D;if(R-M-$>24){se(t,r,e),se(t,n,a);return}if(B&&L){e.style.left="",e.style.right=`${Math.round(c.width)}px`,a.style.left=`${Math.round(f.width)}px`,a.style.right="";return}v<h?(se(t,r,e),a.style.left=`${Math.round(v+D+24-R)}px`,a.style.right=""):(se(t,n,a),e.style.left="",e.style.right=`${-Math.round(R-M-24-v)}px`)}const ur=w.memo(Xt);export{ur as default};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{R as B,a6 as h,aG as i,j as e,aH as p,aY as w,aF as D,aI as b}from"./index.CLHVvMN0.js";import{c as k}from"./createDownloadLinkElement.DZMwyjvU.js";function R(n,a,t){return k({enforceDownloadInNewTab:t,url:n.buildMediaURL(a),filename:""})}function y(n){const{disabled:a,element:t,widgetMgr:s,width:l,endpoints:d,fragmentId:r}=n,c={width:l},{libConfig:{enforceDownloadInNewTab:u=!1}}=B.useContext(h);let o=i.SECONDARY;t.type==="primary"?o=i.PRIMARY:t.type==="tertiary"&&(o=i.TERTIARY);const f=()=>{s.setTriggerValue(t,{fromUi:!0},r),R(d,t.url,u).click()},m=t.help?l:!0;return e("div",{className:"stDownloadButton","data-testid":"stDownloadButton",style:c,children:e(p,{help:t.help,children:e(w,{kind:o,size:D.SMALL,disabled:a,onClick:f,fluidWidth:t.useContainerWidth?m:!1,children:e(b,{icon:t.icon,label:t.label})})})})}export{y as default};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{n as s,k as r,r as i,j as n}from"./index.CLHVvMN0.js";import{P as m,R as c}from"./RenderInPortalIfExists.CphMKHZ_.js";const p=""+new URL("../media/balloon-0.Czj7AKwE.png",import.meta.url).href,d=""+new URL("../media/balloon-1.CNvFFrND.png",import.meta.url).href,f=""+new URL("../media/balloon-2.DTvC6B1t.png",import.meta.url).href,B=""+new URL("../media/balloon-3.CgSk4tbL.png",import.meta.url).href,L=""+new URL("../media/balloon-4.mbtFrzxf.png",import.meta.url).href,h=""+new URL("../media/balloon-5.CSwkUfRA.png",import.meta.url).href,t=300,a=121,e=20,g=80,u=1e3,x=r("from{transform:translateY(calc(100vh + ",t,"px));}to{transform:translateY(0);}"),_=s("img",{target:"e178qe310"})(({theme:o})=>({position:"fixed",top:`${-t}px`,marginLeft:`${-a/2}px`,zIndex:o.zIndices.balloons,left:`${Math.random()*(g-e)+e}vw`,animationDelay:`${Math.random()*u}ms`,height:`${t}px`,width:`${a}px`,pointerEvents:"none",animationDuration:"750ms",animationName:x,animationTimingFunction:"ease-in",animationDirection:"normal",animationIterationCount:1,opacity:1})),w=30,l=[p,d,f,B,L,h],A=l.length,I=({particleType:o})=>n(_,{src:l[o]}),M=({scriptRunId:o})=>n(c,{children:n(m,{className:"stBalloons","data-testid":"stBalloons",scriptRunId:o,numParticleTypes:A,numParticles:w,ParticleComponent:I})}),S=i.memo(M);export{w as NUM_BALLOONS,S as default};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{r as s,M as U,bY as T,a7 as k,j as l,a_ as A,bb as L,a$ as P,aK as B,b0 as D}from"./index.CLHVvMN0.js";import{u as _}from"./uniqueId.OJw6SDpp.js";import{u as j,a as K,b as $}from"./useOnInputChange.Bw6YkmJD.js";import{I as O}from"./InputInstructions.DpTmOmkP.js";import{a as q}from"./useBasicWidgetState.C2DsWpWi.js";import{T as G}from"./textarea.C5OZk1uL.js";import"./inputUtils.CQWz5UKz.js";import"./FormClearHelper.DSgVZ-NK.js";import"./base-input.gDrmzpbY.js";const W=(a,t)=>a.getStringValue(t)??t.default??null,N=a=>a.default??null,Y=a=>a.value??null,w=(a,t,o,u)=>{t.setStringValue(a,o.value,{fromUi:o.fromUi},u)},J=({disabled:a,element:t,widgetMgr:o,fragmentId:u,width:h})=>{var x;const g=s.useRef(_("text_area_")).current,[r,n]=s.useState(!1),[S,b]=s.useState(!1),[i,d]=s.useState(W(o,t)??null),y=s.useCallback(()=>{d(t.default??null),n(!0)},[t]),[I,c]=q({getStateFromWidgetMgr:W,getDefaultStateFromProto:N,getCurrStateFromProto:Y,updateWidgetMgrState:w,element:t,widgetMgr:o,fragmentId:u,onFormCleared:y});j(I,i,d,r);const e=U(),p=s.useCallback(()=>{n(!1),c({value:i,fromUi:!0})},[i,c]),V=s.useCallback(()=>{r&&p(),b(!1)},[r,p]),C=s.useCallback(()=>{b(!0)},[]),F=K({formId:t.formId,maxChars:t.maxChars,setDirty:n,setUiValue:d,setValueWithSource:c}),v=$(t.formId,p,r,o,u,!0),E={width:h},{height:f,placeholder:z,formId:m}=t,H=T({formId:m})?o.allowFormEnterToSubmit(m):r,R=S&&h>e.breakpoints.hideWidgetDetails;return k("div",{className:"stTextArea","data-testid":"stTextArea",style:E,children:[l(D,{label:t.label,disabled:a,labelVisibility:A((x=t.labelVisibility)==null?void 0:x.value),htmlFor:g,children:t.help&&l(L,{children:l(P,{content:t.help,placement:B.TOP_RIGHT})})}),l(G,{value:i??"",placeholder:z,onBlur:V,onFocus:C,onChange:F,onKeyDown:v,"aria-label":t.label,disabled:a,id:g,overrides:{Input:{style:{lineHeight:e.lineHeights.inputWidget,height:f?`${f}px`:"",minHeight:e.sizes.largestElementHeight,resize:"vertical","::placeholder":{opacity:"0.7"},paddingRight:e.spacing.lg,paddingLeft:e.spacing.lg,paddingBottom:e.spacing.lg,paddingTop:e.spacing.lg}},Root:{props:{"data-testid":"stTextAreaRootElement"},style:{borderLeftWidth:e.sizes.borderWidth,borderRightWidth:e.sizes.borderWidth,borderTopWidth:e.sizes.borderWidth,borderBottomWidth:e.sizes.borderWidth}}}}),R&&l(O,{dirty:r,value:i??"",maxLength:t.maxChars,type:"multiline",inForm:T({formId:m}),allowEnterToSubmit:H})]})},rt=s.memo(J);export{rt as default};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{n as c,aE as v,Q as y,aF as l,aG as t,j as s,aH as C,aI as S}from"./index.CLHVvMN0.js";function k(o,a){switch(o){case l.XSMALL:return{padding:`${a.spacing.twoXS} ${a.spacing.sm}`,fontSize:a.fontSizes.sm};case l.SMALL:return{padding:`${a.spacing.twoXS} ${a.spacing.md}`};case l.LARGE:return{padding:`${a.spacing.md} ${a.spacing.md}`};default:return{padding:`${a.spacing.xs} ${a.spacing.md}`}}}const g=c("a",{target:"eeng2fo0"})(({fluidWidth:o,size:a,theme:r})=>{const i=typeof o=="number"?`${o}px`:"100%";return{display:"inline-flex",alignItems:"center",justifyContent:"center",fontWeight:r.fontWeights.normal,padding:`${r.spacing.xs} ${r.spacing.md}`,borderRadius:r.radii.default,minHeight:r.sizes.minElementHeight,margin:0,lineHeight:r.lineHeights.base,color:r.colors.primary,textDecoration:"none",width:o?i:"auto",userSelect:"none","&:visited":{color:r.colors.primary},"&:focus":{outline:"none"},"&:focus-visible":{boxShadow:`0 0 0 0.2rem ${y(r.colors.primary,.5)}`},"&:hover":{textDecoration:"none"},"&:active":{textDecoration:"none"},...k(a,r)}}),B=c(g,{target:"eeng2fo1"})(({theme:o})=>({backgroundColor:o.colors.primary,color:o.colors.white,border:`${o.sizes.borderWidth} solid ${o.colors.primary}`,"&:hover":{backgroundColor:v(o.colors.primary,.05),color:o.colors.white},"&:active":{backgroundColor:"transparent",color:o.colors.primary},"&:visited:not(:active)":{color:o.colors.white},"&[disabled], &[disabled]:hover, &[disabled]:active, &[disabled]:visited":{borderColor:o.colors.borderColor,backgroundColor:o.colors.transparent,color:o.colors.fadedText40,cursor:"not-allowed"}})),x=c(g,{target:"eeng2fo2"})(({theme:o})=>({backgroundColor:o.colors.lightenedBg05,color:o.colors.bodyText,border:`${o.sizes.borderWidth} solid ${o.colors.borderColor}`,"&:visited":{color:o.colors.bodyText},"&:hover":{borderColor:o.colors.primary,color:o.colors.primary},"&:active":{color:o.colors.white,borderColor:o.colors.primary,backgroundColor:o.colors.primary},"&:focus:not(:active)":{borderColor:o.colors.primary,color:o.colors.primary},"&[disabled], &[disabled]:hover, &[disabled]:active":{borderColor:o.colors.borderColor,backgroundColor:o.colors.transparent,color:o.colors.fadedText40,cursor:"not-allowed"}})),$=c(g,{target:"eeng2fo3"})(({theme:o})=>({padding:o.spacing.none,backgroundColor:o.colors.transparent,color:o.colors.bodyText,border:"none","&:visited":{color:o.colors.bodyText},"&:hover":{color:o.colors.primary},"&:active":{color:o.colors.primary},"&:focus":{outline:"none"},"&:focus-visible":{color:o.colors.primary,boxShadow:`0 0 0 0.2rem ${y(o.colors.primary,.5)}`},"&[disabled], &[disabled]:hover, &[disabled]:active":{backgroundColor:o.colors.transparent,color:o.colors.fadedText40,cursor:"not-allowed"}}));function L({kind:o,size:a,disabled:r,fluidWidth:i,children:d,autoFocus:n,href:e,rel:u,target:p,onClick:f}){let b=B;return o===t.SECONDARY?b=x:o===t.TERTIARY&&(b=$),s(b,{kind:o,size:a||l.MEDIUM,fluidWidth:i||!1,disabled:r||!1,autoFocus:n||!1,href:e,target:p,rel:u,onClick:f,tabIndex:r?-1:0,"data-testid":`stBaseLinkButton-${o}`,children:d})}function T(o){const{disabled:a,element:r,width:i}=o,d={width:i};let n=t.SECONDARY;r.type==="primary"?n=t.PRIMARY:r.type==="tertiary"&&(n=t.TERTIARY);const e=r.help?i:!0,u=p=>{o.disabled&&p.preventDefault()};return s("div",{className:"stLinkButton","data-testid":"stLinkButton",style:d,children:s(C,{help:r.help,children:s(L,{kind:n,size:l.SMALL,disabled:a,onClick:u,fluidWidth:r.useContainerWidth?e:!1,href:r.url,target:"_blank",rel:"noreferrer","aria-disabled":a,children:s(S,{icon:r.icon,label:r.label})})})})}export{T as default};
|
@@ -1,9 +0,0 @@
|
|
1
|
-
import{R as X,r as T}from"./index.CLHVvMN0.js";import{s as Te}from"./index.Dc0EFNHf.js";import"./FormClearHelper.DSgVZ-NK.js";import"./withFullScreenWrapper.BjS0eA06.js";import"./Toolbar.YZjXpW2P.js";import"./sprintf.C-r3gIuM.js";import"./createDownloadLinkElement.DZMwyjvU.js";import"./slicedToArray.DVgs1NsC.js";import"./getPrototypeOf.BZAK2f3t.js";import"./createSuper.Cj3WfXha.js";import"./FileDownload.esm.WslOojMp.js";const Be=Te("div")({name:"NumberOverlayEditorStyle",class:"gdg-n15fjm3e",propsAsIs:!1});function Se(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r}var re;(function(e){e.event="event",e.props="prop"})(re||(re={}));function q(){}function Fe(e){var t,r=void 0;return function(){for(var n=[],a=arguments.length;a--;)n[a]=arguments[a];return t&&n.length===t.length&&n.every(function(i,l){return i===t[l]})||(t=n,r=e.apply(void 0,n)),r}}function ae(e){return!!(e||"").match(/\d/)}function Y(e){return e==null}function _e(e){return typeof e=="number"&&isNaN(e)}function pe(e){return Y(e)||_e(e)||typeof e=="number"&&!isFinite(e)}function xe(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function je(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}function Le(e,t,r){var n=je(r),a=e.search(/[1-9]/);return a=a===-1?e.length:a,e.substring(0,a)+e.substring(a,e.length).replace(n,"$1"+t)}function Me(e){var t=T.useRef(e);t.current=e;var r=T.useRef(function(){for(var n=[],a=arguments.length;a--;)n[a]=arguments[a];return t.current.apply(t,n)});return r.current}function se(e,t){t===void 0&&(t=!0);var r=e[0]==="-",n=r&&t;e=e.replace("-","");var a=e.split("."),i=a[0],l=a[1]||"";return{beforeDecimal:i,afterDecimal:l,hasNegation:r,addNegation:n}}function ke(e){if(!e)return e;var t=e[0]==="-";t&&(e=e.substring(1,e.length));var r=e.split("."),n=r[0].replace(/^0+/,"")||"0",a=r[1]||"";return(t?"-":"")+n+(a?"."+a:"")}function ye(e,t,r){for(var n="",a=r?"0":"",i=0;i<=t-1;i++)n+=e[i]||a;return n}function de(e,t){return Array(t+1).join(e)}function be(e){var t=e+"",r=t[0]==="-"?"-":"";r&&(t=t.substring(1));var n=t.split(/[eE]/g),a=n[0],i=n[1];if(i=Number(i),!i)return r+a;a=a.replace(".","");var l=1+i,h=a.length;return l<0?a="0."+de("0",Math.abs(l))+a:l>=h?a=a+de("0",l-h):a=(a.substring(0,l)||"0")+"."+a.substring(l),r+a}function ge(e,t,r){if(["","-"].indexOf(e)!==-1)return e;var n=(e.indexOf(".")!==-1||r)&&t,a=se(e),i=a.beforeDecimal,l=a.afterDecimal,h=a.hasNegation,p=parseFloat("0."+(l||"0")),x=l.length<=t?"0."+l:p.toFixed(t),S=x.split("."),c=i;i&&Number(S[0])&&(c=i.split("").reverse().reduce(function(I,C,g){return I.length>g?(Number(I[0])+Number(C)).toString()+I.substring(1,I.length):C+I},S[0]));var m=ye(S[1]||"",t,r),y=h?"-":"",s=n?".":"";return""+y+c+s+m}function H(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var r=e.createTextRange();return r.move("character",t),r.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var Ve=Fe(function(e,t){for(var r=0,n=0,a=e.length,i=t.length;e[r]===t[r]&&r<a;)r++;for(;e[a-1-n]===t[i-1-n]&&i-n>r&&a-n>r;)n++;return{from:{start:r,end:a-n},to:{start:r,end:i-n}}}),Pe=function(e,t){var r=Math.min(e.selectionStart,t);return{from:{start:r,end:e.selectionEnd},to:{start:r,end:t}}};function Ke(e,t,r){return Math.min(Math.max(e,t),r)}function ce(e){return Math.max(e.selectionStart,e.selectionEnd)}function We(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function Ue(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function $e(e){var t=e.currentValue,r=e.formattedValue,n=e.currentValueIndex,a=e.formattedValueIndex;return t[n]===r[a]}function Ge(e,t,r,n,a,i,l){l===void 0&&(l=$e);var h=a.findIndex(function(k){return k}),p=e.slice(0,h);!t&&!r.startsWith(p)&&(t=p,r=p+r,n=n+p.length);for(var x=r.length,S=e.length,c={},m=new Array(x),y=0;y<x;y++){m[y]=-1;for(var s=0,I=S;s<I;s++){var C=l({currentValue:r,lastValue:t,formattedValue:e,currentValueIndex:y,formattedValueIndex:s});if(C&&c[s]!==!0){m[y]=s,c[s]=!0;break}}}for(var g=n;g<x&&(m[g]===-1||!i(r[g]));)g++;var B=g===x||m[g]===-1?S:m[g];for(g=n-1;g>0&&m[g]===-1;)g--;var F=g===-1||m[g]===-1?0:m[g]+1;return F>B?B:n-F<B-n?F:B}function me(e,t,r,n){var a=e.length;if(t=Ke(t,0,a),n==="left"){for(;t>=0&&!r[t];)t--;t===-1&&(t=r.indexOf(!0))}else{for(;t<=a&&!r[t];)t++;t>a&&(t=r.lastIndexOf(!0))}return t===-1&&(t=a),t}function Ze(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),r=0,n=t.length;r<n;r++)t[r]=!!(ae(e[r])||ae(e[r-1]));return t}function Ne(e,t,r,n,a,i){i===void 0&&(i=q);var l=Me(function(s,I){var C,g;return pe(s)?(g="",C=""):typeof s=="number"||I?(g=typeof s=="number"?be(s):s,C=n(g)):(g=a(s,void 0),C=n(g)),{formattedValue:C,numAsString:g}}),h=T.useState(function(){return l(Y(e)?t:e,r)}),p=h[0],x=h[1],S=function(s,I){s.formattedValue!==p.formattedValue&&x({formattedValue:s.formattedValue,numAsString:s.value}),i(s,I)},c=e,m=r;Y(e)&&(c=p.numAsString,m=!0);var y=l(c,m);return T.useMemo(function(){x(y)},[y.formattedValue]),[p,S]}function qe(e){return e.replace(/[^0-9]/g,"")}function ze(e){return e}function He(e){var t=e.type;t===void 0&&(t="text");var r=e.displayType;r===void 0&&(r="input");var n=e.customInput,a=e.renderText,i=e.getInputRef,l=e.format;l===void 0&&(l=ze);var h=e.removeFormatting;h===void 0&&(h=qe);var p=e.defaultValue,x=e.valueIsNumericString,S=e.onValueChange,c=e.isAllowed,m=e.onChange;m===void 0&&(m=q);var y=e.onKeyDown;y===void 0&&(y=q);var s=e.onMouseUp;s===void 0&&(s=q);var I=e.onFocus;I===void 0&&(I=q);var C=e.onBlur;C===void 0&&(C=q);var g=e.value,B=e.getCaretBoundary;B===void 0&&(B=Ze);var F=e.isValidInputCharacter;F===void 0&&(F=ae);var k=e.isCharacterSame,j=Se(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),z=Ne(g,p,!!x,l,h,S),P=z[0],V=P.formattedValue,L=P.numAsString,W=z[1],M=T.useRef(),U=T.useRef({formattedValue:V,numAsString:L}),$=function(o,u){U.current={formattedValue:o.formattedValue,numAsString:o.value},W(o,u)},J=T.useState(!1),ee=J[0],d=J[1],f=T.useRef(null),N=T.useRef({setCaretTimeout:null,focusTimeout:null});T.useEffect(function(){return d(!0),function(){clearTimeout(N.current.setCaretTimeout),clearTimeout(N.current.focusTimeout)}},[]);var R=l,A=function(o,u){var v=parseFloat(u);return{formattedValue:o,value:u,floatValue:isNaN(v)?void 0:v}},E=function(o,u,v){o.selectionStart===0&&o.selectionEnd===o.value.length||(H(o,u),N.current.setCaretTimeout=setTimeout(function(){o.value===v&&o.selectionStart!==u&&H(o,u)},0))},O=function(o,u,v){return me(o,u,B(o),v)},Q=function(o,u,v){var w=B(u),_=Ge(u,V,o,v,w,F,k);return _=me(u,_,w),_},oe=function(o){var u=o.formattedValue;u===void 0&&(u="");var v=o.input,w=o.source,_=o.event,D=o.numAsString,b;if(v){var K=o.inputValue||v.value,G=ce(v);v.value=u,b=Q(K,u,G),b!==void 0&&E(v,b,u)}u!==V&&$(A(u,D),{event:_,source:w})};T.useEffect(function(){var o=U.current,u=o.formattedValue,v=o.numAsString;(V!==u||L!==v)&&$(A(V,L),{event:void 0,source:re.props})},[V,L]);var te=f.current?ce(f.current):void 0,ne=typeof window<"u"?T.useLayoutEffect:T.useEffect;ne(function(){var o=f.current;if(V!==U.current.formattedValue&&o){var u=Q(U.current.formattedValue,V,te);o.value=V,E(o,u,V)}},[V]);var ue=function(o,u,v){var w=u.target,_=M.current?Pe(M.current,w.selectionEnd):Ve(V,o),D=Object.assign(Object.assign({},_),{lastValue:V}),b=h(o,D),K=R(b);if(b=h(K,void 0),c&&!c(A(K,b))){var G=u.target,Z=ce(G),fe=Q(o,V,Z);return G.value=V,E(G,fe,V),!1}return oe({formattedValue:K,numAsString:b,inputValue:o,event:u,source:v,input:u.target}),!0},le=function(o,u){u===void 0&&(u=0);var v=o.selectionStart,w=o.selectionEnd;M.current={selectionStart:v,selectionEnd:w+u}},De=function(o){var u=o.target,v=u.value,w=ue(v,o,re.event);w&&m(o),M.current=void 0},Ie=function(o){var u=o.target,v=o.key,w=u.selectionStart,_=u.selectionEnd,D=u.value;D===void 0&&(D="");var b;v==="ArrowLeft"||v==="Backspace"?b=Math.max(w-1,0):v==="ArrowRight"?b=Math.min(w+1,D.length):v==="Delete"&&(b=w);var K=0;v==="Delete"&&w===_&&(K=1);var G=v==="ArrowLeft"||v==="ArrowRight";if(b===void 0||w!==_&&!G){y(o),le(u,K);return}var Z=b;if(G){var fe=v==="ArrowLeft"?"left":"right";Z=O(D,b,fe),Z!==b&&o.preventDefault()}else v==="Delete"&&!F(D[b])?Z=O(D,b,"right"):v==="Backspace"&&!F(D[b])&&(Z=O(D,b,"left"));Z!==b&&E(u,Z,D),y(o),le(u,K)},Ce=function(o){var u=o.target,v=function(){var w=u.selectionStart,_=u.selectionEnd,D=u.value;if(D===void 0&&(D=""),w===_){var b=O(D,w);b!==w&&E(u,b,D)}};v(),requestAnimationFrame(function(){v()}),s(o),le(u)},Ee=function(o){o.persist&&o.persist();var u=o.target,v=o.currentTarget;f.current=u,N.current.focusTimeout=setTimeout(function(){var w=u.selectionStart,_=u.selectionEnd,D=u.value;D===void 0&&(D="");var b=O(D,w);b!==w&&!(w===0&&_===D.length)&&E(u,b,D),I(Object.assign(Object.assign({},o),{currentTarget:v}))},0)},Re=function(o){f.current=null,clearTimeout(N.current.focusTimeout),clearTimeout(N.current.setCaretTimeout),C(o)},Ae=ee&&We()?"numeric":void 0,ve=Object.assign({inputMode:Ae},j,{type:t,value:V,onChange:De,onKeyDown:Ie,onMouseUp:Ce,onFocus:Ee,onBlur:Re});if(r==="text")return a?X.createElement(X.Fragment,null,a(V,j)||null):X.createElement("span",Object.assign({},j,{ref:i}),V);if(n){var Oe=n;return X.createElement(Oe,Object.assign({},ve,{ref:i}))}return X.createElement("input",Object.assign({},ve,{ref:i}))}function he(e,t){var r=t.decimalScale,n=t.fixedDecimalScale,a=t.prefix;a===void 0&&(a="");var i=t.suffix;i===void 0&&(i="");var l=t.allowNegative,h=t.thousandsGroupStyle;if(h===void 0&&(h="thousand"),e===""||e==="-")return e;var p=ie(t),x=p.thousandSeparator,S=p.decimalSeparator,c=r!==0&&e.indexOf(".")!==-1||r&&n,m=se(e,l),y=m.beforeDecimal,s=m.afterDecimal,I=m.addNegation;return r!==void 0&&(s=ye(s,r,!!n)),x&&(y=Le(y,x,h)),a&&(y=a+y),i&&(s=s+i),I&&(y="-"+y),e=y+(c&&S||"")+s,e}function ie(e){var t=e.decimalSeparator;t===void 0&&(t=".");var r=e.thousandSeparator,n=e.allowedDecimalSeparators;return r===!0&&(r=","),n||(n=[t,"."]),{decimalSeparator:t,thousandSeparator:r,allowedDecimalSeparators:n}}function Je(e,t){e===void 0&&(e="");var r=new RegExp("(-)"),n=new RegExp("(-)(.)*(-)"),a=r.test(e),i=n.test(e);return e=e.replace(/-/g,""),a&&!i&&t&&(e="-"+e),e}function Qe(e,t){return new RegExp("(^-)|[0-9]|"+xe(e),"g")}function Xe(e,t,r){return e===""?!0:!(t!=null&&t.match(/\d/))&&!(r!=null&&r.match(/\d/))&&typeof e=="string"&&!isNaN(Number(e))}function Ye(e,t,r){var n;t===void 0&&(t=Ue(e));var a=r.allowNegative,i=r.prefix;i===void 0&&(i="");var l=r.suffix;l===void 0&&(l="");var h=r.decimalScale,p=t.from,x=t.to,S=x.start,c=x.end,m=ie(r),y=m.allowedDecimalSeparators,s=m.decimalSeparator,I=e[c]===s;if(ae(e)&&(e===i||e===l)&&t.lastValue==="")return e;if(c-S===1&&y.indexOf(e[S])!==-1){var C=h===0?"":s;e=e.substring(0,S)+C+e.substring(S+1,e.length)}var g=function(f,N,R){var A=!1,E=!1;i.startsWith("-")?A=!1:f.startsWith("--")?(A=!1,E=!0):l.startsWith("-")&&f.length===l.length?A=!1:f[0]==="-"&&(A=!0);var O=A?1:0;return E&&(O=2),O&&(f=f.substring(O),N-=O,R-=O),{value:f,start:N,end:R,hasNegation:A}},B=g(e,S,c),F=B.hasNegation;n=B,e=n.value,S=n.start,c=n.end;var k=g(t.lastValue,p.start,p.end),j=k.start,z=k.end,P=k.value,V=e.substring(S,c);e.length&&P.length&&(j>P.length-l.length||z<i.length)&&!(V&&l.startsWith(V))&&(e=P);var L=0;e.startsWith(i)?L+=i.length:S<i.length&&(L=S),e=e.substring(L),c-=L;var W=e.length,M=e.length-l.length;e.endsWith(l)?W=M:(c>M||c>e.length-l.length)&&(W=c),e=e.substring(0,W),e=Je(F?"-"+e:e,a),e=(e.match(Qe(s))||[]).join("");var U=e.indexOf(s);e=e.replace(new RegExp(xe(s),"g"),function(f,N){return N===U?".":""});var $=se(e,a),J=$.beforeDecimal,ee=$.afterDecimal,d=$.addNegation;return x.end-x.start<p.end-p.start&&J===""&&I&&!parseFloat(ee)&&(e=d?"-":""),e}function et(e,t){var r=t.prefix;r===void 0&&(r="");var n=t.suffix;n===void 0&&(n="");var a=Array.from({length:e.length+1}).map(function(){return!0}),i=e[0]==="-";a.fill(!1,0,r.length+(i?1:0));var l=e.length;return a.fill(!1,l-n.length+1,l+1),a}function tt(e){var t=ie(e),r=t.thousandSeparator,n=t.decimalSeparator,a=e.prefix;a===void 0&&(a="");var i=e.allowNegative;if(i===void 0&&(i=!0),r===n)throw new Error(`
|
2
|
-
Decimal separator can't be same as thousand separator.
|
3
|
-
thousandSeparator: `+r+` (thousandSeparator = {true} is same as thousandSeparator = ",")
|
4
|
-
decimalSeparator: `+n+` (default value for decimalSeparator is .)
|
5
|
-
`);return a.startsWith("-")&&i&&(console.error(`
|
6
|
-
Prefix can't start with '-' when allowNegative is true.
|
7
|
-
prefix: `+a+`
|
8
|
-
allowNegative: `+i+`
|
9
|
-
`),i=!1),Object.assign(Object.assign({},e),{allowNegative:i})}function rt(e){e=tt(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var t=e.suffix,r=e.allowNegative,n=e.allowLeadingZeros,a=e.onKeyDown;a===void 0&&(a=q);var i=e.onBlur;i===void 0&&(i=q);var l=e.thousandSeparator,h=e.decimalScale,p=e.fixedDecimalScale,x=e.prefix;x===void 0&&(x="");var S=e.defaultValue,c=e.value,m=e.valueIsNumericString,y=e.onValueChange,s=Se(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),I=ie(e),C=I.decimalSeparator,g=I.allowedDecimalSeparators,B=function(d){return he(d,e)},F=function(d,f){return Ye(d,f,e)},k=Y(c)?S:c,j=m??Xe(k,x,t);Y(c)?Y(S)||(j=j||typeof S=="number"):j=j||typeof c=="number";var z=function(d){return pe(d)?d:(typeof d=="number"&&(d=be(d)),j&&typeof h=="number"?ge(d,h,!!p):d)},P=Ne(z(c),z(S),!!j,B,F,y),V=P[0],L=V.numAsString,W=V.formattedValue,M=P[1],U=function(d){var f=d.target,N=d.key,R=f.selectionStart,A=f.selectionEnd,E=f.value;if(E===void 0&&(E=""),(N==="Backspace"||N==="Delete")&&A<x.length){d.preventDefault();return}if(R!==A){a(d);return}N==="Backspace"&&E[0]==="-"&&R===x.length+1&&r&&H(f,1),h&&p&&(N==="Backspace"&&E[R-1]===C?(H(f,R-1),d.preventDefault()):N==="Delete"&&E[R]===C&&d.preventDefault()),g!=null&&g.includes(N)&&E[R]===C&&H(f,R+1);var O=l===!0?",":l;N==="Backspace"&&E[R-1]===O&&H(f,R-1),N==="Delete"&&E[R]===O&&H(f,R+1),a(d)},$=function(d){var f=L;if(f.match(/\d/g)||(f=""),n||(f=ke(f)),p&&h&&(f=ge(f,h,p)),f!==L){var N=he(f,e);M({formattedValue:N,value:f,floatValue:parseFloat(f)},{event:d,source:re.event})}i(d)},J=function(d){return d===C?!0:ae(d)},ee=function(d){var f=d.currentValue,N=d.lastValue,R=d.formattedValue,A=d.currentValueIndex,E=d.formattedValueIndex,O=f[A],Q=R[E],oe=Ve(N,f),te=oe.to,ne=function(ue){return F(ue).indexOf(".")+x.length};return c===0&&p&&h&&f[te.start]===C&&ne(f)<A&&ne(R)>E?!1:A>=te.start&&A<te.end&&g&&g.includes(O)&&Q===C?!0:O===Q};return Object.assign(Object.assign({},s),{value:W,valueIsNumericString:!1,isValidInputCharacter:J,isCharacterSame:ee,onValueChange:M,format:B,removeFormatting:F,getCaretBoundary:function(d){return et(d,e)},onKeyDown:U,onBlur:$})}function at(e){var t=rt(e);return X.createElement(He,Object.assign({},t))}function we(){var r,n,a;return((a=(n=(r=Intl.NumberFormat())==null?void 0:r.formatToParts(1.1))==null?void 0:n.find(i=>i.type==="decimal"))==null?void 0:a.value)??"."}function nt(){return we()==="."?",":"."}const ht=e=>{const{value:t,onChange:r,disabled:n,highlight:a,validatedSelection:i,fixedDecimals:l,allowNegative:h,thousandSeparator:p,decimalSeparator:x}=e,S=T.useRef();return T.useLayoutEffect(()=>{var c;if(i!==void 0){const m=typeof i=="number"?[i,null]:i;(c=S.current)==null||c.setSelectionRange(m[0],m[1])}},[i]),T.createElement(Be,null,T.createElement(at,{autoFocus:!0,getInputRef:S,className:"gdg-input",onFocus:c=>c.target.setSelectionRange(a?0:c.target.value.length,c.target.value.length),disabled:n===!0,decimalScale:l,allowNegative:h,thousandSeparator:p??nt(),decimalSeparator:x??we(),value:Object.is(t,-0)?"-":t??"",onValueChange:r}))};export{ht as default};
|
@@ -1,2 +0,0 @@
|
|
1
|
-
import{r as a,E as y,_ as d,aA as m}from"./index.CLHVvMN0.js";var p=a.forwardRef(function(e,t){var r={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return a.createElement(y,d({iconAttrs:r,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),a.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),a.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"}))});p.displayName="Close";function b(e){if(Array.isArray(e))return e}function h(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,s,c,o,l=[],n=!0,u=!1;try{if(c=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;n=!1}else for(;!(n=(i=c.call(r)).done)&&(l.push(i.value),l.length!==t);n=!0);}catch(f){u=!0,s=f}finally{try{if(!n&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw s}}return l}}function v(){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 A(e,t){return b(e)||h(e,t)||m(e,t)||v()}export{p as C,A as _};
|
@@ -1 +0,0 @@
|
|
1
|
-
function q(e,r,n){e.prototype=r.prototype=n,n.constructor=e}function G(e,r){var n=Object.create(e.prototype);for(var t in r)n[t]=r[t];return n}function m(){}var b=.7,$=1/b,g="\\s*([+-]?\\d+)\\s*",p="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",c="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Q=/^#([0-9a-f]{3,8})$/,T=new RegExp(`^rgb\\(${g},${g},${g}\\)$`),U=new RegExp(`^rgb\\(${c},${c},${c}\\)$`),V=new RegExp(`^rgba\\(${g},${g},${g},${p}\\)$`),W=new RegExp(`^rgba\\(${c},${c},${c},${p}\\)$`),X=new RegExp(`^hsl\\(${p},${c},${c}\\)$`),Y=new RegExp(`^hsla\\(${p},${c},${c},${p}\\)$`),_={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};q(m,E,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:P,formatHex:P,formatHex8:Z,formatHsl:ee,formatRgb:j,toString:j});function P(){return this.rgb().formatHex()}function Z(){return this.rgb().formatHex8()}function ee(){return L(this).formatHsl()}function j(){return this.rgb().formatRgb()}function E(e){var r,n;return e=(e+"").trim().toLowerCase(),(r=Q.exec(e))?(n=r[1].length,r=parseInt(r[1],16),n===6?S(r):n===3?new o(r>>8&15|r>>4&240,r>>4&15|r&240,(r&15)<<4|r&15,1):n===8?w(r>>24&255,r>>16&255,r>>8&255,(r&255)/255):n===4?w(r>>12&15|r>>8&240,r>>8&15|r>>4&240,r>>4&15|r&240,((r&15)<<4|r&15)/255):null):(r=T.exec(e))?new o(r[1],r[2],r[3],1):(r=U.exec(e))?new o(r[1]*255/100,r[2]*255/100,r[3]*255/100,1):(r=V.exec(e))?w(r[1],r[2],r[3],r[4]):(r=W.exec(e))?w(r[1]*255/100,r[2]*255/100,r[3]*255/100,r[4]):(r=X.exec(e))?O(r[1],r[2]/100,r[3]/100,1):(r=Y.exec(e))?O(r[1],r[2]/100,r[3]/100,r[4]):_.hasOwnProperty(e)?S(_[e]):e==="transparent"?new o(NaN,NaN,NaN,0):null}function S(e){return new o(e>>16&255,e>>8&255,e&255,1)}function w(e,r,n,t){return t<=0&&(e=r=n=NaN),new o(e,r,n,t)}function re(e){return e instanceof m||(e=E(e)),e?(e=e.rgb(),new o(e.r,e.g,e.b,e.opacity)):new o}function N(e,r,n,t){return arguments.length===1?re(e):new o(e,r,n,t??1)}function o(e,r,n,t){this.r=+e,this.g=+r,this.b=+n,this.opacity=+t}q(o,N,G(m,{brighter(e){return e=e==null?$:Math.pow($,e),new o(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?b:Math.pow(b,e),new o(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new o(d(this.r),d(this.g),d(this.b),v(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:A,formatHex:A,formatHex8:ne,formatRgb:B,toString:B}));function A(){return`#${h(this.r)}${h(this.g)}${h(this.b)}`}function ne(){return`#${h(this.r)}${h(this.g)}${h(this.b)}${h((isNaN(this.opacity)?1:this.opacity)*255)}`}function B(){const e=v(this.opacity);return`${e===1?"rgb(":"rgba("}${d(this.r)}, ${d(this.g)}, ${d(this.b)}${e===1?")":`, ${e})`}`}function v(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function d(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function h(e){return e=d(e),(e<16?"0":"")+e.toString(16)}function O(e,r,n,t){return t<=0?e=r=n=NaN:n<=0||n>=1?e=r=NaN:r<=0&&(e=NaN),new l(e,r,n,t)}function L(e){if(e instanceof l)return new l(e.h,e.s,e.l,e.opacity);if(e instanceof m||(e=E(e)),!e)return new l;if(e instanceof l)return e;e=e.rgb();var r=e.r/255,n=e.g/255,t=e.b/255,f=Math.min(r,n,t),i=Math.max(r,n,t),a=NaN,s=i-f,x=(i+f)/2;return s?(r===i?a=(n-t)/s+(n<t)*6:n===i?a=(t-r)/s+2:a=(r-n)/s+4,s/=x<.5?i+f:2-i-f,a*=60):s=x>0&&x<1?0:a,new l(a,s,x,e.opacity)}function te(e,r,n,t){return arguments.length===1?L(e):new l(e,r,n,t??1)}function l(e,r,n,t){this.h=+e,this.s=+r,this.l=+n,this.opacity=+t}q(l,te,G(m,{brighter(e){return e=e==null?$:Math.pow($,e),new l(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?b:Math.pow(b,e),new l(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,r=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,t=n+(n<.5?n:1-n)*r,f=2*n-t;return new o(M(e>=240?e-240:e+120,f,t),M(e,f,t),M(e<120?e+240:e-120,f,t),this.opacity)},clamp(){return new l(z(this.h),y(this.s),y(this.l),v(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=v(this.opacity);return`${e===1?"hsl(":"hsla("}${z(this.h)}, ${y(this.s)*100}%, ${y(this.l)*100}%${e===1?")":`, ${e})`}`}}));function z(e){return e=(e||0)%360,e<0?e+360:e}function y(e){return Math.max(0,Math.min(1,e||0))}function M(e,r,n){return(e<60?r+(n-r)*e/60:e<180?n:e<240?r+(n-r)*(240-e)/60:r)*255}function D(e,r,n,t,f){var i=e*e,a=i*e;return((1-3*e+3*i-a)*r+(4-6*i+3*a)*n+(1+3*e+3*i-3*a)*t+a*f)/6}function fe(e){var r=e.length-1;return function(n){var t=n<=0?n=0:n>=1?(n=1,r-1):Math.floor(n*r),f=e[t],i=e[t+1],a=t>0?e[t-1]:2*f-i,s=t<r-1?e[t+2]:2*i-f;return D((n-t/r)*r,a,f,i,s)}}function ie(e){var r=e.length;return function(n){var t=Math.floor(((n%=1)<0?++n:n)*r),f=e[(t+r-1)%r],i=e[t%r],a=e[(t+1)%r],s=e[(t+2)%r];return D((n-t/r)*r,f,i,a,s)}}const C=e=>()=>e;function F(e,r){return function(n){return e+n*r}}function ae(e,r,n){return e=Math.pow(e,n),r=Math.pow(r,n)-e,n=1/n,function(t){return Math.pow(e+t*r,n)}}function ce(e,r){var n=r-e;return n?F(e,n>180||n<-180?n-360*Math.round(n/360):n):C(isNaN(e)?r:e)}function se(e){return(e=+e)==1?J:function(r,n){return n-r?ae(r,n,e):C(isNaN(r)?n:r)}}function J(e,r){var n=r-e;return n?F(e,n):C(isNaN(e)?r:e)}const ue=function e(r){var n=se(r);function t(f,i){var a=n((f=N(f)).r,(i=N(i)).r),s=n(f.g,i.g),x=n(f.b,i.b),k=J(f.opacity,i.opacity);return function(u){return f.r=a(u),f.g=s(u),f.b=x(u),f.opacity=k(u),f+""}}return t.gamma=e,t}(1);function K(e){return function(r){var n=r.length,t=new Array(n),f=new Array(n),i=new Array(n),a,s;for(a=0;a<n;++a)s=N(r[a]),t[a]=s.r||0,f[a]=s.g||0,i[a]=s.b||0;return t=e(t),f=e(f),i=e(i),s.opacity=1,function(x){return s.r=t(x),s.g=f(x),s.b=i(x),s+""}}}var he=K(fe),de=K(ie);function xe(e,r){return e=+e,r=+r,function(n){return e*(1-n)+r*n}}var H=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,R=new RegExp(H.source,"g");function oe(e){return function(){return e}}function le(e){return function(r){return e(r)+""}}function ge(e,r){var n=H.lastIndex=R.lastIndex=0,t,f,i,a=-1,s=[],x=[];for(e=e+"",r=r+"";(t=H.exec(e))&&(f=R.exec(r));)(i=f.index)>n&&(i=r.slice(n,i),s[a]?s[a]+=i:s[++a]=i),(t=t[0])===(f=f[0])?s[a]?s[a]+=f:s[++a]=f:(s[++a]=null,x.push({i:a,x:xe(t,f)})),n=R.lastIndex;return n<r.length&&(i=r.slice(n),s[a]?s[a]+=i:s[++a]=i),s.length<2?x[0]?le(x[0].x):oe(r):(r=x.length,function(k){for(var u=0,I;u<r;++u)s[(I=x[u]).i]=I.x(k);return s.join("")})}export{m as C,o as R,b as a,$ as b,te as c,q as d,G as e,fe as f,ie as g,ce as h,xe as i,ue as j,he as k,de as l,ge as m,J as n,N as o,C as p,E as q,re as r};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{p as mn,i as I,q as U,j as Y,m as dn}from"./string.Bl9OLDCw.js";function F(n,t){return n==null||t==null?NaN:n<t?-1:n>t?1:n>=t?0:NaN}function gn(n,t){return n==null||t==null?NaN:t<n?-1:t>n?1:t>=n?0:NaN}function _(n){let t,e,r;n.length!==2?(t=F,e=(f,c)=>F(n(f),c),r=(f,c)=>n(f)-c):(t=n===F||n===gn?n:yn,e=n,r=n);function i(f,c,a=0,m=f.length){if(a<m){if(t(c,c)!==0)return m;do{const s=a+m>>>1;e(f[s],c)<0?a=s+1:m=s}while(a<m)}return a}function o(f,c,a=0,m=f.length){if(a<m){if(t(c,c)!==0)return m;do{const s=a+m>>>1;e(f[s],c)<=0?a=s+1:m=s}while(a<m)}return a}function u(f,c,a=0,m=f.length){const s=i(f,c,a,m-1);return s>a&&r(f[s-1],c)>-r(f[s],c)?s-1:s}return{left:i,center:u,right:o}}function yn(){return 0}function Mn(n){return n===null?NaN:+n}function*Kn(n,t){if(t===void 0)for(let e of n)e!=null&&(e=+e)>=e&&(yield e);else{let e=-1;for(let r of n)(r=t(r,++e,n))!=null&&(r=+r)>=r&&(yield r)}}const nn=_(F),tn=nn.right,Qn=nn.left;_(Mn).center;const pn=Math.sqrt(50),wn=Math.sqrt(10),kn=Math.sqrt(2);function $(n,t,e){const r=(t-n)/Math.max(0,e),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),u=o>=pn?10:o>=wn?5:o>=kn?2:1;let f,c,a;return i<0?(a=Math.pow(10,-i)/u,f=Math.round(n*a),c=Math.round(t*a),f/a<n&&++f,c/a>t&&--c,a=-a):(a=Math.pow(10,i)*u,f=Math.round(n/a),c=Math.round(t/a),f*a<n&&++f,c*a>t&&--c),c<f&&.5<=e&&e<2?$(n,t,e*2):[f,c,a]}function Nn(n,t,e){if(t=+t,n=+n,e=+e,!(e>0))return[];if(n===t)return[n];const r=t<n,[i,o,u]=r?$(t,n,e):$(n,t,e);if(!(o>=i))return[];const f=o-i+1,c=new Array(f);if(r)if(u<0)for(let a=0;a<f;++a)c[a]=(o-a)/-u;else for(let a=0;a<f;++a)c[a]=(o-a)*u;else if(u<0)for(let a=0;a<f;++a)c[a]=(i+a)/-u;else for(let a=0;a<f;++a)c[a]=(i+a)*u;return c}function L(n,t,e){return t=+t,n=+n,e=+e,$(n,t,e)[2]}function An(n,t,e){t=+t,n=+n,e=+e;const r=t<n,i=r?L(t,n,e):L(n,t,e);return(r?-1:1)*(i<0?1/-i:i)}function xn(n){return Math.abs(n=Math.round(n))>=1e21?n.toLocaleString("en").replace(/,/g,""):n.toString(10)}function R(n,t){if((e=(n=t?n.toExponential(t-1):n.toExponential()).indexOf("e"))<0)return null;var e,r=n.slice(0,e);return[r.length>1?r[0]+r.slice(2):r,+n.slice(e+1)]}function v(n){return n=R(Math.abs(n)),n?n[1]:NaN}function vn(n,t){return function(e,r){for(var i=e.length,o=[],u=0,f=n[0],c=0;i>0&&f>0&&(c+f+1>r&&(f=Math.max(1,r-c)),o.push(e.substring(i-=f,i+f)),!((c+=f+1)>r));)f=n[u=(u+1)%n.length];return o.reverse().join(t)}}function bn(n){return function(t){return t.replace(/[0-9]/g,function(e){return n[+e]})}}var Sn=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function D(n){if(!(t=Sn.exec(n)))throw new Error("invalid format: "+n);var t;return new C({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}D.prototype=C.prototype;function C(n){this.fill=n.fill===void 0?" ":n.fill+"",this.align=n.align===void 0?">":n.align+"",this.sign=n.sign===void 0?"-":n.sign+"",this.symbol=n.symbol===void 0?"":n.symbol+"",this.zero=!!n.zero,this.width=n.width===void 0?void 0:+n.width,this.comma=!!n.comma,this.precision=n.precision===void 0?void 0:+n.precision,this.trim=!!n.trim,this.type=n.type===void 0?"":n.type+""}C.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function jn(n){n:for(var t=n.length,e=1,r=-1,i;e<t;++e)switch(n[e]){case".":r=i=e;break;case"0":r===0&&(r=e),i=e;break;default:if(!+n[e])break n;r>0&&(r=0);break}return r>0?n.slice(0,r)+n.slice(i+1):n}var rn;function zn(n,t){var e=R(n,t);if(!e)return n+"";var r=e[0],i=e[1],o=i-(rn=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,u=r.length;return o===u?r:o>u?r+new Array(o-u+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+R(n,Math.max(0,t+o-1))[0]}function Z(n,t){var e=R(n,t);if(!e)return n+"";var r=e[0],i=e[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const H={"%":(n,t)=>(n*100).toFixed(t),b:n=>Math.round(n).toString(2),c:n=>n+"",d:xn,e:(n,t)=>n.toExponential(t),f:(n,t)=>n.toFixed(t),g:(n,t)=>n.toPrecision(t),o:n=>Math.round(n).toString(8),p:(n,t)=>Z(n*100,t),r:Z,s:zn,X:n=>Math.round(n).toString(16).toUpperCase(),x:n=>Math.round(n).toString(16)};function J(n){return n}var K=Array.prototype.map,Q=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Pn(n){var t=n.grouping===void 0||n.thousands===void 0?J:vn(K.call(n.grouping,Number),n.thousands+""),e=n.currency===void 0?"":n.currency[0]+"",r=n.currency===void 0?"":n.currency[1]+"",i=n.decimal===void 0?".":n.decimal+"",o=n.numerals===void 0?J:bn(K.call(n.numerals,String)),u=n.percent===void 0?"%":n.percent+"",f=n.minus===void 0?"−":n.minus+"",c=n.nan===void 0?"NaN":n.nan+"";function a(s){s=D(s);var l=s.fill,p=s.align,y=s.sign,b=s.symbol,N=s.zero,S=s.width,q=s.comma,w=s.precision,O=s.trim,d=s.type;d==="n"?(q=!0,d="g"):H[d]||(w===void 0&&(w=12),O=!0,d="g"),(N||l==="0"&&p==="=")&&(N=!0,l="0",p="=");var sn=b==="$"?e:b==="#"&&/[boxX]/.test(d)?"0"+d.toLowerCase():"",hn=b==="$"?r:/[%p]/.test(d)?u:"",G=H[d],ln=/[defgprs%]/.test(d);w=w===void 0?6:/[gprs]/.test(d)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function V(h){var k=sn,g=hn,A,X,j;if(d==="c")g=G(h)+g,h="";else{h=+h;var z=h<0||1/h<0;if(h=isNaN(h)?c:G(Math.abs(h),w),O&&(h=jn(h)),z&&+h==0&&y!=="+"&&(z=!1),k=(z?y==="("?y:f:y==="-"||y==="("?"":y)+k,g=(d==="s"?Q[8+rn/3]:"")+g+(z&&y==="("?")":""),ln){for(A=-1,X=h.length;++A<X;)if(j=h.charCodeAt(A),48>j||j>57){g=(j===46?i+h.slice(A+1):h.slice(A))+g,h=h.slice(0,A);break}}}q&&!N&&(h=t(h,1/0));var P=k.length+h.length+g.length,M=P<S?new Array(S-P+1).join(l):"";switch(q&&N&&(h=t(M+h,M.length?S-g.length:1/0),M=""),p){case"<":h=k+h+g+M;break;case"=":h=k+M+h+g;break;case"^":h=M.slice(0,P=M.length>>1)+k+h+g+M.slice(P);break;default:h=M+k+h+g;break}return o(h)}return V.toString=function(){return s+""},V}function m(s,l){var p=a((s=D(s),s.type="f",s)),y=Math.max(-8,Math.min(8,Math.floor(v(l)/3)))*3,b=Math.pow(10,-y),N=Q[8+y/3];return function(S){return p(b*S)+N}}return{format:a,formatPrefix:m}}var E,en,an;En({thousands:",",grouping:[3],currency:["$",""]});function En(n){return E=Pn(n),en=E.format,an=E.formatPrefix,E}function Fn(n){return Math.max(0,-v(Math.abs(n)))}function $n(n,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(v(t)/3)))*3-v(Math.abs(n)))}function Rn(n,t){return n=Math.abs(n),t=Math.abs(t)-n,Math.max(0,v(t)-v(n))+1}function on(n,t){switch(arguments.length){case 0:break;case 1:this.range(n);break;default:this.range(t).domain(n);break}return this}function Wn(n,t){switch(arguments.length){case 0:break;case 1:{typeof n=="function"?this.interpolator(n):this.range(n);break}default:{this.domain(n),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}function un(n,t){t||(t=[]);var e=n?Math.min(t.length,n.length):0,r=t.slice(),i;return function(o){for(i=0;i<e;++i)r[i]=n[i]*(1-o)+t[i]*o;return r}}function fn(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function _n(n,t){return(fn(t)?un:cn)(n,t)}function cn(n,t){var e=t?t.length:0,r=n?Math.min(e,n.length):0,i=new Array(r),o=new Array(e),u;for(u=0;u<r;++u)i[u]=B(n[u],t[u]);for(;u<e;++u)o[u]=t[u];return function(f){for(u=0;u<r;++u)o[u]=i[u](f);return o}}function Dn(n,t){var e=new Date;return n=+n,t=+t,function(r){return e.setTime(n*(1-r)+t*r),e}}function qn(n,t){var e={},r={},i;(n===null||typeof n!="object")&&(n={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in n?e[i]=B(n[i],t[i]):r[i]=t[i];return function(o){for(i in e)r[i]=e[i](o);return r}}function B(n,t){var e=typeof t,r;return t==null||e==="boolean"?mn(t):(e==="number"?I:e==="string"?(r=U(t))?(t=r,Y):dn:t instanceof U?Y:t instanceof Date?Dn:fn(t)?un:Array.isArray(t)?cn:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?qn:I)(n,t)}function In(n,t){return n=+n,t=+t,function(e){return Math.round(n*(1-e)+t*e)}}function Ln(n){return function(){return n}}function Tn(n){return+n}var W=[0,1];function x(n){return n}function T(n,t){return(t-=n=+n)?function(e){return(e-n)/t}:Ln(isNaN(t)?NaN:.5)}function Cn(n,t){var e;return n>t&&(e=n,n=t,t=e),function(r){return Math.max(n,Math.min(t,r))}}function Bn(n,t,e){var r=n[0],i=n[1],o=t[0],u=t[1];return i<r?(r=T(i,r),o=e(u,o)):(r=T(r,i),o=e(o,u)),function(f){return o(r(f))}}function On(n,t,e){var r=Math.min(n.length,t.length)-1,i=new Array(r),o=new Array(r),u=-1;for(n[r]<n[0]&&(n=n.slice().reverse(),t=t.slice().reverse());++u<r;)i[u]=T(n[u],n[u+1]),o[u]=e(t[u],t[u+1]);return function(f){var c=tn(n,f,1,r)-1;return o[c](i[c](f))}}function Gn(n,t){return t.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown())}function Vn(){var n=W,t=W,e=B,r,i,o,u=x,f,c,a;function m(){var l=Math.min(n.length,t.length);return u!==x&&(u=Cn(n[0],n[l-1])),f=l>2?On:Bn,c=a=null,s}function s(l){return l==null||isNaN(l=+l)?o:(c||(c=f(n.map(r),t,e)))(r(u(l)))}return s.invert=function(l){return u(i((a||(a=f(t,n.map(r),I)))(l)))},s.domain=function(l){return arguments.length?(n=Array.from(l,Tn),m()):n.slice()},s.range=function(l){return arguments.length?(t=Array.from(l),m()):t.slice()},s.rangeRound=function(l){return t=Array.from(l),e=In,m()},s.clamp=function(l){return arguments.length?(u=l?!0:x,m()):u!==x},s.interpolate=function(l){return arguments.length?(e=l,m()):e},s.unknown=function(l){return arguments.length?(o=l,s):o},function(l,p){return r=l,i=p,m()}}function Xn(){return Vn()(x,x)}function Un(n,t,e,r){var i=An(n,t,e),o;switch(r=D(r??",f"),r.type){case"s":{var u=Math.max(Math.abs(n),Math.abs(t));return r.precision==null&&!isNaN(o=$n(i,u))&&(r.precision=o),an(r,u)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=Rn(i,Math.max(Math.abs(n),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=Fn(i))&&(r.precision=o-(r.type==="%")*2);break}}return en(r)}function Yn(n){var t=n.domain;return n.ticks=function(e){var r=t();return Nn(r[0],r[r.length-1],e??10)},n.tickFormat=function(e,r){var i=t();return Un(i[0],i[i.length-1],e??10,r)},n.nice=function(e){e==null&&(e=10);var r=t(),i=0,o=r.length-1,u=r[i],f=r[o],c,a,m=10;for(f<u&&(a=u,u=f,f=a,a=i,i=o,o=a);m-- >0;){if(a=L(u,f,e),a===c)return r[i]=u,r[o]=f,t(r);if(a>0)u=Math.floor(u/a)*a,f=Math.ceil(f/a)*a;else if(a<0)u=Math.ceil(u*a)/a,f=Math.floor(f*a)/a;else break;c=a}return n},n}function Zn(){var n=Xn();return n.copy=function(){return Gn(n,Zn())},on.apply(n,arguments),Yn(n)}function Hn(){var n=[.5],t=[0,1],e,r=1;function i(o){return o!=null&&o<=o?t[tn(n,o,0,r)]:e}return i.domain=function(o){return arguments.length?(n=Array.from(o),r=Math.min(n.length,t.length-1),i):n.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),r=Math.min(n.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var u=t.indexOf(o);return[n[u-1],n[u]]},i.unknown=function(o){return arguments.length?(e=o,i):e},i.copy=function(){return Hn().domain(n).range(t).unknown(e)},on.apply(i,arguments)}export{Xn as A,Wn as B,Zn as C,Hn as D,Un as E,Qn as F,F as a,Mn as b,_ as c,D as d,Rn as e,Pn as f,$n as g,en as h,an as i,on as j,B as k,_n as l,Dn as m,Kn as n,un as o,Fn as p,qn as q,In as r,Tn as s,An as t,Yn as u,Vn as v,Gn as w,Nn as x,x as y,tn as z};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{i as _}from"./string.Bl9OLDCw.js";var D=180/Math.PI,I={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function j(t,e,o,l,c,g){var u,p,a;return(u=Math.sqrt(t*t+e*e))&&(t/=u,e/=u),(a=t*o+e*l)&&(o-=t*a,l-=e*a),(p=Math.sqrt(o*o+l*l))&&(o/=p,l/=p,a/=p),t*l<e*o&&(t=-t,e=-e,a=-a,u=-u),{translateX:c,translateY:g,rotate:Math.atan2(e,t)*D,skewX:Math.atan(a)*D,scaleX:u,scaleY:p}}var M;function H(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?I:j(e.a,e.b,e.c,e.d,e.e,e.f)}function K(t){return t==null||(M||(M=document.createElementNS("http://www.w3.org/2000/svg","g")),M.setAttribute("transform",t),!(t=M.transform.baseVal.consolidate()))?I:(t=t.matrix,j(t.a,t.b,t.c,t.d,t.e,t.f))}function A(t,e,o,l){function c(i){return i.length?i.pop()+" ":""}function g(i,n,r,s,f,m){if(i!==r||n!==s){var w=f.push("translate(",null,e,null,o);m.push({i:w-4,x:_(i,r)},{i:w-2,x:_(n,s)})}else(r||s)&&f.push("translate("+r+e+s+o)}function u(i,n,r,s){i!==n?(i-n>180?n+=360:n-i>180&&(i+=360),s.push({i:r.push(c(r)+"rotate(",null,l)-2,x:_(i,n)})):n&&r.push(c(r)+"rotate("+n+l)}function p(i,n,r,s){i!==n?s.push({i:r.push(c(r)+"skewX(",null,l)-2,x:_(i,n)}):n&&r.push(c(r)+"skewX("+n+l)}function a(i,n,r,s,f,m){if(i!==r||n!==s){var w=f.push(c(f)+"scale(",null,",",null,")");m.push({i:w-4,x:_(i,r)},{i:w-2,x:_(n,s)})}else(r!==1||s!==1)&&f.push(c(f)+"scale("+r+","+s+")")}return function(i,n){var r=[],s=[];return i=t(i),n=t(n),g(i.translateX,i.translateY,n.translateX,n.translateY,r,s),u(i.rotate,n.rotate,r,s),p(i.skewX,n.skewX,r,s),a(i.scaleX,i.scaleY,n.scaleX,n.scaleY,r,s),i=n=null,function(f){for(var m=-1,w=s.length,N;++m<w;)r[(N=s[m]).i]=N.x(f);return r.join("")}}}var J=A(H,"px, ","px)","deg)"),Q=A(K,", ",")",")"),k=0,v=0,X=0,C=1e3,T,x,Y=0,h=0,y=0,d=typeof performance=="object"&&performance.now?performance:Date,E=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function O(){return h||(E(L),h=d.now()+y)}function L(){h=0}function S(){this._call=this._time=this._next=null}S.prototype=V.prototype={constructor:S,restart:function(t,e,o){if(typeof t!="function")throw new TypeError("callback is not a function");o=(o==null?O():+o)+(e==null?0:+e),!this._next&&x!==this&&(x?x._next=this:T=this,x=this),this._call=t,this._time=o,q()},stop:function(){this._call&&(this._call=null,this._time=1/0,q())}};function V(t,e,o){var l=new S;return l.restart(t,e,o),l}function W(){O(),++k;for(var t=T,e;t;)(e=h-t._time)>=0&&t._call.call(void 0,e),t=t._next;--k}function F(){h=(Y=d.now())+y,k=v=0;try{W()}finally{k=0,B(),h=0}}function z(){var t=d.now(),e=t-Y;e>C&&(y-=e,Y=t)}function B(){for(var t,e=T,o,l=1/0;e;)e._call?(l>e._time&&(l=e._time),t=e,e=e._next):(o=e._next,e._next=null,e=t?t._next=o:T=o);x=t,q(l)}function q(t){if(!k){v&&(v=clearTimeout(v));var e=t-h;e>24?(t<1/0&&(v=setTimeout(F,t-d.now()-y)),X&&(X=clearInterval(X))):(X||(Y=d.now(),X=setInterval(z,C)),k=1,E(F))}}export{S as T,Q as a,J as i,O as n,V as t};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{g as u,bZ as n}from"./index.CLHVvMN0.js";var o=n,i=0;function a(r){var t=++i;return o(r)+t}var e=a;const s=u(e);export{s as u};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{n as m,r as n,a6 as x,aQ as p,M as y,j as i,aw as C}from"./index.CLHVvMN0.js";const h=m("div",{target:"e12yskxj0"})(({theme:e,isExpanded:t})=>({...t?{position:"fixed",top:0,left:0,bottom:0,right:0,background:e.colors.bgColor,zIndex:e.zIndices.fullscreenWrapper,padding:e.spacing.md,paddingTop:e.sizes.fullScreenHeaderHeight,overflow:["auto","overlay"],display:"flex",alignItems:"center",justifyContent:"center"}:{}})),f=n.createContext(null);f.displayName="ElementFullscreenContext";const w=e=>{const t=n.useContext(e);if(t==null)throw new Error(`useRequiredContext: ${e.displayName??"context"} not found`);return t},F=()=>{const{setFullScreen:e}=n.useContext(x),[t,s]=n.useState(!1),{fullHeight:d,fullWidth:o}=w(p),l=n.useCallback(u=>{s(u),e(u)},[e]),c=n.useCallback(()=>{document.body.style.overflow="hidden",l(!0)},[l]),r=n.useCallback(()=>{document.body.style.overflow="unset",l(!1)},[l]),a=n.useCallback(u=>{u.keyCode===27&&t&&r()},[r,t]);return n.useEffect(()=>(document.addEventListener("keydown",a,!1),()=>{document.removeEventListener("keydown",a,!1)}),[a]),n.useMemo(()=>({expanded:t,zoomIn:c,zoomOut:r,fullHeight:d,fullWidth:o}),[t,c,r,d,o])},S=({children:e,height:t,width:s})=>{const d=y(),{expanded:o,fullHeight:l,fullWidth:c,zoomIn:r,zoomOut:a}=F(),u=n.useMemo(()=>({width:o?c:s,height:o?l:t,expanded:o,expand:r,collapse:a}),[o,l,c,t,s,r,a]);return i(f.Provider,{value:u,children:i(h,{isExpanded:o,"data-testid":"stFullScreenFrame",theme:d,children:e})})};function v(e){const t=s=>i(S,{width:s.width,children:i(e,{...s})});return t.displayName=`withFullScreenWrapper(${e.displayName||e.name})`,C(t,e)}export{f as E,w as u,v as w};
|
Binary file
|
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
|