streamlit-nightly 1.39.1.dev20241001__py2.py3-none-any.whl → 1.39.1.dev20241002__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/commands/navigation.py +3 -0
- streamlit/config.py +1 -0
- streamlit/config_option.py +2 -0
- streamlit/elements/widgets/text_widgets.py +7 -1
- streamlit/static/asset-manifest.json +14 -14
- streamlit/static/index.html +1 -1
- streamlit/static/static/js/1086.00b01cb4.chunk.js +5 -0
- streamlit/static/static/js/1260.a40772f3.chunk.js +5 -0
- streamlit/static/static/js/1780.d7a92d2b.chunk.js +1 -0
- streamlit/static/static/js/3861.5aea56b8.chunk.js +1 -0
- streamlit/static/static/js/4103.374d188d.chunk.js +1 -0
- streamlit/static/static/js/5618.1b8c3294.chunk.js +5 -0
- streamlit/static/static/js/5711.ad171f9d.chunk.js +1 -0
- streamlit/static/static/js/7809.304e2c99.chunk.js +1 -0
- streamlit/static/static/js/8237.b58252d4.chunk.js +1 -0
- streamlit/static/static/js/{8815.9d336691.chunk.js → 8815.ef4be53c.chunk.js} +1 -1
- streamlit/static/static/js/{9114.1ee3d4dd.chunk.js → 9114.c234641e.chunk.js} +1 -1
- streamlit/static/static/js/954.97e839a4.chunk.js +5 -0
- streamlit/static/static/js/main.bf449882.js +28 -0
- streamlit/web/bootstrap.py +4 -1
- streamlit/web/cli.py +2 -0
- streamlit/web/server/app_static_file_handler.py +1 -1
- {streamlit_nightly-1.39.1.dev20241001.dist-info → streamlit_nightly-1.39.1.dev20241002.dist-info}/METADATA +1 -1
- {streamlit_nightly-1.39.1.dev20241001.dist-info → streamlit_nightly-1.39.1.dev20241002.dist-info}/RECORD +29 -29
- streamlit/static/static/js/1086.464de8f9.chunk.js +0 -5
- streamlit/static/static/js/1260.e6289cc2.chunk.js +0 -5
- streamlit/static/static/js/1780.48f96d0e.chunk.js +0 -1
- streamlit/static/static/js/3861.0dedcd19.chunk.js +0 -1
- streamlit/static/static/js/4103.d863052a.chunk.js +0 -1
- streamlit/static/static/js/5618.0a42d599.chunk.js +0 -5
- streamlit/static/static/js/5711.229cb7d0.chunk.js +0 -1
- streamlit/static/static/js/7809.d5f0080d.chunk.js +0 -1
- streamlit/static/static/js/8237.210a5ac4.chunk.js +0 -1
- streamlit/static/static/js/954.1da91b19.chunk.js +0 -5
- streamlit/static/static/js/main.3532f09a.js +0 -28
- /streamlit/static/static/js/{main.3532f09a.js.LICENSE.txt → main.bf449882.js.LICENSE.txt} +0 -0
- {streamlit_nightly-1.39.1.dev20241001.data → streamlit_nightly-1.39.1.dev20241002.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.39.1.dev20241001.dist-info → streamlit_nightly-1.39.1.dev20241002.dist-info}/WHEEL +0 -0
- {streamlit_nightly-1.39.1.dev20241001.dist-info → streamlit_nightly-1.39.1.dev20241002.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.39.1.dev20241001.dist-info → streamlit_nightly-1.39.1.dev20241002.dist-info}/top_level.txt +0 -0
streamlit/web/bootstrap.py
CHANGED
@@ -270,10 +270,13 @@ def load_config_options(flag_options: dict[str, Any]) -> None:
|
|
270
270
|
A dict of config options where the keys are the CLI flag version of the
|
271
271
|
config option names.
|
272
272
|
"""
|
273
|
+
# We want to filter out two things: values that are None, and values that
|
274
|
+
# are empty tuples. The latter is a special case that indicates that the
|
275
|
+
# no values were provided, and the config should reset to the default
|
273
276
|
options_from_flags = {
|
274
277
|
name.replace("_", "."): val
|
275
278
|
for name, val in flag_options.items()
|
276
|
-
if val is not None
|
279
|
+
if val is not None and val != ()
|
277
280
|
}
|
278
281
|
|
279
282
|
# Force a reparse of config files (if they exist). The result is cached
|
streamlit/web/cli.py
CHANGED
@@ -59,6 +59,7 @@ def _convert_config_option_to_click_option(
|
|
59
59
|
"type": config_option.type,
|
60
60
|
"option": option,
|
61
61
|
"envvar": config_option.env_var,
|
62
|
+
"multiple": config_option.multiple,
|
62
63
|
}
|
63
64
|
|
64
65
|
|
@@ -101,6 +102,7 @@ def configurator_options(func: F) -> F:
|
|
101
102
|
parsed_parameter["param"],
|
102
103
|
help=parsed_parameter["description"],
|
103
104
|
type=parsed_parameter["type"],
|
105
|
+
multiple=parsed_parameter["multiple"],
|
104
106
|
**click_option_kwargs,
|
105
107
|
)
|
106
108
|
func = config_option(func)
|
@@ -40,7 +40,7 @@ class AppStaticFileHandler(tornado.web.StaticFileHandler):
|
|
40
40
|
mimetypes.add_type("image/webp", ".webp")
|
41
41
|
|
42
42
|
def validate_absolute_path(self, root: str, absolute_path: str) -> str | None:
|
43
|
-
full_path = os.path.
|
43
|
+
full_path = os.path.abspath(absolute_path)
|
44
44
|
|
45
45
|
ret_val = super().validate_absolute_path(root, absolute_path)
|
46
46
|
|
@@ -2,8 +2,8 @@ streamlit/__init__.py,sha256=IreKSB4rXfUQ8hNKsBIWCZ1gcWJyxZfz1Fqz71Sgn1o,9566
|
|
2
2
|
streamlit/__main__.py,sha256=8vHowjccJfFMwrA22IEe3ynE9F670mkspbo9rYdM0ks,868
|
3
3
|
streamlit/cli_util.py,sha256=Lz5th7VSp4KILRLEkjfOK_7AVhNnv2JROl_8UF1MDQg,3383
|
4
4
|
streamlit/column_config.py,sha256=6RYqAsPV838B0DSb7nYPFedKfTxNCzVrc_4BmwMa_c4,1414
|
5
|
-
streamlit/config.py,sha256=
|
6
|
-
streamlit/config_option.py,sha256=
|
5
|
+
streamlit/config.py,sha256=E3TCYdQgXB1viHfUBl6BZuZdZRra1CkySMIFRrgHiH4,41110
|
6
|
+
streamlit/config_option.py,sha256=t15ma68Hx71cR_Rd1Ox29nTK2PhV4M8w3rN3nX4OwQY,11601
|
7
7
|
streamlit/config_util.py,sha256=-MGb5eBrsZvNmqywmiBmo27ll1F9OmCDX4toGWglv2c,6015
|
8
8
|
streamlit/cursor.py,sha256=SXJcot8mc1htkXx1jnIWmvYRaFPlPpTOhPoYH-LPmos,6026
|
9
9
|
streamlit/dataframe_util.py,sha256=0wxxXYNnLibiq_LDYXN3031bBFqDXZJJxhc9DIL0f7k,47836
|
@@ -36,7 +36,7 @@ streamlit/commands/echo.py,sha256=s0tT_IXxh7BLHOapRS8syE5Tnm4Djm3-oKO0J0MY1wI,40
|
|
36
36
|
streamlit/commands/execution_control.py,sha256=W8w5SXkQExtEBNeKRbMdPdOX0g8JirjDn2FK9w-PxDU,8269
|
37
37
|
streamlit/commands/experimental_query_params.py,sha256=1_rZ03BeY2mqh6mZr-bPJBaeIB2HyOvXMgdZ98FIU6A,5728
|
38
38
|
streamlit/commands/logo.py,sha256=82dLFRom39Y0JmCBNO8YZS_Ophe-vyYw7v3Md8ZrLD0,6794
|
39
|
-
streamlit/commands/navigation.py,sha256=
|
39
|
+
streamlit/commands/navigation.py,sha256=Ud1ufZ1-8Anlo3rOiOLj6KVuqxCWHekA5x63b2Y4iRo,10311
|
40
40
|
streamlit/commands/page_config.py,sha256=uGYhMj2Lh_eH2h11_amTJTrbGPiUvjzONfYlu_qLer0,12931
|
41
41
|
streamlit/components/__init__.py,sha256=Vrf1yVMOcTyhUPnYvsfyeL96Vpd5z8KoSV5ZzTcTQgU,616
|
42
42
|
streamlit/components/lib/__init__.py,sha256=Vrf1yVMOcTyhUPnYvsfyeL96Vpd5z8KoSV5ZzTcTQgU,616
|
@@ -120,7 +120,7 @@ streamlit/elements/widgets/radio.py,sha256=FMg7kuNRjGLsHQtZhumZntQtfwQHxskdsgUcz
|
|
120
120
|
streamlit/elements/widgets/select_slider.py,sha256=TsCd0RqvvyN454lfj51bipUdNXCix8UCrkJ5a6VT0d0,14845
|
121
121
|
streamlit/elements/widgets/selectbox.py,sha256=An3Oz8SasWGXTyUlKN9Rx9A1aQH-VqWzvTCoY08CpQo,12222
|
122
122
|
streamlit/elements/widgets/slider.py,sha256=Ca4BPXpkbXj74HgBqcSjJLipyYkGzP9-Dgrjyx8ebms,32489
|
123
|
-
streamlit/elements/widgets/text_widgets.py,sha256=
|
123
|
+
streamlit/elements/widgets/text_widgets.py,sha256=N-vV-jKBWRdQB8MCfJjgGCCfv0dTLMLb8e8UVIwdo10,21283
|
124
124
|
streamlit/elements/widgets/time_widgets.py,sha256=BvRqJ3jebd0erPfZbSrK8Rg_k6y8wPVD7iVtCzjp7bk,28554
|
125
125
|
streamlit/external/__init__.py,sha256=Vrf1yVMOcTyhUPnYvsfyeL96Vpd5z8KoSV5ZzTcTQgU,616
|
126
126
|
streamlit/external/langchain/__init__.py,sha256=sAzaNf4Cje3cJikPBVvF7pj1sEdEvUfKIEY_Z6Zk8cA,814
|
@@ -347,19 +347,19 @@ streamlit/runtime/state/safe_session_state.py,sha256=WLFFyMtP4F19TWWBarKtSP942Ie
|
|
347
347
|
streamlit/runtime/state/session_state.py,sha256=SMBWsSZY29jAgL3QfX4xvJr9aLCNrHHUz9AmosX7FlQ,28850
|
348
348
|
streamlit/runtime/state/session_state_proxy.py,sha256=IWF43f6UWL4KyxNWF3aTv1sbykNI2hI5UsPF2UIfpdE,5524
|
349
349
|
streamlit/runtime/state/widgets.py,sha256=r5XOgHBh9AqS52rgKGgDXFGnkdY6ObUJBSSUBqkzTK8,5319
|
350
|
-
streamlit/static/asset-manifest.json,sha256=
|
350
|
+
streamlit/static/asset-manifest.json,sha256=hrwK6KgkPLp9vgKs6ynJM6rRnexJJAUdi7JkifBGnUY,14725
|
351
351
|
streamlit/static/favicon.png,sha256=if5cVgw7azxKOvV5FpGixga7JLn23rfnHcy1CdWI1-E,1019
|
352
|
-
streamlit/static/index.html,sha256=
|
352
|
+
streamlit/static/index.html,sha256=obAN5JxXZu00nWPhyW1Z3qA6Fqp8PgS8IT1uUmBodE4,891
|
353
353
|
streamlit/static/static/css/195.81b3d18f.chunk.css,sha256=7WxsSsC_REs_rrfQTODJt34QZfNePqEv_fc-KFLcOz4,33375
|
354
354
|
streamlit/static/static/css/5711.a29b5d98.chunk.css,sha256=9aDdTsQMA0z-TwV-ueqz1qWqpAcYPWR8fkNgZHHKZ-0,2669
|
355
355
|
streamlit/static/static/css/9943.93909c7e.chunk.css,sha256=6dVarHz_P5ACNrmcAZkXoNnjV5Z6CfnAXpxLBx-i1aw,12093
|
356
356
|
streamlit/static/static/css/main.5513bd04.css,sha256=9vuriEsFvHDyAwsI3vtBY9PNL8UOjqGwWZ4lZHsdFzw,29356
|
357
|
-
streamlit/static/static/js/1086.
|
357
|
+
streamlit/static/static/js/1086.00b01cb4.chunk.js,sha256=fOoWSVIHq_tCJJ1GFkXi4u5xWMifQodtedYpGxF_p-g,11531
|
358
358
|
streamlit/static/static/js/1101.13462bff.chunk.js,sha256=Iu-ECFDUDJJ14X1UQR4KIqtBHDhW60i15dbuEzx9HT4,3259
|
359
|
-
streamlit/static/static/js/1260.
|
359
|
+
streamlit/static/static/js/1260.a40772f3.chunk.js,sha256=y6eW9Asc-gOW-FyYEAAB711XDFOR05ymZPugzSDHSSU,10880
|
360
360
|
streamlit/static/static/js/1674.86aea8e0.chunk.js,sha256=g2RyDOrwFlJImiNgHT8Yo_LVDjfqRV5DHDhXK_IYdQE,9236
|
361
361
|
streamlit/static/static/js/1674.86aea8e0.chunk.js.LICENSE.txt,sha256=426lVBKMW2FKu5BqnSDpZnhms1QqJZ-nDvqwC62w-Z8,479
|
362
|
-
streamlit/static/static/js/1780.
|
362
|
+
streamlit/static/static/js/1780.d7a92d2b.chunk.js,sha256=ZeJjdQx7HSAILm0QBD7ZVhdFWXMy5AkyrwBliR0KAyI,14635
|
363
363
|
streamlit/static/static/js/195.8e0d331c.chunk.js,sha256=T9-0Vb72wInZWoAeHWBRIryhklPB1Sh2gh8GvGYvAd8,3083873
|
364
364
|
streamlit/static/static/js/195.8e0d331c.chunk.js.LICENSE.txt,sha256=eedmllw4KHDop7oVWRkxEA-ZkkV_8zKkzzNxLjPGmXM,1379
|
365
365
|
streamlit/static/static/js/238.8d3a7d25.chunk.js,sha256=mIjngquAA2ebbQ9tuUw7oF9p8E5bRaP99iGnfWuSz_o,6412
|
@@ -370,9 +370,9 @@ streamlit/static/static/js/3391.663b9d47.chunk.js,sha256=wnik-Gm3vJGqiTZzA9-EuwH
|
|
370
370
|
streamlit/static/static/js/3471.de4b25a2.chunk.js,sha256=v46A9eVjvhxYsBZ6SFG6wRg94XAccGQn6xA3q7sIluE,2698
|
371
371
|
streamlit/static/static/js/3560.ce031236.chunk.js,sha256=3KxR6gNZHQGsFYwELNibNWqsC8ceE4_XE3yNxTPyJi4,24850
|
372
372
|
streamlit/static/static/js/3710.b80be2b0.chunk.js,sha256=3IGM_h_27P677MH2sN4B2VtzJ1tek6MODouqr-zt0cw,12854
|
373
|
-
streamlit/static/static/js/3861.
|
373
|
+
streamlit/static/static/js/3861.5aea56b8.chunk.js,sha256=ZeUMQI5V-Ovuyw4I6Y1fq8w3-wI8uk4ygVp2TwGQQSU,3120
|
374
374
|
streamlit/static/static/js/3966.e0686958.chunk.js,sha256=zf2wvStW2Hl8p1n7K6ZCZ28xFzRklujcMF1UCLaSbRA,14199
|
375
|
-
streamlit/static/static/js/4103.
|
375
|
+
streamlit/static/static/js/4103.374d188d.chunk.js,sha256=p4-HME5JUR8SWXGzH-WY9APcDEARXVvVQE1RPFyqCH8,13423
|
376
376
|
streamlit/static/static/js/4297.3afbdd03.chunk.js,sha256=HSpdCypz0k3kIfCZkCNvpiMtT0VO9PnTQcKTcsuMtKY,376269
|
377
377
|
streamlit/static/static/js/4297.3afbdd03.chunk.js.LICENSE.txt,sha256=6s4mSSf8NHGJqUCFAj3VgMXZuNYyAzshKRhvxYZTQoU,281
|
378
378
|
streamlit/static/static/js/4827.f9cb5fa3.chunk.js,sha256=blr_9tALrSaQq1oNJjcmfQNk8rWXd3EmOJ9brB4siz8,2575
|
@@ -381,9 +381,9 @@ streamlit/static/static/js/491.c1a2c0b2.chunk.js.LICENSE.txt,sha256=pyz0N_wsBwaF
|
|
381
381
|
streamlit/static/static/js/4942.e4db7877.chunk.js,sha256=3ccntc6WQ6_-pCJFp4NZHE3QbPQ1TEaifagA-pMYnC4,107578
|
382
382
|
streamlit/static/static/js/5281.02b3ddc4.chunk.js,sha256=6iylWzPKZ4AVv5DXZHHZZmuoZ0nF2iswmoU-mygfW3I,15142
|
383
383
|
streamlit/static/static/js/5544.2769497c.chunk.js,sha256=i3hJL-txrBM9F9IbWF42kHQHINgh9aa1NcAVtoxRSI0,32764
|
384
|
-
streamlit/static/static/js/5618.
|
384
|
+
streamlit/static/static/js/5618.1b8c3294.chunk.js,sha256=vPyMH5n5bkDiVOU9X9Fwa2HbwXsJQo9D25-lpjt0t9k,11274
|
385
385
|
streamlit/static/static/js/5625.d9509933.chunk.js,sha256=1j2ECAWN0HKvAy3N1KRKrWdY-8dA8e5D9hydOnzNVLM,10742
|
386
|
-
streamlit/static/static/js/5711.
|
386
|
+
streamlit/static/static/js/5711.ad171f9d.chunk.js,sha256=RQgV7jPJVSXqdezNwFQolAWYn1GG8twE9UinvZCeEhg,14694
|
387
387
|
streamlit/static/static/js/5764.5a55e5be.chunk.js,sha256=EXfo-JRIKlOsXU91rI9-4Nu1v-wZqsQF2GTHmSydOZk,32464
|
388
388
|
streamlit/static/static/js/5828.f8572ba4.chunk.js,sha256=KrgzrwMJj70Ou4vPwvpeUEd-E7fKQUKUGK_y6wGkEf8,2272
|
389
389
|
streamlit/static/static/js/583.61ac7fde.chunk.js,sha256=ZNm9WsrrmRUjAJPKbaBwKDxJeXYgp3Prip_YtHMU3Nc,3252
|
@@ -400,31 +400,31 @@ streamlit/static/static/js/7591.b3928443.chunk.js.LICENSE.txt,sha256=u9LVDbKjZkI
|
|
400
400
|
streamlit/static/static/js/7612.39e7938b.chunk.js,sha256=0W2BvLlso8-80kNOY35UO_DuD8ZAC4zNl6Zr1VWpKO4,804885
|
401
401
|
streamlit/static/static/js/7612.39e7938b.chunk.js.LICENSE.txt,sha256=MFVywCe4fCte7HrHaVpL-jnDWhe9ei9zkyRvRUXQU-4,212
|
402
402
|
streamlit/static/static/js/766.e3700e32.chunk.js,sha256=VPlOlYxsQ-Nptf1M3pbEqYHbqHrexY9bLDQ0MgMmkjg,12213
|
403
|
-
streamlit/static/static/js/7809.
|
403
|
+
streamlit/static/static/js/7809.304e2c99.chunk.js,sha256=U7FV22v0bRHGtVNLuFe5NoNx7UP-5kZE0kFk93qQfHo,1404
|
404
404
|
streamlit/static/static/js/783.788bb3ab.chunk.js,sha256=fU54-9m8e-yscWpoz9NxxvRje_OcGE5wJijHuVNxMXU,88546
|
405
405
|
streamlit/static/static/js/797.36f1bf7d.chunk.js,sha256=lBSxYn2yOvQ9qigWurVjQBSLOh40cE8DyU8O7uBHIPY,9623
|
406
406
|
streamlit/static/static/js/7983.15bb2017.chunk.js,sha256=wNR0QnXubELkrdJ1K1QKVltDS2q4yJ3NoQUZxO5FIDI,3358
|
407
407
|
streamlit/static/static/js/8148.f51df66c.chunk.js,sha256=5ZAmFfHV_g1R_l7S4qScMvSotDUFScVH6r2tkTfcA1s,4631
|
408
408
|
streamlit/static/static/js/8161.9b75f98a.chunk.js,sha256=vWAh7Nhi5kkx3Z330eIRlgh0B4FxgJjmRVaQNDDX_DU,3640
|
409
409
|
streamlit/static/static/js/8166.11abccb8.chunk.js,sha256=qgPTbAWlMocETOUCTB8hiOaaDMcO4gTZgt1YnQ8K0bU,2627
|
410
|
-
streamlit/static/static/js/8237.
|
410
|
+
streamlit/static/static/js/8237.b58252d4.chunk.js,sha256=m4LpVAgG-vBWq1UX8-5q4HcTBWxAhGZ_0-mUygEn7o4,15362
|
411
411
|
streamlit/static/static/js/84.414fa87b.chunk.js,sha256=sF7-dsOEXmnl7d-z2d0Fb7F8vyEWlUY2vEK7TQ5RK8k,622
|
412
412
|
streamlit/static/static/js/8642.58110d15.chunk.js,sha256=fZhw8uCV5cuCz62H1Yw8LLgtH00H-tiWk3UlzAwJQF0,3380289
|
413
413
|
streamlit/static/static/js/8642.58110d15.chunk.js.LICENSE.txt,sha256=eaJYPeiNKQAvVx6lv1DR9gIPG1pFwki2pcDLddtfQHw,5061
|
414
414
|
streamlit/static/static/js/8648.92079acf.chunk.js,sha256=WpZpzt0hkqhjZ5CotTAZcQYz_C61hQD84_KcrDdXCBQ,22115
|
415
415
|
streamlit/static/static/js/8776.4a234e13.chunk.js,sha256=OcKswpBgDoq_qC0lvnBQlCbK1Mxy8VQ_RrJv8m67sII,39883
|
416
416
|
streamlit/static/static/js/8790.0b98f286.chunk.js,sha256=P5TzrizssOnsqzKQLw91uOldd06TpYBnzdJf4QmH3Hg,791
|
417
|
-
streamlit/static/static/js/8815.
|
417
|
+
streamlit/static/static/js/8815.ef4be53c.chunk.js,sha256=rdP3sQfCev6oVDxlbjbnIHq3IDb2n2OiZrWpDV4Pq54,5842
|
418
418
|
streamlit/static/static/js/9060.1ec8dc2b.chunk.js,sha256=4eqbVFB_JXytGM3AFtzGHk1fywaaNDZuEsVm1AgPW6Y,686
|
419
419
|
streamlit/static/static/js/9077.e0a8db2a.chunk.js,sha256=vGwtD_Xd3JAHWJJEVQUJKWOvMURInjsN5rLJEZb3ISs,65771
|
420
|
-
streamlit/static/static/js/9114.
|
420
|
+
streamlit/static/static/js/9114.c234641e.chunk.js,sha256=kC5T1UjoIyWwl1Tk611wgJkOgrWWrXDjIYhv054U468,7364
|
421
421
|
streamlit/static/static/js/9464.7e9a3c0a.chunk.js,sha256=63Fg1-eQ1Sx7Hb6rqtQaTOJ7CTZ8GZdyl7aMZJ-NcI8,1350
|
422
422
|
streamlit/static/static/js/9528.746f7a0e.chunk.js,sha256=KL6FfepG5LOH0P5pH4ieh5-rvx5o4YD77PKVAZIGlPg,1887
|
423
|
-
streamlit/static/static/js/954.
|
423
|
+
streamlit/static/static/js/954.97e839a4.chunk.js,sha256=C8OuFr9kkUj57QnO_QyQ71f5EvWSXioojlV6KTexg20,8675
|
424
424
|
streamlit/static/static/js/9923.7061d124.chunk.js,sha256=WeDEW7AM0VDnIJzQv9UykMvjG0nbYX6BTRyKV-zBlyE,5951
|
425
425
|
streamlit/static/static/js/9943.6af344bb.chunk.js,sha256=BeyyiIkkq5BhkL5fJVqXvjCxQCviixuvtX925tnZp4U,45364
|
426
|
-
streamlit/static/static/js/main.
|
427
|
-
streamlit/static/static/js/main.
|
426
|
+
streamlit/static/static/js/main.bf449882.js,sha256=RvRqbGJ-CQYhcn7oCzMOTyO2FiMa6sxCmV-AYWijlQE,4546411
|
427
|
+
streamlit/static/static/js/main.bf449882.js.LICENSE.txt,sha256=zBIKKHKi84ZOA6IoZ3tlc9xb3yukNP-rM98cZVvzteg,4398
|
428
428
|
streamlit/static/static/media/KaTeX_AMS-Regular.73ea273a72f4aca30ca5.woff2,sha256=DN04fJWQoan5eUVgAi27WWVKfYbxh6oMgUla1C06cwg,28076
|
429
429
|
streamlit/static/static/media/KaTeX_AMS-Regular.853be92419a6c3766b9a.ttf,sha256=aFNIQLz90r_7bw6N60hoTdAefwTqKBMmdXevuQbeHRM,63632
|
430
430
|
streamlit/static/static/media/KaTeX_AMS-Regular.d562e886c52f12660a41.woff,sha256=MNqR6EyJP4deJSaJ-uvcWQsocRReitx_mp1NvYzgslE,33516
|
@@ -530,11 +530,11 @@ streamlit/watcher/path_watcher.py,sha256=NUdOMgV87oLs2wxLFIh8Fz1HjBlhbE4pEAtxReQ
|
|
530
530
|
streamlit/watcher/polling_path_watcher.py,sha256=VwQ06abbvHSIuvR66YpFDx9ANhrzTmoQylKqSjUosFE,3822
|
531
531
|
streamlit/watcher/util.py,sha256=uDsWPxQ8WLNQ4U_MCqWm38H7BEjSrBpPsIZj1ySK8KM,5203
|
532
532
|
streamlit/web/__init__.py,sha256=Vrf1yVMOcTyhUPnYvsfyeL96Vpd5z8KoSV5ZzTcTQgU,616
|
533
|
-
streamlit/web/bootstrap.py,sha256=
|
533
|
+
streamlit/web/bootstrap.py,sha256=7lMnoBgXESyDV0MNqlub0P3ZF6kQCDH7RXj1jysH78U,12096
|
534
534
|
streamlit/web/cache_storage_manager_config.py,sha256=3bBXzQOPfMhBKCtrywwZQi7LuGf9b4Lm-RbhInd5o5k,1215
|
535
|
-
streamlit/web/cli.py,sha256=
|
535
|
+
streamlit/web/cli.py,sha256=a5d_KIyFsOI2bzE8pPcyVhIvbt5jlxT850RKfquyYuU,11268
|
536
536
|
streamlit/web/server/__init__.py,sha256=w4TFcV0OjM5zx8ej7oThRIyB6gq3kqdt45XBk1zkRWo,1080
|
537
|
-
streamlit/web/server/app_static_file_handler.py,sha256=
|
537
|
+
streamlit/web/server/app_static_file_handler.py,sha256=HQwZXzv2LMv0Kuq9gQYfHCS7midNJWj5us7Dt1UOvUY,3110
|
538
538
|
streamlit/web/server/browser_websocket_handler.py,sha256=rcOCOfzs1cgkipT-8drKBVdxMsJDwihRccaOea3KYqU,7950
|
539
539
|
streamlit/web/server/component_request_handler.py,sha256=nHSuvJwHzOk91CHAT4BbUkt88-T2Osdun38Sx3Z-5XU,4415
|
540
540
|
streamlit/web/server/media_file_handler.py,sha256=2KfzPnMN1RstMtI4fs0PD0vFiFrWMyKL0q7LfWJLYZ4,5270
|
@@ -544,9 +544,9 @@ streamlit/web/server/server_util.py,sha256=ioIHkXNlA_ujj2Q3isziM8r5glKxgK2JZRoCD
|
|
544
544
|
streamlit/web/server/stats_request_handler.py,sha256=e144zIhzLTB1PN4CwTCxElCoWMuo9IsBEPex2exHCQ0,3641
|
545
545
|
streamlit/web/server/upload_file_request_handler.py,sha256=ftyKpARrUjOpRcFETIXuoTyOG_mo-ToOw5NI0y_W4lE,5003
|
546
546
|
streamlit/web/server/websocket_headers.py,sha256=uUxypj04ondEC4ocBiYCndX_N06Zwe1Mt690Vupe08Y,2232
|
547
|
-
streamlit_nightly-1.39.1.
|
548
|
-
streamlit_nightly-1.39.1.
|
549
|
-
streamlit_nightly-1.39.1.
|
550
|
-
streamlit_nightly-1.39.1.
|
551
|
-
streamlit_nightly-1.39.1.
|
552
|
-
streamlit_nightly-1.39.1.
|
547
|
+
streamlit_nightly-1.39.1.dev20241002.data/scripts/streamlit.cmd,sha256=ZEYM3vBJSp-k7vwSJ3ba5NzEk9-qHdSeLvGYAAe1mMw,676
|
548
|
+
streamlit_nightly-1.39.1.dev20241002.dist-info/METADATA,sha256=ahzRwYwl9uY9fLBxd9l-Tgn_BgXS5LccyNHJ0E-FbXs,8512
|
549
|
+
streamlit_nightly-1.39.1.dev20241002.dist-info/WHEEL,sha256=AHX6tWk3qWuce7vKLrj7lnulVHEdWoltgauo8bgCXgU,109
|
550
|
+
streamlit_nightly-1.39.1.dev20241002.dist-info/entry_points.txt,sha256=uNJ4DwGNXEhOK0USwSNanjkYyR-Bk7eYQbJFDrWyOgY,53
|
551
|
+
streamlit_nightly-1.39.1.dev20241002.dist-info/top_level.txt,sha256=V3FhKbm7G2LnR0s4SytavrjIPNIhvcsAGXfYHAwtQzw,10
|
552
|
+
streamlit_nightly-1.39.1.dev20241002.dist-info/RECORD,,
|
@@ -1,5 +0,0 @@
|
|
1
|
-
"use strict";(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[1086],{68035:(e,t,r)=>{r.d(t,{A:()=>c});r(58878);var n=r(25571),o=r(78286),i=r(89653);const a=r(60667).i7`
|
2
|
-
50% {
|
3
|
-
color: rgba(0, 0, 0, 0);
|
4
|
-
}
|
5
|
-
`,s=(0,i.A)("span",{target:"edlqvik0"})((e=>{let{includeDot:t,shouldBlink:r,theme:n}=e;return{...t?{"&::before":{opacity:1,content:'"\u2022"',animation:"none",color:n.colors.gray,margin:"0 5px"}}:{},...r?{color:n.colors.red,animationName:`${a}`,animationDuration:"0.5s",animationIterationCount:5}:{}}}),"");var l=r(90782);const c=e=>{let{dirty:t,value:r,inForm:i,maxLength:a,className:c,type:u="single",allowEnterToSubmit:d=!0}=e;const p=[],f=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];p.push((0,l.jsx)(s,{includeDot:p.length>0,shouldBlink:t,children:e},p.length))};if(t&&d){const e=i?"submit form":"apply";if("multiline"===u){f(`Press ${(0,n.u_)()?"\u2318":"Ctrl"}+Enter to ${e}`)}else"single"===u&&f(`Press Enter to ${e}`)}return a&&("chat"!==u||t)&&f(`${r.length}/${a}`,t&&r.length>=a),(0,l.jsx)(o.tp,{"data-testid":"InputInstructions",className:c,children:p})}},1086:(e,t,r)=>{r.r(t),r.d(t,{default:()=>v});var n=r(58878),o=r(8151),i=r(68102),a=r(68622),s=n.forwardRef((function(e,t){return n.createElement(a.I,(0,i.A)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),n.createElement("rect",{width:24,height:24,fill:"none"}),n.createElement("path",{d:"M3 5.51v3.71c0 .46.31.86.76.97L11 12l-7.24 1.81c-.45.11-.76.51-.76.97v3.71c0 .72.73 1.2 1.39.92l15.42-6.49c.82-.34.82-1.5 0-1.84L4.39 4.58C3.73 4.31 3 4.79 3 5.51z"}))}));s.displayName="Send";var l=r(94928),c=r(64611),u=r(68035),d=r(58144),p=r(89653);const f=(0,p.A)("div",{target:"e1d2x3se4"})((e=>{var t;let{theme:r,width:n}=e;return{borderRadius:r.radii.default,display:"flex",backgroundColor:null!==(t=r.colors.widgetBackgroundColor)&&void 0!==t?t:r.colors.secondaryBg,width:`${n}px`}}),""),h=(0,p.A)("div",{target:"e1d2x3se3"})((e=>{let{theme:t}=e;return{backgroundColor:t.colors.transparent,position:"relative",flexGrow:1,borderRadius:t.radii.default,display:"flex",alignItems:"center"}}),""),y=(0,p.A)("button",{target:"e1d2x3se2"})((e=>{let{theme:t,disabled:r,extended:n}=e;const o=(0,d.iq)(t),[i,a]=o?[t.colors.gray60,t.colors.gray80]:[t.colors.gray80,t.colors.gray40];return{border:"none",backgroundColor:t.colors.transparent,borderTopRightRadius:n?t.radii.none:t.radii.default,borderTopLeftRadius:n?t.radii.default:t.radii.none,borderBottomRightRadius:t.radii.default,display:"inline-flex",alignItems:"center",justifyContent:"center",lineHeight:t.lineHeights.none,margin:t.spacing.none,padding:t.spacing.sm,color:r?i:a,pointerEvents:"auto","&:focus":{outline:"none"},":focus":{outline:"none"},"&:focus-visible":{backgroundColor:o?t.colors.gray10:t.colors.gray90},"&:hover":{backgroundColor:t.colors.primary,color:t.colors.white},"&:disabled, &:disabled:hover, &:disabled:active":{backgroundColor:t.colors.transparent,borderColor:t.colors.transparent,color:t.colors.gray}}}),""),g=(0,p.A)("div",{target:"e1d2x3se1"})((()=>({display:"flex",alignItems:"flex-end",height:"100%",position:"absolute",right:"0px",pointerEvents:"none"})),""),b=(0,p.A)("div",{target:"e1d2x3se0"})({name:"1lm6gnd",styles:"position:absolute;bottom:0px;right:3rem"});var m=r(90782);const v=function(e){let{width:t,element:r,widgetMgr:i,fragmentId:a}=e;const p=(0,o.u)(),[v,x]=(0,n.useState)(!1),[w,O]=(0,n.useState)(r.default),[j,C]=(0,n.useState)(0),S=(0,n.useRef)(null),A=(0,n.useRef)({minHeight:0,maxHeight:0}),k=()=>{S.current&&S.current.focus(),w&&(i.setStringTriggerValue(r,w,{fromUi:!0},a),x(!1),O(""),C(0))};(0,n.useEffect)((()=>{if(r.setValue){r.setValue=!1;const e=r.value||"";O(e),x(""!==e)}}),[r]),(0,n.useEffect)((()=>{if(S.current){const{offsetHeight:e}=S.current;A.current.minHeight=e,A.current.maxHeight=6.5*e}}),[S]);const{disabled:P,placeholder:R,maxChars:E}=r,I=(0,d.iq)(p),{minHeight:$,maxHeight:T}=A.current,B=I?p.colors.gray70:p.colors.gray80,z=!!(j>0&&S.current)&&Math.abs(j-$)>1;return(0,m.jsx)(f,{className:"stChatInput","data-testid":"stChatInput",width:t,children:(0,m.jsxs)(h,{children:[(0,m.jsx)(l.A,{inputRef:S,value:w,placeholder:R,onChange:e=>{const{value:t}=e.target,{maxChars:n}=r;0!==n&&t.length>n||(x(""!==t),O(t),C((()=>{let e=0;const{current:t}=S;if(t){const r=t.placeholder;t.placeholder="",t.style.height="auto",e=t.scrollHeight,t.placeholder=r,t.style.height=""}return e})()))},onKeyDown:e=>{const{metaKey:t,ctrlKey:r,shiftKey:n}=e;(e=>{var t;const{keyCode:r,key:n}=e;return("Enter"===n||13===r||10===r)&&!(!0===(null===(t=e.nativeEvent)||void 0===t?void 0:t.isComposing))})(e)&&!n&&!r&&!t&&(e.preventDefault(),k())},"aria-label":R,disabled:P,rows:1,overrides:{Root:{style:{minHeight:p.sizes.minElementHeight,outline:"none",backgroundColor:p.colors.transparent,borderLeftWidth:p.sizes.borderWidth,borderRightWidth:p.sizes.borderWidth,borderTopWidth:p.sizes.borderWidth,borderBottomWidth:p.sizes.borderWidth,width:`${t}px`}},InputContainer:{style:{backgroundColor:p.colors.transparent}},Input:{props:{"data-testid":"stChatInputTextArea"},style:{lineHeight:p.lineHeights.inputWidget,backgroundColor:p.colors.transparent,"::placeholder":{color:B},height:z?`${j+1}px`:"auto",maxHeight:T?`${T}px`:"none",paddingRight:"3rem",paddingLeft:p.spacing.sm,paddingBottom:p.spacing.sm,paddingTop:p.spacing.sm}}}}),t>p.breakpoints.hideWidgetDetails&&(0,m.jsx)(b,{children:(0,m.jsx)(u.A,{dirty:v,value:w,maxLength:E,type:"chat",inForm:!1})}),(0,m.jsx)(g,{children:(0,m.jsx)(y,{onClick:k,disabled:!v||P,extended:z,"data-testid":"stChatInputSubmitButton",children:(0,m.jsx)(c.A,{content:s,size:"xl",color:"inherit"})})})]})})}},94928:(e,t,r)=>{r.d(t,{A:()=>A});var n=r(58878),o=r(35331),i=r(18648),a=r(92850),s=r(57224),l=r(81301);function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?c(Object(r),!0).forEach((function(t){d(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function d(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var p=(0,s.I4)("div",(function(e){return u(u({},(0,l.vt)(u(u({$positive:!1},e),{},{$hasIconTrailing:!1}))),{},{width:e.$resize?"fit-content":"100%"})}));p.displayName="StyledTextAreaRoot",p.displayName="StyledTextAreaRoot";var f=(0,s.I4)("div",(function(e){return(0,l.EO)(u({$positive:!1},e))}));f.displayName="StyledTextareaContainer",f.displayName="StyledTextareaContainer";var h=(0,s.I4)("textarea",(function(e){return u(u({},(0,l.n)(e)),{},{resize:e.$resize||"none"})}));function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}function g(){return g=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},g.apply(this,arguments)}function b(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(l){s=!0,o=l}finally{try{a||null==r.return||r.return()}finally{if(s)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return m(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return m(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function v(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function x(e,t){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},x(e,t)}function w(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=j(e);if(t){var o=j(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===y(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return O(e)}(this,r)}}function O(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function j(e){return j=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},j(e)}function C(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}h.displayName="StyledTextarea",h.displayName="StyledTextarea";var S=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&x(e,t)}(c,e);var t,r,s,l=w(c);function c(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return C(O(e=l.call.apply(l,[this].concat(r))),"state",{isFocused:e.props.autoFocus||!1}),C(O(e),"onFocus",(function(t){e.setState({isFocused:!0}),e.props.onFocus(t)})),C(O(e),"onBlur",(function(t){e.setState({isFocused:!1}),e.props.onBlur(t)})),e}return t=c,(r=[{key:"render",value:function(){var e=this.props.overrides,t=void 0===e?{}:e,r=b((0,o._O)(t.Root,p),2),s=r[0],l=r[1],c=(0,o.Qp)({Input:{component:h},InputContainer:{component:f}},t);return n.createElement(s,g({"data-baseweb":"textarea",$isFocused:this.state.isFocused,$isReadOnly:this.props.readOnly,$disabled:this.props.disabled,$error:this.props.error,$positive:this.props.positive,$required:this.props.required,$resize:this.props.resize},l),n.createElement(i.A,g({},this.props,{type:a.GT.textarea,overrides:c,onFocus:this.onFocus,onBlur:this.onBlur,resize:this.props.resize})))}}])&&v(t.prototype,r),s&&v(t,s),Object.defineProperty(t,"prototype",{writable:!1}),c}(n.Component);C(S,"defaultProps",{autoFocus:!1,disabled:!1,readOnly:!1,error:!1,name:"",onBlur:function(){},onChange:function(){},onKeyDown:function(){},onKeyPress:function(){},onKeyUp:function(){},onFocus:function(){},overrides:{},placeholder:"",required:!1,rows:3,size:a.SK.default});const A=S}}]);
|
@@ -1,5 +0,0 @@
|
|
1
|
-
(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[1260],{68035:(t,e,r)=>{"use strict";r.d(e,{A:()=>u});r(58878);var n=r(25571),o=r(78286),i=r(89653);const s=r(60667).i7`
|
2
|
-
50% {
|
3
|
-
color: rgba(0, 0, 0, 0);
|
4
|
-
}
|
5
|
-
`,a=(0,i.A)("span",{target:"edlqvik0"})((t=>{let{includeDot:e,shouldBlink:r,theme:n}=t;return{...e?{"&::before":{opacity:1,content:'"\u2022"',animation:"none",color:n.colors.gray,margin:"0 5px"}}:{},...r?{color:n.colors.red,animationName:`${s}`,animationDuration:"0.5s",animationIterationCount:5}:{}}}),"");var l=r(90782);const u=t=>{let{dirty:e,value:r,inForm:i,maxLength:s,className:u,type:c="single",allowEnterToSubmit:d=!0}=t;const p=[],h=function(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];p.push((0,l.jsx)(a,{includeDot:p.length>0,shouldBlink:e,children:t},p.length))};if(e&&d){const t=i?"submit form":"apply";if("multiline"===c){h(`Press ${(0,n.u_)()?"\u2318":"Ctrl"}+Enter to ${t}`)}else"single"===c&&h(`Press Enter to ${t}`)}return s&&("chat"!==c||e)&&h(`${r.length}/${s}`,e&&r.length>=s),(0,l.jsx)(o.tp,{"data-testid":"InputInstructions",className:u,children:p})}},34752:(t,e,r)=>{"use strict";r.d(e,{X:()=>s,o:()=>i});var n=r(58878),o=r(25571);class i{constructor(){this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}manageFormClearListener(t,e,r){(0,o.se)(this.formClearListener)&&this.lastWidgetMgr===t&&this.lastFormId===e||(this.disconnect(),(0,o._L)(e)&&(this.formClearListener=t.addFormClearedListener(e,r),this.lastWidgetMgr=t,this.lastFormId=e))}disconnect(){var t;null===(t=this.formClearListener)||void 0===t||t.disconnect(),this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}}function s(t){let{element:e,widgetMgr:r,onFormCleared:i}=t;(0,n.useEffect)((()=>{if(!(0,o._L)(e.formId))return;const t=r.addFormClearedListener(e.formId,i);return()=>{t.disconnect()}}),[e,r,i])}},81260:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>v});var n=r(58878),o=r(32698),i=r.n(o),s=r(59095),a=r(8151),l=r(29669),u=r(34752),c=r(68035),d=r(70474),p=r(78286),h=r(93480),f=r(997),m=r(25571);const y=(0,r(89653).A)("div",{target:"e11y4ecf0"})((t=>{let{width:e}=t;return{position:"relative",width:e}}),"");var b=r(90782);class g extends n.PureComponent{constructor(t){var e;super(t),e=this,this.formClearHelper=new u.o,this.id=void 0,this.state={dirty:!1,value:this.initialValue},this.commitWidgetValue=function(t){let r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const{widgetMgr:n,element:o,fragmentId:i}=e.props;n.setStringValue(o,e.state.value,t,i),r&&e.setState({dirty:!1})},this.onFormCleared=()=>{this.setState(((t,e)=>{var r;return{value:null!==(r=e.element.default)&&void 0!==r?r:null}}),(()=>this.commitWidgetValue({fromUi:!0})))},this.onBlur=()=>{this.state.dirty&&this.commitWidgetValue({fromUi:!0})},this.onChange=t=>{const{value:e}=t.target,{element:r}=this.props,{maxChars:n}=r;0!==n&&e.length>n||((0,m.Ml)(this.props.element)?this.setState({dirty:!0,value:e},(()=>{this.commitWidgetValue({fromUi:!0},!1)})):this.setState({dirty:!0,value:e}))},this.onKeyPress=t=>{const{element:e,widgetMgr:r,fragmentId:n}=this.props,{formId:o}=e,i=r.allowFormEnterToSubmit(o);"Enter"===t.key&&(this.state.dirty&&this.commitWidgetValue({fromUi:!0}),i&&r.submitForm(o,n))},this.id=i()("text_input_")}get initialValue(){var t;const e=this.props.widgetMgr.getStringValue(this.props.element);return null!==(t=null!==e&&void 0!==e?e:this.props.element.default)&&void 0!==t?t:null}componentDidMount(){this.props.element.setValue?this.updateFromProtobuf():this.commitWidgetValue({fromUi:!1})}componentDidUpdate(){this.maybeUpdateFromProtobuf()}componentWillUnmount(){this.formClearHelper.disconnect()}maybeUpdateFromProtobuf(){const{setValue:t}=this.props.element;t&&this.updateFromProtobuf()}updateFromProtobuf(){const{value:t}=this.props.element;this.props.element.setValue=!1,this.setState({value:null!==t&&void 0!==t?t:null},(()=>{this.commitWidgetValue({fromUi:!1})}))}getTypeString(){return this.props.element.type===l.ks.Type.PASSWORD?"password":"text"}render(){var t;const{dirty:e,value:r}=this.state,{element:n,width:o,disabled:i,widgetMgr:a,theme:l}=this.props,{placeholder:u,formId:g}=n,v=a.allowFormEnterToSubmit(g)||!(0,m.Ml)({formId:g});return this.formClearHelper.manageFormClearListener(a,g,this.onFormCleared),(0,b.jsxs)(y,{className:"stTextInput","data-testid":"stTextInput",width:o,children:[(0,b.jsx)(d.L,{label:n.label,disabled:i,labelVisibility:(0,m.yv)(null===(t=n.labelVisibility)||void 0===t?void 0:t.value),htmlFor:this.id,children:n.help&&(0,b.jsx)(p.j,{children:(0,b.jsx)(h.A,{content:n.help,placement:f.W.TOP_RIGHT})})}),(0,b.jsx)(s.A,{value:null!==r&&void 0!==r?r:"",placeholder:u,onBlur:this.onBlur,onChange:this.onChange,onKeyPress:this.onKeyPress,"aria-label":n.label,disabled:i,id:this.id,type:this.getTypeString(),autoComplete:n.autocomplete,overrides:{Input:{style:{minWidth:0,"::placeholder":{opacity:"0.7"},lineHeight:l.lineHeights.inputWidget,paddingRight:l.spacing.sm,paddingLeft:l.spacing.sm,paddingBottom:l.spacing.sm,paddingTop:l.spacing.sm}},Root:{props:{"data-testid":"stTextInputRootElement"},style:{height:l.sizes.minElementHeight,borderLeftWidth:l.sizes.borderWidth,borderRightWidth:l.sizes.borderWidth,borderTopWidth:l.sizes.borderWidth,borderBottomWidth:l.sizes.borderWidth}}}}),o>l.breakpoints.hideWidgetDetails&&(0,b.jsx)(c.A,{dirty:e,value:null!==r&&void 0!==r?r:"",maxLength:n.maxChars,inForm:(0,m.Ml)({formId:g}),allowEnterToSubmit:v})]})}}const v=(0,a.b)(g)},59095:(t,e,r)=>{"use strict";r.d(e,{A:()=>F});var n=r(58878),o=r(35331),i=r(4842),s=r(18648),a=r(81301),l=r(92850);function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}var c=["Root","StartEnhancer","EndEnhancer"],d=["startEnhancer","endEnhancer","overrides"];function p(){return p=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},p.apply(this,arguments)}function h(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],s=!0,a=!1;try{for(r=r.call(t);!(s=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);s=!0);}catch(l){a=!0,o=l}finally{try{s||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return f(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return f(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function m(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function y(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function b(t,e){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},b(t,e)}function g(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=w(t);if(e){var o=w(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(t,e){if(e&&("object"===u(e)||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return v(t)}(this,r)}}function v(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function w(t){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},w(t)}function O(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var j=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&b(t,e)}(w,t);var e,r,u,f=g(w);function w(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,w);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return O(v(t=f.call.apply(f,[this].concat(r))),"state",{isFocused:t.props.autoFocus||!1}),O(v(t),"onFocus",(function(e){t.setState({isFocused:!0}),t.props.onFocus(e)})),O(v(t),"onBlur",(function(e){t.setState({isFocused:!1}),t.props.onBlur(e)})),t}return e=w,(r=[{key:"render",value:function(){var t=this.props,e=t.startEnhancer,r=t.endEnhancer,u=t.overrides,f=u.Root,y=u.StartEnhancer,b=u.EndEnhancer,g=m(u,c),v=m(t,d),w=h((0,o._O)(f,a.bL),2),O=w[0],j=w[1],F=h((0,o._O)(y,a.P2),2),C=F[0],P=F[1],x=h((0,o._O)(b,a.P2),2),I=x[0],W=x[1],_=(0,i.e)(this.props,this.state);return n.createElement(O,p({"data-baseweb":"input"},_,j,{$adjoined:S(e,r),$hasIconTrailing:this.props.clearable||"password"==this.props.type}),E(e)&&n.createElement(C,p({},_,P,{$position:l.vN.start}),"function"===typeof e?e(_):e),n.createElement(s.A,p({},v,{overrides:g,adjoined:S(e,r),onFocus:this.onFocus,onBlur:this.onBlur})),E(r)&&n.createElement(I,p({},_,W,{$position:l.vN.end}),"function"===typeof r?r(_):r))}}])&&y(e.prototype,r),u&&y(e,u),Object.defineProperty(e,"prototype",{writable:!1}),w}(n.Component);function S(t,e){return E(t)&&E(e)?l.fb.both:E(t)?l.fb.left:E(e)?l.fb.right:l.fb.none}function E(t){return Boolean(t||0===t)}O(j,"defaultProps",{autoComplete:"on",autoFocus:!1,disabled:!1,name:"",onBlur:function(){},onFocus:function(){},overrides:{},required:!1,size:l.SK.default,startEnhancer:null,endEnhancer:null,clearable:!1,type:"text",readOnly:!1});const F=j},32698:(t,e,r)=>{var n=r(30136),o=0;t.exports=function(t){var e=++o;return n(t)+e}}}]);
|
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[1780],{85850:(e,t,r)=>{r.d(t,{K:()=>y,A:()=>b});r(58878);var n=r(8151),i=r(12274),o=r(63186),a=r(34914),l=r(997),s=r(36459),d=r(84720),c=r(64611),u=r(89653),g=r(58144);const p="-2.4rem",h=(0,u.A)("div",{target:"e2wxzia1"})((e=>{let{theme:t,locked:r,target:n}=e;return{padding:`${t.spacing.sm} 0 ${t.spacing.sm} ${t.spacing.sm}`,position:"absolute",top:r?p:"-1rem",right:t.spacing.none,transition:"none",...!r&&{opacity:0,"&:active, &:focus-visible, &:hover":{transition:"opacity 150ms 100ms, top 100ms 100ms",opacity:1,top:p},...n&&{[`${n}:hover &, ${n}:active &, ${n}:focus-visible &`]:{transition:"opacity 150ms 100ms, top 100ms 100ms",opacity:1,top:p}}}}}),""),f=(0,u.A)("div",{target:"e2wxzia0"})((e=>{let{theme:t}=e;return{color:(0,g.iq)(t)?t.colors.fadedText60:t.colors.bodyText,display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-end",boxShadow:"1px 2px 8px rgba(0, 0, 0, 0.08)",borderRadius:t.radii.default,backgroundColor:t.colors.lightenedBg05,width:"fit-content",zIndex:t.zIndices.sidebar+1}}),"");var m=r(90782);function y(e){let{label:t,show_label:r,icon:i,onClick:o}=e;const u=(0,n.u)(),g=r?t:"";return(0,m.jsx)("div",{"data-testid":"stElementToolbarButton",children:(0,m.jsx)(l.A,{content:(0,m.jsx)(a.Ay,{source:t,allowHTML:!1,style:{fontSize:u.fontSizes.sm}}),placement:l.W.TOP,onMouseEnterDelay:1e3,inline:!0,children:(0,m.jsxs)(s.Ay,{onClick:e=>{o&&o(),e.stopPropagation()},kind:d.KX.ELEMENT_TOOLBAR,"aria-label":t,children:[i&&(0,m.jsx)(c.A,{content:i,size:"md",testid:"stElementToolbarButtonIcon"}),g&&(0,m.jsx)("span",{children:g})]})})})}const b=e=>{let{onExpand:t,onCollapse:r,isFullScreen:n,locked:a,children:l,target:s,disableFullscreenMode:d}=e;return(0,m.jsx)(h,{className:"stElementToolbar","data-testid":"stElementToolbar",locked:a||n,target:s,children:(0,m.jsxs)(f,{children:[l,t&&!d&&!n&&(0,m.jsx)(y,{label:"Fullscreen",icon:i.g,onClick:()=>t()}),r&&!d&&n&&(0,m.jsx)(y,{label:"Close fullscreen",icon:o.Q,onClick:()=>r()})]})})}},81780:(e,t,r)=>{r.r(t),r.d(t,{default:()=>pe});var n=r(58878),i=r(8151),o=r(19613),a=r(56146),l=r(95241),s=r(71034),d=r.n(s),c=r(34752),u=r(85850),g=r(25571),p=r(58144),h=r(50609),f=r.n(h),m=r(29669),y=r(67253);var b=r(93480),x=r(997),v=r(70474),C=r(35526);const w=e=>{var t;let{widgetMgr:r,id:i,key:o,defaultValue:a}=e;(0,n.useEffect)((()=>{const e=r.getElementState(i,o);(0,g.hX)(e)&&(0,g.se)(a)&&r.setElementState(i,o,a)}),[r,i,o,a]);const[l,s]=(0,n.useState)(null!==(t=r.getElementState(i,o))&&void 0!==t?t:a);return[l,(0,n.useCallback)((e=>{r.setElementState(i,o,e),s(e)}),[r,i,o])]};var j=r(89653),k=r(37888);const A=(0,j.A)("div",{target:"e12wn80j15"})(""),S=(0,j.A)("div",{target:"e12wn80j14"})((e=>{let{theme:t}=e;return{height:t.sizes.largestElementHeight,width:"100%",background:t.genericColors.secondaryBg,borderRadius:t.radii.default,marginBottom:t.spacing.twoXS,display:"flex",alignItems:"center",position:"relative",paddingLeft:t.spacing.xs,paddingRight:t.spacing.sm}}),""),I=(0,j.A)("div",{target:"e12wn80j13"})({name:"82a6rk",styles:"flex:1"}),U=(0,j.A)("div",{target:"e12wn80j12"})((e=>{let{show:t}=e;return{display:t?"block":"none"}}),""),R=(0,j.A)("span",{target:"e12wn80j11"})((e=>{let{theme:t,isPlayingOrRecording:r}=e;return{margin:t.spacing.sm,fontFamily:t.fonts.monospace,color:r?t.genericColors.bodyText:t.colors.fadedText60,backgroundColor:t.genericColors.secondaryBg,fontSize:t.fontSizes.sm}}),""),L=(0,j.A)("div",{target:"e12wn80j10"})((()=>({width:"100%",textAlign:"center",overflow:"hidden"})),""),E=(0,j.A)("span",{target:"e12wn80j9"})((e=>{let{theme:t}=e;return{color:t.colors.bodyText}}),""),F=(0,j.A)("a",{target:"e12wn80j8"})(""),T=(0,j.A)("div",{target:"e12wn80j7"})((e=>{let{theme:t}=e;return{height:t.sizes.largestElementHeight,display:"flex",justifyContent:"center",alignItems:"center"}}),""),M=(0,j.A)("div",{target:"e12wn80j6"})((e=>{let{theme:t}=e;return{height:10,opacity:.2,width:"100%",backgroundImage:`radial-gradient(${t.colors.fadedText10} 40%, transparent 40%)`,backgroundSize:"10px 10px",backgroundRepeat:"repeat"}}),""),P=(0,j.A)("span",{target:"e12wn80j5"})((e=>{let{theme:t}=e;return{"& > button":{color:t.colors.primary,padding:t.spacing.threeXS},"& > button:hover, & > button:focus":{color:t.colors.red}}}),""),W=(0,j.A)("span",{target:"e12wn80j4"})((e=>{let{theme:t}=e;return{"& > button":{padding:t.spacing.threeXS,color:t.colors.fadedText40},"& > button:hover, & > button:focus":{color:t.colors.primary}}}),""),z=(0,j.A)("span",{target:"e12wn80j3"})((e=>{let{theme:t}=e;return{"& > button":{padding:t.spacing.threeXS,color:t.colors.fadedText60},"& > button:hover, & > button:focus":{color:t.colors.bodyText}}}),""),B=(0,j.A)("div",{target:"e12wn80j2"})((e=>{let{theme:t}=e;return{display:"flex",justifyContent:"center",alignItems:"center",flexGrow:0,flexShrink:1,padding:t.spacing.xs,gap:t.spacing.twoXS,marginRight:t.spacing.twoXS}}),""),O=(0,j.A)("div",{target:"e12wn80j1"})((e=>{let{theme:t}=e;return{marginLeft:t.spacing.sm}}),""),X=(0,j.A)(k.x,{target:"e12wn80j0"})((e=>{let{theme:t}=e;return{fontSize:t.fontSizes.sm,width:"1.375rem",height:"1.375rem",borderWidth:"3px",radius:t.radii.md,justifyContents:"center",padding:t.spacing.none,margin:t.spacing.none,borderColor:t.colors.borderColor,borderTopColor:t.colors.primary,flexGrow:0,flexShrink:0}}),"");var D=r(39095),V=r(90782);const $=()=>(0,V.jsxs)(L,{children:[(0,V.jsx)(E,{children:"This app would like to use your microphone."})," ",(0,V.jsx)(F,{href:D.ML,children:"Learn how to allow access."})]}),_=()=>(0,V.jsx)(T,{children:(0,V.jsx)(M,{})}),H="00:00",N=e=>new Date(e).toLocaleTimeString(void 0,{minute:"2-digit",second:"2-digit"});var G=r(96626),K=r(34783),q=r(37789),Z=r(14757),Q=r(88685),Y=r(36459),J=r(84720),ee=r(64611);const te=e=>{let{onClick:t,disabled:r,ariaLabel:n,iconContent:i}=e;return(0,V.jsx)(Y.Ay,{kind:J.KX.BORDERLESS_ICON,onClick:t,disabled:r,"aria-label":n,fluidWidth:!0,"data-testid":"stAudioInputActionButton",children:(0,V.jsx)(ee.A,{content:i,size:"lg",color:"inherit"})})},re=e=>{let{disabled:t,stopRecording:r}=e;return(0,V.jsx)(P,{children:(0,V.jsx)(te,{onClick:r,disabled:t,ariaLabel:"Stop recording",iconContent:K.X})})},ne=e=>{let{disabled:t,isPlaying:r,onClickPlayPause:n}=e;return(0,V.jsx)(z,{children:r?(0,V.jsx)(te,{onClick:n,disabled:t,ariaLabel:"Pause",iconContent:q.v}):(0,V.jsx)(te,{onClick:n,disabled:t,ariaLabel:"Play",iconContent:Z.S})})},ie=e=>{let{disabled:t,startRecording:r}=e;return(0,V.jsx)(W,{children:(0,V.jsx)(te,{onClick:r,disabled:t,ariaLabel:"Record",iconContent:G.G})})},oe=e=>{let{onClick:t}=e;return(0,V.jsx)(z,{children:(0,V.jsx)(te,{disabled:!1,onClick:t,ariaLabel:"Reset",iconContent:Q.C})})},ae=e=>{let{disabled:t,isRecording:r,isPlaying:n,isUploading:i,isError:o,recordingUrlExists:a,startRecording:l,stopRecording:s,onClickPlayPause:d,onClear:c}=e;return o?(0,V.jsx)(B,{children:(0,V.jsx)(oe,{onClick:c})}):i?(0,V.jsx)(B,{children:(0,V.jsx)(X,{"aria-label":"Uploading"})}):(0,V.jsxs)(B,{children:[r?(0,V.jsx)(re,{disabled:t,stopRecording:s}):(0,V.jsx)(ie,{disabled:t,startRecording:l}),a&&(0,V.jsx)(ne,{disabled:t,isPlaying:n,onClickPlayPause:d})]})},le=(0,n.memo)(ae);var se=r(84996);function de(e,t,r){for(let n=0;n<r.length;n++,t+=2){const i=Math.max(-1,Math.min(1,r[n]));e.setInt16(t,i<0?32768*i:32767*i,!0)}}const ce=async function(e){const t=new window.AudioContext,r=await e.arrayBuffer();let n;try{n=await t.decodeAudioData(r)}catch(u){return void(0,se.vV)(u)}const i=n.numberOfChannels,o=n.sampleRate,a=n.length*i*2+44,l=new ArrayBuffer(a),s=new DataView(l),d={0:{type:"string",value:"RIFF"},4:{type:"uint32",value:36+2*n.length*i},8:{type:"string",value:"WAVE"},12:{type:"string",value:"fmt "},16:{type:"uint32",value:16},20:{type:"uint16",value:1},22:{type:"uint16",value:i},24:{type:"uint32",value:o},28:{type:"uint32",value:o*i*2},32:{type:"uint16",value:2*i},34:{type:"uint16",value:16},36:{type:"string",value:"data"},40:{type:"uint32",value:n.length*i*2}};Object.entries(d).forEach((e=>{let[t,{type:r,value:n}]=e;const i=parseInt(t,10);"string"===r?function(e,t,r){for(let n=0;n<r.length;n++)e.setUint8(t+n,r.charCodeAt(n))}(s,i,n):"uint32"===r?s.setUint32(i,n,!0):"uint16"===r&&s.setUint16(i,n,!0)}));for(let g=0;g<i;g++)de(s,44+g*n.length*2,n.getChannelData(g));const c=new Uint8Array(l);return new Blob([c],{type:"audio/wav"})},ue=()=>(0,V.jsx)(L,{children:(0,V.jsx)(E,{children:"An error has occurred, please try again."})}),ge=e=>{var t;let{element:r,uploadClient:s,widgetMgr:h,fragmentId:j,disabled:k}=e;const L=(0,i.u)(),E=(0,C.Z)(L),[F,T]=(0,n.useState)(null),M=n.useRef(null),[P,W]=w({widgetMgr:h,id:r.id,key:"deleteFileUrl"}),[z,B]=(0,n.useState)(null),[X,D]=(0,n.useState)([]),[G,K]=(0,n.useState)(null),[q,Z]=w({widgetMgr:h,id:r.id,key:"recordingUrl"}),[,Q]=(0,n.useState)(0),Y=()=>{Q((e=>e+1))},[J,ee]=(0,n.useState)(H),[te,re]=w({widgetMgr:h,id:r.id,key:"recordingTime",defaultValue:H}),[ne,ie]=(0,n.useState)(!1),[oe,ae]=(0,n.useState)(!1),[se,de]=(0,n.useState)(!1),[ge,pe]=(0,n.useState)(!1),[he,fe]=(0,n.useState)(!1),me=r.id,ye=r.formId,be=(0,n.useCallback)((async e=>{let t;if(pe(!0),(0,g.se)(ye)&&h.setFormsWithUploadsInProgress(new Set([ye])),t="audio/wav"===e.type?e:await ce(e),!t)return void fe(!0);const r=URL.createObjectURL(t),n=new File([t],"audio.wav",{type:t.type});Z(r),(async e=>{let{files:t,uploadClient:r,widgetMgr:n,widgetInfo:i,fragmentId:o}=e,a=[];try{a=await r.fetchFileURLs(t)}catch(c){return{successfulUploads:[],failedUploads:t.map((e=>({file:e,error:(0,y.$)(c)})))}}const l=f()(t,a),s=[],d=[];return await Promise.all(l.map((async e=>{let[t,n]=e;if(!t||!n||!n.uploadUrl||!n.fileId)return{file:t,fileUrl:n,error:new Error("No upload URL found")};try{await r.uploadFile({id:n.fileId,formId:i.formId||""},n.uploadUrl,t),s.push({fileUrl:n,file:t})}catch(c){const r=(0,y.$)(c);d.push({file:t,error:r})}}))),n.setFileUploaderStateValue(i,new m.qX({uploadedFileInfo:s.map((e=>{let{file:t,fileUrl:r}=e;return new m.HY({fileId:r.fileId,fileUrls:r,name:t.name,size:t.size})}))}),{fromUi:!0},o),{successfulUploads:s,failedUploads:d}})({files:[n],uploadClient:s,widgetMgr:h,widgetInfo:{id:me,formId:ye},fragmentId:j}).then((e=>{let{successfulUploads:t,failedUploads:r}=e;if(r.length>0)return void fe(!0);const n=t[0];n&&n.fileUrl.deleteUrl&&W(n.fileUrl.deleteUrl)})).finally((()=>{(0,g.se)(ye)&&h.setFormsWithUploadsInProgress(new Set),pe(!1)}))}),[Z,s,h,me,ye,j,W]),xe=(0,n.useCallback)((e=>{let{updateWidgetManager:t}=e;(0,g.hX)(F)||(0,g.hX)(P)||(Z(null),F.empty(),s.deleteFile(P),ee(H),re(H),W(null),t&&h.setFileUploaderStateValue(r,{},{fromUi:!0},j),ie(!1),(0,g.se)(q)&&URL.revokeObjectURL(q))}),[P,q,s,F,r,h,j,re,Z,W]);(0,n.useEffect)((()=>{if((0,g.hX)(ye))return;const e=new c.o;return e.manageFormClearListener(h,ye,(()=>{xe({updateWidgetManager:!0})})),()=>e.disconnect()}),[ye,xe,h]);const ve=(0,n.useCallback)((()=>{if(null===M.current)return;const e=o.A.create({container:M.current,waveColor:q?(0,p.au)(L.colors.fadedText40,L.genericColors.secondaryBg):L.colors.primary,progressColor:L.colors.bodyText,height:parseFloat(getComputedStyle(document.documentElement).fontSize)*parseFloat(L.sizes.largestElementHeight.replace("rem",""))-8,barWidth:4,barGap:4,barRadius:8,cursorWidth:0,url:null!==q&&void 0!==q?q:void 0});e.on("timeupdate",(e=>{ee(N(1e3*e))})),e.on("pause",(()=>{Y()}));const t=e.registerPlugin(a.A.create({scrollingWaveform:!1,renderRecordedAudio:!0}));return t.on("record-end",(async e=>{be(e)})),t.on("record-progress",(e=>{re(N(e))})),T(e),B(t),()=>{e&&e.destroy(),t&&t.destroy()}}),[be]);(0,n.useEffect)((()=>ve()),[ve]),(0,n.useEffect)((()=>{d()(E,L)||null===F||void 0===F||F.setOptions({waveColor:q?(0,p.au)(L.colors.fadedText40,L.genericColors.secondaryBg):L.colors.primary,progressColor:L.colors.bodyText})}),[L,E,q,F]);const Ce=(0,n.useCallback)((()=>{F&&(F.playPause(),ie(!0),Y())}),[F]),we=(0,n.useCallback)((async()=>{let e=G;se||(await navigator.mediaDevices.getUserMedia({audio:!0}).then((()=>a.A.getAvailableAudioDevices().then((t=>{if(D(t),t.length>0){const{deviceId:r}=t[0];K(r),e=r}})))).catch((e=>{ae(!0)})),de(!0)),z&&e&&F&&(F.setOptions({waveColor:L.colors.primary}),q&&xe({updateWidgetManager:!1}),z.startRecording({deviceId:e}).then((()=>{Y()})))}),[G,z,L,F,q,xe,se]),je=(0,n.useCallback)((()=>{z&&(z.stopRecording(),null===F||void 0===F||F.setOptions({waveColor:(0,p.au)(L.colors.fadedText40,L.genericColors.secondaryBg)}))}),[z,F,L]),ke=Boolean(null===z||void 0===z?void 0:z.isRecording()),Ae=Boolean(null===F||void 0===F?void 0:F.isPlaying()),Se=ke||Ae,Ie=!ke&&!q&&!oe,Ue=oe||Ie||he,Re=k||oe;return(0,V.jsxs)(A,{className:"stAudioInput","data-testid":"stAudioInput",children:[(0,V.jsx)(v.L,{label:r.label,disabled:Re,labelVisibility:(0,g.yv)(null===(t=r.labelVisibility)||void 0===t?void 0:t.value),children:r.help&&(0,V.jsx)(O,{children:(0,V.jsx)(b.A,{content:r.help,placement:x.W.TOP})})}),(0,V.jsxs)(S,{children:[(0,V.jsx)(u.A,{isFullScreen:!1,disableFullscreenMode:!0,target:S,children:P&&(0,V.jsx)(u.K,{label:"Clear recording",icon:l.e,onClick:()=>xe({updateWidgetManager:!0}),"data-testid":"stAudioInputClearRecordingButton"})}),(0,V.jsx)(le,{isRecording:ke,isPlaying:Ae,isUploading:ge,isError:he,recordingUrlExists:Boolean(q),startRecording:we,stopRecording:je,onClickPlayPause:Ce,onClear:()=>{xe({updateWidgetManager:!1}),fe(!1)},disabled:Re}),(0,V.jsxs)(I,{children:[he&&(0,V.jsx)(ue,{}),Ie&&(0,V.jsx)(_,{}),oe&&(0,V.jsx)($,{}),(0,V.jsx)(U,{"data-testid":"stAudioInputWaveSurfer",ref:M,show:!Ue})]}),(0,V.jsx)(R,{isPlayingOrRecording:Se,"data-testid":"stAudioInputWaveformTimeCode",children:ne?J:te})]})]})},pe=(0,n.memo)(ge)},34752:(e,t,r)=>{r.d(t,{X:()=>a,o:()=>o});var n=r(58878),i=r(25571);class o{constructor(){this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}manageFormClearListener(e,t,r){(0,i.se)(this.formClearListener)&&this.lastWidgetMgr===e&&this.lastFormId===t||(this.disconnect(),(0,i._L)(t)&&(this.formClearListener=e.addFormClearedListener(t,r),this.lastWidgetMgr=e,this.lastFormId=t))}disconnect(){var e;null===(e=this.formClearListener)||void 0===e||e.disconnect(),this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}}function a(e){let{element:t,widgetMgr:r,onFormCleared:o}=e;(0,n.useEffect)((()=>{if(!(0,i._L)(t.formId))return;const e=r.addFormClearedListener(t.formId,o);return()=>{e.disconnect()}}),[t,r,o])}},35526:(e,t,r)=>{r.d(t,{Z:()=>i});var n=r(58878);const i=e=>{const t=(0,n.useRef)();return(0,n.useEffect)((()=>{t.current=e}),[e]),t.current}}}]);
|
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[3861],{53861:(e,t,o)=>{o.r(t),o.d(t,{default:()=>b});var i=o(58878),s=o(8151),r=o(59900),a=o(58144),n=o(34914),l=o(3257),d=o(75577),c=o(94426),p=o(89653);const g=(0,p.A)("button",{target:"elibz2u3"})((e=>{let{theme:t}=e;return{fontSize:t.fontSizes.sm,lineHeight:t.lineHeights.base,color:t.colors.fadedText60,backgroundColor:t.colors.transparent,border:"none",boxShadow:"none",padding:"0px","&:hover, &:active, &:focus":{border:"none",outline:"none",boxShadow:"none"},"&:hover":{color:t.colors.primary}}}),""),u=(0,p.A)("div",{target:"elibz2u2"})((e=>{let{theme:t}=e;return{display:"flex",flexDirection:"row",gap:t.spacing.lg,"> span":{marginTop:t.spacing.twoXS}}}),""),f=(0,p.A)("div",{target:"elibz2u0"})((e=>{let{theme:t}=e;return{display:"flex",flexDirection:"column",gap:t.spacing.sm,alignItems:"start",justifyContent:"center",overflow:"hidden",minHeight:"100%",fontSize:t.fontSizes.sm,lineHeight:t.lineHeights.base}}),"");var h=o(90782);const b=(0,s.b)((function(e){let{theme:t,body:o,icon:s,width:p}=e;const b=function(e){if(e.length>104){let t=e.replace(/^(.{104}[^\s]*).*/,"$1");return t.length>104&&(t=t.substring(0,104).split(" ").slice(0,-1).join(" ")),t.trim()}return e}(o),m=o!==b,[x,w]=(0,i.useState)(!m),[y,S]=(0,i.useState)(0),v=(0,i.useCallback)((()=>{w(!x)}),[x]),T=(0,i.useMemo)((()=>function(e){const t=(0,a.iq)(e);return{Body:{props:{"data-testid":"stToast",className:"stToast"},style:{display:"flex",flexDirection:"row",gap:e.spacing.md,width:e.sizes.toastWidth,marginTop:e.spacing.sm,borderTopLeftRadius:e.radii.default,borderTopRightRadius:e.radii.default,borderBottomLeftRadius:e.radii.default,borderBottomRightRadius:e.radii.default,paddingTop:e.spacing.lg,paddingBottom:e.spacing.lg,paddingLeft:e.spacing.twoXL,paddingRight:e.spacing.twoXL,backgroundColor:t?e.colors.gray10:e.colors.gray90,color:e.colors.bodyText,boxShadow:t?"0px 4px 16px rgba(0, 0, 0, 0.16)":"0px 4px 16px rgba(0, 0, 0, 0.7)"}},CloseIcon:{style:{color:e.colors.fadedText40,width:e.fontSizes.lg,height:e.fontSizes.lg,marginRight:`calc(-1 * ${e.spacing.lg} / 2)`,":hover":{color:e.colors.bodyText}}}}}(t)),[t]),z=(0,i.useMemo)((()=>(0,h.jsxs)(u,{expanded:x,children:[s&&(0,h.jsx)(c.$,{iconValue:s,size:"xl",testid:"stToastDynamicIcon"}),(0,h.jsxs)(f,{children:[(0,h.jsx)(n.Ay,{source:x?o:b,allowHTML:!1,isToast:!0}),m&&(0,h.jsx)(g,{"data-testid":"stToastViewButton",onClick:v,children:x?"view less":"view more"})]})]})),[m,x,o,s,b,v]);(0,i.useEffect)((()=>{if(t.inSidebar)return;const e=r.A.info(z,{overrides:{...T}});return S(e),()=>{r.A.update(e,{overrides:{Body:{style:{transitionDuration:0}}}}),r.A.clear(e)}}),[]),(0,i.useEffect)((()=>{r.A.update(y,{children:z,overrides:{...T}})}),[y,z,T]);const A=(0,h.jsx)(d.A,{kind:l.b.ERROR,body:"Streamlit API Error: `st.toast` cannot be called directly on the sidebar with `st.sidebar.toast`. See our `st.toast` API [docs](https://docs.streamlit.io/develop/api-reference/status/st.toast) for more information.",width:p});return(0,h.jsx)(h.Fragment,{children:t.inSidebar&&A})}))}}]);
|
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[4103],{3727:(e,t,s)=>{s.d(t,{A:()=>h,o:()=>c});var i=s(58878),r=s(8151),o=s(70766),a=s(35331),n=s(58144),l=s(84152),d=s(90782);let c;!function(e){e.EXTRASMALL="xs",e.SMALL="sm",e.MEDIUM="md",e.LARGE="lg",e.EXTRALARGE="xl"}(c||(c={}));const h=function(e){let{value:t,width:s,size:h=c.SMALL,overrides:u}=e;const g=(0,r.u)(),p={xs:g.spacing.twoXS,sm:g.spacing.sm,md:g.spacing.lg,lg:g.spacing.xl,xl:g.spacing.twoXL},{activeTheme:m}=i.useContext(l.n),f=!(0,n.tl)(m),S={BarContainer:{style:{marginTop:g.spacing.none,marginBottom:g.spacing.none,marginRight:g.spacing.none,marginLeft:g.spacing.none}},Bar:{style:e=>{let{$theme:t}=e;return{width:s?s.toString():void 0,marginTop:g.spacing.none,marginBottom:g.spacing.none,marginRight:g.spacing.none,marginLeft:g.spacing.none,height:p[h],backgroundColor:t.colors.progressbarTrackFill,borderTopLeftRadius:g.spacing.twoXS,borderTopRightRadius:g.spacing.twoXS,borderBottomLeftRadius:g.spacing.twoXS,borderBottomRightRadius:g.spacing.twoXS}}},BarProgress:{style:()=>({backgroundColor:f?g.colors.primary:g.colors.blue70,borderTopLeftRadius:g.spacing.twoXS,borderTopRightRadius:g.spacing.twoXS,borderBottomLeftRadius:g.spacing.twoXS,borderBottomRightRadius:g.spacing.twoXS})}};return(0,d.jsx)(o.A,{value:t,overrides:(0,a.Qp)(S,u)})}},54103:(e,t,s)=>{s.r(t),s.d(t,{default:()=>K});var i,r=s(58878),o=s(41766),a=s(32782),n=s(71034),l=s.n(n),d=s(29669),c=s(64611),h=s(997),u=s(93480),g=s(70474),p=s(78286),m=s(34752),f=s(84996),S=s(25571),C=s(9830),R=s(3727),b=s(89653),w=s(32735);function I(e,t){switch(e){case i.XSMALL:return{padding:`${t.spacing.twoXS} ${t.spacing.sm}`,fontSize:t.fontSizes.sm};case i.SMALL:return{padding:`${t.spacing.twoXS} ${t.spacing.md}`};case i.LARGE:return{padding:`${t.spacing.md} ${t.spacing.md}`};default:return{padding:`${t.spacing.xs} ${t.spacing.md}`}}}!function(e){e.XSMALL="xsmall",e.SMALL="small",e.MEDIUM="medium",e.LARGE="large"}(i||(i={}));const x=(0,b.A)("div",{target:"etz5kuj9"})((()=>({position:"relative",overflow:"hidden",width:"100%",objectFit:"contain"})),""),F=(0,b.A)("div",{target:"etz5kuj8"})((e=>{let{theme:t,width:s}=e;return{backgroundColor:t.colors.secondaryBg,borderRadius:`${t.radii.default} ${t.radii.default} 0 0`,width:"100%",height:9*s/16,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"}}),""),v=(0,b.A)("p",{target:"etz5kuj7"})((e=>{let{theme:t}=e;return{marginTop:t.spacing.sm,textAlign:"center"}}),""),M=(0,b.A)("img",{target:"etz5kuj6"})((e=>{let{theme:t,opacity:s}=e;return{borderRadius:`${t.radii.default} ${t.radii.default} 0 0`,objectFit:"contain",opacity:s}}),""),y=(0,b.A)("a",{target:"etz5kuj5"})((e=>{let{theme:t}=e;return{color:t.colors.primary,display:"block",textDecoration:"none"}}),""),L=(0,b.A)("span",{target:"etz5kuj4"})((()=>({display:"flex",alignItems:"center"})),""),E=(0,b.A)("div",{target:"etz5kuj3"})((e=>{let{theme:t}=e;return{position:"absolute",top:t.spacing.lg,right:t.spacing.lg,zIndex:1,color:t.colors.fadedText40,mixBlendMode:"difference",opacity:.6}}),""),j=(0,b.A)("div",{target:"etz5kuj1"})((()=>({height:"fit-content",width:"100%",position:"absolute",bottom:0})),""),T=(0,b.A)("button",{target:"etz5kuj0"})((e=>{let{theme:t}=e;return{position:"relative",display:"inline-flex",flexDirection:"column",alignItems:"center",justifyContent:"center",backgroundColor:t.colors.lightenedBg05,border:`${t.sizes.borderWidth} solid ${t.colors.borderColor}`,borderRadius:`0 0 ${t.radii.default} ${t.radii.default}`,"&:hover":{borderColor:t.colors.primary,color:t.colors.primary},"&:active":{color:t.colors.white,borderColor:t.colors.primary,backgroundColor:t.colors.primary},"&:focus:not(:active)":{borderColor:t.colors.primary,color:t.colors.primary},"&:disabled, &:disabled:hover, &:disabled:active":{color:t.colors.fadedText40},fontWeight:t.fontWeights.normal,padding:`${t.spacing.xs} ${t.spacing.md}`,margin:t.spacing.none,lineHeight:t.lineHeights.base,color:"inherit",width:"100%",userSelect:"none","&:focus":{outline:"none"},"&:focus-visible":{boxShadow:`0 0 0 0.2rem ${(0,w.No)(t.colors.primary,.5)}`},...I(i.MEDIUM,t)}}),"");var U=s(90782);const P=function(e){let{disabled:t,onClick:s,children:i,progress:r}=e;return(0,U.jsxs)(T,{disabled:t||!1,onClick:s||(()=>{}),progress:r||null,"data-testid":"stCameraInputButton",children:[i,r&&(0,U.jsx)(j,{children:(0,U.jsx)(R.A,{value:r,size:R.o.EXTRASMALL,overrides:{Bar:{style:{borderTopLeftRadius:"0px",borderTopRightRadius:"0px"}},BarProgress:{style:{borderTopLeftRadius:"0px",borderTopRightRadius:"0px"}},BarContainer:{style:{borderTopLeftRadius:"0px",borderTopRightRadius:"0px"}}}})})]})};var A=s(25005),k=s(36459),X=s(84720),z=s(27792);let $;!function(e){e.USER="user",e.ENVIRONMENT="environment"}($||($={}));const _=e=>{let{switchFacingMode:t}=e;return(0,U.jsx)(E,{"data-testid":"stCameraInputSwitchButton",children:(0,U.jsx)(h.A,{content:"Switch camera",placement:h.W.TOP_RIGHT,children:(0,U.jsx)(k.Ay,{kind:X.KX.MINIMAL,onClick:t,children:(0,U.jsx)(c.A,{content:A.G,size:"twoXL",color:z.A.white})})})})};var W=s(21806),B=s(8151),D=s(2273),O=s(54806),V=s.n(O),G=s(39095);let N;!function(e){e.PENDING="pending",e.SUCCESS="success",e.ERROR="error"}(N||(N={}));const H=e=>{let{width:t}=e;return(0,U.jsxs)(F,{width:t,children:[(0,U.jsx)(c.A,{size:"threeXL",color:z.A.gray60,content:W.C}),(0,U.jsxs)(v,{children:["This app would like to use your camera.",(0,U.jsx)(y,{href:G.oe,rel:"noopener noreferrer",target:"_blank",children:"Learn how to allow access."})]})]})},Q=e=>{let{handleCapture:t,width:s,disabled:i,clearPhotoInProgress:o,setClearPhotoInProgress:a,facingMode:n,setFacingMode:l,testOverride:d}=e;const[c,h]=(0,r.useState)(d||N.PENDING),u=(0,r.useRef)(null),[g,p]=(0,r.useState)(s),m=(0,r.useCallback)((0,S.sg)(1e3,p),[]);(0,r.useEffect)((()=>{m(s)}),[s,m]);const f=(0,B.u)();return(0,U.jsxs)(x,{width:g,"data-testid":"stCameraInputWebcamComponent",children:[c===N.SUCCESS||i||o?D.Fr&&(0,U.jsx)(_,{switchFacingMode:l}):(0,U.jsx)(H,{width:g}),(0,U.jsx)(F,{"data-testid":"stCameraInputWebcamStyledBox",hidden:c!==N.SUCCESS&&!i&&!o,width:g,children:!i&&(0,U.jsx)(V(),{audio:!1,ref:u,screenshotFormat:"image/jpeg",screenshotQuality:1,width:g,height:9*g/16,style:{borderRadius:`${f.radii.default} ${f.radii.default} 0 0`},onUserMediaError:()=>{h(N.ERROR)},onUserMedia:()=>{h(N.SUCCESS),a(!1)},videoConstraints:{width:{ideal:g},facingMode:n}})}),(0,U.jsx)(P,{onClick:function(){if(null!==u.current){const e=u.current.getScreenshot();t(e)}},disabled:c!==N.SUCCESS||i||o,children:"Take Photo"})]})};class q extends r.PureComponent{constructor(e){super(e),this.localFileIdCounter=1,this.RESTORED_FROM_WIDGET_STRING="RESTORED_FROM_WIDGET",this.formClearHelper=new m.o,this.getProgress=()=>{if(this.state.files.length>0&&"uploading"===this.state.files[this.state.files.length-1].status.type){return this.state.files[this.state.files.length-1].status.progress}},this.setClearPhotoInProgress=e=>{this.setState({clearPhotoInProgress:e})},this.setFacingMode=()=>{this.setState((e=>({facingMode:e.facingMode===$.USER?$.ENVIRONMENT:$.USER})))},this.handleCapture=e=>{if(null===e)return Promise.resolve();this.setState({imgSrc:e,shutter:!0,minShutterEffectPassed:!1});return(t=e,s=`camera-input-${(new Date).toISOString().replace(/:/g,"_")}.jpg`,fetch(t).then((e=>e.arrayBuffer())).then((e=>new File([e],s,{type:"image/jpeg"})))).then((e=>this.props.uploadClient.fetchFileURLs([e]).then((t=>({file:e,fileUrls:t[0]}))))).then((e=>{let{file:t,fileUrls:s}=e;return this.uploadFile(s,t)})).then((()=>{return e=150,new Promise((t=>setTimeout(t,e)));var e})).then((()=>{this.setState(((t,s)=>({imgSrc:e,shutter:t.shutter,minShutterEffectPassed:!0})))})).catch((e=>{(0,f.vV)(e)}));var t,s},this.removeCapture=()=>{0!==this.state.files.length&&(this.state.files.forEach((e=>this.deleteFile(e.id))),this.setState({imgSrc:null,clearPhotoInProgress:!0}))},this.componentDidUpdate=()=>{if("ready"!==this.status)return;const e=this.createWidgetValue(),{element:t,widgetMgr:s,fragmentId:i}=this.props,r=s.getFileUploaderStateValue(t);l()(e,r)||s.setFileUploaderStateValue(t,e,{fromUi:!0},i)},this.onFormCleared=()=>{this.setState({files:[]},(()=>{const e=this.createWidgetValue();if((0,S.hX)(e))return;this.setState({imgSrc:null});const{widgetMgr:t,element:s,fragmentId:i}=this.props;t.setFileUploaderStateValue(s,e,{fromUi:!0},i)}))},this.deleteFile=e=>{const t=this.getFile(e);(0,S.hX)(t)||("uploading"===t.status.type&&t.status.cancelToken.cancel(),"uploaded"===t.status.type&&t.status.fileUrls.deleteUrl&&this.props.uploadClient.deleteFile(t.status.fileUrls.deleteUrl),this.removeFile(e))},this.addFile=e=>{this.setState((t=>({files:[...t.files,e]})))},this.removeFile=e=>{this.setState((t=>({files:t.files.filter((t=>t.id!==e))})))},this.getFile=e=>this.state.files.find((t=>t.id===e)),this.updateFile=(e,t)=>{this.setState((s=>({files:s.files.map((s=>s.id===e?t:s))})))},this.onUploadComplete=(e,t)=>{this.setState((()=>({shutter:!1})));const s=this.getFile(e);(0,S.hX)(s)||"uploading"!==s.status.type||this.updateFile(s.id,s.setStatus({type:"uploaded",fileId:t.fileId,fileUrls:t}))},this.onUploadProgress=(e,t)=>{const s=this.getFile(t);if((0,S.hX)(s)||"uploading"!==s.status.type)return;const i=Math.round(100*e.loaded/e.total);s.status.progress!==i&&this.updateFile(t,s.setStatus({type:"uploading",cancelToken:s.status.cancelToken,progress:i}))},this.reset=()=>{this.setState({files:[],imgSrc:null})},this.uploadFile=(e,t)=>{const s=a.A.CancelToken.source(),i=new C.m(t.name,t.size,this.nextLocalFileId(),{type:"uploading",cancelToken:s,progress:1});this.addFile(i),this.props.uploadClient.uploadFile(this.props.element,e.uploadUrl,t,(e=>this.onUploadProgress(e,i.id)),s.token).then((()=>this.onUploadComplete(i.id,e))).catch((e=>{a.A.isCancel(e)||this.updateFile(i.id,i.setStatus({type:"error",errorMessage:e?e.toString():"Unknown error"}))}))},this.state=this.initialValue}get initialValue(){const e={files:[],imgSrc:null,shutter:!1,minShutterEffectPassed:!0,clearPhotoInProgress:!1,facingMode:$.USER},{widgetMgr:t,element:s}=this.props,i=t.getFileUploaderStateValue(s);if((0,S.hX)(i))return e;const{uploadedFileInfo:r}=i;return(0,S.hX)(r)||0===r.length?e:{files:r.map((e=>{const t=e.name,s=e.size,i=e.fileId,r=e.fileUrls;return new C.m(t,s,this.nextLocalFileId(),{type:"uploaded",fileId:i,fileUrls:r})})),imgSrc:0===r.length?"":this.RESTORED_FROM_WIDGET_STRING,shutter:!1,minShutterEffectPassed:!1,clearPhotoInProgress:!1,facingMode:$.USER}}componentWillUnmount(){this.formClearHelper.disconnect()}get status(){return this.state.files.some((e=>"uploading"===e.status.type))?"updating":"ready"}componentDidMount(){const e=this.createWidgetValue(),{element:t,widgetMgr:s,fragmentId:i}=this.props;void 0===s.getFileUploaderStateValue(t)&&s.setFileUploaderStateValue(t,e,{fromUi:!1},i)}createWidgetValue(){const e=this.state.files.filter((e=>"uploaded"===e.status.type)).map((e=>{const{name:t,size:s,status:i}=e;return new d.HY({fileId:i.fileId,fileUrls:i.fileUrls,name:t,size:s})}));return new d.qX({uploadedFileInfo:e})}render(){var e;const{element:t,widgetMgr:s,disabled:i,width:r}=this.props;return this.formClearHelper.manageFormClearListener(s,t.formId,this.onFormCleared),(0,U.jsxs)(x,{className:"stCameraInput","data-testid":"stCameraInput",width:r,children:[(0,U.jsx)(g.L,{label:t.label,disabled:i,labelVisibility:(0,S.yv)(null===(e=t.labelVisibility)||void 0===e?void 0:e.value),children:t.help&&(0,U.jsx)(p.j,{children:(0,U.jsx)(u.A,{content:t.help,placement:h.W.TOP_RIGHT})})}),this.state.imgSrc?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(F,{width:r,children:this.state.imgSrc!==this.RESTORED_FROM_WIDGET_STRING&&(0,U.jsx)(M,{src:this.state.imgSrc,alt:"Snapshot",opacity:this.state.shutter||!this.state.minShutterEffectPassed?"50%":"100%",width:r,height:9*r/16})}),(0,U.jsx)(P,{onClick:this.removeCapture,progress:this.getProgress(),disabled:!!this.getProgress()||i,children:this.getProgress()?"Uploading...":(0,U.jsxs)(L,{children:[(0,U.jsx)(c.A,{content:o.X,margin:"0 xs 0 0",size:"sm"})," Clear photo"]})})]}):(0,U.jsx)(Q,{handleCapture:this.handleCapture,width:r,disabled:i,clearPhotoInProgress:this.state.clearPhotoInProgress,setClearPhotoInProgress:this.setClearPhotoInProgress,facingMode:this.state.facingMode,setFacingMode:this.setFacingMode,testOverride:this.props.testOverride})]})}nextLocalFileId(){return this.localFileIdCounter++}}const K=q},9830:(e,t,s)=>{s.d(t,{m:()=>i});class i{setStatus(e){return new i(this.name,this.size,this.id,e)}constructor(e,t,s,i){this.name=void 0,this.size=void 0,this.status=void 0,this.id=void 0,this.name=e,this.size=t,this.id=s,this.status=i}}},34752:(e,t,s)=>{s.d(t,{X:()=>a,o:()=>o});var i=s(58878),r=s(25571);class o{constructor(){this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}manageFormClearListener(e,t,s){(0,r.se)(this.formClearListener)&&this.lastWidgetMgr===e&&this.lastFormId===t||(this.disconnect(),(0,r._L)(t)&&(this.formClearListener=e.addFormClearedListener(t,s),this.lastWidgetMgr=e,this.lastFormId=t))}disconnect(){var e;null===(e=this.formClearListener)||void 0===e||e.disconnect(),this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}}function a(e){let{element:t,widgetMgr:s,onFormCleared:o}=e;(0,i.useEffect)((()=>{if(!(0,r._L)(t.formId))return;const e=s.addFormClearedListener(t.formId,o);return()=>{e.disconnect()}}),[t,s,o])}}}]);
|
@@ -1,5 +0,0 @@
|
|
1
|
-
(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[5618],{68035:(e,t,r)=>{"use strict";r.d(t,{A:()=>u});r(58878);var n=r(25571),o=r(78286),i=r(89653);const s=r(60667).i7`
|
2
|
-
50% {
|
3
|
-
color: rgba(0, 0, 0, 0);
|
4
|
-
}
|
5
|
-
`,a=(0,i.A)("span",{target:"edlqvik0"})((e=>{let{includeDot:t,shouldBlink:r,theme:n}=e;return{...t?{"&::before":{opacity:1,content:'"\u2022"',animation:"none",color:n.colors.gray,margin:"0 5px"}}:{},...r?{color:n.colors.red,animationName:`${s}`,animationDuration:"0.5s",animationIterationCount:5}:{}}}),"");var l=r(90782);const u=e=>{let{dirty:t,value:r,inForm:i,maxLength:s,className:u,type:c="single",allowEnterToSubmit:d=!0}=e;const p=[],f=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];p.push((0,l.jsx)(a,{includeDot:p.length>0,shouldBlink:t,children:e},p.length))};if(t&&d){const e=i?"submit form":"apply";if("multiline"===c){f(`Press ${(0,n.u_)()?"\u2318":"Ctrl"}+Enter to ${e}`)}else"single"===c&&f(`Press Enter to ${e}`)}return s&&("chat"!==c||t)&&f(`${r.length}/${s}`,t&&r.length>=s),(0,l.jsx)(o.tp,{"data-testid":"InputInstructions",className:u,children:p})}},34752:(e,t,r)=>{"use strict";r.d(t,{X:()=>s,o:()=>i});var n=r(58878),o=r(25571);class i{constructor(){this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}manageFormClearListener(e,t,r){(0,o.se)(this.formClearListener)&&this.lastWidgetMgr===e&&this.lastFormId===t||(this.disconnect(),(0,o._L)(t)&&(this.formClearListener=e.addFormClearedListener(t,r),this.lastWidgetMgr=e,this.lastFormId=t))}disconnect(){var e;null===(e=this.formClearListener)||void 0===e||e.disconnect(),this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}}function s(e){let{element:t,widgetMgr:r,onFormCleared:i}=e;(0,n.useEffect)((()=>{if(!(0,o._L)(t.formId))return;const e=r.addFormClearedListener(t.formId,i);return()=>{e.disconnect()}}),[t,r,i])}},25618:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>b});var n=r(58878),o=r(94928),i=r(8151),s=r(32698),a=r.n(s),l=r(34752),u=r(68035),c=r(70474),d=r(78286),p=r(93480),f=r(997),h=r(25571),m=r(90782);class y extends n.PureComponent{get initialValue(){var e;const t=this.props.widgetMgr.getStringValue(this.props.element);return null!==(e=null!==t&&void 0!==t?t:this.props.element.default)&&void 0!==e?e:null}constructor(e){super(e),this.formClearHelper=new l.o,this.id=void 0,this.state={dirty:!1,value:this.initialValue},this.commitWidgetValue=e=>{const{widgetMgr:t,element:r,fragmentId:n}=this.props;t.setStringValue(r,this.state.value,e,n),this.setState({dirty:!1})},this.onFormCleared=()=>{this.setState(((e,t)=>{var r;return{value:null!==(r=t.element.default)&&void 0!==r?r:null}}),(()=>this.commitWidgetValue({fromUi:!0})))},this.onBlur=()=>{this.state.dirty&&this.commitWidgetValue({fromUi:!0})},this.onChange=e=>{const{value:t}=e.target,{element:r}=this.props,{maxChars:n}=r;0!==n&&t.length>n||this.setState({dirty:!0,value:t})},this.isEnterKeyPressed=e=>{var t;const{keyCode:r,key:n}=e;return("Enter"===n||13===r||10===r)&&!(!0===(null===(t=e.nativeEvent)||void 0===t?void 0:t.isComposing))},this.onKeyDown=e=>{const{metaKey:t,ctrlKey:r}=e,{dirty:n}=this.state,{element:o,widgetMgr:i,fragmentId:s}=this.props,{formId:a}=o,l=i.allowFormEnterToSubmit(a);this.isEnterKeyPressed(e)&&(r||t)&&n&&(e.preventDefault(),this.commitWidgetValue({fromUi:!0}),l&&i.submitForm(a,s))},this.id=a()("text_area_")}componentDidMount(){this.props.element.setValue?this.updateFromProtobuf():this.commitWidgetValue({fromUi:!1})}componentDidUpdate(){this.maybeUpdateFromProtobuf()}componentWillUnmount(){this.formClearHelper.disconnect()}maybeUpdateFromProtobuf(){const{setValue:e}=this.props.element;e&&this.updateFromProtobuf()}updateFromProtobuf(){const{value:e}=this.props.element;this.props.element.setValue=!1,this.setState({value:null!==e&&void 0!==e?e:null},(()=>{this.commitWidgetValue({fromUi:!1})}))}render(){var e;const{element:t,disabled:r,width:n,widgetMgr:i,theme:s}=this.props,{value:a,dirty:l}=this.state,y={width:n},{height:b,placeholder:g,formId:v}=t,w=i.allowFormEnterToSubmit(v)||!(0,h.Ml)({formId:v});return this.formClearHelper.manageFormClearListener(i,v,this.onFormCleared),(0,m.jsxs)("div",{className:"stTextArea","data-testid":"stTextArea",style:y,children:[(0,m.jsx)(c.L,{label:t.label,disabled:r,labelVisibility:(0,h.yv)(null===(e=t.labelVisibility)||void 0===e?void 0:e.value),htmlFor:this.id,children:t.help&&(0,m.jsx)(d.j,{children:(0,m.jsx)(p.A,{content:t.help,placement:f.W.TOP_RIGHT})})}),(0,m.jsx)(o.A,{value:null!==a&&void 0!==a?a:"",placeholder:g,onBlur:this.onBlur,onChange:this.onChange,onKeyDown:this.onKeyDown,"aria-label":t.label,disabled:r,id:this.id,overrides:{Input:{style:{lineHeight:s.lineHeights.inputWidget,height:b?`${b}px`:"",minHeight:"95px",resize:"vertical","::placeholder":{opacity:"0.7"},paddingRight:s.spacing.lg,paddingLeft:s.spacing.lg,paddingBottom:s.spacing.lg,paddingTop:s.spacing.lg}},Root:{props:{"data-testid":"stTextAreaRootElement"},style:{borderLeftWidth:s.sizes.borderWidth,borderRightWidth:s.sizes.borderWidth,borderTopWidth:s.sizes.borderWidth,borderBottomWidth:s.sizes.borderWidth}}}}),n>s.breakpoints.hideWidgetDetails&&(0,m.jsx)(u.A,{dirty:l,value:null!==a&&void 0!==a?a:"",maxLength:t.maxChars,type:"multiline",inForm:(0,h.Ml)({formId:v}),allowEnterToSubmit:w})]})}}const b=(0,i.b)(y)},94928:(e,t,r)=>{"use strict";r.d(t,{A:()=>P});var n=r(58878),o=r(35331),i=r(18648),s=r(92850),a=r(57224),l=r(81301);function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){d(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function d(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var p=(0,a.I4)("div",(function(e){return c(c({},(0,l.vt)(c(c({$positive:!1},e),{},{$hasIconTrailing:!1}))),{},{width:e.$resize?"fit-content":"100%"})}));p.displayName="StyledTextAreaRoot",p.displayName="StyledTextAreaRoot";var f=(0,a.I4)("div",(function(e){return(0,l.EO)(c({$positive:!1},e))}));f.displayName="StyledTextareaContainer",f.displayName="StyledTextareaContainer";var h=(0,a.I4)("textarea",(function(e){return c(c({},(0,l.n)(e)),{},{resize:e.$resize||"none"})}));function m(e){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},m(e)}function y(){return y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},y.apply(this,arguments)}function b(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,o,i=[],s=!0,a=!1;try{for(r=r.call(e);!(s=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);s=!0);}catch(l){a=!0,o=l}finally{try{s||null==r.return||r.return()}finally{if(a)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return g(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return g(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function v(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function w(e,t){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},w(e,t)}function O(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=C(e);if(t){var o=C(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===m(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return j(e)}(this,r)}}function j(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function C(e){return C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},C(e)}function F(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}h.displayName="StyledTextarea",h.displayName="StyledTextarea";var x=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&w(e,t)}(u,e);var t,r,a,l=O(u);function u(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return F(j(e=l.call.apply(l,[this].concat(r))),"state",{isFocused:e.props.autoFocus||!1}),F(j(e),"onFocus",(function(t){e.setState({isFocused:!0}),e.props.onFocus(t)})),F(j(e),"onBlur",(function(t){e.setState({isFocused:!1}),e.props.onBlur(t)})),e}return t=u,(r=[{key:"render",value:function(){var e=this.props.overrides,t=void 0===e?{}:e,r=b((0,o._O)(t.Root,p),2),a=r[0],l=r[1],u=(0,o.Qp)({Input:{component:h},InputContainer:{component:f}},t);return n.createElement(a,y({"data-baseweb":"textarea",$isFocused:this.state.isFocused,$isReadOnly:this.props.readOnly,$disabled:this.props.disabled,$error:this.props.error,$positive:this.props.positive,$required:this.props.required,$resize:this.props.resize},l),n.createElement(i.A,y({},this.props,{type:s.GT.textarea,overrides:u,onFocus:this.onFocus,onBlur:this.onBlur,resize:this.props.resize})))}}])&&v(t.prototype,r),a&&v(t,a),Object.defineProperty(t,"prototype",{writable:!1}),u}(n.Component);F(x,"defaultProps",{autoFocus:!1,disabled:!1,readOnly:!1,error:!1,name:"",onBlur:function(){},onChange:function(){},onKeyDown:function(){},onKeyPress:function(){},onKeyUp:function(){},onFocus:function(){},overrides:{},placeholder:"",required:!1,rows:3,size:s.SK.default});const P=x},32698:(e,t,r)=>{var n=r(30136),o=0;e.exports=function(e){var t=++o;return n(e)+t}}}]);
|
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[5711],{45711:(e,t,o)=>{o.r(t),o.d(t,{default:()=>P});var n=o(58878),i=o(8151),s=o(72037),a=o(59237),r=o(28430),l=o(71034),d=o.n(l),c=o(25571),h=o(84996),m=o(22044),u=o(67253),g=o(34752),p=o(85729);const f={DATAFRAME_INDEX:"(index)"},v=new Set([p.sj.DatetimeIndex,p.sj.Float64Index,p.sj.Int64Index,p.sj.RangeIndex,p.sj.UInt64Index]);function b(e){var t;if(0===(null===(t=e.datasets)||void 0===t?void 0:t.length))return null;const o={};return e.datasets.forEach((e=>{if(!e)return;const t=e.hasName?e.name:null;o[t]=e.data})),o}function w(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(e.isEmpty())return[];const o=[],{dataRows:n,dataColumns:i}=e.dimensions,s=p.D0.getTypeName(e.types.index[0]),a=v.has(s);for(let r=t;r<n;r++){const t={};if(a){const o=e.getIndexValue(r,0);t[f.DATAFRAME_INDEX]="bigint"===typeof o?Number(o):o}for(let o=0;o<i;o++){const n=e.getDataValue(r,o),i=e.types.data[o],s=p.D0.getTypeName(i);if("datetimetz"!==s&&(n instanceof Date||Number.isFinite(n))&&(s.startsWith("datetime")||"date"===s)){const i=60*new Date(n).getTimezoneOffset()*1e3;t[e.columns[0][o]]=n.valueOf()+i}else t[e.columns[0][o]]="bigint"===typeof n?Number(n):n}o.push(t)}return o}var x=o(37638),y=o.n(x),S=o(42274),F=o.n(S),C=o(58144);function z(e,t){const o={font:t.genericFonts.bodyFont,background:t.colors.bgColor,fieldTitle:"verbal",autosize:{type:"fit",contains:"padding"},title:{align:"left",anchor:"start",color:t.colors.headingColor,titleFontStyle:"normal",fontWeight:t.fontWeights.bold,fontSize:t.fontSizes.smPx+2,orient:"top",offset:26},header:{titleFontWeight:t.fontWeights.normal,titleFontSize:t.fontSizes.mdPx,titleColor:(0,C.lH)(t),titleFontStyle:"normal",labelFontSize:t.fontSizes.twoSmPx,labelFontWeight:t.fontWeights.normal,labelColor:(0,C.lH)(t),labelFontStyle:"normal"},axis:{labelFontSize:t.fontSizes.twoSmPx,labelFontWeight:t.fontWeights.normal,labelColor:(0,C.lH)(t),labelFontStyle:"normal",titleFontWeight:t.fontWeights.normal,titleFontSize:t.fontSizes.smPx,titleColor:(0,C.lH)(t),titleFontStyle:"normal",ticks:!1,gridColor:(0,C.V9)(t),domain:!1,domainWidth:1,domainColor:(0,C.V9)(t),labelFlush:!0,labelFlushOffset:1,labelBound:!1,labelLimit:100,titlePadding:t.spacing.lgPx,labelPadding:t.spacing.lgPx,labelSeparation:t.spacing.twoXSPx,labelOverlap:!0},legend:{labelFontSize:t.fontSizes.smPx,labelFontWeight:t.fontWeights.normal,labelColor:(0,C.lH)(t),titleFontSize:t.fontSizes.smPx,titleFontWeight:t.fontWeights.normal,titleFontStyle:"normal",titleColor:(0,C.lH)(t),titlePadding:5,labelPadding:t.spacing.lgPx,columnPadding:t.spacing.smPx,rowPadding:t.spacing.twoXSPx,padding:7,symbolStrokeWidth:4},range:{category:(0,C.c6)(t),diverging:(0,C.vk)(t),ramp:(0,C.rp)(t),heatmap:(0,C.rp)(t)},view:{columns:1,strokeWidth:0,stroke:"transparent",continuousHeight:350,continuousWidth:400},concat:{columns:1},facet:{columns:1},mark:{tooltip:!0,...(0,C.iq)(t)?{color:"#0068C9"}:{color:"#83C9FF"}},bar:{binSpacing:t.spacing.twoXSPx,discreteBandSize:{band:.85}},axisDiscrete:{grid:!1},axisXPoint:{grid:!1},axisTemporal:{grid:!1},axisXBand:{grid:!1}};return e?F()({},o,e,((e,t)=>Array.isArray(t)?t:void 0)):o}const V=(0,o(89653).A)("div",{target:"egd2k5h0"})((e=>{let{theme:t,useContainerWidth:o,isFullScreen:n}=e;return{width:o||n?"100%":"auto",height:n?"100%":"auto","&.vega-embed":{"&:hover summary, .vega-embed:focus summary":{background:"transparent"},"&.has-actions":{paddingRight:0},".vega-actions":{zIndex:t.zIndices.popupMenu,backgroundColor:t.colors.bgColor,boxShadow:"rgb(0 0 0 / 16%) 0px 4px 16px",border:`${t.sizes.borderWidth} solid ${t.colors.fadedText10}`,a:{fontFamily:t.genericFonts.bodyFont,fontWeight:t.fontWeights.normal,fontSize:t.fontSizes.md,margin:0,padding:`${t.spacing.twoXS} ${t.spacing.twoXL}`,color:t.colors.bodyText},"a:hover":{backgroundColor:t.colors.secondaryBg,color:t.colors.bodyText},":before":{content:"none"},":after":{content:"none"}},summary:{opacity:0,height:"auto",zIndex:t.zIndices.menuButton,border:"none",boxShadow:"none",borderRadius:t.radii.default,color:t.colors.fadedText10,backgroundColor:"transparent",transition:"opacity 300ms 150ms,transform 300ms 150ms","&:active, &:focus-visible, &:hover":{border:"none",boxShadow:"none",color:t.colors.bodyText,opacity:"1 !important",background:t.colors.darkenedBgMix25}}}}}),"");var W=o(90782);const D="source";class I extends n.PureComponent{constructor(){super(...arguments),this.vegaView=void 0,this.vegaFinalizer=void 0,this.defaultDataName=D,this.element=null,this.formClearHelper=new g.o,this.state={error:void 0},this.finalizeView=()=>{this.vegaFinalizer&&this.vegaFinalizer(),this.vegaFinalizer=void 0,this.vegaView=void 0},this.generateSpec=()=>{var e,t;const{element:o,theme:n,isFullScreen:i,width:s,height:a}=this.props,r=JSON.parse(o.spec),{useContainerWidth:l}=o;if("streamlit"===o.vegaLiteTheme?r.config=z(r.config,n):"streamlit"===(null===(e=r.usermeta)||void 0===e||null===(t=e.embedOptions)||void 0===t?void 0:t.theme)?(r.config=z(r.config,n),r.usermeta.embedOptions.theme=void 0):r.config=function(e,t){const{colors:o,fontSizes:n,genericFonts:i}=t,s={labelFont:i.bodyFont,titleFont:i.bodyFont,labelFontSize:n.twoSmPx,titleFontSize:n.twoSmPx},a={background:o.bgColor,axis:{labelColor:o.bodyText,titleColor:o.bodyText,gridColor:(0,C.V9)(t),...s},legend:{labelColor:o.bodyText,titleColor:o.bodyText,...s},title:{color:o.bodyText,subtitleColor:o.bodyText,...s},header:{labelColor:o.bodyText,titleColor:o.bodyText,...s},view:{stroke:(0,C.V9)(t),continuousHeight:350,continuousWidth:400},mark:{tooltip:!0}};return e?y()({},a,e):a}(r.config,n),i?(r.width=s,r.height=a,"vconcat"in r&&r.vconcat.forEach((e=>{e.width=s}))):l&&(r.width=s,"vconcat"in r&&r.vconcat.forEach((e=>{e.width=s}))),r.padding||(r.padding={}),(0,c.hX)(r.padding.bottom)&&(r.padding.bottom=20),r.datasets)throw new Error("Datasets should not be passed as part of the spec");return o.selectionMode.length>0&&function(e){"params"in e&&"encoding"in e&&e.params.forEach((t=>{"select"in t&&(["interval","point"].includes(t.select)&&(t.select={type:t.select}),"type"in t.select&&"point"===t.select.type&&!("encodings"in t.select)&&(0,c.hX)(t.select.encodings)&&(t.select.encodings=Object.keys(e.encoding)))}))}(r),r},this.maybeConfigureSelections=()=>{if(void 0===this.vegaView)return;const{widgetMgr:e,element:t}=this.props;if(null===t||void 0===t||!t.id||0===t.selectionMode.length)return;const o=e.getElementState(this.props.element.id,"viewState");if((0,c.se)(o))try{this.vegaView=this.vegaView.setState(o)}catch(i){(0,h.FF)("Failed to restore view state",i)}t.selectionMode.forEach(((o,n)=>{var i;null===(i=this.vegaView)||void 0===i||i.addSignalListener(o,(0,c.sg)(150,((o,n)=>{var i;const s=null===(i=this.vegaView)||void 0===i?void 0:i.getState({data:(e,o)=>t.selectionMode.some((t=>`${t}_store`===e)),recurse:!1});(0,c.se)(s)&&e.setElementState(t.id,"viewState",s);let a=n;"vlPoint"in n&&"or"in n.vlPoint&&(a=n.vlPoint.or);const r=JSON.parse(e.getStringValue(t)||"{}"),l={selection:{...(null===r||void 0===r?void 0:r.selection)||{},[o]:a||{}}};d()(r,l)||e.setStringValue(t,JSON.stringify(l),{fromUi:!0},this.props.fragmentId)})))}));const n=()=>{const o={selection:{}};this.props.element.selectionMode.forEach((e=>{o.selection[e]={}}));const n=e.getStringValue(t),i=n?JSON.parse(n):o;var s;d()(i,o)||(null===(s=this.props.widgetMgr)||void 0===s||s.setStringValue(this.props.element,JSON.stringify(o),{fromUi:!0},this.props.fragmentId))};this.props.element.formId&&this.formClearHelper.manageFormClearListener(this.props.widgetMgr,this.props.element.formId,n)}}async componentDidMount(){try{await this.createView()}catch(e){const t=(0,u.$)(e);this.setState({error:t})}}componentWillUnmount(){this.finalizeView()}async componentDidUpdate(e){const{element:t,theme:o}=e,{element:n,theme:i}=this.props,s=t.spec,{spec:a}=n;if(!this.vegaView||s!==a||o!==i||e.width!==this.props.width||e.height!==this.props.height||e.element.vegaLiteTheme!==this.props.element.vegaLiteTheme||!d()(e.element.selectionMode,this.props.element.selectionMode)){(0,h.OG)("Vega spec changed.");try{await this.createView()}catch(g){const e=(0,u.$)(g);this.setState({error:e})}return}const r=t.data,{data:l}=n;(r||l)&&this.updateData(this.defaultDataName,r,l);const c=b(t)||{},m=b(n)||{};for(const[d,h]of Object.entries(m)){const e=d||this.defaultDataName,t=c[e];this.updateData(e,t,h)}for(const d of Object.keys(c))m.hasOwnProperty(d)||d===this.defaultDataName||this.updateData(d,null,null);this.vegaView.resize().runAsync()}updateData(e,t,o){if(!this.vegaView)throw new Error("Chart has not been drawn yet");if(!o||0===o.data.numRows)try{this.vegaView.remove(e,a.truthy)}finally{return}if(!t||0===t.data.numRows)return void this.vegaView.insert(e,w(o));const{dataRows:n,dataColumns:i}=t.dimensions,{dataRows:s,dataColumns:r}=o.dimensions;!function(e,t,o,n,i,s){if(o!==s)return!1;if(t>=i)return!1;if(0===t)return!1;const a=s-1,r=t-1;return e.getDataValue(0,a)===n.getDataValue(0,a)&&e.getDataValue(r,a)===n.getDataValue(r,a)}(t,n,i,o,s,r)?(this.vegaView.data(e,w(o)),(0,h.OG)(`Had to clear the ${e} dataset before inserting data through Vega view.`)):n<s&&this.vegaView.insert(e,w(o,n))}async createView(){if((0,h.OG)("Creating a new Vega view."),!this.element)throw Error("Element missing.");this.finalizeView();const{element:e}=this.props,t=this.generateSpec(),o={ast:!0,expr:r.P,tooltip:{disableDefaultStyle:!0},defaultStyle:!1,forceActionsMenu:!0},{vgSpec:n,view:i,finalize:a}=await(0,s.Ay)(this.element,t,o);this.vegaView=i,this.maybeConfigureSelections(),this.vegaFinalizer=a;const l=function(e){const t=b(e);if((0,c.hX)(t))return null;const o={};for(const[n,i]of Object.entries(t))o[n]=w(i);return o}(e),d=l?Object.keys(l):[];if(1===d.length){const[e]=d;this.defaultDataName=e}else 0===d.length&&n.data&&(this.defaultDataName=D);const m=function(e){const t=e.data;return t&&0!==t.data.numRows?w(t):null}(e);if(m&&i.insert(this.defaultDataName,m),l)for(const[s,r]of Object.entries(l))i.insert(s,r);await i.runAsync(),this.vegaView.resize().runAsync()}render(){if(this.state.error)throw this.state.error;return(0,W.jsx)(V,{"data-testid":"stVegaLiteChart",className:"stVegaLiteChart",useContainerWidth:this.props.element.useContainerWidth,isFullScreen:this.props.isFullScreen,ref:e=>{this.element=e}})}}const P=(0,i.b)((0,m.A)(I))},22044:(e,t,o)=>{o.d(t,{A:()=>v});var n=o(58878),i=o(53124),s=o.n(i),a=o(8151),r=o(41514),l=o(67214),d=o(64611),c=o(84152),h=o(89653);const m=(0,h.A)("button",{target:"e1vs0wn31"})((e=>{let{isExpanded:t,theme:o}=e;const n=t?{right:"0.4rem",top:"0.5rem",backgroundColor:"transparent"}:{right:"-3.0rem",top:"-0.375rem",opacity:0,transform:"scale(0)",backgroundColor:o.colors.lightenedBg05};return{position:"absolute",display:"flex",alignItems:"center",justifyContent:"center",zIndex:o.zIndices.sidebar+1,height:"2.5rem",width:"2.5rem",transition:"opacity 300ms 150ms, transform 300ms 150ms",border:"none",color:o.colors.fadedText60,borderRadius:"50%",...n,"&:focus":{outline:"none"},"&:active, &:focus-visible, &:hover":{opacity:1,outline:"none",transform:"scale(1)",color:o.colors.bodyText,transition:"none"}}}),""),u=(0,h.A)("div",{target:"e1vs0wn30"})((e=>{let{theme:t,isExpanded:o}=e;return{"&:hover":{[m]:{opacity:1,transform:"scale(1)",transition:"none"}},...o?{position:"fixed",top:0,left:0,bottom:0,right:0,background:t.colors.bgColor,zIndex:t.zIndices.fullscreenWrapper,padding:t.spacing.md,paddingTop:t.sizes.fullScreenHeaderHeight,overflow:["auto","overlay"],display:"flex",alignItems:"center",justifyContent:"center"}:{}}}),"");var g=o(90782);class p extends n.PureComponent{constructor(e){super(e),this.context=void 0,this.controlKeys=e=>{const{expanded:t}=this.state;27===e.keyCode&&t&&this.zoomOut()},this.zoomIn=()=>{document.body.style.overflow="hidden",this.context.setFullScreen(!0),this.setState({expanded:!0})},this.zoomOut=()=>{document.body.style.overflow="unset",this.context.setFullScreen(!1),this.setState({expanded:!1})},this.convertScssRemValueToPixels=e=>parseFloat(e)*parseFloat(getComputedStyle(document.documentElement).fontSize),this.getWindowDimensions=()=>{const e=this.convertScssRemValueToPixels(this.props.theme.spacing.md),t=this.convertScssRemValueToPixels(this.props.theme.sizes.fullScreenHeaderHeight);return{fullWidth:window.innerWidth-2*e,fullHeight:window.innerHeight-(e+t)}},this.updateWindowDimensions=()=>{this.setState(this.getWindowDimensions())},this.state={expanded:!1,...this.getWindowDimensions()}}componentDidMount(){window.addEventListener("resize",this.updateWindowDimensions),document.addEventListener("keydown",this.controlKeys,!1)}componentWillUnmount(){window.removeEventListener("resize",this.updateWindowDimensions),document.removeEventListener("keydown",this.controlKeys,!1)}render(){const{expanded:e,fullWidth:t,fullHeight:o}=this.state,{children:n,width:i,height:s,disableFullscreenMode:a}=this.props;let c=r.u,h=this.zoomIn,p="View fullscreen";return e&&(c=l.Q,h=this.zoomOut,p="Exit fullscreen"),(0,g.jsxs)(u,{isExpanded:e,"data-testid":"stFullScreenFrame",children:[!a&&(0,g.jsx)(m,{"data-testid":"StyledFullScreenButton",onClick:h,title:p,isExpanded:e,children:(0,g.jsx)(d.A,{content:c})}),n(e?{width:t,height:o,expanded:e,expand:this.zoomIn,collapse:this.zoomOut}:{width:i,height:s,expanded:e,expand:this.zoomIn,collapse:this.zoomOut})]})}}p.contextType=c.n;const f=(0,a.b)(p);const v=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];class o extends n.PureComponent{constructor(){super(...arguments),this.render=()=>{const{width:o,height:n,disableFullscreenMode:i}=this.props;return(0,g.jsx)(f,{width:o,height:n,disableFullscreenMode:t||i,children:t=>{let{width:o,height:n,expanded:i,expand:s,collapse:a}=t;return(0,g.jsx)(e,{...this.props,width:o,height:n,isFullScreen:i,expand:s,collapse:a})}})}}}return o.displayName=`withFullScreenWrapper(${e.displayName||e.name})`,s()(o,e)}},34752:(e,t,o)=>{o.d(t,{X:()=>a,o:()=>s});var n=o(58878),i=o(25571);class s{constructor(){this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}manageFormClearListener(e,t,o){(0,i.se)(this.formClearListener)&&this.lastWidgetMgr===e&&this.lastFormId===t||(this.disconnect(),(0,i._L)(t)&&(this.formClearListener=e.addFormClearedListener(t,o),this.lastWidgetMgr=e,this.lastFormId=t))}disconnect(){var e;null===(e=this.formClearListener)||void 0===e||e.disconnect(),this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}}function a(e){let{element:t,widgetMgr:o,onFormCleared:s}=e;(0,n.useEffect)((()=>{if(!(0,i._L)(t.formId))return;const e=o.addFormClearedListener(t.formId,s);return()=>{e.disconnect()}}),[t,o,s])}}}]);
|
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[7809],{97809:(e,t,r)=>{r.r(t),r.d(t,{default:()=>C});var n=r(58878),o=r(9887),s=r.n(o),i=r(58144),a=r(34914),l=r(84152),d=r(89653),c=r(74829),h=r(37888);const m=(0,d.A)(h.x,{shouldForwardProp:c.A,target:"e1se5lgy2"})((e=>{let{theme:t,usingCustomTheme:r}=e;return{fontSize:t.fontSizes.sm,width:"1.375rem",height:"1.375rem",borderWidth:"3px",radius:t.radii.md,justifyContents:"center",padding:t.spacing.none,margin:t.spacing.none,borderColor:t.colors.borderColor,borderTopColor:r?t.colors.primary:t.colors.blue70,flexGrow:0,flexShrink:0}}),""),p=(0,d.A)("div",{target:"e1se5lgy1"})((e=>{let{theme:t,width:r,cache:n}=e;return{width:r,...n?{paddingBottom:"1rem",background:`linear-gradient(to bottom, ${t.colors.bgColor} 0%, ${t.colors.bgColor} 80%, transparent 100%)`}:null}}),""),u=(0,d.A)("div",{target:"e1se5lgy0"})((e=>{let{theme:t}=e;return{display:"flex",gap:t.spacing.sm,alignItems:"center",width:"100%"}}),"");var g=r(90782);const C=function(e){let{width:t,element:r}=e;const{activeTheme:o}=n.useContext(l.n),d=!(0,i.tl)(o),{cache:c}=r;return(0,g.jsx)(p,{className:s()({stSpinner:!0,stCacheSpinner:c}),"data-testid":"stSpinner",width:t,cache:c,children:(0,g.jsxs)(u,{children:[(0,g.jsx)(m,{usingCustomTheme:d}),(0,g.jsx)(a.Ay,{source:r.text,allowHTML:!1})]})})}}}]);
|
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[8237],{78237:(e,o,l)=>{l.r(o),l.d(o,{default:()=>w});var t=l(58878),n=l(8151),i=l(43978),r=l(29669),s=l(22044),c=l(25571),a=l(34752),d=l(37638),p=l.n(d),u=l(58144),h=l(67253),m=l(84996);function f(e,o,l){return e=function(e,o){return(e=(e=(e=(e=(e=(e=(e=(e=e.replaceAll("#000032",(0,u.$E)(o))).replaceAll("#000033",(0,u.pf)(o))).replaceAll("#000034",(0,u.iq)(o)?o.colors.blue80:o.colors.blue40)).replaceAll("#000035",(0,u.V9)(o))).replaceAll("#000036",(0,u.lH)(o))).replaceAll("#000037",(0,u.ZA)(o))).replaceAll("#000038",o.colors.bgColor)).replaceAll("#000039",o.colors.fadedText05)).replaceAll("#000040",o.colors.bgMix)}(e,o),e=function(e,o,l){const t="#000001",n="#000002",i="#000003",r="#000004",s="#000005",c="#000006",a="#000007",d="#000008",p="#000009",h="#000010";if("streamlit"===l){const l=(0,u.c6)(o);e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replaceAll(t,l[0])).replaceAll(n,l[1])).replaceAll(i,l[2])).replaceAll(r,l[3])).replaceAll(s,l[4])).replaceAll(c,l[5])).replaceAll(a,l[6])).replaceAll(d,l[7])).replaceAll(p,l[8])).replaceAll(h,l[9])}else e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replaceAll(t,"#636efa")).replaceAll(n,"#EF553B")).replaceAll(i,"#00cc96")).replaceAll(r,"#ab63fa")).replaceAll(s,"#FFA15A")).replaceAll(c,"#19d3f3")).replaceAll(a,"#FF6692")).replaceAll(d,"#B6E880")).replaceAll(p,"#FF97FF")).replaceAll(h,"#FECB52");return e}(e,o,l),e=function(e,o,l){const t="#000011",n="#000012",i="#000013",r="#000014",s="#000015",c="#000016",a="#000017",d="#000018",p="#000019",h="#000020";if("streamlit"===l){const l=(0,u.rp)(o);e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replaceAll(t,l[0])).replaceAll(n,l[1])).replaceAll(i,l[2])).replaceAll(r,l[3])).replaceAll(s,l[4])).replaceAll(c,l[5])).replaceAll(a,l[6])).replaceAll(d,l[7])).replaceAll(p,l[8])).replaceAll(h,l[9])}else e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replaceAll(t,"#0d0887")).replaceAll(n,"#46039f")).replaceAll(i,"#7201a8")).replaceAll(r,"#9c179e")).replaceAll(s,"#bd3786")).replaceAll(c,"#d8576b")).replaceAll(a,"#ed7953")).replaceAll(d,"#fb9f3a")).replaceAll(p,"#fdca26")).replaceAll(h,"#f0f921");return e}(e,o,l),e=function(e,o,l){const t="#000021",n="#000022",i="#000023",r="#000024",s="#000025",c="#000026",a="#000027",d="#000028",p="#000029",h="#000030",m="#000031";if("streamlit"===l){const l=(0,u.vk)(o);e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replaceAll(t,l[0])).replaceAll(n,l[1])).replaceAll(i,l[2])).replaceAll(r,l[3])).replaceAll(s,l[4])).replaceAll(c,l[5])).replaceAll(a,l[6])).replaceAll(d,l[7])).replaceAll(p,l[8])).replaceAll(h,l[9])).replaceAll(m,l[10])}else e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replaceAll(t,"#8e0152")).replaceAll(n,"#c51b7d")).replaceAll(i,"#de77ae")).replaceAll(r,"#f1b6da")).replaceAll(s,"#fde0ef")).replaceAll(c,"#f7f7f7")).replaceAll(a,"#e6f5d0")).replaceAll(d,"#b8e186")).replaceAll(p,"#7fbc41")).replaceAll(h,"#4d9221")).replaceAll(m,"#276419");return e}(e,o,l),e}function g(e,o){try{!function(e,o){const{genericFonts:l,colors:t,fontSizes:n}=o,i={font:{color:(0,u.lH)(o),family:l.bodyFont,size:n.twoSmPx},title:{color:t.headingColor,subtitleColor:t.bodyText,font:{family:l.headingFont,size:n.mdPx,color:t.headingColor},pad:{l:o.spacing.twoXSPx},xanchor:"left",x:0},legend:{title:{font:{size:n.twoSmPx,color:(0,u.lH)(o)},side:"top"},valign:"top",bordercolor:t.transparent,borderwidth:o.spacing.nonePx,font:{size:n.twoSmPx,color:(0,u.ZA)(o)}},paper_bgcolor:t.bgColor,plot_bgcolor:t.bgColor,yaxis:{ticklabelposition:"outside",zerolinecolor:(0,u.V9)(o),title:{font:{color:(0,u.lH)(o),size:n.smPx},standoff:o.spacing.twoXLPx},tickcolor:(0,u.V9)(o),tickfont:{color:(0,u.lH)(o),size:n.twoSmPx},gridcolor:(0,u.V9)(o),minor:{gridcolor:(0,u.V9)(o)},automargin:!0},xaxis:{zerolinecolor:(0,u.V9)(o),gridcolor:(0,u.V9)(o),showgrid:!1,tickfont:{color:(0,u.lH)(o),size:n.twoSmPx},tickcolor:(0,u.V9)(o),title:{font:{color:(0,u.lH)(o),size:n.smPx},standoff:o.spacing.xlPx},minor:{gridcolor:(0,u.V9)(o)},zeroline:!1,automargin:!0,rangeselector:{bgcolor:t.bgColor,bordercolor:(0,u.V9)(o),borderwidth:1,x:0}},margin:{pad:o.spacing.smPx,r:o.spacing.nonePx,l:o.spacing.nonePx},hoverlabel:{bgcolor:t.bgColor,bordercolor:t.borderColor,font:{color:(0,u.lH)(o),family:l.bodyFont,size:n.twoSmPx}},coloraxis:{colorbar:{thickness:16,xpad:o.spacing.twoXLPx,ticklabelposition:"outside",outlinecolor:t.transparent,outlinewidth:8,len:.75,y:.5745,title:{font:{color:(0,u.lH)(o),size:n.smPx}},tickfont:{color:(0,u.lH)(o),size:n.twoSmPx}}},ternary:{gridcolor:(0,u.lH)(o),bgcolor:t.bgColor,title:{font:{family:l.bodyFont,size:n.smPx}},color:(0,u.lH)(o),aaxis:{gridcolor:(0,u.lH)(o),linecolor:(0,u.lH)(o),tickfont:{family:l.bodyFont,size:n.twoSmPx}},baxis:{linecolor:(0,u.lH)(o),gridcolor:(0,u.lH)(o),tickfont:{family:l.bodyFont,size:n.twoSmPx}},caxis:{linecolor:(0,u.lH)(o),gridcolor:(0,u.lH)(o),tickfont:{family:l.bodyFont,size:n.twoSmPx}}}};p()(e,i)}(e.layout.template.layout,o)}catch(l){const e=(0,h.$)(l);(0,m.vV)(e)}"title"in e.layout&&(e.layout.title=p()(e.layout.title,{text:`<b>${e.layout.title.text}</b>`}))}var y=l(90782);const x={width:600,height:470,name:"fullscreen-expand",path:"M32 32C14.3 32 0 46.3 0 64v96c0 17.7 14.3 32 32 32s32-14.3 32-32V96h64c17.7 0 32-14.3 32-32s-14.3-32-32-32H32zM64 352c0-17.7-14.3-32-32-32s-32 14.3-32 32v96c0 17.7 14.3 32 32 32h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H64V352zM320 32c-17.7 0-32 14.3-32 32s14.3 32 32 32h64v64c0 17.7 14.3 32 32 32s32-14.3 32-32V64c0-17.7-14.3-32-32-32H320zM448 352c0-17.7-14.3-32-32-32s-32 14.3-32 32v64H320c-17.7 0-32 14.3-32 32s14.3 32 32 32h96c17.7 0 32-14.3 32-32V352z"},v={width:600,height:470,name:"fullscreen-collapse",path:"M160 64c0-17.7-14.3-32-32-32s-32 14.3-32 32v64H32c-17.7 0-32 14.3-32 32s14.3 32 32 32h96c17.7 0 32-14.3 32-32V64zM32 320c-17.7 0-32 14.3-32 32s14.3 32 32 32H96v64c0 17.7 14.3 32 32 32s32-14.3 32-32V352c0-17.7-14.3-32-32-32H32zM352 64c0-17.7-14.3-32-32-32s-32 14.3-32 32v96c0 17.7 14.3 32 32 32h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H352V64zM320 320c-17.7 0-32 14.3-32 32v96c0 17.7 14.3 32 32 32s32-14.3 32-32V384h64c17.7 0 32-14.3 32-32s-14.3-32-32-32H320z"};function A(e,o,l){const t=JSON.parse(f(JSON.stringify(e),l,o));return"streamlit"===o?g(t,l):t.layout=function(e,o){const{colors:l,genericFonts:t}=o,n={font:{color:l.bodyText,family:t.bodyFont},paper_bgcolor:l.bgColor,plot_bgcolor:l.secondaryBg};return{...e,font:{...n.font,...e.font},paper_bgcolor:e.paper_bgcolor||n.paper_bgcolor,plot_bgcolor:e.plot_bgcolor||n.plot_bgcolor}}(t.layout,l),t}function b(e,o,l,t){if(!e)return;const n={selection:{points:[],point_indices:[],box:[],lasso:[]}},i=new Set,s=[],a=[],d=[],{selections:p,points:u}=e;if(u&&u.forEach((function(e){d.push({...e,legendgroup:e.data.legendgroup||void 0,data:void 0,fullData:void 0}),(0,c.se)(e.pointIndex)&&i.add(e.pointIndex),(0,c.se)(e.pointIndices)&&e.pointIndices.length>0&&e.pointIndices.forEach((e=>i.add(e)))})),p&&p.forEach((e=>{if("rect"===e.type){const o=function(e){return"x0"in e&&"x1"in e&&"y0"in e&&"y1"in e?{x:[e.x0,e.x1],y:[e.y0,e.y1]}:{x:[],y:[]}}(e),l={xref:e.xref,yref:e.yref,x:o.x,y:o.y};s.push(l)}if("path"===e.type){const o=function(e){if(""===e)return{x:[],y:[]};const o=e.replace("M","").replace("Z","").split("L"),l=[],t=[];return o.forEach((e=>{const[o,n]=e.split(",").map(Number);l.push(o),t.push(n)})),{x:l,y:t}}(e.path),l={xref:e.xref,yref:e.yref,x:o.x,y:o.y};a.push(l)}})),n.selection.point_indices=Array.from(i),n.selection.points=d.map((e=>(0,c.wJ)(e))),n.selection.box=s,n.selection.lasso=a,n.selection.box.length>0&&!l.selectionMode.includes(r.P_.SelectionMode.BOX))return;if(n.selection.lasso.length>0&&!l.selectionMode.includes(r.P_.SelectionMode.LASSO))return;const h=o.getStringValue(l),m=JSON.stringify(n);h!==m&&o.setStringValue(l,m,{fromUi:!0},t)}const w=(0,s.A)((function(e){var o,l,s,c,d;let{element:p,width:u,height:h,widgetMgr:m,disabled:f,fragmentId:g,isFullScreen:w,expand:S,collapse:z,disableFullscreenMode:F}=e;const C=(0,n.u)(),M=(0,t.useMemo)((()=>p.spec?JSON.parse(p.spec):{layout:{},data:[],frames:void 0}),[p.id,p.spec]),[P,H]=(0,t.useState)((()=>{const e=m.getElementState(p.id,"figure");return e||A(M,p.theme,C)})),k=p.selectionMode.length>0&&!f,I=k&&p.selectionMode.includes(r.P_.SelectionMode.LASSO),V=k&&p.selectionMode.includes(r.P_.SelectionMode.BOX),E=k&&p.selectionMode.includes(r.P_.SelectionMode.POINTS),_=(0,t.useMemo)((()=>{if(!p.config)return{};const e=JSON.parse(p.config);var o;F||(e.modeBarButtonsToAdd=[{name:w?"Close fullscreen":"Fullscreen",icon:w?v:x,click:()=>{w&&z?z():S&&S()}},...null!==(o=e.modeBarButtonsToAdd)&&void 0!==o?o:[]]);if(!e.modeBarButtonsToRemove){e.displaylogo=!1;const o=["sendDataToCloud"];k?(I||o.push("lasso2d"),V||o.push("select2d")):o.push("lasso2d","select2d"),e.modeBarButtonsToRemove=o}return e}),[p.id,p.config,w,F,k,I,V,z,S]);(0,t.useEffect)((()=>{H((e=>A(e,p.theme,C)))}),[p.id,C,p.theme]),(0,t.useEffect)((()=>{let e=M.layout.clickmode,o=M.layout.hovermode,l=M.layout.dragmode;f?(e="none",l="pan"):k&&(M.layout.clickmode||(e=E?"event+select":"none"),M.layout.hovermode||(o="closest"),M.layout.dragmode||(l=E?"pan":V?"select":I?"lasso":"pan")),H((t=>t.layout.clickmode===e&&t.layout.hovermode===o&&t.layout.dragmode===l?t:{...t,layout:{...t.layout,clickmode:e,hovermode:o,dragmode:l}}))}),[p.id,k,E,V,I,f]);let L=-1===u?null===(o=P.layout)||void 0===o?void 0:o.width:Math.max(p.useContainerWidth?u:Math.min(null!==(l=M.layout.width)&&void 0!==l?l:u,u),150),T=M.layout.height;w&&(L=u,T=h),P.layout.height===T&&P.layout.width===L||H((e=>({...e,layout:{...e.layout,height:T,width:L}})));const W=(0,t.useCallback)((e=>{b(e,m,p,g)}),[p.id,m,g]),B=(0,t.useCallback)((function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];!function(e,o,l){const t=e.getStringValue(o),n=JSON.stringify({selection:{points:[],point_indices:[],box:[],lasso:[]}});t!==n&&e.setStringValue(o,n,{fromUi:!0},l)}(m,p,g),e&&setTimeout((()=>{H((e=>({...e,data:e.data.map((e=>({...e,selectedpoints:null}))),layout:{...e.layout,selections:[]}})))}),50)}),[p.id,m,g]);return(0,t.useEffect)((()=>{if(!p.formId||!k)return;const e=new a.o;return e.manageFormClearListener(m,p.formId,B),()=>{e.disconnect()}}),[p.formId,m,k,B]),(0,t.useEffect)((()=>{var e,o,l;if(!k)return;let t;t="select"===(null===(e=P.layout)||void 0===e?void 0:e.dragmode)||"lasso"===(null===(o=P.layout)||void 0===o?void 0:o.dragmode)?"event":E?"event+select":"none",(null===(l=P.layout)||void 0===l?void 0:l.clickmode)!==t&&H((e=>({...e,layout:{...e.layout,clickmode:t}})))}),[null===(s=P.layout)||void 0===s?void 0:s.dragmode]),(0,y.jsx)("div",{className:"stPlotlyChart","data-testid":"stPlotlyChart",children:(0,y.jsx)(i.A,{data:P.data,layout:P.layout,config:_,frames:null!==(c=P.frames)&&void 0!==c?c:void 0,style:{visibility:void 0===(null===(d=P.layout)||void 0===d?void 0:d.width)?"hidden":void 0},onSelected:k?W:()=>{},onDoubleClick:k?()=>B():void 0,onDeselect:k?()=>{B(!1)}:void 0,onInitialized:e=>{m.setElementState(p.id,"figure",e)},onUpdate:e=>{m.setElementState(p.id,"figure",e),H(e)}},w?"fullscreen":"original")})}),!0)},22044:(e,o,l)=>{l.d(o,{A:()=>y});var t=l(58878),n=l(53124),i=l.n(n),r=l(8151),s=l(41514),c=l(67214),a=l(64611),d=l(84152),p=l(89653);const u=(0,p.A)("button",{target:"e1vs0wn31"})((e=>{let{isExpanded:o,theme:l}=e;const t=o?{right:"0.4rem",top:"0.5rem",backgroundColor:"transparent"}:{right:"-3.0rem",top:"-0.375rem",opacity:0,transform:"scale(0)",backgroundColor:l.colors.lightenedBg05};return{position:"absolute",display:"flex",alignItems:"center",justifyContent:"center",zIndex:l.zIndices.sidebar+1,height:"2.5rem",width:"2.5rem",transition:"opacity 300ms 150ms, transform 300ms 150ms",border:"none",color:l.colors.fadedText60,borderRadius:"50%",...t,"&:focus":{outline:"none"},"&:active, &:focus-visible, &:hover":{opacity:1,outline:"none",transform:"scale(1)",color:l.colors.bodyText,transition:"none"}}}),""),h=(0,p.A)("div",{target:"e1vs0wn30"})((e=>{let{theme:o,isExpanded:l}=e;return{"&:hover":{[u]:{opacity:1,transform:"scale(1)",transition:"none"}},...l?{position:"fixed",top:0,left:0,bottom:0,right:0,background:o.colors.bgColor,zIndex:o.zIndices.fullscreenWrapper,padding:o.spacing.md,paddingTop:o.sizes.fullScreenHeaderHeight,overflow:["auto","overlay"],display:"flex",alignItems:"center",justifyContent:"center"}:{}}}),"");var m=l(90782);class f extends t.PureComponent{constructor(e){super(e),this.context=void 0,this.controlKeys=e=>{const{expanded:o}=this.state;27===e.keyCode&&o&&this.zoomOut()},this.zoomIn=()=>{document.body.style.overflow="hidden",this.context.setFullScreen(!0),this.setState({expanded:!0})},this.zoomOut=()=>{document.body.style.overflow="unset",this.context.setFullScreen(!1),this.setState({expanded:!1})},this.convertScssRemValueToPixels=e=>parseFloat(e)*parseFloat(getComputedStyle(document.documentElement).fontSize),this.getWindowDimensions=()=>{const e=this.convertScssRemValueToPixels(this.props.theme.spacing.md),o=this.convertScssRemValueToPixels(this.props.theme.sizes.fullScreenHeaderHeight);return{fullWidth:window.innerWidth-2*e,fullHeight:window.innerHeight-(e+o)}},this.updateWindowDimensions=()=>{this.setState(this.getWindowDimensions())},this.state={expanded:!1,...this.getWindowDimensions()}}componentDidMount(){window.addEventListener("resize",this.updateWindowDimensions),document.addEventListener("keydown",this.controlKeys,!1)}componentWillUnmount(){window.removeEventListener("resize",this.updateWindowDimensions),document.removeEventListener("keydown",this.controlKeys,!1)}render(){const{expanded:e,fullWidth:o,fullHeight:l}=this.state,{children:t,width:n,height:i,disableFullscreenMode:r}=this.props;let d=s.u,p=this.zoomIn,f="View fullscreen";return e&&(d=c.Q,p=this.zoomOut,f="Exit fullscreen"),(0,m.jsxs)(h,{isExpanded:e,"data-testid":"stFullScreenFrame",children:[!r&&(0,m.jsx)(u,{"data-testid":"StyledFullScreenButton",onClick:p,title:f,isExpanded:e,children:(0,m.jsx)(a.A,{content:d})}),t(e?{width:o,height:l,expanded:e,expand:this.zoomIn,collapse:this.zoomOut}:{width:n,height:i,expanded:e,expand:this.zoomIn,collapse:this.zoomOut})]})}}f.contextType=d.n;const g=(0,r.b)(f);const y=function(e){let o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];class l extends t.PureComponent{constructor(){super(...arguments),this.render=()=>{const{width:l,height:t,disableFullscreenMode:n}=this.props;return(0,m.jsx)(g,{width:l,height:t,disableFullscreenMode:o||n,children:o=>{let{width:l,height:t,expanded:n,expand:i,collapse:r}=o;return(0,m.jsx)(e,{...this.props,width:l,height:t,isFullScreen:n,expand:i,collapse:r})}})}}}return l.displayName=`withFullScreenWrapper(${e.displayName||e.name})`,i()(l,e)}},34752:(e,o,l)=>{l.d(o,{X:()=>r,o:()=>i});var t=l(58878),n=l(25571);class i{constructor(){this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}manageFormClearListener(e,o,l){(0,n.se)(this.formClearListener)&&this.lastWidgetMgr===e&&this.lastFormId===o||(this.disconnect(),(0,n._L)(o)&&(this.formClearListener=e.addFormClearedListener(o,l),this.lastWidgetMgr=e,this.lastFormId=o))}disconnect(){var e;null===(e=this.formClearListener)||void 0===e||e.disconnect(),this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}}function r(e){let{element:o,widgetMgr:l,onFormCleared:i}=e;(0,t.useEffect)((()=>{if(!(0,n._L)(o.formId))return;const e=l.addFormClearedListener(o.formId,i);return()=>{e.disconnect()}}),[o,l,i])}}}]);
|
@@ -1,5 +0,0 @@
|
|
1
|
-
"use strict";(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[954],{68035:(e,t,r)=>{r.d(t,{A:()=>d});r(58878);var o=r(25571),i=r(78286),l=r(89653);const n=r(60667).i7`
|
2
|
-
50% {
|
3
|
-
color: rgba(0, 0, 0, 0);
|
4
|
-
}
|
5
|
-
`,a=(0,l.A)("span",{target:"edlqvik0"})((e=>{let{includeDot:t,shouldBlink:r,theme:o}=e;return{...t?{"&::before":{opacity:1,content:'"\u2022"',animation:"none",color:o.colors.gray,margin:"0 5px"}}:{},...r?{color:o.colors.red,animationName:`${n}`,animationDuration:"0.5s",animationIterationCount:5}:{}}}),"");var s=r(90782);const d=e=>{let{dirty:t,value:r,inForm:l,maxLength:n,className:d,type:u="single",allowEnterToSubmit:c=!0}=e;const p=[],m=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];p.push((0,s.jsx)(a,{includeDot:p.length>0,shouldBlink:t,children:e},p.length))};if(t&&c){const e=l?"submit form":"apply";if("multiline"===u){m(`Press ${(0,o.u_)()?"\u2318":"Ctrl"}+Enter to ${e}`)}else"single"===u&&m(`Press Enter to ${e}`)}return n&&("chat"!==u||t)&&m(`${r.length}/${n}`,t&&r.length>=n),(0,s.jsx)(i.tp,{"data-testid":"InputInstructions",className:d,children:p})}},34752:(e,t,r)=>{r.d(t,{X:()=>n,o:()=>l});var o=r(58878),i=r(25571);class l{constructor(){this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}manageFormClearListener(e,t,r){(0,i.se)(this.formClearListener)&&this.lastWidgetMgr===e&&this.lastFormId===t||(this.disconnect(),(0,i._L)(t)&&(this.formClearListener=e.addFormClearedListener(t,r),this.lastWidgetMgr=e,this.lastFormId=t))}disconnect(){var e;null===(e=this.formClearListener)||void 0===e||e.disconnect(),this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}}function n(e){let{element:t,widgetMgr:r,onFormCleared:l}=e;(0,o.useEffect)((()=>{if(!(0,i._L)(t.formId))return;const e=r.addFormClearedListener(t.formId,l);return()=>{e.disconnect()}}),[t,r,l])}},10954:(e,t,r)=>{r.r(t),r.d(t,{default:()=>j});var o=r(58878),i=r(27774),l=r(94388),n=r(8151),a=r(34694),s=r(59095),d=r(32698),u=r.n(d),c=r(25571),p=r(34752),m=r(84996),h=r(29669),g=r(93480),b=r(997),f=r(64611),v=r(68035),y=r(70474),I=r(78286),w=r(89653);const x=(0,w.A)("div",{target:"e116k4er3"})((e=>{let{theme:t}=e;return{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}}}}),""),C=(0,w.A)("div",{target:"e116k4er2"})({name:"76z9jo",styles:"display:flex;flex-direction:row;align-self:stretch"}),T=(0,w.A)("button",{target:"e116k4er1"})((e=>{let{theme:t}=e;return{margin:t.spacing.none,border:"none",height:t.sizes.full,display:"flex",alignItems:"center",width:"32px",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}}}),""),k=(0,w.A)("div",{target:"e116k4er0"})((e=>{let{theme:t,clearable:r}=e;return{position:"absolute",marginRight:t.spacing.twoXS,left:0,right:64+(r?12:0)+"px"}}),"");var F=r(90782);const R=e=>{let{step:t,dataType:r}=e;return t||(r===h.Q7.DataType.INT?1:.01)},D=e=>{let{value:t,format:r,step:o,dataType:i}=e;if((0,c.hX)(t))return null;let l=function(e){return(0,c.hX)(e)||""===e?void 0:e}(r);if((0,c.hX)(l)&&(0,c.se)(o)){const e=o.toString();if(i===h.Q7.DataType.FLOAT&&0!==o&&e.includes(".")){l=`%0.${e.split(".")[1].length}f`}}if((0,c.hX)(l))return t.toString();try{return(0,a.sprintf)(l,t)}catch(n){return(0,m.FF)(`Error in sprintf(${l}, ${t}): ${n}`),String(t)}},j=(0,n.b)((e=>{var t;let{disabled:r,element:n,widgetMgr:a,width:d,theme:m,fragmentId:w}=e;const{dataType:j,id:L,formId:A,default:N,format:S}=n,W=n.hasMin?n.min:-1/0,E=n.hasMax?n.max:1/0,[M,B]=o.useState(R(n)),V=(e=>{var t;const r=e.element.dataType===h.Q7.DataType.INT?e.widgetMgr.getIntValue(e.element):e.widgetMgr.getDoubleValue(e.element);return null!==(t=null!==r&&void 0!==r?r:e.element.default)&&void 0!==t?t:null})({element:n,widgetMgr:a}),[X,$]=o.useState(!1),[_,U]=o.useState(V),[z,Q]=o.useState(D({value:V,...n,step:M})),[H,P]=o.useState(!1),O=o.useRef(null),G=o.useRef(new p.o),K=o.useRef(u()("number_input_")),q=((e,t,r)=>!(0,c.hX)(e)&&e-t>=r)(_,M,W),J=((e,t,r)=>!(0,c.hX)(e)&&e+t<=r)(_,M,E),Y=(0,c.Ml)({formId:A}),Z=a.allowFormEnterToSubmit(A);o.useEffect((()=>{B(R({step:n.step,dataType:n.dataType}))}),[n.dataType,n.step]);const ee=o.useCallback((e=>{let{value:t,source:r}=e;if((0,c.se)(t)&&(W>t||t>E)){var o;null===(o=O.current)||void 0===o||o.reportValidity()}else{var i;const e=null!==(i=null!==t&&void 0!==t?t:N)&&void 0!==i?i:null;switch(j){case h.Q7.DataType.INT:a.setIntValue({id:L,formId:A},e,r,w);break;case h.Q7.DataType.FLOAT:a.setDoubleValue({id:L,formId:A},e,r,w);break;default:throw new Error("Invalid data type")}$(!1),U(e),Q(D({value:e,dataType:j,format:S,step:M}))}}),[W,E,O,a,w,M,j,L,A,N,S]),te=()=>{const{value:e}=n;n.setValue=!1,U(null!==e&&void 0!==e?e:null),Q(D({value:null!==e&&void 0!==e?e:null,...n,step:M})),ee({value:null!==e&&void 0!==e?e:null,source:{fromUi:!1}})};o.useEffect((()=>{const e=G.current;return n.setValue?te():ee({value:_,source:{fromUi:!1}}),()=>{e.disconnect()}}),[]),n.setValue&&te();const re=(0,c.hX)(n.default)&&!r;G.current.manageFormClearListener(a,n.formId,(()=>{var e;U(null!==(e=n.default)&&void 0!==e?e:null),ee({value:_,source:{fromUi:!0}})}));const oe=o.useCallback((()=>{J&&($(!0),ee({value:(null!==_&&void 0!==_?_:W)+M,source:{fromUi:!0}}))}),[_,W,M,J]),ie=o.useCallback((()=>{q&&($(!0),ee({value:(null!==_&&void 0!==_?_:E)-M,source:{fromUi:!0}}))}),[_,E,M,q]),le=o.useCallback((e=>{const{key:t}=e;switch(t){case"ArrowUp":e.preventDefault(),oe();break;case"ArrowDown":e.preventDefault(),ie()}}),[oe,ie]),ne=o.useCallback((e=>{"Enter"===e.key&&(X&&ee({value:_,source:{fromUi:!0}}),Z&&a.submitForm(A,w))}),[X,_,ee,a,A,w,Z]);return(0,F.jsxs)("div",{className:"stNumberInput","data-testid":"stNumberInput",style:{width:d},children:[(0,F.jsx)(y.L,{label:n.label,disabled:r,labelVisibility:(0,c.yv)(null===(t=n.labelVisibility)||void 0===t?void 0:t.value),htmlFor:K.current,children:n.help&&(0,F.jsx)(I.j,{children:(0,F.jsx)(g.A,{content:n.help,placement:b.W.TOP_RIGHT})})}),(0,F.jsxs)(x,{className:H?"focused":"","data-testid":"stNumberInputContainer",children:[(0,F.jsx)(s.A,{type:"number",inputRef:O,value:null!==z&&void 0!==z?z:"",placeholder:n.placeholder,onBlur:()=>(X&&ee({value:_,source:{fromUi:!0}}),void P(!1)),onFocus:()=>{P(!0)},onChange:e=>(e=>{const{value:t}=e.target;if(""===t)$(!0),U(null),Q(null);else{let e;e=n.dataType===h.Q7.DataType.INT?parseInt(t,10):parseFloat(t),$(!0),U(e),Q(t)}})(e),onKeyPress:e=>ne(e),onKeyDown:e=>le(e),clearable:re,clearOnEscape:re,disabled:r,"aria-label":n.label,id:K.current,overrides:{ClearIcon:{props:{overrides:{Svg:{style:{color:m.colors.darkGray,transform:"scale(1.4)",width:m.spacing.twoXL,marginRight:"-1.25em",":hover":{fill:m.colors.bodyText}}}}}},Input:{props:{"data-testid":"stNumberInputField",step:M,min:W,max:E},style:{lineHeight:m.lineHeights.inputWidget,paddingRight:m.spacing.sm,paddingLeft:m.spacing.sm,paddingBottom:m.spacing.sm,paddingTop:m.spacing.sm}},InputContainer:{style:()=>({borderTopRightRadius:0,borderBottomRightRadius:0})},Root:{style:()=>({borderTopRightRadius:0,borderBottomRightRadius:0,borderLeftWidth:0,borderRightWidth:0,borderTopWidth:0,borderBottomWidth:0})}}}),d>m.breakpoints.hideNumberInputControls&&(0,F.jsxs)(C,{children:[(0,F.jsx)(T,{"data-testid":"stNumberInputStepDown",onClick:ie,disabled:!q||r,tabIndex:-1,children:(0,F.jsx)(f.A,{content:i.H,size:"xs",color:q?"inherit":"disabled"})}),(0,F.jsx)(T,{"data-testid":"stNumberInputStepUp",onClick:oe,disabled:!J||r,tabIndex:-1,children:(0,F.jsx)(f.A,{content:l.F,size:"xs",color:J?"inherit":"disabled"})})]})]}),d>m.breakpoints.hideWidgetDetails&&(0,F.jsx)(k,{clearable:re,children:(0,F.jsx)(v.A,{dirty:X,value:null!==z&&void 0!==z?z:"",inForm:Y,allowEnterToSubmit:Z||!Y})})]})}))}}]);
|