streamlit-nightly 1.53.2.dev20260131__py3-none-any.whl → 1.53.2.dev20260203__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.
Files changed (205) hide show
  1. streamlit/commands/execution_control.py +2 -2
  2. streamlit/commands/logo.py +6 -10
  3. streamlit/components/v2/component_path_utils.py +17 -29
  4. streamlit/config.py +4 -2
  5. streamlit/delta_generator.py +2 -0
  6. streamlit/elements/lib/column_types.py +6 -2
  7. streamlit/elements/lib/utils.py +6 -6
  8. streamlit/elements/markdown.py +0 -1
  9. streamlit/elements/metric.py +2 -1
  10. streamlit/elements/widgets/button_group.py +6 -276
  11. streamlit/elements/widgets/feedback.py +322 -0
  12. streamlit/elements/widgets/number_input.py +2 -1
  13. streamlit/elements/widgets/slider.py +2 -1
  14. streamlit/material_icon_names.py +1 -1
  15. streamlit/path_security.py +98 -0
  16. streamlit/proto/AudioInput_pb2.py +4 -4
  17. streamlit/proto/AudioInput_pb2.pyi +3 -3
  18. streamlit/proto/Audio_pb2.py +2 -2
  19. streamlit/proto/BackMsg_pb2.pyi +2 -10
  20. streamlit/proto/Balloons_pb2.pyi +0 -2
  21. streamlit/proto/Block_pb2.py +35 -35
  22. streamlit/proto/ButtonGroup_pb2.py +10 -12
  23. streamlit/proto/ButtonGroup_pb2.pyi +6 -41
  24. streamlit/proto/Button_pb2.py +2 -2
  25. streamlit/proto/CameraInput_pb2.py +4 -4
  26. streamlit/proto/CameraInput_pb2.pyi +3 -3
  27. streamlit/proto/ChatInput_pb2.py +2 -2
  28. streamlit/proto/Checkbox_pb2.py +6 -6
  29. streamlit/proto/Checkbox_pb2.pyi +3 -3
  30. streamlit/proto/Code_pb2.py +2 -2
  31. streamlit/proto/ColorPicker_pb2.py +4 -4
  32. streamlit/proto/ColorPicker_pb2.pyi +3 -3
  33. streamlit/proto/Common_pb2.py +6 -6
  34. streamlit/proto/DateInput_pb2.py +4 -4
  35. streamlit/proto/DateInput_pb2.pyi +3 -3
  36. streamlit/proto/DateTimeInput_pb2.py +4 -4
  37. streamlit/proto/DateTimeInput_pb2.pyi +3 -3
  38. streamlit/proto/DeckGlJsonChart_pb2.py +2 -2
  39. streamlit/proto/Delta_pb2.py +2 -2
  40. streamlit/proto/DocString_pb2.py +1 -1
  41. streamlit/proto/Element_pb2.py +4 -4
  42. streamlit/proto/Element_pb2.pyi +9 -9
  43. streamlit/proto/Feedback_pb2.py +28 -0
  44. streamlit/proto/Feedback_pb2.pyi +93 -0
  45. streamlit/proto/FileUploader_pb2.py +4 -4
  46. streamlit/proto/FileUploader_pb2.pyi +3 -3
  47. streamlit/proto/ForwardMsg_pb2.py +8 -8
  48. streamlit/proto/GraphVizChart_pb2.py +2 -2
  49. streamlit/proto/IFrame_pb2.py +3 -3
  50. streamlit/proto/Image_pb2.py +4 -4
  51. streamlit/proto/Image_pb2.pyi +1 -7
  52. streamlit/proto/{BokehChart_pb2.py → LabelVisibility_pb2.py} +7 -5
  53. streamlit/proto/{LabelVisibilityMessage_pb2.pyi → LabelVisibility_pb2.pyi} +14 -14
  54. streamlit/proto/Markdown_pb2.py +4 -4
  55. streamlit/proto/Markdown_pb2.pyi +1 -5
  56. streamlit/proto/Metric_pb2.py +10 -10
  57. streamlit/proto/Metric_pb2.pyi +3 -3
  58. streamlit/proto/MultiSelect_pb2.py +4 -4
  59. streamlit/proto/MultiSelect_pb2.pyi +3 -3
  60. streamlit/proto/NewSession_pb2.py +38 -26
  61. streamlit/proto/NewSession_pb2.pyi +42 -8
  62. streamlit/proto/NumberInput_pb2.py +6 -6
  63. streamlit/proto/NumberInput_pb2.pyi +3 -3
  64. streamlit/proto/PlotlyChart_pb2.py +2 -2
  65. streamlit/proto/Radio_pb2.py +4 -4
  66. streamlit/proto/Radio_pb2.pyi +3 -3
  67. streamlit/proto/Selectbox_pb2.py +4 -4
  68. streamlit/proto/Selectbox_pb2.pyi +3 -6
  69. streamlit/proto/Slider_pb2.py +8 -8
  70. streamlit/proto/Slider_pb2.pyi +3 -3
  71. streamlit/proto/Snow_pb2.pyi +0 -2
  72. streamlit/proto/TextArea_pb2.py +4 -4
  73. streamlit/proto/TextArea_pb2.pyi +3 -3
  74. streamlit/proto/TextInput_pb2.py +6 -6
  75. streamlit/proto/TextInput_pb2.pyi +3 -3
  76. streamlit/proto/TimeInput_pb2.py +4 -4
  77. streamlit/proto/TimeInput_pb2.pyi +3 -3
  78. streamlit/proto/Video_pb2.py +2 -2
  79. streamlit/runtime/app_session.py +9 -1
  80. streamlit/static/index.html +2 -2
  81. streamlit/static/manifest.json +325 -310
  82. streamlit/static/static/css/{index.BUP6fTcR.css → index.C8MrxwGF.css} +1 -1
  83. streamlit/static/static/js/{ErrorOutline.esm.DC6KVDKK.js → ErrorOutline.esm.C9uHPmIj.js} +1 -1
  84. streamlit/static/static/js/{FileDownload.esm.Z9hRQIHi.js → FileDownload.esm.D-YPxF3t.js} +1 -1
  85. streamlit/static/static/js/{FileHelper.DqvW90pm.js → FileHelper.DQSH0zYW.js} +1 -1
  86. streamlit/static/static/js/{FormClearHelper.DTFnX0js.js → FormClearHelper.DQoXcOWo.js} +1 -1
  87. streamlit/static/static/js/{InputInstructions.CdzsN_Va.js → InputInstructions.C7VMyGT7.js} +1 -1
  88. streamlit/static/static/js/{Particles.12xFSjcn.js → Particles.BdQSRZde.js} +1 -1
  89. streamlit/static/static/js/{ProgressBar.Dg-oMbWg.js → ProgressBar.DNF_pWKr.js} +2 -2
  90. streamlit/static/static/js/{StreamlitSyntaxHighlighter.rbzmcipw.js → StreamlitSyntaxHighlighter.Cys9Bt18.js} +2 -2
  91. streamlit/static/static/js/{TableChart.esm.CzJtGIR-.js → TableChart.esm.B9SMgSK4.js} +1 -1
  92. streamlit/static/static/js/{Toolbar.COH7NaOE.js → Toolbar.BXfC9Z-W.js} +1 -1
  93. streamlit/static/static/js/{WidgetLabelHelpIconInline.Dlc8f0Ji.js → WidgetLabelHelpIconInline.gkreC55g.js} +1 -1
  94. streamlit/static/static/js/{base-input.Q-zJLgRK.js → base-input.iB32RS3w.js} +4 -4
  95. streamlit/static/static/js/{checkbox.BKgWNdeI.js → checkbox.Bqz68SYq.js} +1 -1
  96. streamlit/static/static/js/{createDownloadLinkElement.6oO-YlYv.js → createDownloadLinkElement.YxVC9Qur.js} +1 -1
  97. streamlit/static/static/js/data-grid-overlay-editor.sBsdk5Xg.js +1 -0
  98. streamlit/static/static/js/{downloader.BBXcXdX1.js → downloader.Bzxqt3AW.js} +1 -1
  99. streamlit/static/static/js/{embed.CJzOXYBF.js → embed.CDzakah3.js} +1 -1
  100. streamlit/static/static/js/{es6.CdxPQzwJ.js → es6.CxCc4bfn.js} +2 -2
  101. streamlit/static/static/js/formatNumber.L8T7D36k.js +1 -0
  102. streamlit/static/static/js/{iconPosition.BVScIr6G.js → iconPosition.C47DkA-1.js} +1 -1
  103. streamlit/static/static/js/{iframeResizer.contentWindow.D_QHVqPM.js → iframeResizer.contentWindow.uEFLXEg3.js} +1 -1
  104. streamlit/static/static/js/{index.CvtybR-u.js → index.B3zULhHv.js} +1 -1
  105. streamlit/static/static/js/{index.DAyGxxdm.js → index.B60AZFRh.js} +3 -3
  106. streamlit/static/static/js/{index.BED2_zc7.js → index.BG4RxMOI.js} +1 -1
  107. streamlit/static/static/js/{index.CPc_uZux.js → index.BHyzKS4e.js} +45 -45
  108. streamlit/static/static/js/{index.Dud7RRHc.js → index.BVTW_o-a.js} +1 -1
  109. streamlit/static/static/js/{index.BQnLeHnr.js → index.BV_YgIHe.js} +3 -3
  110. streamlit/static/static/js/index.B_LfkwqU.js +2 -0
  111. streamlit/static/static/js/{index.DCe7fo-m.js → index.Ba8L-ulI.js} +1 -1
  112. streamlit/static/static/js/{index.DAfIQKfP.js → index.Bh5BZaHG.js} +2 -2
  113. streamlit/static/static/js/{index.DU68jVpM.js → index.Bnwh8oZr.js} +16 -16
  114. streamlit/static/static/js/index.BrZtYm2A.js +2 -0
  115. streamlit/static/static/js/index.BsrhCS7f.js +1 -0
  116. streamlit/static/static/js/{index.CxoREvnF.js → index.BuJPJSD7.js} +2 -2
  117. streamlit/static/static/js/{index.6DFY6LUF.js → index.BvHsyiyy.js} +1 -1
  118. streamlit/static/static/js/{index.Biyf9aUg.js → index.BwTkGOAy.js} +2 -2
  119. streamlit/static/static/js/{index.DNfyKqhQ.js → index.BwvxzVOo.js} +1 -1
  120. streamlit/static/static/js/{index.iXh5nbLZ.js → index.BzdcdLDK.js} +1 -1
  121. streamlit/static/static/js/{index.YULCxEtm.js → index.C1d2QjTR.js} +1 -1
  122. streamlit/static/static/js/index.C1uZrWog.js +1 -0
  123. streamlit/static/static/js/{index.C5oqIM3a.js → index.C5-TpWis.js} +1 -1
  124. streamlit/static/static/js/{index.D6OexhdL.js → index.C6dhwBSe.js} +1 -1
  125. streamlit/static/static/js/{index.y-pa6LIX.js → index.CAbQaUvi.js} +1 -1
  126. streamlit/static/static/js/{index.BSpYHDvk.js → index.CAbafj7s.js} +1 -1
  127. streamlit/static/static/js/{index.BDtN2n7T.js → index.CCLteRW6.js} +1 -1
  128. streamlit/static/static/js/{index.mSdC1FV6.js → index.CQ713nQM.js} +1 -1
  129. streamlit/static/static/js/index.CcBYyLfq.js +2 -0
  130. streamlit/static/static/js/{index.CBE2cIbj.js → index.CjBDVb1a.js} +1 -1
  131. streamlit/static/static/js/{index.BxQxTpWl.js → index.Ck0ZkOfK.js} +1 -1
  132. streamlit/static/static/js/{index.B80gSxrS.js → index.CzwJzgQs.js} +1 -1
  133. streamlit/static/static/js/{index.DyfvmNCy.js → index.D-9VyyiA.js} +1 -1
  134. streamlit/static/static/js/{index.nL1fkE1D.js → index.D2R3Co5f.js} +1 -1
  135. streamlit/static/static/js/{index.DZmBuE3z.js → index.D7L9gHlE.js} +3 -3
  136. streamlit/static/static/js/{index.BqxwnMem.js → index.DEKnCsY-.js} +2 -2
  137. streamlit/static/static/js/{index.D9v2Y8Gk.js → index.DHrByikW.js} +1 -1
  138. streamlit/static/static/js/index.DN_oudQl.js +1 -0
  139. streamlit/static/static/js/{index.DrcbvB2t.js → index.DO55kRo5.js} +1 -1
  140. streamlit/static/static/js/{index.BqbKiDp2.js → index.D_cvtSlg.js} +1 -1
  141. streamlit/static/static/js/{index.CrY1BsL3.js → index.DgqmsDCJ.js} +1 -1
  142. streamlit/static/static/js/{index.BtOoVQt7.js → index.DjgdCvlK.js} +1 -1
  143. streamlit/static/static/js/{index.BxMkW82k.js → index.DqhZqWYB.js} +1 -1
  144. streamlit/static/static/js/{index.bQJYmJ2T.js → index.Dtbj_oyb.js} +1 -1
  145. streamlit/static/static/js/{index.CUYi3FrD.js → index.QXukCzoh.js} +1 -1
  146. streamlit/static/static/js/{index.BiCbrx53.js → index.XJY9qZ6a.js} +1 -1
  147. streamlit/static/static/js/{index.GieKl4BG.js → index.aZRhdEuX.js} +1 -1
  148. streamlit/static/static/js/{index._1zqETQ9.js → index.fUsWkW8E.js} +1 -1
  149. streamlit/static/static/js/index.h2N-W51I.js +11 -0
  150. streamlit/static/static/js/index.iUHLeAvv.js +1 -0
  151. streamlit/static/static/js/{index.DRoJNzFX.js → index.kBgXO7Vv.js} +1 -1
  152. streamlit/static/static/js/{index.BSYebegS.js → index.kEL0HsUR.js} +1 -1
  153. streamlit/static/static/js/index.w7yKy9fh.js +6 -0
  154. streamlit/static/static/js/{input.BcC6sPE_.js → input.BCHJn1Cw.js} +1 -1
  155. streamlit/static/static/js/{main.TU5_aabd.js → main.23ZP6f1E.js} +1 -1
  156. streamlit/static/static/js/{memory.By_OTlI4.js → memory.D8f8Q4mO.js} +1 -1
  157. streamlit/static/static/js/number-overlay-editor.ZWvSpjJ5.js +9 -0
  158. streamlit/static/static/js/{pandasStylerUtils.3IiIKU9-.js → pandasStylerUtils.DlZ2GBs_.js} +1 -1
  159. streamlit/static/static/js/{sandbox.DnxTbWzV.js → sandbox.BH6D3KL9.js} +1 -1
  160. streamlit/static/static/js/sprintfjs.CtrdaGLQ.js +1 -0
  161. streamlit/static/static/js/{styled-components.BeEcZ0vW.js → styled-components.iD1HRMLc.js} +1 -1
  162. streamlit/static/static/js/{throttle.emUyC44c.js → throttle.DR7d9vp_.js} +1 -1
  163. streamlit/static/static/js/{timepicker.DZ_ZufYF.js → timepicker.Bd34xjcG.js} +4 -4
  164. streamlit/static/static/js/{toConsumableArray.DDV1bN1-.js → toConsumableArray.BDTTq1c5.js} +2 -2
  165. streamlit/static/static/js/uniqueId.Bd_Iuzvc.js +1 -0
  166. streamlit/static/static/js/useBasicWidgetState.BXKaD8DQ.js +1 -0
  167. streamlit/static/static/js/{useIntlLocale.BBDLbTq9.js → useIntlLocale.CysOvegI.js} +1 -1
  168. streamlit/static/static/js/{useTextInputAutoExpand.BIApLJKn.js → useTextInputAutoExpand.CVd5Hf2S.js} +1 -1
  169. streamlit/static/static/js/{useUpdateUiValue.DQ4RuJNC.js → useUpdateUiValue.CIUgfO8X.js} +1 -1
  170. streamlit/static/static/js/{useWaveformController.B0olyXLQ.js → useWaveformController.CDLqlnLv.js} +1 -1
  171. streamlit/static/static/js/{withCalculatedWidth.DYeqePuh.js → withCalculatedWidth.Ce1Zblb2.js} +1 -1
  172. streamlit/static/static/js/{withFullScreenWrapper.DtkUCO_d.js → withFullScreenWrapper.DBm7N75M.js} +1 -1
  173. streamlit/static/static/media/MaterialSymbols-Rounded.CnH1S47a.woff2 +0 -0
  174. streamlit/testing/v1/app_test.py +21 -5
  175. streamlit/testing/v1/element_tree.py +65 -2
  176. streamlit/web/server/app_static_file_handler.py +9 -0
  177. streamlit/web/server/bidi_component_request_handler.py +4 -4
  178. streamlit/web/server/component_file_utils.py +14 -6
  179. streamlit/web/server/component_request_handler.py +2 -2
  180. streamlit/web/server/starlette/starlette_app.py +7 -1
  181. streamlit/web/server/starlette/starlette_path_security_middleware.py +97 -0
  182. streamlit/web/server/starlette/starlette_routes.py +6 -3
  183. streamlit/web/server/starlette/starlette_static_routes.py +14 -4
  184. {streamlit_nightly-1.53.2.dev20260131.dist-info → streamlit_nightly-1.53.2.dev20260203.dist-info}/METADATA +1 -1
  185. {streamlit_nightly-1.53.2.dev20260131.dist-info → streamlit_nightly-1.53.2.dev20260203.dist-info}/RECORD +188 -184
  186. streamlit/proto/BokehChart_pb2.pyi +0 -56
  187. streamlit/proto/LabelVisibilityMessage_pb2.py +0 -28
  188. streamlit/static/static/js/data-grid-overlay-editor.CO0xdNiG.js +0 -1
  189. streamlit/static/static/js/formatNumber.DB5irY8c.js +0 -1
  190. streamlit/static/static/js/index.BBTKOM0z.js +0 -6
  191. streamlit/static/static/js/index.CE2WIFD1.js +0 -2
  192. streamlit/static/static/js/index.Cpu2p5bH.js +0 -1
  193. streamlit/static/static/js/index.CtbETWQK.js +0 -2
  194. streamlit/static/static/js/index.DAnczAW2.js +0 -2
  195. streamlit/static/static/js/index.DhRAGiPR.js +0 -1
  196. streamlit/static/static/js/index.DyXcT2tD.js +0 -11
  197. streamlit/static/static/js/index.tuFFlbxa.js +0 -1
  198. streamlit/static/static/js/number-overlay-editor.FSRaRpbU.js +0 -9
  199. streamlit/static/static/js/sprintf.DpPCfzXw.js +0 -1
  200. streamlit/static/static/js/uniqueId.DTwvAE-J.js +0 -1
  201. streamlit/static/static/js/useBasicWidgetState.DvpdEDYZ.js +0 -1
  202. streamlit/static/static/media/MaterialSymbols-Rounded.C7IFxh57.woff2 +0 -0
  203. {streamlit_nightly-1.53.2.dev20260131.dist-info → streamlit_nightly-1.53.2.dev20260203.dist-info}/WHEEL +0 -0
  204. {streamlit_nightly-1.53.2.dev20260131.dist-info → streamlit_nightly-1.53.2.dev20260203.dist-info}/entry_points.txt +0 -0
  205. {streamlit_nightly-1.53.2.dev20260131.dist-info → streamlit_nightly-1.53.2.dev20260203.dist-info}/top_level.txt +0 -0
