streamlit-nightly 1.53.2.dev20260131__py3-none-any.whl → 1.53.2.dev20260203__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (205) hide show
  1. streamlit/commands/execution_control.py +2 -2
  2. streamlit/commands/logo.py +6 -10
  3. streamlit/components/v2/component_path_utils.py +17 -29
  4. streamlit/config.py +4 -2
  5. streamlit/delta_generator.py +2 -0
  6. streamlit/elements/lib/column_types.py +6 -2
  7. streamlit/elements/lib/utils.py +6 -6
  8. streamlit/elements/markdown.py +0 -1
  9. streamlit/elements/metric.py +2 -1
  10. streamlit/elements/widgets/button_group.py +6 -276
  11. streamlit/elements/widgets/feedback.py +322 -0
  12. streamlit/elements/widgets/number_input.py +2 -1
  13. streamlit/elements/widgets/slider.py +2 -1
  14. streamlit/material_icon_names.py +1 -1
  15. streamlit/path_security.py +98 -0
  16. streamlit/proto/AudioInput_pb2.py +4 -4
  17. streamlit/proto/AudioInput_pb2.pyi +3 -3
  18. streamlit/proto/Audio_pb2.py +2 -2
  19. streamlit/proto/BackMsg_pb2.pyi +2 -10
  20. streamlit/proto/Balloons_pb2.pyi +0 -2
  21. streamlit/proto/Block_pb2.py +35 -35
  22. streamlit/proto/ButtonGroup_pb2.py +10 -12
  23. streamlit/proto/ButtonGroup_pb2.pyi +6 -41
  24. streamlit/proto/Button_pb2.py +2 -2
  25. streamlit/proto/CameraInput_pb2.py +4 -4
  26. streamlit/proto/CameraInput_pb2.pyi +3 -3
  27. streamlit/proto/ChatInput_pb2.py +2 -2
  28. streamlit/proto/Checkbox_pb2.py +6 -6
  29. streamlit/proto/Checkbox_pb2.pyi +3 -3
  30. streamlit/proto/Code_pb2.py +2 -2
  31. streamlit/proto/ColorPicker_pb2.py +4 -4
  32. streamlit/proto/ColorPicker_pb2.pyi +3 -3
  33. streamlit/proto/Common_pb2.py +6 -6
  34. streamlit/proto/DateInput_pb2.py +4 -4
  35. streamlit/proto/DateInput_pb2.pyi +3 -3
  36. streamlit/proto/DateTimeInput_pb2.py +4 -4
  37. streamlit/proto/DateTimeInput_pb2.pyi +3 -3
  38. streamlit/proto/DeckGlJsonChart_pb2.py +2 -2
  39. streamlit/proto/Delta_pb2.py +2 -2
  40. streamlit/proto/DocString_pb2.py +1 -1
  41. streamlit/proto/Element_pb2.py +4 -4
  42. streamlit/proto/Element_pb2.pyi +9 -9
  43. streamlit/proto/Feedback_pb2.py +28 -0
  44. streamlit/proto/Feedback_pb2.pyi +93 -0
  45. streamlit/proto/FileUploader_pb2.py +4 -4
  46. streamlit/proto/FileUploader_pb2.pyi +3 -3
  47. streamlit/proto/ForwardMsg_pb2.py +8 -8
  48. streamlit/proto/GraphVizChart_pb2.py +2 -2
  49. streamlit/proto/IFrame_pb2.py +3 -3
  50. streamlit/proto/Image_pb2.py +4 -4
  51. streamlit/proto/Image_pb2.pyi +1 -7
  52. streamlit/proto/{BokehChart_pb2.py → LabelVisibility_pb2.py} +7 -5
  53. streamlit/proto/{LabelVisibilityMessage_pb2.pyi → LabelVisibility_pb2.pyi} +14 -14
  54. streamlit/proto/Markdown_pb2.py +4 -4
  55. streamlit/proto/Markdown_pb2.pyi +1 -5
  56. streamlit/proto/Metric_pb2.py +10 -10
  57. streamlit/proto/Metric_pb2.pyi +3 -3
  58. streamlit/proto/MultiSelect_pb2.py +4 -4
  59. streamlit/proto/MultiSelect_pb2.pyi +3 -3
  60. streamlit/proto/NewSession_pb2.py +38 -26
  61. streamlit/proto/NewSession_pb2.pyi +42 -8
  62. streamlit/proto/NumberInput_pb2.py +6 -6
  63. streamlit/proto/NumberInput_pb2.pyi +3 -3
  64. streamlit/proto/PlotlyChart_pb2.py +2 -2
  65. streamlit/proto/Radio_pb2.py +4 -4
  66. streamlit/proto/Radio_pb2.pyi +3 -3
  67. streamlit/proto/Selectbox_pb2.py +4 -4
  68. streamlit/proto/Selectbox_pb2.pyi +3 -6
  69. streamlit/proto/Slider_pb2.py +8 -8
  70. streamlit/proto/Slider_pb2.pyi +3 -3
  71. streamlit/proto/Snow_pb2.pyi +0 -2
  72. streamlit/proto/TextArea_pb2.py +4 -4
  73. streamlit/proto/TextArea_pb2.pyi +3 -3
  74. streamlit/proto/TextInput_pb2.py +6 -6
  75. streamlit/proto/TextInput_pb2.pyi +3 -3
  76. streamlit/proto/TimeInput_pb2.py +4 -4
  77. streamlit/proto/TimeInput_pb2.pyi +3 -3
  78. streamlit/proto/Video_pb2.py +2 -2
  79. streamlit/runtime/app_session.py +9 -1
  80. streamlit/static/index.html +2 -2
  81. streamlit/static/manifest.json +325 -310
  82. streamlit/static/static/css/{index.BUP6fTcR.css → index.C8MrxwGF.css} +1 -1
  83. streamlit/static/static/js/{ErrorOutline.esm.DC6KVDKK.js → ErrorOutline.esm.C9uHPmIj.js} +1 -1
  84. streamlit/static/static/js/{FileDownload.esm.Z9hRQIHi.js → FileDownload.esm.D-YPxF3t.js} +1 -1
  85. streamlit/static/static/js/{FileHelper.DqvW90pm.js → FileHelper.DQSH0zYW.js} +1 -1
  86. streamlit/static/static/js/{FormClearHelper.DTFnX0js.js → FormClearHelper.DQoXcOWo.js} +1 -1
  87. streamlit/static/static/js/{InputInstructions.CdzsN_Va.js → InputInstructions.C7VMyGT7.js} +1 -1
  88. streamlit/static/static/js/{Particles.12xFSjcn.js → Particles.BdQSRZde.js} +1 -1
  89. streamlit/static/static/js/{ProgressBar.Dg-oMbWg.js → ProgressBar.DNF_pWKr.js} +2 -2
  90. streamlit/static/static/js/{StreamlitSyntaxHighlighter.rbzmcipw.js → StreamlitSyntaxHighlighter.Cys9Bt18.js} +2 -2
  91. streamlit/static/static/js/{TableChart.esm.CzJtGIR-.js → TableChart.esm.B9SMgSK4.js} +1 -1
  92. streamlit/static/static/js/{Toolbar.COH7NaOE.js → Toolbar.BXfC9Z-W.js} +1 -1
  93. streamlit/static/static/js/{WidgetLabelHelpIconInline.Dlc8f0Ji.js → WidgetLabelHelpIconInline.gkreC55g.js} +1 -1
  94. streamlit/static/static/js/{base-input.Q-zJLgRK.js → base-input.iB32RS3w.js} +4 -4
  95. streamlit/static/static/js/{checkbox.BKgWNdeI.js → checkbox.Bqz68SYq.js} +1 -1
  96. streamlit/static/static/js/{createDownloadLinkElement.6oO-YlYv.js → createDownloadLinkElement.YxVC9Qur.js} +1 -1
  97. streamlit/static/static/js/data-grid-overlay-editor.sBsdk5Xg.js +1 -0
  98. streamlit/static/static/js/{downloader.BBXcXdX1.js → downloader.Bzxqt3AW.js} +1 -1
  99. streamlit/static/static/js/{embed.CJzOXYBF.js → embed.CDzakah3.js} +1 -1
  100. streamlit/static/static/js/{es6.CdxPQzwJ.js → es6.CxCc4bfn.js} +2 -2
  101. streamlit/static/static/js/formatNumber.L8T7D36k.js +1 -0
  102. streamlit/static/static/js/{iconPosition.BVScIr6G.js → iconPosition.C47DkA-1.js} +1 -1
  103. streamlit/static/static/js/{iframeResizer.contentWindow.D_QHVqPM.js → iframeResizer.contentWindow.uEFLXEg3.js} +1 -1
  104. streamlit/static/static/js/{index.CvtybR-u.js → index.B3zULhHv.js} +1 -1
  105. streamlit/static/static/js/{index.DAyGxxdm.js → index.B60AZFRh.js} +3 -3
  106. streamlit/static/static/js/{index.BED2_zc7.js → index.BG4RxMOI.js} +1 -1
  107. streamlit/static/static/js/{index.CPc_uZux.js → index.BHyzKS4e.js} +45 -45
  108. streamlit/static/static/js/{index.Dud7RRHc.js → index.BVTW_o-a.js} +1 -1
  109. streamlit/static/static/js/{index.BQnLeHnr.js → index.BV_YgIHe.js} +3 -3
  110. streamlit/static/static/js/index.B_LfkwqU.js +2 -0
  111. streamlit/static/static/js/{index.DCe7fo-m.js → index.Ba8L-ulI.js} +1 -1
  112. streamlit/static/static/js/{index.DAfIQKfP.js → index.Bh5BZaHG.js} +2 -2
  113. streamlit/static/static/js/{index.DU68jVpM.js → index.Bnwh8oZr.js} +16 -16
  114. streamlit/static/static/js/index.BrZtYm2A.js +2 -0
  115. streamlit/static/static/js/index.BsrhCS7f.js +1 -0
  116. streamlit/static/static/js/{index.CxoREvnF.js → index.BuJPJSD7.js} +2 -2
  117. streamlit/static/static/js/{index.6DFY6LUF.js → index.BvHsyiyy.js} +1 -1
  118. streamlit/static/static/js/{index.Biyf9aUg.js → index.BwTkGOAy.js} +2 -2
  119. streamlit/static/static/js/{index.DNfyKqhQ.js → index.BwvxzVOo.js} +1 -1
  120. streamlit/static/static/js/{index.iXh5nbLZ.js → index.BzdcdLDK.js} +1 -1
  121. streamlit/static/static/js/{index.YULCxEtm.js → index.C1d2QjTR.js} +1 -1
  122. streamlit/static/static/js/index.C1uZrWog.js +1 -0
  123. streamlit/static/static/js/{index.C5oqIM3a.js → index.C5-TpWis.js} +1 -1
  124. streamlit/static/static/js/{index.D6OexhdL.js → index.C6dhwBSe.js} +1 -1
  125. streamlit/static/static/js/{index.y-pa6LIX.js → index.CAbQaUvi.js} +1 -1
  126. streamlit/static/static/js/{index.BSpYHDvk.js → index.CAbafj7s.js} +1 -1
  127. streamlit/static/static/js/{index.BDtN2n7T.js → index.CCLteRW6.js} +1 -1
  128. streamlit/static/static/js/{index.mSdC1FV6.js → index.CQ713nQM.js} +1 -1
  129. streamlit/static/static/js/index.CcBYyLfq.js +2 -0
  130. streamlit/static/static/js/{index.CBE2cIbj.js → index.CjBDVb1a.js} +1 -1
  131. streamlit/static/static/js/{index.BxQxTpWl.js → index.Ck0ZkOfK.js} +1 -1
  132. streamlit/static/static/js/{index.B80gSxrS.js → index.CzwJzgQs.js} +1 -1
  133. streamlit/static/static/js/{index.DyfvmNCy.js → index.D-9VyyiA.js} +1 -1
  134. streamlit/static/static/js/{index.nL1fkE1D.js → index.D2R3Co5f.js} +1 -1
  135. streamlit/static/static/js/{index.DZmBuE3z.js → index.D7L9gHlE.js} +3 -3
  136. streamlit/static/static/js/{index.BqxwnMem.js → index.DEKnCsY-.js} +2 -2
  137. streamlit/static/static/js/{index.D9v2Y8Gk.js → index.DHrByikW.js} +1 -1
  138. streamlit/static/static/js/index.DN_oudQl.js +1 -0
  139. streamlit/static/static/js/{index.DrcbvB2t.js → index.DO55kRo5.js} +1 -1
  140. streamlit/static/static/js/{index.BqbKiDp2.js → index.D_cvtSlg.js} +1 -1
  141. streamlit/static/static/js/{index.CrY1BsL3.js → index.DgqmsDCJ.js} +1 -1
  142. streamlit/static/static/js/{index.BtOoVQt7.js → index.DjgdCvlK.js} +1 -1
  143. streamlit/static/static/js/{index.BxMkW82k.js → index.DqhZqWYB.js} +1 -1
  144. streamlit/static/static/js/{index.bQJYmJ2T.js → index.Dtbj_oyb.js} +1 -1
  145. streamlit/static/static/js/{index.CUYi3FrD.js → index.QXukCzoh.js} +1 -1
  146. streamlit/static/static/js/{index.BiCbrx53.js → index.XJY9qZ6a.js} +1 -1
  147. streamlit/static/static/js/{index.GieKl4BG.js → index.aZRhdEuX.js} +1 -1
  148. streamlit/static/static/js/{index._1zqETQ9.js → index.fUsWkW8E.js} +1 -1
  149. streamlit/static/static/js/index.h2N-W51I.js +11 -0
  150. streamlit/static/static/js/index.iUHLeAvv.js +1 -0
  151. streamlit/static/static/js/{index.DRoJNzFX.js → index.kBgXO7Vv.js} +1 -1
  152. streamlit/static/static/js/{index.BSYebegS.js → index.kEL0HsUR.js} +1 -1
  153. streamlit/static/static/js/index.w7yKy9fh.js +6 -0
  154. streamlit/static/static/js/{input.BcC6sPE_.js → input.BCHJn1Cw.js} +1 -1
  155. streamlit/static/static/js/{main.TU5_aabd.js → main.23ZP6f1E.js} +1 -1
  156. streamlit/static/static/js/{memory.By_OTlI4.js → memory.D8f8Q4mO.js} +1 -1
  157. streamlit/static/static/js/number-overlay-editor.ZWvSpjJ5.js +9 -0
  158. streamlit/static/static/js/{pandasStylerUtils.3IiIKU9-.js → pandasStylerUtils.DlZ2GBs_.js} +1 -1
  159. streamlit/static/static/js/{sandbox.DnxTbWzV.js → sandbox.BH6D3KL9.js} +1 -1
  160. streamlit/static/static/js/sprintfjs.CtrdaGLQ.js +1 -0
  161. streamlit/static/static/js/{styled-components.BeEcZ0vW.js → styled-components.iD1HRMLc.js} +1 -1
  162. streamlit/static/static/js/{throttle.emUyC44c.js → throttle.DR7d9vp_.js} +1 -1
  163. streamlit/static/static/js/{timepicker.DZ_ZufYF.js → timepicker.Bd34xjcG.js} +4 -4
  164. streamlit/static/static/js/{toConsumableArray.DDV1bN1-.js → toConsumableArray.BDTTq1c5.js} +2 -2
  165. streamlit/static/static/js/uniqueId.Bd_Iuzvc.js +1 -0
  166. streamlit/static/static/js/useBasicWidgetState.BXKaD8DQ.js +1 -0
  167. streamlit/static/static/js/{useIntlLocale.BBDLbTq9.js → useIntlLocale.CysOvegI.js} +1 -1
  168. streamlit/static/static/js/{useTextInputAutoExpand.BIApLJKn.js → useTextInputAutoExpand.CVd5Hf2S.js} +1 -1
  169. streamlit/static/static/js/{useUpdateUiValue.DQ4RuJNC.js → useUpdateUiValue.CIUgfO8X.js} +1 -1
  170. streamlit/static/static/js/{useWaveformController.B0olyXLQ.js → useWaveformController.CDLqlnLv.js} +1 -1
  171. streamlit/static/static/js/{withCalculatedWidth.DYeqePuh.js → withCalculatedWidth.Ce1Zblb2.js} +1 -1
  172. streamlit/static/static/js/{withFullScreenWrapper.DtkUCO_d.js → withFullScreenWrapper.DBm7N75M.js} +1 -1
  173. streamlit/static/static/media/MaterialSymbols-Rounded.CnH1S47a.woff2 +0 -0
  174. streamlit/testing/v1/app_test.py +21 -5
  175. streamlit/testing/v1/element_tree.py +65 -2
  176. streamlit/web/server/app_static_file_handler.py +9 -0
  177. streamlit/web/server/bidi_component_request_handler.py +4 -4
  178. streamlit/web/server/component_file_utils.py +14 -6
  179. streamlit/web/server/component_request_handler.py +2 -2
  180. streamlit/web/server/starlette/starlette_app.py +7 -1
  181. streamlit/web/server/starlette/starlette_path_security_middleware.py +97 -0
  182. streamlit/web/server/starlette/starlette_routes.py +6 -3
  183. streamlit/web/server/starlette/starlette_static_routes.py +14 -4
  184. {streamlit_nightly-1.53.2.dev20260131.dist-info → streamlit_nightly-1.53.2.dev20260203.dist-info}/METADATA +1 -1
  185. {streamlit_nightly-1.53.2.dev20260131.dist-info → streamlit_nightly-1.53.2.dev20260203.dist-info}/RECORD +188 -184
  186. streamlit/proto/BokehChart_pb2.pyi +0 -56
  187. streamlit/proto/LabelVisibilityMessage_pb2.py +0 -28
  188. streamlit/static/static/js/data-grid-overlay-editor.CO0xdNiG.js +0 -1
  189. streamlit/static/static/js/formatNumber.DB5irY8c.js +0 -1
  190. streamlit/static/static/js/index.BBTKOM0z.js +0 -6
  191. streamlit/static/static/js/index.CE2WIFD1.js +0 -2
  192. streamlit/static/static/js/index.Cpu2p5bH.js +0 -1
  193. streamlit/static/static/js/index.CtbETWQK.js +0 -2
  194. streamlit/static/static/js/index.DAnczAW2.js +0 -2
  195. streamlit/static/static/js/index.DhRAGiPR.js +0 -1
  196. streamlit/static/static/js/index.DyXcT2tD.js +0 -11
  197. streamlit/static/static/js/index.tuFFlbxa.js +0 -1
  198. streamlit/static/static/js/number-overlay-editor.FSRaRpbU.js +0 -9
  199. streamlit/static/static/js/sprintf.DpPCfzXw.js +0 -1
  200. streamlit/static/static/js/uniqueId.DTwvAE-J.js +0 -1
  201. streamlit/static/static/js/useBasicWidgetState.DvpdEDYZ.js +0 -1
  202. streamlit/static/static/media/MaterialSymbols-Rounded.C7IFxh57.woff2 +0 -0
  203. {streamlit_nightly-1.53.2.dev20260131.dist-info → streamlit_nightly-1.53.2.dev20260203.dist-info}/WHEEL +0 -0
  204. {streamlit_nightly-1.53.2.dev20260131.dist-info → streamlit_nightly-1.53.2.dev20260203.dist-info}/entry_points.txt +0 -0
  205. {streamlit_nightly-1.53.2.dev20260131.dist-info → streamlit_nightly-1.53.2.dev20260203.dist-info}/top_level.txt +0 -0
