streamlit-nightly 1.53.2.dev20260127__py3-none-any.whl → 1.53.2.dev20260131__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 (225) hide show
  1. streamlit/config.py +14 -2
  2. streamlit/config_util.py +63 -8
  3. streamlit/elements/deck_gl_json_chart.py +5 -1
  4. streamlit/elements/lib/built_in_chart_utils.py +24 -4
  5. streamlit/elements/lib/color_util.py +20 -1
  6. streamlit/elements/vega_charts.py +24 -4
  7. streamlit/proto/Alert_pb2.py +2 -3
  8. streamlit/proto/AppPage_pb2.py +2 -3
  9. streamlit/proto/ArrowData_pb2.py +2 -3
  10. streamlit/proto/ArrowNamedDataSet_pb2.py +2 -3
  11. streamlit/proto/ArrowVegaLiteChart_pb2.py +2 -3
  12. streamlit/proto/Arrow_pb2.py +11 -18
  13. streamlit/proto/Arrow_pb2.pyi +1 -42
  14. streamlit/proto/AudioInput_pb2.py +2 -3
  15. streamlit/proto/Audio_pb2.py +2 -3
  16. streamlit/proto/AuthRedirect_pb2.py +2 -3
  17. streamlit/proto/AutoRerun_pb2.py +2 -3
  18. streamlit/proto/BackMsg_pb2.py +2 -3
  19. streamlit/proto/Balloons_pb2.py +2 -3
  20. streamlit/proto/BidiComponent_pb2.py +2 -3
  21. streamlit/proto/Block_pb2.py +36 -43
  22. streamlit/proto/Block_pb2.pyi +3 -48
  23. streamlit/proto/BokehChart_pb2.py +2 -3
  24. streamlit/proto/ButtonGroup_pb2.py +2 -3
  25. streamlit/proto/ButtonLikeIconPosition_pb2.py +2 -3
  26. streamlit/proto/Button_pb2.py +3 -6
  27. streamlit/proto/Button_pb2.pyi +1 -18
  28. streamlit/proto/CameraInput_pb2.py +2 -3
  29. streamlit/proto/ChatInput_pb2.py +5 -8
  30. streamlit/proto/ChatInput_pb2.pyi +1 -17
  31. streamlit/proto/Checkbox_pb2.py +2 -3
  32. streamlit/proto/ClientState_pb2.py +2 -3
  33. streamlit/proto/Code_pb2.py +3 -6
  34. streamlit/proto/Code_pb2.pyi +1 -18
  35. streamlit/proto/ColorPicker_pb2.py +2 -3
  36. streamlit/proto/Common_pb2.py +7 -8
  37. streamlit/proto/Common_pb2.pyi +2 -10
  38. streamlit/proto/Components_pb2.py +2 -3
  39. streamlit/proto/DateInput_pb2.py +2 -3
  40. streamlit/proto/DateTimeInput_pb2.py +2 -3
  41. streamlit/proto/DeckGlJsonChart_pb2.py +5 -12
  42. streamlit/proto/DeckGlJsonChart_pb2.pyi +1 -54
  43. streamlit/proto/Delta_pb2.py +4 -6
  44. streamlit/proto/Delta_pb2.pyi +5 -14
  45. streamlit/proto/DocString_pb2.py +2 -3
  46. streamlit/proto/DownloadButton_pb2.py +2 -3
  47. streamlit/proto/Element_pb2.py +4 -7
  48. streamlit/proto/Element_pb2.pyi +3 -23
  49. streamlit/proto/Empty_pb2.py +2 -3
  50. streamlit/proto/Exception_pb2.py +2 -3
  51. streamlit/proto/Favicon_pb2.py +2 -3
  52. streamlit/proto/FileUploader_pb2.py +2 -3
  53. streamlit/proto/ForwardMsg_pb2.py +12 -18
  54. streamlit/proto/ForwardMsg_pb2.pyi +4 -48
  55. streamlit/proto/GapSize_pb2.py +2 -3
  56. streamlit/proto/GitInfo_pb2.py +2 -3
  57. streamlit/proto/GraphVizChart_pb2.py +3 -6
  58. streamlit/proto/GraphVizChart_pb2.pyi +1 -18
  59. streamlit/proto/Heading_pb2.py +2 -3
  60. streamlit/proto/HeightConfig_pb2.py +2 -3
  61. streamlit/proto/Html_pb2.py +2 -3
  62. streamlit/proto/IFrame_pb2.py +3 -10
  63. streamlit/proto/IFrame_pb2.pyi +1 -42
  64. streamlit/proto/Image_pb2.py +3 -6
  65. streamlit/proto/Image_pb2.pyi +1 -18
  66. streamlit/proto/Json_pb2.py +2 -3
  67. streamlit/proto/LabelVisibilityMessage_pb2.py +2 -3
  68. streamlit/proto/LinkButton_pb2.py +2 -3
  69. streamlit/proto/Logo_pb2.py +2 -3
  70. streamlit/proto/Markdown_pb2.py +2 -3
  71. streamlit/proto/Metric_pb2.py +2 -3
  72. streamlit/proto/MetricsEvent_pb2.py +2 -3
  73. streamlit/proto/MultiSelect_pb2.py +3 -6
  74. streamlit/proto/MultiSelect_pb2.pyi +1 -11
  75. streamlit/proto/Navigation_pb2.py +2 -3
  76. streamlit/proto/NewSession_pb2.py +27 -26
  77. streamlit/proto/NewSession_pb2.pyi +24 -12
  78. streamlit/proto/NumberInput_pb2.py +2 -3
  79. streamlit/proto/PageConfig_pb2.py +2 -3
  80. streamlit/proto/PageInfo_pb2.py +2 -3
  81. streamlit/proto/PageLink_pb2.py +2 -3
  82. streamlit/proto/PageNotFound_pb2.py +2 -3
  83. streamlit/proto/PageProfile_pb2.py +2 -3
  84. streamlit/proto/ParentMessage_pb2.py +2 -3
  85. streamlit/proto/PlotlyChart_pb2.py +5 -10
  86. streamlit/proto/PlotlyChart_pb2.pyi +1 -58
  87. streamlit/proto/Progress_pb2.py +2 -3
  88. streamlit/proto/Radio_pb2.py +3 -6
  89. streamlit/proto/Radio_pb2.pyi +2 -19
  90. streamlit/proto/RootContainer_pb2.py +2 -3
  91. streamlit/proto/Selectbox_pb2.py +3 -6
  92. streamlit/proto/Selectbox_pb2.pyi +2 -19
  93. streamlit/proto/SessionEvent_pb2.py +2 -3
  94. streamlit/proto/SessionStatus_pb2.py +2 -3
  95. streamlit/proto/Skeleton_pb2.py +2 -3
  96. streamlit/proto/Slider_pb2.py +2 -3
  97. streamlit/proto/Snow_pb2.py +2 -3
  98. streamlit/proto/Space_pb2.py +2 -3
  99. streamlit/proto/Spinner_pb2.py +2 -3
  100. streamlit/proto/TextAlignmentConfig_pb2.py +2 -3
  101. streamlit/proto/TextArea_pb2.py +3 -6
  102. streamlit/proto/TextArea_pb2.pyi +1 -18
  103. streamlit/proto/TextInput_pb2.py +2 -3
  104. streamlit/proto/Text_pb2.py +2 -3
  105. streamlit/proto/TimeInput_pb2.py +2 -3
  106. streamlit/proto/Toast_pb2.py +2 -3
  107. streamlit/proto/Transient_pb2.py +2 -3
  108. streamlit/proto/Video_pb2.py +2 -3
  109. streamlit/proto/WidgetStates_pb2.py +2 -3
  110. streamlit/proto/WidthConfig_pb2.py +2 -3
  111. streamlit/proto/openmetrics_data_model_pb2.py +2 -3
  112. streamlit/runtime/app_session.py +19 -0
  113. streamlit/runtime/runtime.py +0 -4
  114. streamlit/static/index.html +1 -1
  115. streamlit/static/manifest.json +296 -296
  116. streamlit/static/static/js/{ErrorOutline.esm.DiaGWPsE.js → ErrorOutline.esm.DC6KVDKK.js} +1 -1
  117. streamlit/static/static/js/{FileDownload.esm.D-Qgpk5d.js → FileDownload.esm.Z9hRQIHi.js} +1 -1
  118. streamlit/static/static/js/{FileHelper.DmtDDGp0.js → FileHelper.DqvW90pm.js} +1 -1
  119. streamlit/static/static/js/{FormClearHelper.BM3uDLnU.js → FormClearHelper.DTFnX0js.js} +1 -1
  120. streamlit/static/static/js/{InputInstructions.B2YZ5Lle.js → InputInstructions.CdzsN_Va.js} +1 -1
  121. streamlit/static/static/js/{Particles.BzfZrl-0.js → Particles.12xFSjcn.js} +1 -1
  122. streamlit/static/static/js/{ProgressBar.DWErD3j3.js → ProgressBar.Dg-oMbWg.js} +1 -1
  123. streamlit/static/static/js/{StreamlitSyntaxHighlighter.DB31rUPf.js → StreamlitSyntaxHighlighter.rbzmcipw.js} +1 -1
  124. streamlit/static/static/js/{TableChart.esm.D3oUYYYd.js → TableChart.esm.CzJtGIR-.js} +1 -1
  125. streamlit/static/static/js/{Toolbar.CPyjMABY.js → Toolbar.COH7NaOE.js} +1 -1
  126. streamlit/static/static/js/{WidgetLabelHelpIconInline.C1NBCx-y.js → WidgetLabelHelpIconInline.Dlc8f0Ji.js} +1 -1
  127. streamlit/static/static/js/{base-input.C_CrNgNd.js → base-input.Q-zJLgRK.js} +4 -4
  128. streamlit/static/static/js/{checkbox.S6O8DPFl.js → checkbox.BKgWNdeI.js} +1 -1
  129. streamlit/static/static/js/{createDownloadLinkElement.B-5tIJBw.js → createDownloadLinkElement.6oO-YlYv.js} +1 -1
  130. streamlit/static/static/js/{data-grid-overlay-editor.BW5aAEJN.js → data-grid-overlay-editor.CO0xdNiG.js} +1 -1
  131. streamlit/static/static/js/{downloader.BswLlj7p.js → downloader.BBXcXdX1.js} +1 -1
  132. streamlit/static/static/js/{embed.QjYZXbaW.js → embed.CJzOXYBF.js} +1 -1
  133. streamlit/static/static/js/{es6.Dm_kl6Cp.js → es6.CdxPQzwJ.js} +2 -2
  134. streamlit/static/static/js/{formatNumber.CH39oSMw.js → formatNumber.DB5irY8c.js} +1 -1
  135. streamlit/static/static/js/{iconPosition.Dp9f2jam.js → iconPosition.BVScIr6G.js} +1 -1
  136. streamlit/static/static/js/{iframeResizer.contentWindow.DOprY46-.js → iframeResizer.contentWindow.D_QHVqPM.js} +1 -1
  137. streamlit/static/static/js/{index.CAzk7fUP.js → index.6DFY6LUF.js} +1 -1
  138. streamlit/static/static/js/{index.BBVcEzWu.js → index.B80gSxrS.js} +1 -1
  139. streamlit/static/static/js/{index.6UQ__fP7.js → index.BDtN2n7T.js} +1 -1
  140. streamlit/static/static/js/{index.BYjec3-R.js → index.BED2_zc7.js} +1 -1
  141. streamlit/static/static/js/{index.DMwRlpNi.js → index.BQnLeHnr.js} +1 -1
  142. streamlit/static/static/js/{index.s9zpEF8P.js → index.BSYebegS.js} +1 -1
  143. streamlit/static/static/js/{index.6OwBTJdz.js → index.BSpYHDvk.js} +1 -1
  144. streamlit/static/static/js/{index.BUbgW8RJ.js → index.BiCbrx53.js} +1 -1
  145. streamlit/static/static/js/{index.CYxcFtYt.js → index.Biyf9aUg.js} +1 -1
  146. streamlit/static/static/js/{index.BQu5Qf_i.js → index.BqbKiDp2.js} +1 -1
  147. streamlit/static/static/js/{index.BcUwq6kI.js → index.BqxwnMem.js} +1 -1
  148. streamlit/static/static/js/{index.CDZffl1q.js → index.BtOoVQt7.js} +1 -1
  149. streamlit/static/static/js/{index.C57ViuAX.js → index.BxMkW82k.js} +1 -1
  150. streamlit/static/static/js/{index.DypwtfIh.js → index.BxQxTpWl.js} +1 -1
  151. streamlit/static/static/js/{index.BaKZ4ira.js → index.C5oqIM3a.js} +1 -1
  152. streamlit/static/static/js/{index.tjRGlTlQ.js → index.CBE2cIbj.js} +1 -1
  153. streamlit/static/static/js/{index.Cb7V19H9.js → index.CE2WIFD1.js} +1 -1
  154. streamlit/static/static/js/{index.lMhsw-5K.js → index.CPc_uZux.js} +50 -50
  155. streamlit/static/static/js/{index.CfXTal6g.js → index.CUYi3FrD.js} +1 -1
  156. streamlit/static/static/js/index.Cpu2p5bH.js +1 -0
  157. streamlit/static/static/js/{index.OI2eh_me.js → index.CrY1BsL3.js} +1 -1
  158. streamlit/static/static/js/{index.B9XI6y3j.js → index.CtbETWQK.js} +1 -1
  159. streamlit/static/static/js/{index.6iOQDEVC.js → index.CvtybR-u.js} +1 -1
  160. streamlit/static/static/js/{index.DK9Im19R.js → index.CxoREvnF.js} +1 -1
  161. streamlit/static/static/js/{index.DsZNm1_D.js → index.D6OexhdL.js} +1 -1
  162. streamlit/static/static/js/{index.Ci3x7GcT.js → index.D9v2Y8Gk.js} +1 -1
  163. streamlit/static/static/js/{index.BFxjXeYb.js → index.DAfIQKfP.js} +1 -1
  164. streamlit/static/static/js/index.DAnczAW2.js +2 -0
  165. streamlit/static/static/js/{index.D1tkD8Lg.js → index.DAyGxxdm.js} +1 -1
  166. streamlit/static/static/js/{index.BNsCI-Q1.js → index.DCe7fo-m.js} +1 -1
  167. streamlit/static/static/js/{index.B6Sk5Jwr.js → index.DNfyKqhQ.js} +1 -1
  168. streamlit/static/static/js/{index.BlgpfTUq.js → index.DRoJNzFX.js} +1 -1
  169. streamlit/static/static/js/{index.CkSzTTpO.js → index.DU68jVpM.js} +54 -54
  170. streamlit/static/static/js/{index.TTO_Lb69.js → index.DZmBuE3z.js} +2 -2
  171. streamlit/static/static/js/{index.Cw5Xlisw.js → index.DhRAGiPR.js} +1 -1
  172. streamlit/static/static/js/{index.BUOjbZl6.js → index.DrcbvB2t.js} +1 -1
  173. streamlit/static/static/js/{index.wKGUZfH4.js → index.Dud7RRHc.js} +1 -1
  174. streamlit/static/static/js/{index.BxtweGcn.js → index.DyXcT2tD.js} +1 -1
  175. streamlit/static/static/js/{index.X1r5cenD.js → index.DyfvmNCy.js} +222 -222
  176. streamlit/static/static/js/{index.JKOtpaMf.js → index.GieKl4BG.js} +1 -1
  177. streamlit/static/static/js/{index.CuJ82OKQ.js → index.YULCxEtm.js} +1 -1
  178. streamlit/static/static/js/{index.-7yn3zqE.js → index._1zqETQ9.js} +2 -2
  179. streamlit/static/static/js/{index.gsc49XzN.js → index.bQJYmJ2T.js} +1 -1
  180. streamlit/static/static/js/{index.BlchQrZL.js → index.iXh5nbLZ.js} +1 -1
  181. streamlit/static/static/js/index.mSdC1FV6.js +1 -0
  182. streamlit/static/static/js/{index.DoRYpzHm.js → index.nL1fkE1D.js} +1 -1
  183. streamlit/static/static/js/{index.4QSKV4yi.js → index.tuFFlbxa.js} +1 -1
  184. streamlit/static/static/js/{index.Bwaj-9Zv.js → index.y-pa6LIX.js} +1 -1
  185. streamlit/static/static/js/{input.CIKqvWjB.js → input.BcC6sPE_.js} +1 -1
  186. streamlit/static/static/js/{main.BkNqoTrd.js → main.TU5_aabd.js} +1 -1
  187. streamlit/static/static/js/{memory.DNcbFok2.js → memory.By_OTlI4.js} +1 -1
  188. streamlit/static/static/js/{number-overlay-editor.DwjiYKav.js → number-overlay-editor.FSRaRpbU.js} +1 -1
  189. streamlit/static/static/js/{pandasStylerUtils.BSc50we3.js → pandasStylerUtils.3IiIKU9-.js} +1 -1
  190. streamlit/static/static/js/{sandbox.DJL9Gdcf.js → sandbox.DnxTbWzV.js} +1 -1
  191. streamlit/static/static/js/{styled-components.D4jE1G9j.js → styled-components.BeEcZ0vW.js} +1 -1
  192. streamlit/static/static/js/{throttle.dHeXiPIK.js → throttle.emUyC44c.js} +1 -1
  193. streamlit/static/static/js/{timepicker.CIpoSUyW.js → timepicker.DZ_ZufYF.js} +1 -1
  194. streamlit/static/static/js/{toConsumableArray.AOXQx2YY.js → toConsumableArray.DDV1bN1-.js} +1 -1
  195. streamlit/static/static/js/uniqueId.DTwvAE-J.js +1 -0
  196. streamlit/static/static/js/{useBasicWidgetState.BwQxG7iA.js → useBasicWidgetState.DvpdEDYZ.js} +1 -1
  197. streamlit/static/static/js/{useIntlLocale.JXPZPWaJ.js → useIntlLocale.BBDLbTq9.js} +1 -1
  198. streamlit/static/static/js/{useTextInputAutoExpand.CD_nhoE_.js → useTextInputAutoExpand.BIApLJKn.js} +1 -1
  199. streamlit/static/static/js/{useUpdateUiValue.Cl1Y22Ao.js → useUpdateUiValue.DQ4RuJNC.js} +1 -1
  200. streamlit/static/static/js/{useWaveformController.DJhScSDn.js → useWaveformController.B0olyXLQ.js} +1 -1
  201. streamlit/static/static/js/{withCalculatedWidth.CrAfFzO9.js → withCalculatedWidth.DYeqePuh.js} +1 -1
  202. streamlit/static/static/js/{withFullScreenWrapper.EdE3zOz5.js → withFullScreenWrapper.DtkUCO_d.js} +1 -1
  203. streamlit/testing/v1/element_tree.py +16 -2
  204. streamlit/web/bootstrap.py +5 -2
  205. streamlit/web/server/server.py +0 -1
  206. streamlit/web/server/server_util.py +22 -0
  207. streamlit/web/server/starlette/starlette_app.py +0 -1
  208. {streamlit_nightly-1.53.2.dev20260127.dist-info → streamlit_nightly-1.53.2.dev20260131.dist-info}/METADATA +10 -25
  209. {streamlit_nightly-1.53.2.dev20260127.dist-info → streamlit_nightly-1.53.2.dev20260131.dist-info}/RECORD +212 -221
  210. streamlit/proto/DataFrame_pb2.py +0 -56
  211. streamlit/proto/DataFrame_pb2.pyi +0 -430
  212. streamlit/proto/NamedDataSet_pb2.py +0 -28
  213. streamlit/proto/NamedDataSet_pb2.pyi +0 -67
  214. streamlit/proto/PagesChanged_pb2.py +0 -28
  215. streamlit/proto/PagesChanged_pb2.pyi +0 -55
  216. streamlit/proto/VegaLiteChart_pb2.py +0 -29
  217. streamlit/proto/VegaLiteChart_pb2.pyi +0 -79
  218. streamlit/static/static/js/index.B0Wcvg8a.js +0 -2
  219. streamlit/static/static/js/index.CivdhE_9.js +0 -1
  220. streamlit/static/static/js/index.DTUAvbJ0.js +0 -1
  221. streamlit/static/static/js/uniqueId.DRPc21MO.js +0 -1
  222. streamlit_nightly-1.53.2.dev20260127.data/scripts/streamlit.cmd +0 -16
  223. {streamlit_nightly-1.53.2.dev20260127.dist-info → streamlit_nightly-1.53.2.dev20260131.dist-info}/WHEEL +0 -0
  224. {streamlit_nightly-1.53.2.dev20260127.dist-info → streamlit_nightly-1.53.2.dev20260131.dist-info}/entry_points.txt +0 -0
  225. {streamlit_nightly-1.53.2.dev20260127.dist-info → streamlit_nightly-1.53.2.dev20260131.dist-info}/top_level.txt +0 -0