@@ -1,4 +1,4 @@
1
- import{r as O,bd as Hr,be as Ar,bf as Er,bg as Rr,al as Xr,cz as Qr,ag as Jr,am as X,ao as Ae,ap as Ee,cA as Zr,an as Lr,w as W,aK as Tr,cB as Gr,at as xr,av as ir,bT as en,b7 as Ne,bi as tn,bj as rn,aX as nn,aw as an,aJ as on}from"./index.CPc_uZux.js";import{D as Ce,a as Ie,T as sn}from"./timepicker.DZ_ZufYF.js";import{I as ln}from"./input.BcC6sPE_.js";import{d as un}from"./base-input.Q-zJLgRK.js";var cn=["title","size","color","overrides"];function ht(){return ht=Object.assign?Object.assign.bind():function(t){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},ht.apply(this,arguments)}function dn(t,r){if(t==null)return{};var n=pn(t,r),a,e;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(e=0;e<o.length;e++)a=o[e],!(r.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(t,a)&&(n[a]=t[a])}return n}function pn(t,r){if(t==null)return{};var n={},a=Object.keys(t),e,o;for(o=0;o<a.length;o++)e=a[o],!(r.indexOf(e)>=0)&&(n[e]=t[e]);return n}function fn(t,r){return gn(t)||vn(t,r)||yn(t,r)||hn()}function hn(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{r as O,bl as Hr,bm as Ar,bn as Er,bo as Rr,an as Xr,cB as Qr,ai as Jr,ao as X,aq as Ae,ar as Ee,cC as Zr,ap as Lr,w as W,aM as Tr,cD as Gr,av as xr,ax as ir,bV as en,bg as Ne,bq as tn,br as rn,b4 as nn,ay as an,aL as on}from"./index.BHyzKS4e.js";import{D as Ce,a as Ie,T as sn}from"./timepicker.Bd34xjcG.js";import{I as ln}from"./input.BCHJn1Cw.js";import{d as un}from"./base-input.iB32RS3w.js";var cn=["title","size","color","overrides"];function ht(){return ht=Object.assign?Object.assign.bind():function(t){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},ht.apply(this,arguments)}function dn(t,r){if(t==null)return{};var n=pn(t,r),a,e;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(e=0;e<o.length;e++)a=o[e],!(r.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(t,a)&&(n[a]=t[a])}return n}function pn(t,r){if(t==null)return{};var n={},a=Object.keys(t),e,o;for(o=0;o<a.length;o++)e=a[o],!(r.indexOf(e)>=0)&&(n[e]=t[e]);return n}function fn(t,r){return gn(t)||vn(t,r)||yn(t,r)||hn()}function hn(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yn(t,r){if(t){if(typeof t=="string")return sr(t,r);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sr(t,r)}}function sr(t,r){(r==null||r>t.length)&&(r=t.length);for(var n=0,a=new Array(r);n<r;n++)a[n]=t[n];return a}function vn(t,r){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var a=[],e=!0,o=!1,i,s;try{for(n=n.call(t);!(e=(i=n.next()).done)&&(a.push(i.value),!(r&&a.length===r));e=!0);}catch(u){o=!0,s=u}finally{try{!e&&n.return!=null&&n.return()}finally{if(o)throw s}}return a}}function gn(t){if(Array.isArray(t))return t}function mn(t,r){var n=Hr(),a=fn(n,2),e=a[1],o=t.title,i=o===void 0?"Left":o,s=t.size,u=t.color,c=t.overrides,h=c===void 0?{}:c,d=dn(t,cn),m=Ar({component:e.icons&&e.icons.ChevronLeft?e.icons.ChevronLeft:null},h&&h.Svg?Er(h.Svg):{});return O.createElement(Rr,ht({viewBox:"0 0 24 24",ref:r,title:i,size:s,color:u,overrides:{Svg:m}},d),O.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 12C9 12.2652 9.10536 12.5196 9.29289 12.7071L13.2929 16.7071C13.6834 17.0976 14.3166 17.0976 14.7071 16.7071C15.0976 16.3166 15.0976 15.6834 14.7071 15.2929L11.4142 12L14.7071 8.70711C15.0976 8.31658 15.0976 7.68342 14.7071 7.29289C14.3166 6.90237 13.6834 6.90237 13.2929 7.29289L9.29289 11.2929C9.10536 11.4804 9 11.7348 9 12Z"}))}const lr=O.forwardRef(mn);var bn=["title","size","color","overrides"];function yt(){return yt=Object.assign?Object.assign.bind():function(t){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},yt.apply(this,arguments)}function On(t,r){if(t==null)return{};var n=Sn(t,r),a,e;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(e=0;e<o.length;e++)a=o[e],!(r.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(t,a)&&(n[a]=t[a])}return n}function Sn(t,r){if(t==null)return{};var n={},a=Object.keys(t),e,o;for(o=0;o<a.length;o++)e=a[o],!(r.indexOf(e)>=0)&&(n[e]=t[e]);return n}function Dn(t,r){return kn(t)||wn(t,r)||$n(t,r)||_n()}function _n(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3
3
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $n(t,r){if(t){if(typeof t=="string")return ur(t,r);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ur(t,r)}}function ur(t,r){(r==null||r>t.length)&&(r=t.length);for(var n=0,a=new Array(r);n<r;n++)a[n]=t[n];return a}function wn(t,r){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var a=[],e=!0,o=!1,i,s;try{for(n=n.call(t);!(e=(i=n.next()).done)&&(a.push(i.value),!(r&&a.length===r));e=!0);}catch(u){o=!0,s=u}finally{try{!e&&n.return!=null&&n.return()}finally{if(o)throw s}}return a}}function kn(t){if(Array.isArray(t))return t}function Pn(t,r){var n=Hr(),a=Dn(n,2),e=a[1],o=t.title,i=o===void 0?"Right":o,s=t.size,u=t.color,c=t.overrides,h=c===void 0?{}:c,d=On(t,bn),m=Ar({component:e.icons&&e.icons.ChevronRight?e.icons.ChevronRight:null},h&&h.Svg?Er(h.Svg):{});return O.createElement(Rr,yt({viewBox:"0 0 24 24",ref:r,title:i,size:s,color:u,overrides:{Svg:m}},d),O.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.29289 7.29289C8.90237 7.68342 8.90237 8.31658 9.29289 8.70711L12.5858 12L9.29289 15.2929C8.90237 15.6834 8.90237 16.3166 9.29289 16.7071C9.68342 17.0976 10.3166 17.0976 10.7071 16.7071L14.7071 12.7071C14.8946 12.5196 15 12.2652 15 12C15 11.7348 14.8946 11.4804 14.7071 11.2929L10.7071 7.29289C10.3166 6.90237 9.68342 6.90237 9.29289 7.29289Z"}))}const cr=O.forwardRef(Pn);var rt={exports:{}},nt,dr;function Mn(){if(dr)return nt;dr=1;function t(p){return p&&typeof p=="object"&&"default"in p?p.default:p}var r=t(Xr()),n=Qr();function a(p,v){for(var D=Object.getOwnPropertyNames(v),f=0;f<D.length;f++){var l=D[f],M=Object.getOwnPropertyDescriptor(v,l);M&&M.configurable&&p[l]===void 0&&Object.defineProperty(p,l,M)}return p}function e(){return(e=Object.assign||function(p){for(var v=1;v<arguments.length;v++){var D=arguments[v];for(var f in D)Object.prototype.hasOwnProperty.call(D,f)&&(p[f]=D[f])}return p}).apply(this,arguments)}function o(p,v){p.prototype=Object.create(v.prototype),a(p.prototype.constructor=p,v)}function i(p,v){if(p==null)return{};var D,f,l={},M=Object.keys(p);for(f=0;f<M.length;f++)D=M[f],0<=v.indexOf(D)||(l[D]=p[D]);return l}function s(p){if(p===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p}var u=function(p,v,D,f,l,M,Y,te){if(!p){var E;if(v===void 0)E=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var L=[D,f,l,M,Y,te],N=0;(E=new Error(v.replace(/%s/g,function(){return L[N++]}))).name="Invariant Violation"}throw E.framesToPop=1,E}},c=u;function h(p,v,D){if("selectionStart"in p&&"selectionEnd"in p)p.selectionStart=v,p.selectionEnd=D;else{var f=p.createTextRange();f.collapse(!0),f.moveStart("character",v),f.moveEnd("character",D-v),f.select()}}function d(p){var v=0,D=0;if("selectionStart"in p&&"selectionEnd"in p)v=p.selectionStart,D=p.selectionEnd;else{var f=document.selection.createRange();f.parentElement()===p&&(v=-f.moveStart("character",-p.value.length),D=-f.moveEnd("character",-p.value.length))}return{start:v,end:D,length:D-v}}var m={9:"[0-9]",a:"[A-Za-z]","*":"[A-Za-z0-9]"},g="_";function y(p,v,D){var f="",l="",M=null,Y=[];if(v===void 0&&(v=g),D==null&&(D=m),!p||typeof p!="string")return{maskChar:v,formatChars:D,mask:null,prefix:null,lastEditablePosition:null,permanents:[]};var te=!1;return p.split("").forEach(function(E){te=!te&&E==="\\"||(te||!D[E]?(Y.push(f.length),f.length===Y.length-1&&(l+=E)):M=f.length+1,f+=E,!1)}),{maskChar:v,formatChars:D,prefix:l,mask:f,lastEditablePosition:M,permanents:Y}}function b(p,v){return p.permanents.indexOf(v)!==-1}function S(p,v,D){var f=p.mask,l=p.formatChars;if(!D)return!1;if(b(p,v))return f[v]===D;var M=l[f[v]];return new RegExp(M).test(D)}function $(p,v){return v.split("").every(function(D,f){return b(p,f)||!S(p,f,D)})}function _(p,v){var D=p.maskChar,f=p.prefix;if(!D){for(;v.length>f.length&&b(p,v.length-1);)v=v.slice(0,v.length-1);return v.length}for(var l=f.length,M=v.length;M>=f.length;M--){var Y=v[M];if(!b(p,M)&&S(p,M,Y)){l=M+1;break}}return l}function k(p,v){return _(p,v)===p.mask.length}function w(p,v){var D=p.maskChar,f=p.mask,l=p.prefix;if(!D){for((v=A(p,"",v,0)).length<l.length&&(v=l);v.length<f.length&&b(p,v.length);)v+=f[v.length];return v}if(v)return A(p,w(p,""),v,0);for(var M=0;M<f.length;M++)b(p,M)?v+=f[M]:v+=D;return v}function j(p,v,D,f){var l=D+f,M=p.maskChar,Y=p.mask,te=p.prefix,E=v.split("");if(M)return E.map(function(N,re){return re<D||l<=re?N:b(p,re)?Y[re]:M}).join("");for(var L=l;L<E.length;L++)b(p,L)&&(E[L]="");return D=Math.max(te.length,D),E.splice(D,l-D),v=E.join(""),w(p,v)}function A(p,v,D,f){var l=p.mask,M=p.maskChar,Y=p.prefix,te=D.split(""),E=k(p,v);return!M&&f>v.length&&(v+=l.slice(v.length,f)),te.every(function(L){for(;ie=L,b(p,z=f)&&ie!==l[z];){if(f>=v.length&&(v+=l[f]),N=L,re=f,M&&b(p,re)&&N===M)return!0;if(++f>=l.length)return!1}var N,re,z,ie;return!S(p,f,L)&&L!==M||(f<v.length?v=M||E||f<Y.length?v.slice(0,f)+L+v.slice(f+1):(v=v.slice(0,f)+L+v.slice(f),w(p,v)):M||(v+=L),++f<l.length)}),v}function T(p,v,D,f){var l=p.mask,M=p.maskChar,Y=D.split(""),te=f;return Y.every(function(E){for(;N=E,b(p,L=f)&&N!==l[L];)if(++f>=l.length)return!1;var L,N;return(S(p,f,E)||E===M)&&f++,f<l.length}),f-te}function F(p,v){for(var D=v;0<=D;--D)if(!b(p,D))return D;return null}function I(p,v){for(var D=p.mask,f=v;f<D.length;++f)if(!b(p,f))return f;return null}function B(p){return p||p===0?p+"":""}function H(p,v,D,f,l){var M=p.mask,Y=p.prefix,te=p.lastEditablePosition,E=v,L="",N=0,re=0,z=Math.min(l.start,D.start);return D.end>l.start?re=(N=T(p,f,L=E.slice(l.start,D.end),z))?l.length:0:E.length<f.length&&(re=f.length-E.length),E=f,re&&(re===1&&!l.length&&(z=l.start===D.start?I(p,D.start):F(p,D.start)),E=j(p,E,z,re)),E=A(p,E,L,z),(z+=N)>=M.length?z=M.length:z<Y.length&&!N?z=Y.length:z>=Y.length&&z<te&&N&&(z=I(p,z)),L||(L=null),{value:E=w(p,E),enteredString:L,selection:{start:z,end:z}}}function C(){var p=new RegExp("windows","i"),v=new RegExp("phone","i"),D=navigator.userAgent;return p.test(D)&&v.test(D)}function R(p){return typeof p=="function"}function U(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame}function ve(){return window.cancelAnimationFrame||window.webkitCancelRequestAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame}function oe(p){return(ve()?U():function(){return setTimeout(p,1e3/60)})(p)}function G(p){(ve()||clearTimeout)(p)}var ee=(function(p){function v(f){var l=p.call(this,f)||this;l.focused=!1,l.mounted=!1,l.previousSelection=null,l.selectionDeferId=null,l.saveSelectionLoopDeferId=null,l.saveSelectionLoop=function(){l.previousSelection=l.getSelection(),l.saveSelectionLoopDeferId=oe(l.saveSelectionLoop)},l.runSaveSelectionLoop=function(){l.saveSelectionLoopDeferId===null&&l.saveSelectionLoop()},l.stopSaveSelectionLoop=function(){l.saveSelectionLoopDeferId!==null&&(G(l.saveSelectionLoopDeferId),l.saveSelectionLoopDeferId=null,l.previousSelection=null)},l.getInputDOMNode=function(){if(!l.mounted)return null;var P=n.findDOMNode(s(s(l))),x=typeof window<"u"&&P instanceof window.Element;if(P&&!x)return null;if(P.nodeName!=="INPUT"&&(P=P.querySelector("input")),!P)throw new Error("react-input-mask: inputComponent doesn't contain input node");return P},l.getInputValue=function(){var P=l.getInputDOMNode();return P?P.value:null},l.setInputValue=function(P){var x=l.getInputDOMNode();x&&(l.value=P,x.value=P)},l.setCursorToEnd=function(){var P=_(l.maskOptions,l.value),x=I(l.maskOptions,P);x!==null&&l.setCursorPosition(x)},l.setSelection=function(P,x,q){q===void 0&&(q={});var V=l.getInputDOMNode(),Q=l.isFocused();V&&Q&&(q.deferred||h(V,P,x),l.selectionDeferId!==null&&G(l.selectionDeferId),l.selectionDeferId=oe(function(){l.selectionDeferId=null,h(V,P,x)}),l.previousSelection={start:P,end:x,length:Math.abs(x-P)})},l.getSelection=function(){return d(l.getInputDOMNode())},l.getCursorPosition=function(){return l.getSelection().start},l.setCursorPosition=function(P){l.setSelection(P,P)},l.isFocused=function(){return l.focused},l.getBeforeMaskedValueChangeConfig=function(){var P=l.maskOptions,x=P.mask,q=P.maskChar,V=P.permanents,Q=P.formatChars;return{mask:x,maskChar:q,permanents:V,alwaysShowMask:!!l.props.alwaysShowMask,formatChars:Q}},l.isInputAutofilled=function(P,x,q,V){var Q=l.getInputDOMNode();try{if(Q.matches(":-webkit-autofill"))return!0}catch{}return!l.focused||V.end<q.length&&x.end===P.length},l.onChange=function(P){var x=s(s(l)).beforePasteState,q=s(s(l)).previousSelection,V=l.props.beforeMaskedValueChange,Q=l.getInputValue(),fe=l.value,he=l.getSelection();l.isInputAutofilled(Q,he,fe,q)&&(fe=w(l.maskOptions,""),q={start:0,end:0,length:0}),x&&(q=x.selection,fe=x.value,he={start:q.start+Q.length,end:q.start+Q.length,length:0},Q=fe.slice(0,q.start)+Q+fe.slice(q.end),l.beforePasteState=null);var $e=H(l.maskOptions,Q,he,fe,q),Ve=$e.enteredString,me=$e.selection,ke=$e.value;if(R(V)){var He=V({value:ke,selection:me},{value:fe,selection:q},Ve,l.getBeforeMaskedValueChangeConfig());ke=He.value,me=He.selection}l.setInputValue(ke),R(l.props.onChange)&&l.props.onChange(P),l.isWindowsPhoneBrowser?l.setSelection(me.start,me.end,{deferred:!0}):l.setSelection(me.start,me.end)},l.onFocus=function(P){var x=l.props.beforeMaskedValueChange,q=l.maskOptions,V=q.mask,Q=q.prefix;if(l.focused=!0,l.mounted=!0,V){if(l.value)_(l.maskOptions,l.value)<l.maskOptions.mask.length&&l.setCursorToEnd();else{var fe=w(l.maskOptions,Q),he=w(l.maskOptions,fe),$e=_(l.maskOptions,he),Ve=I(l.maskOptions,$e),me={start:Ve,end:Ve};if(R(x)){var ke=x({value:he,selection:me},{value:l.value,selection:null},null,l.getBeforeMaskedValueChangeConfig());he=ke.value,me=ke.selection}var He=he!==l.getInputValue();He&&l.setInputValue(he),He&&R(l.props.onChange)&&l.props.onChange(P),l.setSelection(me.start,me.end)}l.runSaveSelectionLoop()}R(l.props.onFocus)&&l.props.onFocus(P)},l.onBlur=function(P){var x=l.props.beforeMaskedValueChange,q=l.maskOptions.mask;if(l.stopSaveSelectionLoop(),l.focused=!1,q&&!l.props.alwaysShowMask&&$(l.maskOptions,l.value)){var V="";R(x)&&(V=x({value:V,selection:null},{value:l.value,selection:l.previousSelection},null,l.getBeforeMaskedValueChangeConfig()).value);var Q=V!==l.getInputValue();Q&&l.setInputValue(V),Q&&R(l.props.onChange)&&l.props.onChange(P)}R(l.props.onBlur)&&l.props.onBlur(P)},l.onMouseDown=function(P){if(!l.focused&&document.addEventListener){l.mouseDownX=P.clientX,l.mouseDownY=P.clientY,l.mouseDownTime=new Date().getTime();var x=function q(V){if(document.removeEventListener("mouseup",q),l.focused){var Q=Math.abs(V.clientX-l.mouseDownX),fe=Math.abs(V.clientY-l.mouseDownY),he=Math.max(Q,fe),$e=new Date().getTime()-l.mouseDownTime;(he<=10&&$e<=200||he<=5&&$e<=300)&&l.setCursorToEnd()}};document.addEventListener("mouseup",x)}R(l.props.onMouseDown)&&l.props.onMouseDown(P)},l.onPaste=function(P){R(l.props.onPaste)&&l.props.onPaste(P),P.defaultPrevented||(l.beforePasteState={value:l.getInputValue(),selection:l.getSelection()},l.setInputValue(""))},l.handleRef=function(P){l.props.children==null&&R(l.props.inputRef)&&l.props.inputRef(P)};var M=f.mask,Y=f.maskChar,te=f.formatChars,E=f.alwaysShowMask,L=f.beforeMaskedValueChange,N=f.defaultValue,re=f.value;l.maskOptions=y(M,Y,te),N==null&&(N=""),re==null&&(re=N);var z=B(re);if(l.maskOptions.mask&&(E||z)&&(z=w(l.maskOptions,z),R(L))){var ie=f.value;f.value==null&&(ie=N),z=L({value:z,selection:null},{value:ie=B(ie),selection:null},null,l.getBeforeMaskedValueChangeConfig()).value}return l.value=z,l}o(v,p);var D=v.prototype;return D.componentDidMount=function(){this.mounted=!0,this.getInputDOMNode()&&(this.isWindowsPhoneBrowser=C(),this.maskOptions.mask&&this.getInputValue()!==this.value&&this.setInputValue(this.value))},D.componentDidUpdate=function(){var f=this.previousSelection,l=this.props,M=l.beforeMaskedValueChange,Y=l.alwaysShowMask,te=l.mask,E=l.maskChar,L=l.formatChars,N=this.maskOptions,re=Y||this.isFocused(),z=this.props.value!=null,ie=z?B(this.props.value):this.value,P=f?f.start:null;if(this.maskOptions=y(te,E,L),this.maskOptions.mask){!N.mask&&this.isFocused()&&this.runSaveSelectionLoop();var x=this.maskOptions.mask&&this.maskOptions.mask!==N.mask;if(N.mask||z||(ie=this.getInputValue()),(x||this.maskOptions.mask&&(ie||re))&&(ie=w(this.maskOptions,ie)),x){var q=_(this.maskOptions,ie);(P===null||q<P)&&(P=k(this.maskOptions,ie)?q:I(this.maskOptions,q))}!this.maskOptions.mask||!$(this.maskOptions,ie)||re||z&&this.props.value||(ie="");var V={start:P,end:P};if(R(M)){var Q=M({value:ie,selection:V},{value:this.value,selection:this.previousSelection},null,this.getBeforeMaskedValueChangeConfig());ie=Q.value,V=Q.selection}this.value=ie;var fe=this.getInputValue()!==this.value;fe?(this.setInputValue(this.value),this.forceUpdate()):x&&this.forceUpdate();var he=!1;V.start!=null&&V.end!=null&&(he=!f||f.start!==V.start||f.end!==V.end),(he||fe)&&this.setSelection(V.start,V.end)}else N.mask&&(this.stopSaveSelectionLoop(),this.forceUpdate())},D.componentWillUnmount=function(){this.mounted=!1,this.selectionDeferId!==null&&G(this.selectionDeferId),this.stopSaveSelectionLoop()},D.render=function(){var f,l=this.props,M=(l.mask,l.alwaysShowMask,l.maskChar,l.formatChars,l.inputRef,l.beforeMaskedValueChange,l.children),Y=i(l,["mask","alwaysShowMask","maskChar","formatChars","inputRef","beforeMaskedValueChange","children"]);if(M){R(M)||c(!1);var te=["onChange","onPaste","onMouseDown","onFocus","onBlur","value","disabled","readOnly"],E=e({},Y);te.forEach(function(N){return delete E[N]}),f=M(E),te.filter(function(N){return f.props[N]!=null&&f.props[N]!==Y[N]}).length&&c(!1)}else f=r.createElement("input",e({ref:this.handleRef},Y));var L={onFocus:this.onFocus,onBlur:this.onBlur};return this.maskOptions.mask&&(Y.disabled||Y.readOnly||(L.onChange=this.onChange,L.onPaste=this.onPaste,L.onMouseDown=this.onMouseDown),Y.value!=null&&(L.value=this.value)),f=r.cloneElement(f,L)},v})(r.Component);return nt=ee,nt}var pr;function Cn(){return pr||(pr=1,rt.exports=Mn()),rt.exports}var In=Cn();const Hn=Jr(In);var An=["startEnhancer","endEnhancer","error","positive","onChange","onFocus","onBlur","value","disabled","readOnly"],En=["Input"],Rn=["mask","maskChar","overrides"];function fr(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,a)}return n}function at(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?fr(Object(n),!0).forEach(function(a){Ln(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):fr(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function Ln(t,r,n){return r in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function qe(t){"@babel/helpers - typeof";return qe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},qe(t)}function We(){return We=Object.assign?Object.assign.bind():function(t){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},We.apply(this,arguments)}function vt(t,r){if(t==null)return{};var n=Tn(t,r),a,e;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(e=0;e<o.length;e++)a=o[e],!(r.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(t,a)&&(n[a]=t[a])}return n}function Tn(t,r){if(t==null)return{};var n={},a=Object.keys(t),e,o;for(o=0;o<a.length;o++)e=a[o],!(r.indexOf(e)>=0)&&(n[e]=t[e]);return n}var jr=O.forwardRef(function(t,r){t.startEnhancer,t.endEnhancer,t.error,t.positive;var n=t.onChange,a=t.onFocus,e=t.onBlur,o=t.value,i=t.disabled,s=t.readOnly,u=vt(t,An);return O.createElement(Hn,We({onChange:n,onFocus:a,onBlur:e,value:o,disabled:i,readOnly:s},u),function(c){return O.createElement(un,We({ref:r,onChange:n,onFocus:a,onBlur:e,value:o,disabled:i,readOnly:s},c))})});jr.displayName="MaskOverride";function Br(t){var r=t.mask,n=t.maskChar,a=t.overrides;a=a===void 0?{}:a;var e=a.Input,o=e===void 0?{}:e,i=vt(a,En),s=vt(t,Rn),u=jr,c={},h={};typeof o=="function"?u=o:qe(o)==="object"&&(u=o.component||u,c=o.props||{},h=o.style||{}),qe(c)==="object"&&(c=at(at({},c),{},{mask:c.mask||r,maskChar:c.maskChar||n}));var d=at({Input:{component:u,props:c,style:h}},i);return O.createElement(ln,We({},s,{overrides:d}))}Br.defaultProps={maskChar:" "};var Tt=Object.freeze({horizontal:"horizontal",vertical:"vertical"}),Fr=[0,1,2,3,4,5,6],xn=[0,1,2,3,4,5,6,7,8,9,10,11],le={high:"high",default:"default"},_e={startDate:"startDate",endDate:"endDate"},jn={locked:"locked"};function hr(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,a)}return n}function Me(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?hr(Object(n),!0).forEach(function(a){Bn(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):hr(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function Bn(t,r,n){return r in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}var xt=X("label",function(t){var r=t.$disabled,n=t.$theme,a=n.colors,e=n.typography;return Me(Me({},e.font250),{},{width:"100%",color:r?a.contentSecondary:a.contentPrimary,display:"block",paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0})});xt.displayName="Label";xt.displayName="Label";var jt=X("span",function(t){var r=t.$theme.sizing;return{display:"flex",width:"100%",marginTop:r.scale300,marginRight:0,marginBottom:r.scale300,marginLeft:0}});jt.displayName="LabelContainer";jt.displayName="LabelContainer";var Bt=X("span",function(t){var r=t.$disabled,n=t.$counterError,a=t.$theme,e=a.colors,o=a.typography;return Me(Me({},o.font100),{},{flex:0,width:"100%",color:n?e.negative400:r?e.contentSecondary:e.contentPrimary})});Bt.displayName="LabelEndEnhancer";Bt.displayName="LabelEndEnhancer";var Ft=X("div",function(t){var r=t.$error,n=t.$positive,a=t.$theme,e=a.colors,o=a.sizing,i=a.typography,s=e.contentSecondary;return r?s=e.negative400:n&&(s=e.positive400),Me(Me({},i.font100),{},{color:s,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,marginTop:o.scale300,marginRight:0,marginBottom:o.scale300,marginLeft:0})});Ft.displayName="Caption";Ft.displayName="Caption";var Nt=X("div",function(t){var r=t.$theme.sizing;return{width:"100%",marginBottom:r.scale600}});Nt.displayName="ControlContainer";Nt.displayName="ControlContainer";function we(){return we=Object.assign?Object.assign.bind():function(t){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},we.apply(this,arguments)}function Ue(t){"@babel/helpers - typeof";return Ue=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ue(t)}function Fn(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function Nn(t,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}function Wn(t,r,n){return r&&Nn(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Vn(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),r&&gt(t,r)}function gt(t,r){return gt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,e){return a.__proto__=e,a},gt(t,r)}function Yn(t){var r=Un();return function(){var a=Ke(t),e;if(r){var o=Ke(this).constructor;e=Reflect.construct(a,arguments,o)}else e=a.apply(this,arguments);return zn(this,e)}}function zn(t,r){if(r&&(Ue(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return qn(t)}function qn(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Un(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ke(t){return Ke=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ke(t)}function Kn(t,r,n){return r in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function Xn(t,r,n,a){return r&&typeof r!="boolean"?typeof r=="function"?r(a):r:n&&typeof n!="boolean"?typeof n=="function"?n(a):n:t?typeof t=="function"?t(a):t:null}var mt=(function(t){Vn(n,t);var r=Yn(n);function n(){return Fn(this,n),r.apply(this,arguments)}return Wn(n,[{key:"render",value:function(){var e=this.props,o=e.overrides,i=o.Label,s=o.LabelEndEnhancer,u=o.LabelContainer,c=o.Caption,h=o.ControlContainer,d=e.label,m=e.caption,g=e.disabled,y=e.error,b=e.positive,S=e.htmlFor,$=e.children,_=e.counter,k=O.Children.only($).props,w={$disabled:!!g,$error:!!y,$positive:!!b},j=Ae(i)||xt,A=Ae(s)||Bt,T=Ae(u)||jt,F=Ae(c)||Ft,I=Ae(h)||Nt,B=Xn(m,y,b,w),H=this.props.labelEndEnhancer;if(_){var C=null,R=null,U=null;Ue(_)==="object"&&(R=_.length,C=_.maxLength,U=_.error),C=C||k.maxLength,R==null&&typeof k.value=="string"&&(R=k.value.length),R==null&&(R=0),w.$length=R,C==null?H||(H="".concat(R)):(w.$maxLength=R,H||(H="".concat(R,"/").concat(C)),R>C&&U==null&&(U=!0)),U&&(w.$error=!0,w.$counterError=!0)}return O.createElement(O.Fragment,null,d&&O.createElement(T,we({},w,Ee(u)),O.createElement(j,we({"data-baseweb":"form-control-label",htmlFor:S||k.id},w,Ee(i)),typeof d=="function"?d(w):d),!!H&&O.createElement(A,we({},w,Ee(s)),typeof H=="function"?H(w):H)),O.createElement(Zr,null,function(ve){return O.createElement(I,we({"data-baseweb":"form-control-container"},w,Ee(h)),O.Children.map($,function(oe,G){if(oe){var ee=oe.key||String(G);return O.cloneElement(oe,{key:ee,"aria-errormessage":y?ve:null,"aria-describedby":m||b?ve:null,disabled:k.disabled||g,error:typeof k.error<"u"?k.error:w.$error,positive:typeof k.positive<"u"?k.positive:w.$positive})}}),(!!m||!!y||b)&&O.createElement(F,we({"data-baseweb":"form-control-caption",id:ve},w,Ee(c)),B))}))}}]),n})(O.Component);Kn(mt,"defaultProps",{overrides:{},label:null,caption:null,disabled:!1,counter:!1});function yr(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,a)}return n}function vr(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?yr(Object(n),!0).forEach(function(a){Qn(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):yr(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function Qn(t,r,n){return r in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}var Jn=function(r){return xn.map(function(n){return{id:n.toString(),label:r(n)}})},Zn=function(r,n){return r.map(function(a){return n.includes(Number(a.id))?a:vr(vr({},a),{},{disabled:!0})})},Gn=function(r){var n=r.filterMonthsList,a=r.formatMonthLabel,e=Jn(a);return n&&(e=Zn(e,n)),e};function ea(t){var r=t.$range,n=r===void 0?!1:r,a=t.$disabled,e=a===void 0?!1:a,o=t.$isHighlighted,i=o===void 0?!1:o,s=t.$isHovered,u=s===void 0?!1:s,c=t.$selected,h=c===void 0?!1:c,d=t.$hasRangeSelected,m=d===void 0?!1:d,g=t.$startDate,y=g===void 0?!1:g,b=t.$endDate,S=b===void 0?!1:b,$=t.$pseudoSelected,_=$===void 0?!1:$,k=t.$hasRangeHighlighted,w=k===void 0?!1:k,j=t.$pseudoHighlighted,A=j===void 0?!1:j,T=t.$hasRangeOnRight,F=T===void 0?!1:T,I=t.$startOfMonth,B=I===void 0?!1:I,H=t.$endOfMonth,C=H===void 0?!1:H,R=t.$outsideMonth,U=R===void 0?!1:R;return"".concat(+n).concat(+e).concat(+(i||u)).concat(+h).concat(+m).concat(+y).concat(+S).concat(+_).concat(+w).concat(+A).concat(+(w&&!A&&F)).concat(+(w&&!A&&!F)).concat(+B).concat(+C).concat(+U)}function ta(t,r){return oa(t)||aa(t,r)||na(t,r)||ra()}function ra(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
4
4
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function na(t,r){if(t){if(typeof t=="string")return gr(t,r);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gr(t,r)}}function gr(t,r){(r==null||r>t.length)&&(r=t.length);for(var n=0,a=new Array(r);n<r;n++)a[n]=t[n];return a}function aa(t,r){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var a=[],e=!0,o=!1,i,s;try{for(n=n.call(t);!(e=(i=n.next()).done)&&(a.push(i.value),!(r&&a.length===r));e=!0);}catch(u){o=!0,s=u}finally{try{!e&&n.return!=null&&n.return()}finally{if(o)throw s}}return a}}function oa(t){if(Array.isArray(t))return t}function mr(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,a)}return n}function ne(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?mr(Object(n),!0).forEach(function(a){Be(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):mr(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function Be(t,r,n){return r in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}var Wt=X("div",function(t){var r=t.$separateRangeInputs;return ne({width:"100%"},r?{display:"flex",justifyContent:"center"}:{})});Wt.displayName="StyledInputWrapper";Wt.displayName="StyledInputWrapper";var Vt=X("div",function(t){var r=t.$theme;return ne(ne({},r.typography.LabelMedium),{},{marginBottom:r.sizing.scale300})});Vt.displayName="StyledInputLabel";Vt.displayName="StyledInputLabel";var Yt=X("div",function(t){var r=t.$theme;return{width:"100%",marginRight:r.sizing.scale300}});Yt.displayName="StyledStartDate";Yt.displayName="StyledStartDate";var zt=X("div",function(t){return t.$theme,{width:"100%"}});zt.displayName="StyledEndDate";zt.displayName="StyledEndDate";var qt=X("div",function(t){var r=t.$theme,n=r.typography,a=r.colors,e=r.borders;return ne(ne({},n.font200),{},{color:a.calendarForeground,backgroundColor:a.calendarBackground,textAlign:"center",borderTopLeftRadius:e.surfaceBorderRadius,borderTopRightRadius:e.surfaceBorderRadius,borderBottomRightRadius:e.surfaceBorderRadius,borderBottomLeftRadius:e.surfaceBorderRadius,display:"inline-block"})});qt.displayName="StyledRoot";qt.displayName="StyledRoot";var Ut=X("div",function(t){var r=t.$orientation;return{display:"flex",flexDirection:r===Tt.vertical?"column":"row"}});Ut.displayName="StyledMonthContainer";Ut.displayName="StyledMonthContainer";var Kt=X("div",function(t){var r=t.$theme.sizing,n=t.$density;return{paddingTop:r.scale300,paddingBottom:n===le.high?r.scale400:r.scale300,paddingLeft:r.scale500,paddingRight:r.scale500}});Kt.displayName="StyledCalendarContainer";Kt.displayName="StyledCalendarContainer";var Xe=X("div",function(t){var r=t.$theme,n=r.direction==="rtl"?"right":"left";return{marginBottom:r.sizing.scale600,paddingLeft:r.sizing.scale600,paddingRight:r.sizing.scale600,textAlign:n}});Xe.displayName="StyledSelectorContainer";Xe.displayName="StyledSelectorContainer";var Xt=X("div",function(t){var r=t.$theme,n=r.typography,a=r.borders,e=r.colors,o=r.sizing,i=t.$density;return ne(ne({},i===le.high?n.LabelMedium:n.LabelLarge),{},{color:e.calendarHeaderForeground,display:"flex",justifyContent:"space-between",alignItems:"center",paddingTop:o.scale600,paddingBottom:o.scale300,paddingLeft:o.scale600,paddingRight:o.scale600,backgroundColor:e.calendarHeaderBackground,borderTopLeftRadius:a.surfaceBorderRadius,borderTopRightRadius:a.surfaceBorderRadius,borderBottomRightRadius:0,borderBottomLeftRadius:0,minHeight:i===le.high?"calc(".concat(o.scale800," + ").concat(o.scale0,")"):o.scale950})});Xt.displayName="StyledCalendarHeader";Xt.displayName="StyledCalendarHeader";var Qt=X("div",function(t){return{color:t.$theme.colors.calendarHeaderForeground,backgroundColor:t.$theme.colors.calendarHeaderBackground,whiteSpace:"nowrap"}});Qt.displayName="StyledMonthHeader";Qt.displayName="StyledMonthHeader";var Jt=X("button",function(t){var r=t.$theme,n=r.typography,a=r.colors,e=t.$isFocusVisible,o=t.$density;return ne(ne({},o===le.high?n.LabelMedium:n.LabelLarge),{},{alignItems:"center",backgroundColor:"transparent",borderLeftWidth:0,borderRightWidth:0,borderTopWidth:0,borderBottomWidth:0,color:a.calendarHeaderForeground,cursor:"pointer",display:"flex",outline:"none",":focus":{boxShadow:e?"0 0 0 3px ".concat(a.accent):"none"}})});Jt.displayName="StyledMonthYearSelectButton";Jt.displayName="StyledMonthYearSelectButton";var Zt=X("span",function(t){var r=t.$theme.direction==="rtl"?"marginRight":"marginLeft";return Be({alignItems:"center",display:"flex"},r,t.$theme.sizing.scale500)});Zt.displayName="StyledMonthYearSelectIconContainer";Zt.displayName="StyledMonthYearSelectIconContainer";function Nr(t){var r=t.$theme,n=t.$disabled,a=t.$isFocusVisible;return{boxSizing:"border-box",display:"flex",color:n?r.colors.calendarHeaderForegroundDisabled:r.colors.calendarHeaderForeground,cursor:n?"default":"pointer",backgroundColor:"transparent",borderLeftWidth:0,borderRightWidth:0,borderTopWidth:0,borderBottomWidth:0,paddingTop:"0",paddingBottom:"0",paddingLeft:"0",paddingRight:"0",marginBottom:0,marginTop:0,outline:"none",":focus":n?{}:{boxShadow:a?"0 0 0 3px ".concat(r.colors.accent):"none"}}}var Gt=X("button",Nr);Gt.displayName="StyledPrevButton";Gt.displayName="StyledPrevButton";var er=X("button",Nr);er.displayName="StyledNextButton";er.displayName="StyledNextButton";var tr=X("div",function(t){return{display:"inline-block"}});tr.displayName="StyledMonth";tr.displayName="StyledMonth";var rr=X("div",function(t){var r=t.$theme.sizing;return{whiteSpace:"nowrap",display:"flex",marginBottom:r.scale0}});rr.displayName="StyledWeek";rr.displayName="StyledWeek";function K(t,r){var n,a=t.substr(0,12)+"1"+t.substr(13),e=t.substr(0,13)+"1"+t.substr(14);return n={},Be(n,t,r),Be(n,a,r),Be(n,e,r),n}function ot(t,r){var n=r.colors,a={":before":{content:null},":after":{content:null}},e=a,o={color:n.calendarForegroundDisabled,":before":{content:null},":after":{content:null}},i={color:n.calendarForegroundDisabled,":before":{borderTopStyle:"none",borderBottomStyle:"none",borderLeftStyle:"none",borderRightStyle:"none",backgroundColor:"transparent"},":after":{borderTopLeftRadius:"0%",borderTopRightRadius:"0%",borderBottomLeftRadius:"0%",borderBottomRightRadius:"0%",borderTopColor:"transparent",borderBottomColor:"transparent",borderRightColor:"transparent",borderLeftColor:"transparent"}},s={":before":{content:null}},u=1;t&&t[u]==="1"&&(e=o);var c=Object.assign({},K("001000000000000",{color:n.calendarDayForegroundPseudoSelected}),K("000100000000000",{color:n.calendarDayForegroundSelected}),K("001100000000000",{color:n.calendarDayForegroundSelectedHighlighted}),{"010000000000000":{color:n.calendarForegroundDisabled,":after":{content:null}}},{"011000000000000":{color:n.calendarForegroundDisabled,":after":{content:null}}},K("000000000000001",i),K("101000000000000",s),K("101010000000000",s),K("100100000000000",{color:n.calendarDayForegroundSelected}),K("101100000000000",{color:n.calendarDayForegroundSelectedHighlighted,":before":{content:null}}),K("100111100000000",{color:n.calendarDayForegroundSelected,":before":{content:null}}),K("101111100000000",{color:n.calendarDayForegroundSelectedHighlighted,":before":{content:null}}),K("100111000000000",{color:n.calendarDayForegroundSelected}),K("100110100000000",{color:n.calendarDayForegroundSelected,":before":{left:null,right:"50%"}}),K("100100001010000",{color:n.calendarDayForegroundSelected}),K("100100001001000",{color:n.calendarDayForegroundSelected,":before":{left:null,right:"50%"}}),K("101000001010000",{":before":{left:null,right:"50%"}}),{"101000001001000":{}},{"101000001001100":{}},{"101000001001010":{}},K("100010010000000",{color:n.calendarDayForegroundPseudoSelected,":before":{left:"0",width:"100%"},":after":{content:null}}),{"101000001100000":{color:n.calendarDayForegroundPseudoSelected,":before":{left:"0",width:"100%"},":after":{content:null}}},K("100000001100000",{color:n.calendarDayForegroundPseudoSelected,":before":{left:"0",width:"100%"},":after":{content:null}}),K("101111000000000",{color:n.calendarDayForegroundSelectedHighlighted}),K("101110100000000",{color:n.calendarDayForegroundSelectedHighlighted,":before":{left:null,right:"50%"}}),K("101010010000000",{color:n.calendarDayForegroundPseudoSelectedHighlighted,":before":{left:"0",width:"100%"}}),K("100000000000001",i),K("100000001010001",i),K("100000001001001",i),K("100010000000001",i));return c[t]||e}var nr=X("div",function(t){var r=t.$disabled,n=t.$isFocusVisible,a=t.$isHighlighted,e=t.$peekNextMonth,o=t.$pseudoSelected,i=t.$range,s=t.$selected,u=t.$outsideMonth,c=t.$outsideMonthWithinRange,h=t.$hasDateLabel,d=t.$density,m=t.$hasLockedBehavior,g=t.$selectedInput,y=t.$value,b=t.$theme,S=b.colors,$=b.typography,_=b.sizing,k=ea(t),w;h?d===le.high?w="60px":w="70px":d===le.high?w="40px":w="48px";var j=Array.isArray(y)?y:[y,null],A=ta(j,2),T=A[0],F=A[1],I=g===_e.startDate?F!==null&&typeof F<"u":T!==null&&typeof T<"u",B=i&&!(m&&!I);return ne(ne(ne({},d===le.high?$.ParagraphSmall:$.ParagraphMedium),{},{boxSizing:"border-box",position:"relative",cursor:r||!e&&u?"default":"pointer",color:S.calendarForeground,display:"inline-block",width:d===le.high?"42px":"50px",height:w,lineHeight:d===le.high?_.scale700:_.scale900,textAlign:"center",paddingTop:_.scale300,paddingBottom:_.scale300,paddingLeft:_.scale300,paddingRight:_.scale300,marginTop:0,marginBottom:0,marginLeft:0,marginRight:0,outline:"none",backgroundColor:"transparent",transform:"scale(1)"},ot(k,t.$theme)),{},{":after":ne(ne({zIndex:-1,content:'""',boxSizing:"border-box",display:"inline-block",boxShadow:n&&(!u||e)?"0 0 0 3px ".concat(S.accent):"none",backgroundColor:s?S.calendarDayBackgroundSelectedHighlighted:o&&a?S.calendarDayBackgroundPseudoSelectedHighlighted:S.calendarBackground,height:h?"100%":d===le.high?"42px":"50px",width:"100%",position:"absolute",top:h?0:"-1px",left:0,paddingTop:_.scale200,paddingBottom:_.scale200,borderLeftWidth:"2px",borderRightWidth:"2px",borderTopWidth:"2px",borderBottomWidth:"2px",borderLeftStyle:"solid",borderRightStyle:"solid",borderTopStyle:"solid",borderBottomStyle:"solid",borderTopColor:S.borderSelected,borderBottomColor:S.borderSelected,borderRightColor:S.borderSelected,borderLeftColor:S.borderSelected,borderTopLeftRadius:h?_.scale800:"100%",borderTopRightRadius:h?_.scale800:"100%",borderBottomLeftRadius:h?_.scale800:"100%",borderBottomRightRadius:h?_.scale800:"100%"},ot(k,t.$theme)[":after"]||{}),c?{content:null}:{})},B?{":before":ne(ne({zIndex:-1,content:'""',boxSizing:"border-box",display:"inline-block",backgroundColor:S.mono300,position:"absolute",height:"100%",width:"50%",top:0,left:"50%",borderTopWidth:"2px",borderBottomWidth:"2px",borderLeftWidth:"0",borderRightWidth:"0",borderTopStyle:"solid",borderBottomStyle:"solid",borderLeftStyle:"solid",borderRightStyle:"solid",borderTopColor:"transparent",borderBottomColor:"transparent",borderLeftColor:"transparent",borderRightColor:"transparent"},ot(k,t.$theme)[":before"]||{}),c?{backgroundColor:S.mono300,left:"0",width:"100%",content:'""'}:{})}:{})});nr.displayName="StyledDay";nr.displayName="StyledDay";var ar=X("div",function(t){var r=t.$theme,n=r.typography,a=r.colors,e=t.$selected;return ne(ne({},n.ParagraphXSmall),{},{color:e?a.contentInverseTertiary:a.contentTertiary})});ar.displayName="StyledDayLabel";ar.displayName="StyledDayLabel";var or=X("div",function(t){var r=t.$theme,n=r.typography,a=r.colors,e=r.sizing,o=t.$density;return ne(ne({},n.LabelMedium),{},{color:a.contentTertiary,boxSizing:"border-box",position:"relative",cursor:"default",display:"inline-block",width:o===le.high?"42px":"50px",height:o===le.high?"40px":"48px",textAlign:"center",lineHeight:e.scale900,paddingTop:e.scale300,paddingBottom:e.scale300,paddingLeft:e.scale200,paddingRight:e.scale200,marginTop:0,marginBottom:0,marginLeft:0,marginRight:0,backgroundColor:"transparent"})});or.displayName="StyledWeekdayHeader";or.displayName="StyledWeekdayHeader";function bt(t){"@babel/helpers - typeof";return bt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},bt(t)}function ye(){return ye=Object.assign?Object.assign.bind():function(t){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},ye.apply(this,arguments)}function be(t,r){return ua(t)||la(t,r)||sa(t,r)||ia()}function ia(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
@@ -1,2 +1,2 @@
1
- import{am as v,w as j,at as $,r as s,x as A,au as F,l as N}from"./index.CPc_uZux.js";import{a as R,b as z,c as B,B as C}from"./base-input.Q-zJLgRK.js";function w(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?w(Object(r),!0).forEach(function(n){D(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):w(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}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 O=v("div",function(e){return l(l({},R(l(l({$positive:!1},e),{},{$hasIconTrailing:!1}))),{},{width:e.$resize?"fit-content":"100%"})});O.displayName="StyledTextAreaRoot";O.displayName="StyledTextAreaRoot";var _=v("div",function(e){return z(l({$positive:!1},e))});_.displayName="StyledTextareaContainer";_.displayName="StyledTextareaContainer";var S=v("textarea",function(e){return l(l({},B(e)),{},{resize:e.$resize||"none"})});S.displayName="StyledTextarea";S.displayName="StyledTextarea";function g(e){"@babel/helpers - typeof";return g=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},g(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 K(e,t){return q(e)||L(e,t)||U(e,t)||M()}function M(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{ao as v,w as j,av as $,r as s,x as A,aw as F,l as N}from"./index.BHyzKS4e.js";import{a as R,b as z,c as B,B as C}from"./base-input.iB32RS3w.js";function w(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?w(Object(r),!0).forEach(function(n){D(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):w(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}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 O=v("div",function(e){return l(l({},R(l(l({$positive:!1},e),{},{$hasIconTrailing:!1}))),{},{width:e.$resize?"fit-content":"100%"})});O.displayName="StyledTextAreaRoot";O.displayName="StyledTextAreaRoot";var _=v("div",function(e){return z(l({$positive:!1},e))});_.displayName="StyledTextareaContainer";_.displayName="StyledTextareaContainer";var S=v("textarea",function(e){return l(l({},B(e)),{},{resize:e.$resize||"none"})});S.displayName="StyledTextarea";S.displayName="StyledTextarea";function g(e){"@babel/helpers - typeof";return g=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},g(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 K(e,t){return q(e)||L(e,t)||U(e,t)||M()}function M(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function U(e,t){if(e){if(typeof e=="string")return P(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return P(e,t)}}function P(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function L(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],o=!0,i=!1,a,u;try{for(r=r.call(e);!(o=(a=r.next()).done)&&(n.push(a.value),!(t&&n.length===t));o=!0);}catch(c){i=!0,u=c}finally{try{!o&&r.return!=null&&r.return()}finally{if(i)throw u}}return n}}function q(e){if(Array.isArray(e))return e}function V(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function G(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,r){return t&&G(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function X(e,t){if(typeof t!="function"&&t!==null)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&&m(e,t)}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},m(e,t)}function Y(e){var t=J();return function(){var n=d(e),o;if(t){var i=d(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return Z(this,o)}}function Z(e,t){if(t&&(g(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return f(e)}function f(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function J(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},d(e)}function p(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Q=(function(e){X(r,e);var t=Y(r);function r(){var n;V(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=t.call.apply(t,[this].concat(i)),p(f(n),"state",{isFocused:n.props.autoFocus||!1}),p(f(n),"onFocus",function(u){n.setState({isFocused:!0}),n.props.onFocus(u)}),p(f(n),"onBlur",function(u){n.setState({isFocused:!1}),n.props.onBlur(u)}),n}return W(r,[{key:"render",value:function(){var o=this.props.overrides,i=o===void 0?{}:o,a=j(i.Root,O),u=K(a,2),c=u[0],h=u[1],b=$({Input:{component:S},InputContainer:{component:_}},i);return s.createElement(c,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},h),s.createElement(C,y({},this.props,{type:F.textarea,overrides:b,onFocus:this.onFocus,onBlur:this.onBlur,resize:this.props.resize})))}}]),r})(s.Component);p(Q,"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.default});const k=6.5,T=1,ee=e=>{let t=0;const{current:r}=e;return r&&(r.style.height="auto",t=r.scrollHeight,r.style.height=""),t},te=(e,t,r)=>e>0&&r.current?Math.abs(e-t)>T:!1,re=(e,t)=>{if(e.current&&t.current){const{offsetHeight:r}=e.current;t.current.minHeight=r,t.current.maxHeight=r*k}},ne=(e,t,r)=>e?`${t+T}px`:r?String(r):"",oe=e=>e?`${e}px`:"",ue=({textareaRef:e,dependencies:t=[]})=>{const r=N(),n=s.useRef({minHeight:0,maxHeight:0}),[o,i]=s.useState(0),[a,u]=s.useState(!1),c=s.useCallback(()=>{i(ee(e))},[e,i]),h=s.useCallback(()=>{i(0)},[i]);s.useLayoutEffect(()=>{e.current&&re(e,n)},[e]),s.useLayoutEffect(()=>{const{minHeight:H}=n.current;u(te(o,H,e))},[o,e]),s.useLayoutEffect(()=>{c()},[e,c,...t]);const{maxHeight:b}=n.current,x=r.sizes.minElementHeight,E=ne(a,o,x),I=oe(b);return{isExtended:a,height:E,maxHeight:I,updateScrollHeight:c,clearScrollHeight:h}};export{Q as T,ue as u};
@@ -1 +1 @@
1
- import{r as a,a9 as p}from"./index.CPc_uZux.js";import{i as b}from"./inputUtils.CptNuJwn.js";function i({formId:r,maxChars:s,setDirty:n,setUiValue:e,setValueWithSource:f,additionalAction:t}){return a.useCallback(u=>{const{value:o}=u.target;s!==0&&o.length>s||(n(!0),e(o),p({formId:r})&&f({value:o,fromUi:!0}),t&&t())},[r,s,n,e,f,t])}function F(r,s,n,e,f,t=!1){return a.useCallback(u=>{const o=t?u.metaKey||u.ctrlKey:!0;!b(u)||!o||(u.preventDefault(),n&&s(),e.allowFormEnterToSubmit(r)&&e.submitForm(r,f))},[r,f,n,s,e,t])}function K(r,s,n,e){a.useEffect(()=>{e||r!==s&&n(r)},[r,s,e,n])}export{i as a,F as b,K as u};
1
+ import{r as a,ab as b}from"./index.BHyzKS4e.js";import{i as p}from"./inputUtils.CptNuJwn.js";function i({formId:r,maxChars:s,setDirty:n,setUiValue:e,setValueWithSource:f,additionalAction:t}){return a.useCallback(u=>{const{value:o}=u.target;s!==0&&o.length>s||(n(!0),e(o),b({formId:r})&&f({value:o,fromUi:!0}),t&&t())},[r,s,n,e,f,t])}function F(r,s,n,e,f,t=!1){return a.useCallback(u=>{const o=t?u.metaKey||u.ctrlKey:!0;!p(u)||!o||(u.preventDefault(),n&&s(),e.allowFormEnterToSubmit(r)&&e.submitForm(r,f))},[r,f,n,s,e,t])}function K(r,s,n,e){a.useEffect(()=>{e||r!==s&&n(r)},[r,s,e,n])}export{i as a,F as b,K as u};
@@ -1 +1 @@
1
- import{l as Z,r as i,aP as M,aa as $,aQ as O}from"./index.CPc_uZux.js";async function q(l,e=16e3){if(!l||l.size===0)throw new Error("Invalid or empty blob provided");if(!window.AudioContext)throw new Error("AudioContext not supported in this browser");const o=new AudioContext;try{const n=await l.arrayBuffer(),r=await o.decodeAudioData(n),d=e??r.sampleRate,s=await Q(r,d);return J(s,d)}finally{o.close()}}async function Q(l,e){const{duration:o,numberOfChannels:n,sampleRate:r}=l,d=Math.ceil(o*e);if(!window.OfflineAudioContext)throw new Error("OfflineAudioContext not supported");const s=new OfflineAudioContext(1,d,e),p=s.createBufferSource();if(p.buffer=l,n>1){const h=s.createChannelSplitter(n),m=s.createChannelMerger(1);p.connect(h);for(let c=0;c<n;c++){const u=s.createGain();u.gain.value=1/n,h.connect(u,c),u.connect(m,0,0)}m.connect(s.destination)}else p.connect(s.destination);p.start(0);try{return await s.startRendering()}catch(h){throw new Error(`Failed to resample audio from ${r}Hz to ${e}Hz: ${h instanceof Error?h.message:String(h)}`)}}function J(l,e){const n=l.length,r=n*2+44,d=new ArrayBuffer(r),s=new DataView(d),p=l.getChannelData(0),h=(c,u)=>{for(let y=0;y<u.length;y++)s.setUint8(c+y,u.charCodeAt(y))};h(0,"RIFF"),s.setUint32(4,r-8,!0),h(8,"WAVE"),h(12,"fmt "),s.setUint32(16,16,!0),s.setUint16(20,1,!0),s.setUint16(22,1,!0),s.setUint32(24,e,!0),s.setUint32(28,e*2,!0),s.setUint16(32,2,!0),s.setUint16(34,16,!0),h(36,"data"),s.setUint32(40,n*2,!0);let m=44;for(let c=0;c<n;c++){const u=Math.max(-1,Math.min(1,p[c]));s.setInt16(m,u*32767,!0),m+=2}return new Blob([d],{type:"audio/wav"})}class W{constructor(){this.wavesurfer=null,this.currentBlobUrl=null,this.events={},this.isPlaying=!1}initialize(e){this.wavesurfer=e,this.setupEventListeners()}setupEventListeners(){this.wavesurfer&&(this.teardownEventListeners(),this.handleTimeUpdate=e=>{this.events.onTimeUpdate?.(e*1e3)},this.handlePause=()=>{this.isPlaying=!1,this.events.onPause?.()},this.handlePlay=()=>{this.isPlaying=!0,this.events.onPlay?.()},this.handleFinish=()=>{this.isPlaying=!1,this.events.onFinish?.()},this.handleReady=()=>{this.events.onReady?.()},this.handleError=e=>{const o=e instanceof Error?e:new Error(String(e));this.events.onError?.(o)},this.wavesurfer.on("timeupdate",this.handleTimeUpdate),this.wavesurfer.on("pause",this.handlePause),this.wavesurfer.on("play",this.handlePlay),this.wavesurfer.on("finish",this.handleFinish),this.wavesurfer.on("ready",this.handleReady),this.wavesurfer.on("error",this.handleError))}setEventHandlers(e){this.events=e}async load(e){if(!this.wavesurfer)throw new Error("WaveSurfer not initialized");this.cleanupPreviousUrl();let o,n=null;try{if(e instanceof Blob)n=URL.createObjectURL(e),o=n;else if(e instanceof ArrayBuffer){const r=new Blob([e]);n=URL.createObjectURL(r),o=n}else o=e;this.currentBlobUrl=n,await this.wavesurfer.load(o)}catch(r){throw this.cleanupPreviousUrl(),r}}async play(){if(!this.wavesurfer)throw new Error("WaveSurfer not initialized");await this.wavesurfer.play()}pause(){this.wavesurfer&&this.wavesurfer.pause()}getDuration(){return this.wavesurfer?this.wavesurfer.getDuration()*1e3:0}getCurrentTime(){return this.wavesurfer?this.wavesurfer.getCurrentTime()*1e3:0}getIsPlaying(){return this.isPlaying}seekToStart(){this.wavesurfer&&this.wavesurfer.seekTo(0)}cleanupPreviousUrl(){this.currentBlobUrl&&(URL.revokeObjectURL(this.currentBlobUrl),this.currentBlobUrl=null)}destroy(){this.pause(),this.cleanupPreviousUrl(),this.wavesurfer&&(this.teardownEventListeners(),this.wavesurfer.empty(),this.wavesurfer=null),this.events={},this.isPlaying=!1,this.handleTimeUpdate=void 0,this.handlePause=void 0,this.handlePlay=void 0,this.handleFinish=void 0,this.handleReady=void 0,this.handleError=void 0}teardownEventListeners(){this.wavesurfer&&(this.handleTimeUpdate&&(this.wavesurfer.un("timeupdate",this.handleTimeUpdate),this.handleTimeUpdate=void 0),this.handlePause&&(this.wavesurfer.un("pause",this.handlePause),this.handlePause=void 0),this.handlePlay&&(this.wavesurfer.un("play",this.handlePlay),this.handlePlay=void 0),this.handleFinish&&(this.wavesurfer.un("finish",this.handleFinish),this.handleFinish=void 0),this.handleReady&&(this.wavesurfer.un("ready",this.handleReady),this.handleReady=void 0),this.handleError&&(this.wavesurfer.un("error",this.handleError),this.handleError=void 0))}}function I(l){return l.name==="NotAllowedError"||l.name==="PermissionDeniedError"||l.message?.toLowerCase().includes("permission denied")}class K{constructor(e={}){this.wavesurfer=null,this.recordPlugin=null,this.isRecording=!1,this.recordEndResolve=null,this.recordEndReject=null,this.events={},this.options=e}initialize(e,o){this.wavesurfer=e;try{const n={renderRecordedAudio:!1,mimeType:"audio/webm"};this.recordPlugin=e.registerPlugin(o.create(n)),this.setupEventListeners()}catch(n){const r=n instanceof Error?n:new Error(String(n));throw I(r)?(this.events.onPermissionDenied?.(),new Error("Microphone permission denied")):(this.events.onError?.(r),r)}}setupEventListeners(){this.recordPlugin&&(this.recordPlugin.on("record-start",()=>{this.isRecording=!0,this.events.onRecordStart?.()}),this.recordPlugin.on("record-end",e=>{this.isRecording=!1,this.events.onRecordEnd?.(e),this.recordEndResolve&&e&&e.size>0?(this.recordEndResolve(e),this.recordEndResolve=null,this.recordEndReject=null):this.recordEndReject?(this.recordEndReject(new Error("Invalid or empty recording")),this.recordEndResolve=null,this.recordEndReject=null):(this.recordEndResolve=null,this.recordEndReject=null)}),this.recordPlugin.on("record-progress",e=>{this.events.onRecordProgress?.(e)}))}setEventHandlers(e){this.events=e}async startRecording(){if(!this.recordPlugin)throw new Error("Record plugin not initialized");if(this.isRecording)return;const e=typeof this.options.sampleRate=="number"?this.options.sampleRate:void 0,o={};e!==void 0&&(o.sampleRate={ideal:e}),await this.startRecordingWithConstraints(o,e!==void 0)}async startRecordingWithConstraints(e,o){if(!this.recordPlugin)throw new Error("Record plugin not initialized");try{const n=Object.keys(e).length?e:void 0;await this.recordPlugin.startRecording(n)}catch(n){const r=n instanceof Error?n:new Error(String(n));if(I(r))throw this.events.onPermissionDenied?.(),new Error("Microphone permission denied");if(o&&(r.name==="OverconstrainedError"||r.name==="NotReadableError")){this.options.sampleRate=void 0,await this.startRecordingWithConstraints({},!1);return}throw this.events.onError?.(r),r}}async stopRecording(){if(!this.recordPlugin||!this.isRecording)throw new Error("Not currently recording");try{return await new Promise((e,o)=>{this.recordEndResolve=e,this.recordEndReject=o,this.recordPlugin?.stopRecording()})}catch(e){const o=e instanceof Error?e:new Error(String(e));throw this.events.onError?.(o),o}}cancelRecording(){this.recordPlugin&&this.isRecording&&(this.recordPlugin.stopRecording(),this.isRecording=!1,this.recordEndResolve=null,this.recordEndReject=null)}destroy(){this.cancelRecording(),this.recordPlugin&&(this.recordPlugin.destroy(),this.recordPlugin=null),this.wavesurfer=null,this.events={}}}const X=4,Y=4,ee=8,re=0,te=16e3;function se({containerRef:l,sampleRate:e,events:o,waveformPadding:n=0}){const r=Z(),[d,s]=i.useState("idle"),[p,h]=i.useState(null),[m,c]=i.useState(!1),u=i.useRef(null),y=i.useRef(null),a=i.useRef(null),f=i.useRef(o),S=i.useRef(!1),D=i.useRef(!1),E=i.useRef(new Set),P=i.useRef(!1),b=e===void 0?te:e,A=i.useCallback(()=>{E.current.clear(),c(!1),y.current&&(y.current.destroy(),y.current=null),a.current&&(a.current.destroy(),a.current=null),u.current&&(u.current.destroy(),u.current=null),S.current=!1,P.current=!1,s("idle"),h(null)},[]),x=i.useCallback(()=>{const t=Array.from(E.current);E.current.clear(),t.forEach(w=>{w.resolve()})},[]),_=i.useCallback(t=>{c(!1);const w=Array.from(E.current);E.current.clear(),w.forEach(v=>{v.reject(t)})},[]),T=i.useCallback(t=>{const w={onPlay:()=>{c(!0),f.current.onPlaybackPlay?.()},onPause:()=>{c(!1),f.current.onPlaybackPause?.()},onFinish:()=>{c(!1),f.current.onPlaybackFinish?.()},onReady:()=>{x()},onError:v=>{c(!1),_(v),f.current.onError?.(v)}};t.setEventHandlers(w)},[x,_]);i.useEffect(()=>{f.current=o,a.current&&T(a.current)},[o,T]);const U=i.useCallback(async()=>{if(!(S.current||D.current||!l.current)){D.current=!0;try{const[t,w]=await Promise.all([M(()=>import("./wavesurfer.esm.D1Sty35j.js"),[],import.meta.url),M(()=>import("./record.DytFsBUt.js"),[],import.meta.url)]),v=t.default,B=w.default,k=v.create({container:l.current,waveColor:r.colors.primary,progressColor:r.colors.bodyText,height:n>0?$(r.sizes.largestElementHeight)-2*n:"auto",barWidth:X,barGap:Y,barRadius:ee,cursorWidth:re,interact:!0});u.current=k,P.current=!1;const C=new K({sampleRate:b});C.initialize(k,B),C.setEventHandlers({onRecordProgress:R=>{f.current.onProgressMs?.(R)},onPermissionDenied:()=>{f.current.onPermissionDenied(),s("idle")},onError:R=>{f.current.onError(R),s("idle")}}),y.current=C;const g=new W;g.initialize(k),a.current=g,T(g),S.current=!0}catch(t){const w=t instanceof Error?t:new Error(String(t));f.current.onError?.(w)}finally{D.current=!1}}},[l,r,b,T,n]);i.useEffect(()=>(U(),()=>{A()}),[A,U]),i.useEffect(()=>{const t=u.current;if(t){if(d==="recording"){t.setOptions({waveColor:r.colors.primary,progressColor:r.colors.primary});return}if(P.current){t.setOptions({interact:!0,waveColor:O(r.colors.fadedText40,r.colors.secondaryBg),progressColor:r.colors.bodyText});return}t.setOptions({waveColor:r.colors.primary,progressColor:r.colors.bodyText})}},[d,r.colors.bodyText,r.colors.fadedText40,r.colors.primary,r.colors.secondaryBg]);const F=i.useCallback(async()=>{if(d!=="recording"){if(S.current||await U(),!y.current)throw new Error("Record backend not initialized");u.current&&u.current.setOptions({waveColor:r.colors.primary,progressColor:r.colors.primary}),P.current=!1,await y.current.startRecording(),s("recording"),h(null),c(!1),f.current.onRecordStart?.()}},[d,U,r.colors.primary]),L=i.useCallback(()=>{a.current&&u.current&&(a.current.destroy(),a.current=new W,a.current.initialize(u.current),E.current.clear(),c(!1),T(a.current)),P.current=!1},[T]),z=i.useCallback(()=>{a.current?.seekToStart(),c(!1),P.current=!0,u.current&&u.current.setOptions({interact:!0,waveColor:O(r.colors.fadedText40,r.colors.secondaryBg),progressColor:r.colors.bodyText})},[r.colors.bodyText,r.colors.fadedText40,r.colors.secondaryBg]),H=i.useCallback(async()=>{if(d!=="recording")throw new Error("Not currently recording");if(!y.current||!a.current)throw new Error("Backends not initialized");try{const t=await y.current.stopRecording();h(t),await new Promise((k,C)=>{if(!a.current){C(new Error("Player not initialized"));return}const g={resolve:()=>{E.current.delete(g),k()},reject:R=>{E.current.delete(g),C(R)}};E.current.add(g),a.current.load(t).catch(R=>{E.current.delete(g),C(R instanceof Error?R:new Error(String(R)))})}),s("idle"),c(!1),z();const v={durationMs:a.current?.getDuration()??0,sampleRate:typeof b=="number"?b:null,mimeType:t.type||"audio/webm",size:t.size},B={blob:t,meta:v};return f.current.onRecordReady?.(t),B}catch(t){const w=t instanceof Error?t:new Error(String(t));return c(!1),s("idle"),f.current.onError(w),{blob:new Blob,meta:{durationMs:0,sampleRate:null,mimeType:"audio/webm",size:0}}}},[d,z,b]),j=i.useCallback(async t=>{const w=t??p;if(!w){const v=new Error("No recorded audio to approve");f.current.onError(v);return}try{const v=await q(w,b);await f.current.onApprove?.(v),h(null),s("idle")}catch(v){const B=v instanceof Error?v:new Error(String(v));f.current.onError(B)}},[p,b]),N=i.useCallback(()=>{d==="recording"&&y.current?.cancelRecording(),L(),h(null),s("idle"),c(!1),P.current=!1,f.current.onCancel?.()},[d,L]),V=i.useMemo(()=>({isPlaying:()=>a.current?.getIsPlaying()??!1,play:async()=>{if(!a.current)throw new Error("Player not initialized");await a.current.play()},pause:()=>{a.current?.pause()},load:async t=>{if(S.current||await U(),!a.current)throw new Error("Player not initialized");await a.current.load(t),z()},getCurrentTimeMs:()=>a.current?.getCurrentTime()??0,getDurationMs:()=>a.current?.getDuration()??0}),[z,U]),G=i.useCallback(t=>{f.current=t},[]);return i.useEffect(()=>()=>{A()},[A]),{state:d,isPlaybackPlaying:m,mountRef:l,start:F,stop:H,approve:j,cancel:N,destroy:A,playback:V,setEventHandlers:G}}export{se as u};
1
+ import{l as Z,r as i,aR as M,ac as $,aS as O}from"./index.BHyzKS4e.js";async function q(l,e=16e3){if(!l||l.size===0)throw new Error("Invalid or empty blob provided");if(!window.AudioContext)throw new Error("AudioContext not supported in this browser");const o=new AudioContext;try{const n=await l.arrayBuffer(),r=await o.decodeAudioData(n),d=e??r.sampleRate,s=await J(r,d);return K(s,d)}finally{o.close()}}async function J(l,e){const{duration:o,numberOfChannels:n,sampleRate:r}=l,d=Math.ceil(o*e);if(!window.OfflineAudioContext)throw new Error("OfflineAudioContext not supported");const s=new OfflineAudioContext(1,d,e),p=s.createBufferSource();if(p.buffer=l,n>1){const h=s.createChannelSplitter(n),m=s.createChannelMerger(1);p.connect(h);for(let c=0;c<n;c++){const u=s.createGain();u.gain.value=1/n,h.connect(u,c),u.connect(m,0,0)}m.connect(s.destination)}else p.connect(s.destination);p.start(0);try{return await s.startRendering()}catch(h){throw new Error(`Failed to resample audio from ${r}Hz to ${e}Hz: ${h instanceof Error?h.message:String(h)}`)}}function K(l,e){const n=l.length,r=n*2+44,d=new ArrayBuffer(r),s=new DataView(d),p=l.getChannelData(0),h=(c,u)=>{for(let y=0;y<u.length;y++)s.setUint8(c+y,u.charCodeAt(y))};h(0,"RIFF"),s.setUint32(4,r-8,!0),h(8,"WAVE"),h(12,"fmt "),s.setUint32(16,16,!0),s.setUint16(20,1,!0),s.setUint16(22,1,!0),s.setUint32(24,e,!0),s.setUint32(28,e*2,!0),s.setUint16(32,2,!0),s.setUint16(34,16,!0),h(36,"data"),s.setUint32(40,n*2,!0);let m=44;for(let c=0;c<n;c++){const u=Math.max(-1,Math.min(1,p[c]));s.setInt16(m,u*32767,!0),m+=2}return new Blob([d],{type:"audio/wav"})}class W{constructor(){this.wavesurfer=null,this.currentBlobUrl=null,this.events={},this.isPlaying=!1}initialize(e){this.wavesurfer=e,this.setupEventListeners()}setupEventListeners(){this.wavesurfer&&(this.teardownEventListeners(),this.handleTimeUpdate=e=>{this.events.onTimeUpdate?.(e*1e3)},this.handlePause=()=>{this.isPlaying=!1,this.events.onPause?.()},this.handlePlay=()=>{this.isPlaying=!0,this.events.onPlay?.()},this.handleFinish=()=>{this.isPlaying=!1,this.events.onFinish?.()},this.handleReady=()=>{this.events.onReady?.()},this.handleError=e=>{const o=e instanceof Error?e:new Error(String(e));this.events.onError?.(o)},this.wavesurfer.on("timeupdate",this.handleTimeUpdate),this.wavesurfer.on("pause",this.handlePause),this.wavesurfer.on("play",this.handlePlay),this.wavesurfer.on("finish",this.handleFinish),this.wavesurfer.on("ready",this.handleReady),this.wavesurfer.on("error",this.handleError))}setEventHandlers(e){this.events=e}async load(e){if(!this.wavesurfer)throw new Error("WaveSurfer not initialized");this.cleanupPreviousUrl();let o,n=null;try{if(e instanceof Blob)n=URL.createObjectURL(e),o=n;else if(e instanceof ArrayBuffer){const r=new Blob([e]);n=URL.createObjectURL(r),o=n}else o=e;this.currentBlobUrl=n,await this.wavesurfer.load(o)}catch(r){throw this.cleanupPreviousUrl(),r}}async play(){if(!this.wavesurfer)throw new Error("WaveSurfer not initialized");await this.wavesurfer.play()}pause(){this.wavesurfer&&this.wavesurfer.pause()}getDuration(){return this.wavesurfer?this.wavesurfer.getDuration()*1e3:0}getCurrentTime(){return this.wavesurfer?this.wavesurfer.getCurrentTime()*1e3:0}getIsPlaying(){return this.isPlaying}seekToStart(){this.wavesurfer&&this.wavesurfer.seekTo(0)}cleanupPreviousUrl(){this.currentBlobUrl&&(URL.revokeObjectURL(this.currentBlobUrl),this.currentBlobUrl=null)}destroy(){this.pause(),this.cleanupPreviousUrl(),this.wavesurfer&&(this.teardownEventListeners(),this.wavesurfer.empty(),this.wavesurfer=null),this.events={},this.isPlaying=!1,this.handleTimeUpdate=void 0,this.handlePause=void 0,this.handlePlay=void 0,this.handleFinish=void 0,this.handleReady=void 0,this.handleError=void 0}teardownEventListeners(){this.wavesurfer&&(this.handleTimeUpdate&&(this.wavesurfer.un("timeupdate",this.handleTimeUpdate),this.handleTimeUpdate=void 0),this.handlePause&&(this.wavesurfer.un("pause",this.handlePause),this.handlePause=void 0),this.handlePlay&&(this.wavesurfer.un("play",this.handlePlay),this.handlePlay=void 0),this.handleFinish&&(this.wavesurfer.un("finish",this.handleFinish),this.handleFinish=void 0),this.handleReady&&(this.wavesurfer.un("ready",this.handleReady),this.handleReady=void 0),this.handleError&&(this.wavesurfer.un("error",this.handleError),this.handleError=void 0))}}function I(l){return l.name==="NotAllowedError"||l.name==="PermissionDeniedError"||l.message?.toLowerCase().includes("permission denied")}class Q{constructor(e={}){this.wavesurfer=null,this.recordPlugin=null,this.isRecording=!1,this.recordEndResolve=null,this.recordEndReject=null,this.events={},this.options=e}initialize(e,o){this.wavesurfer=e;try{const n={renderRecordedAudio:!1,mimeType:"audio/webm"};this.recordPlugin=e.registerPlugin(o.create(n)),this.setupEventListeners()}catch(n){const r=n instanceof Error?n:new Error(String(n));throw I(r)?(this.events.onPermissionDenied?.(),new Error("Microphone permission denied")):(this.events.onError?.(r),r)}}setupEventListeners(){this.recordPlugin&&(this.recordPlugin.on("record-start",()=>{this.isRecording=!0,this.events.onRecordStart?.()}),this.recordPlugin.on("record-end",e=>{this.isRecording=!1,this.events.onRecordEnd?.(e),this.recordEndResolve&&e&&e.size>0?(this.recordEndResolve(e),this.recordEndResolve=null,this.recordEndReject=null):this.recordEndReject?(this.recordEndReject(new Error("Invalid or empty recording")),this.recordEndResolve=null,this.recordEndReject=null):(this.recordEndResolve=null,this.recordEndReject=null)}),this.recordPlugin.on("record-progress",e=>{this.events.onRecordProgress?.(e)}))}setEventHandlers(e){this.events=e}async startRecording(){if(!this.recordPlugin)throw new Error("Record plugin not initialized");if(this.isRecording)return;const e=typeof this.options.sampleRate=="number"?this.options.sampleRate:void 0,o={};e!==void 0&&(o.sampleRate={ideal:e}),await this.startRecordingWithConstraints(o,e!==void 0)}async startRecordingWithConstraints(e,o){if(!this.recordPlugin)throw new Error("Record plugin not initialized");try{const n=Object.keys(e).length?e:void 0;await this.recordPlugin.startRecording(n)}catch(n){const r=n instanceof Error?n:new Error(String(n));if(I(r))throw this.events.onPermissionDenied?.(),new Error("Microphone permission denied");if(o&&(r.name==="OverconstrainedError"||r.name==="NotReadableError")){this.options.sampleRate=void 0,await this.startRecordingWithConstraints({},!1);return}throw this.events.onError?.(r),r}}async stopRecording(){if(!this.recordPlugin||!this.isRecording)throw new Error("Not currently recording");try{return await new Promise((e,o)=>{this.recordEndResolve=e,this.recordEndReject=o,this.recordPlugin?.stopRecording()})}catch(e){const o=e instanceof Error?e:new Error(String(e));throw this.events.onError?.(o),o}}cancelRecording(){this.recordPlugin&&this.isRecording&&(this.recordPlugin.stopRecording(),this.isRecording=!1,this.recordEndResolve=null,this.recordEndReject=null)}destroy(){this.cancelRecording(),this.recordPlugin&&(this.recordPlugin.destroy(),this.recordPlugin=null),this.wavesurfer=null,this.events={}}}const X=4,Y=4,ee=8,re=0,te=16e3;function se({containerRef:l,sampleRate:e,events:o,waveformPadding:n=0}){const r=Z(),[d,s]=i.useState("idle"),[p,h]=i.useState(null),[m,c]=i.useState(!1),u=i.useRef(null),y=i.useRef(null),a=i.useRef(null),f=i.useRef(o),U=i.useRef(!1),D=i.useRef(!1),E=i.useRef(new Set),P=i.useRef(!1),b=e===void 0?te:e,A=i.useCallback(()=>{E.current.clear(),c(!1),y.current&&(y.current.destroy(),y.current=null),a.current&&(a.current.destroy(),a.current=null),u.current&&(u.current.destroy(),u.current=null),U.current=!1,P.current=!1,s("idle"),h(null)},[]),x=i.useCallback(()=>{const t=Array.from(E.current);E.current.clear(),t.forEach(w=>{w.resolve()})},[]),_=i.useCallback(t=>{c(!1);const w=Array.from(E.current);E.current.clear(),w.forEach(v=>{v.reject(t)})},[]),T=i.useCallback(t=>{const w={onPlay:()=>{c(!0),f.current.onPlaybackPlay?.()},onPause:()=>{c(!1),f.current.onPlaybackPause?.()},onFinish:()=>{c(!1),f.current.onPlaybackFinish?.()},onReady:()=>{x()},onError:v=>{c(!1),_(v),f.current.onError?.(v)}};t.setEventHandlers(w)},[x,_]);i.useEffect(()=>{f.current=o,a.current&&T(a.current)},[o,T]);const S=i.useCallback(async()=>{if(!(U.current||D.current||!l.current)){D.current=!0;try{const[t,w]=await Promise.all([M(()=>import("./wavesurfer.esm.D1Sty35j.js"),[],import.meta.url),M(()=>import("./record.DytFsBUt.js"),[],import.meta.url)]),v=t.default,B=w.default,k=v.create({container:l.current,waveColor:r.colors.primary,progressColor:r.colors.bodyText,height:n>0?$(r.sizes.largestElementHeight)-2*n:"auto",barWidth:X,barGap:Y,barRadius:ee,cursorWidth:re,interact:!0});u.current=k,P.current=!1;const C=new Q({sampleRate:b});C.initialize(k,B),C.setEventHandlers({onRecordProgress:R=>{f.current.onProgressMs?.(R)},onPermissionDenied:()=>{f.current.onPermissionDenied(),s("idle")},onError:R=>{f.current.onError(R),s("idle")}}),y.current=C;const g=new W;g.initialize(k),a.current=g,T(g),U.current=!0}catch(t){const w=t instanceof Error?t:new Error(String(t));f.current.onError?.(w)}finally{D.current=!1}}},[l,r,b,T,n]);i.useEffect(()=>(S(),()=>{A()}),[A,S]),i.useEffect(()=>{const t=u.current;if(t){if(d==="recording"){t.setOptions({waveColor:r.colors.primary,progressColor:r.colors.primary});return}if(P.current){t.setOptions({interact:!0,waveColor:O(r.colors.fadedText40,r.colors.secondaryBg),progressColor:r.colors.bodyText});return}t.setOptions({waveColor:r.colors.primary,progressColor:r.colors.bodyText})}},[d,r.colors.bodyText,r.colors.fadedText40,r.colors.primary,r.colors.secondaryBg]);const F=i.useCallback(async()=>{if(d!=="recording"){if(U.current||await S(),!y.current)throw new Error("Record backend not initialized");u.current&&u.current.setOptions({waveColor:r.colors.primary,progressColor:r.colors.primary}),P.current=!1,await y.current.startRecording(),s("recording"),h(null),c(!1),f.current.onRecordStart?.()}},[d,S,r.colors.primary]),L=i.useCallback(()=>{a.current&&u.current&&(a.current.destroy(),a.current=new W,a.current.initialize(u.current),E.current.clear(),c(!1),T(a.current)),P.current=!1},[T]),z=i.useCallback(()=>{a.current?.seekToStart(),c(!1),P.current=!0,u.current&&u.current.setOptions({interact:!0,waveColor:O(r.colors.fadedText40,r.colors.secondaryBg),progressColor:r.colors.bodyText})},[r.colors.bodyText,r.colors.fadedText40,r.colors.secondaryBg]),H=i.useCallback(async()=>{if(d!=="recording")throw new Error("Not currently recording");if(!y.current||!a.current)throw new Error("Backends not initialized");try{const t=await y.current.stopRecording();h(t),await new Promise((k,C)=>{if(!a.current){C(new Error("Player not initialized"));return}const g={resolve:()=>{E.current.delete(g),k()},reject:R=>{E.current.delete(g),C(R)}};E.current.add(g),a.current.load(t).catch(R=>{E.current.delete(g),C(R instanceof Error?R:new Error(String(R)))})}),s("idle"),c(!1),z();const v={durationMs:a.current?.getDuration()??0,sampleRate:typeof b=="number"?b:null,mimeType:t.type||"audio/webm",size:t.size},B={blob:t,meta:v};return f.current.onRecordReady?.(t),B}catch(t){const w=t instanceof Error?t:new Error(String(t));return c(!1),s("idle"),f.current.onError(w),{blob:new Blob,meta:{durationMs:0,sampleRate:null,mimeType:"audio/webm",size:0}}}},[d,z,b]),j=i.useCallback(async t=>{const w=t??p;if(!w){const v=new Error("No recorded audio to approve");f.current.onError(v);return}try{const v=await q(w,b);await f.current.onApprove?.(v),h(null),s("idle")}catch(v){const B=v instanceof Error?v:new Error(String(v));f.current.onError(B)}},[p,b]),N=i.useCallback(()=>{d==="recording"&&y.current?.cancelRecording(),L(),h(null),s("idle"),c(!1),P.current=!1,f.current.onCancel?.()},[d,L]),V=i.useMemo(()=>({isPlaying:()=>a.current?.getIsPlaying()??!1,play:async()=>{if(!a.current)throw new Error("Player not initialized");await a.current.play()},pause:()=>{a.current?.pause()},load:async t=>{if(U.current||await S(),!a.current)throw new Error("Player not initialized");await a.current.load(t),z()},getCurrentTimeMs:()=>a.current?.getCurrentTime()??0,getDurationMs:()=>a.current?.getDuration()??0}),[z,S]),G=i.useCallback(t=>{f.current=t},[]);return i.useEffect(()=>()=>{A()},[A]),{state:d,isPlaybackPlaying:m,mountRef:l,start:F,stop:H,approve:j,cancel:N,destroy:A,playback:V,setEventHandlers:G}}export{se as u};
@@ -1 +1 @@
1
- import{h as l,k as h,j as s,d as n}from"./index.CPc_uZux.js";const o=t=>{const a=e=>{const{width:i,elementRef:c}=h();return s(n,{ref:c,children:s(t,{...e,width:i})})};return a.displayName=`withCalculatedWidth(${t.displayName||t.name})`,l(a,t)};export{o as w};
1
+ import{h as l,k as h,j as s,d as n}from"./index.BHyzKS4e.js";const o=t=>{const a=e=>{const{width:i,elementRef:c}=h();return s(n,{ref:c,children:s(t,{...e,width:i})})};return a.displayName=`withCalculatedWidth(${t.displayName||t.name})`,l(a,t)};export{o as w};
@@ -1 +1 @@
1
- import{r as n,z as f,b5 as p,b6 as h,l as x,k as y,j as i,h as g}from"./index.CPc_uZux.js";const m=n.createContext(null);m.displayName="ElementFullscreenContext";const w=f("div",{target:"e5bcvgj0"})(({theme:e,isExpanded:t})=>({width:"100%",height:"100%",...t?{position:"fixed",top:0,left:0,bottom:0,right:0,background:e.colors.bgColor,zIndex:e.zIndices.fullscreenWrapper,padding:e.spacing.md,paddingTop:e.sizes.fullScreenHeaderHeight,overflow:"auto",display:"flex",alignItems:"center",justifyContent:"center"}:{}})),C=()=>{const{setFullScreen:e}=n.useContext(p),[t,s]=n.useState(!1),{fullHeight:a,fullWidth:c}=h(),l=n.useCallback(r=>{s(r),e(r)},[e]),u=n.useCallback(()=>{document.body.style.overflow="hidden",l(!0)},[l]),o=n.useCallback(()=>{document.body.style.overflow="unset",l(!1)},[l]),d=n.useCallback(r=>{r.keyCode===27&&t&&o()},[o,t]);return n.useEffect(()=>(document.addEventListener("keydown",d,!1),()=>{document.removeEventListener("keydown",d,!1)}),[d]),n.useMemo(()=>({expanded:t,zoomIn:u,zoomOut:o,fullHeight:a,fullWidth:c}),[t,u,o,a,c])},b=({children:e})=>{const t=x(),{expanded:s,fullHeight:a,fullWidth:c,zoomIn:l,zoomOut:u}=C(),{width:o,elementRef:d}=y(),r=n.useMemo(()=>({width:s?c:o,height:s?a:void 0,expanded:s,expand:l,collapse:u}),[s,a,c,o,l,u]);return i(m.Provider,{value:r,children:i(w,{ref:d,isExpanded:s,"data-testid":"stFullScreenFrame",theme:t,children:e})})};function S(e){const t=s=>i(b,{children:i(e,{...s})});return t.displayName=`withFullScreenWrapper(${e.displayName||e.name})`,g(t,e)}export{m as E,S as w};
1
+ import{r as n,z as m,be as p,bf as h,l as x,k as y,j as i,h as g}from"./index.BHyzKS4e.js";const f=n.createContext(null);f.displayName="ElementFullscreenContext";const w=m("div",{target:"e5bcvgj0"})(({theme:e,isExpanded:t})=>({width:"100%",height:"100%",...t?{position:"fixed",top:0,left:0,bottom:0,right:0,background:e.colors.bgColor,zIndex:e.zIndices.fullscreenWrapper,padding:e.spacing.md,paddingTop:e.sizes.fullScreenHeaderHeight,overflow:"auto",display:"flex",alignItems:"center",justifyContent:"center"}:{}})),C=()=>{const{setFullScreen:e}=n.useContext(p),[t,s]=n.useState(!1),{fullHeight:a,fullWidth:c}=h(),l=n.useCallback(r=>{s(r),e(r)},[e]),u=n.useCallback(()=>{document.body.style.overflow="hidden",l(!0)},[l]),o=n.useCallback(()=>{document.body.style.overflow="unset",l(!1)},[l]),d=n.useCallback(r=>{r.keyCode===27&&t&&o()},[o,t]);return n.useEffect(()=>(document.addEventListener("keydown",d,!1),()=>{document.removeEventListener("keydown",d,!1)}),[d]),n.useMemo(()=>({expanded:t,zoomIn:u,zoomOut:o,fullHeight:a,fullWidth:c}),[t,u,o,a,c])},b=({children:e})=>{const t=x(),{expanded:s,fullHeight:a,fullWidth:c,zoomIn:l,zoomOut:u}=C(),{width:o,elementRef:d}=y(),r=n.useMemo(()=>({width:s?c:o,height:s?a:void 0,expanded:s,expand:l,collapse:u}),[s,a,c,o,l,u]);return i(f.Provider,{value:r,children:i(w,{ref:d,isExpanded:s,"data-testid":"stFullScreenFrame",theme:t,children:e})})};function S(e){const t=s=>i(b,{children:i(e,{...s})});return t.displayName=`withFullScreenWrapper(${e.displayName||e.name})`,g(t,e)}export{f as E,S as w};
@@ -55,6 +55,7 @@ from streamlit.testing.v1.element_tree import (
55
55
  Error,
56
56
  Exception, # noqa: A004
57
57
  Expander,
58
+ Feedback,
58
59
  Header,
59
60
  Info,
60
61
  Json,
@@ -468,15 +469,16 @@ class AppTest:
468
469
 
469
470
  @property
470
471
  def button_group(self) -> WidgetList[ButtonGroup[Any]]:
471
- """Sequence of all ``st.feedback`` widgets.
472
+ """Sequence of all ``st.pills`` and ``st.segmented_control`` widgets.
472
473
 
473
474
  Returns
474
475
  -------
475
476
  WidgetList of ButtonGroup
476
- Sequence of all ``st.feedback`` widgets. Individual widgets can be
477
- accessed from a WidgetList by index (order on the page) or key. For
478
- example, ``at.button_group[0]`` for the first widget or
479
- ``at.button_group(key="my_key")`` for a widget with a given key.
477
+ Sequence of all ``st.pills`` and ``st.segmented_control`` widgets.
478
+ Individual widgets can be accessed from a WidgetList by index
479
+ (order on the page) or key. For example, ``at.button_group[0]`` for
480
+ the first widget or ``at.button_group(key="my_key")`` for a widget
481
+ with a given key.
480
482
  """
481
483
  return self._tree.button_group
482
484
 
@@ -665,6 +667,20 @@ class AppTest:
665
667
  """
666
668
  return self._tree.exception
667
669
 
670
+ @property
671
+ def feedback(self) -> WidgetList[Feedback]:
672
+ """Sequence of all ``st.feedback`` widgets.
673
+
674
+ Returns
675
+ -------
676
+ WidgetList of Feedback
677
+ Sequence of all ``st.feedback`` widgets. Individual widgets can be
678
+ accessed from a WidgetList by index (order on the page) or key. For
679
+ example, ``at.feedback[0]`` for the first widget or
680
+ ``at.feedback(key="my_key")`` to access by key.
681
+ """
682
+ return self._tree.feedback
683
+
668
684
  @property
669
685
  def expander(self) -> Sequence[Expander]:
670
686
  """Sequence of all ``st.expander`` elements.
@@ -68,6 +68,7 @@ if TYPE_CHECKING:
68
68
  from streamlit.proto.DateTimeInput_pb2 import DateTimeInput as DateTimeInputProto
69
69
  from streamlit.proto.Element_pb2 import Element as ElementProto
70
70
  from streamlit.proto.Exception_pb2 import Exception as ExceptionProto
71
+ from streamlit.proto.Feedback_pb2 import Feedback as FeedbackProto
71
72
  from streamlit.proto.ForwardMsg_pb2 import ForwardMsg
72
73
  from streamlit.proto.Heading_pb2 import Heading as HeadingProto
73
74
  from streamlit.proto.Json_pb2 import Json as JsonProto
@@ -636,7 +637,6 @@ class Json(Element):
636
637
  class Markdown(Element):
637
638
  proto: MarkdownProto = field(repr=False)
638
639
 
639
- is_caption: bool
640
640
  allow_html: bool
641
641
  key: None
642
642
 
@@ -650,6 +650,11 @@ class Markdown(Element):
650
650
  def value(self) -> str:
651
651
  return self.proto.body
652
652
 
653
+ @property
654
+ def is_caption(self) -> bool:
655
+ """Whether this is a caption element (derived from element_type)."""
656
+ return self.proto.element_type == MarkdownProto.Type.CAPTION
657
+
653
658
 
654
659
  @dataclass(repr=False)
655
660
  class Caption(Markdown):
@@ -707,7 +712,7 @@ class Metric(Element):
707
712
 
708
713
  @dataclass(repr=False)
709
714
  class ButtonGroup(Widget, Generic[T]):
710
- """A representation of button_group that is used by ``st.feedback``."""
715
+ """A representation of ``st.pills`` and ``st.segmented_control``."""
711
716
 
712
717
  _value: list[T] | None
713
718
 
@@ -787,6 +792,58 @@ class ButtonGroup(Widget, Generic[T]):
787
792
  return self
788
793
 
789
794
 
795
+ @dataclass(repr=False)
796
+ class Feedback(Widget):
797
+ """A representation of ``st.feedback``."""
798
+
799
+ _value: int | InitialValue | None
800
+
801
+ proto: FeedbackProto = field(repr=False)
802
+ form_id: str
803
+
804
+ def __init__(self, proto: FeedbackProto, root: ElementTree) -> None:
805
+ super().__init__(proto, root)
806
+ self._value = InitialValue()
807
+ self.type = "feedback"
808
+
809
+ @property
810
+ def _widget_state(self) -> WidgetState:
811
+ """Protobuf message representing the state of the widget, including
812
+ any interactions that have happened.
813
+ Should be the same as the frontend would produce for those interactions.
814
+
815
+ Uses string_value as wire format to distinguish three states:
816
+ - None: User explicitly cleared -> string_value = ""
817
+ - int: User selected -> string_value = str(value)
818
+ - No string_value set: No interaction yet (use default)
819
+ """
820
+ ws = WidgetState()
821
+ ws.id = self.id
822
+
823
+ # Get the effective value: either from explicit set_value() or session state
824
+ effective_value = self.value
825
+
826
+ if effective_value is None:
827
+ ws.string_value = "" # Cleared or no default
828
+ else:
829
+ ws.string_value = str(effective_value) # User selected a value
830
+ return ws
831
+
832
+ @property
833
+ def value(self) -> int | None:
834
+ """The currently selected feedback value. (int or None)""" # noqa: D400
835
+ if not isinstance(self._value, InitialValue):
836
+ return self._value
837
+ state = self.root.session_state
838
+ assert state
839
+ return cast("int | None", state[self.id])
840
+
841
+ def set_value(self, v: int | None) -> Feedback:
842
+ """Set the value of the feedback widget. (int or None)""" # noqa: D400
843
+ self._value = v
844
+ return self
845
+
846
+
790
847
  @dataclass(repr=False)
791
848
  class Multiselect(Widget, Generic[T]):
792
849
  """A representation of ``st.multiselect``."""
@@ -1619,6 +1676,10 @@ class Block:
1619
1676
  def exception(self) -> ElementList[Exception]:
1620
1677
  return ElementList(self.get("exception")) # type: ignore
1621
1678
 
1679
+ @property
1680
+ def feedback(self) -> WidgetList[Feedback]:
1681
+ return WidgetList(self.get("feedback")) # type: ignore
1682
+
1622
1683
  @property
1623
1684
  def expander(self) -> Sequence[Expander]:
1624
1685
  return self.get("expander") # type: ignore
@@ -2077,6 +2138,8 @@ def parse_tree_from_messages(messages: list[ForwardMsg]) -> ElementTree:
2077
2138
  new_node = DateTimeInput(elt.date_time_input, root=root)
2078
2139
  elif ty == "exception":
2079
2140
  new_node = Exception(elt.exception, root=root)
2141
+ elif ty == "feedback":
2142
+ new_node = Feedback(elt.feedback, root=root)
2080
2143
  elif ty == "heading":
2081
2144
  if elt.heading.tag == HeadingProtoTag.TITLE_TAG.value:
2082
2145
  new_node = Title(elt.heading, root=root)
@@ -21,6 +21,7 @@ from typing import Final
21
21
  import tornado.web
22
22
 
23
23
  from streamlit.logger import get_logger
24
+ from streamlit.path_security import is_unsafe_path_pattern
24
25
 
25
26
  _LOGGER: Final = get_logger(__name__)
26
27
 
@@ -53,6 +54,14 @@ class AppStaticFileHandler(tornado.web.StaticFileHandler):
53
54
  def initialize(self, path: str, default_filename: str | None = None) -> None:
54
55
  super().initialize(path, default_filename)
55
56
 
57
+ @classmethod
58
+ def get_absolute_path(cls, root: str, path: str) -> str:
59
+ # SECURITY: Validate path pattern BEFORE any filesystem operations.
60
+ # See is_unsafe_path_pattern() docstring for details.
61
+ if is_unsafe_path_pattern(path):
62
+ raise tornado.web.HTTPError(400, "Bad Request")
63
+ return super().get_absolute_path(root, path)
64
+
56
65
  def validate_absolute_path(self, root: str, absolute_path: str) -> str | None:
57
66
  full_path = os.path.abspath(absolute_path)
58
67
 
@@ -77,8 +77,8 @@ class BidiComponentRequestHandler(tornado.web.RequestHandler):
77
77
  Notes
78
78
  -----
79
79
  This method writes directly to the response and sets appropriate HTTP
80
- status codes on error (``404`` for missing components/files, ``403`` for
81
- forbidden paths).
80
+ status codes on error (``404`` for missing components/files, ``400`` for
81
+ unsafe paths).
82
82
  """
83
83
  parts = path.split("/")
84
84
  component_name = parts[0]
@@ -105,8 +105,8 @@ class BidiComponentRequestHandler(tornado.web.RequestHandler):
105
105
  return
106
106
  abspath = build_safe_abspath(component_path, filename)
107
107
  if abspath is None:
108
- self.write("forbidden")
109
- self.set_status(403)
108
+ self.write("Bad Request")
109
+ self.set_status(400)
110
110
  return
111
111
 
112
112
  # If the resolved path is a directory, return 404 not found.
@@ -27,15 +27,18 @@ import mimetypes
27
27
  import os
28
28
  from typing import Final
29
29
 
30
+ from streamlit.path_security import is_unsafe_path_pattern
31
+
30
32
  _OCTET_STREAM: Final[str] = "application/octet-stream"
31
33
 
32
34
 
33
35
  def build_safe_abspath(component_root: str, relative_url_path: str) -> str | None:
34
- """Build an absolute path inside ``component_root`` if safe.
36
+ r"""Build an absolute path inside ``component_root`` if safe.
35
37
 
36
- The function joins ``relative_url_path`` with ``component_root`` and
37
- normalizes and resolves symlinks. If the resulting path escapes the
38
- component root, ``None`` is returned to indicate a forbidden traversal.
38
+ The function first validates that ``relative_url_path`` does not contain
39
+ dangerous patterns using :func:`~streamlit.path_security.is_unsafe_path_pattern`,
40
+ then joins it with ``component_root`` and resolves symlinks.
41
+ Returns ``None`` if the path is rejected by security checks or escapes the root.
39
42
 
40
43
  Parameters
41
44
  ----------
@@ -43,13 +46,18 @@ def build_safe_abspath(component_root: str, relative_url_path: str) -> str | Non
43
46
  Absolute path to the component's root directory.
44
47
  relative_url_path : str
45
48
  Relative URL path from the component root to the requested file.
49
+ Must be a simple relative path without dangerous patterns.
46
50
 
47
51
  Returns
48
52
  -------
49
53
  str or None
50
- The resolved absolute path if it stays within ``component_root``;
51
- otherwise ``None`` when the path would traverse outside the root.
54
+ The resolved absolute path if it passes all validation and stays
55
+ within ``component_root``; otherwise ``None``.
52
56
  """
57
+ # See is_unsafe_path_pattern() for security details.
58
+ if is_unsafe_path_pattern(relative_url_path):
59
+ return None
60
+
53
61
  root_real = os.path.realpath(component_root)
54
62
  candidate = os.path.normpath(os.path.join(root_real, relative_url_path))
55
63
  candidate_real = os.path.realpath(candidate)
@@ -48,8 +48,8 @@ class ComponentRequestHandler(tornado.web.RequestHandler):
48
48
  filename = "/".join(parts[1:])
49
49
  abspath = build_safe_abspath(component_root, filename)
50
50
  if abspath is None:
51
- self.write("forbidden")
52
- self.set_status(403)
51
+ self.write("Bad Request")
52
+ self.set_status(400)
53
53
  return
54
54
  try:
55
55
  with open(abspath, "rb") as file:
@@ -140,7 +140,7 @@ def create_streamlit_middleware() -> list[Middleware]:
140
140
  """Create the Streamlit-internal middleware stack.
141
141
 
142
142
  This function creates the middleware required for Streamlit's core functionality
143
- including session management and GZip compression.
143
+ including path security, session management, and GZip compression.
144
144
 
145
145
  Returns
146
146
  -------
@@ -153,9 +153,15 @@ def create_streamlit_middleware() -> list[Middleware]:
153
153
  from streamlit.web.server.starlette.starlette_gzip_middleware import (
154
154
  MediaAwareGZipMiddleware,
155
155
  )
156
+ from streamlit.web.server.starlette.starlette_path_security_middleware import (
157
+ PathSecurityMiddleware,
158
+ )
156
159
 
157
160
  middleware: list[Middleware] = []
158
161
 
162
+ # FIRST: Path security middleware to block dangerous paths before any other processing.
163
+ middleware.append(Middleware(PathSecurityMiddleware))
164
+
159
165
  # Add session middleware
160
166
  middleware.append(
161
167
  Middleware(
@@ -0,0 +1,97 @@
1
+ # Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-2026)
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ """Path security middleware for blocking unsafe path patterns.
16
+
17
+ This middleware implements the "Swiss Cheese" defense model - it provides
18
+ an additional layer of protection that catches dangerous path patterns even
19
+ if individual route handlers forget to validate paths. This is especially
20
+ important for preventing SSRF attacks via Windows UNC paths.
21
+
22
+ Defense Layers
23
+ --------------
24
+ Layer 1 (this middleware): Catch-all for any route, including future routes
25
+ Layer 2 (route handlers): Defense-in-depth via build_safe_abspath() and
26
+ explicit is_unsafe_path_pattern() checks
27
+
28
+ Each layer has potential "holes" (ways it could fail):
29
+ - Middleware: Could be accidentally removed, misconfigured, or bypassed
30
+ - Route handlers: Developer could forget to add checks to new routes
31
+
32
+ By keeping both layers, an attack only succeeds if BOTH fail simultaneously.
33
+
34
+ See Also
35
+ --------
36
+ streamlit.path_security : Core path validation functions used by this middleware
37
+ """
38
+
39
+ from __future__ import annotations
40
+
41
+ from typing import TYPE_CHECKING
42
+
43
+ from starlette.responses import Response
44
+
45
+ from streamlit.path_security import is_unsafe_path_pattern
46
+
47
+ if TYPE_CHECKING:
48
+ from starlette.types import ASGIApp, Receive, Scope, Send
49
+
50
+
51
+ class PathSecurityMiddleware:
52
+ """ASGI middleware that blocks requests with unsafe path patterns.
53
+
54
+ Implements Swiss Cheese defense - catches dangerous patterns even if
55
+ route handlers forget to validate paths. This prevents SSRF attacks
56
+ via Windows UNC paths and other path traversal vulnerabilities.
57
+
58
+ Parameters
59
+ ----------
60
+ app
61
+ The ASGI application to wrap.
62
+ """
63
+
64
+ def __init__(self, app: ASGIApp) -> None:
65
+ self.app = app
66
+
67
+ async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None:
68
+ """Process incoming requests and block unsafe paths.
69
+
70
+ Only validates HTTP requests; WebSocket and lifespan scopes are
71
+ passed through without validation since they don't serve file content.
72
+ """
73
+ # Only validate HTTP requests (skip WebSocket, lifespan)
74
+ if scope["type"] != "http":
75
+ await self.app(scope, receive, send)
76
+ return
77
+
78
+ path = scope.get("path", "")
79
+
80
+ # SECURITY: Check for double-slash patterns BEFORE stripping slashes.
81
+ # UNC paths like "//server/share" would be normalized to "server/share"
82
+ # by lstrip("/"), making them look safe. We must reject these early.
83
+ if path.startswith(("//", "\\\\")):
84
+ response = Response(content="Bad Request", status_code=400)
85
+ await response(scope, receive, send)
86
+ return
87
+
88
+ # Strip leading slash to get the relative path for validation
89
+ relative_path = path.lstrip("/")
90
+
91
+ # Check if the path contains unsafe patterns
92
+ if relative_path and is_unsafe_path_pattern(relative_path):
93
+ response = Response(content="Bad Request", status_code=400)
94
+ await response(scope, receive, send)
95
+ return
96
+
97
+ await self.app(scope, receive, send)