@@ -1 +1 @@
1
- import{z as T,r as i,R as b,a2 as L,j as p,V as N}from"./index.CPc_uZux.js";const R=T("iframe",{target:"e655cq30"})(({theme:r})=>({colorScheme:"normal",border:"none",padding:r.spacing.none,margin:r.spacing.none,width:"100%",aspectRatio:"16 / 9"})),U=N.getLogger("Video"),A={width:"100%"};function O({element:r,endpoints:s,elementMgr:f}){const n=i.useRef(null),{type:v,url:c,startTime:a,subtitles:l,endTime:o,loop:d,autoplay:m,muted:E}=r;let y=b(c);const S=i.useMemo(()=>{if(!r.id)return!0;const e=f.getElementState(r.id,"preventAutoplay");return e||f.setElementState(r.id,"preventAutoplay",!0),e??!1},[r.id,f]),g=i.useMemo(()=>JSON.stringify(l?l.map(e=>s.buildMediaURL(`${e.url}`)):[]),[l,s]);i.useEffect(()=>{const e=JSON.parse(g);e.length!==0&&e.forEach(t=>{s.checkSourceUrlResponse(t,"Video Subtitle")})},[g,s]),i.useEffect(()=>{n.current&&(n.current.currentTime=a)},[a]),i.useEffect(()=>{const e=n.current,t=()=>{e&&(e.currentTime=r.startTime)};return e&&e.addEventListener("loadedmetadata",t),()=>{e&&e.removeEventListener("loadedmetadata",t)}},[r]),i.useEffect(()=>{const e=n.current;if(!e)return;let t=!1;const u=()=>{o>0&&e.currentTime>=o&&(d?(e.currentTime=a||0,e.play()):t||(t=!0,e.pause()))};return o>0&&e.addEventListener("timeupdate",u),()=>{e&&o>0&&e.removeEventListener("timeupdate",u)}},[o,d,a]),i.useEffect(()=>{const e=n.current;if(!e)return;const t=()=>{d&&(e.currentTime=a||0,e.play())};return e.addEventListener("ended",t),()=>{e&&e.removeEventListener("ended",t)}},[d,a]);const V=e=>{const t=new URL(e);if(a&&!isNaN(a)&&t.searchParams.append("start",a.toString()),o&&!isNaN(o)&&t.searchParams.append("end",o.toString()),d){t.searchParams.append("loop","1");const u=t.pathname.split("/").pop();u&&t.searchParams.append("playlist",u)}return m&&t.searchParams.append("autoplay","1"),E&&t.searchParams.append("mute","1"),t.toString()};if(v===L.Type.YOUTUBE_IFRAME)return p(R,{className:"stVideo","data-testid":"stVideo",title:c,src:V(c),allow:"autoplay; encrypted-media",allowFullScreen:!0});const h=e=>{const t=e.currentTarget.src;U.error(`Client Error: Video source error - ${t}`),s.sendClientErrorToHost("Video","Video source failed to load","onerror triggered",t)};return p("video",{className:"stVideo","data-testid":"stVideo",ref:n,controls:!0,muted:E,autoPlay:m&&!S,src:s.buildMediaURL(c),style:A,crossOrigin:y,onError:h,children:l?.map((e,t)=>p("track",{kind:"captions",src:s.buildMediaURL(`${e.url}`),label:`${e.label}`,default:t===0,"data-testid":"stVideoSubtitle"},t))})}const $=i.memo(O);export{$ as default};
1
+ import{z as T,r as i,R as b,a2 as L,j as p,V as N}from"./index.BHyzKS4e.js";const R=T("iframe",{target:"e655cq30"})(({theme:r})=>({colorScheme:"normal",border:"none",padding:r.spacing.none,margin:r.spacing.none,width:"100%",aspectRatio:"16 / 9"})),U=N.getLogger("Video"),A={width:"100%"};function O({element:r,endpoints:s,elementMgr:f}){const n=i.useRef(null),{type:v,url:c,startTime:a,subtitles:l,endTime:o,loop:d,autoplay:m,muted:E}=r;let y=b(c);const S=i.useMemo(()=>{if(!r.id)return!0;const e=f.getElementState(r.id,"preventAutoplay");return e||f.setElementState(r.id,"preventAutoplay",!0),e??!1},[r.id,f]),g=i.useMemo(()=>JSON.stringify(l?l.map(e=>s.buildMediaURL(`${e.url}`)):[]),[l,s]);i.useEffect(()=>{const e=JSON.parse(g);e.length!==0&&e.forEach(t=>{s.checkSourceUrlResponse(t,"Video Subtitle")})},[g,s]),i.useEffect(()=>{n.current&&(n.current.currentTime=a)},[a]),i.useEffect(()=>{const e=n.current,t=()=>{e&&(e.currentTime=r.startTime)};return e&&e.addEventListener("loadedmetadata",t),()=>{e&&e.removeEventListener("loadedmetadata",t)}},[r]),i.useEffect(()=>{const e=n.current;if(!e)return;let t=!1;const u=()=>{o>0&&e.currentTime>=o&&(d?(e.currentTime=a||0,e.play()):t||(t=!0,e.pause()))};return o>0&&e.addEventListener("timeupdate",u),()=>{e&&o>0&&e.removeEventListener("timeupdate",u)}},[o,d,a]),i.useEffect(()=>{const e=n.current;if(!e)return;const t=()=>{d&&(e.currentTime=a||0,e.play())};return e.addEventListener("ended",t),()=>{e&&e.removeEventListener("ended",t)}},[d,a]);const V=e=>{const t=new URL(e);if(a&&!isNaN(a)&&t.searchParams.append("start",a.toString()),o&&!isNaN(o)&&t.searchParams.append("end",o.toString()),d){t.searchParams.append("loop","1");const u=t.pathname.split("/").pop();u&&t.searchParams.append("playlist",u)}return m&&t.searchParams.append("autoplay","1"),E&&t.searchParams.append("mute","1"),t.toString()};if(v===L.Type.YOUTUBE_IFRAME)return p(R,{className:"stVideo","data-testid":"stVideo",title:c,src:V(c),allow:"autoplay; encrypted-media",allowFullScreen:!0});const h=e=>{const t=e.currentTarget.src;U.error(`Client Error: Video source error - ${t}`),s.sendClientErrorToHost("Video","Video source failed to load","onerror triggered",t)};return p("video",{className:"stVideo","data-testid":"stVideo",ref:n,controls:!0,muted:E,autoPlay:m&&!S,src:s.buildMediaURL(c),style:A,crossOrigin:y,onError:h,children:l?.map((e,t)=>p("track",{kind:"captions",src:s.buildMediaURL(`${e.url}`),label:`${e.label}`,default:t===0,"data-testid":"stVideoSubtitle"},t))})}const $=i.memo(O);export{$ as default};
@@ -1,3 +1,3 @@
1
- import{am as _,an as ye,w as O,r as u,l as $e,o as ne,j as M,P as Oe,ac as Re,q as oe,aa as ie,bk as ae,p as _e,e as Se}from"./index.CPc_uZux.js";import{W as Pe}from"./WidgetLabelHelpIconInline.Dlc8f0Ji.js";import{u as we}from"./useBasicWidgetState.DvpdEDYZ.js";import"./FormClearHelper.DTFnX0js.js";var se={vertical:"vertical",horizontal:"horizontal"};function le(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function D(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?le(Object(n),!0).forEach(function(r){R(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):le(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function R(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var E=0,L=1,T=2;function z(e){return e.$isActive?T:e.$isHovered?L:E}function Me(e){var t=e.$theme.colors,n=e.$disabled,r=e.$checked,o=e.$isFocusVisible,i=e.$error;if(n)return t.tickFillDisabled;if(r)if(i)switch(z(e)){case E:return t.tickFillErrorSelected;case L:return t.tickFillErrorSelectedHover;case T:return t.tickFillErrorSelectedHoverActive}else switch(z(e)){case E:return t.tickFillSelected;case L:return t.tickFillSelectedHover;case T:return t.tickFillSelectedHoverActive}else return o?t.borderSelected:i?t.tickBorderError:t.tickBorder;return null}function ke(e){var t=e.$theme.colors;if(e.$disabled)return t.tickMarkFillDisabled;if(e.$checked)return t.tickMarkFill;if(e.$error)switch(z(e)){case E:return t.tickFillError;case L:return t.tickFillErrorHover;case T:return t.tickFillErrorHoverActive}else switch(z(e)){case E:return t.tickFill;case L:return t.tickFillHover;case T:return t.tickFillActive}}function Fe(e){var t=e.$labelPlacement,n=t===void 0?"":t,r=e.$theme,o;switch(n){case"top":o="Bottom";break;case"bottom":o="Top";break;case"left":o=r.direction==="rtl"?"Left":"Right";break;default:case"right":o=r.direction==="rtl"?"Right":"Left";break}var i=r.sizing,s=i.scale300;return R({},"padding".concat(o),s)}function Ie(e){var t=e.$disabled,n=e.$theme,r=n.colors;return t?r.contentSecondary:r.contentPrimary}var q=_("div",function(e){var t=e.$disabled,n=e.$align;return{display:"flex",flexWrap:"wrap",flexDirection:n==="horizontal"?"row":"column",alignItems:n==="horizontal"?"center":"flex-start",cursor:t?"not-allowed":"pointer","-webkit-tap-highlight-color":"transparent"}});q.displayName="RadioGroupRoot";q.displayName="RadioGroupRoot";var X=_("label",function(e){var t,n=e.$disabled,r=e.$hasDescription,o=e.$labelPlacement,i=e.$theme,s=e.$align,a=i.sizing,c=s==="horizontal",p=i.direction==="rtl"?"Left":"Right";return t={flexDirection:o==="top"||o==="bottom"?"column":"row",display:"flex",alignItems:"center",cursor:n?"not-allowed":"pointer",marginTop:a.scale200},R(t,"margin".concat(p),c?a.scale200:null),R(t,"marginBottom",r&&!c?null:a.scale200),t});X.displayName="Root";X.displayName="Root";var K=_("div",function(e){var t=e.$theme,n=t.animation,r=t.sizing;return{backgroundColor:ke(e),borderTopLeftRadius:"50%",borderTopRightRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",height:e.$checked?r.scale200:r.scale550,transitionDuration:n.timing200,transitionTimingFunction:n.easeOutCurve,width:e.$checked?r.scale200:r.scale550}});K.displayName="RadioMarkInner";K.displayName="RadioMarkInner";var J=_("div",function(e){var t=e.$theme,n=t.animation,r=t.sizing;return{alignItems:"center",backgroundColor:Me(e),borderTopLeftRadius:"50%",borderTopRightRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",boxShadow:e.$isFocusVisible&&e.$checked?"0 0 0 3px ".concat(e.$theme.colors.accent):"none",display:"flex",height:r.scale700,justifyContent:"center",marginTop:r.scale0,marginRight:r.scale0,marginBottom:r.scale0,marginLeft:r.scale0,outline:"none",verticalAlign:"middle",width:r.scale700,flexShrink:0,transitionDuration:n.timing200,transitionTimingFunction:n.easeOutCurve}});J.displayName="RadioMarkOuter";J.displayName="RadioMarkOuter";var Q=_("div",function(e){var t=e.$theme.typography;return D(D({verticalAlign:"middle"},Fe(e)),{},{color:Ie(e)},t.LabelMedium)});Q.displayName="Label";Q.displayName="Label";var Y=_("input",{width:0,height:0,marginTop:0,marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,clip:"rect(0 0 0 0)",position:"absolute"});Y.displayName="Input";Y.displayName="Input";var Z=_("div",function(e){var t,n=e.$theme,r=e.$align,o=r==="horizontal",i=n.direction==="rtl"?"Right":"Left",s=n.direction==="rtl"?"Left":"Right";return D(D({},n.typography.ParagraphSmall),{},(t={color:n.colors.contentSecondary,cursor:"auto"},R(t,"margin".concat(i),r==="horizontal"?null:n.sizing.scale900),R(t,"margin".concat(s),o?n.sizing.scale200:null),R(t,"maxWidth","240px"),t))});Z.displayName="Description";Z.displayName="Description";function N(e){"@babel/helpers - typeof";return N=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},N(e)}function V(){return V=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},V.apply(this,arguments)}function Ee(e,t){return Ae(e)||xe(e,t)||Te(e,t)||Le()}function Le(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Te(e,t){if(e){if(typeof e=="string")return ue(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ue(e,t)}}function ue(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function xe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(c){i=!0,a=c}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function Ae(e){if(Array.isArray(e))return e}function je(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function De(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ze(e,t,n){return t&&De(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Be(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&U(e,t)}function U(e,t){return U=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},U(e,t)}function Ce(e){var t=Ne();return function(){var r=B(e),o;if(t){var i=B(this).constructor;o=Reflect.construct(r,arguments,i)}else o=r.apply(this,arguments);return He(this,o)}}function He(e,t){if(t&&(N(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return A(e)}function A(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ne(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function B(e){return B=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},B(e)}function j(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var pe=(function(e){Be(n,e);var t=Ce(n);function n(){var r;je(this,n);for(var o=arguments.length,i=new Array(o),s=0;s<o;s++)i[s]=arguments[s];return r=t.call.apply(t,[this].concat(i)),j(A(r),"state",{isFocusVisible:!1,focusedRadioIndex:-1}),j(A(r),"handleFocus",function(a,c){ye(a)&&r.setState({isFocusVisible:!0}),r.setState({focusedRadioIndex:c}),r.props.onFocus&&r.props.onFocus(a)}),j(A(r),"handleBlur",function(a,c){r.state.isFocusVisible!==!1&&r.setState({isFocusVisible:!1}),r.setState({focusedRadioIndex:-1}),r.props.onBlur&&r.props.onBlur(a)}),r}return ze(n,[{key:"render",value:function(){var o=this,i=this.props.overrides,s=i===void 0?{}:i,a=O(s.RadioGroupRoot,q),c=Ee(a,2),p=c[0],m=c[1];return u.createElement(p,V({id:this.props.id,role:"radiogroup","aria-describedby":this.props["aria-describedby"],"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props.error||null,"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],$align:this.props.align,$disabled:this.props.disabled,$error:this.props.error,$required:this.props.required},m),u.Children.map(this.props.children,function(f,l){if(!u.isValidElement(f))return null;var d=o.props.value===f.props.value;return u.cloneElement(f,{align:o.props.align,autoFocus:o.props.autoFocus,checked:d,disabled:o.props.disabled||f.props.disabled,error:o.props.error,isFocused:o.state.focusedRadioIndex===l,isFocusVisible:o.state.isFocusVisible,tabIndex:l===0&&!o.props.value||d?"0":"-1",labelPlacement:o.props.labelPlacement,name:o.props.name,onBlur:function(g){return o.handleBlur(g,l)},onFocus:function(g){return o.handleFocus(g,l)},onChange:o.props.onChange,onMouseEnter:o.props.onMouseEnter,onMouseLeave:o.props.onMouseLeave})}))}}]),n})(u.Component);j(pe,"defaultProps",{name:"",value:"",disabled:!1,autoFocus:!1,labelPlacement:"right",align:"vertical",error:!1,required:!1,onChange:function(){},onMouseEnter:function(){},onMouseLeave:function(){},onFocus:function(){},onBlur:function(){},overrides:{}});function G(e){"@babel/helpers - typeof";return G=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},G(e)}function $(){return $=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$.apply(this,arguments)}function w(e,t){return We(e)||Ge(e,t)||Ue(e,t)||Ve()}function Ve(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ue(e,t){if(e){if(typeof e=="string")return ce(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ce(e,t)}}function ce(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ge(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(c){i=!0,a=c}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function We(e){if(Array.isArray(e))return e}function qe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ke(e,t,n){return t&&Xe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Je(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&W(e,t)}function W(e,t){return W=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},W(e,t)}function Qe(e){var t=Ze();return function(){var r=C(e),o;if(t){var i=C(this).constructor;o=Reflect.construct(r,arguments,i)}else o=r.apply(this,arguments);return Ye(this,o)}}function Ye(e,t){if(t&&(G(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return k(e)}function k(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ze(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function C(e){return C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},C(e)}function F(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function et(e){return e==="top"||e==="left"}function tt(e){return e==="bottom"||e==="right"}var rt=function(t){return t.stopPropagation()},fe=(function(e){Je(n,e);var t=Qe(n);function n(){var r;qe(this,n);for(var o=arguments.length,i=new Array(o),s=0;s<o;s++)i[s]=arguments[s];return r=t.call.apply(t,[this].concat(i)),F(k(r),"state",{isActive:!1,isHovered:!1}),F(k(r),"onMouseEnter",function(a){r.setState({isHovered:!0}),r.props.onMouseEnter&&r.props.onMouseEnter(a)}),F(k(r),"onMouseLeave",function(a){r.setState({isHovered:!1}),r.props.onMouseLeave&&r.props.onMouseLeave(a)}),F(k(r),"onMouseDown",function(a){r.setState({isActive:!0}),r.props.onMouseDown&&r.props.onMouseDown(a)}),F(k(r),"onMouseUp",function(a){r.setState({isActive:!1}),r.props.onMouseUp&&r.props.onMouseUp(a)}),r}return Ke(n,[{key:"componentDidMount",value:function(){var o;this.props.autoFocus&&(o=this.props.inputRef)!==null&&o!==void 0&&o.current&&this.props.inputRef.current.focus()}},{key:"render",value:function(){var o=this.props.overrides,i=o===void 0?{}:o,s=O(i.Root,X),a=w(s,2),c=a[0],p=a[1],m=O(i.Label,Q),f=w(m,2),l=f[0],d=f[1],h=O(i.Input,Y),g=w(h,2),S=g[0],H=g[1],x=O(i.Description,Z),I=w(x,2),v=I[0],b=I[1],y=O(i.RadioMarkInner,K),ee=w(y,2),de=ee[0],he=ee[1],ge=O(i.RadioMarkOuter,J),te=w(ge,2),be=te[0],me=te[1],P={$align:this.props.align,$checked:this.props.checked,$disabled:this.props.disabled,$hasDescription:!!this.props.description,$isActive:this.state.isActive,$error:this.props.error,$isFocused:this.props.isFocused,$isFocusVisible:this.props.isFocused&&this.props.isFocusVisible,$isHovered:this.state.isHovered,$labelPlacement:this.props.labelPlacement,$required:this.props.required,$value:this.props.value},re=u.createElement(l,$({},P,d),this.props.containsInteractiveElement?u.createElement("div",{onClick:function(ve){return ve.preventDefault()}},this.props.children):this.props.children);return u.createElement(u.Fragment,null,u.createElement(c,$({"data-baseweb":"radio",onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp},P,p),et(this.props.labelPlacement)&&re,u.createElement(be,$({},P,me),u.createElement(de,$({},P,he))),u.createElement(S,$({"aria-invalid":this.props.error||null,checked:this.props.checked,disabled:this.props.disabled,name:this.props.name,onBlur:this.props.onBlur,onFocus:this.props.onFocus,onClick:rt,onChange:this.props.onChange,ref:this.props.inputRef,required:this.props.required,tabIndex:this.props.tabIndex,type:"radio",value:this.props.value},P,H)),tt(this.props.labelPlacement)&&re),!!this.props.description&&u.createElement(v,$({},P,b),this.props.description))}}]),n})(u.Component);F(fe,"defaultProps",{overrides:{},containsInteractiveElement:!1,checked:!1,disabled:!1,autoFocus:!1,inputRef:u.createRef(),align:"vertical",error:!1,onChange:function(){},onMouseEnter:function(){},onMouseLeave:function(){},onMouseDown:function(){},onMouseUp:function(){},onFocus:function(){},onBlur:function(){}});function nt(e){const t=parseFloat(e.sizes.checkbox),n=parseFloat(e.spacing.threeXS),r=ie(t.toString()),o=Math.round(r*.375);let i=Math.round(ie((t-n).toString()));return i>=r&&(i-=1),[ae(o,"px"),ae(i,"px")]}function ot({disabled:e,horizontal:t,value:n,onChange:r,options:o,captions:i,label:s,labelVisibility:a,help:c}){const[p,m]=u.useState(n??null);u.useEffect(()=>{n!==p&&m(n??null)},[n]);const f=u.useCallback(v=>{const b=parseInt(v.target.value,10);m(b),r(b)},[r]),l=$e(),d=i.length>0,h=o.length>0,g=h?o:["No options to select."],S=e||!h,H=v=>v==""&&t&&d?"&nbsp;":v,[x,I]=nt(l);return ne("div",{className:"stRadio","data-testid":"stRadio",children:[M(Re,{label:s,disabled:S,labelVisibility:a,children:c&&M(Pe,{content:c,placement:Oe.TOP_RIGHT,label:s})}),M(pe,{onChange:f,value:p!==null?p.toString():void 0,disabled:S,align:t?se.horizontal:se.vertical,"aria-label":s,"data-testid":"stRadioGroup",overrides:{RadioGroupRoot:{style:{gap:d?l.spacing.sm:l.spacing.none,minHeight:l.sizes.minElementHeight}}},children:g.map((v,b)=>ne(fe,{value:b.toString(),overrides:{Root:{style:({$isFocusVisible:y})=>({marginBottom:l.spacing.none,marginTop:l.spacing.none,marginRight:d?l.spacing.sm:l.spacing.lg,paddingLeft:l.spacing.none,alignItems:"start",paddingRight:l.spacing.threeXS,backgroundColor:y?l.colors.darkenedBgMix25:""})},RadioMarkOuter:{style:({$checked:y})=>({width:l.sizes.checkbox,height:l.sizes.checkbox,marginTop:"0.35rem",marginRight:l.spacing.none,marginLeft:l.spacing.none,backgroundColor:y&&!S?l.colors.primary:l.colors.borderColor})},RadioMarkInner:{style:({$checked:y})=>({height:y?x:I,width:y?x:I})},Label:{style:{color:S?l.colors.fadedText40:l.colors.bodyText,position:"relative",top:l.spacing.px}}},children:[M(oe,{source:v,allowHTML:!1,isLabel:!0,largerLabel:!0}),d&&M(oe,{source:H(i[b]),allowHTML:!1,isCaption:!0,isLabel:!0})]},b))})]})}const it=u.memo(ot);function at({disabled:e,element:t,widgetMgr:n,fragmentId:r}){const[o,i]=we({getStateFromWidgetMgr:st,getDefaultStateFromProto:lt,getCurrStateFromProto:ut,updateWidgetMgrState:ct,element:t,widgetMgr:n,fragmentId:r}),{horizontal:s,options:a,captions:c,label:p,labelVisibility:m,help:f}=t,l=u.useCallback(h=>{const g=a[h]??null;i({value:g,fromUi:!0})},[i,a]),d=u.useMemo(()=>{if(o===null)return null;const h=a.indexOf(o);return h>=0?h:null},[o,a]);return M(it,{label:p,onChange:l,options:a,captions:c,disabled:e,horizontal:s,labelVisibility:_e(m?.value),value:d,help:f})}function st(e,t){return e.getStringValue(t)}function lt(e){return e.options.length===0||Se(e.default)?null:e.options[e.default]}function ut(e){return e.rawValue??null}function ct(e,t,n,r){t.setStringValue(e,n.value,{fromUi:n.fromUi},r)}const bt=u.memo(at);export{bt as default};
1
+ import{ao as _,ap as ye,w as O,r as u,l as $e,o as ne,j as M,P as Oe,ae as Re,q as oe,ac as ie,bs as ae,p as _e,e as Se}from"./index.BHyzKS4e.js";import{W as Pe}from"./WidgetLabelHelpIconInline.gkreC55g.js";import{u as we}from"./useBasicWidgetState.BXKaD8DQ.js";import"./FormClearHelper.DQoXcOWo.js";var se={vertical:"vertical",horizontal:"horizontal"};function le(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function D(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?le(Object(n),!0).forEach(function(r){R(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):le(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function R(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var E=0,L=1,T=2;function z(e){return e.$isActive?T:e.$isHovered?L:E}function Me(e){var t=e.$theme.colors,n=e.$disabled,r=e.$checked,o=e.$isFocusVisible,i=e.$error;if(n)return t.tickFillDisabled;if(r)if(i)switch(z(e)){case E:return t.tickFillErrorSelected;case L:return t.tickFillErrorSelectedHover;case T:return t.tickFillErrorSelectedHoverActive}else switch(z(e)){case E:return t.tickFillSelected;case L:return t.tickFillSelectedHover;case T:return t.tickFillSelectedHoverActive}else return o?t.borderSelected:i?t.tickBorderError:t.tickBorder;return null}function ke(e){var t=e.$theme.colors;if(e.$disabled)return t.tickMarkFillDisabled;if(e.$checked)return t.tickMarkFill;if(e.$error)switch(z(e)){case E:return t.tickFillError;case L:return t.tickFillErrorHover;case T:return t.tickFillErrorHoverActive}else switch(z(e)){case E:return t.tickFill;case L:return t.tickFillHover;case T:return t.tickFillActive}}function Fe(e){var t=e.$labelPlacement,n=t===void 0?"":t,r=e.$theme,o;switch(n){case"top":o="Bottom";break;case"bottom":o="Top";break;case"left":o=r.direction==="rtl"?"Left":"Right";break;default:case"right":o=r.direction==="rtl"?"Right":"Left";break}var i=r.sizing,s=i.scale300;return R({},"padding".concat(o),s)}function Ie(e){var t=e.$disabled,n=e.$theme,r=n.colors;return t?r.contentSecondary:r.contentPrimary}var q=_("div",function(e){var t=e.$disabled,n=e.$align;return{display:"flex",flexWrap:"wrap",flexDirection:n==="horizontal"?"row":"column",alignItems:n==="horizontal"?"center":"flex-start",cursor:t?"not-allowed":"pointer","-webkit-tap-highlight-color":"transparent"}});q.displayName="RadioGroupRoot";q.displayName="RadioGroupRoot";var X=_("label",function(e){var t,n=e.$disabled,r=e.$hasDescription,o=e.$labelPlacement,i=e.$theme,s=e.$align,a=i.sizing,c=s==="horizontal",p=i.direction==="rtl"?"Left":"Right";return t={flexDirection:o==="top"||o==="bottom"?"column":"row",display:"flex",alignItems:"center",cursor:n?"not-allowed":"pointer",marginTop:a.scale200},R(t,"margin".concat(p),c?a.scale200:null),R(t,"marginBottom",r&&!c?null:a.scale200),t});X.displayName="Root";X.displayName="Root";var K=_("div",function(e){var t=e.$theme,n=t.animation,r=t.sizing;return{backgroundColor:ke(e),borderTopLeftRadius:"50%",borderTopRightRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",height:e.$checked?r.scale200:r.scale550,transitionDuration:n.timing200,transitionTimingFunction:n.easeOutCurve,width:e.$checked?r.scale200:r.scale550}});K.displayName="RadioMarkInner";K.displayName="RadioMarkInner";var J=_("div",function(e){var t=e.$theme,n=t.animation,r=t.sizing;return{alignItems:"center",backgroundColor:Me(e),borderTopLeftRadius:"50%",borderTopRightRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",boxShadow:e.$isFocusVisible&&e.$checked?"0 0 0 3px ".concat(e.$theme.colors.accent):"none",display:"flex",height:r.scale700,justifyContent:"center",marginTop:r.scale0,marginRight:r.scale0,marginBottom:r.scale0,marginLeft:r.scale0,outline:"none",verticalAlign:"middle",width:r.scale700,flexShrink:0,transitionDuration:n.timing200,transitionTimingFunction:n.easeOutCurve}});J.displayName="RadioMarkOuter";J.displayName="RadioMarkOuter";var Q=_("div",function(e){var t=e.$theme.typography;return D(D({verticalAlign:"middle"},Fe(e)),{},{color:Ie(e)},t.LabelMedium)});Q.displayName="Label";Q.displayName="Label";var Y=_("input",{width:0,height:0,marginTop:0,marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,clip:"rect(0 0 0 0)",position:"absolute"});Y.displayName="Input";Y.displayName="Input";var Z=_("div",function(e){var t,n=e.$theme,r=e.$align,o=r==="horizontal",i=n.direction==="rtl"?"Right":"Left",s=n.direction==="rtl"?"Left":"Right";return D(D({},n.typography.ParagraphSmall),{},(t={color:n.colors.contentSecondary,cursor:"auto"},R(t,"margin".concat(i),r==="horizontal"?null:n.sizing.scale900),R(t,"margin".concat(s),o?n.sizing.scale200:null),R(t,"maxWidth","240px"),t))});Z.displayName="Description";Z.displayName="Description";function N(e){"@babel/helpers - typeof";return N=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},N(e)}function V(){return V=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},V.apply(this,arguments)}function Ee(e,t){return Ae(e)||xe(e,t)||Te(e,t)||Le()}function Le(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Te(e,t){if(e){if(typeof e=="string")return ue(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ue(e,t)}}function ue(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function xe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(c){i=!0,a=c}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function Ae(e){if(Array.isArray(e))return e}function je(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function De(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ze(e,t,n){return t&&De(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Be(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&U(e,t)}function U(e,t){return U=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},U(e,t)}function Ce(e){var t=Ne();return function(){var r=B(e),o;if(t){var i=B(this).constructor;o=Reflect.construct(r,arguments,i)}else o=r.apply(this,arguments);return He(this,o)}}function He(e,t){if(t&&(N(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return A(e)}function A(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ne(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function B(e){return B=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},B(e)}function j(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var pe=(function(e){Be(n,e);var t=Ce(n);function n(){var r;je(this,n);for(var o=arguments.length,i=new Array(o),s=0;s<o;s++)i[s]=arguments[s];return r=t.call.apply(t,[this].concat(i)),j(A(r),"state",{isFocusVisible:!1,focusedRadioIndex:-1}),j(A(r),"handleFocus",function(a,c){ye(a)&&r.setState({isFocusVisible:!0}),r.setState({focusedRadioIndex:c}),r.props.onFocus&&r.props.onFocus(a)}),j(A(r),"handleBlur",function(a,c){r.state.isFocusVisible!==!1&&r.setState({isFocusVisible:!1}),r.setState({focusedRadioIndex:-1}),r.props.onBlur&&r.props.onBlur(a)}),r}return ze(n,[{key:"render",value:function(){var o=this,i=this.props.overrides,s=i===void 0?{}:i,a=O(s.RadioGroupRoot,q),c=Ee(a,2),p=c[0],v=c[1];return u.createElement(p,V({id:this.props.id,role:"radiogroup","aria-describedby":this.props["aria-describedby"],"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props.error||null,"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],$align:this.props.align,$disabled:this.props.disabled,$error:this.props.error,$required:this.props.required},v),u.Children.map(this.props.children,function(f,l){if(!u.isValidElement(f))return null;var d=o.props.value===f.props.value;return u.cloneElement(f,{align:o.props.align,autoFocus:o.props.autoFocus,checked:d,disabled:o.props.disabled||f.props.disabled,error:o.props.error,isFocused:o.state.focusedRadioIndex===l,isFocusVisible:o.state.isFocusVisible,tabIndex:l===0&&!o.props.value||d?"0":"-1",labelPlacement:o.props.labelPlacement,name:o.props.name,onBlur:function(g){return o.handleBlur(g,l)},onFocus:function(g){return o.handleFocus(g,l)},onChange:o.props.onChange,onMouseEnter:o.props.onMouseEnter,onMouseLeave:o.props.onMouseLeave})}))}}]),n})(u.Component);j(pe,"defaultProps",{name:"",value:"",disabled:!1,autoFocus:!1,labelPlacement:"right",align:"vertical",error:!1,required:!1,onChange:function(){},onMouseEnter:function(){},onMouseLeave:function(){},onFocus:function(){},onBlur:function(){},overrides:{}});function G(e){"@babel/helpers - typeof";return G=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},G(e)}function $(){return $=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$.apply(this,arguments)}function w(e,t){return We(e)||Ge(e,t)||Ue(e,t)||Ve()}function Ve(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ue(e,t){if(e){if(typeof e=="string")return ce(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ce(e,t)}}function ce(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ge(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(c){i=!0,a=c}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function We(e){if(Array.isArray(e))return e}function qe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ke(e,t,n){return t&&Xe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Je(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&W(e,t)}function W(e,t){return W=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},W(e,t)}function Qe(e){var t=Ze();return function(){var r=C(e),o;if(t){var i=C(this).constructor;o=Reflect.construct(r,arguments,i)}else o=r.apply(this,arguments);return Ye(this,o)}}function Ye(e,t){if(t&&(G(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return k(e)}function k(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ze(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function C(e){return C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},C(e)}function F(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function et(e){return e==="top"||e==="left"}function tt(e){return e==="bottom"||e==="right"}var rt=function(t){return t.stopPropagation()},fe=(function(e){Je(n,e);var t=Qe(n);function n(){var r;qe(this,n);for(var o=arguments.length,i=new Array(o),s=0;s<o;s++)i[s]=arguments[s];return r=t.call.apply(t,[this].concat(i)),F(k(r),"state",{isActive:!1,isHovered:!1}),F(k(r),"onMouseEnter",function(a){r.setState({isHovered:!0}),r.props.onMouseEnter&&r.props.onMouseEnter(a)}),F(k(r),"onMouseLeave",function(a){r.setState({isHovered:!1}),r.props.onMouseLeave&&r.props.onMouseLeave(a)}),F(k(r),"onMouseDown",function(a){r.setState({isActive:!0}),r.props.onMouseDown&&r.props.onMouseDown(a)}),F(k(r),"onMouseUp",function(a){r.setState({isActive:!1}),r.props.onMouseUp&&r.props.onMouseUp(a)}),r}return Ke(n,[{key:"componentDidMount",value:function(){var o;this.props.autoFocus&&(o=this.props.inputRef)!==null&&o!==void 0&&o.current&&this.props.inputRef.current.focus()}},{key:"render",value:function(){var o=this.props.overrides,i=o===void 0?{}:o,s=O(i.Root,X),a=w(s,2),c=a[0],p=a[1],v=O(i.Label,Q),f=w(v,2),l=f[0],d=f[1],h=O(i.Input,Y),g=w(h,2),S=g[0],H=g[1],x=O(i.Description,Z),I=w(x,2),m=I[0],b=I[1],y=O(i.RadioMarkInner,K),ee=w(y,2),de=ee[0],he=ee[1],ge=O(i.RadioMarkOuter,J),te=w(ge,2),be=te[0],ve=te[1],P={$align:this.props.align,$checked:this.props.checked,$disabled:this.props.disabled,$hasDescription:!!this.props.description,$isActive:this.state.isActive,$error:this.props.error,$isFocused:this.props.isFocused,$isFocusVisible:this.props.isFocused&&this.props.isFocusVisible,$isHovered:this.state.isHovered,$labelPlacement:this.props.labelPlacement,$required:this.props.required,$value:this.props.value},re=u.createElement(l,$({},P,d),this.props.containsInteractiveElement?u.createElement("div",{onClick:function(me){return me.preventDefault()}},this.props.children):this.props.children);return u.createElement(u.Fragment,null,u.createElement(c,$({"data-baseweb":"radio",onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp},P,p),et(this.props.labelPlacement)&&re,u.createElement(be,$({},P,ve),u.createElement(de,$({},P,he))),u.createElement(S,$({"aria-invalid":this.props.error||null,checked:this.props.checked,disabled:this.props.disabled,name:this.props.name,onBlur:this.props.onBlur,onFocus:this.props.onFocus,onClick:rt,onChange:this.props.onChange,ref:this.props.inputRef,required:this.props.required,tabIndex:this.props.tabIndex,type:"radio",value:this.props.value},P,H)),tt(this.props.labelPlacement)&&re),!!this.props.description&&u.createElement(m,$({},P,b),this.props.description))}}]),n})(u.Component);F(fe,"defaultProps",{overrides:{},containsInteractiveElement:!1,checked:!1,disabled:!1,autoFocus:!1,inputRef:u.createRef(),align:"vertical",error:!1,onChange:function(){},onMouseEnter:function(){},onMouseLeave:function(){},onMouseDown:function(){},onMouseUp:function(){},onFocus:function(){},onBlur:function(){}});function nt(e){const t=parseFloat(e.sizes.checkbox),n=parseFloat(e.spacing.threeXS),r=ie(t.toString()),o=Math.round(r*.375);let i=Math.round(ie((t-n).toString()));return i>=r&&(i-=1),[ae(o,"px"),ae(i,"px")]}function ot({disabled:e,horizontal:t,value:n,onChange:r,options:o,captions:i,label:s,labelVisibility:a,help:c}){const[p,v]=u.useState(n??null);u.useEffect(()=>{n!==p&&v(n??null)},[n]);const f=u.useCallback(m=>{const b=parseInt(m.target.value,10);v(b),r(b)},[r]),l=$e(),d=i.length>0,h=o.length>0,g=h?o:["No options to select."],S=e||!h,H=m=>m==""&&t&&d?"&nbsp;":m,[x,I]=nt(l);return ne("div",{className:"stRadio","data-testid":"stRadio",children:[M(Re,{label:s,disabled:S,labelVisibility:a,children:c&&M(Pe,{content:c,placement:Oe.TOP_RIGHT,label:s})}),M(pe,{onChange:f,value:p!==null?p.toString():void 0,disabled:S,align:t?se.horizontal:se.vertical,"aria-label":s,"data-testid":"stRadioGroup",overrides:{RadioGroupRoot:{style:{gap:d?l.spacing.sm:l.spacing.none,minHeight:l.sizes.minElementHeight}}},children:g.map((m,b)=>ne(fe,{value:b.toString(),overrides:{Root:{style:({$isFocusVisible:y})=>({marginBottom:l.spacing.none,marginTop:l.spacing.none,marginRight:d?l.spacing.sm:l.spacing.lg,paddingLeft:l.spacing.none,alignItems:"start",paddingRight:l.spacing.threeXS,backgroundColor:y?l.colors.darkenedBgMix25:""})},RadioMarkOuter:{style:({$checked:y})=>({width:l.sizes.checkbox,height:l.sizes.checkbox,marginTop:"0.35rem",marginRight:l.spacing.none,marginLeft:l.spacing.none,backgroundColor:y&&!S?l.colors.primary:l.colors.borderColor})},RadioMarkInner:{style:({$checked:y})=>({height:y?x:I,width:y?x:I})},Label:{style:{color:S?l.colors.fadedText40:l.colors.bodyText,position:"relative",top:l.spacing.px}}},children:[M(oe,{source:m,allowHTML:!1,isLabel:!0,largerLabel:!0}),d&&M(oe,{source:H(i[b]),allowHTML:!1,isCaption:!0,isLabel:!0})]},b))})]})}const it=u.memo(ot);function at({disabled:e,element:t,widgetMgr:n,fragmentId:r}){const[o,i]=we({getStateFromWidgetMgr:st,getDefaultStateFromProto:lt,getCurrStateFromProto:ut,updateWidgetMgrState:ct,element:t,widgetMgr:n,fragmentId:r}),{horizontal:s,options:a,captions:c,label:p,labelVisibility:v,help:f}=t,l=u.useCallback(h=>{const g=a[h]??null;i({value:g,fromUi:!0})},[i,a]),d=u.useMemo(()=>{if(o===null)return null;const h=a.indexOf(o);return h>=0?h:null},[o,a]);return M(it,{label:p,onChange:l,options:a,captions:c,disabled:e,horizontal:s,labelVisibility:_e(v?.value),value:d,help:f})}function st(e,t){return e.getStringValue(t)}function lt(e){return e.options.length===0||Se(e.default)?null:e.options[e.default]}function ut(e){return e.rawValue??null}function ct(e,t,n,r){t.setStringValue(e,n.value,{fromUi:n.fromUi},r)}const bt=u.memo(at);export{bt as default};
@@ -0,0 +1,2 @@
1
+ import{an as Ge,ao as Q,r as _,bV as mt,ap as bt,w as J,bq as yt,br as Tt,z as se,l as kt,bW as Ot,bX as wt,bY as Rt,j as Z,q as De,o as xe,p as St,ad as Mt,ae as $t,bZ as oe}from"./index.BHyzKS4e.js";import{h as _t}from"./moment.C7qA8nIE.js";import{w as Et}from"./withCalculatedWidth.Ce1Zblb2.js";import{u as It}from"./useBasicWidgetState.BXKaD8DQ.js";import{f as Dt}from"./formatMoment.C6Hwn6X5.js";import{f as xt}from"./formatNumber.L8T7D36k.js";import"./FormClearHelper.DQoXcOWo.js";import"./numbro.B9_PXfzp.js";import"./sprintfjs.CtrdaGLQ.js";var ce={},H={},le={},de={},He;function Ce(){if(He)return de;He=1,Object.defineProperty(de,"__esModule",{value:!0}),de.Direction=void 0;var e;return(function(r){r.Right="to right",r.Left="to left",r.Down="to bottom",r.Up="to top"})(e||(de.Direction=e={})),de}var We;function Je(){return We||(We=1,(function(e){var r=le&&le.__spreadArray||function(i,s,u){if(u||arguments.length===2)for(var p=0,m=s.length,v;p<m;p++)(v||!(p in s))&&(v||(v=Array.prototype.slice.call(s,0,p)),v[p]=s[p]);return i.concat(v||Array.prototype.slice.call(s))};Object.defineProperty(e,"__esModule",{value:!0}),e.isIOS=e.useThumbOverlap=e.assertUnreachable=e.voidFn=e.getTrackBackground=e.replaceAt=e.schd=e.translate=e.getClosestThumbIndex=e.translateThumbs=e.getPaddingAndBorder=e.getMargin=e.checkInitialOverlap=e.checkValuesAgainstBoundaries=e.checkBoundaries=e.isVertical=e.relativeValue=e.normalizeValue=e.isStepDivisible=e.isTouchEvent=e.getStepDecimals=void 0;var n=Ge(),o=Ce(),h=function(i){var s=i.toString().split(".")[1];return s?s.length:0};e.getStepDecimals=h;function O(i){return i.touches&&i.touches.length||i.changedTouches&&i.changedTouches.length}e.isTouchEvent=O;function l(i,s,u){var p=(s-i)/u,m=8,v=Number(p.toFixed(m));return parseInt(v.toString(),10)===v}e.isStepDivisible=l;function g(i,s,u,p,m,v,b){var $=1e11;if(i=Math.round(i*$)/$,!v){var C=b[s-1],E=b[s+1];if(C&&C>i)return C;if(E&&E<i)return E}if(i>p)return p;if(i<u)return u;var U=Math.floor(i*$-u*$)%Math.floor(m*$),z=Math.floor(i*$-Math.abs(U)),W=U===0?i:z/$,A=Math.abs(U/$)<m/2?W:W+m,B=(0,e.getStepDecimals)(m);return parseFloat(A.toFixed(B))}e.normalizeValue=g;function F(i,s,u){return(i-s)/(u-s)}e.relativeValue=F;function V(i){return i===o.Direction.Up||i===o.Direction.Down}e.isVertical=V;function j(i,s,u){if(s>=u)throw new RangeError("min (".concat(s,") is equal/bigger than max (").concat(u,")"));if(i<s)throw new RangeError("value (".concat(i,") is smaller than min (").concat(s,")"));if(i>u)throw new RangeError("value (".concat(i,") is bigger than max (").concat(u,")"))}e.checkBoundaries=j;function I(i,s,u){return i<s?s:i>u?u:i}e.checkValuesAgainstBoundaries=I;function T(i){if(!(i.length<2)&&!i.slice(1).every(function(s,u){return i[u]<=s}))throw new RangeError("values={[".concat(i,"]} needs to be sorted when allowOverlap={false}"))}e.checkInitialOverlap=T;function d(i){var s=window.getComputedStyle(i);return{top:parseInt(s["margin-top"],10),bottom:parseInt(s["margin-bottom"],10),left:parseInt(s["margin-left"],10),right:parseInt(s["margin-right"],10)}}e.getMargin=d;function t(i){var s=window.getComputedStyle(i);return{top:parseInt(s["padding-top"],10)+parseInt(s["border-top-width"],10),bottom:parseInt(s["padding-bottom"],10)+parseInt(s["border-bottom-width"],10),left:parseInt(s["padding-left"],10)+parseInt(s["border-left-width"],10),right:parseInt(s["padding-right"],10)+parseInt(s["border-right-width"],10)}}e.getPaddingAndBorder=t;function a(i,s,u){var p=u?-1:1;i.forEach(function(m,v){return f(m,p*s[v].x,s[v].y)})}e.translateThumbs=a;function c(i,s,u,p){for(var m=0,v=L(i[0],s,u,p),b=1;b<i.length;b++){var $=L(i[b],s,u,p);$<v&&(v=$,m=b)}return m}e.getClosestThumbIndex=c;function f(i,s,u){i.style.transform="translate(".concat(s,"px, ").concat(u,"px)")}e.translate=f;var y=function(i){var s=[],u=null,p=function(){for(var m=[],v=0;v<arguments.length;v++)m[v]=arguments[v];s=m,!u&&(u=requestAnimationFrame(function(){u=null,i.apply(void 0,s)}))};return p};e.schd=y;function k(i,s,u){var p=i.slice(0);return p[s]=u,p}e.replaceAt=k;function D(i){var s=i.values,u=i.colors,p=i.min,m=i.max,v=i.direction,b=v===void 0?o.Direction.Right:v,$=i.rtl,C=$===void 0?!1:$;C&&b===o.Direction.Right?b=o.Direction.Left:C&&o.Direction.Left&&(b=o.Direction.Right);var E=s.slice(0).sort(function(z,W){return z-W}).map(function(z){return(z-p)/(m-p)*100}),U=E.reduce(function(z,W,A){return"".concat(z,", ").concat(u[A]," ").concat(W,"%, ").concat(u[A+1]," ").concat(W,"%")},"");return"linear-gradient(".concat(b,", ").concat(u[0]," 0%").concat(U,", ").concat(u[u.length-1]," 100%)")}e.getTrackBackground=D;function w(){}e.voidFn=w;function R(i){throw new Error("Didn't expect to get here")}e.assertUnreachable=R;var M=function(i,s,u,p,m){m===void 0&&(m=function(b){return b});var v=Math.ceil(r([i],Array.from(i.children),!0).reduce(function(b,$){var C=Math.ceil($.getBoundingClientRect().width);if($.innerText&&$.innerText.includes(u)&&$.childElementCount===0){var E=$.cloneNode(!0);E.innerHTML=m(s.toFixed(p)),E.style.visibility="hidden",document.body.appendChild(E),C=Math.ceil(E.getBoundingClientRect().width),document.body.removeChild(E)}return C>b?C:b},i.getBoundingClientRect().width));return v},P=function(i,s,u,p,m,v,b){b===void 0&&(b=function(E){return E});var $=[],C=function(E){var U=M(u[E],p[E],m,v,b),z=s[E].x;s.forEach(function(W,A){var B=W.x,G=M(u[A],p[A],m,v,b);E!==A&&(z>=B&&z<=B+G||z+U>=B&&z+U<=B+G)&&($.includes(A)||($.push(E),$.push(A),$=r(r([],$,!0),[E,A],!1),C(A)))})};return C(i),Array.from(new Set($.sort()))},S=function(i,s,u,p,m,v){p===void 0&&(p=.1),m===void 0&&(m=" - "),v===void 0&&(v=function(A){return A});var b=(0,e.getStepDecimals)(p),$=(0,n.useState)({}),C=$[0],E=$[1],U=(0,n.useState)(v(s[u].toFixed(b))),z=U[0],W=U[1];return(0,n.useEffect)(function(){if(i){var A=i.getThumbs();if(A.length<1)return;var B={},G=i.getOffsets(),ne=P(u,G,A,s,m,b,v),he=v(s[u].toFixed(b));if(ne.length){var ee=ne.reduce(function(te,ue,me,be){return te.length?r(r([],te,!0),[G[be[me]].x],!1):[G[be[me]].x]},[]);if(Math.min.apply(Math,ee)===G[u].x){var ge=[];ne.forEach(function(te){ge.push(s[te].toFixed(b))}),he=Array.from(new Set(ge.sort(function(te,ue){return parseFloat(te)-parseFloat(ue)}))).map(v).join(m);var pe=Math.min.apply(Math,ee),ve=Math.max.apply(Math,ee),Ie=A[ne[ee.indexOf(ve)]].getBoundingClientRect().width;B.left="".concat(Math.abs(pe-(ve+Ie))/2,"px"),B.transform="translate(-50%, 0)"}else B.visibility="hidden"}W(he),E(B)}},[i,s]),[z,C]};e.useThumbOverlap=S;function L(i,s,u,p){var m=i.getBoundingClientRect(),v=m.left,b=m.top,$=m.width,C=m.height;return V(p)?Math.abs(u-(b+C/2)):Math.abs(s-(v+$/2))}var x=function(){var i,s=((i=navigator.userAgentData)===null||i===void 0?void 0:i.platform)||navigator.platform;return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(s)||navigator.userAgent.includes("Mac")&&"ontouchend"in document};e.isIOS=x})(le)),le}var qe;function Ct(){if(qe)return H;qe=1;var e=H&&H.__extends||(function(){var I=function(T,d){return I=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,a){t.__proto__=a}||function(t,a){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(t[c]=a[c])},I(T,d)};return function(T,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");I(T,d);function t(){this.constructor=T}T.prototype=d===null?Object.create(d):(t.prototype=d.prototype,new t)}})(),r=H&&H.__createBinding||(Object.create?(function(I,T,d,t){t===void 0&&(t=d);var a=Object.getOwnPropertyDescriptor(T,d);(!a||("get"in a?!T.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return T[d]}}),Object.defineProperty(I,t,a)}):(function(I,T,d,t){t===void 0&&(t=d),I[t]=T[d]})),n=H&&H.__setModuleDefault||(Object.create?(function(I,T){Object.defineProperty(I,"default",{enumerable:!0,value:T})}):function(I,T){I.default=T}),o=H&&H.__importStar||function(I){if(I&&I.__esModule)return I;var T={};if(I!=null)for(var d in I)d!=="default"&&Object.prototype.hasOwnProperty.call(I,d)&&r(T,I,d);return n(T,I),T},h=H&&H.__spreadArray||function(I,T,d){if(d||arguments.length===2)for(var t=0,a=T.length,c;t<a;t++)(c||!(t in T))&&(c||(c=Array.prototype.slice.call(T,0,t)),c[t]=T[t]);return I.concat(c||Array.prototype.slice.call(T))};Object.defineProperty(H,"__esModule",{value:!0});var O=o(Ge()),l=Je(),g=Ce(),F=["ArrowRight","ArrowUp","k","PageUp"],V=["ArrowLeft","ArrowDown","j","PageDown"],j=(function(I){e(T,I);function T(d){var t=I.call(this,d)||this;if(t.trackRef=O.createRef(),t.thumbRefs=[],t.state={draggedTrackPos:[-1,-1],draggedThumbIndex:-1,thumbZIndexes:new Array(t.props.values.length).fill(0).map(function(a,c){return c}),isChanged:!1,markOffsets:[]},t.getOffsets=function(){var a=t.props,c=a.direction,f=a.values,y=a.min,k=a.max,D=t.trackRef.current;if(!D)return console.warn("No track element found."),[];var w=D.getBoundingClientRect(),R=(0,l.getPaddingAndBorder)(D);return t.getThumbs().map(function(M,P){var S={x:0,y:0},L=M.getBoundingClientRect(),x=(0,l.getMargin)(M);switch(c){case g.Direction.Right:return S.x=(x.left+R.left)*-1,S.y=((L.height-w.height)/2+R.top)*-1,S.x+=w.width*(0,l.relativeValue)(f[P],y,k)-L.width/2,S;case g.Direction.Left:return S.x=(x.right+R.right)*-1,S.y=((L.height-w.height)/2+R.top)*-1,S.x+=w.width-w.width*(0,l.relativeValue)(f[P],y,k)-L.width/2,S;case g.Direction.Up:return S.x=((L.width-w.width)/2+x.left+R.left)*-1,S.y=-R.left,S.y+=w.height-w.height*(0,l.relativeValue)(f[P],y,k)-L.height/2,S;case g.Direction.Down:return S.x=((L.width-w.width)/2+x.left+R.left)*-1,S.y=-R.left,S.y+=w.height*(0,l.relativeValue)(f[P],y,k)-L.height/2,S;default:return(0,l.assertUnreachable)(c)}})},t.getThumbs=function(){return t.trackRef&&t.trackRef.current?Array.from(t.trackRef.current.children).filter(function(a){return a.hasAttribute("aria-valuenow")}):(console.warn("No thumbs found in the track container. Did you forget to pass & spread the `props` param in renderTrack?"),[])},t.getTargetIndex=function(a){return t.getThumbs().findIndex(function(c){return c===a.target||c.contains(a.target)})},t.addTouchEvents=function(a){document.addEventListener("touchmove",t.schdOnTouchMove,{passive:!1}),document.addEventListener("touchend",t.schdOnEnd,{passive:!1}),document.addEventListener("touchcancel",t.schdOnEnd,{passive:!1})},t.addMouseEvents=function(a){document.addEventListener("mousemove",t.schdOnMouseMove),document.addEventListener("mouseup",t.schdOnEnd)},t.onMouseDownTrack=function(a){var c;if(!(a.button!==0||(0,l.isIOS)()))if(a.persist(),a.preventDefault(),t.addMouseEvents(a.nativeEvent),t.props.values.length>1&&t.props.draggableTrack){if(t.thumbRefs.some(function(y){var k;return(k=y.current)===null||k===void 0?void 0:k.contains(a.target)}))return;t.setState({draggedTrackPos:[a.clientX,a.clientY]},function(){return t.onMove(a.clientX,a.clientY)})}else{var f=(0,l.getClosestThumbIndex)(t.thumbRefs.map(function(y){return y.current}),a.clientX,a.clientY,t.props.direction);(c=t.thumbRefs[f].current)===null||c===void 0||c.focus(),t.setState({draggedThumbIndex:f},function(){return t.onMove(a.clientX,a.clientY)})}},t.onResize=function(){(0,l.translateThumbs)(t.getThumbs(),t.getOffsets(),t.props.rtl),t.calculateMarkOffsets()},t.onTouchStartTrack=function(a){var c;if(a.persist(),t.addTouchEvents(a.nativeEvent),t.props.values.length>1&&t.props.draggableTrack){if(t.thumbRefs.some(function(y){var k;return(k=y.current)===null||k===void 0?void 0:k.contains(a.target)}))return;t.setState({draggedTrackPos:[a.touches[0].clientX,a.touches[0].clientY]},function(){return t.onMove(a.touches[0].clientX,a.touches[0].clientY)})}else{var f=(0,l.getClosestThumbIndex)(t.thumbRefs.map(function(y){return y.current}),a.touches[0].clientX,a.touches[0].clientY,t.props.direction);(c=t.thumbRefs[f].current)===null||c===void 0||c.focus(),t.setState({draggedThumbIndex:f},function(){return t.onMove(a.touches[0].clientX,a.touches[0].clientY)})}},t.onMouseOrTouchStart=function(a){if(!t.props.disabled){var c=(0,l.isTouchEvent)(a);if(!(!c&&a.button!==0)){var f=t.getTargetIndex(a);f!==-1&&(c?t.addTouchEvents(a):t.addMouseEvents(a),t.setState({draggedThumbIndex:f,thumbZIndexes:t.state.thumbZIndexes.map(function(y,k){return k===f?Math.max.apply(Math,t.state.thumbZIndexes):y<=t.state.thumbZIndexes[f]?y:y-1})}))}}},t.onMouseMove=function(a){a.preventDefault(),t.onMove(a.clientX,a.clientY)},t.onTouchMove=function(a){a.preventDefault(),t.onMove(a.touches[0].clientX,a.touches[0].clientY)},t.onKeyDown=function(a){var c=t.props,f=c.values,y=c.onChange,k=c.step,D=c.rtl,w=c.direction,R=t.state.isChanged,M=t.getTargetIndex(a.nativeEvent),P=D||w===g.Direction.Left||w===g.Direction.Down?-1:1;M!==-1&&(F.includes(a.key)?(a.preventDefault(),t.setState({draggedThumbIndex:M,isChanged:!0}),y((0,l.replaceAt)(f,M,t.normalizeValue(f[M]+P*(a.key==="PageUp"?k*10:k),M)))):V.includes(a.key)?(a.preventDefault(),t.setState({draggedThumbIndex:M,isChanged:!0}),y((0,l.replaceAt)(f,M,t.normalizeValue(f[M]-P*(a.key==="PageDown"?k*10:k),M)))):a.key==="Tab"?t.setState({draggedThumbIndex:-1},function(){R&&t.fireOnFinalChange()}):R&&t.fireOnFinalChange())},t.onKeyUp=function(a){var c=t.state.isChanged;t.setState({draggedThumbIndex:-1},function(){c&&t.fireOnFinalChange()})},t.onMove=function(a,c){var f=t.state,y=f.draggedThumbIndex,k=f.draggedTrackPos,D=t.props,w=D.direction,R=D.min,M=D.max,P=D.onChange,S=D.values,L=D.step,x=D.rtl;if(y===-1&&k[0]===-1&&k[1]===-1)return null;var i=t.trackRef.current;if(!i)return null;var s=i.getBoundingClientRect(),u=(0,l.isVertical)(w)?s.height:s.width;if(k[0]!==-1&&k[1]!==-1){var p=a-k[0],m=c-k[1],v=0;switch(w){case g.Direction.Right:case g.Direction.Left:v=p/u*(M-R);break;case g.Direction.Down:case g.Direction.Up:v=m/u*(M-R);break;default:(0,l.assertUnreachable)(w)}if(x&&(v*=-1),Math.abs(v)>=L/2){for(var b=0;b<t.thumbRefs.length;b++){if(S[b]===M&&Math.sign(v)===1||S[b]===R&&Math.sign(v)===-1)return;var $=S[b]+v;$>M?v=M-S[b]:$<R&&(v=R-S[b])}for(var C=S.slice(0),b=0;b<t.thumbRefs.length;b++)C=(0,l.replaceAt)(C,b,t.normalizeValue(S[b]+v,b));t.setState({draggedTrackPos:[a,c]}),P(C)}}else{var E=0;switch(w){case g.Direction.Right:E=(a-s.left)/u*(M-R)+R;break;case g.Direction.Left:E=(u-(a-s.left))/u*(M-R)+R;break;case g.Direction.Down:E=(c-s.top)/u*(M-R)+R;break;case g.Direction.Up:E=(u-(c-s.top))/u*(M-R)+R;break;default:(0,l.assertUnreachable)(w)}x&&(E=M+R-E),Math.abs(S[y]-E)>=L/2&&P((0,l.replaceAt)(S,y,t.normalizeValue(E,y)))}},t.normalizeValue=function(a,c){var f=t.props,y=f.min,k=f.max,D=f.step,w=f.allowOverlap,R=f.values;return(0,l.normalizeValue)(a,c,y,k,D,w,R)},t.onEnd=function(a){if(a.preventDefault(),document.removeEventListener("mousemove",t.schdOnMouseMove),document.removeEventListener("touchmove",t.schdOnTouchMove),document.removeEventListener("mouseup",t.schdOnEnd),document.removeEventListener("touchend",t.schdOnEnd),document.removeEventListener("touchcancel",t.schdOnEnd),t.state.draggedThumbIndex===-1&&t.state.draggedTrackPos[0]===-1&&t.state.draggedTrackPos[1]===-1)return null;t.setState({draggedThumbIndex:-1,draggedTrackPos:[-1,-1]},function(){t.fireOnFinalChange()})},t.fireOnFinalChange=function(){t.setState({isChanged:!1});var a=t.props,c=a.onFinalChange,f=a.values;c&&c(f)},t.updateMarkRefs=function(a){if(!a.renderMark){t.numOfMarks=void 0,t.markRefs=void 0;return}t.numOfMarks=(a.max-a.min)/t.props.step,t.markRefs=[];for(var c=0;c<t.numOfMarks+1;c++)t.markRefs[c]=O.createRef()},t.calculateMarkOffsets=function(){if(!(!t.props.renderMark||!t.trackRef||!t.numOfMarks||!t.markRefs||t.trackRef.current===null)){for(var a=window.getComputedStyle(t.trackRef.current),c=parseInt(a.width,10),f=parseInt(a.height,10),y=parseInt(a.paddingLeft,10),k=parseInt(a.paddingTop,10),D=[],w=0;w<t.numOfMarks+1;w++){var R=9999,M=9999;if(t.markRefs[w].current){var P=t.markRefs[w].current.getBoundingClientRect();R=P.height,M=P.width}t.props.direction===g.Direction.Left||t.props.direction===g.Direction.Right?D.push([Math.round(c/t.numOfMarks*w+y-M/2),-Math.round((R-f)/2)]):D.push([Math.round(f/t.numOfMarks*w+k-R/2),-Math.round((M-c)/2)])}t.setState({markOffsets:D})}},d.step===0)throw new Error('"step" property should be a positive number');return t.schdOnMouseMove=(0,l.schd)(t.onMouseMove),t.schdOnTouchMove=(0,l.schd)(t.onTouchMove),t.schdOnEnd=(0,l.schd)(t.onEnd),t.thumbRefs=d.values.map(function(){return O.createRef()}),t.updateMarkRefs(d),t}return T.prototype.componentDidMount=function(){var d=this,t=this.props,a=t.values,c=t.min,f=t.step;this.resizeObserver=window.ResizeObserver?new window.ResizeObserver(this.onResize):{observe:function(){return window.addEventListener("resize",d.onResize)},unobserve:function(){return window.removeEventListener("resize",d.onResize)}},document.addEventListener("touchstart",this.onMouseOrTouchStart,{passive:!1}),document.addEventListener("mousedown",this.onMouseOrTouchStart,{passive:!1}),!this.props.allowOverlap&&(0,l.checkInitialOverlap)(this.props.values),this.props.values.forEach(function(y){return(0,l.checkBoundaries)(y,d.props.min,d.props.max)}),this.resizeObserver.observe(this.trackRef.current),(0,l.translateThumbs)(this.getThumbs(),this.getOffsets(),this.props.rtl),this.calculateMarkOffsets(),a.forEach(function(y){(0,l.isStepDivisible)(c,y,f)||console.warn("The `values` property is in conflict with the current `step`, `min`, and `max` properties. Please provide values that are accessible using the min, max, and step values.")})},T.prototype.componentDidUpdate=function(d,t){var a=this.props,c=a.max,f=a.min,y=a.step,k=a.values,D=a.rtl;(d.max!==c||d.min!==f||d.step!==y)&&this.updateMarkRefs(this.props),(0,l.translateThumbs)(this.getThumbs(),this.getOffsets(),D),(d.max!==c||d.min!==f||d.step!==y||t.markOffsets.length!==this.state.markOffsets.length)&&(this.calculateMarkOffsets(),k.forEach(function(w){(0,l.isStepDivisible)(f,w,y)||console.warn("The `values` property is in conflict with the current `step`, `min`, and `max` properties. Please provide values that are accessible using the min, max, and step values.")}))},T.prototype.componentWillUnmount=function(){var d={passive:!1};document.removeEventListener("mousedown",this.onMouseOrTouchStart,d),document.removeEventListener("mousemove",this.schdOnMouseMove),document.removeEventListener("touchmove",this.schdOnTouchMove),document.removeEventListener("touchstart",this.onMouseOrTouchStart),document.removeEventListener("mouseup",this.schdOnEnd),document.removeEventListener("touchend",this.schdOnEnd),this.resizeObserver.unobserve(this.trackRef.current)},T.prototype.render=function(){var d=this,t=this.props,a=t.label,c=t.labelledBy,f=t.renderTrack,y=t.renderThumb,k=t.renderMark,D=k===void 0?function(){return null}:k,w=t.values,R=t.min,M=t.max,P=t.allowOverlap,S=t.disabled,L=this.state,x=L.draggedThumbIndex,i=L.thumbZIndexes,s=L.markOffsets;return f({props:{style:{transform:"scale(1)",cursor:x>-1?"grabbing":this.props.draggableTrack?(0,l.isVertical)(this.props.direction)?"ns-resize":"ew-resize":w.length===1&&!S?"pointer":"inherit"},onMouseDown:S?l.voidFn:this.onMouseDownTrack,onTouchStart:S?l.voidFn:this.onTouchStartTrack,ref:this.trackRef},isDragged:this.state.draggedThumbIndex>-1,disabled:S,children:h(h([],s.map(function(u,p,m){return D({props:{style:d.props.direction===g.Direction.Left||d.props.direction===g.Direction.Right?{position:"absolute",left:"".concat(u[0],"px"),marginTop:"".concat(u[1],"px")}:{position:"absolute",top:"".concat(u[0],"px"),marginLeft:"".concat(u[1],"px")},key:"mark".concat(p),ref:d.markRefs[p]},index:p})}),!0),w.map(function(u,p){var m=d.state.draggedThumbIndex===p;return y({index:p,value:u,isDragged:m,props:{style:{position:"absolute",zIndex:i[p],cursor:S?"inherit":m?"grabbing":"grab",userSelect:"none",touchAction:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none"},key:p,tabIndex:S?void 0:0,"aria-valuemax":P?M:w[p+1]||M,"aria-valuemin":P?R:w[p-1]||R,"aria-valuenow":u,draggable:!1,ref:d.thumbRefs[p],"aria-label":a,"aria-labelledby":c,role:"slider",onKeyDown:S?l.voidFn:d.onKeyDown,onKeyUp:S?l.voidFn:d.onKeyUp}})}),!0)})},T.defaultProps={label:"Accessibility label",labelledBy:null,step:1,direction:g.Direction.Right,rtl:!1,disabled:!1,allowOverlap:!1,draggableTrack:!1,min:0,max:100},T})(O.Component);return H.default=j,H}var Ke;function Pt(){return Ke||(Ke=1,(function(e){var r=ce&&ce.__importDefault||function(O){return O&&O.__esModule?O:{default:O}};Object.defineProperty(e,"__esModule",{value:!0}),e.checkValuesAgainstBoundaries=e.relativeValue=e.useThumbOverlap=e.Direction=e.getTrackBackground=e.Range=void 0;var n=r(Ct());e.Range=n.default;var o=Je();Object.defineProperty(e,"getTrackBackground",{enumerable:!0,get:function(){return o.getTrackBackground}}),Object.defineProperty(e,"useThumbOverlap",{enumerable:!0,get:function(){return o.useThumbOverlap}}),Object.defineProperty(e,"relativeValue",{enumerable:!0,get:function(){return o.relativeValue}}),Object.defineProperty(e,"checkValuesAgainstBoundaries",{enumerable:!0,get:function(){return o.checkValuesAgainstBoundaries}});var h=Ce();Object.defineProperty(e,"Direction",{enumerable:!0,get:function(){return h.Direction}})})(ce)),ce}var Qe=Pt();function Xe(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(h){return Object.getOwnPropertyDescriptor(e,h).enumerable})),n.push.apply(n,o)}return n}function Te(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?Xe(Object(n),!0).forEach(function(o){Lt(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xe(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function Lt(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}var ke=Q("div",{position:"relative",width:"100%"});ke.displayName="Root";ke.displayName="Root";ke.displayName="StyledRoot";var Oe=Q("div",function(e){var r=e.$theme,n=e.$value,o=n===void 0?[]:n,h=e.$disabled,O=e.$isDragged,l=r.sizing,g="inherit";return h?g="not-allowed":O?g="grabbing":o.length===1&&(g="pointer"),{paddingTop:l.scale600,paddingBottom:l.scale600,paddingRight:l.scale600,paddingLeft:l.scale600,display:"flex",cursor:g,backgroundColor:r.colors.sliderTrackFill}});Oe.displayName="Track";Oe.displayName="Track";Oe.displayName="StyledTrack";var fe=Q("div",function(e){var r=e.$theme,n=e.$value,o=n===void 0?[]:n,h=e.$min,O=e.$max,l=e.$disabled,g=r.colors,F=r.borders,V=r.direction,j=r.borders.useRoundedCorners?F.radius100:0;return{borderTopLeftRadius:j,borderTopRightRadius:j,borderBottomRightRadius:j,borderBottomLeftRadius:j,background:Qe.getTrackBackground({values:o,colors:o.length===1?[l?g.borderOpaque:g.primary,l?g.backgroundSecondary:g.borderOpaque]:[l?g.backgroundSecondary:g.borderOpaque,l?g.borderOpaque:g.primary,l?g.backgroundSecondary:g.borderOpaque],min:h||0,max:O||0,rtl:V==="rtl"}),height:"2px",width:"100%",alignSelf:"center",cursor:l?"not-allowed":"inherit"}});fe.displayName="InnerTrack";fe.displayName="InnerTrack";fe.displayName="StyledInnerTrack";var we=Q("div",function(e){return{width:"4px",height:"2px",backgroundColor:e.$theme.colors.backgroundPrimary,marginLeft:"16px"}});we.displayName="Mark";we.displayName="Mark";we.displayName="StyledMark";var Re=Q("div",function(e){return Te(Te({},e.$theme.typography.font200),{},{color:e.$theme.colors.contentPrimary})});Re.displayName="Tick";Re.displayName="Tick";Re.displayName="StyledTick";var Se=Q("div",function(e){var r=e.$theme,n=r.sizing;return{display:"flex",justifyContent:"space-between",alignItems:"center",paddingRight:n.scale600,paddingLeft:n.scale600,paddingBottom:n.scale400}});Se.displayName="TickBar";Se.displayName="TickBar";Se.displayName="StyledTickBar";var Me=Q("div",function(e){var r=e.$theme,n=e.$value,o=n===void 0?[]:n,h=e.$thumbIndex,O=e.$disabled,l=o.length===2&&h===0,g=o.length===2&&h===1;return r.direction==="rtl"&&(g||l)&&(l=!l,g=!g),{height:"24px",width:"24px",borderTopLeftRadius:"24px",borderTopRightRadius:"24px",borderBottomLeftRadius:"24px",borderBottomRightRadius:"24px",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:O?r.colors.sliderHandleFillDisabled:r.colors.sliderHandleFill,outline:"none",boxShadow:e.$isFocusVisible?"0 0 0 3px ".concat(r.colors.accent):"0 1px 4px rgba(0, 0, 0, 0.12)",cursor:O?"not-allowed":"inherit"}});Me.displayName="Thumb";Me.displayName="Thumb";Me.displayName="StyledThumb";var $e=Q("div",function(e){var r=e.$disabled,n=e.$theme;return{position:"absolute",top:"-16px",width:"4px",height:"20px",backgroundColor:r?n.colors.sliderHandleFillDisabled:n.colors.sliderHandleInnerFill}});$e.displayName="InnerThumb";$e.displayName="InnerThumb";$e.displayName="StyledInnerThumb";var _e=Q("div",function(e){var r=e.$disabled,n=e.$theme;return Te(Te({position:"absolute",top:"-".concat(n.sizing.scale1400)},n.typography.font200),{},{backgroundColor:r?n.colors.sliderHandleFillDisabled:n.colors.sliderHandleInnerFill,color:n.colors.contentInversePrimary,paddingLeft:n.sizing.scale600,paddingRight:n.sizing.scale600,paddingTop:n.sizing.scale500,paddingBottom:n.sizing.scale500,borderBottomLeftRadius:"48px",borderBottomRightRadius:"48px",borderTopLeftRadius:"48px",borderTopRightRadius:"48px",whiteSpace:"nowrap"})});_e.displayName="ThumbValue";_e.displayName="ThumbValue";_e.displayName="StyledThumbValue";function Ye(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(h){return Object.getOwnPropertyDescriptor(e,h).enumerable})),n.push.apply(n,o)}return n}function At(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?Ye(Object(n),!0).forEach(function(o){Bt(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ye(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function Bt(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function X(){return X=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},X.apply(this,arguments)}function K(e,r){return zt(e)||jt(e,r)||Vt(e,r)||Ft()}function Ft(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vt(e,r){if(e){if(typeof e=="string")return Ze(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ze(e,r)}}function Ze(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,o=new Array(r);n<r;n++)o[n]=e[n];return o}function jt(e,r){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var o=[],h=!0,O=!1,l,g;try{for(n=n.call(e);!(h=(l=n.next()).done)&&(o.push(l.value),!(r&&o.length===r));h=!0);}catch(F){O=!0,g=F}finally{try{!h&&n.return!=null&&n.return()}finally{if(O)throw g}}return o}}function zt(e){if(Array.isArray(e))return e}var Nt=function(r){if(r.length>2||r.length===0)throw new Error("the value prop represents positions of thumbs, so its length can be only one or two");return r};function Ut(e){var r=e.overrides,n=r===void 0?{}:r,o=e.disabled,h=o===void 0?!1:o,O=e.marks,l=O===void 0?!1:O,g=e.onChange,F=g===void 0?function(){}:g,V=e.onFinalChange,j=V===void 0?function(){}:V,I=e.min,T=I===void 0?0:I,d=e.max,t=d===void 0?100:d,a=e.step,c=a===void 0?1:a,f=e.persistentThumb,y=f===void 0?!1:f,k=e.valueToLabel,D=k===void 0?function(Y){return Y}:k,w=e.value,R=_.useContext(mt),M=_.useState(!1),P=K(M,2),S=P[0],L=P[1],x=_.useState(!1),i=K(x,2),s=i[0],u=i[1],p=_.useState(!1),m=K(p,2),v=m[0],b=m[1],$=_.useState(-1),C=K($,2),E=C[0],U=C[1],z=_.useCallback(function(Y){bt(Y)&&b(!0);var N=Y.target.parentNode.firstChild===Y.target?0:1;U(N)},[]),W=_.useCallback(function(Y){v!==!1&&b(!1),U(-1)},[]),A=Nt(w),B={$disabled:h,$step:c,$min:T,$max:t,$marks:l,$value:A,$isFocusVisible:v},G=J(n.Root,ke),ne=K(G,2),he=ne[0],ee=ne[1],ge=J(n.Track,Oe),pe=K(ge,2),ve=pe[0],Ie=pe[1],te=J(n.InnerTrack,fe),ue=K(te,2),me=ue[0],be=ue[1],et=J(n.Thumb,Me),Le=K(et,2),tt=Le[0],rt=Le[1],nt=J(n.InnerThumb,$e),Ae=K(nt,2),at=Ae[0],it=Ae[1],ot=J(n.ThumbValue,_e),Be=K(ot,2),st=Be[0],ut=Be[1],ct=J(n.Tick,Re),Fe=K(ct,2),Ve=Fe[0],je=Fe[1],lt=J(n.TickBar,Se),ze=K(lt,2),dt=ze[0],ft=ze[1],ht=J(n.Mark,we),Ne=K(ht,2),gt=Ne[0],pt=Ne[1];return _.createElement(he,X({"data-baseweb":"slider"},B,ee,{onFocus:Tt(ee,z),onBlur:yt(ee,W)}),_.createElement(Qe.Range,X({step:c,min:T,max:t,values:A,disabled:h,onChange:function(N){return F({value:N})},onFinalChange:function(N){return j({value:N})},rtl:R.direction==="rtl",renderTrack:function(N){var re=N.props,q=N.children,ae=N.isDragged;return _.createElement(ve,X({onMouseDown:re.onMouseDown,onTouchStart:re.onTouchStart,$isDragged:ae},B,Ie),_.createElement(me,X({$isDragged:ae,ref:re.ref},B,be),q))},renderThumb:function(N){var re=N.props,q=N.index,ae=N.isDragged,Ue=y||(!!q&&s||!q&&S||ae)&&!h;return _.createElement(tt,X({},re,{onMouseEnter:function(){q===0?L(!0):u(!0)},onMouseLeave:function(){q===0?L(!1):u(!1)},$thumbIndex:q,$isDragged:ae,style:At({},re.style)},B,rt,{$isFocusVisible:v&&E===q}),Ue&&_.createElement(st,X({$thumbIndex:q,$isDragged:ae},B,ut),D(A[q])),Ue&&_.createElement(at,X({$thumbIndex:q,$isDragged:ae},B,it)))}},l?{renderMark:function(N){var re=N.props,q=N.index;return _.createElement(gt,X({$markIndex:q},re,B,pt))}}:{})),_.createElement(dt,X({},B,ft),_.createElement(Ve,X({},B,je),D(T)),_.createElement(Ve,X({},B,je),D(t))))}const Ht=se("div",{target:"e16ozfla0"})({position:"relative",":focus-within:has(:focus-visible)":{"--slider-focused":1}}),Wt=se("div",{target:"e16ozfla1"})(({disabled:e,theme:r,isDragged:n})=>({alignItems:"center",backgroundColor:e?r.colors.gray60:r.colors.primary,borderTopLeftRadius:"100%",borderTopRightRadius:"100%",borderBottomLeftRadius:"100%",borderBottomRightRadius:"100%",borderTopStyle:"none",borderBottomStyle:"none",borderRightStyle:"none",borderLeftStyle:"none",display:"flex",justifyContent:"center",height:r.sizes.sliderThumb,width:r.sizes.sliderThumb,boxShadow:n?r.shadows.focusRing:r.shadows.none,":focus":{outline:"none"},":focus-visible":{boxShadow:r.shadows.focusRing}})),qt=se("div",{target:"e16ozfla2"})(({disabled:e,theme:r})=>({fontFamily:r.genericFonts.bodyFont,fontSize:r.fontSizes.sm,color:e?r.colors.gray60:r.colors.primary,top:"-1.6em",position:"absolute",whiteSpace:"nowrap",backgroundColor:r.colors.transparent,lineHeight:r.lineHeights.base,fontWeight:r.fontWeights.normal,pointerEvents:"none"})),Kt=se("div",{target:"e16ozfla3"})({flex:1}),Xt=se("div",{target:"e16ozfla4"})(({theme:e})=>({position:"absolute",height:e.spacing.twoXS,left:`calc(${e.sizes.sliderThumb} / 2)`,right:`calc(${e.sizes.sliderThumb} / 2)`})),Yt=se("div",{target:"e16ozfla5"})(({theme:e,isHovered:r,isDisabled:n})=>({position:"absolute",left:0,right:0,top:"100%",display:"flex",justifyContent:"space-between",pointerEvents:"none",marginTop:`-${e.spacing.md}`,fontSize:e.fontSizes.sm,lineHeight:e.lineHeights.base,fontWeight:e.fontWeights.normal,color:n?e.colors.fadedText40:e.colors.fadedText60,opacity:r?1:"var(--slider-focused, 0)",transition:r?"none":"opacity 300ms 200ms"}));function Zt({minLabel:e,maxLabel:r,isHovered:n,isDisabled:o}){return xe(Yt,{"data-testid":"stSliderTickBar",isHovered:n,isDisabled:o,children:[Z(De,{source:e,allowHTML:!1,inheritFont:!0,isLabel:!0}),Z(De,{source:r,allowHTML:!1,inheritFont:!0,isLabel:!0})]})}function Ee(e){return e.type===oe.Type.SELECT_SLIDER}function Pe(e,r,n){return e.map((o,h)=>{const O=r.indexOf(o);return O>=0?O:n[h]??0})}function Gt(e,r){return e.map(n=>r[n]??"")}function Jt({disabled:e,element:r,widgetMgr:n,fragmentId:o}){const[h,O]=It({getStateFromWidgetMgr:Qt,getDefaultStateFromProto:er,getCurrStateFromProto:tr,updateWidgetMgrState:rr,element:r,widgetMgr:n,fragmentId:o}),[l,g]=_.useState(h),[F,V]=_.useState(!1),[j,I]=_.useState(!1),T=_.useCallback(()=>V(!0),[]),d=_.useCallback(()=>V(!1),[]),t=_.useRef(null),[a]=_.useState([]),[c]=_.useState([]),f=kt(),y=_.useRef(r);y.current=r;const k=l.map(x=>ye(x,r)),D=ye(r.min,r),w=ye(r.max,r);_.useEffect(()=>{g(h)},[h]),Ot(()=>{if(!Ee(r))return;const x=n.getStringArrayValue(r);if(x===void 0)return;const i=Pe(x,r.options,r.default);g(i)},[r.options],(x,i)=>wt(x[0],i[0]));const R=_.useCallback(({value:x})=>{O({value:x,fromUi:!0}),I(!1)},[O]),M=_.useCallback(({value:x})=>{g(x),I(!0)},[]),P=_.useCallback(_.forwardRef(function(i,s){const{$thumbIndex:u,$value:p}=i,m=u||0;a[m]=s,c[m]||=_.createRef();const v=Rt(i,["role","style","aria-valuemax","aria-valuemin","aria-valuenow","tabIndex","onKeyUp","onKeyDown","onMouseEnter","onMouseLeave","draggable"]),b=y.current,C=(p??[b.min])[m]??b.min,E=ye(C,b);return Z(Wt,{...v,disabled:i.$disabled===!0,isDragged:i.$isDragged===!0,ref:a[m],"aria-valuetext":E,"aria-label":b.label,children:Z(qt,{"data-testid":"stSliderThumbValue",disabled:i.$disabled===!0,ref:c[m],children:Z(De,{source:E,allowHTML:!1,inheritFont:!0,isLabel:!0})})})}),[]);_.useLayoutEffect(()=>{a.forEach((m,v)=>{m.current&&m.current.setAttribute("aria-valuetext",k[v])});const x=t.current??null,i=a[0].current,s=a[1]?.current,u=c[0].current,p=c[1]?.current;or(x,i,s,u,p)});const S=_.useCallback(({$disabled:x})=>({height:f.spacing.twoXS,...x?{background:f.colors.darkenedBgMix25}:{}}),[f.colors.darkenedBgMix25,f.spacing.twoXS]),L=_.useCallback(_.forwardRef(function(i,s){const{children:u,...p}=i;return xe(Kt,{children:[Z(Xt,{ref:s,children:u}),Z(fe,{...p,style:S({$disabled:i.$disabled})})]})}),[]);return xe(Ht,{ref:t,className:"stSlider","data-testid":"stSlider",onMouseEnter:T,onMouseLeave:d,children:[Z($t,{label:r.label,disabled:e,labelVisibility:St(r.labelVisibility?.value),children:r.help&&Z(Mt,{content:r.help,label:r.label})}),Z(Ut,{min:r.min,max:r.max,step:r.step,value:ir(l,r),onChange:M,onFinalChange:R,disabled:e,overrides:{Thumb:P,Track:{style:{backgroundColor:"none !important",paddingLeft:f.spacing.none,paddingRight:f.spacing.none,paddingTop:`calc((${f.sizes.minElementHeight} - ${f.spacing.twoXS}) / 2)`,paddingBottom:`calc((${f.sizes.minElementHeight} - ${f.spacing.twoXS}) / 2)`}},InnerTrack:L,TickBar:{component:Zt,props:{minLabel:D,maxLabel:w,isHovered:F||j,isDisabled:e}}}})]})}function Qt(e,r){if(Ee(r)){const n=e.getStringArrayValue(r);return n===void 0?void 0:Pe(n,r.options,r.default)}return e.getDoubleArrayValue(r)}function er(e){return e.default}function tr(e){if(Ee(e)){const r=e.rawValue;return r&&r.length>0?Pe(r,e.options,e.default):e.default}return e.value}function rr(e,r,n,o){if(Ee(e)){const h=Gt(n.value,e.options);r.setStringArrayValue(e,h,{fromUi:n.fromUi},o)}else r.setDoubleArrayValue(e,n.value,{fromUi:n.fromUi},o)}function nr(e){const{dataType:r}=e;return r===oe.DataType.DATETIME||r===oe.DataType.DATE||r===oe.DataType.TIME}function ar(e){const{dataType:r}=e;return r===oe.DataType.DATE?"date":r===oe.DataType.TIME?"time":"datetime"}function ye(e,r){const{format:n,options:o}=r;if(o.length>0)return o[e]??"";if(nr(r)){const h=_t.utc(e/1e3);return Dt(h,n,ar(r))}return xt(e,n)}function ir(e,r){const{min:n,max:o}=r;let h=e[0],O=e.length>1?e[1]:e[0];return h>O&&(h=O),h<n&&(h=n),h>o&&(h=o),O<n&&(O=n),O>o&&(O=o),e.length>1?[h,O]:[h]}function or(e,r,n,o,h){!e||!r||!o||(ie(e,r,o),n&&h&&(ie(e,n,h),sr(e,r,n,o,h)))}function ie(e,r,n){const o=e.getBoundingClientRect(),h=r.getBoundingClientRect(),O=n.getBoundingClientRect(),l=h.left+h.width/2,g=l-O.width/2<o.left,F=l+O.width/2>o.right;n.style.left=g?"0":"",n.style.right=F?"0":""}function sr(e,r,n,o,h){const l=e.getBoundingClientRect(),g=r.getBoundingClientRect(),F=n.getBoundingClientRect(),V=o.getBoundingClientRect(),j=h.getBoundingClientRect(),I=l.left+l.width/2,T=g.left+g.width/2,d=F.left+F.width/2,t=T-V.width/2>=l.left,a=d+j.width/2<=l.right,c=g.left-V.width>=l.left,f=F.right+j.width<=l.right,y=t?V.width/2:V.width,k=a?j.width/2:j.width,D=T+y;if(d-k-D>24){ie(e,r,o),ie(e,n,h);return}if(c&&f){o.style.left="",o.style.right=`${Math.round(g.width)}px`,h.style.left=`${Math.round(F.width)}px`,h.style.right="";return}T<I?(ie(e,r,o),h.style.left=`${Math.round(T+y+24-d)}px`,h.style.right=""):(ie(e,n,h),o.style.left="",o.style.right=`${-Math.round(d-k-24-T)}px`)}const mr=Et(_.memo(Jt));export{mr 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.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
+ 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.BHyzKS4e.js";import{m as g}from"./iconPosition.C47DkA-1.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,4 +1,4 @@
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)+`
1
+ import{w as Ye}from"./index.bsVAaBS1.js";import{s as Ca,h as qa}from"./index.Ck0ZkOfK.js";import{bt as Ea,bu as Ia,bv as Ra}from"./index.BHyzKS4e.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
@@ -258,6 +258,6 @@ l0,-`+(t+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
258
258
  |[ \r ]+
259
259
  ?)[ \r ]*`,ft="[̀-ͯ]",An=new RegExp(ft+"+$"),Tn="("+va+"+)|"+(zn+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(ft+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(ft+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+Mn)+("|"+Sn+")");class pr{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(Tn,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new m0("EOF",new o0(this,t,t));var a=this.tokenRegex.exec(e);if(a===null||a.index!==t)throw new z("Unexpected character: '"+e[t]+"'",new m0(e[t],new o0(this,t,t+1)));var n=a[6]||a[3]||(a[2]?"\\ ":" ");if(this.catcodes[n]===14){var s=e.indexOf(`
260
260
  `,this.tokenRegex.lastIndex);return s===-1?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=s+1,this.lex()}return new m0(n,new o0(this,t,this.tokenRegex.lastIndex))}}class Bn{constructor(e,t){e===void 0&&(e={}),t===void 0&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new z("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var t in e)e.hasOwnProperty(t)&&(e[t]==null?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,t,a){if(a===void 0&&(a=!1),a){for(var n=0;n<this.undefStack.length;n++)delete this.undefStack[n][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var s=this.undefStack[this.undefStack.length-1];s&&!s.hasOwnProperty(e)&&(s[e]=this.current[e])}t==null?delete this.current[e]:this.current[e]=t}}var Nn=ia;c("\\noexpand",function(r){var e=r.popToken();return r.isExpandable(e.text)&&(e.noexpand=!0,e.treatAsRelax=!0),{tokens:[e],numArgs:0}});c("\\expandafter",function(r){var e=r.popToken();return r.expandOnce(!0),{tokens:[e],numArgs:0}});c("\\@firstoftwo",function(r){var e=r.consumeArgs(2);return{tokens:e[0],numArgs:0}});c("\\@secondoftwo",function(r){var e=r.consumeArgs(2);return{tokens:e[1],numArgs:0}});c("\\@ifnextchar",function(r){var e=r.consumeArgs(3);r.consumeSpaces();var t=r.future();return e[0].length===1&&e[0][0].text===t.text?{tokens:e[1],numArgs:0}:{tokens:e[2],numArgs:0}});c("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");c("\\TextOrMath",function(r){var e=r.consumeArgs(2);return r.mode==="text"?{tokens:e[0],numArgs:0}:{tokens:e[1],numArgs:0}});var vr={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};c("\\char",function(r){var e=r.popToken(),t,a="";if(e.text==="'")t=8,e=r.popToken();else if(e.text==='"')t=16,e=r.popToken();else if(e.text==="`")if(e=r.popToken(),e.text[0]==="\\")a=e.text.charCodeAt(1);else{if(e.text==="EOF")throw new z("\\char` missing argument");a=e.text.charCodeAt(0)}else t=10;if(t){if(a=vr[e.text],a==null||a>=t)throw new z("Invalid base-"+t+" digit "+e.text);for(var n;(n=vr[r.future().text])!=null&&n<t;)a*=t,a+=n,r.popToken()}return"\\@char{"+a+"}"});var qt=(r,e,t,a)=>{var n=r.consumeArg().tokens;if(n.length!==1)throw new z("\\newcommand's first argument must be a macro name");var s=n[0].text,o=r.isDefined(s);if(o&&!e)throw new z("\\newcommand{"+s+"} attempting to redefine "+(s+"; use \\renewcommand"));if(!o&&!t)throw new z("\\renewcommand{"+s+"} when command "+s+" does not yet exist; use \\newcommand");var h=0;if(n=r.consumeArg().tokens,n.length===1&&n[0].text==="["){for(var m="",p=r.expandNextToken();p.text!=="]"&&p.text!=="EOF";)m+=p.text,p=r.expandNextToken();if(!m.match(/^\s*[0-9]+\s*$/))throw new z("Invalid number of arguments: "+m);h=parseInt(m),n=r.consumeArg().tokens}return o&&a||r.macros.set(s,{tokens:n,numArgs:h}),""};c("\\newcommand",r=>qt(r,!1,!0,!1));c("\\renewcommand",r=>qt(r,!0,!1,!1));c("\\providecommand",r=>qt(r,!0,!0,!0));c("\\message",r=>{var e=r.consumeArgs(1)[0];return console.log(e.reverse().map(t=>t.text).join("")),""});c("\\errmessage",r=>{var e=r.consumeArgs(1)[0];return console.error(e.reverse().map(t=>t.text).join("")),""});c("\\show",r=>{var e=r.popToken(),t=e.text;return console.log(e,r.macros.get(t),H0[t],X.math[t],X.text[t]),""});c("\\bgroup","{");c("\\egroup","}");c("~","\\nobreakspace");c("\\lq","`");c("\\rq","'");c("\\aa","\\r a");c("\\AA","\\r A");c("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");c("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");c("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");c("ℬ","\\mathscr{B}");c("ℰ","\\mathscr{E}");c("ℱ","\\mathscr{F}");c("ℋ","\\mathscr{H}");c("ℐ","\\mathscr{I}");c("ℒ","\\mathscr{L}");c("ℳ","\\mathscr{M}");c("ℛ","\\mathscr{R}");c("ℭ","\\mathfrak{C}");c("ℌ","\\mathfrak{H}");c("ℨ","\\mathfrak{Z}");c("\\Bbbk","\\Bbb{k}");c("·","\\cdotp");c("\\llap","\\mathllap{\\textrm{#1}}");c("\\rlap","\\mathrlap{\\textrm{#1}}");c("\\clap","\\mathclap{\\textrm{#1}}");c("\\mathstrut","\\vphantom{(}");c("\\underbar","\\underline{\\text{#1}}");c("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}');c("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");c("\\ne","\\neq");c("≠","\\neq");c("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");c("∉","\\notin");c("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");c("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");c("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");c("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");c("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");c("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");c("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");c("⟂","\\perp");c("‼","\\mathclose{!\\mkern-0.8mu!}");c("∌","\\notni");c("⌜","\\ulcorner");c("⌝","\\urcorner");c("⌞","\\llcorner");c("⌟","\\lrcorner");c("©","\\copyright");c("®","\\textregistered");c("️","\\textregistered");c("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');c("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');c("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');c("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');c("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");c("⋮","\\vdots");c("\\varGamma","\\mathit{\\Gamma}");c("\\varDelta","\\mathit{\\Delta}");c("\\varTheta","\\mathit{\\Theta}");c("\\varLambda","\\mathit{\\Lambda}");c("\\varXi","\\mathit{\\Xi}");c("\\varPi","\\mathit{\\Pi}");c("\\varSigma","\\mathit{\\Sigma}");c("\\varUpsilon","\\mathit{\\Upsilon}");c("\\varPhi","\\mathit{\\Phi}");c("\\varPsi","\\mathit{\\Psi}");c("\\varOmega","\\mathit{\\Omega}");c("\\substack","\\begin{subarray}{c}#1\\end{subarray}");c("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");c("\\boxed","\\fbox{$\\displaystyle{#1}$}");c("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");c("\\implies","\\DOTSB\\;\\Longrightarrow\\;");c("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");c("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");c("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var gr={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};c("\\dots",function(r){var e="\\dotso",t=r.expandAfterFuture().text;return t in gr?e=gr[t]:(t.slice(0,4)==="\\not"||t in X.math&&["bin","rel"].includes(X.math[t].group))&&(e="\\dotsb"),e});var Et={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};c("\\dotso",function(r){var e=r.future().text;return e in Et?"\\ldots\\,":"\\ldots"});c("\\dotsc",function(r){var e=r.future().text;return e in Et&&e!==","?"\\ldots\\,":"\\ldots"});c("\\cdots",function(r){var e=r.future().text;return e in Et?"\\@cdots\\,":"\\@cdots"});c("\\dotsb","\\cdots");c("\\dotsm","\\cdots");c("\\dotsi","\\!\\cdots");c("\\dotsx","\\ldots\\,");c("\\DOTSI","\\relax");c("\\DOTSB","\\relax");c("\\DOTSX","\\relax");c("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");c("\\,","\\tmspace+{3mu}{.1667em}");c("\\thinspace","\\,");c("\\>","\\mskip{4mu}");c("\\:","\\tmspace+{4mu}{.2222em}");c("\\medspace","\\:");c("\\;","\\tmspace+{5mu}{.2777em}");c("\\thickspace","\\;");c("\\!","\\tmspace-{3mu}{.1667em}");c("\\negthinspace","\\!");c("\\negmedspace","\\tmspace-{4mu}{.2222em}");c("\\negthickspace","\\tmspace-{5mu}{.277em}");c("\\enspace","\\kern.5em ");c("\\enskip","\\hskip.5em\\relax");c("\\quad","\\hskip1em\\relax");c("\\qquad","\\hskip2em\\relax");c("\\tag","\\@ifstar\\tag@literal\\tag@paren");c("\\tag@paren","\\tag@literal{({#1})}");c("\\tag@literal",r=>{if(r.macros.get("\\df@tag"))throw new z("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});c("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");c("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");c("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");c("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");c("\\newline","\\\\\\relax");c("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var ga=A(x0["Main-Regular"][84][1]-.7*x0["Main-Regular"][65][1]);c("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+ga+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");c("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+ga+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");c("\\hspace","\\@ifstar\\@hspacer\\@hspace");c("\\@hspace","\\hskip #1\\relax");c("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");c("\\ordinarycolon",":");c("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");c("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');c("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');c("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');c("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');c("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');c("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');c("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');c("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');c("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');c("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');c("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');c("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');c("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');c("∷","\\dblcolon");c("∹","\\eqcolon");c("≔","\\coloneqq");c("≕","\\eqqcolon");c("⩴","\\Coloneqq");c("\\ratio","\\vcentcolon");c("\\coloncolon","\\dblcolon");c("\\colonequals","\\coloneqq");c("\\coloncolonequals","\\Coloneqq");c("\\equalscolon","\\eqqcolon");c("\\equalscoloncolon","\\Eqqcolon");c("\\colonminus","\\coloneq");c("\\coloncolonminus","\\Coloneq");c("\\minuscolon","\\eqcolon");c("\\minuscoloncolon","\\Eqcolon");c("\\coloncolonapprox","\\Colonapprox");c("\\coloncolonsim","\\Colonsim");c("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");c("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");c("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");c("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");c("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");c("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");c("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");c("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");c("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");c("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");c("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");c("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");c("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");c("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");c("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");c("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");c("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");c("\\nleqq","\\html@mathml{\\@nleqq}{≰}");c("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");c("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");c("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");c("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");c("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");c("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");c("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");c("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");c("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");c("\\imath","\\html@mathml{\\@imath}{ı}");c("\\jmath","\\html@mathml{\\@jmath}{ȷ}");c("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");c("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");c("⟦","\\llbracket");c("⟧","\\rrbracket");c("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");c("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");c("⦃","\\lBrace");c("⦄","\\rBrace");c("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");c("⦵","\\minuso");c("\\darr","\\downarrow");c("\\dArr","\\Downarrow");c("\\Darr","\\Downarrow");c("\\lang","\\langle");c("\\rang","\\rangle");c("\\uarr","\\uparrow");c("\\uArr","\\Uparrow");c("\\Uarr","\\Uparrow");c("\\N","\\mathbb{N}");c("\\R","\\mathbb{R}");c("\\Z","\\mathbb{Z}");c("\\alef","\\aleph");c("\\alefsym","\\aleph");c("\\Alpha","\\mathrm{A}");c("\\Beta","\\mathrm{B}");c("\\bull","\\bullet");c("\\Chi","\\mathrm{X}");c("\\clubs","\\clubsuit");c("\\cnums","\\mathbb{C}");c("\\Complex","\\mathbb{C}");c("\\Dagger","\\ddagger");c("\\diamonds","\\diamondsuit");c("\\empty","\\emptyset");c("\\Epsilon","\\mathrm{E}");c("\\Eta","\\mathrm{H}");c("\\exist","\\exists");c("\\harr","\\leftrightarrow");c("\\hArr","\\Leftrightarrow");c("\\Harr","\\Leftrightarrow");c("\\hearts","\\heartsuit");c("\\image","\\Im");c("\\infin","\\infty");c("\\Iota","\\mathrm{I}");c("\\isin","\\in");c("\\Kappa","\\mathrm{K}");c("\\larr","\\leftarrow");c("\\lArr","\\Leftarrow");c("\\Larr","\\Leftarrow");c("\\lrarr","\\leftrightarrow");c("\\lrArr","\\Leftrightarrow");c("\\Lrarr","\\Leftrightarrow");c("\\Mu","\\mathrm{M}");c("\\natnums","\\mathbb{N}");c("\\Nu","\\mathrm{N}");c("\\Omicron","\\mathrm{O}");c("\\plusmn","\\pm");c("\\rarr","\\rightarrow");c("\\rArr","\\Rightarrow");c("\\Rarr","\\Rightarrow");c("\\real","\\Re");c("\\reals","\\mathbb{R}");c("\\Reals","\\mathbb{R}");c("\\Rho","\\mathrm{P}");c("\\sdot","\\cdot");c("\\sect","\\S");c("\\spades","\\spadesuit");c("\\sub","\\subset");c("\\sube","\\subseteq");c("\\supe","\\supseteq");c("\\Tau","\\mathrm{T}");c("\\thetasym","\\vartheta");c("\\weierp","\\wp");c("\\Zeta","\\mathrm{Z}");c("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");c("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");c("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");c("\\bra","\\mathinner{\\langle{#1}|}");c("\\ket","\\mathinner{|{#1}\\rangle}");c("\\braket","\\mathinner{\\langle{#1}\\rangle}");c("\\Bra","\\left\\langle#1\\right|");c("\\Ket","\\left|#1\\right\\rangle");var ba=r=>e=>{var t=e.consumeArg().tokens,a=e.consumeArg().tokens,n=e.consumeArg().tokens,s=e.consumeArg().tokens,o=e.macros.get("|"),h=e.macros.get("\\|");e.macros.beginGroup();var m=b=>x=>{r&&(x.macros.set("|",o),n.length&&x.macros.set("\\|",h));var w=b;if(!b&&n.length){var M=x.future();M.text==="|"&&(x.popToken(),w=!0)}return{tokens:w?n:a,numArgs:0}};e.macros.set("|",m(!1)),n.length&&e.macros.set("\\|",m(!0));var p=e.consumeArg().tokens,g=e.expandTokens([...s,...p,...t]);return e.macros.endGroup(),{tokens:g.reverse(),numArgs:0}};c("\\bra@ket",ba(!1));c("\\bra@set",ba(!0));c("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");c("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");c("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");c("\\angln","{\\angl n}");c("\\blue","\\textcolor{##6495ed}{#1}");c("\\orange","\\textcolor{##ffa500}{#1}");c("\\pink","\\textcolor{##ff00af}{#1}");c("\\red","\\textcolor{##df0030}{#1}");c("\\green","\\textcolor{##28ae7b}{#1}");c("\\gray","\\textcolor{gray}{#1}");c("\\purple","\\textcolor{##9d38bd}{#1}");c("\\blueA","\\textcolor{##ccfaff}{#1}");c("\\blueB","\\textcolor{##80f6ff}{#1}");c("\\blueC","\\textcolor{##63d9ea}{#1}");c("\\blueD","\\textcolor{##11accd}{#1}");c("\\blueE","\\textcolor{##0c7f99}{#1}");c("\\tealA","\\textcolor{##94fff5}{#1}");c("\\tealB","\\textcolor{##26edd5}{#1}");c("\\tealC","\\textcolor{##01d1c1}{#1}");c("\\tealD","\\textcolor{##01a995}{#1}");c("\\tealE","\\textcolor{##208170}{#1}");c("\\greenA","\\textcolor{##b6ffb0}{#1}");c("\\greenB","\\textcolor{##8af281}{#1}");c("\\greenC","\\textcolor{##74cf70}{#1}");c("\\greenD","\\textcolor{##1fab54}{#1}");c("\\greenE","\\textcolor{##0d923f}{#1}");c("\\goldA","\\textcolor{##ffd0a9}{#1}");c("\\goldB","\\textcolor{##ffbb71}{#1}");c("\\goldC","\\textcolor{##ff9c39}{#1}");c("\\goldD","\\textcolor{##e07d10}{#1}");c("\\goldE","\\textcolor{##a75a05}{#1}");c("\\redA","\\textcolor{##fca9a9}{#1}");c("\\redB","\\textcolor{##ff8482}{#1}");c("\\redC","\\textcolor{##f9685d}{#1}");c("\\redD","\\textcolor{##e84d39}{#1}");c("\\redE","\\textcolor{##bc2612}{#1}");c("\\maroonA","\\textcolor{##ffbde0}{#1}");c("\\maroonB","\\textcolor{##ff92c6}{#1}");c("\\maroonC","\\textcolor{##ed5fa6}{#1}");c("\\maroonD","\\textcolor{##ca337c}{#1}");c("\\maroonE","\\textcolor{##9e034e}{#1}");c("\\purpleA","\\textcolor{##ddd7ff}{#1}");c("\\purpleB","\\textcolor{##c6b9fc}{#1}");c("\\purpleC","\\textcolor{##aa87ff}{#1}");c("\\purpleD","\\textcolor{##7854ab}{#1}");c("\\purpleE","\\textcolor{##543b78}{#1}");c("\\mintA","\\textcolor{##f5f9e8}{#1}");c("\\mintB","\\textcolor{##edf2df}{#1}");c("\\mintC","\\textcolor{##e0e5cc}{#1}");c("\\grayA","\\textcolor{##f6f7f7}{#1}");c("\\grayB","\\textcolor{##f0f1f2}{#1}");c("\\grayC","\\textcolor{##e3e5e6}{#1}");c("\\grayD","\\textcolor{##d6d8da}{#1}");c("\\grayE","\\textcolor{##babec2}{#1}");c("\\grayF","\\textcolor{##888d93}{#1}");c("\\grayG","\\textcolor{##626569}{#1}");c("\\grayH","\\textcolor{##3b3e40}{#1}");c("\\grayI","\\textcolor{##21242c}{#1}");c("\\kaBlue","\\textcolor{##314453}{#1}");c("\\kaGreen","\\textcolor{##71B307}{#1}");var ya={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class Dn{constructor(e,t,a){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new Bn(Nn,t.macros),this.mode=a,this.stack=[]}feed(e){this.lexer=new pr(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,a,n;if(e){if(this.consumeSpaces(),this.future().text!=="[")return null;t=this.popToken(),{tokens:n,end:a}=this.consumeArg(["]"])}else({tokens:n,start:t,end:a}=this.consumeArg());return this.pushToken(new m0("EOF",a.loc)),this.pushTokens(n),new m0("",o0.range(t,a))}consumeSpaces(){for(;;){var e=this.future();if(e.text===" ")this.stack.pop();else break}}consumeArg(e){var t=[],a=e&&e.length>0;a||this.consumeSpaces();var n=this.future(),s,o=0,h=0;do{if(s=this.popToken(),t.push(s),s.text==="{")++o;else if(s.text==="}"){if(--o,o===-1)throw new z("Extra }",s)}else if(s.text==="EOF")throw new z("Unexpected end of input in a macro argument, expected '"+(e&&a?e[h]:"}")+"'",s);if(e&&a)if((o===0||o===1&&e[h]==="{")&&s.text===e[h]){if(++h,h===e.length){t.splice(-h,h);break}}else h=0}while(o!==0||a);return n.text==="{"&&t[t.length-1].text==="}"&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:n,end:s}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new z("The length of delimiters doesn't match the number of args!");for(var a=t[0],n=0;n<a.length;n++){var s=this.popToken();if(a[n]!==s.text)throw new z("Use of the macro doesn't match its definition",s)}}for(var o=[],h=0;h<e;h++)o.push(this.consumeArg(t&&t[h+1]).tokens);return o}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.settings.maxExpand)throw new z("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var t=this.popToken(),a=t.text,n=t.noexpand?null:this._getExpansion(a);if(n==null||e&&n.unexpandable){if(e&&n==null&&a[0]==="\\"&&!this.isDefined(a))throw new z("Undefined control sequence: "+a);return this.pushToken(t),!1}this.countExpansion(1);var s=n.tokens,o=this.consumeArgs(n.numArgs,n.delimiters);if(n.numArgs){s=s.slice();for(var h=s.length-1;h>=0;--h){var m=s[h];if(m.text==="#"){if(h===0)throw new z("Incomplete placeholder at end of macro body",m);if(m=s[--h],m.text==="#")s.splice(h+1,1);else if(/^[1-9]$/.test(m.text))s.splice(h,2,...o[+m.text-1]);else throw new z("Not a valid argument number",m)}}}return this.pushTokens(s),s.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new m0(e)]):void 0}expandTokens(e){var t=[],a=this.stack.length;for(this.pushTokens(e);this.stack.length>a;)if(this.expandOnce(!0)===!1){var n=this.stack.pop();n.treatAsRelax&&(n.noexpand=!1,n.treatAsRelax=!1),t.push(n)}return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);return t&&t.map(a=>a.text).join("")}_getExpansion(e){var t=this.macros.get(e);if(t==null)return t;if(e.length===1){var a=this.lexer.catcodes[e];if(a!=null&&a!==13)return}var n=typeof t=="function"?t(this):t;if(typeof n=="string"){var s=0;if(n.indexOf("#")!==-1)for(var o=n.replace(/##/g,"");o.indexOf("#"+(s+1))!==-1;)++s;for(var h=new pr(n,this.settings),m=[],p=h.lex();p.text!=="EOF";)m.push(p),p=h.lex();m.reverse();var g={tokens:m,numArgs:s};return g}return n}isDefined(e){return this.macros.has(e)||H0.hasOwnProperty(e)||X.math.hasOwnProperty(e)||X.text.hasOwnProperty(e)||ya.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return t!=null?typeof t=="string"||typeof t=="function"||!t.unexpandable:H0.hasOwnProperty(e)&&!H0[e].primitive}}var br=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,ze=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g",ʰ:"h","ⁱ":"i",ʲ:"j","ᵏ":"k",ˡ:"l","ᵐ":"m",ⁿ:"n","ᵒ":"o","ᵖ":"p",ʳ:"r",ˢ:"s","ᵗ":"t","ᵘ":"u","ᵛ":"v",ʷ:"w",ˣ:"x",ʸ:"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),it={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},yr={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class He{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new Dn(e,t,this.mode),this.settings=t,this.leftrightDepth=0}expect(e,t){if(t===void 0&&(t=!0),this.fetch().text!==e)throw new z("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new m0("}")),this.gullet.pushTokens(e);var a=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,a}parseExpression(e,t){for(var a=[];;){this.mode==="math"&&this.consumeSpaces();var n=this.fetch();if(He.endOfExpression.indexOf(n.text)!==-1||t&&n.text===t||e&&H0[n.text]&&H0[n.text].infix)break;var s=this.parseAtom(t);if(s){if(s.type==="internal")continue}else break;a.push(s)}return this.mode==="text"&&this.formLigatures(a),this.handleInfixNodes(a)}handleInfixNodes(e){for(var t=-1,a,n=0;n<e.length;n++)if(e[n].type==="infix"){if(t!==-1)throw new z("only one infix operator per group",e[n].token);t=n,a=e[n].replaceWith}if(t!==-1&&a){var s,o,h=e.slice(0,t),m=e.slice(t+1);h.length===1&&h[0].type==="ordgroup"?s=h[0]:s={type:"ordgroup",mode:this.mode,body:h},m.length===1&&m[0].type==="ordgroup"?o=m[0]:o={type:"ordgroup",mode:this.mode,body:m};var p;return a==="\\\\abovefrac"?p=this.callFunction(a,[s,e[t],o],[]):p=this.callFunction(a,[s,o],[]),[p]}else return e}handleSupSubscript(e){var t=this.fetch(),a=t.text;this.consume(),this.consumeSpaces();var n;do{var s;n=this.parseGroup(e)}while(((s=n)==null?void 0:s.type)==="internal");if(!n)throw new z("Expected group after '"+a+"'",t);return n}formatUnsupportedCmd(e){for(var t=[],a=0;a<e.length;a++)t.push({type:"textord",mode:"text",text:e[a]});var n={type:"text",mode:this.mode,body:t},s={type:"color",mode:this.mode,color:this.settings.errorColor,body:[n]};return s}parseAtom(e){var t=this.parseGroup("atom",e);if(t?.type==="internal"||this.mode==="text")return t;for(var a,n;;){this.consumeSpaces();var s=this.fetch();if(s.text==="\\limits"||s.text==="\\nolimits"){if(t&&t.type==="op"){var o=s.text==="\\limits";t.limits=o,t.alwaysHandleSupSub=!0}else if(t&&t.type==="operatorname")t.alwaysHandleSupSub&&(t.limits=s.text==="\\limits");else throw new z("Limit controls must follow a math operator",s);this.consume()}else if(s.text==="^"){if(a)throw new z("Double superscript",s);a=this.handleSupSubscript("superscript")}else if(s.text==="_"){if(n)throw new z("Double subscript",s);n=this.handleSupSubscript("subscript")}else if(s.text==="'"){if(a)throw new z("Double superscript",s);var h={type:"textord",mode:this.mode,text:"\\prime"},m=[h];for(this.consume();this.fetch().text==="'";)m.push(h),this.consume();this.fetch().text==="^"&&m.push(this.handleSupSubscript("superscript")),a={type:"ordgroup",mode:this.mode,body:m}}else if(ze[s.text]){var p=br.test(s.text),g=[];for(g.push(new m0(ze[s.text])),this.consume();;){var b=this.fetch().text;if(!ze[b]||br.test(b)!==p)break;g.unshift(new m0(ze[b])),this.consume()}var x=this.subparse(g);p?n={type:"ordgroup",mode:"math",body:x}:a={type:"ordgroup",mode:"math",body:x}}else break}return a||n?{type:"supsub",mode:this.mode,base:t,sup:a,sub:n}:t}parseFunction(e,t){var a=this.fetch(),n=a.text,s=H0[n];if(!s)return null;if(this.consume(),t&&t!=="atom"&&!s.allowedInArgument)throw new z("Got function '"+n+"' with no arguments"+(t?" as "+t:""),a);if(this.mode==="text"&&!s.allowedInText)throw new z("Can't use function '"+n+"' in text mode",a);if(this.mode==="math"&&s.allowedInMath===!1)throw new z("Can't use function '"+n+"' in math mode",a);var{args:o,optArgs:h}=this.parseArguments(n,s);return this.callFunction(n,o,h,a,e)}callFunction(e,t,a,n,s){var o={funcName:e,parser:this,token:n,breakOnTokenText:s},h=H0[e];if(h&&h.handler)return h.handler(o,t,a);throw new z("No function handler for "+e)}parseArguments(e,t){var a=t.numArgs+t.numOptionalArgs;if(a===0)return{args:[],optArgs:[]};for(var n=[],s=[],o=0;o<a;o++){var h=t.argTypes&&t.argTypes[o],m=o<t.numOptionalArgs;(t.primitive&&h==null||t.type==="sqrt"&&o===1&&s[0]==null)&&(h="primitive");var p=this.parseGroupOfType("argument to '"+e+"'",h,m);if(m)s.push(p);else if(p!=null)n.push(p);else throw new z("Null argument, please report this as a bug")}return{args:n,optArgs:s}}parseGroupOfType(e,t,a){switch(t){case"color":return this.parseColorGroup(a);case"size":return this.parseSizeGroup(a);case"url":return this.parseUrlGroup(a);case"math":case"text":return this.parseArgumentGroup(a,t);case"hbox":{var n=this.parseArgumentGroup(a,"text");return n!=null?{type:"styling",mode:n.mode,body:[n],style:"text"}:null}case"raw":{var s=this.parseStringGroup("raw",a);return s!=null?{type:"raw",mode:"text",string:s.text}:null}case"primitive":{if(a)throw new z("A primitive argument cannot be optional");var o=this.parseGroup(e);if(o==null)throw new z("Expected group as "+e,this.fetch());return o}case"original":case null:case void 0:return this.parseArgumentGroup(a);default:throw new z("Unknown group type as "+e,this.fetch())}}consumeSpaces(){for(;this.fetch().text===" ";)this.consume()}parseStringGroup(e,t){var a=this.gullet.scanArgument(t);if(a==null)return null;for(var n="",s;(s=this.fetch()).text!=="EOF";)n+=s.text,this.consume();return this.consume(),a.text=n,a}parseRegexGroup(e,t){for(var a=this.fetch(),n=a,s="",o;(o=this.fetch()).text!=="EOF"&&e.test(s+o.text);)n=o,s+=n.text,this.consume();if(s==="")throw new z("Invalid "+t+": '"+a.text+"'",a);return a.range(n,s)}parseColorGroup(e){var t=this.parseStringGroup("color",e);if(t==null)return null;var a=/^(#[a-f0-9]{3,4}|#[a-f0-9]{6}|#[a-f0-9]{8}|[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);if(!a)throw new z("Invalid color: '"+t.text+"'",t);var n=a[0];return/^[0-9a-f]{6}$/i.test(n)&&(n="#"+n),{type:"color-token",mode:this.mode,color:n}}parseSizeGroup(e){var t,a=!1;if(this.gullet.consumeSpaces(),!e&&this.gullet.future().text!=="{"?t=this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size"):t=this.parseStringGroup("size",e),!t)return null;!e&&t.text.length===0&&(t.text="0pt",a=!0);var n=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!n)throw new z("Invalid size: '"+t.text+"'",t);var s={number:+(n[1]+n[2]),unit:n[3]};if(!Nr(s))throw new z("Invalid unit: '"+s.unit+"'",t);return{type:"size",mode:this.mode,value:s,isBlank:a}}parseUrlGroup(e){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var t=this.parseStringGroup("url",e);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),t==null)return null;var a=t.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:a}}parseArgumentGroup(e,t){var a=this.gullet.scanArgument(e);if(a==null)return null;var n=this.mode;t&&this.switchMode(t),this.gullet.beginGroup();var s=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var o={type:"ordgroup",mode:this.mode,loc:a.loc,body:s};return t&&this.switchMode(n),o}parseGroup(e,t){var a=this.fetch(),n=a.text,s;if(n==="{"||n==="\\begingroup"){this.consume();var o=n==="{"?"}":"\\endgroup";this.gullet.beginGroup();var h=this.parseExpression(!1,o),m=this.fetch();this.expect(o),this.gullet.endGroup(),s={type:"ordgroup",mode:this.mode,loc:o0.range(a,m),body:h,semisimple:n==="\\begingroup"||void 0}}else if(s=this.parseFunction(t,e)||this.parseSymbol(),s==null&&n[0]==="\\"&&!ya.hasOwnProperty(n)){if(this.settings.throwOnError)throw new z("Undefined control sequence: "+n,a);s=this.formatUnsupportedCmd(n),this.consume()}return s}formLigatures(e){for(var t=e.length-1,a=0;a<t;++a){var n=e[a],s=n.text;s==="-"&&e[a+1].text==="-"&&(a+1<t&&e[a+2].text==="-"?(e.splice(a,3,{type:"textord",mode:"text",loc:o0.range(n,e[a+2]),text:"---"}),t-=2):(e.splice(a,2,{type:"textord",mode:"text",loc:o0.range(n,e[a+1]),text:"--"}),t-=1)),(s==="'"||s==="`")&&e[a+1].text===s&&(e.splice(a,2,{type:"textord",mode:"text",loc:o0.range(n,e[a+1]),text:s+s}),t-=1)}}parseSymbol(){var e=this.fetch(),t=e.text;if(/^\\verb[^a-zA-Z]/.test(t)){this.consume();var a=t.slice(5),n=a.charAt(0)==="*";if(n&&(a=a.slice(1)),a.length<2||a.charAt(0)!==a.slice(-1))throw new z(`\\verb assertion failed --
261
- please report what input caused this bug`);return a=a.slice(1,-1),{type:"verb",mode:"text",body:a,star:n}}yr.hasOwnProperty(t[0])&&!X[this.mode][t[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+t[0]+'" used in math mode',e),t=yr[t[0]]+t.slice(1));var s=An.exec(t);s&&(t=t.substring(0,s.index),t==="i"?t="ı":t==="j"&&(t="ȷ"));var o;if(X[this.mode][t]){this.settings.strict&&this.mode==="math"&&ut.indexOf(t)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var h=X[this.mode][t].group,m=o0.range(e),p;if(g1.hasOwnProperty(h)){var g=h;p={type:"atom",mode:this.mode,family:g,loc:m,text:t}}else p={type:h,mode:this.mode,loc:m,text:t};o=p}else if(t.charCodeAt(0)>=128)this.settings.strict&&(Br(t.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'"'+(" ("+t.charCodeAt(0)+")"),e)),o={type:"textord",mode:"text",loc:o0.range(e),text:t};else return null;if(this.consume(),s)for(var b=0;b<s[0].length;b++){var x=s[0][b];if(!it[x])throw new z("Unknown accent ' "+x+"'",e);var w=it[x][this.mode]||it[x].text;if(!w)throw new z("Accent "+x+" unsupported in "+this.mode+" mode",e);o={type:"accent",mode:this.mode,loc:o0.range(e),label:w,isStretchy:!1,isShifty:!0,base:o}}return o}}He.endOfExpression=["}","\\endgroup","\\end","\\right","&"];var It=function(e,t){if(!(typeof e=="string"||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var a=new He(e,t);delete a.gullet.macros.current["\\df@tag"];var n=a.parse();if(delete a.gullet.macros.current["\\current@color"],delete a.gullet.macros.current["\\color"],a.gullet.macros.get("\\df@tag")){if(!t.displayMode)throw new z("\\tag works only in display equations");n=[{type:"tag",mode:"text",body:n,tag:a.subparse([new m0("\\df@tag")])}]}return n},xa=function(e,t,a){t.textContent="";var n=Rt(e,a).toNode();t.appendChild(n)};typeof document<"u"&&document.compatMode!=="CSS1Compat"&&(typeof console<"u"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),xa=function(){throw new z("KaTeX doesn't work in quirks mode.")});var Cn=function(e,t){var a=Rt(e,t).toMarkup();return a},qn=function(e,t){var a=new vt(t);return It(e,a)},wa=function(e,t,a){if(a.throwOnError||!(e instanceof z))throw e;var n=y.makeSpan(["katex-error"],[new p0(t)]);return n.setAttribute("title",e.toString()),n.setAttribute("style","color:"+a.errorColor),n},Rt=function(e,t){var a=new vt(t);try{var n=It(e,a);return P1(n,e,a)}catch(s){return wa(s,e,a)}},En=function(e,t){var a=new vt(t);try{var n=It(e,a);return V1(n,e,a)}catch(s){return wa(s,e,a)}},In="0.16.27",Rn={Span:me,Anchor:yt,SymbolNode:p0,SvgNode:D0,PathNode:V0,LineNode:ot},xr={version:In,render:xa,renderToString:Cn,ParseError:z,SETTINGS_SCHEMA:Ae,__parse:qn,__renderToDomTree:Rt,__renderToHTMLTree:En,__setFontMetrics:u1,__defineSymbol:i,__defineFunction:B,__defineMacro:c,__domTree:Rn};function On(r,e){return ka(r,{})||{type:"root",children:[]}}function ka(r,e){const t=Fn(r,e);return t&&e.afterTransform&&e.afterTransform(r,t),t}function Fn(r,e){switch(r.nodeType){case 1:return Vn(r,e);case 3:return Hn(r);case 8:return Pn(r);case 9:return wr(r,e);case 10:return Ln();case 11:return wr(r,e);default:return}}function wr(r,e){return{type:"root",children:Sa(r,e)}}function Ln(){return{type:"doctype"}}function Hn(r){return{type:"text",value:r.nodeValue||""}}function Pn(r){return{type:"comment",value:r.nodeValue||""}}function Vn(r,e){const t=r.namespaceURI,a=t===Ye.svg?Ca:qa,n=t===Ye.html?r.tagName.toLowerCase():r.tagName,s=t===Ye.html&&n==="template"?r.content:r,o=r.getAttributeNames(),h={};let m=-1;for(;++m<o.length;)h[o[m]]=r.getAttribute(o[m])||"";return a(n,h,Sa(s,e))}function Sa(r,e){const t=r.childNodes,a=[];let n=-1;for(;++n<t.length;){const s=ka(t[n],e);s!==void 0&&a.push(s)}return a}new DOMParser;function Gn(r,e){const t=Un(r);return On(t)}function Un(r){const e=document.createElement("template");return e.innerHTML=r,e.content}const kr=(function(r,e,t){const a=Ea(t);if(!r||!r.type||!r.children)throw new Error("Expected parent node");if(typeof e=="number"){if(e<0||e===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(e=r.children.indexOf(e),e<0)throw new Error("Expected child node or index");for(;++e<r.children.length;)if(a(r.children[e],e,r))return r.children[e]}),j0=(function(r){if(r==null)return Xn;if(typeof r=="string")return $n(r);if(typeof r=="object")return Yn(r);if(typeof r=="function")return Ot(r);throw new Error("Expected function, string, or array as `test`")});function Yn(r){const e=[];let t=-1;for(;++t<r.length;)e[t]=j0(r[t]);return Ot(a);function a(...n){let s=-1;for(;++s<e.length;)if(e[s].apply(this,n))return!0;return!1}}function $n(r){return Ot(e);function e(t){return t.tagName===r}}function Ot(r){return e;function e(t,a,n){return!!(Wn(t)&&r.call(this,t,typeof a=="number"?a:void 0,n||void 0))}}function Xn(r){return!!(r&&typeof r=="object"&&"type"in r&&r.type==="element"&&"tagName"in r&&typeof r.tagName=="string")}function Wn(r){return r!==null&&typeof r=="object"&&"type"in r&&"tagName"in r}const Sr=/\n/g,Mr=/[\t ]+/g,pt=j0("br"),zr=j0(t4),jn=j0("p"),Ar=j0("tr"),Zn=j0(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",e4,r4]),Ma=j0(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function Kn(r,e){const t=e||{},a="children"in r?r.children:[],n=Ma(r),s=Ta(r,{whitespace:t.whitespace||"normal"}),o=[];(r.type==="text"||r.type==="comment")&&o.push(...Aa(r,{breakBefore:!0,breakAfter:!0}));let h=-1;for(;++h<a.length;)o.push(...za(a[h],r,{whitespace:s,breakBefore:h?void 0:n,breakAfter:h<a.length-1?pt(a[h+1]):n}));const m=[];let p;for(h=-1;++h<o.length;){const g=o[h];typeof g=="number"?p!==void 0&&g>p&&(p=g):g&&(p!==void 0&&p>-1&&m.push(`
261
+ please report what input caused this bug`);return a=a.slice(1,-1),{type:"verb",mode:"text",body:a,star:n}}yr.hasOwnProperty(t[0])&&!X[this.mode][t[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+t[0]+'" used in math mode',e),t=yr[t[0]]+t.slice(1));var s=An.exec(t);s&&(t=t.substring(0,s.index),t==="i"?t="ı":t==="j"&&(t="ȷ"));var o;if(X[this.mode][t]){this.settings.strict&&this.mode==="math"&&ut.indexOf(t)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var h=X[this.mode][t].group,m=o0.range(e),p;if(g1.hasOwnProperty(h)){var g=h;p={type:"atom",mode:this.mode,family:g,loc:m,text:t}}else p={type:h,mode:this.mode,loc:m,text:t};o=p}else if(t.charCodeAt(0)>=128)this.settings.strict&&(Br(t.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'"'+(" ("+t.charCodeAt(0)+")"),e)),o={type:"textord",mode:"text",loc:o0.range(e),text:t};else return null;if(this.consume(),s)for(var b=0;b<s[0].length;b++){var x=s[0][b];if(!it[x])throw new z("Unknown accent ' "+x+"'",e);var w=it[x][this.mode]||it[x].text;if(!w)throw new z("Accent "+x+" unsupported in "+this.mode+" mode",e);o={type:"accent",mode:this.mode,loc:o0.range(e),label:w,isStretchy:!1,isShifty:!0,base:o}}return o}}He.endOfExpression=["}","\\endgroup","\\end","\\right","&"];var It=function(e,t){if(!(typeof e=="string"||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var a=new He(e,t);delete a.gullet.macros.current["\\df@tag"];var n=a.parse();if(delete a.gullet.macros.current["\\current@color"],delete a.gullet.macros.current["\\color"],a.gullet.macros.get("\\df@tag")){if(!t.displayMode)throw new z("\\tag works only in display equations");n=[{type:"tag",mode:"text",body:n,tag:a.subparse([new m0("\\df@tag")])}]}return n},xa=function(e,t,a){t.textContent="";var n=Rt(e,a).toNode();t.appendChild(n)};typeof document<"u"&&document.compatMode!=="CSS1Compat"&&(typeof console<"u"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),xa=function(){throw new z("KaTeX doesn't work in quirks mode.")});var Cn=function(e,t){var a=Rt(e,t).toMarkup();return a},qn=function(e,t){var a=new vt(t);return It(e,a)},wa=function(e,t,a){if(a.throwOnError||!(e instanceof z))throw e;var n=y.makeSpan(["katex-error"],[new p0(t)]);return n.setAttribute("title",e.toString()),n.setAttribute("style","color:"+a.errorColor),n},Rt=function(e,t){var a=new vt(t);try{var n=It(e,a);return P1(n,e,a)}catch(s){return wa(s,e,a)}},En=function(e,t){var a=new vt(t);try{var n=It(e,a);return V1(n,e,a)}catch(s){return wa(s,e,a)}},In="0.16.28",Rn={Span:me,Anchor:yt,SymbolNode:p0,SvgNode:D0,PathNode:V0,LineNode:ot},xr={version:In,render:xa,renderToString:Cn,ParseError:z,SETTINGS_SCHEMA:Ae,__parse:qn,__renderToDomTree:Rt,__renderToHTMLTree:En,__setFontMetrics:u1,__defineSymbol:i,__defineFunction:B,__defineMacro:c,__domTree:Rn};function On(r,e){return ka(r,{})||{type:"root",children:[]}}function ka(r,e){const t=Fn(r,e);return t&&e.afterTransform&&e.afterTransform(r,t),t}function Fn(r,e){switch(r.nodeType){case 1:return Vn(r,e);case 3:return Hn(r);case 8:return Pn(r);case 9:return wr(r,e);case 10:return Ln();case 11:return wr(r,e);default:return}}function wr(r,e){return{type:"root",children:Sa(r,e)}}function Ln(){return{type:"doctype"}}function Hn(r){return{type:"text",value:r.nodeValue||""}}function Pn(r){return{type:"comment",value:r.nodeValue||""}}function Vn(r,e){const t=r.namespaceURI,a=t===Ye.svg?Ca:qa,n=t===Ye.html?r.tagName.toLowerCase():r.tagName,s=t===Ye.html&&n==="template"?r.content:r,o=r.getAttributeNames(),h={};let m=-1;for(;++m<o.length;)h[o[m]]=r.getAttribute(o[m])||"";return a(n,h,Sa(s,e))}function Sa(r,e){const t=r.childNodes,a=[];let n=-1;for(;++n<t.length;){const s=ka(t[n],e);s!==void 0&&a.push(s)}return a}new DOMParser;function Gn(r,e){const t=Un(r);return On(t)}function Un(r){const e=document.createElement("template");return e.innerHTML=r,e.content}const kr=(function(r,e,t){const a=Ea(t);if(!r||!r.type||!r.children)throw new Error("Expected parent node");if(typeof e=="number"){if(e<0||e===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(e=r.children.indexOf(e),e<0)throw new Error("Expected child node or index");for(;++e<r.children.length;)if(a(r.children[e],e,r))return r.children[e]}),j0=(function(r){if(r==null)return Xn;if(typeof r=="string")return $n(r);if(typeof r=="object")return Yn(r);if(typeof r=="function")return Ot(r);throw new Error("Expected function, string, or array as `test`")});function Yn(r){const e=[];let t=-1;for(;++t<r.length;)e[t]=j0(r[t]);return Ot(a);function a(...n){let s=-1;for(;++s<e.length;)if(e[s].apply(this,n))return!0;return!1}}function $n(r){return Ot(e);function e(t){return t.tagName===r}}function Ot(r){return e;function e(t,a,n){return!!(Wn(t)&&r.call(this,t,typeof a=="number"?a:void 0,n||void 0))}}function Xn(r){return!!(r&&typeof r=="object"&&"type"in r&&r.type==="element"&&"tagName"in r&&typeof r.tagName=="string")}function Wn(r){return r!==null&&typeof r=="object"&&"type"in r&&"tagName"in r}const Sr=/\n/g,Mr=/[\t ]+/g,pt=j0("br"),zr=j0(t4),jn=j0("p"),Ar=j0("tr"),Zn=j0(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",e4,r4]),Ma=j0(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function Kn(r,e){const t=e||{},a="children"in r?r.children:[],n=Ma(r),s=Ta(r,{whitespace:t.whitespace||"normal"}),o=[];(r.type==="text"||r.type==="comment")&&o.push(...Aa(r,{breakBefore:!0,breakAfter:!0}));let h=-1;for(;++h<a.length;)o.push(...za(a[h],r,{whitespace:s,breakBefore:h?void 0:n,breakAfter:h<a.length-1?pt(a[h+1]):n}));const m=[];let p;for(h=-1;++h<o.length;){const g=o[h];typeof g=="number"?p!==void 0&&g>p&&(p=g):g&&(p!==void 0&&p>-1&&m.push(`
262
262
  `.repeat(p)||" "),p=-1,m.push(g))}return m.join("")}function za(r,e,t){return r.type==="element"?Jn(r,e,t):r.type==="text"?t.whitespace==="normal"?Aa(r,t):Qn(r):[]}function Jn(r,e,t){const a=Ta(r,t),n=r.children||[];let s=-1,o=[];if(Zn(r))return o;let h,m;for(pt(r)||Ar(r)&&kr(e,r,Ar)?m=`
263
263
  `:jn(r)?(h=2,m=2):Ma(r)&&(h=1,m=1);++s<n.length;)o=o.concat(za(n[s],r,{whitespace:a,breakBefore:s?void 0:h,breakAfter:s<n.length-1?pt(n[s+1]):m}));return zr(r)&&kr(e,r,zr)&&o.push(" "),h&&o.unshift(h),m&&o.push(m),o}function Aa(r,e){const t=String(r.value),a=[],n=[];let s=0;for(;s<=t.length;){Sr.lastIndex=s;const m=Sr.exec(t),p=m&&"index"in m?m.index:t.length;a.push(_n(t.slice(s,p).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),s===0?e.breakBefore:!0,p===t.length?e.breakAfter:!0)),s=p+1}let o=-1,h;for(;++o<a.length;)a[o].charCodeAt(a[o].length-1)===8203||o<a.length-1&&a[o+1].charCodeAt(0)===8203?(n.push(a[o]),h=void 0):a[o]?(typeof h=="number"&&n.push(h),n.push(a[o]),h=0):(o===0||o===a.length-1)&&n.push(0);return n}function Qn(r){return[String(r.value)]}function _n(r,e,t){const a=[];let n=0,s;for(;n<r.length;){Mr.lastIndex=n;const o=Mr.exec(r);s=o?o.index:r.length,!n&&!s&&o&&!e&&a.push(""),n!==s&&a.push(r.slice(n,s)),n=o?s+o[0].length:s}return n!==s&&!t&&a.push(""),a.join(" ")}function Ta(r,e){if(r.type==="element"){const t=r.properties||{};switch(r.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return t.wrap?"pre-wrap":"pre";case"td":case"th":return t.noWrap?"nowrap":e.whitespace;case"textarea":return"pre-wrap"}}return e.whitespace}function e4(r){return!!(r.properties||{}).hidden}function t4(r){return r.tagName==="td"||r.tagName==="th"}function r4(r){return r.tagName==="dialog"&&!(r.properties||{}).open}const a4={},n4=[];function o4(r){const e=r||a4;return function(t,a){Ia(t,"element",function(n,s){const o=Array.isArray(n.properties.className)?n.properties.className:n4,h=o.includes("language-math"),m=o.includes("math-display"),p=o.includes("math-inline");let g=m;if(!h&&!m&&!p)return;let b=s[s.length-1],x=n;if(n.tagName==="code"&&h&&b&&b.type==="element"&&b.tagName==="pre"&&(x=b,b=s[s.length-2],g=!0),!b)return;const w=Kn(x,{whitespace:"pre"});let M;try{M=xr.renderToString(w,{...e,displayMode:g,throwOnError:!0})}catch(D){const C=D,I=C.name.toLowerCase();a.message("Could not render math with KaTeX",{ancestors:[...s,n],cause:C,place:n.position,ruleId:I,source:"rehype-katex"});try{M=xr.renderToString(w,{...e,displayMode:g,strict:"ignore",throwOnError:!1})}catch{M=[{type:"element",tagName:"span",properties:{className:["katex-error"],style:"color:"+(e.errorColor||"#cc0000"),title:String(D)},children:[{type:"text",value:w}]}]}}typeof M=="string"&&(M=Gn(M).children);const T=b.children.indexOf(x);return b.children.splice(T,1,...M),Ra})}}export{o4 as default};