@@ -1 +1 @@
1
- import{av as j,j as m,aw as U,ae as z,P as $,ax as _,q as X,ay as q,m as G,e as Z,r as s,l as J,az as K,L as Q,o as oo,p as to,ab as ro,ac as eo}from"./index.lMhsw-5K.js";import{h as x}from"./moment.C7qA8nIE.js";import{u as no,D as ao,a as so}from"./useIntlLocale.JXPZPWaJ.js";import{u as io}from"./useBasicWidgetState.BwQxG7iA.js";import{S as lo}from"./styled-components.D4jE1G9j.js";import{E as co}from"./ErrorOutline.esm.DiaGWPsE.js";import"./timepicker.CIpoSUyW.js";import"./input.CIKqvWjB.js";import"./base-input.C_CrNgNd.js";import"./FormClearHelper.BM3uDLnU.js";const po=({theme:o,isInSidebar:t,step:r,minTime:c,maxTime:u,disabled:p,clearable:g,error:e})=>({Popover:{props:{ignoreBoundary:t,placement:U.bottomLeft,overrides:{Body:{style:{marginTop:o.spacing.px}}}}},CalendarContainer:{style:{fontSize:o.fontSizes.sm,paddingRight:o.spacing.sm,paddingLeft:o.spacing.sm,paddingBottom:o.spacing.none,paddingTop:o.spacing.sm}},Week:{style:{fontSize:o.fontSizes.sm}},Day:{style:({$pseudoHighlighted:i,$pseudoSelected:a,$selected:T,$isHovered:y})=>({fontSize:o.fontSizes.sm,lineHeight:o.lineHeights.base,"::before":{backgroundColor:T||a||i||y?`${o.colors.darkenedBgMix15} !important`:o.colors.transparent},"::after":{borderColor:o.colors.transparent},...G(o)&&y&&a&&!T?{color:o.colors.secondaryBg}:{}})},PrevButton:{style:()=>({display:"flex",alignItems:"center",justifyContent:"center",":active":{backgroundColor:o.colors.transparent},":focus":{backgroundColor:o.colors.transparent,outline:0}})},NextButton:{style:()=>({display:"flex",alignItems:"center",justifyContent:"center",":active":{backgroundColor:o.colors.transparent},":focus":{backgroundColor:o.colors.transparent,outline:0}})},Input:{props:{maskChar:null,endEnhancer:e&&m(q,{content:m(X,{source:e,allowHTML:!1}),placement:$.TOP_RIGHT,error:!0,children:m(_,{content:co,size:"lg"})}),overrides:{EndEnhancer:{style:{color:e?o.colors.redTextColor:o.colors.grayTextColor,backgroundColor:o.colors.transparent}},Root:{style:({$isFocused:i})=>{const a=z(o.colors,i);return{borderLeftWidth:o.sizes.borderWidth,borderRightWidth:o.sizes.borderWidth,borderTopWidth:o.sizes.borderWidth,borderBottomWidth:o.sizes.borderWidth,paddingRight:o.spacing.twoXS,borderTopColor:a,borderRightColor:a,borderBottomColor:a,borderLeftColor:a,...e&&{backgroundColor:o.colors.redBackgroundColor}}}},ClearIcon:{props:{overrides:{Svg:{style:{color:o.colors.grayTextColor,padding:o.spacing.threeXS,height:o.sizes.clearIconSize,width:o.sizes.clearIconSize,":hover":{fill:o.colors.bodyText}}}}}},InputContainer:{style:{backgroundColor:"transparent"}},Input:{style:{fontWeight:o.fontWeights.normal,paddingRight:o.spacing.sm,paddingLeft:o.spacing.md,paddingBottom:o.spacing.sm,paddingTop:o.spacing.sm,lineHeight:o.lineHeights.inputWidget,"::placeholder":{color:o.colors.fadedText60},...e&&{color:o.colors.redTextColor}},props:{"data-testid":"stDateTimeInputField"}}}}},TimeSelectContainer:{style:{paddingTop:o.spacing.none,paddingBottom:o.spacing.none}},TimeSelectFormControl:{style:{marginBottom:o.spacing.none},props:{overrides:{Label:{component:()=>null}}}},TimeSelect:{props:{step:r,format:"24",disabled:p,nullable:g,minTime:c,maxTime:u,overrides:{Select:{props:{disabled:p,overrides:{ControlContainer:{style:({$isFocused:i})=>{const a=z(o.colors,i);return{height:o.sizes.minElementHeight,borderLeftWidth:o.sizes.borderWidth,borderRightWidth:o.sizes.borderWidth,borderTopWidth:o.sizes.borderWidth,borderBottomWidth:o.sizes.borderWidth,borderTopColor:a,borderRightColor:a,borderBottomColor:a,borderLeftColor:a}}},IconsContainer:{style:()=>({paddingRight:o.spacing.sm})},ValueContainer:{style:()=>({lineHeight:o.lineHeights.inputWidget,paddingRight:o.spacing.sm,paddingLeft:o.spacing.md,paddingBottom:o.spacing.sm,paddingTop:o.spacing.sm})},SingleValue:{style:{fontWeight:o.fontWeights.normal},props:{"data-testid":"stDateTimeInputTimeDisplay"}},Dropdown:{style:()=>({paddingTop:o.spacing.none,paddingBottom:o.spacing.none,boxShadow:"none",maxHeight:o.sizes.maxDropdownHeight})},DropdownListItem:{component:lo},Popover:{props:{ignoreBoundary:t,overrides:{Body:{style:()=>({marginTop:o.spacing.px})}}}},Placeholder:{style:()=>({color:o.colors.fadedText60})},SelectArrow:{component:j,props:{overrides:{Svg:{style:()=>({width:o.iconSizes.xl,height:o.iconSizes.xl})}}}}}}}}}}}),h="YYYY/MM/DD, HH:mm",go=(o,t)=>{const r=o.getStringArrayValue(t);return r&&r.length>0?r[0]:null},uo=o=>o.default?.length?o.default[0]:null,fo=o=>o.value?.length?o.value[0]:null,k=o=>{let t;if(Array.isArray(o)?t=o.find(c=>c instanceof Date):t=o,!t||Number.isNaN(t.getTime()))return null;const r=new Date(t.getTime());return r.setSeconds(0,0),r},b=o=>{if(Z(o)||o==="")return null;const t=x(o,h,!0);return t.isValid()?k(t.toDate()):null},B=(o,t)=>o.getFullYear()===t.getFullYear()&&o.getMonth()===t.getMonth()&&o.getDate()===t.getDate(),I=(o,t)=>{const r=new Date(o.getTime());return r.setHours(t.getHours(),t.getMinutes(),0,0),r},mo=(o,t,r,c)=>{const u=b(o.min),p=b(o.max),g=e=>{t.setStringArrayValue(o,e?[e]:[],{fromUi:r.fromUi},c)};if(r.value){const e=b(r.value);if(e){u&&e<u||p&&e>p||g(r.value);return}}g(r.value)};function bo({disabled:o,element:t,widgetMgr:r,fragmentId:c}){const u=J(),p=s.useContext(K),g=s.useRef(null),[e,i]=io({getStateFromWidgetMgr:go,getDefaultStateFromProto:uo,getCurrStateFromProto:fo,updateWidgetMgrState:mo,element:t,widgetMgr:r,fragmentId:c}),{locale:a}=s.useContext(Q),T=no(a),y=t.step?Number(t.step):900,l=s.useMemo(()=>b(t.min),[t.min]),d=s.useMemo(()=>b(t.max),[t.max]),C=s.useMemo(()=>b(e),[e]),[n,v]=s.useState(C),[M,L]=s.useState(C);C!==M&&(v(C),L(C));const H=l??void 0,V=d??void 0,E=s.useMemo(()=>{if(!(!n||!l))return B(n,l)?I(n,l):void 0},[n,l]),P=s.useMemo(()=>{if(!(!n||!d))return B(n,d)?I(n,d):void 0},[n,d]),w=t.format.replaceAll(/[a-zA-Z]/g,"9"),D=`${t.format.replaceAll("Y","y").replaceAll("D","d")}, HH:mm`,A=`${w}, 99:99`,R=`${t.format}, HH:MM`,W=(t.default&&t.default.length>0?t.default[0]:"").length===0&&!o,F=s.useMemo(()=>{if(!n)return null;if(l&&n<l||d&&n>d){const f=x(l).format(D),S=x(d).format(D);return`**Error**: Date and time set outside allowed range. Please select a date and time between ${f} and ${S}.`}return null},[n,l,d,D]),O=s.useCallback(({date:f})=>{const S=k(f);v(S),g.current?.open?.()},[]),N=s.useCallback(()=>{const f=n?x(n).format(h):null;f!==e&&i({value:f,fromUi:!0})},[n,e,i]),Y=po({theme:u,isInSidebar:p,step:y,minTime:E,maxTime:P,disabled:o,clearable:W,error:F});return oo("div",{className:"stDateTimeInput","data-testid":"stDateTimeInput",children:[m(eo,{label:t.label,disabled:o,labelVisibility:to(t.labelVisibility?.value),children:t.help&&m(ro,{content:t.help,label:t.label})}),m(so,{ref:g,locale:T,density:ao.high,value:n,onChange:O,onClose:N,minDate:H,maxDate:V,disabled:o,timeSelectStart:!0,formatString:D,mask:A,placeholder:R,clearable:W,overrides:Y,"aria-label":t.label})]})}const ko=s.memo(bo);export{ko as default};
1
+ import{av as j,j as m,aw as U,ae as z,P as $,ax as _,q as X,ay as q,m as G,e as Z,r as s,l as J,az as K,L as Q,o as oo,p as to,ab as ro,ac as eo}from"./index.CPc_uZux.js";import{h as x}from"./moment.C7qA8nIE.js";import{u as no,D as ao,a as so}from"./useIntlLocale.BBDLbTq9.js";import{u as io}from"./useBasicWidgetState.DvpdEDYZ.js";import{S as lo}from"./styled-components.BeEcZ0vW.js";import{E as co}from"./ErrorOutline.esm.DC6KVDKK.js";import"./timepicker.DZ_ZufYF.js";import"./input.BcC6sPE_.js";import"./base-input.Q-zJLgRK.js";import"./FormClearHelper.DTFnX0js.js";const po=({theme:o,isInSidebar:t,step:r,minTime:c,maxTime:u,disabled:p,clearable:g,error:e})=>({Popover:{props:{ignoreBoundary:t,placement:U.bottomLeft,overrides:{Body:{style:{marginTop:o.spacing.px}}}}},CalendarContainer:{style:{fontSize:o.fontSizes.sm,paddingRight:o.spacing.sm,paddingLeft:o.spacing.sm,paddingBottom:o.spacing.none,paddingTop:o.spacing.sm}},Week:{style:{fontSize:o.fontSizes.sm}},Day:{style:({$pseudoHighlighted:i,$pseudoSelected:a,$selected:T,$isHovered:y})=>({fontSize:o.fontSizes.sm,lineHeight:o.lineHeights.base,"::before":{backgroundColor:T||a||i||y?`${o.colors.darkenedBgMix15} !important`:o.colors.transparent},"::after":{borderColor:o.colors.transparent},...G(o)&&y&&a&&!T?{color:o.colors.secondaryBg}:{}})},PrevButton:{style:()=>({display:"flex",alignItems:"center",justifyContent:"center",":active":{backgroundColor:o.colors.transparent},":focus":{backgroundColor:o.colors.transparent,outline:0}})},NextButton:{style:()=>({display:"flex",alignItems:"center",justifyContent:"center",":active":{backgroundColor:o.colors.transparent},":focus":{backgroundColor:o.colors.transparent,outline:0}})},Input:{props:{maskChar:null,endEnhancer:e&&m(q,{content:m(X,{source:e,allowHTML:!1}),placement:$.TOP_RIGHT,error:!0,children:m(_,{content:co,size:"lg"})}),overrides:{EndEnhancer:{style:{color:e?o.colors.redTextColor:o.colors.grayTextColor,backgroundColor:o.colors.transparent}},Root:{style:({$isFocused:i})=>{const a=z(o.colors,i);return{borderLeftWidth:o.sizes.borderWidth,borderRightWidth:o.sizes.borderWidth,borderTopWidth:o.sizes.borderWidth,borderBottomWidth:o.sizes.borderWidth,paddingRight:o.spacing.twoXS,borderTopColor:a,borderRightColor:a,borderBottomColor:a,borderLeftColor:a,...e&&{backgroundColor:o.colors.redBackgroundColor}}}},ClearIcon:{props:{overrides:{Svg:{style:{color:o.colors.grayTextColor,padding:o.spacing.threeXS,height:o.sizes.clearIconSize,width:o.sizes.clearIconSize,":hover":{fill:o.colors.bodyText}}}}}},InputContainer:{style:{backgroundColor:"transparent"}},Input:{style:{fontWeight:o.fontWeights.normal,paddingRight:o.spacing.sm,paddingLeft:o.spacing.md,paddingBottom:o.spacing.sm,paddingTop:o.spacing.sm,lineHeight:o.lineHeights.inputWidget,"::placeholder":{color:o.colors.fadedText60},...e&&{color:o.colors.redTextColor}},props:{"data-testid":"stDateTimeInputField"}}}}},TimeSelectContainer:{style:{paddingTop:o.spacing.none,paddingBottom:o.spacing.none}},TimeSelectFormControl:{style:{marginBottom:o.spacing.none},props:{overrides:{Label:{component:()=>null}}}},TimeSelect:{props:{step:r,format:"24",disabled:p,nullable:g,minTime:c,maxTime:u,overrides:{Select:{props:{disabled:p,overrides:{ControlContainer:{style:({$isFocused:i})=>{const a=z(o.colors,i);return{height:o.sizes.minElementHeight,borderLeftWidth:o.sizes.borderWidth,borderRightWidth:o.sizes.borderWidth,borderTopWidth:o.sizes.borderWidth,borderBottomWidth:o.sizes.borderWidth,borderTopColor:a,borderRightColor:a,borderBottomColor:a,borderLeftColor:a}}},IconsContainer:{style:()=>({paddingRight:o.spacing.sm})},ValueContainer:{style:()=>({lineHeight:o.lineHeights.inputWidget,paddingRight:o.spacing.sm,paddingLeft:o.spacing.md,paddingBottom:o.spacing.sm,paddingTop:o.spacing.sm})},SingleValue:{style:{fontWeight:o.fontWeights.normal},props:{"data-testid":"stDateTimeInputTimeDisplay"}},Dropdown:{style:()=>({paddingTop:o.spacing.none,paddingBottom:o.spacing.none,boxShadow:"none",maxHeight:o.sizes.maxDropdownHeight})},DropdownListItem:{component:lo},Popover:{props:{ignoreBoundary:t,overrides:{Body:{style:()=>({marginTop:o.spacing.px})}}}},Placeholder:{style:()=>({color:o.colors.fadedText60})},SelectArrow:{component:j,props:{overrides:{Svg:{style:()=>({width:o.iconSizes.xl,height:o.iconSizes.xl})}}}}}}}}}}}),h="YYYY/MM/DD, HH:mm",go=(o,t)=>{const r=o.getStringArrayValue(t);return r&&r.length>0?r[0]:null},uo=o=>o.default?.length?o.default[0]:null,fo=o=>o.value?.length?o.value[0]:null,k=o=>{let t;if(Array.isArray(o)?t=o.find(c=>c instanceof Date):t=o,!t||Number.isNaN(t.getTime()))return null;const r=new Date(t.getTime());return r.setSeconds(0,0),r},b=o=>{if(Z(o)||o==="")return null;const t=x(o,h,!0);return t.isValid()?k(t.toDate()):null},B=(o,t)=>o.getFullYear()===t.getFullYear()&&o.getMonth()===t.getMonth()&&o.getDate()===t.getDate(),I=(o,t)=>{const r=new Date(o.getTime());return r.setHours(t.getHours(),t.getMinutes(),0,0),r},mo=(o,t,r,c)=>{const u=b(o.min),p=b(o.max),g=e=>{t.setStringArrayValue(o,e?[e]:[],{fromUi:r.fromUi},c)};if(r.value){const e=b(r.value);if(e){u&&e<u||p&&e>p||g(r.value);return}}g(r.value)};function bo({disabled:o,element:t,widgetMgr:r,fragmentId:c}){const u=J(),p=s.useContext(K),g=s.useRef(null),[e,i]=io({getStateFromWidgetMgr:go,getDefaultStateFromProto:uo,getCurrStateFromProto:fo,updateWidgetMgrState:mo,element:t,widgetMgr:r,fragmentId:c}),{locale:a}=s.useContext(Q),T=no(a),y=t.step?Number(t.step):900,l=s.useMemo(()=>b(t.min),[t.min]),d=s.useMemo(()=>b(t.max),[t.max]),C=s.useMemo(()=>b(e),[e]),[n,v]=s.useState(C),[M,L]=s.useState(C);C!==M&&(v(C),L(C));const H=l??void 0,V=d??void 0,E=s.useMemo(()=>{if(!(!n||!l))return B(n,l)?I(n,l):void 0},[n,l]),P=s.useMemo(()=>{if(!(!n||!d))return B(n,d)?I(n,d):void 0},[n,d]),w=t.format.replaceAll(/[a-zA-Z]/g,"9"),D=`${t.format.replaceAll("Y","y").replaceAll("D","d")}, HH:mm`,A=`${w}, 99:99`,R=`${t.format}, HH:MM`,W=(t.default&&t.default.length>0?t.default[0]:"").length===0&&!o,F=s.useMemo(()=>{if(!n)return null;if(l&&n<l||d&&n>d){const f=x(l).format(D),S=x(d).format(D);return`**Error**: Date and time set outside allowed range. Please select a date and time between ${f} and ${S}.`}return null},[n,l,d,D]),O=s.useCallback(({date:f})=>{const S=k(f);v(S),g.current?.open?.()},[]),N=s.useCallback(()=>{const f=n?x(n).format(h):null;f!==e&&i({value:f,fromUi:!0})},[n,e,i]),Y=po({theme:u,isInSidebar:p,step:y,minTime:E,maxTime:P,disabled:o,clearable:W,error:F});return oo("div",{className:"stDateTimeInput","data-testid":"stDateTimeInput",children:[m(eo,{label:t.label,disabled:o,labelVisibility:to(t.labelVisibility?.value),children:t.help&&m(ro,{content:t.help,label:t.label})}),m(so,{ref:g,locale:T,density:ao.high,value:n,onChange:O,onClose:N,minDate:H,maxDate:V,disabled:o,timeSelectStart:!0,formatString:D,mask:A,placeholder:R,clearable:W,overrides:Y,"aria-label":t.label})]})}const ko=s.memo(bo);export{ko as default};
@@ -1 +1 @@
1
- import{r as h,l as A,az as ht,L as gt,e as tt,o as mt,j as T,p as wt,ab as bt,ac as pt,aw as yt,ae as Dt,ay as Ot,P as xt,ax as kt,q as St,m as Tt}from"./index.lMhsw-5K.js";import{h as P}from"./moment.C7qA8nIE.js";import{u as Mt}from"./useBasicWidgetState.BwQxG7iA.js";import{e as Ct,u as Yt,D as Wt,a as Et}from"./useIntlLocale.JXPZPWaJ.js";import{E as Pt}from"./ErrorOutline.esm.DiaGWPsE.js";import"./FormClearHelper.BM3uDLnU.js";import"./timepicker.CIpoSUyW.js";import"./input.CIKqvWjB.js";import"./base-input.C_CrNgNd.js";const et=6048e5,vt=864e5,X=Symbol.for("constructDateFrom");function O(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&X in e?e[X](t):e instanceof Date?new e.constructor(t):new Date(t)}function p(e,t){return O(t||e,e)}let Ft={};function I(){return Ft}function v(e,t){const r=I(),n=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=p(e,t?.in),o=a.getDay(),i=(o<n?7:0)+o-n;return a.setDate(a.getDate()-i),a.setHours(0,0,0,0),a}function F(e,t){return v(e,{...t,weekStartsOn:1})}function rt(e,t){const r=p(e,t?.in),n=r.getFullYear(),a=O(r,0);a.setFullYear(n+1,0,4),a.setHours(0,0,0,0);const o=F(a),i=O(r,0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);const f=F(i);return r.getTime()>=o.getTime()?n+1:r.getTime()>=f.getTime()?n:n-1}function V(e){const t=p(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function It(e,...t){const r=O.bind(null,t.find(n=>typeof n=="object"));return t.map(r)}function j(e,t){const r=p(e,t?.in);return r.setHours(0,0,0,0),r}function Bt(e,t,r){const[n,a]=It(r?.in,e,t),o=j(n),i=j(a),f=+o-V(o),g=+i-V(i);return Math.round((f-g)/vt)}function Ht(e,t){const r=rt(e,t),n=O(e,0);return n.setFullYear(r,0,4),n.setHours(0,0,0,0),F(n)}function qt(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Lt(e){return!(!qt(e)&&typeof e!="number"||isNaN(+p(e)))}function Nt(e,t){const r=p(e,t?.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}function Rt(e,t){const r=p(e,t?.in);return Bt(r,Nt(r))+1}function _t(e,t){const r=p(e,t?.in),n=+F(r)-+Ht(r);return Math.round(n/et)+1}function nt(e,t){const r=p(e,t?.in),n=r.getFullYear(),a=I(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,i=O(t?.in||e,0);i.setFullYear(n+1,0,o),i.setHours(0,0,0,0);const f=v(i,t),g=O(t?.in||e,0);g.setFullYear(n,0,o),g.setHours(0,0,0,0);const y=v(g,t);return+r>=+f?n+1:+r>=+y?n:n-1}function Gt(e,t){const r=I(),n=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=nt(e,t),o=O(t?.in||e,0);return o.setFullYear(a,0,n),o.setHours(0,0,0,0),v(o,t)}function Qt(e,t){const r=p(e,t?.in),n=+v(r,t)-+Gt(r,t);return Math.round(n/et)+1}function s(e,t){const r=e<0?"-":"",n=Math.abs(e).toString().padStart(t,"0");return r+n}const D={y(e,t){const r=e.getFullYear(),n=r>0?r:1-r;return s(t==="yy"?n%100:n,t.length)},M(e,t){const r=e.getMonth();return t==="M"?String(r+1):s(r+1,2)},d(e,t){return s(e.getDate(),t.length)},a(e,t){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h(e,t){return s(e.getHours()%12||12,t.length)},H(e,t){return s(e.getHours(),t.length)},m(e,t){return s(e.getMinutes(),t.length)},s(e,t){return s(e.getSeconds(),t.length)},S(e,t){const r=t.length,n=e.getMilliseconds(),a=Math.trunc(n*Math.pow(10,r-3));return s(a,t.length)}},M={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},z={G:function(e,t,r){const n=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});case"GGGG":default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){const n=e.getFullYear(),a=n>0?n:1-n;return r.ordinalNumber(a,{unit:"year"})}return D.y(e,t)},Y:function(e,t,r,n){const a=nt(e,n),o=a>0?a:1-a;if(t==="YY"){const i=o%100;return s(i,2)}return t==="Yo"?r.ordinalNumber(o,{unit:"year"}):s(o,t.length)},R:function(e,t){const r=rt(e);return s(r,t.length)},u:function(e,t){const r=e.getFullYear();return s(r,t.length)},Q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return s(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return s(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){const n=e.getMonth();switch(t){case"M":case"MM":return D.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){const n=e.getMonth();switch(t){case"L":return String(n+1);case"LL":return s(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){const a=Qt(e,n);return t==="wo"?r.ordinalNumber(a,{unit:"week"}):s(a,t.length)},I:function(e,t,r){const n=_t(e);return t==="Io"?r.ordinalNumber(n,{unit:"week"}):s(n,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):D.d(e,t)},D:function(e,t,r){const n=Rt(e);return t==="Do"?r.ordinalNumber(n,{unit:"dayOfYear"}):s(n,t.length)},E:function(e,t,r){const n=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});case"EEEE":default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){const a=e.getDay(),o=(a-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return s(o,2);case"eo":return r.ordinalNumber(o,{unit:"day"});case"eee":return r.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(a,{width:"short",context:"formatting"});case"eeee":default:return r.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){const a=e.getDay(),o=(a-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return s(o,t.length);case"co":return r.ordinalNumber(o,{unit:"day"});case"ccc":return r.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(a,{width:"narrow",context:"standalone"});case"cccccc":return r.day(a,{width:"short",context:"standalone"});case"cccc":default:return r.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,r){const n=e.getDay(),a=n===0?7:n;switch(t){case"i":return String(a);case"ii":return s(a,t.length);case"io":return r.ordinalNumber(a,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});case"iiii":default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){const a=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(e,t,r){const n=e.getHours();let a;switch(n===12?a=M.noon:n===0?a=M.midnight:a=n/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,t,r){const n=e.getHours();let a;switch(n>=17?a=M.evening:n>=12?a=M.afternoon:n>=4?a=M.morning:a=M.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,t,r){if(t==="ho"){let n=e.getHours()%12;return n===0&&(n=12),r.ordinalNumber(n,{unit:"hour"})}return D.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):D.H(e,t)},K:function(e,t,r){const n=e.getHours()%12;return t==="Ko"?r.ordinalNumber(n,{unit:"hour"}):s(n,t.length)},k:function(e,t,r){let n=e.getHours();return n===0&&(n=24),t==="ko"?r.ordinalNumber(n,{unit:"hour"}):s(n,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):D.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):D.s(e,t)},S:function(e,t){return D.S(e,t)},X:function(e,t,r){const n=e.getTimezoneOffset();if(n===0)return"Z";switch(t){case"X":return Z(n);case"XXXX":case"XX":return k(n);case"XXXXX":case"XXX":default:return k(n,":")}},x:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"x":return Z(n);case"xxxx":case"xx":return k(n);case"xxxxx":case"xxx":default:return k(n,":")}},O:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+U(n,":");case"OOOO":default:return"GMT"+k(n,":")}},z:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+U(n,":");case"zzzz":default:return"GMT"+k(n,":")}},t:function(e,t,r){const n=Math.trunc(+e/1e3);return s(n,t.length)},T:function(e,t,r){return s(+e,t.length)}};function U(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),a=Math.trunc(n/60),o=n%60;return o===0?r+String(a):r+String(a)+t+s(o,2)}function Z(e,t){return e%60===0?(e>0?"-":"+")+s(Math.abs(e)/60,2):k(e,t)}function k(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),a=s(Math.trunc(n/60),2),o=s(n%60,2);return r+a+t+o}const J=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},at=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},$t=(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],n=r[1],a=r[2];if(!a)return J(e,t);let o;switch(n){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",J(n,t)).replace("{{time}}",at(a,t))},At={p:at,P:$t},Xt=/^D+$/,Vt=/^Y+$/,jt=["D","DD","YY","YYYY"];function zt(e){return Xt.test(e)}function Ut(e){return Vt.test(e)}function Zt(e,t,r){const n=Jt(e,t,r);if(console.warn(n),jt.includes(e))throw new RangeError(n)}function Jt(e,t,r){const n=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Kt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,te=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ee=/^'([^]*?)'?$/,re=/''/g,ne=/[a-zA-Z]/;function K(e,t,r){const n=I(),a=r?.locale??n.locale??Ct,o=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,f=p(e,r?.in);if(!Lt(f))throw new RangeError("Invalid time value");let g=t.match(te).map(u=>{const d=u[0];if(d==="p"||d==="P"){const c=At[d];return c(u,a.formatLong)}return u}).join("").match(Kt).map(u=>{if(u==="''")return{isToken:!1,value:"'"};const d=u[0];if(d==="'")return{isToken:!1,value:ae(u)};if(z[d])return{isToken:!0,value:u};if(d.match(ne))throw new RangeError("Format string contains an unescaped latin alphabet character `"+d+"`");return{isToken:!1,value:u}});a.localize.preprocessor&&(g=a.localize.preprocessor(f,g));const y={firstWeekContainsDate:o,weekStartsOn:i,locale:a};return g.map(u=>{if(!u.isToken)return u.value;const d=u.value;(!r?.useAdditionalWeekYearTokens&&Ut(d)||!r?.useAdditionalDayOfYearTokens&&zt(d))&&Zt(d,t,String(e));const c=z[d[0]];return c(f,d,a.localize,y)}).join("")}function ae(e){const t=e.match(ee);return t?t[1].replace(re,"'"):e}const B="YYYY/MM/DD";function H(e){return e.map(t=>new Date(t))}function oe(e){return e?e.map(t=>P(t).format(B)):[]}function se({disabled:e,element:t,widgetMgr:r,fragmentId:n}){const a=A(),o=h.useContext(ht),[i,f]=Mt({getStateFromWidgetMgr:ie,getDefaultStateFromProto:ce,getCurrStateFromProto:ue,updateWidgetMgrState:de,element:t,widgetMgr:r,fragmentId:n}),[g,y]=h.useState(!1),[u,d]=h.useState(null),{colors:c,fontSizes:q,fontWeights:it,lineHeights:Q,spacing:m,sizes:w}=A(),{locale:ct}=h.useContext(gt),C=Yt(ct),x=h.useMemo(()=>P(t.min,B).toDate(),[t.min]),S=h.useMemo(()=>st(t),[t]),ut=h.useMemo(()=>{if(!t.isRange)return!1;const l=P().subtract(2,"years").toDate();return x<l},[t.isRange,x]),dt=t.default.length===0&&!e,L=h.useMemo(()=>t.format.replaceAll(/[a-zA-Z]/g,"9"),[t.format]),Y=h.useMemo(()=>t.format.replaceAll("Y","y").replaceAll("D","d"),[t.format]),N=h.useMemo(()=>K(x,Y,{locale:C}),[x,Y,C]),R=h.useMemo(()=>S?K(S,Y,{locale:C}):"",[S,Y,C]),$=h.useCallback(l=>{if(!l)return null;if(t.isRange){const b=l==="End"?`before ${R}`:`after ${N}`;return`**Error**: ${l} date set outside allowed range. Please select a date ${b}.`}return`**Error**: Date set outside allowed range. Please select a date between ${N} and ${R}.`},[t.isRange,R,N]),ft=h.useCallback(({date:l})=>{if(d(null),tt(l)){f({value:[],fromUi:!0}),y(!0);return}const b=Array.isArray(l)?l.filter(_=>!!_).map(_=>G(_)):G(l),{errorType:W,newDates:E}=ot(b,x,S);W&&d($(W)),f({value:E,fromUi:!0}),y(!E)},[f,$,d,x,S]),lt=h.useCallback(()=>{if(!g)return;const l=H(t.default);f({value:l,fromUi:!0}),y(!l)},[g,t,f]);return mt("div",{className:"stDateInput","data-testid":"stDateInput",children:[T(pt,{label:t.label,disabled:e,labelVisibility:wt(t.labelVisibility?.value),children:t.help&&T(bt,{content:t.help,label:t.label})}),T(Et,{locale:C,density:Wt.high,formatString:Y,mask:t.isRange?`${L} – ${L}`:L,placeholder:t.isRange?`${t.format} – ${t.format}`:t.format,disabled:e,onChange:ft,onClose:lt,quickSelect:ut,overrides:{Popover:{props:{ignoreBoundary:o,placement:yt.bottomLeft,overrides:{Body:{style:{marginTop:m.px}}}}},CalendarContainer:{style:{fontSize:q.sm,paddingRight:m.sm,paddingLeft:m.sm,paddingBottom:m.sm,paddingTop:m.sm}},Week:{style:{fontSize:q.sm}},Day:{style:({$pseudoHighlighted:l,$pseudoSelected:b,$selected:W,$isHovered:E})=>({fontSize:q.sm,lineHeight:Q.base,"::before":{backgroundColor:W||b||l||E?`${c.darkenedBgMix15} !important`:c.transparent},"::after":{borderColor:c.transparent},...Tt(a)&&E&&b&&!W?{color:c.secondaryBg}:{}})},PrevButton:{style:()=>({display:"flex",alignItems:"center",justifyContent:"center",":active":{backgroundColor:c.transparent},":focus":{backgroundColor:c.transparent,outline:0}})},NextButton:{style:{display:"flex",alignItems:"center",justifyContent:"center",":active":{backgroundColor:c.transparent},":focus":{backgroundColor:c.transparent,outline:0}}},Input:{props:{maskChar:null,endEnhancer:u&&T(Ot,{content:T(St,{source:u,allowHTML:!1}),placement:xt.TOP_RIGHT,error:!0,children:T(kt,{content:Pt,size:"lg"})}),overrides:{EndEnhancer:{style:{color:c.redTextColor,backgroundColor:c.transparent}},Root:{style:({$isFocused:l})=>{const b=Dt(c,l);return{borderLeftWidth:w.borderWidth,borderRightWidth:w.borderWidth,borderTopWidth:w.borderWidth,borderBottomWidth:w.borderWidth,paddingRight:m.twoXS,borderTopColor:b,borderRightColor:b,borderBottomColor:b,borderLeftColor:b,...u&&{backgroundColor:c.redBackgroundColor}}}},ClearIcon:{props:{overrides:{Svg:{style:{color:c.grayTextColor,padding:m.threeXS,height:w.clearIconSize,width:w.clearIconSize,":hover":{fill:c.bodyText}}}}}},InputContainer:{style:{backgroundColor:"transparent"}},Input:{style:{fontWeight:it.normal,paddingRight:m.sm,paddingLeft:m.md,paddingBottom:m.sm,paddingTop:m.sm,lineHeight:Q.inputWidget,"::placeholder":{color:c.fadedText60},...u&&{color:c.redTextColor}},props:{"data-testid":"stDateInputField"}}}}},QuickSelect:{props:{overrides:{ControlContainer:{style:{height:w.minElementHeight,borderLeftWidth:w.borderWidth,borderRightWidth:w.borderWidth,borderTopWidth:w.borderWidth,borderBottomWidth:w.borderWidth}}}}}},value:i,minDate:x,maxDate:S,range:t.isRange,clearable:dt})]})}function ie(e,t){const r=e.getStringArrayValue(t),n=r!==void 0?r:t.default||[];return H(n)}function ce(e){return H(e.default)??[]}function ue(e){return H(e.value)??[]}function de(e,t,r,n){const a=P(e.min,B).toDate(),o=st(e);let i=!0;const f=(r.value||[]).map(y=>G(y)),{errorType:g}=ot(f,a,o);g&&(i=!1),i&&t.setStringArrayValue(e,oe(r.value),{fromUi:r.fromUi},n)}function ot(e,t,r){const n=[];let a=null;return tt(e)?{errorType:null,newDates:[]}:(Array.isArray(e)?e.forEach(o=>{o&&(r&&o>r?a="End":o<t&&(a="Start"),n.push(o))}):e&&(r&&e>r?a="End":e<t&&(a="Start"),n.push(e)),{errorType:a,newDates:n})}function st(e){const t=e.max;return t&&t.length>0?P(t,B).toDate():void 0}function G(e){const t=new Date(e.getTime());return t.setHours(0,0,0,0),t}const De=h.memo(se);export{De as default};
1
+ import{r as h,l as A,az as ht,L as gt,e as tt,o as mt,j as T,p as wt,ab as bt,ac as pt,aw as yt,ae as Dt,ay as Ot,P as xt,ax as kt,q as St,m as Tt}from"./index.CPc_uZux.js";import{h as P}from"./moment.C7qA8nIE.js";import{u as Mt}from"./useBasicWidgetState.DvpdEDYZ.js";import{e as Ct,u as Yt,D as Wt,a as Et}from"./useIntlLocale.BBDLbTq9.js";import{E as Pt}from"./ErrorOutline.esm.DC6KVDKK.js";import"./FormClearHelper.DTFnX0js.js";import"./timepicker.DZ_ZufYF.js";import"./input.BcC6sPE_.js";import"./base-input.Q-zJLgRK.js";const et=6048e5,vt=864e5,X=Symbol.for("constructDateFrom");function O(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&X in e?e[X](t):e instanceof Date?new e.constructor(t):new Date(t)}function p(e,t){return O(t||e,e)}let Ft={};function I(){return Ft}function v(e,t){const r=I(),n=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=p(e,t?.in),o=a.getDay(),i=(o<n?7:0)+o-n;return a.setDate(a.getDate()-i),a.setHours(0,0,0,0),a}function F(e,t){return v(e,{...t,weekStartsOn:1})}function rt(e,t){const r=p(e,t?.in),n=r.getFullYear(),a=O(r,0);a.setFullYear(n+1,0,4),a.setHours(0,0,0,0);const o=F(a),i=O(r,0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);const f=F(i);return r.getTime()>=o.getTime()?n+1:r.getTime()>=f.getTime()?n:n-1}function V(e){const t=p(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function It(e,...t){const r=O.bind(null,t.find(n=>typeof n=="object"));return t.map(r)}function j(e,t){const r=p(e,t?.in);return r.setHours(0,0,0,0),r}function Bt(e,t,r){const[n,a]=It(r?.in,e,t),o=j(n),i=j(a),f=+o-V(o),g=+i-V(i);return Math.round((f-g)/vt)}function Ht(e,t){const r=rt(e,t),n=O(e,0);return n.setFullYear(r,0,4),n.setHours(0,0,0,0),F(n)}function qt(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Lt(e){return!(!qt(e)&&typeof e!="number"||isNaN(+p(e)))}function Nt(e,t){const r=p(e,t?.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}function Rt(e,t){const r=p(e,t?.in);return Bt(r,Nt(r))+1}function _t(e,t){const r=p(e,t?.in),n=+F(r)-+Ht(r);return Math.round(n/et)+1}function nt(e,t){const r=p(e,t?.in),n=r.getFullYear(),a=I(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,i=O(t?.in||e,0);i.setFullYear(n+1,0,o),i.setHours(0,0,0,0);const f=v(i,t),g=O(t?.in||e,0);g.setFullYear(n,0,o),g.setHours(0,0,0,0);const y=v(g,t);return+r>=+f?n+1:+r>=+y?n:n-1}function Gt(e,t){const r=I(),n=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=nt(e,t),o=O(t?.in||e,0);return o.setFullYear(a,0,n),o.setHours(0,0,0,0),v(o,t)}function Qt(e,t){const r=p(e,t?.in),n=+v(r,t)-+Gt(r,t);return Math.round(n/et)+1}function s(e,t){const r=e<0?"-":"",n=Math.abs(e).toString().padStart(t,"0");return r+n}const D={y(e,t){const r=e.getFullYear(),n=r>0?r:1-r;return s(t==="yy"?n%100:n,t.length)},M(e,t){const r=e.getMonth();return t==="M"?String(r+1):s(r+1,2)},d(e,t){return s(e.getDate(),t.length)},a(e,t){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h(e,t){return s(e.getHours()%12||12,t.length)},H(e,t){return s(e.getHours(),t.length)},m(e,t){return s(e.getMinutes(),t.length)},s(e,t){return s(e.getSeconds(),t.length)},S(e,t){const r=t.length,n=e.getMilliseconds(),a=Math.trunc(n*Math.pow(10,r-3));return s(a,t.length)}},M={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},z={G:function(e,t,r){const n=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});case"GGGG":default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){const n=e.getFullYear(),a=n>0?n:1-n;return r.ordinalNumber(a,{unit:"year"})}return D.y(e,t)},Y:function(e,t,r,n){const a=nt(e,n),o=a>0?a:1-a;if(t==="YY"){const i=o%100;return s(i,2)}return t==="Yo"?r.ordinalNumber(o,{unit:"year"}):s(o,t.length)},R:function(e,t){const r=rt(e);return s(r,t.length)},u:function(e,t){const r=e.getFullYear();return s(r,t.length)},Q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return s(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return s(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){const n=e.getMonth();switch(t){case"M":case"MM":return D.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){const n=e.getMonth();switch(t){case"L":return String(n+1);case"LL":return s(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){const a=Qt(e,n);return t==="wo"?r.ordinalNumber(a,{unit:"week"}):s(a,t.length)},I:function(e,t,r){const n=_t(e);return t==="Io"?r.ordinalNumber(n,{unit:"week"}):s(n,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):D.d(e,t)},D:function(e,t,r){const n=Rt(e);return t==="Do"?r.ordinalNumber(n,{unit:"dayOfYear"}):s(n,t.length)},E:function(e,t,r){const n=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});case"EEEE":default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){const a=e.getDay(),o=(a-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return s(o,2);case"eo":return r.ordinalNumber(o,{unit:"day"});case"eee":return r.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(a,{width:"short",context:"formatting"});case"eeee":default:return r.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){const a=e.getDay(),o=(a-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return s(o,t.length);case"co":return r.ordinalNumber(o,{unit:"day"});case"ccc":return r.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(a,{width:"narrow",context:"standalone"});case"cccccc":return r.day(a,{width:"short",context:"standalone"});case"cccc":default:return r.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,r){const n=e.getDay(),a=n===0?7:n;switch(t){case"i":return String(a);case"ii":return s(a,t.length);case"io":return r.ordinalNumber(a,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});case"iiii":default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){const a=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(e,t,r){const n=e.getHours();let a;switch(n===12?a=M.noon:n===0?a=M.midnight:a=n/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,t,r){const n=e.getHours();let a;switch(n>=17?a=M.evening:n>=12?a=M.afternoon:n>=4?a=M.morning:a=M.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,t,r){if(t==="ho"){let n=e.getHours()%12;return n===0&&(n=12),r.ordinalNumber(n,{unit:"hour"})}return D.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):D.H(e,t)},K:function(e,t,r){const n=e.getHours()%12;return t==="Ko"?r.ordinalNumber(n,{unit:"hour"}):s(n,t.length)},k:function(e,t,r){let n=e.getHours();return n===0&&(n=24),t==="ko"?r.ordinalNumber(n,{unit:"hour"}):s(n,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):D.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):D.s(e,t)},S:function(e,t){return D.S(e,t)},X:function(e,t,r){const n=e.getTimezoneOffset();if(n===0)return"Z";switch(t){case"X":return Z(n);case"XXXX":case"XX":return k(n);case"XXXXX":case"XXX":default:return k(n,":")}},x:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"x":return Z(n);case"xxxx":case"xx":return k(n);case"xxxxx":case"xxx":default:return k(n,":")}},O:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+U(n,":");case"OOOO":default:return"GMT"+k(n,":")}},z:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+U(n,":");case"zzzz":default:return"GMT"+k(n,":")}},t:function(e,t,r){const n=Math.trunc(+e/1e3);return s(n,t.length)},T:function(e,t,r){return s(+e,t.length)}};function U(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),a=Math.trunc(n/60),o=n%60;return o===0?r+String(a):r+String(a)+t+s(o,2)}function Z(e,t){return e%60===0?(e>0?"-":"+")+s(Math.abs(e)/60,2):k(e,t)}function k(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),a=s(Math.trunc(n/60),2),o=s(n%60,2);return r+a+t+o}const J=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},at=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},$t=(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],n=r[1],a=r[2];if(!a)return J(e,t);let o;switch(n){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",J(n,t)).replace("{{time}}",at(a,t))},At={p:at,P:$t},Xt=/^D+$/,Vt=/^Y+$/,jt=["D","DD","YY","YYYY"];function zt(e){return Xt.test(e)}function Ut(e){return Vt.test(e)}function Zt(e,t,r){const n=Jt(e,t,r);if(console.warn(n),jt.includes(e))throw new RangeError(n)}function Jt(e,t,r){const n=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Kt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,te=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ee=/^'([^]*?)'?$/,re=/''/g,ne=/[a-zA-Z]/;function K(e,t,r){const n=I(),a=r?.locale??n.locale??Ct,o=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,f=p(e,r?.in);if(!Lt(f))throw new RangeError("Invalid time value");let g=t.match(te).map(u=>{const d=u[0];if(d==="p"||d==="P"){const c=At[d];return c(u,a.formatLong)}return u}).join("").match(Kt).map(u=>{if(u==="''")return{isToken:!1,value:"'"};const d=u[0];if(d==="'")return{isToken:!1,value:ae(u)};if(z[d])return{isToken:!0,value:u};if(d.match(ne))throw new RangeError("Format string contains an unescaped latin alphabet character `"+d+"`");return{isToken:!1,value:u}});a.localize.preprocessor&&(g=a.localize.preprocessor(f,g));const y={firstWeekContainsDate:o,weekStartsOn:i,locale:a};return g.map(u=>{if(!u.isToken)return u.value;const d=u.value;(!r?.useAdditionalWeekYearTokens&&Ut(d)||!r?.useAdditionalDayOfYearTokens&&zt(d))&&Zt(d,t,String(e));const c=z[d[0]];return c(f,d,a.localize,y)}).join("")}function ae(e){const t=e.match(ee);return t?t[1].replace(re,"'"):e}const B="YYYY/MM/DD";function H(e){return e.map(t=>new Date(t))}function oe(e){return e?e.map(t=>P(t).format(B)):[]}function se({disabled:e,element:t,widgetMgr:r,fragmentId:n}){const a=A(),o=h.useContext(ht),[i,f]=Mt({getStateFromWidgetMgr:ie,getDefaultStateFromProto:ce,getCurrStateFromProto:ue,updateWidgetMgrState:de,element:t,widgetMgr:r,fragmentId:n}),[g,y]=h.useState(!1),[u,d]=h.useState(null),{colors:c,fontSizes:q,fontWeights:it,lineHeights:Q,spacing:m,sizes:w}=A(),{locale:ct}=h.useContext(gt),C=Yt(ct),x=h.useMemo(()=>P(t.min,B).toDate(),[t.min]),S=h.useMemo(()=>st(t),[t]),ut=h.useMemo(()=>{if(!t.isRange)return!1;const l=P().subtract(2,"years").toDate();return x<l},[t.isRange,x]),dt=t.default.length===0&&!e,L=h.useMemo(()=>t.format.replaceAll(/[a-zA-Z]/g,"9"),[t.format]),Y=h.useMemo(()=>t.format.replaceAll("Y","y").replaceAll("D","d"),[t.format]),N=h.useMemo(()=>K(x,Y,{locale:C}),[x,Y,C]),R=h.useMemo(()=>S?K(S,Y,{locale:C}):"",[S,Y,C]),$=h.useCallback(l=>{if(!l)return null;if(t.isRange){const b=l==="End"?`before ${R}`:`after ${N}`;return`**Error**: ${l} date set outside allowed range. Please select a date ${b}.`}return`**Error**: Date set outside allowed range. Please select a date between ${N} and ${R}.`},[t.isRange,R,N]),ft=h.useCallback(({date:l})=>{if(d(null),tt(l)){f({value:[],fromUi:!0}),y(!0);return}const b=Array.isArray(l)?l.filter(_=>!!_).map(_=>G(_)):G(l),{errorType:W,newDates:E}=ot(b,x,S);W&&d($(W)),f({value:E,fromUi:!0}),y(!E)},[f,$,d,x,S]),lt=h.useCallback(()=>{if(!g)return;const l=H(t.default);f({value:l,fromUi:!0}),y(!l)},[g,t,f]);return mt("div",{className:"stDateInput","data-testid":"stDateInput",children:[T(pt,{label:t.label,disabled:e,labelVisibility:wt(t.labelVisibility?.value),children:t.help&&T(bt,{content:t.help,label:t.label})}),T(Et,{locale:C,density:Wt.high,formatString:Y,mask:t.isRange?`${L} – ${L}`:L,placeholder:t.isRange?`${t.format} – ${t.format}`:t.format,disabled:e,onChange:ft,onClose:lt,quickSelect:ut,overrides:{Popover:{props:{ignoreBoundary:o,placement:yt.bottomLeft,overrides:{Body:{style:{marginTop:m.px}}}}},CalendarContainer:{style:{fontSize:q.sm,paddingRight:m.sm,paddingLeft:m.sm,paddingBottom:m.sm,paddingTop:m.sm}},Week:{style:{fontSize:q.sm}},Day:{style:({$pseudoHighlighted:l,$pseudoSelected:b,$selected:W,$isHovered:E})=>({fontSize:q.sm,lineHeight:Q.base,"::before":{backgroundColor:W||b||l||E?`${c.darkenedBgMix15} !important`:c.transparent},"::after":{borderColor:c.transparent},...Tt(a)&&E&&b&&!W?{color:c.secondaryBg}:{}})},PrevButton:{style:()=>({display:"flex",alignItems:"center",justifyContent:"center",":active":{backgroundColor:c.transparent},":focus":{backgroundColor:c.transparent,outline:0}})},NextButton:{style:{display:"flex",alignItems:"center",justifyContent:"center",":active":{backgroundColor:c.transparent},":focus":{backgroundColor:c.transparent,outline:0}}},Input:{props:{maskChar:null,endEnhancer:u&&T(Ot,{content:T(St,{source:u,allowHTML:!1}),placement:xt.TOP_RIGHT,error:!0,children:T(kt,{content:Pt,size:"lg"})}),overrides:{EndEnhancer:{style:{color:c.redTextColor,backgroundColor:c.transparent}},Root:{style:({$isFocused:l})=>{const b=Dt(c,l);return{borderLeftWidth:w.borderWidth,borderRightWidth:w.borderWidth,borderTopWidth:w.borderWidth,borderBottomWidth:w.borderWidth,paddingRight:m.twoXS,borderTopColor:b,borderRightColor:b,borderBottomColor:b,borderLeftColor:b,...u&&{backgroundColor:c.redBackgroundColor}}}},ClearIcon:{props:{overrides:{Svg:{style:{color:c.grayTextColor,padding:m.threeXS,height:w.clearIconSize,width:w.clearIconSize,":hover":{fill:c.bodyText}}}}}},InputContainer:{style:{backgroundColor:"transparent"}},Input:{style:{fontWeight:it.normal,paddingRight:m.sm,paddingLeft:m.md,paddingBottom:m.sm,paddingTop:m.sm,lineHeight:Q.inputWidget,"::placeholder":{color:c.fadedText60},...u&&{color:c.redTextColor}},props:{"data-testid":"stDateInputField"}}}}},QuickSelect:{props:{overrides:{ControlContainer:{style:{height:w.minElementHeight,borderLeftWidth:w.borderWidth,borderRightWidth:w.borderWidth,borderTopWidth:w.borderWidth,borderBottomWidth:w.borderWidth}}}}}},value:i,minDate:x,maxDate:S,range:t.isRange,clearable:dt})]})}function ie(e,t){const r=e.getStringArrayValue(t),n=r!==void 0?r:t.default||[];return H(n)}function ce(e){return H(e.default)??[]}function ue(e){return H(e.value)??[]}function de(e,t,r,n){const a=P(e.min,B).toDate(),o=st(e);let i=!0;const f=(r.value||[]).map(y=>G(y)),{errorType:g}=ot(f,a,o);g&&(i=!1),i&&t.setStringArrayValue(e,oe(r.value),{fromUi:r.fromUi},n)}function ot(e,t,r){const n=[];let a=null;return tt(e)?{errorType:null,newDates:[]}:(Array.isArray(e)?e.forEach(o=>{o&&(r&&o>r?a="End":o<t&&(a="Start"),n.push(o))}):e&&(r&&e>r?a="End":e<t&&(a="Start"),n.push(e)),{errorType:a,newDates:n})}function st(e){const t=e.max;return t&&t.length>0?P(t,B).toDate():void 0}function G(e){const t=new Date(e.getTime());return t.setHours(0,0,0,0),t}const De=h.memo(se);export{De as default};
@@ -1,4 +1,4 @@
1
- import{w as Ye}from"./index.bsVAaBS1.js";import{s as Ca,h as qa}from"./index.DypwtfIh.js";import{br as Ea,bs as Ia,bt as Ra}from"./index.lMhsw-5K.js";class o0{constructor(e,t,a){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=a}static range(e,t){return t?!e||!e.loc||!t.loc||e.loc.lexer!==t.loc.lexer?null:new o0(e.loc.lexer,e.loc.start,t.loc.end):e&&e.loc}}class m0{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(e,t){return new m0(t,o0.range(this,e))}}class z{constructor(e,t){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var a="KaTeX parse error: "+e,n,s,o=t&&t.loc;if(o&&o.start<=o.end){var h=o.lexer.input;n=o.start,s=o.end,n===h.length?a+=" at end of input: ":a+=" at position "+(n+1)+": ";var m=h.slice(n,s).replace(/[^]/g,"$&̲"),p;n>15?p="…"+h.slice(n-15,n):p=h.slice(0,n);var g;s+15<h.length?g=h.slice(s,s+15)+"…":g=h.slice(s),a+=p+m+g}var b=new Error(a);return b.name="ParseError",b.__proto__=z.prototype,b.position=n,n!=null&&s!=null&&(b.length=s-n),b.rawMessage=e,b}}z.prototype.__proto__=Error.prototype;var Oa=function(e,t){return e===void 0?t:e},Fa=/([A-Z])/g,La=function(e){return e.replace(Fa,"-$1").toLowerCase()},Ha={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},Pa=/[&><"']/g;function Va(r){return String(r).replace(Pa,e=>Ha[e])}var Tr=function r(e){return e.type==="ordgroup"||e.type==="color"?e.body.length===1?r(e.body[0]):e:e.type==="font"?r(e.body):e},Ga=function(e){var t=Tr(e);return t.type==="mathord"||t.type==="textord"||t.type==="atom"},Ua=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e},Ya=function(e){var t=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(e);return t?t[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?null:t[1].toLowerCase():"_relative"},V={deflt:Oa,escape:Va,hyphenate:La,getBaseElem:Tr,isCharacterBox:Ga,protocolFromUrl:Ya},Ae={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:r=>"#"+r},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(r,e)=>(e.push(r),e)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:r=>Math.max(0,r),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:r=>Math.max(0,r),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:r=>Math.max(0,r),cli:"-e, --max-expand <n>",cliProcessor:r=>r==="Infinity"?1/0:parseInt(r)},globalGroup:{type:"boolean",cli:!1}};function $a(r){if(r.default)return r.default;var e=r.type,t=Array.isArray(e)?e[0]:e;if(typeof t!="string")return t.enum[0];switch(t){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class vt{constructor(e){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{};for(var t in Ae)if(Ae.hasOwnProperty(t)){var a=Ae[t];this[t]=e[t]!==void 0?a.processor?a.processor(e[t]):e[t]:$a(a)}}reportNonstrict(e,t,a){var n=this.strict;if(typeof n=="function"&&(n=n(e,t,a)),!(!n||n==="ignore")){if(n===!0||n==="error")throw new z("LaTeX-incompatible input and strict mode is set to 'error': "+(t+" ["+e+"]"),a);n==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+e+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+n+"': "+t+" ["+e+"]"))}}useStrictBehavior(e,t,a){var n=this.strict;if(typeof n=="function")try{n=n(e,t,a)}catch{n="error"}return!n||n==="ignore"?!1:n===!0||n==="error"?!0:n==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+e+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+n+"': "+t+" ["+e+"]")),!1)}isTrusted(e){if(e.url&&!e.protocol){var t=V.protocolFromUrl(e.url);if(t==null)return!1;e.protocol=t}var a=typeof this.trust=="function"?this.trust(e):this.trust;return!!a}}class F0{constructor(e,t,a){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=a}sup(){return y0[Xa[this.id]]}sub(){return y0[Wa[this.id]]}fracNum(){return y0[ja[this.id]]}fracDen(){return y0[Za[this.id]]}cramp(){return y0[Ka[this.id]]}text(){return y0[Ja[this.id]]}isTight(){return this.size>=2}}var gt=0,Be=1,te=2,B0=3,oe=4,f0=5,re=6,n0=7,y0=[new F0(gt,0,!1),new F0(Be,0,!0),new F0(te,1,!1),new F0(B0,1,!0),new F0(oe,2,!1),new F0(f0,2,!0),new F0(re,3,!1),new F0(n0,3,!0)],Xa=[oe,f0,oe,f0,re,n0,re,n0],Wa=[f0,f0,f0,f0,n0,n0,n0,n0],ja=[te,B0,oe,f0,re,n0,re,n0],Za=[B0,B0,f0,f0,n0,n0,n0,n0],Ka=[Be,Be,B0,B0,f0,f0,n0,n0],Ja=[gt,Be,te,B0,te,B0,te,B0],E={DISPLAY:y0[gt],TEXT:y0[te],SCRIPT:y0[oe],SCRIPTSCRIPT:y0[re]},st=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function Qa(r){for(var e=0;e<st.length;e++)for(var t=st[e],a=0;a<t.blocks.length;a++){var n=t.blocks[a];if(r>=n[0]&&r<=n[1])return t.name}return null}var Te=[];st.forEach(r=>r.blocks.forEach(e=>Te.push(...e)));function Br(r){for(var e=0;e<Te.length;e+=2)if(r>=Te[e]&&r<=Te[e+1])return!0;return!1}var ee=80,_a=function(e,t){return"M95,"+(622+e+t)+`
1
+ import{w as Ye}from"./index.bsVAaBS1.js";import{s as Ca,h as qa}from"./index.BxQxTpWl.js";import{bl as Ea,bm as Ia,bn as Ra}from"./index.CPc_uZux.js";class o0{constructor(e,t,a){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=a}static range(e,t){return t?!e||!e.loc||!t.loc||e.loc.lexer!==t.loc.lexer?null:new o0(e.loc.lexer,e.loc.start,t.loc.end):e&&e.loc}}class m0{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(e,t){return new m0(t,o0.range(this,e))}}class z{constructor(e,t){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var a="KaTeX parse error: "+e,n,s,o=t&&t.loc;if(o&&o.start<=o.end){var h=o.lexer.input;n=o.start,s=o.end,n===h.length?a+=" at end of input: ":a+=" at position "+(n+1)+": ";var m=h.slice(n,s).replace(/[^]/g,"$&̲"),p;n>15?p="…"+h.slice(n-15,n):p=h.slice(0,n);var g;s+15<h.length?g=h.slice(s,s+15)+"…":g=h.slice(s),a+=p+m+g}var b=new Error(a);return b.name="ParseError",b.__proto__=z.prototype,b.position=n,n!=null&&s!=null&&(b.length=s-n),b.rawMessage=e,b}}z.prototype.__proto__=Error.prototype;var Oa=function(e,t){return e===void 0?t:e},Fa=/([A-Z])/g,La=function(e){return e.replace(Fa,"-$1").toLowerCase()},Ha={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},Pa=/[&><"']/g;function Va(r){return String(r).replace(Pa,e=>Ha[e])}var Tr=function r(e){return e.type==="ordgroup"||e.type==="color"?e.body.length===1?r(e.body[0]):e:e.type==="font"?r(e.body):e},Ga=function(e){var t=Tr(e);return t.type==="mathord"||t.type==="textord"||t.type==="atom"},Ua=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e},Ya=function(e){var t=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(e);return t?t[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?null:t[1].toLowerCase():"_relative"},V={deflt:Oa,escape:Va,hyphenate:La,getBaseElem:Tr,isCharacterBox:Ga,protocolFromUrl:Ya},Ae={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:r=>"#"+r},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(r,e)=>(e.push(r),e)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:r=>Math.max(0,r),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:r=>Math.max(0,r),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:r=>Math.max(0,r),cli:"-e, --max-expand <n>",cliProcessor:r=>r==="Infinity"?1/0:parseInt(r)},globalGroup:{type:"boolean",cli:!1}};function $a(r){if(r.default)return r.default;var e=r.type,t=Array.isArray(e)?e[0]:e;if(typeof t!="string")return t.enum[0];switch(t){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class vt{constructor(e){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{};for(var t in Ae)if(Ae.hasOwnProperty(t)){var a=Ae[t];this[t]=e[t]!==void 0?a.processor?a.processor(e[t]):e[t]:$a(a)}}reportNonstrict(e,t,a){var n=this.strict;if(typeof n=="function"&&(n=n(e,t,a)),!(!n||n==="ignore")){if(n===!0||n==="error")throw new z("LaTeX-incompatible input and strict mode is set to 'error': "+(t+" ["+e+"]"),a);n==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+e+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+n+"': "+t+" ["+e+"]"))}}useStrictBehavior(e,t,a){var n=this.strict;if(typeof n=="function")try{n=n(e,t,a)}catch{n="error"}return!n||n==="ignore"?!1:n===!0||n==="error"?!0:n==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+e+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+n+"': "+t+" ["+e+"]")),!1)}isTrusted(e){if(e.url&&!e.protocol){var t=V.protocolFromUrl(e.url);if(t==null)return!1;e.protocol=t}var a=typeof this.trust=="function"?this.trust(e):this.trust;return!!a}}class F0{constructor(e,t,a){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=a}sup(){return y0[Xa[this.id]]}sub(){return y0[Wa[this.id]]}fracNum(){return y0[ja[this.id]]}fracDen(){return y0[Za[this.id]]}cramp(){return y0[Ka[this.id]]}text(){return y0[Ja[this.id]]}isTight(){return this.size>=2}}var gt=0,Be=1,te=2,B0=3,oe=4,f0=5,re=6,n0=7,y0=[new F0(gt,0,!1),new F0(Be,0,!0),new F0(te,1,!1),new F0(B0,1,!0),new F0(oe,2,!1),new F0(f0,2,!0),new F0(re,3,!1),new F0(n0,3,!0)],Xa=[oe,f0,oe,f0,re,n0,re,n0],Wa=[f0,f0,f0,f0,n0,n0,n0,n0],ja=[te,B0,oe,f0,re,n0,re,n0],Za=[B0,B0,f0,f0,n0,n0,n0,n0],Ka=[Be,Be,B0,B0,f0,f0,n0,n0],Ja=[gt,Be,te,B0,te,B0,te,B0],E={DISPLAY:y0[gt],TEXT:y0[te],SCRIPT:y0[oe],SCRIPTSCRIPT:y0[re]},st=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function Qa(r){for(var e=0;e<st.length;e++)for(var t=st[e],a=0;a<t.blocks.length;a++){var n=t.blocks[a];if(r>=n[0]&&r<=n[1])return t.name}return null}var Te=[];st.forEach(r=>r.blocks.forEach(e=>Te.push(...e)));function Br(r){for(var e=0;e<Te.length;e+=2)if(r>=Te[e]&&r<=Te[e+1])return!0;return!1}var ee=80,_a=function(e,t){return"M95,"+(622+e+t)+`
2
2
  c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
3
3
  c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
4
4
  c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
@@ -0,0 +1,2 @@
1
+ import{z as Kt,r as P,j as ne}from"./index.CPc_uZux.js";const{entries:St,setPrototypeOf:pt,isFrozen:Zt,getPrototypeOf:Jt,getOwnPropertyDescriptor:Qt}=Object;let{freeze:R,seal:b,create:Fe}=Object,{apply:ze,construct:Ge}=typeof Reflect<"u"&&Reflect;R||(R=function(n){return n});b||(b=function(n){return n});ze||(ze=function(n,s){for(var a=arguments.length,c=new Array(a>2?a-2:0),m=2;m<a;m++)c[m-2]=arguments[m];return n.apply(s,c)});Ge||(Ge=function(n){for(var s=arguments.length,a=new Array(s>1?s-1:0),c=1;c<s;c++)a[c-1]=arguments[c];return new n(...a)});const pe=O(Array.prototype.forEach),en=O(Array.prototype.lastIndexOf),Tt=O(Array.prototype.pop),Z=O(Array.prototype.push),tn=O(Array.prototype.splice),de=O(String.prototype.toLowerCase),xe=O(String.prototype.toString),Pe=O(String.prototype.match),J=O(String.prototype.replace),nn=O(String.prototype.indexOf),on=O(String.prototype.trim),y=O(Object.prototype.hasOwnProperty),S=O(RegExp.prototype.test),Q=rn(TypeError);function O(o){return function(n){n instanceof RegExp&&(n.lastIndex=0);for(var s=arguments.length,a=new Array(s>1?s-1:0),c=1;c<s;c++)a[c-1]=arguments[c];return ze(o,n,a)}}function rn(o){return function(){for(var n=arguments.length,s=new Array(n),a=0;a<n;a++)s[a]=arguments[a];return Ge(o,s)}}function l(o,n){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:de;pt&&pt(o,null);let a=n.length;for(;a--;){let c=n[a];if(typeof c=="string"){const m=s(c);m!==c&&(Zt(n)||(n[a]=m),c=m)}o[c]=!0}return o}function an(o){for(let n=0;n<o.length;n++)y(o,n)||(o[n]=null);return o}function C(o){const n=Fe(null);for(const[s,a]of St(o))y(o,s)&&(Array.isArray(a)?n[s]=an(a):a&&typeof a=="object"&&a.constructor===Object?n[s]=C(a):n[s]=a);return n}function ee(o,n){for(;o!==null;){const a=Qt(o,n);if(a){if(a.get)return O(a.get);if(typeof a.value=="function")return O(a.value)}o=Jt(o)}function s(){return null}return s}const dt=R(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),ke=R(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ve=R(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),sn=R(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Ue=R(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),ln=R(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Et=R(["#text"]),_t=R(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),He=R(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),At=R(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Te=R(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),cn=b(/\{\{[\w\W]*|[\w\W]*\}\}/gm),fn=b(/<%[\w\W]*|[\w\W]*%>/gm),un=b(/\$\{[\w\W]*/gm),mn=b(/^data-[\-\w.\u00B7-\uFFFF]+$/),pn=b(/^aria-[\-\w]+$/),Rt=b(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Tn=b(/^(?:\w+script|data):/i),dn=b(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ot=b(/^html$/i),En=b(/^[a-z][.\w]*(-[.\w]+)+$/i);var gt=Object.freeze({__proto__:null,ARIA_ATTR:pn,ATTR_WHITESPACE:dn,CUSTOM_ELEMENT:En,DATA_ATTR:mn,DOCTYPE_NAME:Ot,ERB_EXPR:fn,IS_ALLOWED_URI:Rt,IS_SCRIPT_OR_DATA:Tn,MUSTACHE_EXPR:cn,TMPLIT_EXPR:un});const te={element:1,text:3,progressingInstruction:7,comment:8,document:9},_n=function(){return typeof window>"u"?null:window},An=function(n,s){if(typeof n!="object"||typeof n.createPolicy!="function")return null;let a=null;const c="data-tt-policy-suffix";s&&s.hasAttribute(c)&&(a=s.getAttribute(c));const m="dompurify"+(a?"#"+a:"");try{return n.createPolicy(m,{createHTML(D){return D},createScriptURL(D){return D}})}catch{return console.warn("TrustedTypes policy "+m+" could not be created."),null}},ht=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Lt(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:_n();const n=r=>Lt(r);if(n.version="3.3.1",n.removed=[],!o||!o.document||o.document.nodeType!==te.document||!o.Element)return n.isSupported=!1,n;let{document:s}=o;const a=s,c=a.currentScript,{DocumentFragment:m,HTMLTemplateElement:D,Node:Y,Element:oe,NodeFilter:X,NamedNodeMap:Dt=o.NamedNodeMap||o.MozNamedAttrMap,HTMLFormElement:Nt,DOMParser:It,trustedTypes:ie}=o,j=oe.prototype,Ct=ee(j,"cloneNode"),Mt=ee(j,"remove"),wt=ee(j,"nextSibling"),xt=ee(j,"childNodes"),re=ee(j,"parentNode");if(typeof D=="function"){const r=s.createElement("template");r.content&&r.content.ownerDocument&&(s=r.content.ownerDocument)}let g,V="";const{implementation:_e,createNodeIterator:Pt,createDocumentFragment:kt,getElementsByTagName:vt}=s,{importNode:Ut}=a;let h=ht();n.isSupported=typeof St=="function"&&typeof re=="function"&&_e&&_e.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:Ae,ERB_EXPR:ge,TMPLIT_EXPR:he,DATA_ATTR:Ht,ARIA_ATTR:Ft,IS_SCRIPT_OR_DATA:zt,ATTR_WHITESPACE:Be,CUSTOM_ELEMENT:Gt}=gt;let{IS_ALLOWED_URI:Ye}=gt,d=null;const Xe=l({},[...dt,...ke,...ve,...Ue,...Et]);let E=null;const je=l({},[..._t,...He,...At,...Te]);let u=Object.seal(Fe(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),$=null,Se=null;const U=Object.seal(Fe(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Ve=!0,Re=!0,$e=!1,qe=!0,H=!1,ae=!0,k=!1,Oe=!1,Le=!1,F=!1,se=!1,le=!1,Ke=!0,Ze=!1;const Wt="user-content-";let be=!0,q=!1,z={},N=null;const ye=l({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Je=null;const Qe=l({},["audio","video","img","source","image","track"]);let De=null;const et=l({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ce="http://www.w3.org/1998/Math/MathML",fe="http://www.w3.org/2000/svg",M="http://www.w3.org/1999/xhtml";let G=M,Ne=!1,Ie=null;const Bt=l({},[ce,fe,M],xe);let ue=l({},["mi","mo","mn","ms","mtext"]),me=l({},["annotation-xml"]);const Yt=l({},["title","style","font","a","script"]);let K=null;const Xt=["application/xhtml+xml","text/html"],jt="text/html";let T=null,W=null;const Vt=s.createElement("form"),tt=function(e){return e instanceof RegExp||e instanceof Function},Ce=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(W&&W===e)){if((!e||typeof e!="object")&&(e={}),e=C(e),K=Xt.indexOf(e.PARSER_MEDIA_TYPE)===-1?jt:e.PARSER_MEDIA_TYPE,T=K==="application/xhtml+xml"?xe:de,d=y(e,"ALLOWED_TAGS")?l({},e.ALLOWED_TAGS,T):Xe,E=y(e,"ALLOWED_ATTR")?l({},e.ALLOWED_ATTR,T):je,Ie=y(e,"ALLOWED_NAMESPACES")?l({},e.ALLOWED_NAMESPACES,xe):Bt,De=y(e,"ADD_URI_SAFE_ATTR")?l(C(et),e.ADD_URI_SAFE_ATTR,T):et,Je=y(e,"ADD_DATA_URI_TAGS")?l(C(Qe),e.ADD_DATA_URI_TAGS,T):Qe,N=y(e,"FORBID_CONTENTS")?l({},e.FORBID_CONTENTS,T):ye,$=y(e,"FORBID_TAGS")?l({},e.FORBID_TAGS,T):C({}),Se=y(e,"FORBID_ATTR")?l({},e.FORBID_ATTR,T):C({}),z=y(e,"USE_PROFILES")?e.USE_PROFILES:!1,Ve=e.ALLOW_ARIA_ATTR!==!1,Re=e.ALLOW_DATA_ATTR!==!1,$e=e.ALLOW_UNKNOWN_PROTOCOLS||!1,qe=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,H=e.SAFE_FOR_TEMPLATES||!1,ae=e.SAFE_FOR_XML!==!1,k=e.WHOLE_DOCUMENT||!1,F=e.RETURN_DOM||!1,se=e.RETURN_DOM_FRAGMENT||!1,le=e.RETURN_TRUSTED_TYPE||!1,Le=e.FORCE_BODY||!1,Ke=e.SANITIZE_DOM!==!1,Ze=e.SANITIZE_NAMED_PROPS||!1,be=e.KEEP_CONTENT!==!1,q=e.IN_PLACE||!1,Ye=e.ALLOWED_URI_REGEXP||Rt,G=e.NAMESPACE||M,ue=e.MATHML_TEXT_INTEGRATION_POINTS||ue,me=e.HTML_INTEGRATION_POINTS||me,u=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&tt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(u.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&tt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(u.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(u.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),H&&(Re=!1),se&&(F=!0),z&&(d=l({},Et),E=[],z.html===!0&&(l(d,dt),l(E,_t)),z.svg===!0&&(l(d,ke),l(E,He),l(E,Te)),z.svgFilters===!0&&(l(d,ve),l(E,He),l(E,Te)),z.mathMl===!0&&(l(d,Ue),l(E,At),l(E,Te))),e.ADD_TAGS&&(typeof e.ADD_TAGS=="function"?U.tagCheck=e.ADD_TAGS:(d===Xe&&(d=C(d)),l(d,e.ADD_TAGS,T))),e.ADD_ATTR&&(typeof e.ADD_ATTR=="function"?U.attributeCheck=e.ADD_ATTR:(E===je&&(E=C(E)),l(E,e.ADD_ATTR,T))),e.ADD_URI_SAFE_ATTR&&l(De,e.ADD_URI_SAFE_ATTR,T),e.FORBID_CONTENTS&&(N===ye&&(N=C(N)),l(N,e.FORBID_CONTENTS,T)),e.ADD_FORBID_CONTENTS&&(N===ye&&(N=C(N)),l(N,e.ADD_FORBID_CONTENTS,T)),be&&(d["#text"]=!0),k&&l(d,["html","head","body"]),d.table&&(l(d,["tbody"]),delete $.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!="function")throw Q('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Q('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');g=e.TRUSTED_TYPES_POLICY,V=g.createHTML("")}else g===void 0&&(g=An(ie,c)),g!==null&&typeof V=="string"&&(V=g.createHTML(""));R&&R(e),W=e}},nt=l({},[...ke,...ve,...sn]),ot=l({},[...Ue,...ln]),$t=function(e){let t=re(e);(!t||!t.tagName)&&(t={namespaceURI:G,tagName:"template"});const i=de(e.tagName),f=de(t.tagName);return Ie[e.namespaceURI]?e.namespaceURI===fe?t.namespaceURI===M?i==="svg":t.namespaceURI===ce?i==="svg"&&(f==="annotation-xml"||ue[f]):!!nt[i]:e.namespaceURI===ce?t.namespaceURI===M?i==="math":t.namespaceURI===fe?i==="math"&&me[f]:!!ot[i]:e.namespaceURI===M?t.namespaceURI===fe&&!me[f]||t.namespaceURI===ce&&!ue[f]?!1:!ot[i]&&(Yt[i]||!nt[i]):!!(K==="application/xhtml+xml"&&Ie[e.namespaceURI]):!1},I=function(e){Z(n.removed,{element:e});try{re(e).removeChild(e)}catch{Mt(e)}},v=function(e,t){try{Z(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch{Z(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),e==="is")if(F||se)try{I(t)}catch{}else try{t.setAttribute(e,"")}catch{}},it=function(e){let t=null,i=null;if(Le)e="<remove></remove>"+e;else{const p=Pe(e,/^[\r\n\t ]+/);i=p&&p[0]}K==="application/xhtml+xml"&&G===M&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const f=g?g.createHTML(e):e;if(G===M)try{t=new It().parseFromString(f,K)}catch{}if(!t||!t.documentElement){t=_e.createDocument(G,"template",null);try{t.documentElement.innerHTML=Ne?V:f}catch{}}const A=t.body||t.documentElement;return e&&i&&A.insertBefore(s.createTextNode(i),A.childNodes[0]||null),G===M?vt.call(t,k?"html":"body")[0]:k?t.documentElement:A},rt=function(e){return Pt.call(e.ownerDocument||e,e,X.SHOW_ELEMENT|X.SHOW_COMMENT|X.SHOW_TEXT|X.SHOW_PROCESSING_INSTRUCTION|X.SHOW_CDATA_SECTION,null)},Me=function(e){return e instanceof Nt&&(typeof e.nodeName!="string"||typeof e.textContent!="string"||typeof e.removeChild!="function"||!(e.attributes instanceof Dt)||typeof e.removeAttribute!="function"||typeof e.setAttribute!="function"||typeof e.namespaceURI!="string"||typeof e.insertBefore!="function"||typeof e.hasChildNodes!="function")},at=function(e){return typeof Y=="function"&&e instanceof Y};function w(r,e,t){pe(r,i=>{i.call(n,e,t,W)})}const st=function(e){let t=null;if(w(h.beforeSanitizeElements,e,null),Me(e))return I(e),!0;const i=T(e.nodeName);if(w(h.uponSanitizeElement,e,{tagName:i,allowedTags:d}),ae&&e.hasChildNodes()&&!at(e.firstElementChild)&&S(/<[/\w!]/g,e.innerHTML)&&S(/<[/\w!]/g,e.textContent)||e.nodeType===te.progressingInstruction||ae&&e.nodeType===te.comment&&S(/<[/\w]/g,e.data))return I(e),!0;if(!(U.tagCheck instanceof Function&&U.tagCheck(i))&&(!d[i]||$[i])){if(!$[i]&&ct(i)&&(u.tagNameCheck instanceof RegExp&&S(u.tagNameCheck,i)||u.tagNameCheck instanceof Function&&u.tagNameCheck(i)))return!1;if(be&&!N[i]){const f=re(e)||e.parentNode,A=xt(e)||e.childNodes;if(A&&f){const p=A.length;for(let L=p-1;L>=0;--L){const x=Ct(A[L],!0);x.__removalCount=(e.__removalCount||0)+1,f.insertBefore(x,wt(e))}}}return I(e),!0}return e instanceof oe&&!$t(e)||(i==="noscript"||i==="noembed"||i==="noframes")&&S(/<\/no(script|embed|frames)/i,e.innerHTML)?(I(e),!0):(H&&e.nodeType===te.text&&(t=e.textContent,pe([Ae,ge,he],f=>{t=J(t,f," ")}),e.textContent!==t&&(Z(n.removed,{element:e.cloneNode()}),e.textContent=t)),w(h.afterSanitizeElements,e,null),!1)},lt=function(e,t,i){if(Ke&&(t==="id"||t==="name")&&(i in s||i in Vt))return!1;if(!(Re&&!Se[t]&&S(Ht,t))){if(!(Ve&&S(Ft,t))){if(!(U.attributeCheck instanceof Function&&U.attributeCheck(t,e))){if(!E[t]||Se[t]){if(!(ct(e)&&(u.tagNameCheck instanceof RegExp&&S(u.tagNameCheck,e)||u.tagNameCheck instanceof Function&&u.tagNameCheck(e))&&(u.attributeNameCheck instanceof RegExp&&S(u.attributeNameCheck,t)||u.attributeNameCheck instanceof Function&&u.attributeNameCheck(t,e))||t==="is"&&u.allowCustomizedBuiltInElements&&(u.tagNameCheck instanceof RegExp&&S(u.tagNameCheck,i)||u.tagNameCheck instanceof Function&&u.tagNameCheck(i))))return!1}else if(!De[t]){if(!S(Ye,J(i,Be,""))){if(!((t==="src"||t==="xlink:href"||t==="href")&&e!=="script"&&nn(i,"data:")===0&&Je[e])){if(!($e&&!S(zt,J(i,Be,"")))){if(i)return!1}}}}}}}return!0},ct=function(e){return e!=="annotation-xml"&&Pe(e,Gt)},ft=function(e){w(h.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Me(e))return;const i={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:E,forceKeepAttr:void 0};let f=t.length;for(;f--;){const A=t[f],{name:p,namespaceURI:L,value:x}=A,B=T(p),we=x;let _=p==="value"?we:on(we);if(i.attrName=B,i.attrValue=_,i.keepAttr=!0,i.forceKeepAttr=void 0,w(h.uponSanitizeAttribute,e,i),_=i.attrValue,Ze&&(B==="id"||B==="name")&&(v(p,e),_=Wt+_),ae&&S(/((--!?|])>)|<\/(style|title|textarea)/i,_)){v(p,e);continue}if(B==="attributename"&&Pe(_,"href")){v(p,e);continue}if(i.forceKeepAttr)continue;if(!i.keepAttr){v(p,e);continue}if(!qe&&S(/\/>/i,_)){v(p,e);continue}H&&pe([Ae,ge,he],mt=>{_=J(_,mt," ")});const ut=T(e.nodeName);if(!lt(ut,B,_)){v(p,e);continue}if(g&&typeof ie=="object"&&typeof ie.getAttributeType=="function"&&!L)switch(ie.getAttributeType(ut,B)){case"TrustedHTML":{_=g.createHTML(_);break}case"TrustedScriptURL":{_=g.createScriptURL(_);break}}if(_!==we)try{L?e.setAttributeNS(L,p,_):e.setAttribute(p,_),Me(e)?I(e):Tt(n.removed)}catch{v(p,e)}}w(h.afterSanitizeAttributes,e,null)},qt=function r(e){let t=null;const i=rt(e);for(w(h.beforeSanitizeShadowDOM,e,null);t=i.nextNode();)w(h.uponSanitizeShadowNode,t,null),st(t),ft(t),t.content instanceof m&&r(t.content);w(h.afterSanitizeShadowDOM,e,null)};return n.sanitize=function(r){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=null,i=null,f=null,A=null;if(Ne=!r,Ne&&(r="<!-->"),typeof r!="string"&&!at(r))if(typeof r.toString=="function"){if(r=r.toString(),typeof r!="string")throw Q("dirty is not a string, aborting")}else throw Q("toString is not a function");if(!n.isSupported)return r;if(Oe||Ce(e),n.removed=[],typeof r=="string"&&(q=!1),q){if(r.nodeName){const x=T(r.nodeName);if(!d[x]||$[x])throw Q("root node is forbidden and cannot be sanitized in-place")}}else if(r instanceof Y)t=it("<!---->"),i=t.ownerDocument.importNode(r,!0),i.nodeType===te.element&&i.nodeName==="BODY"||i.nodeName==="HTML"?t=i:t.appendChild(i);else{if(!F&&!H&&!k&&r.indexOf("<")===-1)return g&&le?g.createHTML(r):r;if(t=it(r),!t)return F?null:le?V:""}t&&Le&&I(t.firstChild);const p=rt(q?r:t);for(;f=p.nextNode();)st(f),ft(f),f.content instanceof m&&qt(f.content);if(q)return r;if(F){if(se)for(A=kt.call(t.ownerDocument);t.firstChild;)A.appendChild(t.firstChild);else A=t;return(E.shadowroot||E.shadowrootmode)&&(A=Ut.call(a,A,!0)),A}let L=k?t.outerHTML:t.innerHTML;return k&&d["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&S(Ot,t.ownerDocument.doctype.name)&&(L="<!DOCTYPE "+t.ownerDocument.doctype.name+`>
2
+ `+L),H&&pe([Ae,ge,he],x=>{L=J(L,x," ")}),g&&le?g.createHTML(L):L},n.setConfig=function(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ce(r),Oe=!0},n.clearConfig=function(){W=null,Oe=!1},n.isValidAttribute=function(r,e,t){W||Ce({});const i=T(r),f=T(e);return lt(i,f,t)},n.addHook=function(r,e){typeof e=="function"&&Z(h[r],e)},n.removeHook=function(r,e){if(e!==void 0){const t=en(h[r],e);return t===-1?void 0:tn(h[r],t,1)[0]}return Tt(h[r])},n.removeHooks=function(r){h[r]=[]},n.removeAllHooks=function(){h=ht()},n}var Ee=Lt();const We="data-temp-href-target";Ee.addHook("beforeSanitizeAttributes",function(o){o instanceof HTMLElement&&o.hasAttribute("target")&&o.getAttribute("target")==="_blank"&&o.setAttribute(We,"_blank")});Ee.addHook("afterSanitizeAttributes",function(o){o instanceof HTMLElement&&o.hasAttribute(We)&&(o.setAttribute("target","_blank"),o.setAttribute("rel","noopener noreferrer"),o.removeAttribute(We))});const bt={USE_PROFILES:{html:!0},FORCE_BODY:!0},gn=Kt("div",{target:"e1o5kn6k0"})(({theme:o})=>({width:"100%","ul, ol, dl":{paddingLeft:o.spacing.threeXL}})),yt=P.forwardRef(function(n,s){return ne(gn,{className:"stHtml","data-testid":"stHtml",ref:s,...n})}),hn={...bt,ADD_TAGS:["script","style"],ADD_ATTR:["src","type","async","defer","nonce","crossorigin","referrerpolicy","integrity"]};function Sn(o){return Ee.sanitize(o,hn)}const Rn=({body:o})=>{const n=P.useRef(null),s=P.useMemo(()=>Sn(o),[o]);return P.useEffect(()=>{const a=n.current;return a?(a.innerHTML=s,Array.from(a.querySelectorAll("script")).forEach(m=>{const D=document.createElement("script");for(const{name:Y,value:oe}of Array.from(m.attributes))try{D.setAttribute(Y,oe)}catch{}m.src||(D.textContent=m.textContent),m.parentNode?.replaceChild(D,m)}),()=>{a.innerHTML=""}):void 0},[s]),ne(yt,{ref:n})},On=P.memo(Rn);function Ln(o){return Ee.sanitize(o,bt)}function bn({body:o}){const n=P.useMemo(()=>Ln(o),[o]);return n?ne(yt,{dangerouslySetInnerHTML:{__html:n}}):null}const yn=P.memo(bn);function Dn({element:o}){const{body:n,unsafeAllowJavascript:s}=o;return s?ne(On,{body:n}):ne(yn,{body:n})}const In=P.memo(Dn);export{In as default};
@@ -1,3 +1,3 @@
1
- import{bR as de,cl as ce,cm as pe,cn as fe,co as ge,cp as ye,aN as me,am as ve,bj as be,cq as he,aO as Se,c9 as Oe,al as K,cr as Ce,r as H,az as Ie,e as J,l as Pe,o as $e,j as Z,p as _e,ab as Te,ac as Ee,av as Re,ae as we}from"./index.lMhsw-5K.js";import{u as De}from"./useBasicWidgetState.BwQxG7iA.js";import{S as xe,a as Ae}from"./styled-components.D4jE1G9j.js";import{T as We}from"./timepicker.CIpoSUyW.js";import"./FormClearHelper.BM3uDLnU.js";var Ne=de.Consumer;const Be=Object.freeze(Object.defineProperty({__proto__:null,ThemeConsumer:Ne,ThemeProvider:ce,createThemedStyled:pe,createThemedUseStyletron:fe,createThemedWithStyle:ge,expandBorderStyles:ye,hexToRgb:me,styled:ve,useStyletron:be,withStyle:he,withWrapper:Se},Symbol.toStringTag,{value:"Module"}));var C={};const Y=Oe(Be);var D={},X;function Me(){if(X)return D;X=1,Object.defineProperty(D,"__esModule",{value:!0}),D.STATE_CHANGE_TYPE=D.SIZE=D.ENHANCER_POSITION=D.CUSTOM_INPUT_TYPE=D.ADJOINED=void 0;var g={change:"change"};D.STATE_CHANGE_TYPE=g;var c={textarea:"textarea"};D.CUSTOM_INPUT_TYPE=c;var h={none:"none",left:"left",right:"right",both:"both"};D.ADJOINED=h;var m={mini:"mini",default:"default",compact:"compact",large:"large"};D.SIZE=m;var b={start:"start",end:"end"};return D.ENHANCER_POSITION=b,D}var q={},A={},V={},Q;function Le(){if(Q)return V;Q=1,Object.defineProperty(V,"__esModule",{value:!0}),V.default=c;function g(m){"@babel/helpers - typeof";return g=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(b){return typeof b}:function(b){return b&&typeof Symbol=="function"&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b},g(m)}function c(m){m=m||{};for(var b=arguments.length<=1?0:arguments.length-1,v,y,S=0;S<b;S++){v=(S+1<1||arguments.length<=S+1?void 0:arguments[S+1])||{};for(var f in v)g(v[f])!==void 0&&(y=v[f],h(y)?m[f]=c(m[f]||Array.isArray(y)&&[]||{},y):m[f]=y)}return m}function h(m){return Array.isArray(m)||{}.toString.call(m)=="[object Object]"}return V}var ee;function ae(){if(ee)return A;ee=1,Object.defineProperty(A,"__esModule",{value:!0}),A.getOverride=R,A.getOverrideProps=$,A.getOverrides=L,A.mergeConfigurationOverrides=M,A.mergeOverride=x,A.mergeOverrides=B,A.toObjectOverride=_,A.useOverrides=F;var g=v(K()),c=Ce(),h=m(Le());function m(i){return i&&i.__esModule?i:{default:i}}function b(i){if(typeof WeakMap!="function")return null;var t=new WeakMap,u=new WeakMap;return(b=function(r){return r?u:t})(i)}function v(i,t){if(i&&i.__esModule)return i;if(i===null||P(i)!=="object"&&typeof i!="function")return{default:i};var u=b(t);if(u&&u.has(i))return u.get(i);var s={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in i)if(a!=="default"&&Object.prototype.hasOwnProperty.call(i,a)){var l=r?Object.getOwnPropertyDescriptor(i,a):null;l&&(l.get||l.set)?Object.defineProperty(s,a,l):s[a]=i[a]}return s.default=i,u&&u.set(i,s),s}function y(){return y=Object.assign?Object.assign.bind():function(i){for(var t=1;t<arguments.length;t++){var u=arguments[t];for(var s in u)Object.prototype.hasOwnProperty.call(u,s)&&(i[s]=u[s])}return i},y.apply(this,arguments)}function S(i,t){var u=Object.keys(i);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(i);t&&(s=s.filter(function(r){return Object.getOwnPropertyDescriptor(i,r).enumerable})),u.push.apply(u,s)}return u}function f(i){for(var t=1;t<arguments.length;t++){var u=arguments[t]!=null?arguments[t]:{};t%2?S(Object(u),!0).forEach(function(s){T(i,s,u[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(u)):S(Object(u)).forEach(function(s){Object.defineProperty(i,s,Object.getOwnPropertyDescriptor(u,s))})}return i}function T(i,t,u){return t in i?Object.defineProperty(i,t,{value:u,enumerable:!0,configurable:!0,writable:!0}):i[t]=u,i}function P(i){"@babel/helpers - typeof";return P=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},P(i)}function R(i){return(0,c.isValidElementType)(i)?i:i&&P(i)==="object"?i.component:i}function $(i){return i&&P(i)==="object"?P(i.props)==="object"?f(f({},i.props),{},{$style:i.style}):{$style:i.style}:{}}function _(i){return(0,c.isValidElementType)(i)?{component:i}:i||{}}function L(i,t){var u=R(i)||t;if(i&&P(i)==="object"&&typeof i.props=="function"){var s=g.forwardRef(function(a,l){var n=i.props(a),e=$(f(f({},i),{},{props:n}));return g.createElement(u,y({ref:l},e))});return s.displayName=u.displayName,[s,{}]}var r=$(i);return[u,r]}function B(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u=Object.assign({},i,t),s=Object.keys(u);return s.reduce(function(r,a){return r[a]=x(_(i[a]),_(t[a])),r},{})}function x(i,t){var u=f(f({},i),t);return i.props&&t.props&&(u.props=M(i.props,t.props)),i.style&&t.style&&(u.style=M(i.style,t.style)),u}function M(i,t){return P(i)==="object"&&P(t)==="object"?(0,h.default)({},i,t):function(){return(0,h.default)({},typeof i=="function"?i.apply(void 0,arguments):i,typeof t=="function"?t.apply(void 0,arguments):t)}}function F(i){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return g.useMemo(function(){return Object.keys(i).reduce(function(u,s){return u[s]=L(t[s],i[s]),u},{})},[t])}return A}var j={},z={},te;function Fe(){if(te)return z;te=1,Object.defineProperty(z,"__esModule",{value:!0}),z.Svg=void 0,z.getSvgStyles=c;var g=Y;function c(m){var b=m.$theme,v=m.$size,y=m.$color,S=b.sizing.scale600;v&&(b.sizing[v]?S=b.sizing[v]:typeof v=="number"?S="".concat(v,"px"):S=v);var f="currentColor";return y&&(b.colors[y]?f=b.colors[y]:f=y),{display:"inline-block",fill:f,color:f,height:S,width:S}}var h=(0,g.styled)("svg",c);return z.Svg=h,h.displayName="Svg",h.displayName="Svg",z}var k={},re;function ze(){if(re)return k;re=1,Object.defineProperty(k,"__esModule",{value:!0}),k.default=g;function g(c){var h={};for(var m in c)m[0]!=="$"&&(h[m]=c[m]);return h}return k}var ne;function Ze(){if(ne)return j;ne=1;function g(r){"@babel/helpers - typeof";return g=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},g(r)}Object.defineProperty(j,"__esModule",{value:!0}),j.default=void 0;var c=f(K()),h=ae(),m=Fe(),b=y(ze()),v=["children","title","size","color","overrides"];function y(r){return r&&r.__esModule?r:{default:r}}function S(r){if(typeof WeakMap!="function")return null;var a=new WeakMap,l=new WeakMap;return(S=function(e){return e?l:a})(r)}function f(r,a){if(r&&r.__esModule)return r;if(r===null||g(r)!=="object"&&typeof r!="function")return{default:r};var l=S(a);if(l&&l.has(r))return l.get(r);var n={},e=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in r)if(o!=="default"&&Object.prototype.hasOwnProperty.call(r,o)){var p=e?Object.getOwnPropertyDescriptor(r,o):null;p&&(p.get||p.set)?Object.defineProperty(n,o,p):n[o]=r[o]}return n.default=r,l&&l.set(r,n),n}function T(){return T=Object.assign?Object.assign.bind():function(r){for(var a=1;a<arguments.length;a++){var l=arguments[a];for(var n in l)Object.prototype.hasOwnProperty.call(l,n)&&(r[n]=l[n])}return r},T.apply(this,arguments)}function P(r,a){var l=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);a&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})),l.push.apply(l,n)}return l}function R(r){for(var a=1;a<arguments.length;a++){var l=arguments[a]!=null?arguments[a]:{};a%2?P(Object(l),!0).forEach(function(n){$(r,n,l[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(l)):P(Object(l)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(l,n))})}return r}function $(r,a,l){return a in r?Object.defineProperty(r,a,{value:l,enumerable:!0,configurable:!0,writable:!0}):r[a]=l,r}function _(r,a){return F(r)||M(r,a)||B(r,a)||L()}function L(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{bT as de,cn as ce,co as pe,cp as fe,cq as ge,cr as ye,aN as me,am as ve,bd as be,cs as he,aO as Se,cb as Oe,al as K,ct as Ce,r as H,az as Ie,e as J,l as Pe,o as $e,j as Z,p as _e,ab as Te,ac as Ee,av as Re,ae as we}from"./index.CPc_uZux.js";import{u as De}from"./useBasicWidgetState.DvpdEDYZ.js";import{S as xe,a as Ae}from"./styled-components.BeEcZ0vW.js";import{T as We}from"./timepicker.DZ_ZufYF.js";import"./FormClearHelper.DTFnX0js.js";var Ne=de.Consumer;const Be=Object.freeze(Object.defineProperty({__proto__:null,ThemeConsumer:Ne,ThemeProvider:ce,createThemedStyled:pe,createThemedUseStyletron:fe,createThemedWithStyle:ge,expandBorderStyles:ye,hexToRgb:me,styled:ve,useStyletron:be,withStyle:he,withWrapper:Se},Symbol.toStringTag,{value:"Module"}));var C={};const Y=Oe(Be);var D={},X;function Me(){if(X)return D;X=1,Object.defineProperty(D,"__esModule",{value:!0}),D.STATE_CHANGE_TYPE=D.SIZE=D.ENHANCER_POSITION=D.CUSTOM_INPUT_TYPE=D.ADJOINED=void 0;var g={change:"change"};D.STATE_CHANGE_TYPE=g;var c={textarea:"textarea"};D.CUSTOM_INPUT_TYPE=c;var h={none:"none",left:"left",right:"right",both:"both"};D.ADJOINED=h;var m={mini:"mini",default:"default",compact:"compact",large:"large"};D.SIZE=m;var b={start:"start",end:"end"};return D.ENHANCER_POSITION=b,D}var q={},A={},V={},Q;function Le(){if(Q)return V;Q=1,Object.defineProperty(V,"__esModule",{value:!0}),V.default=c;function g(m){"@babel/helpers - typeof";return g=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(b){return typeof b}:function(b){return b&&typeof Symbol=="function"&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b},g(m)}function c(m){m=m||{};for(var b=arguments.length<=1?0:arguments.length-1,v,y,S=0;S<b;S++){v=(S+1<1||arguments.length<=S+1?void 0:arguments[S+1])||{};for(var f in v)g(v[f])!==void 0&&(y=v[f],h(y)?m[f]=c(m[f]||Array.isArray(y)&&[]||{},y):m[f]=y)}return m}function h(m){return Array.isArray(m)||{}.toString.call(m)=="[object Object]"}return V}var ee;function ae(){if(ee)return A;ee=1,Object.defineProperty(A,"__esModule",{value:!0}),A.getOverride=R,A.getOverrideProps=$,A.getOverrides=L,A.mergeConfigurationOverrides=M,A.mergeOverride=x,A.mergeOverrides=B,A.toObjectOverride=_,A.useOverrides=F;var g=v(K()),c=Ce(),h=m(Le());function m(i){return i&&i.__esModule?i:{default:i}}function b(i){if(typeof WeakMap!="function")return null;var t=new WeakMap,u=new WeakMap;return(b=function(r){return r?u:t})(i)}function v(i,t){if(i&&i.__esModule)return i;if(i===null||P(i)!=="object"&&typeof i!="function")return{default:i};var u=b(t);if(u&&u.has(i))return u.get(i);var s={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in i)if(a!=="default"&&Object.prototype.hasOwnProperty.call(i,a)){var l=r?Object.getOwnPropertyDescriptor(i,a):null;l&&(l.get||l.set)?Object.defineProperty(s,a,l):s[a]=i[a]}return s.default=i,u&&u.set(i,s),s}function y(){return y=Object.assign?Object.assign.bind():function(i){for(var t=1;t<arguments.length;t++){var u=arguments[t];for(var s in u)Object.prototype.hasOwnProperty.call(u,s)&&(i[s]=u[s])}return i},y.apply(this,arguments)}function S(i,t){var u=Object.keys(i);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(i);t&&(s=s.filter(function(r){return Object.getOwnPropertyDescriptor(i,r).enumerable})),u.push.apply(u,s)}return u}function f(i){for(var t=1;t<arguments.length;t++){var u=arguments[t]!=null?arguments[t]:{};t%2?S(Object(u),!0).forEach(function(s){T(i,s,u[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(u)):S(Object(u)).forEach(function(s){Object.defineProperty(i,s,Object.getOwnPropertyDescriptor(u,s))})}return i}function T(i,t,u){return t in i?Object.defineProperty(i,t,{value:u,enumerable:!0,configurable:!0,writable:!0}):i[t]=u,i}function P(i){"@babel/helpers - typeof";return P=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},P(i)}function R(i){return(0,c.isValidElementType)(i)?i:i&&P(i)==="object"?i.component:i}function $(i){return i&&P(i)==="object"?P(i.props)==="object"?f(f({},i.props),{},{$style:i.style}):{$style:i.style}:{}}function _(i){return(0,c.isValidElementType)(i)?{component:i}:i||{}}function L(i,t){var u=R(i)||t;if(i&&P(i)==="object"&&typeof i.props=="function"){var s=g.forwardRef(function(a,l){var n=i.props(a),e=$(f(f({},i),{},{props:n}));return g.createElement(u,y({ref:l},e))});return s.displayName=u.displayName,[s,{}]}var r=$(i);return[u,r]}function B(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u=Object.assign({},i,t),s=Object.keys(u);return s.reduce(function(r,a){return r[a]=x(_(i[a]),_(t[a])),r},{})}function x(i,t){var u=f(f({},i),t);return i.props&&t.props&&(u.props=M(i.props,t.props)),i.style&&t.style&&(u.style=M(i.style,t.style)),u}function M(i,t){return P(i)==="object"&&P(t)==="object"?(0,h.default)({},i,t):function(){return(0,h.default)({},typeof i=="function"?i.apply(void 0,arguments):i,typeof t=="function"?t.apply(void 0,arguments):t)}}function F(i){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return g.useMemo(function(){return Object.keys(i).reduce(function(u,s){return u[s]=L(t[s],i[s]),u},{})},[t])}return A}var j={},z={},te;function Fe(){if(te)return z;te=1,Object.defineProperty(z,"__esModule",{value:!0}),z.Svg=void 0,z.getSvgStyles=c;var g=Y;function c(m){var b=m.$theme,v=m.$size,y=m.$color,S=b.sizing.scale600;v&&(b.sizing[v]?S=b.sizing[v]:typeof v=="number"?S="".concat(v,"px"):S=v);var f="currentColor";return y&&(b.colors[y]?f=b.colors[y]:f=y),{display:"inline-block",fill:f,color:f,height:S,width:S}}var h=(0,g.styled)("svg",c);return z.Svg=h,h.displayName="Svg",h.displayName="Svg",z}var k={},re;function ze(){if(re)return k;re=1,Object.defineProperty(k,"__esModule",{value:!0}),k.default=g;function g(c){var h={};for(var m in c)m[0]!=="$"&&(h[m]=c[m]);return h}return k}var ne;function Ze(){if(ne)return j;ne=1;function g(r){"@babel/helpers - typeof";return g=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},g(r)}Object.defineProperty(j,"__esModule",{value:!0}),j.default=void 0;var c=f(K()),h=ae(),m=Fe(),b=y(ze()),v=["children","title","size","color","overrides"];function y(r){return r&&r.__esModule?r:{default:r}}function S(r){if(typeof WeakMap!="function")return null;var a=new WeakMap,l=new WeakMap;return(S=function(e){return e?l:a})(r)}function f(r,a){if(r&&r.__esModule)return r;if(r===null||g(r)!=="object"&&typeof r!="function")return{default:r};var l=S(a);if(l&&l.has(r))return l.get(r);var n={},e=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in r)if(o!=="default"&&Object.prototype.hasOwnProperty.call(r,o)){var p=e?Object.getOwnPropertyDescriptor(r,o):null;p&&(p.get||p.set)?Object.defineProperty(n,o,p):n[o]=r[o]}return n.default=r,l&&l.set(r,n),n}function T(){return T=Object.assign?Object.assign.bind():function(r){for(var a=1;a<arguments.length;a++){var l=arguments[a];for(var n in l)Object.prototype.hasOwnProperty.call(l,n)&&(r[n]=l[n])}return r},T.apply(this,arguments)}function P(r,a){var l=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);a&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})),l.push.apply(l,n)}return l}function R(r){for(var a=1;a<arguments.length;a++){var l=arguments[a]!=null?arguments[a]:{};a%2?P(Object(l),!0).forEach(function(n){$(r,n,l[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(l)):P(Object(l)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(l,n))})}return r}function $(r,a,l){return a in r?Object.defineProperty(r,a,{value:l,enumerable:!0,configurable:!0,writable:!0}):r[a]=l,r}function _(r,a){return F(r)||M(r,a)||B(r,a)||L()}function L(){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 B(r,a){if(r){if(typeof r=="string")return x(r,a);var l=Object.prototype.toString.call(r).slice(8,-1);if(l==="Object"&&r.constructor&&(l=r.constructor.name),l==="Map"||l==="Set")return Array.from(r);if(l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l))return x(r,a)}}function x(r,a){(a==null||a>r.length)&&(a=r.length);for(var l=0,n=new Array(a);l<a;l++)n[l]=r[l];return n}function M(r,a){var l=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(l!=null){var n=[],e=!0,o=!1,p,d;try{for(l=l.call(r);!(e=(p=l.next()).done)&&(n.push(p.value),!(a&&n.length===a));e=!0);}catch(O){o=!0,d=O}finally{try{!e&&l.return!=null&&l.return()}finally{if(o)throw d}}return n}}function F(r){if(Array.isArray(r))return r}function i(r,a){if(r==null)return{};var l=t(r,a),n,e;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);for(e=0;e<o.length;e++)n=o[e],!(a.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(r,n)&&(l[n]=r[n])}return l}function t(r,a){if(r==null)return{};var l={},n=Object.keys(r),e,o;for(o=0;o<n.length;o++)e=n[o],!(a.indexOf(e)>=0)&&(l[e]=r[e]);return l}var u=function(a,l){var n=a.children,e=a.title,o=a.size,p=a.color,d=a.overrides,O=d===void 0?{}:d,I=i(a,v),w=(0,h.getOverrides)(O.Svg,m.Svg),W=_(w,2),E=W[0],N=W[1],U=E.__STYLETRON__?R(R({title:e,$color:p,$size:o},I),N):R(R({title:e,color:p,size:o},(0,b.default)(I)),(0,b.default)(N));return c.createElement(E,T({"data-baseweb":"icon",ref:l},U),e?c.createElement("title",null,e):null,n)},s=c.forwardRef(u);return j.default=s,j}var oe;function qe(){if(oe)return q;oe=1;function g(t){"@babel/helpers - typeof";return g=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},g(t)}Object.defineProperty(q,"__esModule",{value:!0}),q.default=void 0;var c=f(K()),h=Y,m=ae(),b=y(Ze()),v=["title","size","color","overrides"];function y(t){return t&&t.__esModule?t:{default:t}}function S(t){if(typeof WeakMap!="function")return null;var u=new WeakMap,s=new WeakMap;return(S=function(a){return a?s:u})(t)}function f(t,u){if(t&&t.__esModule)return t;if(t===null||g(t)!=="object"&&typeof t!="function")return{default:t};var s=S(u);if(s&&s.has(t))return s.get(t);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in t)if(l!=="default"&&Object.prototype.hasOwnProperty.call(t,l)){var n=a?Object.getOwnPropertyDescriptor(t,l):null;n&&(n.get||n.set)?Object.defineProperty(r,l,n):r[l]=t[l]}return r.default=t,s&&s.set(t,r),r}function T(){return T=Object.assign?Object.assign.bind():function(t){for(var u=1;u<arguments.length;u++){var s=arguments[u];for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(t[r]=s[r])}return t},T.apply(this,arguments)}function P(t,u){if(t==null)return{};var s=R(t,u),r,a;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(a=0;a<l.length;a++)r=l[a],!(u.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(s[r]=t[r])}return s}function R(t,u){if(t==null)return{};var s={},r=Object.keys(t),a,l;for(l=0;l<r.length;l++)a=r[l],!(u.indexOf(a)>=0)&&(s[a]=t[a]);return s}function $(t,u){return M(t)||x(t,u)||L(t,u)||_()}function _(){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 L(t,u){if(t){if(typeof t=="string")return B(t,u);var s=Object.prototype.toString.call(t).slice(8,-1);if(s==="Object"&&t.constructor&&(s=t.constructor.name),s==="Map"||s==="Set")return Array.from(t);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return B(t,u)}}function B(t,u){(u==null||u>t.length)&&(u=t.length);for(var s=0,r=new Array(u);s<u;s++)r[s]=t[s];return r}function x(t,u){var s=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(s!=null){var r=[],a=!0,l=!1,n,e;try{for(s=s.call(t);!(a=(n=s.next()).done)&&(r.push(n.value),!(u&&r.length===u));a=!0);}catch(o){l=!0,e=o}finally{try{!a&&s.return!=null&&s.return()}finally{if(l)throw e}}return r}}function M(t){if(Array.isArray(t))return t}function F(t,u){var s=(0,h.useStyletron)(),r=$(s,2),a=r[1],l=t.title,n=l===void 0?"Delete Alt":l,e=t.size,o=t.color,p=t.overrides,d=p===void 0?{}:p,O=P(t,v),I=(0,m.mergeOverride)({component:a.icons&&a.icons.DeleteAlt?a.icons.DeleteAlt:null},d&&d.Svg?(0,m.toObjectOverride)(d.Svg):{});return c.createElement(b.default,T({viewBox:"0 0 24 24",ref:u,title:n,size:e,color:o,overrides:{Svg:I}},O),c.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 20C16.4183 20 20 16.4183 20 12C20 7.58173 16.4183 4 12 4C7.58173 4 4 7.58173 4 12C4 16.4183 7.58173 20 12 20ZM10.0303 8.96967C9.73743 8.67679 9.26257 8.67679 8.96967 8.96967C8.67676 9.26257 8.67676 9.73743 8.96967 10.0303L10.9393 12L8.96967 13.9697C8.67676 14.2626 8.67676 14.7374 8.96967 15.0303C9.26257 15.3232 9.73743 15.3232 10.0303 15.0303L12 13.0607L13.9697 15.0303C14.2626 15.3232 14.7374 15.3232 15.0303 15.0303C15.3232 14.7374 15.3232 14.2626 15.0303 13.9697L13.0607 12L15.0303 10.0303C15.3232 9.73743 15.3232 9.26257 15.0303 8.96967C14.7374 8.67679 14.2626 8.67679 13.9697 8.96967L12 10.9393L10.0303 8.96967Z"}))}var i=c.forwardRef(F);return q.default=i,q}var ie;function je(){if(ie)return C;ie=1,Object.defineProperty(C,"__esModule",{value:!0}),C.getRootStyles=C.getInputStyles=C.getInputContainerStyles=C.StyledMaskToggleButton=C.StyledClearIconContainer=C.StyledClearIcon=C.Root=C.InputEnhancer=C.InputContainer=C.Input=void 0;var g=Y,c=Me(),h=m(qe());function m(n){return n&&n.__esModule?n:{default:n}}function b(n,e){var o=Object.keys(n);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(n);e&&(p=p.filter(function(d){return Object.getOwnPropertyDescriptor(n,d).enumerable})),o.push.apply(o,p)}return o}function v(n){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?arguments[e]:{};e%2?b(Object(o),!0).forEach(function(p){y(n,p,o[p])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):b(Object(o)).forEach(function(p){Object.defineProperty(n,p,Object.getOwnPropertyDescriptor(o,p))})}return n}function y(n,e,o){return e in n?Object.defineProperty(n,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[e]=o,n}var S=(0,g.styled)("button",function(n){var e,o=n.$theme,p=n.$size,d=n.$isFocusVisible,O=(e={},y(e,c.SIZE.mini,o.sizing.scale400),y(e,c.SIZE.compact,o.sizing.scale400),y(e,c.SIZE.default,o.sizing.scale300),y(e,c.SIZE.large,o.sizing.scale200),e)[p];return{display:"flex",alignItems:"center",borderTopStyle:"none",borderBottomStyle:"none",borderLeftStyle:"none",borderRightStyle:"none",background:"none",paddingLeft:O,paddingRight:O,outline:d?"solid 3px ".concat(o.colors.accent):"none",color:o.colors.contentPrimary}});C.StyledMaskToggleButton=S,S.displayName="StyledMaskToggleButton",S.displayName="StyledMaskToggleButton";var f=(0,g.styled)("div",function(n){var e,o=n.$alignTop,p=o===void 0?!1:o,d=n.$size,O=n.$theme,I=(e={},y(e,c.SIZE.mini,O.sizing.scale200),y(e,c.SIZE.compact,O.sizing.scale200),y(e,c.SIZE.default,O.sizing.scale100),y(e,c.SIZE.large,O.sizing.scale0),e)[d];return{display:"flex",alignItems:p?"flex-start":"center",paddingLeft:I,paddingRight:I,paddingTop:p?O.sizing.scale500:"0px",color:O.colors.contentPrimary}});C.StyledClearIconContainer=f,f.displayName="StyledClearIconContainer",f.displayName="StyledClearIconContainer";var T=(0,g.styled)(h.default,function(n){var e=n.$theme,o=n.$isFocusVisible;return{cursor:"pointer",outline:o?"solid 3px ".concat(e.colors.accent):"none"}});C.StyledClearIcon=T,T.displayName="StyledClearIcon",T.displayName="StyledClearIcon";function P(n,e){var o;return(o={},y(o,c.SIZE.mini,{paddingTop:e.scale100,paddingBottom:e.scale100,paddingLeft:e.scale550,paddingRight:e.scale550}),y(o,c.SIZE.compact,{paddingTop:e.scale200,paddingBottom:e.scale200,paddingLeft:e.scale550,paddingRight:e.scale550}),y(o,c.SIZE.default,{paddingTop:e.scale400,paddingBottom:e.scale400,paddingLeft:e.scale550,paddingRight:e.scale550}),y(o,c.SIZE.large,{paddingTop:e.scale550,paddingBottom:e.scale550,paddingLeft:e.scale550,paddingRight:e.scale550}),o)[n]}function R(n,e,o,p,d){var O=n===c.ADJOINED.both||n===c.ADJOINED.left&&p!=="rtl"||n===c.ADJOINED.right&&p==="rtl"||d&&p==="rtl",I=n===c.ADJOINED.both||n===c.ADJOINED.right&&p!=="rtl"||n===c.ADJOINED.left&&p==="rtl"||d&&p!=="rtl";return{paddingLeft:O?o.scale550:"0px",paddingRight:I?o.scale550:"0px"}}function $(n,e){var o;return(o={},y(o,c.SIZE.mini,e.font100),y(o,c.SIZE.compact,e.font200),y(o,c.SIZE.default,e.font300),y(o,c.SIZE.large,e.font400),o)[n]}function _(n,e,o){var p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,d=arguments.length>4?arguments[4]:void 0;return n?{borderLeftColor:d.inputFillDisabled,borderRightColor:d.inputFillDisabled,borderTopColor:d.inputFillDisabled,borderBottomColor:d.inputFillDisabled,backgroundColor:d.inputFillDisabled}:e?{borderLeftColor:d.borderSelected,borderRightColor:d.borderSelected,borderTopColor:d.borderSelected,borderBottomColor:d.borderSelected,backgroundColor:d.inputFillActive}:o?{borderLeftColor:d.inputBorderError,borderRightColor:d.inputBorderError,borderTopColor:d.inputBorderError,borderBottomColor:d.inputBorderError,backgroundColor:d.inputFillError}:p?{borderLeftColor:d.inputBorderPositive,borderRightColor:d.inputBorderPositive,borderTopColor:d.inputBorderPositive,borderBottomColor:d.inputBorderPositive,backgroundColor:d.inputFillPositive}:{borderLeftColor:d.inputBorder,borderRightColor:d.inputBorder,borderTopColor:d.inputBorder,borderBottomColor:d.inputBorder,backgroundColor:d.inputFill}}function L(n,e){var o=e.inputBorderRadius;return n===c.SIZE.mini&&(o=e.inputBorderRadiusMini),{borderTopLeftRadius:o,borderBottomLeftRadius:o,borderTopRightRadius:o,borderBottomRightRadius:o}}var B=function(e){var o=e.$isFocused,p=e.$adjoined,d=e.$error,O=e.$disabled,I=e.$positive,w=e.$size,W=e.$theme,E=e.$theme,N=E.borders,U=E.colors,le=E.sizing,ue=E.typography,G=E.animation,se=e.$hasIconTrailing;return v(v(v(v({boxSizing:"border-box",display:"flex",overflow:"hidden",width:"100%",borderLeftWidth:"2px",borderRightWidth:"2px",borderTopWidth:"2px",borderBottomWidth:"2px",borderLeftStyle:"solid",borderRightStyle:"solid",borderTopStyle:"solid",borderBottomStyle:"solid",transitionProperty:"border",transitionDuration:G.timing200,transitionTimingFunction:G.easeOutCurve},L(w,N)),$(w,ue)),_(O,o,d,I,U)),R(p,w,le,W.direction,se))};C.getRootStyles=B;var x=(0,g.styled)("div",B);C.Root=x,x.displayName="Root",x.displayName="Root";function M(n,e){var o;return(o={},y(o,c.SIZE.mini,{paddingRight:e.scale400,paddingLeft:e.scale400}),y(o,c.SIZE.compact,{paddingRight:e.scale400,paddingLeft:e.scale400}),y(o,c.SIZE.default,{paddingRight:e.scale300,paddingLeft:e.scale300}),y(o,c.SIZE.large,{paddingRight:e.scale200,paddingLeft:e.scale200}),o)[n]}function F(n,e,o,p,d){return n?{color:d.inputEnhancerTextDisabled,backgroundColor:d.inputFillDisabled}:e?{color:d.contentPrimary,backgroundColor:d.inputFillActive}:o?{color:d.contentPrimary,backgroundColor:d.inputFillError}:p?{color:d.contentPrimary,backgroundColor:d.inputFillPositive}:{color:d.contentPrimary,backgroundColor:d.inputFill}}var i=(0,g.styled)("div",function(n){var e=n.$size,o=n.$disabled,p=n.$isFocused,d=n.$error,O=n.$positive,I=n.$theme,w=I.colors,W=I.sizing,E=I.typography,N=I.animation;return v(v(v({display:"flex",alignItems:"center",justifyContent:"center",transitionProperty:"color, background-color",transitionDuration:N.timing200,transitionTimingFunction:N.easeOutCurve},$(e,E)),M(e,W)),F(o,p,d,O,w))});C.InputEnhancer=i,i.displayName="InputEnhancer",i.displayName="InputEnhancer";function t(n,e,o,p,d){return n?{color:d.inputTextDisabled,backgroundColor:d.inputFillDisabled}:e?{color:d.contentPrimary,backgroundColor:d.inputFillActive}:o?{color:d.contentPrimary,backgroundColor:d.inputFillError}:p?{color:d.contentPrimary,backgroundColor:d.inputFillPositive}:{color:d.contentPrimary,backgroundColor:d.inputFill}}var u=function(e){var o=e.$isFocused,p=e.$error,d=e.$disabled,O=e.$positive,I=e.$size,w=e.$theme,W=w.colors,E=w.typography,N=w.animation;return v(v({display:"flex",width:"100%",transitionProperty:"background-color",transitionDuration:N.timing200,transitionTimingFunction:N.easeOutCurve},$(I,E)),t(d,o,p,O,W))};C.getInputContainerStyles=u;var s=(0,g.styled)("div",u);C.InputContainer=s,s.displayName="InputContainer",s.displayName="InputContainer";function r(n,e,o,p){return n?{color:p.inputTextDisabled,"-webkit-text-fill-color":p.inputTextDisabled,caretColor:p.contentPrimary,"::placeholder":{color:p.inputPlaceholderDisabled}}:{color:p.contentPrimary,caretColor:p.contentPrimary,"::placeholder":{color:p.inputPlaceholder}}}var a=function(e){var o=e.$disabled,p=e.$isFocused,d=e.$error,O=e.$size,I=e.$theme,w=I.colors,W=I.sizing,E=I.typography;return v(v(v({boxSizing:"border-box",backgroundColor:"transparent",borderLeftWidth:0,borderRightWidth:0,borderTopWidth:0,borderBottomWidth:0,borderLeftStyle:"none",borderRightStyle:"none",borderTopStyle:"none",borderBottomStyle:"none",outline:"none",width:"100%",minWidth:0,maxWidth:"100%",cursor:o?"not-allowed":"text",margin:"0",paddingTop:"0",paddingBottom:"0",paddingLeft:"0",paddingRight:"0"},$(O,E)),P(O,W)),r(o,p,d,w))};C.getInputStyles=a;var l=(0,g.styled)("input",a);return C.Input=l,l.displayName="Input",l.displayName="Input",C}var Ve=je();function ke({disabled:g,element:c,widgetMgr:h,fragmentId:m}){const[b,v]=De({getStateFromWidgetMgr:He,getDefaultStateFromProto:Ue,getCurrStateFromProto:Je,updateWidgetMgrState:Ke,element:c,widgetMgr:h,fragmentId:m}),y=H.useContext(Ie),S=J(c.default)&&!g,f=Pe(),T={Select:{props:{disabled:g,overrides:{ControlContainer:{style:({$isFocused:$})=>{const _=we(f.colors,$);return{height:f.sizes.minElementHeight,borderLeftWidth:f.sizes.borderWidth,borderRightWidth:f.sizes.borderWidth,borderTopWidth:f.sizes.borderWidth,borderBottomWidth:f.sizes.borderWidth,borderTopColor:_,borderRightColor:_,borderBottomColor:_,borderLeftColor:_}}},IconsContainer:{style:()=>({paddingRight:f.spacing.sm})},ValueContainer:{style:()=>({lineHeight:f.lineHeights.inputWidget,paddingRight:f.spacing.sm,paddingLeft:f.spacing.md,paddingBottom:f.spacing.sm,paddingTop:f.spacing.sm})},SingleValue:{style:{fontWeight:f.fontWeights.normal},props:{"data-testid":"stTimeInputTimeDisplay"}},Dropdown:{style:()=>({paddingTop:f.spacing.none,paddingBottom:f.spacing.none,boxShadow:"none",maxHeight:f.sizes.maxDropdownHeight})},DropdownListItem:{component:xe},Popover:{props:{ignoreBoundary:y,overrides:{Body:{style:()=>({marginTop:f.spacing.px})}}}},Placeholder:{style:()=>({color:f.colors.fadedText60})},SelectArrow:{component:Re,props:{overrides:{Svg:{style:()=>({width:f.iconSizes.xl,height:f.iconSizes.xl})}}}}}}}},P=H.useCallback($=>{const _=$===null?null:Ye($);v({value:_,fromUi:!0})},[v]),R=H.useCallback(()=>{P(null)},[P]);return $e("div",{className:"stTimeInput","data-testid":"stTimeInput",children:[Z(Ee,{label:c.label,disabled:g,labelVisibility:_e(c.labelVisibility?.value),children:c.help&&Z(Te,{content:c.help,label:c.label})}),Z(We,{format:"24",step:c.step?Number(c.step):900,value:J(b)?void 0:Ge(b),onChange:P,overrides:T,nullable:S,creatable:!0,"aria-label":c.label}),S&&!J(b)&&Z(Ae,{onClick:R,"data-testid":"stTimeInputClearButton",children:Z(Ve.StyledClearIcon,{overrides:{Svg:{style:{color:f.colors.grayTextColor,padding:f.spacing.threeXS,height:f.sizes.clearIconSize,width:f.sizes.clearIconSize,":hover":{fill:f.colors.bodyText}}}},$isFocusVisible:!1})})]})}function He(g,c){return g.getStringValue(c)??null}function Ue(g){return g.default??null}function Je(g){return g.value??null}function Ke(g,c,h,m){c.setStringValue(g,h.value,{fromUi:h.fromUi},m)}function Ye(g){const c=g.getHours().toString().padStart(2,"0"),h=g.getMinutes().toString().padStart(2,"0");return`${c}:${h}`}function Ge(g){if(g===null)return null;const[c,h]=g.split(":").map(Number),m=new Date;return m.setHours(c),m.setMinutes(h),m}const nt=H.memo(ke);export{nt as default};
@@ -1 +1 @@
1
- import{r as u,B as n,u as d,j as o,a as B,b as m,c as h,D as p,d as f}from"./index.lMhsw-5K.js";import{m as g}from"./iconPosition.Dp9f2jam.js";function b(l){const{disabled:e,element:t,widgetMgr:s,fragmentId:a}=l,r=t.shortcut?t.shortcut:void 0;let i=n.SECONDARY;t.type==="primary"?i=n.PRIMARY:t.type==="tertiary"&&(i=n.TERTIARY);const c=u.useCallback(()=>{e||s.setTriggerValue(t,{fromUi:!0},a)},[e,s,t,a]);return d({shortcut:r,disabled:e,onActivate:c}),o(f,{className:"stButton","data-testid":"stButton",children:o(B,{help:t.help,containerWidth:!0,children:o(m,{kind:i,size:h.SMALL,disabled:e,containerWidth:!0,onClick:c,children:o(p,{icon:t.icon,iconPosition:g(t.iconPosition),label:t.label,shortcut:r})})})})}const A=u.memo(b);export{A as default};
1
+ import{r as u,B as n,u as d,j as o,a as B,b as m,c as h,D as p,d as f}from"./index.CPc_uZux.js";import{m as g}from"./iconPosition.BVScIr6G.js";function b(l){const{disabled:e,element:t,widgetMgr:s,fragmentId:a}=l,r=t.shortcut?t.shortcut:void 0;let i=n.SECONDARY;t.type==="primary"?i=n.PRIMARY:t.type==="tertiary"&&(i=n.TERTIARY);const c=u.useCallback(()=>{e||s.setTriggerValue(t,{fromUi:!0},a)},[e,s,t,a]);return d({shortcut:r,disabled:e,onActivate:c}),o(f,{className:"stButton","data-testid":"stButton",children:o(B,{help:t.help,containerWidth:!0,children:o(m,{kind:i,size:h.SMALL,disabled:e,containerWidth:!0,onClick:c,children:o(p,{icon:t.icon,iconPosition:g(t.iconPosition),label:t.label,shortcut:r})})})})}const A=u.memo(b);export{A as default};
@@ -1 +1 @@
1
- import{r as o,E as L,_ as k,z as p,aa as Se,o as x,j as a,ax as I,b as V,c as Ue,B as M,h as ve,$ as be,k as Ce,aj as ee,bh as Ie,e as D,bW as Ee,p as Be,ab as De,ac as Le,bP as ke,bQ as Ve}from"./index.lMhsw-5K.js";import{u as Me}from"./FormClearHelper.BM3uDLnU.js";import{g as oe,F as R,a as Re,D as Pe,I as Ae,s as Ne,b as Te}from"./FileHelper.DmtDDGp0.js";import{S as We,P as He}from"./ProgressBar.DWErD3j3.js";import{U as j}from"./UploadFileInfo.Dr-zDST7.js";const $e=e=>{const t=o.useRef();return o.useEffect(()=>{t.current=e},[e]),t.current};var ne=o.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return o.createElement(L,k({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),o.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),o.createElement("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12l4.58-4.59z"}))});ne.displayName="ChevronLeft";var le=o.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return o.createElement(L,k({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),o.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),o.createElement("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6-6-6z"}))});le.displayName="ChevronRight";var se=o.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return o.createElement(L,k({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),o.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),o.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"}))});se.displayName="Clear";var ae=o.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return o.createElement(L,k({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),o.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),o.createElement("path",{d:"M19.35 10.04A7.49 7.49 0 0012 4C9.11 4 6.6 5.64 5.35 8.04A5.994 5.994 0 000 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM19 18H6c-2.21 0-4-1.79-4-4 0-2.05 1.53-3.76 3.56-3.97l1.07-.11.5-.95A5.469 5.469 0 0112 6c2.62 0 4.88 1.86 5.39 4.43l.3 1.5 1.53.11A2.98 2.98 0 0122 15c0 1.65-1.35 3-3 3zM8 13h2.55v3h2.9v-3H16l-4-4z"}))});ae.displayName="CloudUpload";var ie=o.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return o.createElement(L,k({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),o.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}))});ie.displayName="Error";const re=p("section",{target:"ewslnz90"})(({isDisabled:e,theme:t})=>({display:"flex",gap:t.spacing.lg,alignItems:"center",padding:t.spacing.lg,backgroundColor:t.colors.secondaryBg,borderRadius:t.radii.default,border:t.colors.widgetBorderColor?`${t.sizes.borderWidth} solid ${t.colors.widgetBorderColor}`:void 0,height:t.sizes.largestElementHeight,":focus":{outline:"none"},":focus-visible":{boxShadow:t.shadows.focusRingOutline},cursor:e?"not-allowed":"pointer"})),je=p("div",{target:"ewslnz91"})(({theme:e})=>({marginRight:"auto",alignItems:"center",display:"flex",gap:e.spacing.lg,minWidth:0,width:"100%"})),ce=p("span",{target:"ewslnz92"})(({theme:e})=>({color:e.colors.darkenedBgMix100})),de=p("span",{target:"ewslnz93"})(({theme:e,disabled:t})=>({color:t?e.colors.fadedText40:e.colors.bodyText})),Xe=p("span",{target:"ewslnz94"})(({theme:e,disabled:t})=>({fontSize:e.fontSizes.sm,color:t?e.colors.fadedText40:e.colors.fadedText60,display:"block",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",maxWidth:"100%"})),Oe=p("div",{target:"ewslnz95"})({display:"flex",flexDirection:"column",minWidth:0,maxWidth:"100%"}),qe=p("span",{target:"ewslnz96"})({whiteSpace:"nowrap"}),pe=p("div",{target:"ewslnz97"})(({theme:e})=>({left:0,right:0,lineHeight:e.lineHeights.tight,paddingTop:e.spacing.md,paddingLeft:e.spacing.lg,paddingRight:e.spacing.lg})),_e=p("ul",{target:"ewslnz98"})(({theme:e})=>({listStyleType:"none",margin:e.spacing.none,padding:e.spacing.none})),ue=p("li",{target:"ewslnz99"})(({theme:e})=>({margin:e.spacing.none,padding:e.spacing.none})),ge=p("div",{target:"ewslnz910"})(({theme:e})=>({display:"flex",alignItems:"baseline",flex:1,paddingLeft:e.spacing.lg,overflow:"hidden"})),fe=p("div",{target:"ewslnz911"})(({theme:e,disabled:t})=>({marginRight:e.spacing.sm,marginBottom:e.spacing.twoXS,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:t?e.colors.fadedText40:e.colors.bodyText})),he=p("div",{target:"ewslnz912"})(({theme:e})=>({display:"flex",alignItems:"center",marginBottom:e.spacing.twoXS})),Ke=p("span",{target:"ewslnz913"})(({theme:e})=>({marginRight:e.spacing.twoXS})),Qe=p("div",{target:"ewslnz914"})(({theme:e,disabled:t})=>({display:"flex",padding:e.spacing.twoXS,color:t?e.colors.fadedText40:e.colors.darkenedBgMix100})),Fe=p("small",{target:"ewslnz915"})(({theme:e})=>({color:e.colors.redTextColor,fontSize:e.fontSizes.sm,height:e.fontSizes.sm,lineHeight:e.fontSizes.sm,display:"flex",alignItems:"center",whiteSpace:"nowrap"})),me=p("span",{target:"ewslnz916"})({}),Ye=e=>({[re]:{display:"flex",flexDirection:"column",alignItems:"flex-start",height:"auto",gap:e.spacing.sm},[ce]:{display:"none"},[de]:{marginBottom:e.spacing.twoXS},[pe]:{paddingRight:e.spacing.lg},[he]:{maxWidth:"inherit",flex:1,alignItems:"flex-start",marginBottom:e.spacing.sm},[fe]:{width:e.sizes.full},[ge]:{flexDirection:"column"},[Fe]:{height:"auto",whiteSpace:"initial"},[me]:{display:"none"},[ue]:{margin:e.spacing.none,padding:e.spacing.none}}),Ge=p("div",{target:"ewslnz917"})(({theme:e,width:t})=>{if(t<Se("23rem"))return Ye(e)}),Je=({multiple:e,acceptedExtensions:t,maxSizeBytes:n,acceptDirectory:i=!1,disabled:d})=>{const y=()=>i?"directories":e?"files":"file",c=()=>t.length?` • ${t.map(w=>w.replace(/^\./,"").toUpperCase()).join(", ")}`:null,F=()=>`Limit ${oe(n,R.Byte,0)} per file`;return x(je,{"data-testid":"stFileUploaderDropzoneInstructions",children:[a(ce,{children:a(I,{content:ae,size:"threeXL"})}),x(Oe,{children:[x(de,{disabled:d,children:["Drag and drop ",y()," here"]}),x(Xe,{disabled:d,children:[F(),c()]})]})]})},Ze=o.memo(Je),et=({onDrop:e,multiple:t,acceptedExtensions:n,maxSizeBytes:i,disabled:d,label:y,acceptDirectory:c=!1})=>a(Pe,{onDrop:e,multiple:t,accept:Re(n),maxSize:i,disabled:d,useFsAccessApi:!1,children:({getRootProps:F,getInputProps:w})=>{const U=w({multiple:t||!!c});return x(re,{...F(),"data-testid":"stFileUploaderDropzone",isDisabled:d,"aria-label":y,"aria-disabled":d,children:[a("input",{"data-testid":"stFileUploaderDropzoneInput",...U,...c&&{webkitdirectory:""}}),a(Ze,{multiple:t,acceptedExtensions:n,maxSizeBytes:i,acceptDirectory:c,disabled:d}),a(qe,{children:a(V,{kind:M.SECONDARY,disabled:d,size:Ue.SMALL,children:c?"Browse directories":"Browse files"})})]})}}),tt=o.memo(et),we=p("small",{target:"e1xq3mgd0"})(({kind:e,disabled:t,theme:n})=>{const{redTextColor:i,fadedText60:d,fadedText40:y}=n.colors;let c=d;return t&&(c=y),e==="danger"&&(c=i),{color:c,fontSize:n.fontSizes.sm,lineHeight:n.lineHeights.tight}}),ot=({fileInfo:e,disabled:t})=>e.status.type==="uploading"?a(He,{value:e.status.progress,size:We.SMALL}):e.status.type==="error"?x(Fe,{children:[a(Ke,{"data-testid":"stFileUploaderFileErrorMessage",children:e.status.errorMessage}),a(me,{children:a(I,{content:ie,size:"lg"})})]}):e.status.type==="uploaded"?a(we,{disabled:t,children:oe(e.size,R.Byte)}):null,nt=({fileInfo:e,onDelete:t,disabled:n})=>x(he,{className:"stFileUploaderFile","data-testid":"stFileUploaderFile",children:[a(Qe,{disabled:n,children:a(I,{content:Ae,size:"twoXL"})}),x(ge,{className:"stFileUploaderFileData",children:[a(fe,{className:"stFileUploaderFileName","data-testid":"stFileUploaderFileName",title:e.name,disabled:n,children:e.name}),a(ot,{fileInfo:e,disabled:n})]}),a("div",{"data-testid":"stFileUploaderDeleteBtn",children:a(V,{onClick:()=>t(e.id),kind:M.MINIMAL,disabled:n,"aria-label":`Remove ${e.name}`,children:a(I,{content:se,size:"lg"})})})]}),lt=o.memo(nt),st=p("div",{target:"e1o0u1j0"})(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"space-between",paddingBottom:e.spacing.twoXS,marginBottom:e.spacing.twoXS})),at=p("div",{target:"e1o0u1j1"})(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",color:e.colors.fadedText40})),it=({currentPage:e,totalPages:t,onNext:n,onPrevious:i})=>x(st,{"data-testid":"stFileUploaderPagination",children:[a(we,{children:`Showing page ${e} of ${t}`}),x(at,{children:[a(V,{onClick:i,kind:M.MINIMAL,children:a(I,{content:ne,size:"xl"})}),a(V,{onClick:n,kind:M.MINIMAL,children:a(I,{content:le,size:"xl"})})]})]}),rt=o.memo(it),te=(e,t)=>Math.ceil(e.length/t),ct=e=>ve(({pageSize:n,items:i,resetOnAdd:d,...y})=>{const[c,F]=o.useState(0),[w,U]=o.useState(()=>te(i,n)),u=$e(i);o.useEffect(()=>{u&&u.length!==i.length&&U(te(i,n)),u&&u.length<i.length?d&&F(0):c+1>=w&&F(w-1)},[i,c,n,u,d,w]);const E=()=>{F(Math.min(c+1,w-1))},v=()=>{F(Math.max(0,c-1))},P=i.slice(c*n,c*n+n);return x(be,{children:[a(e,{items:P,...y}),i.length>n?a(rt,{pageSize:n,totalPages:w,currentPage:c+1,onNext:E,onPrevious:v}):null]})},e),dt=({items:e,onDelete:t,disabled:n})=>a(_e,{children:e.map(i=>a(ue,{children:a(lt,{fileInfo:i,onDelete:t,disabled:n})},i.id))}),pt=ct(dt),ut=e=>a(pe,{children:a(pt,{...e})}),gt=o.memo(ut),ft=(e,t)=>{const n=t.getFileUploaderStateValue(e);if(D(n))return{files:[],nextLocalId:1};const{uploadedFileInfo:i}=n;if(D(i)||i.length===0)return{files:[],nextLocalId:1};let d=1;return{files:i.map(c=>{const F=c.name,w=c.size,U=c.fileId,u=c.fileUrls,E=new j(F,w,d,{type:"uploaded",fileId:U,fileUrls:u});return d+=1,E}),nextLocalId:d}},$=e=>{const t=e.filter(n=>n.status.type==="uploaded").map(n=>{const{name:i,size:d,status:y}=n,{fileId:c,fileUrls:F}=y;return new ke({fileId:c,fileUrls:F,name:i,size:d})});return new Ve({uploadedFileInfo:t})},ht=({disabled:e,element:t,widgetMgr:n,uploadClient:i,fragmentId:d})=>{const{width:y,elementRef:c}=Ce(),{files:F,nextLocalId:w}=o.useMemo(()=>ft(t,n),[t,n]),U=o.useRef(w),[u,E]=o.useState(()=>F),v=o.useRef(u);o.useEffect(()=>{v.current=u},[u]);const[P,X]=o.useState(!1),B=o.useCallback(()=>{const l=U.current;return U.current+=1,l},[]),A=o.useMemo(()=>{const l=t.maxUploadSizeMb;return Ne(l,R.Megabyte,R.Byte)},[t.maxUploadSizeMb]),S=o.useCallback(l=>{ee.flushSync(()=>{E(s=>{const r=typeof l=="function"?l(s):l;return v.current=r,r})})},[]),N=o.useCallback(l=>{ee.flushSync(()=>{X(l)})},[X]),O=o.useCallback(l=>{S(s=>[...s,l])},[S]),T=o.useCallback(l=>{l.length!==0&&S(s=>[...s,...l])},[S]),q=o.useCallback(l=>{S(s=>s.filter(r=>r.id!==l))},[S]),b=o.useCallback((l,s)=>{S(r=>r.map(g=>g.id===l?s:g))},[S]),C=o.useCallback(l=>v.current.find(s=>s.id===l),[]),_=u.some(l=>l.status.type==="uploading")||P?"updating":"ready";o.useEffect(()=>{n.getFileUploaderStateValue(t)===void 0&&n.setFileUploaderStateValue(t,$(v.current),{fromUi:!1},d)},[n,t,d]),o.useEffect(()=>{if(_!=="ready")return;const l=$(u),s=n.getFileUploaderStateValue(t);Ie(l,s)||n.setFileUploaderStateValue(t,l,{fromUi:!0},d)},[_,u,n,t,d]);const ye=o.useCallback(()=>{S(()=>[]);const l=$([]);n.setFileUploaderStateValue(t,l,{fromUi:!0},d)},[t,d,S,n]);Me({element:t,widgetMgr:n,onFormCleared:ye});const K=o.useCallback(l=>{const s=t.type;if(!s||s.length===0)return!0;const r=l.name.toLowerCase();return s.some(g=>r.endsWith(g.toLowerCase()))},[t.type]),Q=o.useCallback(l=>{const s=[],r=[];return l.forEach(g=>{K(g)?s.push(g):r.push({file:g,errors:[{code:"file-invalid-type",message:`${g.type} files are not allowed.`}]})}),{accepted:s,rejected:r}},[K]),Y=o.useCallback((l,s)=>{const r=C(l);D(r)||r.status.type!=="uploading"||b(r.id,r.setStatus({type:"uploaded",fileId:s.fileId,fileUrls:s}))},[C,b]),G=o.useCallback((l,s)=>{const r=C(s);if(D(r)||r.status.type!=="uploading")return;const g=Math.round(l.loaded*100/l.total);r.status.progress!==g&&b(s,r.setStatus({type:"uploading",abortController:r.status.abortController,progress:g}))},[C,b]),J=o.useCallback((l,s)=>{const r=new AbortController,g=s.webkitRelativePath||s.name,f=new j(g,s.size,B(),{type:"uploading",abortController:r,progress:1});O(f),i.uploadFile(t,l.uploadUrl,s,h=>G(h,f.id),r.signal).then(()=>Y(f.id,l)).catch(h=>{h instanceof DOMException&&h.name==="AbortError"||b(f.id,f.setStatus({type:"error",errorMessage:h?h.toString():"Unknown error"}))})},[O,t,B,Y,G,b,i]),W=o.useCallback(l=>{if(e)return;const s=C(l);D(s)||(s.status.type==="uploading"&&s.status.abortController.abort(),s.status.type==="uploaded"&&s.status.fileUrls.deleteUrl&&i.deleteFile(s.status.fileUrls.deleteUrl),q(l))},[e,C,q,i]),xe=o.useCallback((l,s)=>{const{multipleFiles:r}=t,g=!!t.acceptDirectory;let f=[...l],h=[...s];if(g&&f.length>0){const{accepted:z,rejected:m}=Q(f);f=z,h=[...h,...m]}if(!r&&f.length===0&&h.length>1){const z=h.findIndex(m=>m.errors.length===1&&m.errors[0].code==="too-many-files");z>=0&&(f.push(h[z].file),h.splice(z,1))}if(i.fetchFileURLs(f).then(z=>{if(!r&&f.length>0){const m=v.current.find(H=>H.status.type!=="error");if(m){N(!0);try{W(m.id)}finally{N(!1)}}}Ee(z,f).forEach(([m,H])=>{J(m,H)})}).catch(z=>{T(f.map(m=>new j(m.name,m.size,B(),{type:"error",errorMessage:z})))}),h.length>0){const z=h.map(m=>Te(m,B(),A));T(z)}},[T,W,t,Q,A,B,i,J,N]),Z=o.useMemo(()=>u.slice().reverse(),[u]),ze=t.type;return x(Ge,{className:"stFileUploader","data-testid":"stFileUploader",width:y,ref:c,children:[a(Le,{label:t.label,disabled:e,labelVisibility:Be(t.labelVisibility?.value),children:t.help&&a(De,{content:t.help,label:t.label})}),a(tt,{onDrop:xe,multiple:t.multipleFiles,acceptedExtensions:ze,maxSizeBytes:A,label:t.label,disabled:e,acceptDirectory:!!t.acceptDirectory}),Z.length>0&&a(gt,{items:Z,pageSize:3,onDelete:W,resetOnAdd:!0,disabled:e})]})},zt=o.memo(ht);export{zt as default};
1
+ import{r as o,E as L,_ as k,z as p,aa as Se,o as x,j as a,ax as I,b as V,c as Ue,B as R,h as ve,$ as be,k as Ce,aj as ee,bu as Ie,e as D,bY as Ee,p as Be,ab as De,ac as Le,bR as ke,bS as Ve}from"./index.CPc_uZux.js";import{u as Re}from"./FormClearHelper.DTFnX0js.js";import{g as oe,F as M,a as Me,D as Ae,I as Pe,s as Ne,b as Te}from"./FileHelper.DqvW90pm.js";import{S as We,P as He}from"./ProgressBar.Dg-oMbWg.js";import{U as j}from"./UploadFileInfo.Dr-zDST7.js";const $e=e=>{const t=o.useRef();return o.useEffect(()=>{t.current=e},[e]),t.current};var ne=o.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return o.createElement(L,k({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),o.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),o.createElement("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12l4.58-4.59z"}))});ne.displayName="ChevronLeft";var le=o.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return o.createElement(L,k({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),o.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),o.createElement("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6-6-6z"}))});le.displayName="ChevronRight";var se=o.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return o.createElement(L,k({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),o.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),o.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"}))});se.displayName="Clear";var ae=o.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return o.createElement(L,k({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),o.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),o.createElement("path",{d:"M19.35 10.04A7.49 7.49 0 0012 4C9.11 4 6.6 5.64 5.35 8.04A5.994 5.994 0 000 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM19 18H6c-2.21 0-4-1.79-4-4 0-2.05 1.53-3.76 3.56-3.97l1.07-.11.5-.95A5.469 5.469 0 0112 6c2.62 0 4.88 1.86 5.39 4.43l.3 1.5 1.53.11A2.98 2.98 0 0122 15c0 1.65-1.35 3-3 3zM8 13h2.55v3h2.9v-3H16l-4-4z"}))});ae.displayName="CloudUpload";var ie=o.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return o.createElement(L,k({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),o.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}))});ie.displayName="Error";const re=p("section",{target:"ewslnz90"})(({isDisabled:e,theme:t})=>({display:"flex",gap:t.spacing.lg,alignItems:"center",padding:t.spacing.lg,backgroundColor:t.colors.secondaryBg,borderRadius:t.radii.default,border:t.colors.widgetBorderColor?`${t.sizes.borderWidth} solid ${t.colors.widgetBorderColor}`:void 0,height:t.sizes.largestElementHeight,":focus":{outline:"none"},":focus-visible":{boxShadow:t.shadows.focusRingOutline},cursor:e?"not-allowed":"pointer"})),je=p("div",{target:"ewslnz91"})(({theme:e})=>({marginRight:"auto",alignItems:"center",display:"flex",gap:e.spacing.lg,minWidth:0,width:"100%"})),ce=p("span",{target:"ewslnz92"})(({theme:e})=>({color:e.colors.darkenedBgMix100})),de=p("span",{target:"ewslnz93"})(({theme:e,disabled:t})=>({color:t?e.colors.fadedText40:e.colors.bodyText})),Xe=p("span",{target:"ewslnz94"})(({theme:e,disabled:t})=>({fontSize:e.fontSizes.sm,color:t?e.colors.fadedText40:e.colors.fadedText60,display:"block",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",maxWidth:"100%"})),Oe=p("div",{target:"ewslnz95"})({display:"flex",flexDirection:"column",minWidth:0,maxWidth:"100%"}),qe=p("span",{target:"ewslnz96"})({whiteSpace:"nowrap"}),pe=p("div",{target:"ewslnz97"})(({theme:e})=>({left:0,right:0,lineHeight:e.lineHeights.tight,paddingTop:e.spacing.md,paddingLeft:e.spacing.lg,paddingRight:e.spacing.lg})),Ye=p("ul",{target:"ewslnz98"})(({theme:e})=>({listStyleType:"none",margin:e.spacing.none,padding:e.spacing.none})),ue=p("li",{target:"ewslnz99"})(({theme:e})=>({margin:e.spacing.none,padding:e.spacing.none})),ge=p("div",{target:"ewslnz910"})(({theme:e})=>({display:"flex",alignItems:"baseline",flex:1,paddingLeft:e.spacing.lg,overflow:"hidden"})),fe=p("div",{target:"ewslnz911"})(({theme:e,disabled:t})=>({marginRight:e.spacing.sm,marginBottom:e.spacing.twoXS,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:t?e.colors.fadedText40:e.colors.bodyText})),he=p("div",{target:"ewslnz912"})(({theme:e})=>({display:"flex",alignItems:"center",marginBottom:e.spacing.twoXS})),_e=p("span",{target:"ewslnz913"})(({theme:e})=>({marginRight:e.spacing.twoXS})),Ke=p("div",{target:"ewslnz914"})(({theme:e,disabled:t})=>({display:"flex",padding:e.spacing.twoXS,color:t?e.colors.fadedText40:e.colors.darkenedBgMix100})),Fe=p("small",{target:"ewslnz915"})(({theme:e})=>({color:e.colors.redTextColor,fontSize:e.fontSizes.sm,height:e.fontSizes.sm,lineHeight:e.fontSizes.sm,display:"flex",alignItems:"center",whiteSpace:"nowrap"})),me=p("span",{target:"ewslnz916"})({}),Ge=e=>({[re]:{display:"flex",flexDirection:"column",alignItems:"flex-start",height:"auto",gap:e.spacing.sm},[ce]:{display:"none"},[de]:{marginBottom:e.spacing.twoXS},[pe]:{paddingRight:e.spacing.lg},[he]:{maxWidth:"inherit",flex:1,alignItems:"flex-start",marginBottom:e.spacing.sm},[fe]:{width:e.sizes.full},[ge]:{flexDirection:"column"},[Fe]:{height:"auto",whiteSpace:"initial"},[me]:{display:"none"},[ue]:{margin:e.spacing.none,padding:e.spacing.none}}),Je=p("div",{target:"ewslnz917"})(({theme:e,width:t})=>{if(t<Se("23rem"))return Ge(e)}),Qe=({multiple:e,acceptedExtensions:t,maxSizeBytes:n,acceptDirectory:i=!1,disabled:d})=>{const y=()=>i?"directories":e?"files":"file",c=()=>t.length?` • ${t.map(w=>w.replace(/^\./,"").toUpperCase()).join(", ")}`:null,F=()=>`Limit ${oe(n,M.Byte,0)} per file`;return x(je,{"data-testid":"stFileUploaderDropzoneInstructions",children:[a(ce,{children:a(I,{content:ae,size:"threeXL"})}),x(Oe,{children:[x(de,{disabled:d,children:["Drag and drop ",y()," here"]}),x(Xe,{disabled:d,children:[F(),c()]})]})]})},Ze=o.memo(Qe),et=({onDrop:e,multiple:t,acceptedExtensions:n,maxSizeBytes:i,disabled:d,label:y,acceptDirectory:c=!1})=>a(Ae,{onDrop:e,multiple:t,accept:Me(n),maxSize:i,disabled:d,useFsAccessApi:!1,children:({getRootProps:F,getInputProps:w})=>{const U=w({multiple:t||!!c});return x(re,{...F(),"data-testid":"stFileUploaderDropzone",isDisabled:d,"aria-label":y,"aria-disabled":d,children:[a("input",{"data-testid":"stFileUploaderDropzoneInput",...U,...c&&{webkitdirectory:""}}),a(Ze,{multiple:t,acceptedExtensions:n,maxSizeBytes:i,acceptDirectory:c,disabled:d}),a(qe,{children:a(V,{kind:R.SECONDARY,disabled:d,size:Ue.SMALL,children:c?"Browse directories":"Browse files"})})]})}}),tt=o.memo(et),we=p("small",{target:"e1xq3mgd0"})(({kind:e,disabled:t,theme:n})=>{const{redTextColor:i,fadedText60:d,fadedText40:y}=n.colors;let c=d;return t&&(c=y),e==="danger"&&(c=i),{color:c,fontSize:n.fontSizes.sm,lineHeight:n.lineHeights.tight}}),ot=({fileInfo:e,disabled:t})=>e.status.type==="uploading"?a(He,{value:e.status.progress,size:We.SMALL}):e.status.type==="error"?x(Fe,{children:[a(_e,{"data-testid":"stFileUploaderFileErrorMessage",children:e.status.errorMessage}),a(me,{children:a(I,{content:ie,size:"lg"})})]}):e.status.type==="uploaded"?a(we,{disabled:t,children:oe(e.size,M.Byte)}):null,nt=({fileInfo:e,onDelete:t,disabled:n})=>x(he,{className:"stFileUploaderFile","data-testid":"stFileUploaderFile",children:[a(Ke,{disabled:n,children:a(I,{content:Pe,size:"twoXL"})}),x(ge,{className:"stFileUploaderFileData",children:[a(fe,{className:"stFileUploaderFileName","data-testid":"stFileUploaderFileName",title:e.name,disabled:n,children:e.name}),a(ot,{fileInfo:e,disabled:n})]}),a("div",{"data-testid":"stFileUploaderDeleteBtn",children:a(V,{onClick:()=>t(e.id),kind:R.MINIMAL,disabled:n,"aria-label":`Remove ${e.name}`,children:a(I,{content:se,size:"lg"})})})]}),lt=o.memo(nt),st=p("div",{target:"e1o0u1j0"})(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"space-between",paddingBottom:e.spacing.twoXS,marginBottom:e.spacing.twoXS})),at=p("div",{target:"e1o0u1j1"})(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",color:e.colors.fadedText40})),it=({currentPage:e,totalPages:t,onNext:n,onPrevious:i})=>x(st,{"data-testid":"stFileUploaderPagination",children:[a(we,{children:`Showing page ${e} of ${t}`}),x(at,{children:[a(V,{onClick:i,kind:R.MINIMAL,children:a(I,{content:ne,size:"xl"})}),a(V,{onClick:n,kind:R.MINIMAL,children:a(I,{content:le,size:"xl"})})]})]}),rt=o.memo(it),te=(e,t)=>Math.ceil(e.length/t),ct=e=>ve(({pageSize:n,items:i,resetOnAdd:d,...y})=>{const[c,F]=o.useState(0),[w,U]=o.useState(()=>te(i,n)),u=$e(i);o.useEffect(()=>{u&&u.length!==i.length&&U(te(i,n)),u&&u.length<i.length?d&&F(0):c+1>=w&&F(w-1)},[i,c,n,u,d,w]);const E=()=>{F(Math.min(c+1,w-1))},v=()=>{F(Math.max(0,c-1))},A=i.slice(c*n,c*n+n);return x(be,{children:[a(e,{items:A,...y}),i.length>n?a(rt,{pageSize:n,totalPages:w,currentPage:c+1,onNext:E,onPrevious:v}):null]})},e),dt=({items:e,onDelete:t,disabled:n})=>a(Ye,{children:e.map(i=>a(ue,{children:a(lt,{fileInfo:i,onDelete:t,disabled:n})},i.id))}),pt=ct(dt),ut=e=>a(pe,{children:a(pt,{...e})}),gt=o.memo(ut),ft=(e,t)=>{const n=t.getFileUploaderStateValue(e);if(D(n))return{files:[],nextLocalId:1};const{uploadedFileInfo:i}=n;if(D(i)||i.length===0)return{files:[],nextLocalId:1};let d=1;return{files:i.map(c=>{const F=c.name,w=c.size,U=c.fileId,u=c.fileUrls,E=new j(F,w,d,{type:"uploaded",fileId:U,fileUrls:u});return d+=1,E}),nextLocalId:d}},$=e=>{const t=e.filter(n=>n.status.type==="uploaded").map(n=>{const{name:i,size:d,status:y}=n,{fileId:c,fileUrls:F}=y;return new ke({fileId:c,fileUrls:F,name:i,size:d})});return new Ve({uploadedFileInfo:t})},ht=({disabled:e,element:t,widgetMgr:n,uploadClient:i,fragmentId:d})=>{const{width:y,elementRef:c}=Ce(),{files:F,nextLocalId:w}=o.useMemo(()=>ft(t,n),[t,n]),U=o.useRef(w),[u,E]=o.useState(()=>F),v=o.useRef(u);o.useEffect(()=>{v.current=u},[u]);const[A,X]=o.useState(!1),B=o.useCallback(()=>{const l=U.current;return U.current+=1,l},[]),P=o.useMemo(()=>{const l=t.maxUploadSizeMb;return Ne(l,M.Megabyte,M.Byte)},[t.maxUploadSizeMb]),S=o.useCallback(l=>{ee.flushSync(()=>{E(s=>{const r=typeof l=="function"?l(s):l;return v.current=r,r})})},[]),N=o.useCallback(l=>{ee.flushSync(()=>{X(l)})},[X]),O=o.useCallback(l=>{S(s=>[...s,l])},[S]),T=o.useCallback(l=>{l.length!==0&&S(s=>[...s,...l])},[S]),q=o.useCallback(l=>{S(s=>s.filter(r=>r.id!==l))},[S]),b=o.useCallback((l,s)=>{S(r=>r.map(g=>g.id===l?s:g))},[S]),C=o.useCallback(l=>v.current.find(s=>s.id===l),[]),Y=u.some(l=>l.status.type==="uploading")||A?"updating":"ready";o.useEffect(()=>{n.getFileUploaderStateValue(t)===void 0&&n.setFileUploaderStateValue(t,$(v.current),{fromUi:!1},d)},[n,t,d]),o.useEffect(()=>{if(Y!=="ready")return;const l=$(u),s=n.getFileUploaderStateValue(t);Ie(l,s)||n.setFileUploaderStateValue(t,l,{fromUi:!0},d)},[Y,u,n,t,d]);const ye=o.useCallback(()=>{S(()=>[]);const l=$([]);n.setFileUploaderStateValue(t,l,{fromUi:!0},d)},[t,d,S,n]);Re({element:t,widgetMgr:n,onFormCleared:ye});const _=o.useCallback(l=>{const s=t.type;if(!s||s.length===0)return!0;const r=l.name.toLowerCase();return s.some(g=>r.endsWith(g.toLowerCase()))},[t.type]),K=o.useCallback(l=>{const s=[],r=[];return l.forEach(g=>{_(g)?s.push(g):r.push({file:g,errors:[{code:"file-invalid-type",message:`${g.type} files are not allowed.`}]})}),{accepted:s,rejected:r}},[_]),G=o.useCallback((l,s)=>{const r=C(l);D(r)||r.status.type!=="uploading"||b(r.id,r.setStatus({type:"uploaded",fileId:s.fileId,fileUrls:s}))},[C,b]),J=o.useCallback((l,s)=>{const r=C(s);if(D(r)||r.status.type!=="uploading")return;const g=Math.round(l.loaded*100/l.total);r.status.progress!==g&&b(s,r.setStatus({type:"uploading",abortController:r.status.abortController,progress:g}))},[C,b]),Q=o.useCallback((l,s)=>{const r=new AbortController,g=s.webkitRelativePath||s.name,f=new j(g,s.size,B(),{type:"uploading",abortController:r,progress:1});O(f),i.uploadFile(t,l.uploadUrl,s,h=>J(h,f.id),r.signal).then(()=>G(f.id,l)).catch(h=>{h instanceof DOMException&&h.name==="AbortError"||b(f.id,f.setStatus({type:"error",errorMessage:h?h.toString():"Unknown error"}))})},[O,t,B,G,J,b,i]),W=o.useCallback(l=>{if(e)return;const s=C(l);D(s)||(s.status.type==="uploading"&&s.status.abortController.abort(),s.status.type==="uploaded"&&s.status.fileUrls.deleteUrl&&i.deleteFile(s.status.fileUrls.deleteUrl),q(l))},[e,C,q,i]),xe=o.useCallback((l,s)=>{const{multipleFiles:r}=t,g=!!t.acceptDirectory;let f=[...l],h=[...s];if(g&&f.length>0){const{accepted:z,rejected:m}=K(f);f=z,h=[...h,...m]}if(!r&&f.length===0&&h.length>1){const z=h.findIndex(m=>m.errors.length===1&&m.errors[0].code==="too-many-files");z>=0&&(f.push(h[z].file),h.splice(z,1))}if(i.fetchFileURLs(f).then(z=>{if(!r&&f.length>0){const m=v.current.find(H=>H.status.type!=="error");if(m){N(!0);try{W(m.id)}finally{N(!1)}}}Ee(z,f).forEach(([m,H])=>{Q(m,H)})}).catch(z=>{T(f.map(m=>new j(m.name,m.size,B(),{type:"error",errorMessage:z})))}),h.length>0){const z=h.map(m=>Te(m,B(),P));T(z)}},[T,W,t,K,P,B,i,Q,N]),Z=o.useMemo(()=>u.slice().reverse(),[u]),ze=t.type;return x(Je,{className:"stFileUploader","data-testid":"stFileUploader",width:y,ref:c,children:[a(Le,{label:t.label,disabled:e,labelVisibility:Be(t.labelVisibility?.value),children:t.help&&a(De,{content:t.help,label:t.label})}),a(tt,{onDrop:xe,multiple:t.multipleFiles,acceptedExtensions:ze,maxSizeBytes:P,label:t.label,disabled:e,acceptDirectory:!!t.acceptDirectory}),Z.length>0&&a(gt,{items:Z,pageSize:3,onDelete:W,resetOnAdd:!0,disabled:e})]})},zt=o.memo(ht);export{zt as default};
@@ -1 +1 @@
1
- import{z as D,r as a,k as P,l as U,a9 as S,aa as j,o as H,j as l,p as q,ab as K,ac as O,ad as _,ae as $,Y as w,af as A}from"./index.lMhsw-5K.js";import{I as N}from"./InputInstructions.B2YZ5Lle.js";import{u as Y}from"./useBasicWidgetState.BwQxG7iA.js";import{u as G,a as J,b as M}from"./useUpdateUiValue.Cl1Y22Ao.js";import{u as Q}from"./uniqueId.DRPc21MO.js";import{I as X}from"./input.CIKqvWjB.js";import"./FormClearHelper.BM3uDLnU.js";import"./inputUtils.CptNuJwn.js";import"./base-input.C_CrNgNd.js";const Z=D("div",{target:"eiqkja70"})("position:relative;");function tt({disabled:o,element:t,widgetMgr:s,fragmentId:u}){const[r,p]=a.useState(()=>W(s,t)??null),{width:T,elementRef:x}=P(),[i,m]=a.useState(!1),y=a.useCallback(()=>{p(t.default??null),m(!0)},[t.default]),[C,h]=Y({getStateFromWidgetMgr:W,getDefaultStateFromProto:et,getCurrStateFromProto:ot,updateWidgetMgrState:at,element:t,widgetMgr:s,fragmentId:u,onFormCleared:y});G(C,r,p,i);const[V,f]=a.useState(!1),e=U(),[b]=a.useState(()=>Q("text_input_")),{placeholder:F,formId:n,icon:d,maxChars:I}=t,g=a.useCallback(()=>{m(!1),h({value:r,fromUi:!0})},[r,h]),v=S({formId:n})?s.allowFormEnterToSubmit(n):i,E=V&&T>j(e.breakpoints.hideWidgetDetails),R=a.useCallback(()=>{i&&g(),f(!1)},[i,g]),z=a.useCallback(()=>{f(!0)},[]),L=J({formId:n,maxChars:I,setDirty:m,setUiValue:p,setValueWithSource:h}),k=M(n,g,i,s,u);return H(Z,{className:"stTextInput","data-testid":"stTextInput",ref:x,children:[l(O,{label:t.label,disabled:o,labelVisibility:q(t.labelVisibility?.value),htmlFor:b,children:t.help&&l(K,{content:t.help,label:t.label})}),l(X,{value:r??"",placeholder:F,onBlur:R,onFocus:z,onChange:L,onKeyPress:k,"aria-label":t.label,disabled:o,id:b,type:st(t),autoComplete:t.autocomplete,startEnhancer:d&&l(w,{"data-testid":"stTextInputIcon",iconValue:d,size:"lg"}),overrides:{Input:{style:{fontWeight:e.fontWeights.normal,minWidth:0,lineHeight:e.lineHeights.inputWidget,paddingRight:e.spacing.sm,paddingLeft:e.spacing.md,paddingBottom:e.spacing.sm,paddingTop:e.spacing.sm,"::placeholder":{color:e.colors.fadedText60}}},Root:{props:{"data-testid":"stTextInputRootElement"},style:({$isFocused:B})=>{const c=$(e.colors,B);return{height:e.sizes.minElementHeight,borderLeftWidth:e.sizes.borderWidth,borderRightWidth:e.sizes.borderWidth,borderTopWidth:e.sizes.borderWidth,borderBottomWidth:e.sizes.borderWidth,borderTopColor:c,borderRightColor:c,borderBottomColor:c,borderLeftColor:c,paddingLeft:d?e.spacing.sm:0}}},StartEnhancer:{style:{paddingLeft:0,paddingRight:0,minWidth:e.iconSizes.lg,color:_(d)?e.colors.fadedText60:"inherit"}}}}),E&&l(N,{dirty:i,value:r??"",maxLength:I,inForm:S({formId:n}),allowEnterToSubmit:v})]})}function W(o,t){return o.getStringValue(t)??null}function et(o){return o.default??null}function ot(o){return o.value??null}function at(o,t,s,u){t.setStringValue(o,s.value,{fromUi:s.fromUi},u)}function st(o){return o.type===A.Type.PASSWORD?"password":"text"}const ht=a.memo(tt);export{ht as default};
1
+ import{z as D,r as a,k as P,l as U,a9 as S,aa as j,o as H,j as l,p as q,ab as K,ac as O,ad as _,ae as $,Y as w,af as A}from"./index.CPc_uZux.js";import{I as N}from"./InputInstructions.CdzsN_Va.js";import{u as Y}from"./useBasicWidgetState.DvpdEDYZ.js";import{u as G,a as J,b as M}from"./useUpdateUiValue.DQ4RuJNC.js";import{u as Q}from"./uniqueId.DTwvAE-J.js";import{I as X}from"./input.BcC6sPE_.js";import"./FormClearHelper.DTFnX0js.js";import"./inputUtils.CptNuJwn.js";import"./base-input.Q-zJLgRK.js";const Z=D("div",{target:"eiqkja70"})("position:relative;");function tt({disabled:o,element:t,widgetMgr:s,fragmentId:u}){const[r,p]=a.useState(()=>W(s,t)??null),{width:T,elementRef:x}=P(),[i,m]=a.useState(!1),y=a.useCallback(()=>{p(t.default??null),m(!0)},[t.default]),[C,h]=Y({getStateFromWidgetMgr:W,getDefaultStateFromProto:et,getCurrStateFromProto:ot,updateWidgetMgrState:at,element:t,widgetMgr:s,fragmentId:u,onFormCleared:y});G(C,r,p,i);const[V,f]=a.useState(!1),e=U(),[b]=a.useState(()=>Q("text_input_")),{placeholder:F,formId:n,icon:d,maxChars:I}=t,g=a.useCallback(()=>{m(!1),h({value:r,fromUi:!0})},[r,h]),v=S({formId:n})?s.allowFormEnterToSubmit(n):i,E=V&&T>j(e.breakpoints.hideWidgetDetails),R=a.useCallback(()=>{i&&g(),f(!1)},[i,g]),z=a.useCallback(()=>{f(!0)},[]),L=J({formId:n,maxChars:I,setDirty:m,setUiValue:p,setValueWithSource:h}),k=M(n,g,i,s,u);return H(Z,{className:"stTextInput","data-testid":"stTextInput",ref:x,children:[l(O,{label:t.label,disabled:o,labelVisibility:q(t.labelVisibility?.value),htmlFor:b,children:t.help&&l(K,{content:t.help,label:t.label})}),l(X,{value:r??"",placeholder:F,onBlur:R,onFocus:z,onChange:L,onKeyPress:k,"aria-label":t.label,disabled:o,id:b,type:st(t),autoComplete:t.autocomplete,startEnhancer:d&&l(w,{"data-testid":"stTextInputIcon",iconValue:d,size:"lg"}),overrides:{Input:{style:{fontWeight:e.fontWeights.normal,minWidth:0,lineHeight:e.lineHeights.inputWidget,paddingRight:e.spacing.sm,paddingLeft:e.spacing.md,paddingBottom:e.spacing.sm,paddingTop:e.spacing.sm,"::placeholder":{color:e.colors.fadedText60}}},Root:{props:{"data-testid":"stTextInputRootElement"},style:({$isFocused:B})=>{const c=$(e.colors,B);return{height:e.sizes.minElementHeight,borderLeftWidth:e.sizes.borderWidth,borderRightWidth:e.sizes.borderWidth,borderTopWidth:e.sizes.borderWidth,borderBottomWidth:e.sizes.borderWidth,borderTopColor:c,borderRightColor:c,borderBottomColor:c,borderLeftColor:c,paddingLeft:d?e.spacing.sm:0}}},StartEnhancer:{style:{paddingLeft:0,paddingRight:0,minWidth:e.iconSizes.lg,color:_(d)?e.colors.fadedText60:"inherit"}}}}),E&&l(N,{dirty:i,value:r??"",maxLength:I,inForm:S({formId:n}),allowEnterToSubmit:v})]})}function W(o,t){return o.getStringValue(t)??null}function et(o){return o.default??null}function ot(o){return o.value??null}function at(o,t,s,u){t.setStringValue(o,s.value,{fromUi:s.fromUi},u)}function st(o){return o.type===A.Type.PASSWORD?"password":"text"}const ht=a.memo(tt);export{ht as default};