streamlit 1.48.0__py3-none-any.whl → 1.49.0__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 (208) hide show
  1. streamlit/__init__.py +3 -10
  2. streamlit/commands/logo.py +4 -3
  3. streamlit/commands/navigation.py +1 -1
  4. streamlit/commands/page_config.py +4 -1
  5. streamlit/components/v1/custom_component.py +2 -2
  6. streamlit/config.py +82 -1
  7. streamlit/connections/snowflake_connection.py +3 -1
  8. streamlit/delta_generator.py +3 -0
  9. streamlit/elements/arrow.py +155 -70
  10. streamlit/elements/bokeh_chart.py +13 -3
  11. streamlit/elements/deck_gl_json_chart.py +0 -1
  12. streamlit/elements/dialog_decorator.py +7 -59
  13. streamlit/elements/form.py +10 -1
  14. streamlit/elements/graphviz_chart.py +57 -6
  15. streamlit/elements/heading.py +17 -16
  16. streamlit/elements/iframe.py +13 -22
  17. streamlit/elements/image.py +64 -37
  18. streamlit/elements/layouts.py +2 -2
  19. streamlit/elements/lib/built_in_chart_utils.py +2 -5
  20. streamlit/elements/lib/column_config_utils.py +18 -4
  21. streamlit/elements/lib/column_types.py +75 -30
  22. streamlit/elements/lib/dialog.py +3 -3
  23. streamlit/elements/lib/image_utils.py +19 -11
  24. streamlit/elements/lib/layout_utils.py +15 -2
  25. streamlit/elements/lib/utils.py +20 -41
  26. streamlit/elements/markdown.py +7 -6
  27. streamlit/elements/media.py +6 -13
  28. streamlit/elements/metric.py +78 -1
  29. streamlit/elements/pdf.py +192 -0
  30. streamlit/elements/plotly_chart.py +3 -2
  31. streamlit/elements/pyplot.py +53 -11
  32. streamlit/elements/toast.py +81 -5
  33. streamlit/elements/vega_charts.py +3 -8
  34. streamlit/elements/widgets/audio_input.py +0 -1
  35. streamlit/elements/widgets/button.py +0 -4
  36. streamlit/elements/widgets/button_group.py +5 -4
  37. streamlit/elements/widgets/camera_input.py +0 -1
  38. streamlit/elements/widgets/chat.py +11 -13
  39. streamlit/elements/widgets/checkbox.py +0 -1
  40. streamlit/elements/widgets/color_picker.py +0 -1
  41. streamlit/elements/widgets/data_editor.py +142 -62
  42. streamlit/elements/widgets/file_uploader.py +74 -37
  43. streamlit/elements/widgets/multiselect.py +0 -1
  44. streamlit/elements/widgets/number_input.py +0 -1
  45. streamlit/elements/widgets/radio.py +0 -1
  46. streamlit/elements/widgets/select_slider.py +0 -1
  47. streamlit/elements/widgets/selectbox.py +0 -1
  48. streamlit/elements/widgets/slider.py +0 -1
  49. streamlit/elements/widgets/text_widgets.py +0 -2
  50. streamlit/elements/widgets/time_widgets.py +0 -2
  51. streamlit/errors.py +11 -0
  52. streamlit/material_icon_names.py +1 -1
  53. streamlit/proto/Arrow_pb2.py +14 -8
  54. streamlit/proto/Arrow_pb2.pyi +11 -3
  55. streamlit/proto/Block_pb2.py +16 -16
  56. streamlit/proto/Block_pb2.pyi +2 -0
  57. streamlit/proto/ChatInput_pb2.py +3 -3
  58. streamlit/proto/ChatInput_pb2.pyi +2 -0
  59. streamlit/proto/FileUploader_pb2.py +2 -2
  60. streamlit/proto/FileUploader_pb2.pyi +5 -1
  61. streamlit/proto/GraphVizChart_pb2.py +4 -2
  62. streamlit/proto/GraphVizChart_pb2.pyi +1 -1
  63. streamlit/proto/IFrame_pb2.py +8 -2
  64. streamlit/proto/IFrame_pb2.pyi +3 -0
  65. streamlit/proto/Image_pb2.py +4 -2
  66. streamlit/proto/Image_pb2.pyi +1 -10
  67. streamlit/proto/Metric_pb2.py +8 -6
  68. streamlit/proto/Metric_pb2.pyi +34 -10
  69. streamlit/proto/Toast_pb2.py +2 -2
  70. streamlit/proto/Toast_pb2.pyi +10 -1
  71. streamlit/runtime/caching/__init__.py +14 -2
  72. streamlit/runtime/caching/cache_data_api.py +0 -17
  73. streamlit/runtime/caching/cache_resource_api.py +0 -16
  74. streamlit/runtime/caching/cached_message_replay.py +8 -20
  75. streamlit/runtime/caching/hashing.py +31 -1
  76. streamlit/runtime/credentials.py +4 -4
  77. streamlit/runtime/fragment.py +0 -42
  78. streamlit/runtime/websocket_session_manager.py +1 -1
  79. streamlit/static/index.html +2 -2
  80. streamlit/static/manifest.json +224 -252
  81. streamlit/static/static/css/{index.CJVRHjQZ.css → index.C8X8rNzw.css} +1 -1
  82. streamlit/static/static/css/index.COe1010n.css +1 -0
  83. streamlit/static/static/js/{ErrorOutline.esm.D_4oFNKB.js → ErrorOutline.esm.u9XvzxL8.js} +1 -1
  84. streamlit/static/static/js/{FileDownload.esm.NPgaLlUE.js → FileDownload.esm.CaRyZ-b2.js} +1 -1
  85. streamlit/static/static/js/FileHelper.Dk2SwIi3.js +5 -0
  86. streamlit/static/static/js/FormClearHelper.l_UPPvkg.js +1 -0
  87. streamlit/static/static/js/{Hooks.BGm9sd4U.js → Hooks.BxrVEftw.js} +1 -1
  88. streamlit/static/static/js/InputInstructions.C254RU9X.js +1 -0
  89. streamlit/static/static/js/Particles.DkY6FDnc.js +1 -0
  90. streamlit/static/static/js/ProgressBar.BPtSM82n.js +2 -0
  91. streamlit/static/static/js/Toolbar.BO_3WBaS.js +1 -0
  92. streamlit/static/static/js/{base-input.DeBqm5mN.js → base-input.egUI4LjJ.js} +4 -4
  93. streamlit/static/static/js/{checkbox.C0odQfKb.js → checkbox.ButpszcE.js} +2 -2
  94. streamlit/static/static/js/createSuper.DYJA5xa6.js +1 -0
  95. streamlit/static/static/js/data-grid-overlay-editor.C9gQLEnU.js +1 -0
  96. streamlit/static/static/js/{downloader.Bx1D0jhz.js → downloader.B3TjsSPZ.js} +1 -1
  97. streamlit/static/static/js/es6.BYSNuG4D.js +2 -0
  98. streamlit/static/static/js/iframeResizer.contentWindow.CNPHJsF2.js +1 -0
  99. streamlit/static/static/js/index.0tDq1WXk.js +1 -0
  100. streamlit/static/static/js/index.BBnWuh07.js +976 -0
  101. streamlit/static/static/js/index.BDZorv41.js +1 -0
  102. streamlit/static/static/js/{index.DwaoC4Zp.js → index.BH79B25f.js} +3 -3
  103. streamlit/static/static/js/index.BeTC4Yl-.js +197 -0
  104. streamlit/static/static/js/index.BnOd05Ko.js +2 -0
  105. streamlit/static/static/js/index.BoJaJReB.js +1 -0
  106. streamlit/static/static/js/index.Bp1Of6L8.js +1 -0
  107. streamlit/static/static/js/index.Bpe4-O2W.js +1 -0
  108. streamlit/static/static/js/index.BrD9sbpx.js +1 -0
  109. streamlit/static/static/js/index.C1qCS-sd.js +1 -0
  110. streamlit/static/static/js/index.C3EXAI-u.js +1 -0
  111. streamlit/static/static/js/index.C77g9sAQ.js +3 -0
  112. streamlit/static/static/js/{index.PyIqRRSR.js → index.CFePF7s4.js} +1 -1
  113. streamlit/static/static/js/index.CFjU0x00.js +1 -0
  114. streamlit/static/static/js/index.Ca3y4ztK.js +1 -0
  115. streamlit/static/static/js/{index.ClRTsv8m.js → index.Cb9gN2T2.js} +2 -2
  116. streamlit/static/static/js/{index.wDYef4mQ.js → index.CbwuUwu4.js} +9 -9
  117. streamlit/static/static/js/index.CeXLlclc.js +1 -0
  118. streamlit/static/static/js/index.CfiZGqj3.js +3 -0
  119. streamlit/static/static/js/index.CjQnYKID.js +1 -0
  120. streamlit/static/static/js/index.Cl_966eE.js +3858 -0
  121. streamlit/static/static/js/{index.DCpyIFTV.js → index.CqSRo6zQ.js} +1 -1
  122. streamlit/static/static/js/index.CuEFSQ-o.js +1 -0
  123. streamlit/static/static/js/index.D4jR1m1z.js +1 -0
  124. streamlit/static/static/js/index.DGcW849X.js +1 -0
  125. streamlit/static/static/js/index.DKb-BAE2.js +1 -0
  126. streamlit/static/static/js/index.DP1rDFP0.js +1 -0
  127. streamlit/static/static/js/{index.HeVbRh9H.js → index.DStzYLqM.js} +2 -2
  128. streamlit/static/static/js/index.DVKQKDLu.js +1 -0
  129. streamlit/static/static/js/index.DWedOrkQ.js +1 -0
  130. streamlit/static/static/js/index.DYbRPmVF.js +1 -0
  131. streamlit/static/static/js/index.DgpIMUsr.js +1 -0
  132. streamlit/static/static/js/index.DtwkPJs5.js +5367 -0
  133. streamlit/static/static/js/{index.CnfWsQzS.js → index.MQLQLR5Z.js} +1 -1
  134. streamlit/static/static/js/index.uInpwWAP.js +1 -0
  135. streamlit/static/static/js/index.z992t-BQ.js +7 -0
  136. streamlit/static/static/js/{input.BL2buuce.js → input.CbP5ZuQ7.js} +2 -2
  137. streamlit/static/static/js/{memory.CUxjUWS7.js → memory.BuacVo2L.js} +1 -1
  138. streamlit/static/static/js/number-overlay-editor.BZb9zRl_.js +9 -0
  139. streamlit/static/static/js/{possibleConstructorReturn.DbvQboK3.js → possibleConstructorReturn.DSM84rOS.js} +1 -1
  140. streamlit/static/static/js/{sandbox.6lnFVWhX.js → sandbox.C480llMG.js} +1 -1
  141. streamlit/static/static/js/{timepicker.Bg4xAK95.js → timepicker.BunxCVp7.js} +4 -4
  142. streamlit/static/static/js/{toConsumableArray.D9x7Ktv4.js → toConsumableArray.B4o8rEx1.js} +3 -3
  143. streamlit/static/static/js/uniqueId.tii0yosY.js +1 -0
  144. streamlit/static/static/js/{useBasicWidgetState.CUSYQZpm.js → useBasicWidgetState.Bnm4FD6K.js} +1 -1
  145. streamlit/static/static/js/useTextInputAutoExpand.Dgtwc1m0.js +2 -0
  146. streamlit/static/static/js/useUpdateUiValue.DjXdMFGw.js +1 -0
  147. streamlit/static/static/js/withFullScreenWrapper.0cy2pVf5.js +1 -0
  148. streamlit/static/static/media/MaterialSymbols-Rounded.CBxVaFdk.woff2 +0 -0
  149. streamlit/user_info.py +16 -13
  150. streamlit/web/server/browser_websocket_handler.py +15 -0
  151. streamlit/web/server/oauth_authlib_routes.py +3 -59
  152. {streamlit-1.48.0.dist-info → streamlit-1.49.0.dist-info}/METADATA +4 -2
  153. {streamlit-1.48.0.dist-info → streamlit-1.49.0.dist-info}/RECORD +157 -160
  154. streamlit/static/static/css/index.CQt5TjGB.css +0 -1
  155. streamlit/static/static/js/FileHelper.B2t9ikoS.js +0 -5
  156. streamlit/static/static/js/FormClearHelper.BLEIUk6L.js +0 -1
  157. streamlit/static/static/js/InputInstructions.DtUxCBS8.js +0 -1
  158. streamlit/static/static/js/Particles.BDRPO7r3.js +0 -1
  159. streamlit/static/static/js/ProgressBar.B64DUUqp.js +0 -2
  160. streamlit/static/static/js/Toolbar.B3FquPk5.js +0 -1
  161. streamlit/static/static/js/createSuper.DqQ5L3XG.js +0 -1
  162. streamlit/static/static/js/data-grid-overlay-editor.DbNsQa8Y.js +0 -1
  163. streamlit/static/static/js/es6.CbPK4m0H.js +0 -2
  164. streamlit/static/static/js/iframeResizer.contentWindow.CfLKrptA.js +0 -1
  165. streamlit/static/static/js/index.0XDwe9RV.js +0 -203
  166. streamlit/static/static/js/index.4lI9TuZm.js +0 -3
  167. streamlit/static/static/js/index.6s0nVIis.js +0 -3855
  168. streamlit/static/static/js/index.9E7bRUBU.js +0 -1
  169. streamlit/static/static/js/index.B9PgeLrZ.js +0 -1
  170. streamlit/static/static/js/index.B9vzGbOt.js +0 -1
  171. streamlit/static/static/js/index.BDrQKMCm.js +0 -1
  172. streamlit/static/static/js/index.BPsoiGgP.js +0 -1
  173. streamlit/static/static/js/index.CJzdLAun.js +0 -1
  174. streamlit/static/static/js/index.CNNlC1NL.js +0 -1
  175. streamlit/static/static/js/index.CO1sClzJ.js +0 -2
  176. streamlit/static/static/js/index.CZnagxXD.js +0 -1
  177. streamlit/static/static/js/index.Cb0xSF7V.js +0 -5366
  178. streamlit/static/static/js/index.CgUt3tz_.js +0 -1
  179. streamlit/static/static/js/index.CjImmcsV.js +0 -1
  180. streamlit/static/static/js/index.CrJ1XD_V.js +0 -1
  181. streamlit/static/static/js/index.CtiKsjSC.js +0 -1
  182. streamlit/static/static/js/index.CwAuytgV.js +0 -1
  183. streamlit/static/static/js/index.D7GB-kly.js +0 -1
  184. streamlit/static/static/js/index.DA5wU0mQ.js +0 -1
  185. streamlit/static/static/js/index.DE9wNOje.js +0 -1
  186. streamlit/static/static/js/index.DHnB-C8A.js +0 -1
  187. streamlit/static/static/js/index.DRTn9zvD.js +0 -1
  188. streamlit/static/static/js/index.DjMjyJl9.js +0 -7
  189. streamlit/static/static/js/index.DvRPFfw6.js +0 -781
  190. streamlit/static/static/js/index.F9tSej94.js +0 -1
  191. streamlit/static/static/js/index.J2D_m7LY.js +0 -197
  192. streamlit/static/static/js/index.dfivzJNz.js +0 -1
  193. streamlit/static/static/js/index.mRztGO69.js +0 -3
  194. streamlit/static/static/js/index.tB1kn_7z.js +0 -1
  195. streamlit/static/static/js/mergeWith.C1kp1zIi.js +0 -1
  196. streamlit/static/static/js/number-overlay-editor.WpheGpmR.js +0 -9
  197. streamlit/static/static/js/threshold.DjX0wlsa.js +0 -1
  198. streamlit/static/static/js/timer.CAwTRJ_g.js +0 -1
  199. streamlit/static/static/js/uniqueId.Bm8FHN92.js +0 -1
  200. streamlit/static/static/js/useTextInputAutoExpand.Bf2egQOG.js +0 -2
  201. streamlit/static/static/js/useUpdateUiValue.lE5xnYWF.js +0 -1
  202. streamlit/static/static/js/value.CgPGBV_l.js +0 -1
  203. streamlit/static/static/js/withFullScreenWrapper.CCOXR7N6.js +0 -1
  204. streamlit/static/static/media/MaterialSymbols-Rounded.DsbC8sYI.woff2 +0 -0
  205. {streamlit-1.48.0.data → streamlit-1.49.0.data}/scripts/streamlit.cmd +0 -0
  206. {streamlit-1.48.0.dist-info → streamlit-1.49.0.dist-info}/WHEEL +0 -0
  207. {streamlit-1.48.0.dist-info → streamlit-1.49.0.dist-info}/entry_points.txt +0 -0
  208. {streamlit-1.48.0.dist-info → streamlit-1.49.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,2 @@
1
+ import{b0 as Ke,ad as J,r as C,bq as gt,ae as pt,p as G,aH as vt,aI as mt,v as Xe,t as Fe,bg as bt,u as yt,br as Tt,j as ae,e as Ot,l as kt,R as wt,T as Rt,P as Mt,W as St,bs as _t,bt as _e}from"./index.BBnWuh07.js";import{s as je}from"./sprintf.D7DtBTRn.js";import{u as $t}from"./useBasicWidgetState.Bnm4FD6K.js";import"./FormClearHelper.l_UPPvkg.js";var se={},U={},ue={},ce={},ze;function $e(){if(ze)return ce;ze=1,Object.defineProperty(ce,"__esModule",{value:!0}),ce.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||(ce.Direction=e={})),ce}var Ve;function Ye(){return Ve||(Ve=1,function(e){var r=ue&&ue.__spreadArray||function(i,s,c){if(c||arguments.length===2)for(var b=0,R=s.length,p;b<R;b++)(p||!(b in s))&&(p||(p=Array.prototype.slice.call(s,0,b)),p[b]=s[b]);return i.concat(p||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=Ke(),o=$e(),g=function(i){var s=i.toString().split(".")[1];return s?s.length:0};e.getStepDecimals=g;function S(i){return i.touches&&i.touches.length||i.changedTouches&&i.changedTouches.length}e.isTouchEvent=S;function u(i,s,c){var b=(s-i)/c,R=8,p=Number(b.toFixed(R));return parseInt(p.toString(),10)===p}e.isStepDivisible=u;function f(i,s,c,b,R,p,O){var $=1e11;if(i=Math.round(i*$)/$,!p){var x=O[s-1],I=O[s+1];if(x&&x>i)return x;if(I&&I<i)return I}if(i>b)return b;if(i<c)return c;var N=Math.floor(i*$-c*$)%Math.floor(R*$),z=Math.floor(i*$-Math.abs(N)),q=N===0?i:z/$,P=Math.abs(N/$)<R/2?q:q+R,A=(0,e.getStepDecimals)(R);return parseFloat(P.toFixed(A))}e.normalizeValue=f;function j(i,s,c){return(i-s)/(c-s)}e.relativeValue=j;function F(i){return i===o.Direction.Up||i===o.Direction.Down}e.isVertical=F;function B(i,s,c){if(s>=c)throw new RangeError("min (".concat(s,") is equal/bigger than max (").concat(c,")"));if(i<s)throw new RangeError("value (".concat(i,") is smaller than min (").concat(s,")"));if(i>c)throw new RangeError("value (".concat(i,") is bigger than max (").concat(c,")"))}e.checkBoundaries=B;function M(i,s,c){return i<s?s:i>c?c:i}e.checkValuesAgainstBoundaries=M;function y(i){if(!(i.length<2)&&!i.slice(1).every(function(s,c){return i[c]<=s}))throw new RangeError("values={[".concat(i,"]} needs to be sorted when allowOverlap={false}"))}e.checkInitialOverlap=y;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,c){var b=c?-1:1;i.forEach(function(R,p){return v(R,b*s[p].x,s[p].y)})}e.translateThumbs=a;function l(i,s,c,b){for(var R=0,p=L(i[0],s,c,b),O=1;O<i.length;O++){var $=L(i[O],s,c,b);$<p&&(p=$,R=O)}return R}e.getClosestThumbIndex=l;function v(i,s,c){i.style.transform="translate(".concat(s,"px, ").concat(c,"px)")}e.translate=v;var h=function(i){var s=[],c=null,b=function(){for(var R=[],p=0;p<arguments.length;p++)R[p]=arguments[p];s=R,!c&&(c=requestAnimationFrame(function(){c=null,i.apply(void 0,s)}))};return b};e.schd=h;function m(i,s,c){var b=i.slice(0);return b[s]=c,b}e.replaceAt=m;function E(i){var s=i.values,c=i.colors,b=i.min,R=i.max,p=i.direction,O=p===void 0?o.Direction.Right:p,$=i.rtl,x=$===void 0?!1:$;x&&O===o.Direction.Right?O=o.Direction.Left:x&&o.Direction.Left&&(O=o.Direction.Right);var I=s.slice(0).sort(function(z,q){return z-q}).map(function(z){return(z-b)/(R-b)*100}),N=I.reduce(function(z,q,P){return"".concat(z,", ").concat(c[P]," ").concat(q,"%, ").concat(c[P+1]," ").concat(q,"%")},"");return"linear-gradient(".concat(O,", ").concat(c[0]," 0%").concat(N,", ").concat(c[c.length-1]," 100%)")}e.getTrackBackground=E;function k(){}e.voidFn=k;function T(i){throw new Error("Didn't expect to get here")}e.assertUnreachable=T;var w=function(i,s,c,b,R){R===void 0&&(R=function(O){return O});var p=Math.ceil(r([i],Array.from(i.children),!0).reduce(function(O,$){var x=Math.ceil($.getBoundingClientRect().width);if($.innerText&&$.innerText.includes(c)&&$.childElementCount===0){var I=$.cloneNode(!0);I.innerHTML=R(s.toFixed(b)),I.style.visibility="hidden",document.body.appendChild(I),x=Math.ceil(I.getBoundingClientRect().width),document.body.removeChild(I)}return x>O?x:O},i.getBoundingClientRect().width));return p},D=function(i,s,c,b,R,p,O){O===void 0&&(O=function(I){return I});var $=[],x=function(I){var N=w(c[I],b[I],R,p,O),z=s[I].x;s.forEach(function(q,P){var A=q.x,Z=w(c[P],b[P],R,p,O);I!==P&&(z>=A&&z<=A+Z||z+N>=A&&z+N<=A+Z)&&($.includes(P)||($.push(I),$.push(P),$=r(r([],$,!0),[I,P],!1),x(P)))})};return x(i),Array.from(new Set($.sort()))},_=function(i,s,c,b,R,p){b===void 0&&(b=.1),R===void 0&&(R=" - "),p===void 0&&(p=function(P){return P});var O=(0,e.getStepDecimals)(b),$=(0,n.useState)({}),x=$[0],I=$[1],N=(0,n.useState)(p(s[c].toFixed(O))),z=N[0],q=N[1];return(0,n.useEffect)(function(){if(i){var P=i.getThumbs();if(P.length<1)return;var A={},Z=i.getOffsets(),re=D(c,Z,P,s,R,O,p),le=p(s[c].toFixed(O));if(re.length){var Q=re.reduce(function(ee,oe,ge,pe){return ee.length?r(r([],ee,!0),[Z[pe[ge]].x],!1):[Z[pe[ge]].x]},[]);if(Math.min.apply(Math,Q)===Z[c].x){var de=[];re.forEach(function(ee){de.push(s[ee].toFixed(O))}),le=Array.from(new Set(de.sort(function(ee,oe){return parseFloat(ee)-parseFloat(oe)}))).map(p).join(R);var fe=Math.min.apply(Math,Q),he=Math.max.apply(Math,Q),Se=P[re[Q.indexOf(he)]].getBoundingClientRect().width;A.left="".concat(Math.abs(fe-(he+Se))/2,"px"),A.transform="translate(-50%, 0)"}else A.visibility="hidden"}q(le),I(A)}},[i,s]),[z,x]};e.useThumbOverlap=_;function L(i,s,c,b){var R=i.getBoundingClientRect(),p=R.left,O=R.top,$=R.width,x=R.height;return F(b)?Math.abs(c-(O+x/2)):Math.abs(s-(p+$/2))}var H=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=H}(ue)),ue}var Ne;function Et(){if(Ne)return U;Ne=1;var e=U&&U.__extends||function(){var M=function(y,d){return M=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,a){t.__proto__=a}||function(t,a){for(var l in a)Object.prototype.hasOwnProperty.call(a,l)&&(t[l]=a[l])},M(y,d)};return function(y,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");M(y,d);function t(){this.constructor=y}y.prototype=d===null?Object.create(d):(t.prototype=d.prototype,new t)}}(),r=U&&U.__createBinding||(Object.create?function(M,y,d,t){t===void 0&&(t=d);var a=Object.getOwnPropertyDescriptor(y,d);(!a||("get"in a?!y.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return y[d]}}),Object.defineProperty(M,t,a)}:function(M,y,d,t){t===void 0&&(t=d),M[t]=y[d]}),n=U&&U.__setModuleDefault||(Object.create?function(M,y){Object.defineProperty(M,"default",{enumerable:!0,value:y})}:function(M,y){M.default=y}),o=U&&U.__importStar||function(M){if(M&&M.__esModule)return M;var y={};if(M!=null)for(var d in M)d!=="default"&&Object.prototype.hasOwnProperty.call(M,d)&&r(y,M,d);return n(y,M),y},g=U&&U.__spreadArray||function(M,y,d){if(d||arguments.length===2)for(var t=0,a=y.length,l;t<a;t++)(l||!(t in y))&&(l||(l=Array.prototype.slice.call(y,0,t)),l[t]=y[t]);return M.concat(l||Array.prototype.slice.call(y))};Object.defineProperty(U,"__esModule",{value:!0});var S=o(Ke()),u=Ye(),f=$e(),j=["ArrowRight","ArrowUp","k","PageUp"],F=["ArrowLeft","ArrowDown","j","PageDown"],B=function(M){e(y,M);function y(d){var t=M.call(this,d)||this;if(t.trackRef=S.createRef(),t.thumbRefs=[],t.state={draggedTrackPos:[-1,-1],draggedThumbIndex:-1,thumbZIndexes:new Array(t.props.values.length).fill(0).map(function(a,l){return l}),isChanged:!1,markOffsets:[]},t.getOffsets=function(){var a=t.props,l=a.direction,v=a.values,h=a.min,m=a.max,E=t.trackRef.current;if(!E)return console.warn("No track element found."),[];var k=E.getBoundingClientRect(),T=(0,u.getPaddingAndBorder)(E);return t.getThumbs().map(function(w,D){var _={x:0,y:0},L=w.getBoundingClientRect(),H=(0,u.getMargin)(w);switch(l){case f.Direction.Right:return _.x=(H.left+T.left)*-1,_.y=((L.height-k.height)/2+T.top)*-1,_.x+=k.width*(0,u.relativeValue)(v[D],h,m)-L.width/2,_;case f.Direction.Left:return _.x=(H.right+T.right)*-1,_.y=((L.height-k.height)/2+T.top)*-1,_.x+=k.width-k.width*(0,u.relativeValue)(v[D],h,m)-L.width/2,_;case f.Direction.Up:return _.x=((L.width-k.width)/2+H.left+T.left)*-1,_.y=-T.left,_.y+=k.height-k.height*(0,u.relativeValue)(v[D],h,m)-L.height/2,_;case f.Direction.Down:return _.x=((L.width-k.width)/2+H.left+T.left)*-1,_.y=-T.left,_.y+=k.height*(0,u.relativeValue)(v[D],h,m)-L.height/2,_;default:return(0,u.assertUnreachable)(l)}})},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(l){return l===a.target||l.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 l;if(!(a.button!==0||(0,u.isIOS)()))if(a.persist(),a.preventDefault(),t.addMouseEvents(a.nativeEvent),t.props.values.length>1&&t.props.draggableTrack){if(t.thumbRefs.some(function(h){var m;return(m=h.current)===null||m===void 0?void 0:m.contains(a.target)}))return;t.setState({draggedTrackPos:[a.clientX,a.clientY]},function(){return t.onMove(a.clientX,a.clientY)})}else{var v=(0,u.getClosestThumbIndex)(t.thumbRefs.map(function(h){return h.current}),a.clientX,a.clientY,t.props.direction);(l=t.thumbRefs[v].current)===null||l===void 0||l.focus(),t.setState({draggedThumbIndex:v},function(){return t.onMove(a.clientX,a.clientY)})}},t.onResize=function(){(0,u.translateThumbs)(t.getThumbs(),t.getOffsets(),t.props.rtl),t.calculateMarkOffsets()},t.onTouchStartTrack=function(a){var l;if(a.persist(),t.addTouchEvents(a.nativeEvent),t.props.values.length>1&&t.props.draggableTrack){if(t.thumbRefs.some(function(h){var m;return(m=h.current)===null||m===void 0?void 0:m.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 v=(0,u.getClosestThumbIndex)(t.thumbRefs.map(function(h){return h.current}),a.touches[0].clientX,a.touches[0].clientY,t.props.direction);(l=t.thumbRefs[v].current)===null||l===void 0||l.focus(),t.setState({draggedThumbIndex:v},function(){return t.onMove(a.touches[0].clientX,a.touches[0].clientY)})}},t.onMouseOrTouchStart=function(a){if(!t.props.disabled){var l=(0,u.isTouchEvent)(a);if(!(!l&&a.button!==0)){var v=t.getTargetIndex(a);v!==-1&&(l?t.addTouchEvents(a):t.addMouseEvents(a),t.setState({draggedThumbIndex:v,thumbZIndexes:t.state.thumbZIndexes.map(function(h,m){return m===v?Math.max.apply(Math,t.state.thumbZIndexes):h<=t.state.thumbZIndexes[v]?h:h-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 l=t.props,v=l.values,h=l.onChange,m=l.step,E=l.rtl,k=l.direction,T=t.state.isChanged,w=t.getTargetIndex(a.nativeEvent),D=E||k===f.Direction.Left||k===f.Direction.Down?-1:1;w!==-1&&(j.includes(a.key)?(a.preventDefault(),t.setState({draggedThumbIndex:w,isChanged:!0}),h((0,u.replaceAt)(v,w,t.normalizeValue(v[w]+D*(a.key==="PageUp"?m*10:m),w)))):F.includes(a.key)?(a.preventDefault(),t.setState({draggedThumbIndex:w,isChanged:!0}),h((0,u.replaceAt)(v,w,t.normalizeValue(v[w]-D*(a.key==="PageDown"?m*10:m),w)))):a.key==="Tab"?t.setState({draggedThumbIndex:-1},function(){T&&t.fireOnFinalChange()}):T&&t.fireOnFinalChange())},t.onKeyUp=function(a){var l=t.state.isChanged;t.setState({draggedThumbIndex:-1},function(){l&&t.fireOnFinalChange()})},t.onMove=function(a,l){var v=t.state,h=v.draggedThumbIndex,m=v.draggedTrackPos,E=t.props,k=E.direction,T=E.min,w=E.max,D=E.onChange,_=E.values,L=E.step,H=E.rtl;if(h===-1&&m[0]===-1&&m[1]===-1)return null;var i=t.trackRef.current;if(!i)return null;var s=i.getBoundingClientRect(),c=(0,u.isVertical)(k)?s.height:s.width;if(m[0]!==-1&&m[1]!==-1){var b=a-m[0],R=l-m[1],p=0;switch(k){case f.Direction.Right:case f.Direction.Left:p=b/c*(w-T);break;case f.Direction.Down:case f.Direction.Up:p=R/c*(w-T);break;default:(0,u.assertUnreachable)(k)}if(H&&(p*=-1),Math.abs(p)>=L/2){for(var O=0;O<t.thumbRefs.length;O++){if(_[O]===w&&Math.sign(p)===1||_[O]===T&&Math.sign(p)===-1)return;var $=_[O]+p;$>w?p=w-_[O]:$<T&&(p=T-_[O])}for(var x=_.slice(0),O=0;O<t.thumbRefs.length;O++)x=(0,u.replaceAt)(x,O,t.normalizeValue(_[O]+p,O));t.setState({draggedTrackPos:[a,l]}),D(x)}}else{var I=0;switch(k){case f.Direction.Right:I=(a-s.left)/c*(w-T)+T;break;case f.Direction.Left:I=(c-(a-s.left))/c*(w-T)+T;break;case f.Direction.Down:I=(l-s.top)/c*(w-T)+T;break;case f.Direction.Up:I=(c-(l-s.top))/c*(w-T)+T;break;default:(0,u.assertUnreachable)(k)}H&&(I=w+T-I),Math.abs(_[h]-I)>=L/2&&D((0,u.replaceAt)(_,h,t.normalizeValue(I,h)))}},t.normalizeValue=function(a,l){var v=t.props,h=v.min,m=v.max,E=v.step,k=v.allowOverlap,T=v.values;return(0,u.normalizeValue)(a,l,h,m,E,k,T)},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,l=a.onFinalChange,v=a.values;l&&l(v)},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 l=0;l<t.numOfMarks+1;l++)t.markRefs[l]=S.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),l=parseInt(a.width,10),v=parseInt(a.height,10),h=parseInt(a.paddingLeft,10),m=parseInt(a.paddingTop,10),E=[],k=0;k<t.numOfMarks+1;k++){var T=9999,w=9999;if(t.markRefs[k].current){var D=t.markRefs[k].current.getBoundingClientRect();T=D.height,w=D.width}t.props.direction===f.Direction.Left||t.props.direction===f.Direction.Right?E.push([Math.round(l/t.numOfMarks*k+h-w/2),-Math.round((T-v)/2)]):E.push([Math.round(v/t.numOfMarks*k+m-T/2),-Math.round((w-l)/2)])}t.setState({markOffsets:E})}},d.step===0)throw new Error('"step" property should be a positive number');return t.schdOnMouseMove=(0,u.schd)(t.onMouseMove),t.schdOnTouchMove=(0,u.schd)(t.onTouchMove),t.schdOnEnd=(0,u.schd)(t.onEnd),t.thumbRefs=d.values.map(function(){return S.createRef()}),t.updateMarkRefs(d),t}return y.prototype.componentDidMount=function(){var d=this,t=this.props,a=t.values,l=t.min,v=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,u.checkInitialOverlap)(this.props.values),this.props.values.forEach(function(h){return(0,u.checkBoundaries)(h,d.props.min,d.props.max)}),this.resizeObserver.observe(this.trackRef.current),(0,u.translateThumbs)(this.getThumbs(),this.getOffsets(),this.props.rtl),this.calculateMarkOffsets(),a.forEach(function(h){(0,u.isStepDivisible)(l,h,v)||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.")})},y.prototype.componentDidUpdate=function(d,t){var a=this.props,l=a.max,v=a.min,h=a.step,m=a.values,E=a.rtl;(d.max!==l||d.min!==v||d.step!==h)&&this.updateMarkRefs(this.props),(0,u.translateThumbs)(this.getThumbs(),this.getOffsets(),E),(d.max!==l||d.min!==v||d.step!==h||t.markOffsets.length!==this.state.markOffsets.length)&&(this.calculateMarkOffsets(),m.forEach(function(k){(0,u.isStepDivisible)(v,k,h)||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.")}))},y.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)},y.prototype.render=function(){var d=this,t=this.props,a=t.label,l=t.labelledBy,v=t.renderTrack,h=t.renderThumb,m=t.renderMark,E=m===void 0?function(){return null}:m,k=t.values,T=t.min,w=t.max,D=t.allowOverlap,_=t.disabled,L=this.state,H=L.draggedThumbIndex,i=L.thumbZIndexes,s=L.markOffsets;return v({props:{style:{transform:"scale(1)",cursor:H>-1?"grabbing":this.props.draggableTrack?(0,u.isVertical)(this.props.direction)?"ns-resize":"ew-resize":k.length===1&&!_?"pointer":"inherit"},onMouseDown:_?u.voidFn:this.onMouseDownTrack,onTouchStart:_?u.voidFn:this.onTouchStartTrack,ref:this.trackRef},isDragged:this.state.draggedThumbIndex>-1,disabled:_,children:g(g([],s.map(function(c,b,R){return E({props:{style:d.props.direction===f.Direction.Left||d.props.direction===f.Direction.Right?{position:"absolute",left:"".concat(c[0],"px"),marginTop:"".concat(c[1],"px")}:{position:"absolute",top:"".concat(c[0],"px"),marginLeft:"".concat(c[1],"px")},key:"mark".concat(b),ref:d.markRefs[b]},index:b})}),!0),k.map(function(c,b){var R=d.state.draggedThumbIndex===b;return h({index:b,value:c,isDragged:R,props:{style:{position:"absolute",zIndex:i[b],cursor:_?"inherit":R?"grabbing":"grab",userSelect:"none",touchAction:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none"},key:b,tabIndex:_?void 0:0,"aria-valuemax":D?w:k[b+1]||w,"aria-valuemin":D?T:k[b-1]||T,"aria-valuenow":c,draggable:!1,ref:d.thumbRefs[b],"aria-label":a,"aria-labelledby":l,role:"slider",onKeyDown:_?u.voidFn:d.onKeyDown,onKeyUp:_?u.voidFn:d.onKeyUp}})}),!0)})},y.defaultProps={label:"Accessibility label",labelledBy:null,step:1,direction:f.Direction.Right,rtl:!1,disabled:!1,allowOverlap:!1,draggableTrack:!1,min:0,max:100},y}(S.Component);return U.default=B,U}var Ue;function It(){return Ue||(Ue=1,function(e){var r=se&&se.__importDefault||function(S){return S&&S.__esModule?S:{default:S}};Object.defineProperty(e,"__esModule",{value:!0}),e.checkValuesAgainstBoundaries=e.relativeValue=e.useThumbOverlap=e.Direction=e.getTrackBackground=e.Range=void 0;var n=r(Et());e.Range=n.default;var o=Ye();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 g=$e();Object.defineProperty(e,"Direction",{enumerable:!0,get:function(){return g.Direction}})}(se)),se}var Ze=It();function He(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(g){return Object.getOwnPropertyDescriptor(e,g).enumerable})),n.push.apply(n,o)}return n}function ve(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?He(Object(n),!0).forEach(function(o){Ct(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):He(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function Ct(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}var me=J("div",{position:"relative",width:"100%"});me.displayName="Root";me.displayName="Root";me.displayName="StyledRoot";var be=J("div",function(e){var r=e.$theme,n=e.$value,o=n===void 0?[]:n,g=e.$disabled,S=e.$isDragged,u=r.sizing,f="inherit";return g?f="not-allowed":S?f="grabbing":o.length===1&&(f="pointer"),{paddingTop:u.scale600,paddingBottom:u.scale600,paddingRight:u.scale600,paddingLeft:u.scale600,display:"flex",cursor:f,backgroundColor:r.colors.sliderTrackFill}});be.displayName="Track";be.displayName="Track";be.displayName="StyledTrack";var ye=J("div",function(e){var r=e.$theme,n=e.$value,o=n===void 0?[]:n,g=e.$min,S=e.$max,u=e.$disabled,f=r.colors,j=r.borders,F=r.direction,B=r.borders.useRoundedCorners?j.radius100:0;return{borderTopLeftRadius:B,borderTopRightRadius:B,borderBottomRightRadius:B,borderBottomLeftRadius:B,background:Ze.getTrackBackground({values:o,colors:o.length===1?[u?f.borderOpaque:f.primary,u?f.backgroundSecondary:f.borderOpaque]:[u?f.backgroundSecondary:f.borderOpaque,u?f.borderOpaque:f.primary,u?f.backgroundSecondary:f.borderOpaque],min:g||0,max:S||0,rtl:F==="rtl"}),height:"2px",width:"100%",alignSelf:"center",cursor:u?"not-allowed":"inherit"}});ye.displayName="InnerTrack";ye.displayName="InnerTrack";ye.displayName="StyledInnerTrack";var Te=J("div",function(e){return{width:"4px",height:"2px",backgroundColor:e.$theme.colors.backgroundPrimary,marginLeft:"16px"}});Te.displayName="Mark";Te.displayName="Mark";Te.displayName="StyledMark";var Oe=J("div",function(e){return ve(ve({},e.$theme.typography.font200),{},{color:e.$theme.colors.contentPrimary})});Oe.displayName="Tick";Oe.displayName="Tick";Oe.displayName="StyledTick";var ke=J("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}});ke.displayName="TickBar";ke.displayName="TickBar";ke.displayName="StyledTickBar";var we=J("div",function(e){var r=e.$theme,n=e.$value,o=n===void 0?[]:n,g=e.$thumbIndex,S=e.$disabled,u=o.length===2&&g===0,f=o.length===2&&g===1;return r.direction==="rtl"&&(f||u)&&(u=!u,f=!f),{height:"24px",width:"24px",borderTopLeftRadius:"24px",borderTopRightRadius:"24px",borderBottomLeftRadius:"24px",borderBottomRightRadius:"24px",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:S?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:S?"not-allowed":"inherit"}});we.displayName="Thumb";we.displayName="Thumb";we.displayName="StyledThumb";var Re=J("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}});Re.displayName="InnerThumb";Re.displayName="InnerThumb";Re.displayName="StyledInnerThumb";var Me=J("div",function(e){var r=e.$disabled,n=e.$theme;return ve(ve({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"})});Me.displayName="ThumbValue";Me.displayName="ThumbValue";Me.displayName="StyledThumbValue";function qe(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(g){return Object.getOwnPropertyDescriptor(e,g).enumerable})),n.push.apply(n,o)}return n}function Dt(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?qe(Object(n),!0).forEach(function(o){xt(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qe(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function xt(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 Lt(e)||Bt(e,r)||At(e,r)||Pt()}function Pt(){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 At(e,r){if(e){if(typeof e=="string")return We(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 We(e,r)}}function We(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 Bt(e,r){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var o=[],g=!0,S=!1,u,f;try{for(n=n.call(e);!(g=(u=n.next()).done)&&(o.push(u.value),!(r&&o.length===r));g=!0);}catch(j){S=!0,f=j}finally{try{!g&&n.return!=null&&n.return()}finally{if(S)throw f}}return o}}function Lt(e){if(Array.isArray(e))return e}var Ft=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 jt(e){var r=e.overrides,n=r===void 0?{}:r,o=e.disabled,g=o===void 0?!1:o,S=e.marks,u=S===void 0?!1:S,f=e.onChange,j=f===void 0?function(){}:f,F=e.onFinalChange,B=F===void 0?function(){}:F,M=e.min,y=M===void 0?0:M,d=e.max,t=d===void 0?100:d,a=e.step,l=a===void 0?1:a,v=e.persistentThumb,h=v===void 0?!1:v,m=e.valueToLabel,E=m===void 0?function(Y){return Y}:m,k=e.value,T=C.useContext(gt),w=C.useState(!1),D=K(w,2),_=D[0],L=D[1],H=C.useState(!1),i=K(H,2),s=i[0],c=i[1],b=C.useState(!1),R=K(b,2),p=R[0],O=R[1],$=C.useState(-1),x=K($,2),I=x[0],N=x[1],z=C.useCallback(function(Y){pt(Y)&&O(!0);var V=Y.target.parentNode.firstChild===Y.target?0:1;N(V)},[]),q=C.useCallback(function(Y){p!==!1&&O(!1),N(-1)},[]),P=Ft(k),A={$disabled:g,$step:l,$min:y,$max:t,$marks:u,$value:P,$isFocusVisible:p},Z=G(n.Root,me),re=K(Z,2),le=re[0],Q=re[1],de=G(n.Track,be),fe=K(de,2),he=fe[0],Se=fe[1],ee=G(n.InnerTrack,ye),oe=K(ee,2),ge=oe[0],pe=oe[1],Ge=G(n.Thumb,we),Ee=K(Ge,2),Je=Ee[0],Qe=Ee[1],et=G(n.InnerThumb,Re),Ie=K(et,2),tt=Ie[0],rt=Ie[1],nt=G(n.ThumbValue,Me),Ce=K(nt,2),at=Ce[0],it=Ce[1],ot=G(n.Tick,Oe),De=K(ot,2),xe=De[0],Pe=De[1],st=G(n.TickBar,ke),Ae=K(st,2),ut=Ae[0],ct=Ae[1],lt=G(n.Mark,Te),Be=K(lt,2),dt=Be[0],ft=Be[1];return C.createElement(le,X({"data-baseweb":"slider"},A,Q,{onFocus:mt(Q,z),onBlur:vt(Q,q)}),C.createElement(Ze.Range,X({step:l,min:y,max:t,values:P,disabled:g,onChange:function(V){return j({value:V})},onFinalChange:function(V){return B({value:V})},rtl:T.direction==="rtl",renderTrack:function(V){var te=V.props,W=V.children,ne=V.isDragged;return C.createElement(he,X({onMouseDown:te.onMouseDown,onTouchStart:te.onTouchStart,$isDragged:ne},A,Se),C.createElement(ge,X({$isDragged:ne,ref:te.ref},A,pe),W))},renderThumb:function(V){var te=V.props,W=V.index,ne=V.isDragged,Le=h||(!!W&&s||!W&&_||ne)&&!g;return C.createElement(Je,X({},te,{onMouseEnter:function(){W===0?L(!0):c(!0)},onMouseLeave:function(){W===0?L(!1):c(!1)},$thumbIndex:W,$isDragged:ne,style:Dt({},te.style)},A,Qe,{$isFocusVisible:p&&I===W}),Le&&C.createElement(at,X({$thumbIndex:W,$isDragged:ne},A,it),E(P[W])),Le&&C.createElement(tt,X({$thumbIndex:W,$isDragged:ne},A,rt)))}},u?{renderMark:function(V){var te=V.props,W=V.index;return C.createElement(dt,X({$markIndex:W},te,A,ft))}}:{})),C.createElement(ut,X({},A,ct),C.createElement(xe,X({},A,Pe),E(y)),C.createElement(xe,X({},A,Pe),E(t))))}const zt=Xe("div",{target:"erqzm8u0"})(({disabled:e,theme:r,isDragged:n})=>({alignItems:"center",backgroundColor:e?r.colors.gray: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?`0 0 0 0.2rem ${Fe(r.colors.primary,.5)}`:"none",":focus":{outline:"none"},":focus-visible":{boxShadow:`0 0 0 0.2rem ${Fe(r.colors.primary,.5)}`}})),Vt=Xe("div",{target:"erqzm8u1"})(({disabled:e,theme:r})=>({fontFamily:r.genericFonts.bodyFont,fontSize:r.fontSizes.sm,color:e?r.colors.gray:r.colors.primary,top:"-1.6em",position:"absolute",whiteSpace:"nowrap",backgroundColor:r.colors.transparent,lineHeight:r.lineHeights.base,fontWeight:r.fontWeights.normal,pointerEvents:"none"}));function Nt({disabled:e,element:r,widgetMgr:n,fragmentId:o}){const[g,S]=$t({getStateFromWidgetMgr:Ut,getDefaultStateFromProto:Ht,getCurrStateFromProto:qt,updateWidgetMgrState:Wt,element:r,widgetMgr:n,fragmentId:o}),[u,f]=C.useState(g),j=C.useRef(null),[F]=C.useState([]),[B]=C.useState([]),M=yt(),y=u.map(h=>Xt(h,r)),d=r.label;C.useEffect(()=>{f(g)},[g]);const t=C.useCallback(({value:h})=>{S({value:h,fromUi:!0})},[S]),a=C.useCallback(({value:h})=>{f(h)},[]),l=C.useCallback(C.forwardRef(function(m,E){const{$thumbIndex:k}=m,T=k||0;F[T]=E,B[T]||=C.createRef();const w=Tt(m,["role","style","aria-valuemax","aria-valuemin","aria-valuenow","tabIndex","onKeyUp","onKeyDown","onMouseEnter","onMouseLeave","draggable"]),D=y[T];return ae(zt,{...w,disabled:m.$disabled===!0,isDragged:m.$isDragged===!0,ref:F[T],"aria-valuetext":D,"aria-label":d,children:ae(Vt,{"data-testid":"stSliderThumbValue",disabled:m.$disabled===!0,ref:B[T],children:D})})}),[]);C.useEffect(()=>{B.map((w,D)=>{w.current&&(w.current.innerText=y[D])}),F.map((w,D)=>{w.current&&w.current.setAttribute("aria-valuetext",y[D])});const h=j.current??null,m=F[0].current,E=F[1]?.current,k=B[0].current,T=B[1]?.current;Zt(h,m,E,k,T)});const v=C.useCallback(({$disabled:h})=>({height:M.spacing.twoXS,...h?{background:M.colors.darkenedBgMix25}:{}}),[M.colors.darkenedBgMix25,M.spacing.twoXS]);return Ot("div",{ref:j,className:"stSlider","data-testid":"stSlider",children:[ae(St,{label:r.label,disabled:e,labelVisibility:kt(r.labelVisibility?.value),children:r.help&&ae(wt,{children:ae(Rt,{content:r.help,placement:Mt.TOP_RIGHT})})}),ae(jt,{min:r.min,max:r.max,step:r.step,value:Yt(u,r),onChange:a,onFinalChange:t,disabled:e,overrides:{Thumb:l,Track:{style:{backgroundColor:"none !important",paddingLeft:M.spacing.none,paddingRight:M.spacing.none,paddingTop:`calc((${M.sizes.minElementHeight} - ${M.spacing.twoXS}) / 2)`,paddingBottom:`calc((${M.sizes.minElementHeight} - ${M.spacing.twoXS}) / 2)`}},InnerTrack:{style:v},TickBar:()=>null}})]})}function Ut(e,r){return e.getDoubleArrayValue(r)}function Ht(e){return e.default}function qt(e){return e.value}function Wt(e,r,n,o){r.setDoubleArrayValue(e,n.value,{fromUi:n.fromUi},o)}function Kt(e){const{dataType:r}=e;return r===_e.DataType.DATETIME||r===_e.DataType.DATE||r===_e.DataType.TIME}function Xt(e,r){const{format:n,options:o}=r;return Kt(r)?_t.utc(e/1e3).format(n):o.length>0?je.sprintf(n,o[e]):je.sprintf(n,e)}function Yt(e,r){const{min:n,max:o}=r;let g=e[0],S=e.length>1?e[1]:e[0];return g>S&&(g=S),g<n&&(g=n),g>o&&(g=o),S<n&&(S=n),S>o&&(S=o),e.length>1?[g,S]:[g]}function Zt(e,r,n,o,g){!e||!r||!o||(ie(e,r,o),n&&g&&(ie(e,n,g),Gt(e,r,n,o,g)))}function ie(e,r,n){const o=e.getBoundingClientRect(),g=r.getBoundingClientRect(),S=n.getBoundingClientRect(),u=g.left+g.width/2,f=u-S.width/2<o.left,j=u+S.width/2>o.right;n.style.left=f?"0":"",n.style.right=j?"0":""}function Gt(e,r,n,o,g){const u=e.getBoundingClientRect(),f=r.getBoundingClientRect(),j=n.getBoundingClientRect(),F=o.getBoundingClientRect(),B=g.getBoundingClientRect(),M=u.left+u.width/2,y=f.left+f.width/2,d=j.left+j.width/2,t=y-F.width/2>=u.left,a=d+B.width/2<=u.right,l=f.left-F.width>=u.left,v=j.right+B.width<=u.right,h=t?F.width/2:F.width,m=a?B.width/2:B.width,E=y+h;if(d-m-E>24){ie(e,r,o),ie(e,n,g);return}if(l&&v){o.style.left="",o.style.right=`${Math.round(f.width)}px`,g.style.left=`${Math.round(j.width)}px`,g.style.right="";return}y<M?(ie(e,r,o),g.style.left=`${Math.round(y+h+24-d)}px`,g.style.right=""):(ie(e,n,g),o.style.left="",o.style.right=`${-Math.round(d-m-24-y)}px`)}const rr=bt(C.memo(Nt));export{rr as default};
@@ -0,0 +1 @@
1
+ import{v as c,r as a,j as o,e as u,ah as S,ai as f,S as g}from"./index.BBnWuh07.js";const x=c("div",{target:"e8cs83k0"})(({theme:e,cache:n})=>({...n?{paddingBottom:e.spacing.lg,background:`linear-gradient(to bottom, ${e.colors.bgColor} 0%, ${e.colors.bgColor} 80%, transparent 100%)`}:null})),T=c("div",{target:"e8cs83k1"})({display:"flex",alignItems:"center",width:"100%"}),$=c("div",{target:"e8cs83k2"})(({theme:e})=>({display:"flex",gap:e.spacing.sm,alignItems:"baseline"})),h=c("div",{target:"e8cs83k3"})(({theme:e})=>({opacity:.6,fontSize:e.fontSizes.sm})),y=e=>{const n=Math.floor(e/3600),t=Math.floor(e%3600/60),s=e%60;if(n===0&&t===0)return`(${s.toFixed(1)} seconds)`;if(n===0){const d=`${t} minute${t===1?"":"s"}`,m=s===0?"":`, ${s.toFixed(1)} seconds`;return`(${d}${m})`}const l=`${n} hour${n===1?"":"s"}`,r=t===0?"":`, ${t} minute${t===1?"":"s"}`,i=s===0?"":`, ${s.toFixed(1)} seconds`;return`(${l}${r}${i})`};function v({element:e}){const{cache:n,showTime:t}=e,[s,l]=a.useState(0),r=a.useRef(null);return a.useEffect(()=>{if(!t)return;r.current=Date.now();const i=()=>{if(r.current!==null){const p=(Date.now()-r.current)/1e3;l(p)}};i();const d=setInterval(i,100);return()=>clearInterval(d)},[t]),o(x,{className:S({stSpinner:!0,stCacheSpinner:n}),"data-testid":"stSpinner",cache:n,children:u(T,{children:[o(f,{size:"base",margin:"0 md 0 0",padding:"0"}),u($,{children:[o(g,{source:e.text,allowHTML:!1}),t&&o(h,{children:y(s)})]})]})})}const k=a.memo(v);export{k as default};
@@ -0,0 +1 @@
1
+ import{v as f,r as e,u as w,e as x,j as a,y as m,S as L,z as r,F as R,h as C,o as k,K as z,G as B}from"./index.BBnWuh07.js";const E=f("button",{target:"ee3yv4c0"})(({theme:o})=>({fontSize:o.fontSizes.sm,lineHeight:o.lineHeights.base,color:o.colors.fadedText60,backgroundColor:o.colors.transparent,fontFamily:"inherit",margin:o.spacing.none,border:"none",boxShadow:"none",padding:o.spacing.none,"&:hover, &:active, &:focus":{border:"none",outline:"none",boxShadow:"none"},"&:hover":{color:o.colors.primary}})),H=f("div",{target:"ee3yv4c1"})(({theme:o})=>({display:"flex",flexDirection:"row",gap:o.spacing.lg,"> span":{marginTop:o.spacing.twoXS}})),D=f("div",{target:"ee3yv4c2"})(({theme:o})=>({display:"flex",flexDirection:"column",gap:o.spacing.sm,alignItems:"start",justifyContent:"center",overflow:"hidden",minHeight:"100%",fontSize:o.fontSizes.sm,lineHeight:o.lineHeights.base,div:{display:"inline-flex"}}));function M(o){const t=C(o);return{Body:{props:{"data-testid":"stToast",className:"stToast"},style:{display:"flex",flexDirection:"row",gap:o.spacing.md,width:o.sizes.toastWidth,marginTop:o.spacing.sm,borderTopLeftRadius:o.radii.default,borderTopRightRadius:o.radii.default,borderBottomLeftRadius:o.radii.default,borderBottomRightRadius:o.radii.default,paddingTop:o.spacing.lg,paddingBottom:o.spacing.lg,paddingLeft:o.spacing.twoXL,paddingRight:o.spacing.twoXL,backgroundColor:o.colors.bgColor,filter:t?"brightness(0.98)":"brightness(1.2)",color:o.colors.bodyText,boxShadow:t?"0px 4px 16px rgba(0, 0, 0, 0.16)":"0px 4px 16px rgba(0, 0, 0, 0.7)"}},CloseIcon:{style:{color:o.colors.fadedText40,width:o.fontSizes.lg,height:o.fontSizes.lg,marginRight:`calc(-1 * ${o.spacing.lg} / 2)`,":hover":{color:o.colors.bodyText}}}}}function I(o){if(o.length>104){let s=o.replace(/^(.{104}[^\s]*).*/,"$1");return s.length>104&&(s=s.substring(0,104).split(" ").slice(0,-1).join(" ")),s.trim()}return o}function j({element:o}){const{body:t,icon:s,duration:d}=o,n=w(),c=I(t),l=t!==c,[i,S]=e.useState(!l),[y,T]=e.useState(0),b=e.useCallback(()=>{S(!i)},[i]),g=e.useMemo(()=>M(n),[n]),p=e.useMemo(()=>x(H,{expanded:i,children:[s&&a(m,{iconValue:s,size:"xl",testid:"stToastDynamicIcon"}),x(D,{children:[a(L,{source:i?t:c,allowHTML:!1,isToast:!0}),l&&a(E,{"data-testid":"stToastViewButton",onClick:b,children:i?"view less":"view more"})]})]}),[l,i,t,s,c,b]);e.useEffect(()=>{if(n.inSidebar)return;const v=k(d)?d===0?0:d*1e3:4e3,u=r.info(p,{overrides:{...g},autoHideDuration:v});return T(u),()=>{r.update(u,{overrides:{Body:{style:{display:"none"}}}}),r.clear(u)}},[]),e.useEffect(()=>{r.update(y,{children:p,overrides:{...g}})},[y,p,g]);const h=a(B,{kind:z.ERROR,body:"Streamlit API Error: `st.toast` cannot be called directly on the sidebar with `st.sidebar.toast`. See our `st.toast` API [docs](https://docs.streamlit.io/develop/api-reference/status/st.toast) for more information."});return a(R,{children:n.inSidebar&&h})}const O=e.memo(j);export{O as default};
@@ -0,0 +1 @@
1
+ import{v as u,r as S,J as v,e as p,j as i,w as C,S as L,x as E}from"./index.BBnWuh07.js";import{w as b,E as T}from"./withFullScreenWrapper.0cy2pVf5.js";import{S as m,T as W}from"./Toolbar.BO_3WBaS.js";const y=u("div",{target:"evl31sl0"})(({theme:e})=>({display:"flex",flexDirection:"row",flexWrap:"wrap",rowGap:e.spacing.lg,maxWidth:"100%",width:"fit-content"})),F=u("div",{target:"evl31sl1"})(({theme:e})=>({display:"flex",flexDirection:"column",alignItems:"stretch",width:"auto",flexGrow:0,">img":{borderRadius:e.radii.default}})),j=u("div",{target:"evl31sl2"})(({theme:e})=>({textAlign:"center",marginTop:e.spacing.xs,wordWrap:"break-word",padding:e.spacing.threeXS})),H=E.getLogger("ImageList");function M(e,t,r){if(e){if(e.useStretch)return r;if(e.useContent)return;if(e.pixelWidth)return e.pixelWidth}if(t!=null)switch(t){case-1:case-3:case-4:return;case-2:case-5:return r;default:return t>0?t:void 0}}const R=({itemKey:e,image:t,imgStyle:r,buildMediaURL:n,handleImageError:s})=>{const l=C(t.url);return p(F,{"data-testid":"stImageContainer",children:[i("img",{style:r,src:n(t.url),alt:e,onError:s,crossOrigin:l}),t.caption&&i(j,{"data-testid":"stImageCaption",style:r,children:i(L,{source:t.caption,allowHTML:!1,isCaption:!0,isLabel:!0})})]})};function G({element:e,endpoints:t,widthConfig:r,disableFullscreenMode:n}){const{expanded:s,width:l,height:d,expand:x,collapse:h}=v(T),g=l||0,f=M(r,e.width,g),a={};d&&s?(a.maxHeight=d,a.objectFit="contain",a.width="100%"):(a.width=f??"100%",a.maxWidth="100%");const I=c=>{const o=c.currentTarget.src;H.error(`Client Error: Image source error - ${o}`),t.sendClientErrorToHost("Image","Image source failed to load","onerror triggered",o)};return p(m,{width:g,height:d,useContainerWidth:s,topCentered:!0,children:[i(W,{target:m,isFullScreen:s,onExpand:x,onCollapse:h,disableFullscreenMode:n}),i(y,{className:"stImage","data-testid":"stImage",children:e.imgs.map((c,o)=>i(R,{itemKey:o.toString(),image:c,imgStyle:a,buildMediaURL:w=>t.buildMediaURL(w),handleImageError:I},o))})]})}const O=b(G),D=S.memo(O);export{D as default};
@@ -0,0 +1 @@
1
+ import{v as T,r as i,w as b,V as L,j as p,x as N}from"./index.BBnWuh07.js";const U=T("iframe",{target:"eymnmwl0"})(({theme:r})=>({colorScheme:"normal",border:"none",padding:r.spacing.none,margin:r.spacing.none,width:"100%",aspectRatio:"16 / 9"})),R=N.getLogger("Video"),A={width:"100%"};function O({element:r,endpoints:s,elementMgr:f}){const n=i.useRef(null),{type:y,url:l,startTime:a,subtitles:d,endTime:o,loop:u,autoplay:m,muted:E}=r;let g=b(l);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]),v=i.useMemo(()=>JSON.stringify(d?d.map(e=>s.buildMediaURL(`${e.url}`)):[]),[d,s]);i.useEffect(()=>{const e=JSON.parse(v);e.length!==0&&e.forEach(t=>{s.checkSourceUrlResponse(t,"Video Subtitle")})},[v,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 c=()=>{o>0&&e.currentTime>=o&&(u?(e.currentTime=a||0,e.play()):t||(t=!0,e.pause()))};return o>0&&e.addEventListener("timeupdate",c),()=>{e&&o>0&&e.removeEventListener("timeupdate",c)}},[o,u,a]),i.useEffect(()=>{const e=n.current;if(!e)return;const t=()=>{u&&(e.currentTime=a||0,e.play())};return e.addEventListener("ended",t),()=>{e&&e.removeEventListener("ended",t)}},[u,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()),u){t.searchParams.append("loop","1");const c=t.pathname.split("/").pop();c&&t.searchParams.append("playlist",c)}return m&&t.searchParams.append("autoplay","1"),E&&t.searchParams.append("mute","1"),t.toString()};if(y===L.Type.YOUTUBE_IFRAME)return p(U,{className:"stVideo","data-testid":"stVideo",title:l,src:V(l),allow:"autoplay; encrypted-media",allowFullScreen:!0});const h=e=>{const t=e.currentTarget.src;R.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(l),style:A,crossOrigin:g,onError:h,children:d&&d.map((e,t)=>p("track",{kind:"captions",src:s.buildMediaURL(`${e.url}`),label:`${e.label}`,default:t===0,"data-testid":"stVideoSubtitle"},t))})}const P=i.memo(O);export{P as default};
@@ -0,0 +1 @@
1
+ import{v as W,r,u as C,M as I,N as O,O as V,Q as $,e as P,j as n,l as H,R as L,T as N,P as k,W as B,X as E,Y as F,Z as A,$ as D,a0 as U}from"./index.BBnWuh07.js";import{u as Y}from"./useBasicWidgetState.Bnm4FD6K.js";import"./FormClearHelper.l_UPPvkg.js";const j=W("div",{target:"euzcfsp0"})(({theme:s})=>({"span[aria-disabled='true']":{background:s.colors.fadedText05}})),G=(s,t)=>s.getStringArrayValue(t),K=s=>s.default.map(t=>s.options[t])??null,X=s=>s.rawValues??null,_=(s,t,a,c)=>{t.setStringArrayValue(s,a.value,{fromUi:a.fromUi},c)},Q=s=>{const{element:t,widgetMgr:a,fragmentId:c}=s,e=C(),h=r.useContext(I),[i,p]=Y({getStateFromWidgetMgr:G,getDefaultStateFromProto:K,getCurrStateFromProto:X,updateWidgetMgrState:_,element:t,widgetMgr:a,fragmentId:c}),g=t.maxSelections>0&&i.length>=t.maxSelections,S=r.useMemo(()=>{if(t.maxSelections===0)return"No results";if(i.length===t.maxSelections){const o=t.maxSelections!==1?"options":"option";return`You can only select up to ${t.maxSelections} ${o}. Remove an option first.`}return"No results"},[t.maxSelections,i.length]),f=r.useMemo(()=>i.map(o=>({value:o,label:o})),[i]),m=r.useCallback(o=>{switch(o.type){case"remove":return O(i,o.option?.value);case"clear":return[];case"select":return i.concat([o.option?.value]);default:throw new Error(`State transition is unknown: ${o.type}`)}},[i]),b=r.useCallback(o=>{t.maxSelections&&o.type==="select"&&i.length>=t.maxSelections||p({value:m(o),fromUi:!0})},[t.maxSelections,m,p,i.length]),y=r.useCallback((o,l)=>{if(g)return[];const R=o.filter(T=>!i.includes(T.value));return V(R,l)},[g,i]),{options:d}=t,{placeholder:x,shouldDisable:v}=$(t.placeholder,d,t.acceptNewOptions??!1,!0),u=s.disabled||v,z=d.map((o,l)=>({label:o,value:o,id:`${o}_${l}`})),M=d.length>10,w=r.useMemo(()=>{const o=e.fontSizes.baseFontSize*1.6+14;return`${Math.round(o*4.25)}px`},[e.fontSizes.baseFontSize]);return P("div",{className:"stMultiSelect","data-testid":"stMultiSelect",children:[n(B,{label:t.label,disabled:u,labelVisibility:H(t.labelVisibility?.value),children:t.help&&n(L,{children:n(N,{content:t.help,placement:k.TOP_RIGHT})})}),n(j,{children:n(E,{creatable:t.acceptNewOptions??!1,options:z,labelKey:"label",valueKey:"value","aria-label":t.label,placeholder:x,type:D.select,multi:!0,onChange:b,value:f,disabled:u,size:"compact",noResultsMsg:S,filterOptions:y,closeOnSelect:!1,ignoreCase:!1,overrides:{Popover:{props:{ignoreBoundary:h,overrides:{Body:{style:()=>({marginTop:e.spacing.px})}}}},SelectArrow:{component:A,props:{style:{cursor:"pointer"},overrides:{Svg:{style:()=>({width:e.iconSizes.xl,height:e.iconSizes.xl})}}}},IconsContainer:{style:()=>({paddingRight:e.spacing.sm})},ControlContainer:{style:{maxHeight:w,minHeight:e.sizes.minElementHeight,borderLeftWidth:e.sizes.borderWidth,borderRightWidth:e.sizes.borderWidth,borderTopWidth:e.sizes.borderWidth,borderBottomWidth:e.sizes.borderWidth}},Placeholder:{style:()=>({flex:"inherit",color:u?e.colors.fadedText40:e.colors.fadedText60})},ValueContainer:{style:()=>({overflowY:"auto",paddingLeft:e.spacing.sm,paddingTop:e.spacing.none,paddingBottom:e.spacing.none,paddingRight:e.spacing.none})},ClearIcon:{props:{overrides:{Svg:{style:{color:e.colors.darkGray,padding:e.spacing.threeXS,height:e.sizes.clearIconSize,width:e.sizes.clearIconSize,cursor:"pointer",":hover":{fill:e.colors.bodyText}}}}}},SearchIcon:{style:{color:e.colors.darkGray}},Tag:{props:{overrides:{Root:{style:{fontWeight:e.fontWeights.normal,borderTopLeftRadius:e.radii.md,borderTopRightRadius:e.radii.md,borderBottomRightRadius:e.radii.md,borderBottomLeftRadius:e.radii.md,fontSize:e.fontSizes.md,paddingLeft:e.spacing.sm,marginLeft:e.spacing.none,marginRight:e.spacing.sm,height:`calc(${e.sizes.minElementHeight} - 2 * ${e.spacing.xs})`,maxWidth:`calc(100% - ${e.spacing.lg})`,cursor:"default !important"}},Action:{style:{paddingLeft:0}},ActionIcon:{props:{overrides:{Svg:{style:{width:"0.625em",height:"0.625em"}}}}}}}},MultiValue:{props:{overrides:{Root:{style:{fontSize:e.fontSizes.sm}}}}},Input:{props:{readOnly:U()&&M===!1?"readonly":null}},Dropdown:{component:F}}})})]})},ee=r.memo(Q);export{ee as default};
@@ -0,0 +1 @@
1
+ import{r as a,j as n,l as c,k as g}from"./index.BBnWuh07.js";import{u as m}from"./useBasicWidgetState.Bnm4FD6K.js";import"./FormClearHelper.l_UPPvkg.js";const b=(t,e)=>t.getStringValue(e),f=t=>t.default??null,p=t=>t.value??null,C=(t,e,r,o)=>{e.setStringValue(t,r.value,{fromUi:r.fromUi},o)},d=({element:t,disabled:e,widgetMgr:r,fragmentId:o})=>{const[i,l]=m({getStateFromWidgetMgr:b,getDefaultStateFromProto:f,getCurrStateFromProto:p,updateWidgetMgrState:C,element:t,widgetMgr:r,fragmentId:o}),s=a.useCallback(u=>{l({value:u,fromUi:!0})},[l]);return n(g,{label:t.label,labelVisibility:c(t.labelVisibility?.value),help:t.help,onChange:s,disabled:e,value:i})},k=a.memo(d);export{k as default};