streamlit-nightly 1.41.2.dev20250201__py2.py3-none-any.whl → 1.42.1.dev20250204__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- streamlit/auth_util.py +2 -1
- streamlit/commands/echo.py +4 -1
- streamlit/commands/execution_control.py +3 -1
- streamlit/commands/page_config.py +2 -1
- streamlit/config.py +56 -25
- streamlit/config_option.py +3 -3
- streamlit/connections/snowflake_connection.py +22 -10
- streamlit/connections/snowpark_connection.py +2 -1
- streamlit/connections/util.py +4 -1
- streamlit/dataframe_util.py +3 -8
- streamlit/delta_generator.py +1 -1
- streamlit/elements/alert.py +32 -4
- streamlit/elements/arrow.py +28 -15
- streamlit/elements/code.py +4 -3
- streamlit/elements/deck_gl_json_chart.py +3 -4
- streamlit/elements/form.py +22 -4
- streamlit/elements/heading.py +21 -6
- streamlit/elements/image.py +12 -3
- streamlit/elements/layouts.py +9 -4
- streamlit/elements/lib/built_in_chart_utils.py +1 -3
- streamlit/elements/lib/color_util.py +7 -6
- streamlit/elements/lib/column_config_utils.py +4 -3
- streamlit/elements/lib/column_types.py +100 -33
- streamlit/elements/lib/dicttools.py +4 -1
- streamlit/elements/lib/event_utils.py +2 -2
- streamlit/elements/lib/file_uploader_utils.py +4 -1
- streamlit/elements/lib/image_utils.py +5 -4
- streamlit/elements/lib/options_selector_utils.py +4 -1
- streamlit/elements/lib/pandas_styler_utils.py +2 -1
- streamlit/elements/lib/policies.py +3 -1
- streamlit/elements/lib/utils.py +1 -1
- streamlit/elements/map.py +3 -1
- streamlit/elements/markdown.py +21 -7
- streamlit/elements/media.py +2 -2
- streamlit/elements/metric.py +8 -4
- streamlit/elements/plotly_chart.py +4 -5
- streamlit/elements/spinner.py +25 -3
- streamlit/elements/text.py +7 -2
- streamlit/elements/vega_charts.py +26 -22
- streamlit/elements/widgets/audio_input.py +8 -4
- streamlit/elements/widgets/button.py +29 -12
- streamlit/elements/widgets/button_group.py +29 -13
- streamlit/elements/widgets/camera_input.py +8 -4
- streamlit/elements/widgets/chat.py +1 -3
- streamlit/elements/widgets/checkbox.py +16 -8
- streamlit/elements/widgets/color_picker.py +8 -4
- streamlit/elements/widgets/data_editor.py +10 -14
- streamlit/elements/widgets/file_uploader.py +12 -6
- streamlit/elements/widgets/multiselect.py +10 -5
- streamlit/elements/widgets/number_input.py +8 -4
- streamlit/elements/widgets/radio.py +11 -5
- streamlit/elements/widgets/select_slider.py +12 -8
- streamlit/elements/widgets/selectbox.py +11 -5
- streamlit/elements/widgets/slider.py +19 -17
- streamlit/elements/widgets/text_widgets.py +16 -8
- streamlit/elements/widgets/time_widgets.py +21 -15
- streamlit/elements/write.py +60 -43
- streamlit/errors.py +1 -2
- streamlit/external/langchain/streamlit_callback_handler.py +3 -3
- streamlit/hello/animation_demo.py +1 -1
- streamlit/material_icon_names.py +1 -1
- streamlit/proto/NewSession_pb2.py +16 -16
- streamlit/proto/NewSession_pb2.pyi +30 -3
- streamlit/runtime/app_session.py +15 -15
- streamlit/runtime/caching/cached_message_replay.py +2 -1
- streamlit/runtime/caching/hashing.py +3 -2
- streamlit/runtime/context.py +2 -1
- streamlit/runtime/forward_msg_cache.py +3 -1
- streamlit/runtime/memory_session_storage.py +4 -1
- streamlit/runtime/memory_uploaded_file_manager.py +4 -1
- streamlit/runtime/runtime.py +6 -4
- streamlit/runtime/scriptrunner/script_runner.py +4 -3
- streamlit/runtime/scriptrunner_utils/script_run_context.py +2 -3
- streamlit/runtime/secrets.py +1 -5
- streamlit/runtime/state/common.py +2 -4
- streamlit/runtime/state/query_params.py +2 -1
- streamlit/runtime/state/query_params_proxy.py +2 -1
- streamlit/runtime/state/safe_session_state.py +3 -1
- streamlit/runtime/state/session_state.py +2 -5
- streamlit/runtime/state/session_state_proxy.py +2 -1
- streamlit/runtime/uploaded_file_manager.py +3 -1
- streamlit/runtime/websocket_session_manager.py +8 -8
- streamlit/static/index.html +2 -2
- streamlit/static/static/css/{index.mUTQuMqR.css → index.DpJG_94W.css} +1 -1
- streamlit/static/static/js/{FileDownload.esm.Cf3bITtP.js → FileDownload.esm.CuayiK6T.js} +1 -1
- streamlit/static/static/js/FileDropzone.CvXoxIUm.js +5 -0
- streamlit/static/static/js/{FormClearHelper.BgwPD1tD.js → FormClearHelper.DpwWkrvV.js} +1 -1
- streamlit/static/static/js/{Hooks.BMaXaj11.js → Hooks.BQiFiHd5.js} +1 -1
- streamlit/static/static/js/{InputInstructions.qlsk9gvt.js → InputInstructions.CypmdrYz.js} +1 -1
- streamlit/static/static/js/ProgressBar.DfR4HyQR.js +2 -0
- streamlit/static/static/js/{RenderInPortalIfExists.Blpdplqk.js → RenderInPortalIfExists.D6u3szcn.js} +1 -1
- streamlit/static/static/js/{Toolbar.DMhyNpv2.js → Toolbar.D6p42Hno.js} +1 -1
- streamlit/static/static/js/axios.upsvKRUO.js +6 -0
- streamlit/static/static/js/{base-input.DyTEaESI.js → base-input.B5AcLp6p.js} +4 -4
- streamlit/static/static/js/{createSuper.B3rIhdpQ.js → createSuper.DNzaJgi-.js} +1 -1
- streamlit/static/static/js/{data-grid-overlay-editor.C9Q9Gy4e.js → data-grid-overlay-editor.CKACfVZL.js} +1 -1
- streamlit/static/static/js/{downloader.BAMiKd1n.js → downloader.D6HV3a60.js} +1 -1
- streamlit/static/static/js/{es6.D82pr6dy.js → es6.UQDWlCyE.js} +2 -2
- streamlit/static/static/js/{iframeResizer.contentWindow.CJwxqR7x.js → iframeResizer.contentWindow.DQ-TFrBp.js} +1 -1
- streamlit/static/static/js/{index.B7J6suR-.js → index.2EE80u0h.js} +200 -200
- streamlit/static/static/js/{index.CoE1gpPQ.js → index.B96fHK2A.js} +1 -1
- streamlit/static/static/js/index.BAFGiIHm.js +1 -0
- streamlit/static/static/js/index.BPNlEjgz.js +1 -0
- streamlit/static/static/js/{index.C4kPuKr4.js → index.BPmrb-47.js} +1 -1
- streamlit/static/static/js/{index.BM_J1KkD.js → index.BQEIBi4n.js} +1 -1
- streamlit/static/static/js/index.BUGQmWUV.js +3 -0
- streamlit/static/static/js/index.BXmBj7MJ.js +1 -0
- streamlit/static/static/js/{index.5JFTbX2J.js → index.BY8YeKF1.js} +1 -1
- streamlit/static/static/js/{index.CF4stbIZ.js → index.BdVr8Tta.js} +1 -1
- streamlit/static/static/js/{index.CjFbbEE0.js → index.BghvoEVe.js} +1 -1
- streamlit/static/static/js/{index.8Q56Jjmk.js → index.BiMrOUpK.js} +1 -1
- streamlit/static/static/js/{index.yp4f0OMe.js → index.BiybRa0I.js} +2 -2
- streamlit/static/static/js/index.Bm7Vkuba.js +73 -0
- streamlit/static/static/js/{index.BZvQkTCS.js → index.BuyK2IsW.js} +1 -1
- streamlit/static/static/js/index.ByH1pn5_.js +1 -0
- streamlit/static/static/js/{index.zlHOKWDA.js → index.C8zZSMvD.js} +1 -1
- streamlit/static/static/js/index.CAuJtYES.js +1 -0
- streamlit/static/static/js/{index.Y84nTPW2.js → index.CEdHQ1ob.js} +1 -1
- streamlit/static/static/js/{index.CqGcWpm5.js → index.CJ-t5S6T.js} +2 -2
- streamlit/static/static/js/{index.BdlaxG49.js → index.CKOdbWxq.js} +1 -1
- streamlit/static/static/js/index.CSgG8OVN.js +1 -0
- streamlit/static/static/js/index.CX9gqq2L.js +1 -0
- streamlit/static/static/js/{index.TPHsScPF.js → index.CgVoYKAP.js} +1 -1
- streamlit/static/static/js/{index.D9yF6cxC.js → index.ChrjN8GY.js} +1 -1
- streamlit/static/static/js/{index.NbimJbgq.js → index.CrMtUJsu.js} +6 -6
- streamlit/static/static/js/index.D4SMJhY1.js +1 -0
- streamlit/static/static/js/index.D7BxtE4u.js +1 -0
- streamlit/static/static/js/{index.P5kx9um8.js → index.DB_dBVfZ.js} +5 -5
- streamlit/static/static/js/{index.BLCqXxIG.js → index.DMKXUbO6.js} +1 -1
- streamlit/static/static/js/index.DaoBv396.js +1 -0
- streamlit/static/static/js/{index.B3Wxz7wG.js → index.DkV6k6Ng.js} +1 -1
- streamlit/static/static/js/{index.BcAjRRAZ.js → index.DqZZoWyt.js} +1 -1
- streamlit/static/static/js/index.Dr6DSYcq.js +1 -0
- streamlit/static/static/js/{index.BdEYCAFh.js → index.Epl2r08f.js} +1 -1
- streamlit/static/static/js/{index.CC5oiyoV.js → index.ndVWhafL.js} +2 -2
- streamlit/static/static/js/{index.DiZyaYeV.js → index.wW-pPvtW.js} +3 -3
- streamlit/static/static/js/{input.DRyjjTTH.js → input.CxqdG-sh.js} +2 -2
- streamlit/static/static/js/{memory.C98yjNkk.js → memory.DuSk7Eex.js} +1 -1
- streamlit/static/static/js/{mergeWith.CLihEflw.js → mergeWith.DrxB1Sj4.js} +1 -1
- streamlit/static/static/js/{number-overlay-editor.DozQhDJj.js → number-overlay-editor.DBc0yndt.js} +1 -1
- streamlit/static/static/js/{possibleConstructorReturn.DJ7-JsJc.js → possibleConstructorReturn.ZdYWHeG3.js} +1 -1
- streamlit/static/static/js/{sandbox.0Tj4C46D.js → sandbox.D3L4CYjG.js} +1 -1
- streamlit/static/static/js/{textarea.CUrV8-V3.js → textarea.CSafh28v.js} +2 -2
- streamlit/static/static/js/{timepicker.DEu3fwJe.js → timepicker.C-pwkiaT.js} +4 -4
- streamlit/static/static/js/{toConsumableArray.C71OtXzK.js → toConsumableArray.DyCVskz5.js} +1 -1
- streamlit/static/static/js/{uniqueId.CndDhnid.js → uniqueId.BODM2vTk.js} +1 -1
- streamlit/static/static/js/useBasicWidgetState.DQUiM2dz.js +1 -0
- streamlit/static/static/js/{useOnInputChange.CvHbHWmy.js → useOnInputChange.Ccjd55xn.js} +1 -1
- streamlit/static/static/js/{withFullScreenWrapper.BLLyDFUF.js → withFullScreenWrapper.CneUoXNE.js} +1 -1
- streamlit/static/static/media/MaterialSymbols-Rounded.DcZbplWk.woff2 +0 -0
- streamlit/testing/v1/app_test.py +3 -1
- streamlit/testing/v1/element_tree.py +3 -4
- streamlit/testing/v1/local_script_runner.py +3 -3
- streamlit/type_util.py +11 -8
- streamlit/user_info.py +2 -3
- streamlit/watcher/path_watcher.py +4 -4
- streamlit/web/server/authlib_tornado_integration.py +3 -1
- streamlit/web/server/browser_websocket_handler.py +3 -1
- streamlit/web/server/routes.py +4 -1
- streamlit/web/server/server.py +2 -1
- {streamlit_nightly-1.41.2.dev20250201.dist-info → streamlit_nightly-1.42.1.dev20250204.dist-info}/METADATA +1 -2
- {streamlit_nightly-1.41.2.dev20250201.dist-info → streamlit_nightly-1.42.1.dev20250204.dist-info}/RECORD +166 -165
- streamlit/static/static/js/FileDropzone.B8wCqKiM.js +0 -5
- streamlit/static/static/js/ProgressBar.Di2oT-20.js +0 -2
- streamlit/static/static/js/index.B79cf7gS.js +0 -1
- streamlit/static/static/js/index.BBPZ3wsr.js +0 -1
- streamlit/static/static/js/index.BKahTKEx.js +0 -3
- streamlit/static/static/js/index.CSGfgCnQ.js +0 -1
- streamlit/static/static/js/index.CYMgsYSm.js +0 -1
- streamlit/static/static/js/index.CZjnqbcd.js +0 -73
- streamlit/static/static/js/index.C_4BuzGH.js +0 -1
- streamlit/static/static/js/index.CjiPq39N.js +0 -1
- streamlit/static/static/js/index.CjuTYYFG.js +0 -1
- streamlit/static/static/js/index.CuH7mftz.js +0 -1
- streamlit/static/static/js/index.DFJg1zHB.js +0 -1
- streamlit/static/static/js/index.Dm3nmdhh.js +0 -1
- streamlit/static/static/js/index.rrDohWOh.js +0 -1
- streamlit/static/static/js/useBasicWidgetState.DXLMTaiS.js +0 -1
- streamlit/static/static/media/MaterialSymbols-Rounded.DzyB5T7Y.woff2 +0 -0
- {streamlit_nightly-1.41.2.dev20250201.data → streamlit_nightly-1.42.1.dev20250204.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.41.2.dev20250201.dist-info → streamlit_nightly-1.42.1.dev20250204.dist-info}/WHEEL +0 -0
- {streamlit_nightly-1.41.2.dev20250201.dist-info → streamlit_nightly-1.42.1.dev20250204.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.41.2.dev20250201.dist-info → streamlit_nightly-1.42.1.dev20250204.dist-info}/top_level.txt +0 -0
@@ -1,3 +1,3 @@
|
|
1
|
-
import{
|
2
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mt(e,t){if(e){if(typeof e=="string")return ae(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ae(e,t)}}function ae(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function vt(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],o=!0,i=!1,a,u;try{for(r=r.call(e);!(o=(a=r.next()).done)&&(n.push(a.value),!(t&&n.length===t));o=!0);}catch(p){i=!0,u=p}finally{try{!o&&r.return!=null&&r.return()}finally{if(i)throw u}}return n}}function bt(e){if(Array.isArray(e))return e}function ht(e,t){if(e==null)return{};var r=St(e,t),n,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function St(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,i;for(i=0;i<n.length;i++)o=n[i],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}var Ot=function(t,r){var n=t.children,o=t.title,i=t.size,a=t.color,u=t.overrides,p=u===void 0?{}:u,l=ht(t,dt),f=(0,ut.getOverrides)(p.Svg,st.Svg),v=gt(f,2),h=v[0],S=v[1],O=h.__STYLETRON__?T(T({title:o,$color:a,$size:i},l),S):T(T({title:o,color:a,size:i},(0,oe.default)(l)),(0,oe.default)(S));return z.createElement(h,Z({"data-baseweb":"icon",ref:r},O),o?z.createElement("title",null,o):null,n)},$t=z.forwardRef(Ot);w.default=$t;function j(e){"@babel/helpers - typeof";return j=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},j(e)}Object.defineProperty(E,"__esModule",{value:!0});E.default=void 0;var k=Tt(P),It=V,le=m,Pt=_t(w),Ct=["title","size","color","overrides"];function _t(e){return e&&e.__esModule?e:{default:e}}function be(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(be=function(o){return o?r:t})(e)}function Tt(e,t){if(e&&e.__esModule)return e;if(e===null||j(e)!=="object"&&typeof e!="function")return{default:e};var r=be(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}function H(){return H=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},H.apply(this,arguments)}function Et(e,t){if(e==null)return{};var r=wt(e,t),n,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function wt(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,i;for(i=0;i<n.length;i++)o=n[i],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function Rt(e,t){return
|
3
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xt(e,t){if(e){if(typeof e=="string")return ue(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ue(e,t)}}function ue(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function At(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],o=!0,i=!1,a,u;try{for(r=r.call(e);!(o=(a=r.next()).done)&&(n.push(a.value),!(t&&n.length===t));o=!0);}catch(p){i=!0,u=p}finally{try{!o&&r.return!=null&&r.return()}finally{if(i)throw u}}return n}}function Nt(e){if(Array.isArray(e))return e}function Wt(e,t){var r=(0,It.useStyletron)(),n=Rt(r,2),o=n[1],i=e.title,a=i===void 0?"Delete Alt":i,u=e.size,p=e.color,l=e.overrides,f=l===void 0?{}:l,v=Et(e,Ct),h=(0,le.mergeOverride)({component:o.icons&&o.icons.DeleteAlt?o.icons.DeleteAlt:null},f&&f.Svg?(0,le.toObjectOverride)(f.Svg):{});return k.createElement(Pt.default,H({viewBox:"0 0 24 24",ref:t,title:a,size:u,color:p,overrides:{Svg:h}},v),k.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 20C16.4183 20 20 16.4183 20 12C20 7.58173 16.4183 4 12 4C7.58173 4 4 7.58173 4 12C4 16.4183 7.58173 20 12 20ZM10.0303 8.96967C9.73743 8.67679 9.26257 8.67679 8.96967 8.96967C8.67676 9.26257 8.67676 9.73743 8.96967 10.0303L10.9393 12L8.96967 13.9697C8.67676 14.2626 8.67676 14.7374 8.96967 15.0303C9.26257 15.3232 9.73743 15.3232 10.0303 15.0303L12 13.0607L13.9697 15.0303C14.2626 15.3232 14.7374 15.3232 15.0303 15.0303C15.3232 14.7374 15.3232 14.2626 15.0303 13.9697L13.0607 12L15.0303 10.0303C15.3232 9.73743 15.3232 9.26257 15.0303 8.96967C14.7374 8.67679 14.2626 8.67679 13.9697 8.96967L12 10.9393L10.0303 8.96967Z"}))}var Bt=k.forwardRef(Wt);E.default=Bt;Object.defineProperty(d,"__esModule",{value:!0});d.getRootStyles=d.getInputStyles=d.getInputContainerStyles=d.StyledMaskToggleButton=d.StyledClearIconContainer=he=d.StyledClearIcon=d.Root=d.InputEnhancer=d.InputContainer=d.Input=void 0;var $=V,s=g,Mt=Lt(E);function Lt(e){return e&&e.__esModule?e:{default:e}}function se(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function y(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?se(Object(r),!0).forEach(function(n){c(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):se(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function c(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Y=(0,$.styled)("button",function(e){var t,r=e.$theme,n=e.$size,o=e.$isFocusVisible,i=(t={},c(t,s.SIZE.mini,r.sizing.scale400),c(t,s.SIZE.compact,r.sizing.scale400),c(t,s.SIZE.default,r.sizing.scale300),c(t,s.SIZE.large,r.sizing.scale200),t)[n];return{display:"flex",alignItems:"center",borderTopStyle:"none",borderBottomStyle:"none",borderLeftStyle:"none",borderRightStyle:"none",background:"none",paddingLeft:i,paddingRight:i,outline:o?"solid 3px ".concat(r.colors.accent):"none",color:r.colors.contentPrimary}});d.StyledMaskToggleButton=Y;Y.displayName="StyledMaskToggleButton";Y.displayName="StyledMaskToggleButton";var G=(0,$.styled)("div",function(e){var t,r=e.$alignTop,n=r===void 0?!1:r,o=e.$size,i=e.$theme,a=(t={},c(t,s.SIZE.mini,i.sizing.scale200),c(t,s.SIZE.compact,i.sizing.scale200),c(t,s.SIZE.default,i.sizing.scale100),c(t,s.SIZE.large,i.sizing.scale0),t)[o];return{display:"flex",alignItems:n?"flex-start":"center",paddingLeft:a,paddingRight:a,paddingTop:n?i.sizing.scale500:"0px",color:i.colors.contentPrimary}});d.StyledClearIconContainer=G;G.displayName="StyledClearIconContainer";G.displayName="StyledClearIconContainer";var K=(0,$.styled)(Mt.default,function(e){var t=e.$theme,r=e.$isFocusVisible;return{cursor:"pointer",outline:r?"solid 3px ".concat(t.colors.accent):"none"}}),he=d.StyledClearIcon=K;K.displayName="StyledClearIcon";K.displayName="StyledClearIcon";function Ft(e,t){var r;return(r={},c(r,s.SIZE.mini,{paddingTop:t.scale100,paddingBottom:t.scale100,paddingLeft:t.scale550,paddingRight:t.scale550}),c(r,s.SIZE.compact,{paddingTop:t.scale200,paddingBottom:t.scale200,paddingLeft:t.scale550,paddingRight:t.scale550}),c(r,s.SIZE.default,{paddingTop:t.scale400,paddingBottom:t.scale400,paddingLeft:t.scale550,paddingRight:t.scale550}),c(r,s.SIZE.large,{paddingTop:t.scale550,paddingBottom:t.scale550,paddingLeft:t.scale550,paddingRight:t.scale550}),r)[e]}function zt(e,t,r,n,o){var i=e===s.ADJOINED.both||e===s.ADJOINED.left&&n!=="rtl"||e===s.ADJOINED.right&&n==="rtl"||o&&n==="rtl",a=e===s.ADJOINED.both||e===s.ADJOINED.right&&n!=="rtl"||e===s.ADJOINED.left&&n==="rtl"||o&&n!=="rtl";return{paddingLeft:i?r.scale550:"0px",paddingRight:a?r.scale550:"0px"}}function R(e,t){var r;return(r={},c(r,s.SIZE.mini,t.font100),c(r,s.SIZE.compact,t.font200),c(r,s.SIZE.default,t.font300),c(r,s.SIZE.large,t.font400),r)[e]}function Zt(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,o=arguments.length>4?arguments[4]:void 0;return e?{borderLeftColor:o.inputFillDisabled,borderRightColor:o.inputFillDisabled,borderTopColor:o.inputFillDisabled,borderBottomColor:o.inputFillDisabled,backgroundColor:o.inputFillDisabled}:t?{borderLeftColor:o.borderSelected,borderRightColor:o.borderSelected,borderTopColor:o.borderSelected,borderBottomColor:o.borderSelected,backgroundColor:o.inputFillActive}:r?{borderLeftColor:o.inputBorderError,borderRightColor:o.inputBorderError,borderTopColor:o.inputBorderError,borderBottomColor:o.inputBorderError,backgroundColor:o.inputFillError}:n?{borderLeftColor:o.inputBorderPositive,borderRightColor:o.inputBorderPositive,borderTopColor:o.inputBorderPositive,borderBottomColor:o.inputBorderPositive,backgroundColor:o.inputFillPositive}:{borderLeftColor:o.inputBorder,borderRightColor:o.inputBorder,borderTopColor:o.inputBorder,borderBottomColor:o.inputBorder,backgroundColor:o.inputFill}}function jt(e,t){var r=t.inputBorderRadius;return e===s.SIZE.mini&&(r=t.inputBorderRadiusMini),{borderTopLeftRadius:r,borderBottomLeftRadius:r,borderTopRightRadius:r,borderBottomRightRadius:r}}var Se=function(t){var r=t.$isFocused,n=t.$adjoined,o=t.$error,i=t.$disabled,a=t.$positive,u=t.$size,p=t.$theme,l=t.$theme,f=l.borders,v=l.colors,h=l.sizing,S=l.typography,O=l.animation,D=t.$hasIconTrailing;return y(y(y(y({boxSizing:"border-box",display:"flex",overflow:"hidden",width:"100%",borderLeftWidth:"2px",borderRightWidth:"2px",borderTopWidth:"2px",borderBottomWidth:"2px",borderLeftStyle:"solid",borderRightStyle:"solid",borderTopStyle:"solid",borderBottomStyle:"solid",transitionProperty:"border",transitionDuration:O.timing200,transitionTimingFunction:O.easeOutCurve},jt(u,f)),R(u,S)),Zt(i,r,o,a,v)),zt(n,u,h,p.direction,D))};d.getRootStyles=Se;var X=(0,$.styled)("div",Se);d.Root=X;X.displayName="Root";X.displayName="Root";function kt(e,t){var r;return(r={},c(r,s.SIZE.mini,{paddingRight:t.scale400,paddingLeft:t.scale400}),c(r,s.SIZE.compact,{paddingRight:t.scale400,paddingLeft:t.scale400}),c(r,s.SIZE.default,{paddingRight:t.scale300,paddingLeft:t.scale300}),c(r,s.SIZE.large,{paddingRight:t.scale200,paddingLeft:t.scale200}),r)[e]}function Ht(e,t,r,n,o){return e?{color:o.inputEnhancerTextDisabled,backgroundColor:o.inputFillDisabled}:t?{color:o.contentPrimary,backgroundColor:o.inputFillActive}:r?{color:o.contentPrimary,backgroundColor:o.inputFillError}:n?{color:o.contentPrimary,backgroundColor:o.inputFillPositive}:{color:o.contentPrimary,backgroundColor:o.inputFill}}var Q=(0,$.styled)("div",function(e){var t=e.$size,r=e.$disabled,n=e.$isFocused,o=e.$error,i=e.$positive,a=e.$theme,u=a.colors,p=a.sizing,l=a.typography,f=a.animation;return y(y(y({display:"flex",alignItems:"center",justifyContent:"center",transitionProperty:"color, background-color",transitionDuration:f.timing200,transitionTimingFunction:f.easeOutCurve},R(t,l)),kt(t,p)),Ht(r,n,o,i,u))});d.InputEnhancer=Q;Q.displayName="InputEnhancer";Q.displayName="InputEnhancer";function Vt(e,t,r,n,o){return e?{color:o.inputTextDisabled,backgroundColor:o.inputFillDisabled}:t?{color:o.contentPrimary,backgroundColor:o.inputFillActive}:r?{color:o.contentPrimary,backgroundColor:o.inputFillError}:n?{color:o.contentPrimary,backgroundColor:o.inputFillPositive}:{color:o.contentPrimary,backgroundColor:o.inputFill}}var Oe=function(t){var r=t.$isFocused,n=t.$error,o=t.$disabled,i=t.$positive,a=t.$size,u=t.$theme,p=u.colors,l=u.typography,f=u.animation;return y(y({display:"flex",width:"100%",transitionProperty:"background-color",transitionDuration:f.timing200,transitionTimingFunction:f.easeOutCurve},R(a,l)),Vt(o,r,n,i,p))};d.getInputContainerStyles=Oe;var ee=(0,$.styled)("div",Oe);d.InputContainer=ee;ee.displayName="InputContainer";ee.displayName="InputContainer";function qt(e,t,r,n){return e?{color:n.inputTextDisabled,"-webkit-text-fill-color":n.inputTextDisabled,caretColor:n.contentPrimary,"::placeholder":{color:n.inputPlaceholderDisabled}}:{color:n.contentPrimary,caretColor:n.contentPrimary,"::placeholder":{color:n.inputPlaceholder}}}var $e=function(t){var r=t.$disabled,n=t.$isFocused,o=t.$error,i=t.$size,a=t.$theme,u=a.colors,p=a.sizing,l=a.typography;return y(y(y({boxSizing:"border-box",backgroundColor:"transparent",borderLeftWidth:0,borderRightWidth:0,borderTopWidth:0,borderBottomWidth:0,borderLeftStyle:"none",borderRightStyle:"none",borderTopStyle:"none",borderBottomStyle:"none",outline:"none",width:"100%",minWidth:0,maxWidth:"100%",cursor:r?"not-allowed":"text",margin:"0",paddingTop:"0",paddingBottom:"0",paddingLeft:"0",paddingRight:"0"},R(i,l)),Ft(i,p)),qt(r,n,o,u))};d.getInputStyles=$e;var te=(0,$.styled)("input",$e);d.Input=te;te.displayName="Input";te.displayName="Input";const Ut=Be("div",{target:"e1ybf61d0"})({position:"absolute",top:"50%",right:"2.05em"});function Jt({disabled:e,element:t,widgetMgr:r,width:n,fragmentId:o}){var S;const[i,a]=Ve({getStateFromWidgetMgr:Yt,getDefaultStateFromProto:Gt,getCurrStateFromProto:Kt,updateWidgetMgrState:Xt,element:t,widgetMgr:r,fragmentId:o}),u=x(t.default)&&!e,p={width:n},l=Me(),f={Select:{props:{disabled:e,overrides:{ControlContainer:{style:{height:l.sizes.minElementHeight,borderLeftWidth:l.sizes.borderWidth,borderRightWidth:l.sizes.borderWidth,borderTopWidth:l.sizes.borderWidth,borderBottomWidth:l.sizes.borderWidth}},IconsContainer:{style:()=>({paddingRight:l.spacing.sm})},ValueContainer:{style:()=>({lineHeight:l.lineHeights.inputWidget,paddingRight:l.spacing.sm,paddingLeft:l.spacing.sm,paddingBottom:l.spacing.sm,paddingTop:l.spacing.sm})},SingleValue:{props:{"data-testid":"stTimeInputTimeDisplay"}},Dropdown:{style:()=>({paddingTop:l.spacing.none,paddingBottom:l.spacing.none,boxShadow:"none",maxHeight:l.sizes.maxDropdownHeight})},DropdownListItem:{style:()=>({paddingRight:l.spacing.lg,paddingLeft:l.spacing.lg,paddingTop:l.spacing.sm,paddingBottom:l.spacing.sm})},Popover:{props:{overrides:{Body:{style:()=>({marginTop:l.spacing.px})}}}},SelectArrow:{component:Le,props:{overrides:{Svg:{style:()=>({width:l.iconSizes.xl,height:l.iconSizes.xl})}}}}}}}},v=P.useCallback(O=>{const D=O===null?null:Qt(O);a({value:D,fromUi:!0})},[a]),h=P.useCallback(()=>{v(null)},[v]);return Fe("div",{className:"stTimeInput","data-testid":"stTimeInput",style:p,children:[I(He,{label:t.label,disabled:e,labelVisibility:ze((S=t.labelVisibility)==null?void 0:S.value),children:t.help&&I(Ze,{children:I(je,{content:t.help,placement:ke.TOP_RIGHT})})}),I(qe,{format:"24",step:t.step?Number(t.step):900,value:x(i)?void 0:er(i),onChange:v,overrides:f,nullable:u,creatable:!0,"aria-label":t.label}),u&&!x(i)&&I(Ut,{onClick:h,"data-testid":"stTimeInputClearButton",children:I(he,{overrides:{Svg:{style:{color:l.colors.darkGray,padding:l.spacing.threeXS,height:l.sizes.clearIconSize,width:l.sizes.clearIconSize,":hover":{fill:l.colors.bodyText}}}},$isFocusVisible:!1})})]})}function Yt(e,t){return e.getStringValue(t)??null}function Gt(e){return e.default??null}function Kt(e){return e.value??null}function Xt(e,t,r,n){t.setStringValue(e,r.value,{fromUi:r.fromUi},n)}function Qt(e){const t=e.getHours().toString().padStart(2,"0"),r=e.getMinutes().toString().padStart(2,"0");return`${t}:${r}`}function er(e){if(e===null)return null;const[t,r]=e.split(":").map(Number),n=new Date;return n.setHours(t),n.setMinutes(r),n}const lr=P.memo(Jt);export{lr as default};
|
1
|
+
import{bY as Ie,ct as Pe,cu as Ce,cv as _e,cw as Te,cx as Ee,c9 as we,bw as Re,bQ as De,cy as xe,ca as Ae,cz as We,r as P,cA as Ne,n as Be,J as x,y as Me,bX as Le,z as Fe,j as I,bs as ze,bF as Ze,bt as je,bc as ke,bu as He}from"./index.2EE80u0h.js";import{a as Ve}from"./useBasicWidgetState.DQUiM2dz.js";import{T as qe}from"./timepicker.C-pwkiaT.js";import"./FormClearHelper.DpwWkrvV.js";import"./possibleConstructorReturn.ZdYWHeG3.js";import"./createSuper.DNzaJgi-.js";var Ue=Ie.Consumer;const Je=Object.freeze(Object.defineProperty({__proto__:null,ThemeConsumer:Ue,ThemeProvider:Pe,createThemedStyled:Ce,createThemedUseStyletron:_e,createThemedWithStyle:Te,expandBorderStyles:Ee,hexToRgb:we,styled:Re,useStyletron:De,withStyle:xe,withWrapper:Ae},Symbol.toStringTag,{value:"Module"}));var d={};const V=We(Je);var g={};Object.defineProperty(g,"__esModule",{value:!0});g.STATE_CHANGE_TYPE=g.SIZE=g.ENHANCER_POSITION=g.CUSTOM_INPUT_TYPE=g.ADJOINED=void 0;var Ye={change:"change"};g.STATE_CHANGE_TYPE=Ye;var Ke={textarea:"textarea"};g.CUSTOM_INPUT_TYPE=Ke;var Ge={none:"none",left:"left",right:"right",both:"both"};g.ADJOINED=Ge;var Xe={mini:"mini",default:"default",compact:"compact",large:"large"};g.SIZE=Xe;var Qe={start:"start",end:"end"};g.ENHANCER_POSITION=Qe;var E={},m={},q={};Object.defineProperty(q,"__esModule",{value:!0});q.default=de;function A(e){"@babel/helpers - typeof";return A=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},A(e)}function de(e){e=e||{};for(var t=arguments.length<=1?0:arguments.length-1,r,n,o=0;o<t;o++){r=(o+1<1||arguments.length<=o+1?void 0:arguments[o+1])||{};for(var i in r)A(r[i])!==void 0&&(n=r[i],et(n)?e[i]=de(e[i]||Array.isArray(n)&&[]||{},n):e[i]=n)}return e}function et(e){return Array.isArray(e)||{}.toString.call(e)=="[object Object]"}Object.defineProperty(m,"__esModule",{value:!0});m.getOverride=fe;m.getOverrideProps=B;m.getOverrides=ge;m.mergeConfigurationOverrides=L;m.mergeOverride=ye;m.mergeOverrides=ot;m.toObjectOverride=M;m.useOverrides=it;var W=rt(P),ce=Ne,re=tt(q);function tt(e){return e&&e.__esModule?e:{default:e}}function pe(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(pe=function(o){return o?r:t})(e)}function rt(e,t){if(e&&e.__esModule)return e;if(e===null||b(e)!=="object"&&typeof e!="function")return{default:e};var r=pe(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}function N(){return N=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},N.apply(this,arguments)}function ne(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function C(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ne(Object(r),!0).forEach(function(n){nt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ne(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function nt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function b(e){"@babel/helpers - typeof";return b=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},b(e)}function fe(e){return(0,ce.isValidElementType)(e)?e:e&&b(e)==="object"?e.component:e}function B(e){return e&&b(e)==="object"?b(e.props)==="object"?C(C({},e.props),{},{$style:e.style}):{$style:e.style}:{}}function M(e){return(0,ce.isValidElementType)(e)?{component:e}:e||{}}function ge(e,t){var r=fe(e)||t;if(e&&b(e)==="object"&&typeof e.props=="function"){var n=W.forwardRef(function(i,a){var u=e.props(i),p=B(C(C({},e),{},{props:u}));return W.createElement(r,N({ref:a},p))});return n.displayName=r.displayName,[n,{}]}var o=B(e);return[r,o]}function ot(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=Object.assign({},e,t),n=Object.keys(r);return n.reduce(function(o,i){return o[i]=ye(M(e[i]),M(t[i])),o},{})}function ye(e,t){var r=C(C({},e),t);return e.props&&t.props&&(r.props=L(e.props,t.props)),e.style&&t.style&&(r.style=L(e.style,t.style)),r}function L(e,t){return b(e)==="object"&&b(t)==="object"?(0,re.default)({},e,t):function(){return(0,re.default)({},typeof e=="function"?e.apply(void 0,arguments):e,typeof t=="function"?t.apply(void 0,arguments):t)}}function it(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return W.useMemo(function(){return Object.keys(e).reduce(function(r,n){return r[n]=ge(t[n],e[n]),r},{})},[t])}var w={},_={};Object.defineProperty(_,"__esModule",{value:!0});_.Svg=void 0;_.getSvgStyles=me;var at=V;function me(e){var t=e.$theme,r=e.$size,n=e.$color,o=t.sizing.scale600;r&&(t.sizing[r]?o=t.sizing[r]:typeof r=="number"?o="".concat(r,"px"):o=r);var i="currentColor";return n&&(t.colors[n]?i=t.colors[n]:i=n),{display:"inline-block",fill:i,color:i,height:o,width:o}}var U=(0,at.styled)("svg",me);_.Svg=U;U.displayName="Svg";U.displayName="Svg";var J={};Object.defineProperty(J,"__esModule",{value:!0});J.default=lt;function lt(e){var t={};for(var r in e)r[0]!=="$"&&(t[r]=e[r]);return t}function F(e){"@babel/helpers - typeof";return F=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},F(e)}Object.defineProperty(w,"__esModule",{value:!0});w.default=void 0;var z=pt(P),ut=m,st=_,oe=ct(J),dt=["children","title","size","color","overrides"];function ct(e){return e&&e.__esModule?e:{default:e}}function ve(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(ve=function(o){return o?r:t})(e)}function pt(e,t){if(e&&e.__esModule)return e;if(e===null||F(e)!=="object"&&typeof e!="function")return{default:e};var r=ve(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}function Z(){return Z=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Z.apply(this,arguments)}function ie(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function T(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ie(Object(r),!0).forEach(function(n){ft(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ie(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ft(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gt(e,t){return bt(e)||vt(e,t)||mt(e,t)||yt()}function yt(){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 mt(e,t){if(e){if(typeof e=="string")return ae(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ae(e,t)}}function ae(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function vt(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],o=!0,i=!1,a,u;try{for(r=r.call(e);!(o=(a=r.next()).done)&&(n.push(a.value),!(t&&n.length===t));o=!0);}catch(p){i=!0,u=p}finally{try{!o&&r.return!=null&&r.return()}finally{if(i)throw u}}return n}}function bt(e){if(Array.isArray(e))return e}function ht(e,t){if(e==null)return{};var r=St(e,t),n,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function St(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,i;for(i=0;i<n.length;i++)o=n[i],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}var Ot=function(t,r){var n=t.children,o=t.title,i=t.size,a=t.color,u=t.overrides,p=u===void 0?{}:u,l=ht(t,dt),f=(0,ut.getOverrides)(p.Svg,st.Svg),v=gt(f,2),h=v[0],S=v[1],O=h.__STYLETRON__?T(T({title:o,$color:a,$size:i},l),S):T(T({title:o,color:a,size:i},(0,oe.default)(l)),(0,oe.default)(S));return z.createElement(h,Z({"data-baseweb":"icon",ref:r},O),o?z.createElement("title",null,o):null,n)},$t=z.forwardRef(Ot);w.default=$t;function j(e){"@babel/helpers - typeof";return j=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},j(e)}Object.defineProperty(E,"__esModule",{value:!0});E.default=void 0;var k=Tt(P),It=V,le=m,Pt=_t(w),Ct=["title","size","color","overrides"];function _t(e){return e&&e.__esModule?e:{default:e}}function be(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(be=function(o){return o?r:t})(e)}function Tt(e,t){if(e&&e.__esModule)return e;if(e===null||j(e)!=="object"&&typeof e!="function")return{default:e};var r=be(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}function H(){return H=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},H.apply(this,arguments)}function Et(e,t){if(e==null)return{};var r=wt(e,t),n,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function wt(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,i;for(i=0;i<n.length;i++)o=n[i],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function Rt(e,t){return Wt(e)||At(e,t)||xt(e,t)||Dt()}function Dt(){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 xt(e,t){if(e){if(typeof e=="string")return ue(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ue(e,t)}}function ue(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function At(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],o=!0,i=!1,a,u;try{for(r=r.call(e);!(o=(a=r.next()).done)&&(n.push(a.value),!(t&&n.length===t));o=!0);}catch(p){i=!0,u=p}finally{try{!o&&r.return!=null&&r.return()}finally{if(i)throw u}}return n}}function Wt(e){if(Array.isArray(e))return e}function Nt(e,t){var r=(0,It.useStyletron)(),n=Rt(r,2),o=n[1],i=e.title,a=i===void 0?"Delete Alt":i,u=e.size,p=e.color,l=e.overrides,f=l===void 0?{}:l,v=Et(e,Ct),h=(0,le.mergeOverride)({component:o.icons&&o.icons.DeleteAlt?o.icons.DeleteAlt:null},f&&f.Svg?(0,le.toObjectOverride)(f.Svg):{});return k.createElement(Pt.default,H({viewBox:"0 0 24 24",ref:t,title:a,size:u,color:p,overrides:{Svg:h}},v),k.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 20C16.4183 20 20 16.4183 20 12C20 7.58173 16.4183 4 12 4C7.58173 4 4 7.58173 4 12C4 16.4183 7.58173 20 12 20ZM10.0303 8.96967C9.73743 8.67679 9.26257 8.67679 8.96967 8.96967C8.67676 9.26257 8.67676 9.73743 8.96967 10.0303L10.9393 12L8.96967 13.9697C8.67676 14.2626 8.67676 14.7374 8.96967 15.0303C9.26257 15.3232 9.73743 15.3232 10.0303 15.0303L12 13.0607L13.9697 15.0303C14.2626 15.3232 14.7374 15.3232 15.0303 15.0303C15.3232 14.7374 15.3232 14.2626 15.0303 13.9697L13.0607 12L15.0303 10.0303C15.3232 9.73743 15.3232 9.26257 15.0303 8.96967C14.7374 8.67679 14.2626 8.67679 13.9697 8.96967L12 10.9393L10.0303 8.96967Z"}))}var Bt=k.forwardRef(Nt);E.default=Bt;Object.defineProperty(d,"__esModule",{value:!0});d.getRootStyles=d.getInputStyles=d.getInputContainerStyles=d.StyledMaskToggleButton=d.StyledClearIconContainer=he=d.StyledClearIcon=d.Root=d.InputEnhancer=d.InputContainer=d.Input=void 0;var $=V,s=g,Mt=Lt(E);function Lt(e){return e&&e.__esModule?e:{default:e}}function se(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function y(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?se(Object(r),!0).forEach(function(n){c(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):se(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function c(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Y=(0,$.styled)("button",function(e){var t,r=e.$theme,n=e.$size,o=e.$isFocusVisible,i=(t={},c(t,s.SIZE.mini,r.sizing.scale400),c(t,s.SIZE.compact,r.sizing.scale400),c(t,s.SIZE.default,r.sizing.scale300),c(t,s.SIZE.large,r.sizing.scale200),t)[n];return{display:"flex",alignItems:"center",borderTopStyle:"none",borderBottomStyle:"none",borderLeftStyle:"none",borderRightStyle:"none",background:"none",paddingLeft:i,paddingRight:i,outline:o?"solid 3px ".concat(r.colors.accent):"none",color:r.colors.contentPrimary}});d.StyledMaskToggleButton=Y;Y.displayName="StyledMaskToggleButton";Y.displayName="StyledMaskToggleButton";var K=(0,$.styled)("div",function(e){var t,r=e.$alignTop,n=r===void 0?!1:r,o=e.$size,i=e.$theme,a=(t={},c(t,s.SIZE.mini,i.sizing.scale200),c(t,s.SIZE.compact,i.sizing.scale200),c(t,s.SIZE.default,i.sizing.scale100),c(t,s.SIZE.large,i.sizing.scale0),t)[o];return{display:"flex",alignItems:n?"flex-start":"center",paddingLeft:a,paddingRight:a,paddingTop:n?i.sizing.scale500:"0px",color:i.colors.contentPrimary}});d.StyledClearIconContainer=K;K.displayName="StyledClearIconContainer";K.displayName="StyledClearIconContainer";var G=(0,$.styled)(Mt.default,function(e){var t=e.$theme,r=e.$isFocusVisible;return{cursor:"pointer",outline:r?"solid 3px ".concat(t.colors.accent):"none"}}),he=d.StyledClearIcon=G;G.displayName="StyledClearIcon";G.displayName="StyledClearIcon";function Ft(e,t){var r;return(r={},c(r,s.SIZE.mini,{paddingTop:t.scale100,paddingBottom:t.scale100,paddingLeft:t.scale550,paddingRight:t.scale550}),c(r,s.SIZE.compact,{paddingTop:t.scale200,paddingBottom:t.scale200,paddingLeft:t.scale550,paddingRight:t.scale550}),c(r,s.SIZE.default,{paddingTop:t.scale400,paddingBottom:t.scale400,paddingLeft:t.scale550,paddingRight:t.scale550}),c(r,s.SIZE.large,{paddingTop:t.scale550,paddingBottom:t.scale550,paddingLeft:t.scale550,paddingRight:t.scale550}),r)[e]}function zt(e,t,r,n,o){var i=e===s.ADJOINED.both||e===s.ADJOINED.left&&n!=="rtl"||e===s.ADJOINED.right&&n==="rtl"||o&&n==="rtl",a=e===s.ADJOINED.both||e===s.ADJOINED.right&&n!=="rtl"||e===s.ADJOINED.left&&n==="rtl"||o&&n!=="rtl";return{paddingLeft:i?r.scale550:"0px",paddingRight:a?r.scale550:"0px"}}function R(e,t){var r;return(r={},c(r,s.SIZE.mini,t.font100),c(r,s.SIZE.compact,t.font200),c(r,s.SIZE.default,t.font300),c(r,s.SIZE.large,t.font400),r)[e]}function Zt(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,o=arguments.length>4?arguments[4]:void 0;return e?{borderLeftColor:o.inputFillDisabled,borderRightColor:o.inputFillDisabled,borderTopColor:o.inputFillDisabled,borderBottomColor:o.inputFillDisabled,backgroundColor:o.inputFillDisabled}:t?{borderLeftColor:o.borderSelected,borderRightColor:o.borderSelected,borderTopColor:o.borderSelected,borderBottomColor:o.borderSelected,backgroundColor:o.inputFillActive}:r?{borderLeftColor:o.inputBorderError,borderRightColor:o.inputBorderError,borderTopColor:o.inputBorderError,borderBottomColor:o.inputBorderError,backgroundColor:o.inputFillError}:n?{borderLeftColor:o.inputBorderPositive,borderRightColor:o.inputBorderPositive,borderTopColor:o.inputBorderPositive,borderBottomColor:o.inputBorderPositive,backgroundColor:o.inputFillPositive}:{borderLeftColor:o.inputBorder,borderRightColor:o.inputBorder,borderTopColor:o.inputBorder,borderBottomColor:o.inputBorder,backgroundColor:o.inputFill}}function jt(e,t){var r=t.inputBorderRadius;return e===s.SIZE.mini&&(r=t.inputBorderRadiusMini),{borderTopLeftRadius:r,borderBottomLeftRadius:r,borderTopRightRadius:r,borderBottomRightRadius:r}}var Se=function(t){var r=t.$isFocused,n=t.$adjoined,o=t.$error,i=t.$disabled,a=t.$positive,u=t.$size,p=t.$theme,l=t.$theme,f=l.borders,v=l.colors,h=l.sizing,S=l.typography,O=l.animation,D=t.$hasIconTrailing;return y(y(y(y({boxSizing:"border-box",display:"flex",overflow:"hidden",width:"100%",borderLeftWidth:"2px",borderRightWidth:"2px",borderTopWidth:"2px",borderBottomWidth:"2px",borderLeftStyle:"solid",borderRightStyle:"solid",borderTopStyle:"solid",borderBottomStyle:"solid",transitionProperty:"border",transitionDuration:O.timing200,transitionTimingFunction:O.easeOutCurve},jt(u,f)),R(u,S)),Zt(i,r,o,a,v)),zt(n,u,h,p.direction,D))};d.getRootStyles=Se;var X=(0,$.styled)("div",Se);d.Root=X;X.displayName="Root";X.displayName="Root";function kt(e,t){var r;return(r={},c(r,s.SIZE.mini,{paddingRight:t.scale400,paddingLeft:t.scale400}),c(r,s.SIZE.compact,{paddingRight:t.scale400,paddingLeft:t.scale400}),c(r,s.SIZE.default,{paddingRight:t.scale300,paddingLeft:t.scale300}),c(r,s.SIZE.large,{paddingRight:t.scale200,paddingLeft:t.scale200}),r)[e]}function Ht(e,t,r,n,o){return e?{color:o.inputEnhancerTextDisabled,backgroundColor:o.inputFillDisabled}:t?{color:o.contentPrimary,backgroundColor:o.inputFillActive}:r?{color:o.contentPrimary,backgroundColor:o.inputFillError}:n?{color:o.contentPrimary,backgroundColor:o.inputFillPositive}:{color:o.contentPrimary,backgroundColor:o.inputFill}}var Q=(0,$.styled)("div",function(e){var t=e.$size,r=e.$disabled,n=e.$isFocused,o=e.$error,i=e.$positive,a=e.$theme,u=a.colors,p=a.sizing,l=a.typography,f=a.animation;return y(y(y({display:"flex",alignItems:"center",justifyContent:"center",transitionProperty:"color, background-color",transitionDuration:f.timing200,transitionTimingFunction:f.easeOutCurve},R(t,l)),kt(t,p)),Ht(r,n,o,i,u))});d.InputEnhancer=Q;Q.displayName="InputEnhancer";Q.displayName="InputEnhancer";function Vt(e,t,r,n,o){return e?{color:o.inputTextDisabled,backgroundColor:o.inputFillDisabled}:t?{color:o.contentPrimary,backgroundColor:o.inputFillActive}:r?{color:o.contentPrimary,backgroundColor:o.inputFillError}:n?{color:o.contentPrimary,backgroundColor:o.inputFillPositive}:{color:o.contentPrimary,backgroundColor:o.inputFill}}var Oe=function(t){var r=t.$isFocused,n=t.$error,o=t.$disabled,i=t.$positive,a=t.$size,u=t.$theme,p=u.colors,l=u.typography,f=u.animation;return y(y({display:"flex",width:"100%",transitionProperty:"background-color",transitionDuration:f.timing200,transitionTimingFunction:f.easeOutCurve},R(a,l)),Vt(o,r,n,i,p))};d.getInputContainerStyles=Oe;var ee=(0,$.styled)("div",Oe);d.InputContainer=ee;ee.displayName="InputContainer";ee.displayName="InputContainer";function qt(e,t,r,n){return e?{color:n.inputTextDisabled,"-webkit-text-fill-color":n.inputTextDisabled,caretColor:n.contentPrimary,"::placeholder":{color:n.inputPlaceholderDisabled}}:{color:n.contentPrimary,caretColor:n.contentPrimary,"::placeholder":{color:n.inputPlaceholder}}}var $e=function(t){var r=t.$disabled,n=t.$isFocused,o=t.$error,i=t.$size,a=t.$theme,u=a.colors,p=a.sizing,l=a.typography;return y(y(y({boxSizing:"border-box",backgroundColor:"transparent",borderLeftWidth:0,borderRightWidth:0,borderTopWidth:0,borderBottomWidth:0,borderLeftStyle:"none",borderRightStyle:"none",borderTopStyle:"none",borderBottomStyle:"none",outline:"none",width:"100%",minWidth:0,maxWidth:"100%",cursor:r?"not-allowed":"text",margin:"0",paddingTop:"0",paddingBottom:"0",paddingLeft:"0",paddingRight:"0"},R(i,l)),Ft(i,p)),qt(r,n,o,u))};d.getInputStyles=$e;var te=(0,$.styled)("input",$e);d.Input=te;te.displayName="Input";te.displayName="Input";const Ut=Be("div",{target:"e1ybf61d0"})({position:"absolute",top:"50%",right:"2.05em"});function Jt({disabled:e,element:t,widgetMgr:r,width:n,fragmentId:o}){var S;const[i,a]=Ve({getStateFromWidgetMgr:Yt,getDefaultStateFromProto:Kt,getCurrStateFromProto:Gt,updateWidgetMgrState:Xt,element:t,widgetMgr:r,fragmentId:o}),u=x(t.default)&&!e,p={width:n},l=Me(),f={Select:{props:{disabled:e,overrides:{ControlContainer:{style:{height:l.sizes.minElementHeight,borderLeftWidth:l.sizes.borderWidth,borderRightWidth:l.sizes.borderWidth,borderTopWidth:l.sizes.borderWidth,borderBottomWidth:l.sizes.borderWidth}},IconsContainer:{style:()=>({paddingRight:l.spacing.sm})},ValueContainer:{style:()=>({lineHeight:l.lineHeights.inputWidget,paddingRight:l.spacing.sm,paddingLeft:l.spacing.sm,paddingBottom:l.spacing.sm,paddingTop:l.spacing.sm})},SingleValue:{props:{"data-testid":"stTimeInputTimeDisplay"}},Dropdown:{style:()=>({paddingTop:l.spacing.none,paddingBottom:l.spacing.none,boxShadow:"none",maxHeight:l.sizes.maxDropdownHeight})},DropdownListItem:{style:()=>({paddingRight:l.spacing.lg,paddingLeft:l.spacing.lg,paddingTop:l.spacing.sm,paddingBottom:l.spacing.sm})},Popover:{props:{overrides:{Body:{style:()=>({marginTop:l.spacing.px})}}}},SelectArrow:{component:Le,props:{overrides:{Svg:{style:()=>({width:l.iconSizes.xl,height:l.iconSizes.xl})}}}}}}}},v=P.useCallback(O=>{const D=O===null?null:Qt(O);a({value:D,fromUi:!0})},[a]),h=P.useCallback(()=>{v(null)},[v]);return Fe("div",{className:"stTimeInput","data-testid":"stTimeInput",style:p,children:[I(He,{label:t.label,disabled:e,labelVisibility:ze((S=t.labelVisibility)==null?void 0:S.value),children:t.help&&I(Ze,{children:I(je,{content:t.help,placement:ke.TOP_RIGHT})})}),I(qe,{format:"24",step:t.step?Number(t.step):900,value:x(i)?void 0:er(i),onChange:v,overrides:f,nullable:u,creatable:!0,"aria-label":t.label}),u&&!x(i)&&I(Ut,{onClick:h,"data-testid":"stTimeInputClearButton",children:I(he,{overrides:{Svg:{style:{color:l.colors.darkGray,padding:l.spacing.threeXS,height:l.sizes.clearIconSize,width:l.sizes.clearIconSize,":hover":{fill:l.colors.bodyText}}}},$isFocusVisible:!1})})]})}function Yt(e,t){return e.getStringValue(t)??null}function Kt(e){return e.default??null}function Gt(e){return e.value??null}function Xt(e,t,r,n){t.setStringValue(e,r.value,{fromUi:r.fromUi},n)}function Qt(e){const t=e.getHours().toString().padStart(2,"0"),r=e.getMinutes().toString().padStart(2,"0");return`${t}:${r}`}function er(e){if(e===null)return null;const[t,r]=e.split(":").map(Number),n=new Date;return n.setHours(t),n.setMinutes(r),n}const lr=P.memo(Jt);export{lr as default};
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{
|
2
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function K(e,t){if(e){if(typeof e=="string")return j(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return j(e,t)}}function j(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Q(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],o=!0,a=!1,i,u;try{for(r=r.call(e);!(o=(i=r.next()).done)&&(n.push(i.value),!(t&&n.length===t));o=!0);}catch(b){a=!0,u=b}finally{try{!o&&r.return!=null&&r.return()}finally{if(a)throw u}}return n}}function V(e){if(Array.isArray(e))return e}function I(e,t){if(e==null)return{};var r=X(e,t),n,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function X(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,a;for(a=0;a<n.length;a++)o=n[a],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function Y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ee(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function te(e,t,r){return t&&ee(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function re(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&m(e,t)}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},m(e,t)}function ne(e){var t=ae();return function(){var n=h(e),o;if(t){var a=h(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return oe(this,o)}}function oe(e,t){if(t&&(_(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return y(e)}function y(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ae(){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 h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},h(e)}function d(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var ie=function(e){re(r,e);var t=ne(r);function r(){var n;Y(this,r);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return n=t.call.apply(t,[this].concat(a)),d(y(n),"state",{isFocused:n.props.autoFocus||!1}),d(y(n),"onFocus",function(u){n.setState({isFocused:!0}),n.props.onFocus(u)}),d(y(n),"onBlur",function(u){n.setState({isFocused:!1}),n.props.onBlur(u)}),n}return te(r,[{key:"render",value:function(){var o=this.props,a=o.startEnhancer,i=o.endEnhancer,u=o.overrides,b=u.Root,A=u.StartEnhancer,
|
1
|
+
import{bx as v,r as l,ch as q,cj as p,cl as S}from"./index.2EE80u0h.js";import{R as C,c as w,d as J,B as M}from"./base-input.B5AcLp6p.js";function _(e){"@babel/helpers - typeof";return _=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},_(e)}var U=["Root","StartEnhancer","EndEnhancer"],Z=["startEnhancer","endEnhancer","overrides"];function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},f.apply(this,arguments)}function O(e,t){return V(e)||Q(e,t)||K(e,t)||G()}function G(){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 K(e,t){if(e){if(typeof e=="string")return j(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return j(e,t)}}function j(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Q(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],o=!0,a=!1,i,u;try{for(r=r.call(e);!(o=(i=r.next()).done)&&(n.push(i.value),!(t&&n.length===t));o=!0);}catch(b){a=!0,u=b}finally{try{!o&&r.return!=null&&r.return()}finally{if(a)throw u}}return n}}function V(e){if(Array.isArray(e))return e}function I(e,t){if(e==null)return{};var r=X(e,t),n,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function X(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,a;for(a=0;a<n.length;a++)o=n[a],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function Y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ee(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function te(e,t,r){return t&&ee(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function re(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&m(e,t)}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},m(e,t)}function ne(e){var t=ae();return function(){var n=h(e),o;if(t){var a=h(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return oe(this,o)}}function oe(e,t){if(t&&(_(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return y(e)}function y(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ae(){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 h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},h(e)}function d(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var ie=function(e){re(r,e);var t=ne(r);function r(){var n;Y(this,r);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return n=t.call.apply(t,[this].concat(a)),d(y(n),"state",{isFocused:n.props.autoFocus||!1}),d(y(n),"onFocus",function(u){n.setState({isFocused:!0}),n.props.onFocus(u)}),d(y(n),"onBlur",function(u){n.setState({isFocused:!1}),n.props.onBlur(u)}),n}return te(r,[{key:"render",value:function(){var o=this.props,a=o.startEnhancer,i=o.endEnhancer,u=o.overrides,b=u.Root,A=u.StartEnhancer,x=u.EndEnhancer,B=I(u,U),F=I(o,Z),T=v(b,C),g=O(T,2),$=g[0],N=g[1],D=v(A,w),E=O(D,2),W=E[0],z=E[1],H=v(x,w),P=O(H,2),L=P[0],k=P[1],s=J(this.props,this.state);return l.createElement($,f({"data-baseweb":"input"},s,N,{$adjoined:R(a,i),$hasIconTrailing:this.props.clearable||this.props.type=="password"}),c(a)&&l.createElement(W,f({},s,z,{$position:S.start}),typeof a=="function"?a(s):a),l.createElement(M,f({},F,{overrides:B,adjoined:R(a,i),onFocus:this.onFocus,onBlur:this.onBlur})),c(i)&&l.createElement(L,f({},s,k,{$position:S.end}),typeof i=="function"?i(s):i))}}]),r}(l.Component);d(ie,"defaultProps",{autoComplete:"on",autoFocus:!1,disabled:!1,name:"",onBlur:function(){},onFocus:function(){},overrides:{},required:!1,size:q.default,startEnhancer:null,endEnhancer:null,clearable:!1,type:"text",readOnly:!1});function R(e,t){return c(e)&&c(t)?p.both:c(e)?p.left:c(t)?p.right:p.none}function c(e){return!!(e||e===0)}export{ie as I};
|
@@ -1 +1 @@
|
|
1
|
-
import{c as p,e as c}from"./es6.
|
1
|
+
import{c as p,e as c}from"./es6.UQDWlCyE.js";import"./index.2EE80u0h.js";const{File:n,Blob:_,DOMException:s}=p,{INVALID:z,GONE:r,MISMATCH:w,MOD_ERR:b,SYNTAX:a,SECURITY:I,DISALLOWED:m}=c;class g{constructor(e,i){this.fileHandle=e,this.file=i,this.size=i.size,this.position=0}write(e){let i=this.file;if(typeof e=="object"){if(e.type==="write"){if(Number.isInteger(e.position)&&e.position>=0&&(this.position=e.position,this.size<e.position&&(this.file=new n([this.file,new ArrayBuffer(e.position-this.size)],this.file.name,this.file))),!("data"in e))throw new s(...a("write requires a data argument"));e=e.data}else if(e.type==="seek")if(Number.isInteger(e.position)&&e.position>=0){if(this.size<e.position)throw new s(...z);this.position=e.position;return}else throw new s(...a("seek requires a position argument"));else if(e.type==="truncate")if(Number.isInteger(e.size)&&e.size>=0){i=e.size<this.size?new n([i.slice(0,e.size)],i.name,i):new n([i,new Uint8Array(e.size-this.size)],i.name),this.size=i.size,this.position>i.size&&(this.position=i.size),this.file=i;return}else throw new s(...a("truncate requires a size argument"))}e=new _([e]);let t=this.file;const o=t.slice(0,this.position),y=t.slice(this.position+e.size);let l=this.position-o.size;l<0&&(l=0),t=new n([o,new Uint8Array(l),e,y],t.name),this.size=t.size,this.position+=e.size,this.file=t}close(){if(this.fileHandle._deleted)throw new s(...r);this.fileHandle._file=this.file,this.file=this.position=this.size=null,this.fileHandle.onclose&&this.fileHandle.onclose(this.fileHandle)}}class f{constructor(e="",i=new n([],e),t=!0){this._file=i,this.name=e,this.kind="file",this._deleted=!1,this.writable=t,this.readable=!0}async getFile(){if(this._deleted)throw new s(...r);return this._file}async createWritable(e){if(!this.writable)throw new s(...m);if(this._deleted)throw new s(...r);const i=e.keepExistingData?await this.getFile():new n([],this.name);return new g(this,i)}async isSameEntry(e){return this===e}async _destroy(){this._deleted=!0,this._file=null}}class h{constructor(e,i=!0){this.name=e,this.kind="directory",this._deleted=!1,this._entries={},this.writable=i,this.readable=!0}async*entries(){if(this._deleted)throw new s(...r);yield*Object.entries(this._entries)}async isSameEntry(e){return this===e}async getDirectoryHandle(e,i){if(this._deleted)throw new s(...r);const t=this._entries[e];if(t){if(t instanceof f)throw new s(...w);return t}else{if(i.create)return this._entries[e]=new h(e);throw new s(...r)}}async getFileHandle(e,i){const t=this._entries[e],o=t instanceof f;if(t&&o)return t;if(t&&!o)throw new s(...w);if(!t&&!i.create)throw new s(...r);if(!t&&i.create)return this._entries[e]=new f(e)}async removeEntry(e,i){const t=this._entries[e];if(!t)throw new s(...r);await t._destroy(i.recursive),delete this._entries[e]}async _destroy(e){for(let i of Object.values(this._entries)){if(!e)throw new s(...b);await i._destroy(e)}this._entries={},this._deleted=!0}}const u=new h(""),A=()=>u;export{f as FileHandle,h as FolderHandle,g as Sink,A as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{aP as t,aQ as g,g as i}from"./index.
|
1
|
+
import{aP as t,aQ as g,g as i}from"./index.2EE80u0h.js";var m=t,o=g,n=o(function(e,r,a,s){m(e,r,a,s)}),c=n;const h=i(c);export{h as m};
|
streamlit/static/static/js/{number-overlay-editor.DozQhDJj.js → number-overlay-editor.DBc0yndt.js}
RENAMED
@@ -1,4 +1,4 @@
|
|
1
|
-
import{R as X,r as T}from"./index.B7J6suR-.js";import{s as Te}from"./index.NbimJbgq.js";import"./FormClearHelper.BgwPD1tD.js";import"./withFullScreenWrapper.BLLyDFUF.js";import"./Toolbar.DMhyNpv2.js";import"./mergeWith.CLihEflw.js";import"./sprintf.C-r3gIuM.js";import"./createDownloadLinkElement.DZMwyjvU.js";import"./toConsumableArray.C71OtXzK.js";import"./possibleConstructorReturn.DJ7-JsJc.js";import"./createSuper.B3rIhdpQ.js";import"./FileDownload.esm.Cf3bITtP.js";const Be=Te("div")({name:"NumberOverlayEditorStyle",class:"gdg-n15fjm3e",propsAsIs:!1});function Se(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r}var re;(function(e){e.event="event",e.props="prop"})(re||(re={}));function q(){}function Fe(e){var t,r=void 0;return function(){for(var n=[],a=arguments.length;a--;)n[a]=arguments[a];return t&&n.length===t.length&&n.every(function(i,l){return i===t[l]})||(t=n,r=e.apply(void 0,n)),r}}function ae(e){return!!(e||"").match(/\d/)}function Y(e){return e==null}function _e(e){return typeof e=="number"&&isNaN(e)}function pe(e){return Y(e)||_e(e)||typeof e=="number"&&!isFinite(e)}function xe(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function je(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}function Le(e,t,r){var n=je(r),a=e.search(/[1-9]/);return a=a===-1?e.length:a,e.substring(0,a)+e.substring(a,e.length).replace(n,"$1"+t)}function Me(e){var t=T.useRef(e);t.current=e;var r=T.useRef(function(){for(var n=[],a=arguments.length;a--;)n[a]=arguments[a];return t.current.apply(t,n)});return r.current}function se(e,t){t===void 0&&(t=!0);var r=e[0]==="-",n=r&&t;e=e.replace("-","");var a=e.split("."),i=a[0],l=a[1]||"";return{beforeDecimal:i,afterDecimal:l,hasNegation:r,addNegation:n}}function ke(e){if(!e)return e;var t=e[0]==="-";t&&(e=e.substring(1,e.length));var r=e.split("."),n=r[0].replace(/^0+/,"")||"0",a=r[1]||"";return(t?"-":"")+n+(a?"."+a:"")}function ye(e,t,r){for(var n="",a=r?"0":"",i=0;i<=t-1;i++)n+=e[i]||a;return n}function de(e,t){return Array(t+1).join(e)}function be(e){var t=e+"",r=t[0]==="-"?"-":"";r&&(t=t.substring(1));var n=t.split(/[eE]/g),a=n[0],i=n[1];if(i=Number(i),!i)return r+a;a=a.replace(".","");var l=1+i,h=a.length;return l<0?a="0."+de("0",Math.abs(l))+a:l>=h?a=a+de("0",l-h):a=(a.substring(0,l)||"0")+"."+a.substring(l),r+a}function ge(e,t,r){if(["","-"].indexOf(e)!==-1)return e;var n=(e.indexOf(".")!==-1||r)&&t,a=se(e),i=a.beforeDecimal,l=a.afterDecimal,h=a.hasNegation,p=parseFloat("0."+(l||"0")),x=l.length<=t?"0."+l:p.toFixed(t),S=x.split("."),c=i;i&&Number(S[0])&&(c=i.split("").reverse().reduce(function(I,C,g){return I.length>g?(Number(I[0])+Number(C)).toString()+I.substring(1,I.length):C+I},S[0]));var m=ye(S[1]||"",t,r),y=h?"-":"",s=n?".":"";return""+y+c+s+m}function H(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var r=e.createTextRange();return r.move("character",t),r.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var Ve=Fe(function(e,t){for(var r=0,n=0,a=e.length,i=t.length;e[r]===t[r]&&r<a;)r++;for(;e[a-1-n]===t[i-1-n]&&i-n>r&&a-n>r;)n++;return{from:{start:r,end:a-n},to:{start:r,end:i-n}}}),Pe=function(e,t){var r=Math.min(e.selectionStart,t);return{from:{start:r,end:e.selectionEnd},to:{start:r,end:t}}};function Ke(e,t,r){return Math.min(Math.max(e,t),r)}function ce(e){return Math.max(e.selectionStart,e.selectionEnd)}function We(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function Ue(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function $e(e){var t=e.currentValue,r=e.formattedValue,n=e.currentValueIndex,a=e.formattedValueIndex;return t[n]===r[a]}function Ge(e,t,r,n,a,i,l){l===void 0&&(l=$e);var h=a.findIndex(function(k){return k}),p=e.slice(0,h);!t&&!r.startsWith(p)&&(t=p,r=p+r,n=n+p.length);for(var x=r.length,S=e.length,c={},m=new Array(x),y=0;y<x;y++){m[y]=-1;for(var s=0,I=S;s<I;s++){var C=l({currentValue:r,lastValue:t,formattedValue:e,currentValueIndex:y,formattedValueIndex:s});if(C&&c[s]!==!0){m[y]=s,c[s]=!0;break}}}for(var g=n;g<x&&(m[g]===-1||!i(r[g]));)g++;var B=g===x||m[g]===-1?S:m[g];for(g=n-1;g>0&&m[g]===-1;)g--;var F=g===-1||m[g]===-1?0:m[g]+1;return F>B?B:n-F<B-n?F:B}function me(e,t,r,n){var a=e.length;if(t=Ke(t,0,a),n==="left"){for(;t>=0&&!r[t];)t--;t===-1&&(t=r.indexOf(!0))}else{for(;t<=a&&!r[t];)t++;t>a&&(t=r.lastIndexOf(!0))}return t===-1&&(t=a),t}function Ze(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),r=0,n=t.length;r<n;r++)t[r]=!!(ae(e[r])||ae(e[r-1]));return t}function Ne(e,t,r,n,a,i){i===void 0&&(i=q);var l=Me(function(s,I){var C,g;return pe(s)?(g="",C=""):typeof s=="number"||I?(g=typeof s=="number"?be(s):s,C=n(g)):(g=a(s,void 0),C=n(g)),{formattedValue:C,numAsString:g}}),h=T.useState(function(){return l(Y(e)?t:e,r)}),p=h[0],x=h[1],S=function(s,I){s.formattedValue!==p.formattedValue&&x({formattedValue:s.formattedValue,numAsString:s.value}),i(s,I)},c=e,m=r;Y(e)&&(c=p.numAsString,m=!0);var y=l(c,m);return T.useMemo(function(){x(y)},[y.formattedValue]),[p,S]}function qe(e){return e.replace(/[^0-9]/g,"")}function ze(e){return e}function He(e){var t=e.type;t===void 0&&(t="text");var r=e.displayType;r===void 0&&(r="input");var n=e.customInput,a=e.renderText,i=e.getInputRef,l=e.format;l===void 0&&(l=ze);var h=e.removeFormatting;h===void 0&&(h=qe);var p=e.defaultValue,x=e.valueIsNumericString,S=e.onValueChange,c=e.isAllowed,m=e.onChange;m===void 0&&(m=q);var y=e.onKeyDown;y===void 0&&(y=q);var s=e.onMouseUp;s===void 0&&(s=q);var I=e.onFocus;I===void 0&&(I=q);var C=e.onBlur;C===void 0&&(C=q);var g=e.value,B=e.getCaretBoundary;B===void 0&&(B=Ze);var F=e.isValidInputCharacter;F===void 0&&(F=ae);var k=e.isCharacterSame,j=Se(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),z=Ne(g,p,!!x,l,h,S),P=z[0],V=P.formattedValue,L=P.numAsString,W=z[1],M=T.useRef(),U=T.useRef({formattedValue:V,numAsString:L}),$=function(o,u){U.current={formattedValue:o.formattedValue,numAsString:o.value},W(o,u)},J=T.useState(!1),ee=J[0],d=J[1],f=T.useRef(null),N=T.useRef({setCaretTimeout:null,focusTimeout:null});T.useEffect(function(){return d(!0),function(){clearTimeout(N.current.setCaretTimeout),clearTimeout(N.current.focusTimeout)}},[]);var R=l,A=function(o,u){var v=parseFloat(u);return{formattedValue:o,value:u,floatValue:isNaN(v)?void 0:v}},E=function(o,u,v){o.selectionStart===0&&o.selectionEnd===o.value.length||(H(o,u),N.current.setCaretTimeout=setTimeout(function(){o.value===v&&o.selectionStart!==u&&H(o,u)},0))},O=function(o,u,v){return me(o,u,B(o),v)},Q=function(o,u,v){var w=B(u),_=Ge(u,V,o,v,w,F,k);return _=me(u,_,w),_},oe=function(o){var u=o.formattedValue;u===void 0&&(u="");var v=o.input,w=o.source,_=o.event,D=o.numAsString,b;if(v){var K=o.inputValue||v.value,G=ce(v);v.value=u,b=Q(K,u,G),b!==void 0&&E(v,b,u)}u!==V&&$(A(u,D),{event:_,source:w})};T.useEffect(function(){var o=U.current,u=o.formattedValue,v=o.numAsString;(V!==u||L!==v)&&$(A(V,L),{event:void 0,source:re.props})},[V,L]);var te=f.current?ce(f.current):void 0,ne=typeof window<"u"?T.useLayoutEffect:T.useEffect;ne(function(){var o=f.current;if(V!==U.current.formattedValue&&o){var u=Q(U.current.formattedValue,V,te);o.value=V,E(o,u,V)}},[V]);var ue=function(o,u,v){var w=u.target,_=M.current?Pe(M.current,w.selectionEnd):Ve(V,o),D=Object.assign(Object.assign({},_),{lastValue:V}),b=h(o,D),K=R(b);if(b=h(K,void 0),c&&!c(A(K,b))){var G=u.target,Z=ce(G),fe=Q(o,V,Z);return G.value=V,E(G,fe,V),!1}return oe({formattedValue:K,numAsString:b,inputValue:o,event:u,source:v,input:u.target}),!0},le=function(o,u){u===void 0&&(u=0);var v=o.selectionStart,w=o.selectionEnd;M.current={selectionStart:v,selectionEnd:w+u}},De=function(o){var u=o.target,v=u.value,w=ue(v,o,re.event);w&&m(o),M.current=void 0},Ie=function(o){var u=o.target,v=o.key,w=u.selectionStart,_=u.selectionEnd,D=u.value;D===void 0&&(D="");var b;v==="ArrowLeft"||v==="Backspace"?b=Math.max(w-1,0):v==="ArrowRight"?b=Math.min(w+1,D.length):v==="Delete"&&(b=w);var K=0;v==="Delete"&&w===_&&(K=1);var G=v==="ArrowLeft"||v==="ArrowRight";if(b===void 0||w!==_&&!G){y(o),le(u,K);return}var Z=b;if(G){var fe=v==="ArrowLeft"?"left":"right";Z=O(D,b,fe),Z!==b&&o.preventDefault()}else v==="Delete"&&!F(D[b])?Z=O(D,b,"right"):v==="Backspace"&&!F(D[b])&&(Z=O(D,b,"left"));Z!==b&&E(u,Z,D),y(o),le(u,K)},Ce=function(o){var u=o.target,v=function(){var w=u.selectionStart,_=u.selectionEnd,D=u.value;if(D===void 0&&(D=""),w===_){var b=O(D,w);b!==w&&E(u,b,D)}};v(),requestAnimationFrame(function(){v()}),s(o),le(u)},Ee=function(o){o.persist&&o.persist();var u=o.target,v=o.currentTarget;f.current=u,N.current.focusTimeout=setTimeout(function(){var w=u.selectionStart,_=u.selectionEnd,D=u.value;D===void 0&&(D="");var b=O(D,w);b!==w&&!(w===0&&_===D.length)&&E(u,b,D),I(Object.assign(Object.assign({},o),{currentTarget:v}))},0)},Re=function(o){f.current=null,clearTimeout(N.current.focusTimeout),clearTimeout(N.current.setCaretTimeout),C(o)},Ae=ee&&We()?"numeric":void 0,ve=Object.assign({inputMode:Ae},j,{type:t,value:V,onChange:De,onKeyDown:Ie,onMouseUp:Ce,onFocus:Ee,onBlur:Re});if(r==="text")return a?X.createElement(X.Fragment,null,a(V,j)||null):X.createElement("span",Object.assign({},j,{ref:i}),V);if(n){var Oe=n;return X.createElement(Oe,Object.assign({},ve,{ref:i}))}return X.createElement("input",Object.assign({},ve,{ref:i}))}function he(e,t){var r=t.decimalScale,n=t.fixedDecimalScale,a=t.prefix;a===void 0&&(a="");var i=t.suffix;i===void 0&&(i="");var l=t.allowNegative,h=t.thousandsGroupStyle;if(h===void 0&&(h="thousand"),e===""||e==="-")return e;var p=ie(t),x=p.thousandSeparator,S=p.decimalSeparator,c=r!==0&&e.indexOf(".")!==-1||r&&n,m=se(e,l),y=m.beforeDecimal,s=m.afterDecimal,I=m.addNegation;return r!==void 0&&(s=ye(s,r,!!n)),x&&(y=Le(y,x,h)),a&&(y=a+y),i&&(s=s+i),I&&(y="-"+y),e=y+(c&&S||"")+s,e}function ie(e){var t=e.decimalSeparator;t===void 0&&(t=".");var r=e.thousandSeparator,n=e.allowedDecimalSeparators;return r===!0&&(r=","),n||(n=[t,"."]),{decimalSeparator:t,thousandSeparator:r,allowedDecimalSeparators:n}}function Je(e,t){e===void 0&&(e="");var r=new RegExp("(-)"),n=new RegExp("(-)(.)*(-)"),a=r.test(e),i=n.test(e);return e=e.replace(/-/g,""),a&&!i&&t&&(e="-"+e),e}function Qe(e,t){return new RegExp("(^-)|[0-9]|"+xe(e),"g")}function Xe(e,t,r){return e===""?!0:!(t!=null&&t.match(/\d/))&&!(r!=null&&r.match(/\d/))&&typeof e=="string"&&!isNaN(Number(e))}function Ye(e,t,r){var n;t===void 0&&(t=Ue(e));var a=r.allowNegative,i=r.prefix;i===void 0&&(i="");var l=r.suffix;l===void 0&&(l="");var h=r.decimalScale,p=t.from,x=t.to,S=x.start,c=x.end,m=ie(r),y=m.allowedDecimalSeparators,s=m.decimalSeparator,I=e[c]===s;if(ae(e)&&(e===i||e===l)&&t.lastValue==="")return e;if(c-S===1&&y.indexOf(e[S])!==-1){var C=h===0?"":s;e=e.substring(0,S)+C+e.substring(S+1,e.length)}var g=function(f,N,R){var A=!1,E=!1;i.startsWith("-")?A=!1:f.startsWith("--")?(A=!1,E=!0):l.startsWith("-")&&f.length===l.length?A=!1:f[0]==="-"&&(A=!0);var O=A?1:0;return E&&(O=2),O&&(f=f.substring(O),N-=O,R-=O),{value:f,start:N,end:R,hasNegation:A}},B=g(e,S,c),F=B.hasNegation;n=B,e=n.value,S=n.start,c=n.end;var k=g(t.lastValue,p.start,p.end),j=k.start,z=k.end,P=k.value,V=e.substring(S,c);e.length&&P.length&&(j>P.length-l.length||z<i.length)&&!(V&&l.startsWith(V))&&(e=P);var L=0;e.startsWith(i)?L+=i.length:S<i.length&&(L=S),e=e.substring(L),c-=L;var W=e.length,M=e.length-l.length;e.endsWith(l)?W=M:(c>M||c>e.length-l.length)&&(W=c),e=e.substring(0,W),e=Je(F?"-"+e:e,a),e=(e.match(Qe(s))||[]).join("");var U=e.indexOf(s);e=e.replace(new RegExp(xe(s),"g"),function(f,N){return N===U?".":""});var $=se(e,a),J=$.beforeDecimal,ee=$.afterDecimal,d=$.addNegation;return x.end-x.start<p.end-p.start&&J===""&&I&&!parseFloat(ee)&&(e=d?"-":""),e}function et(e,t){var r=t.prefix;r===void 0&&(r="");var n=t.suffix;n===void 0&&(n="");var a=Array.from({length:e.length+1}).map(function(){return!0}),i=e[0]==="-";a.fill(!1,0,r.length+(i?1:0));var l=e.length;return a.fill(!1,l-n.length+1,l+1),a}function tt(e){var t=ie(e),r=t.thousandSeparator,n=t.decimalSeparator,a=e.prefix;a===void 0&&(a="");var i=e.allowNegative;if(i===void 0&&(i=!0),r===n)throw new Error(`
|
1
|
+
import{R as X,r as T}from"./index.2EE80u0h.js";import{s as Te}from"./index.CrMtUJsu.js";import"./FormClearHelper.DpwWkrvV.js";import"./withFullScreenWrapper.CneUoXNE.js";import"./Toolbar.D6p42Hno.js";import"./mergeWith.DrxB1Sj4.js";import"./sprintf.C-r3gIuM.js";import"./createDownloadLinkElement.DZMwyjvU.js";import"./toConsumableArray.DyCVskz5.js";import"./possibleConstructorReturn.ZdYWHeG3.js";import"./createSuper.DNzaJgi-.js";import"./FileDownload.esm.CuayiK6T.js";const Be=Te("div")({name:"NumberOverlayEditorStyle",class:"gdg-n15fjm3e",propsAsIs:!1});function Se(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r}var re;(function(e){e.event="event",e.props="prop"})(re||(re={}));function q(){}function Fe(e){var t,r=void 0;return function(){for(var n=[],a=arguments.length;a--;)n[a]=arguments[a];return t&&n.length===t.length&&n.every(function(i,l){return i===t[l]})||(t=n,r=e.apply(void 0,n)),r}}function ae(e){return!!(e||"").match(/\d/)}function Y(e){return e==null}function _e(e){return typeof e=="number"&&isNaN(e)}function pe(e){return Y(e)||_e(e)||typeof e=="number"&&!isFinite(e)}function xe(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function je(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}function Le(e,t,r){var n=je(r),a=e.search(/[1-9]/);return a=a===-1?e.length:a,e.substring(0,a)+e.substring(a,e.length).replace(n,"$1"+t)}function Me(e){var t=T.useRef(e);t.current=e;var r=T.useRef(function(){for(var n=[],a=arguments.length;a--;)n[a]=arguments[a];return t.current.apply(t,n)});return r.current}function se(e,t){t===void 0&&(t=!0);var r=e[0]==="-",n=r&&t;e=e.replace("-","");var a=e.split("."),i=a[0],l=a[1]||"";return{beforeDecimal:i,afterDecimal:l,hasNegation:r,addNegation:n}}function ke(e){if(!e)return e;var t=e[0]==="-";t&&(e=e.substring(1,e.length));var r=e.split("."),n=r[0].replace(/^0+/,"")||"0",a=r[1]||"";return(t?"-":"")+n+(a?"."+a:"")}function ye(e,t,r){for(var n="",a=r?"0":"",i=0;i<=t-1;i++)n+=e[i]||a;return n}function de(e,t){return Array(t+1).join(e)}function be(e){var t=e+"",r=t[0]==="-"?"-":"";r&&(t=t.substring(1));var n=t.split(/[eE]/g),a=n[0],i=n[1];if(i=Number(i),!i)return r+a;a=a.replace(".","");var l=1+i,h=a.length;return l<0?a="0."+de("0",Math.abs(l))+a:l>=h?a=a+de("0",l-h):a=(a.substring(0,l)||"0")+"."+a.substring(l),r+a}function ge(e,t,r){if(["","-"].indexOf(e)!==-1)return e;var n=(e.indexOf(".")!==-1||r)&&t,a=se(e),i=a.beforeDecimal,l=a.afterDecimal,h=a.hasNegation,p=parseFloat("0."+(l||"0")),x=l.length<=t?"0."+l:p.toFixed(t),S=x.split("."),c=i;i&&Number(S[0])&&(c=i.split("").reverse().reduce(function(I,C,g){return I.length>g?(Number(I[0])+Number(C)).toString()+I.substring(1,I.length):C+I},S[0]));var m=ye(S[1]||"",t,r),y=h?"-":"",s=n?".":"";return""+y+c+s+m}function H(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var r=e.createTextRange();return r.move("character",t),r.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var Ve=Fe(function(e,t){for(var r=0,n=0,a=e.length,i=t.length;e[r]===t[r]&&r<a;)r++;for(;e[a-1-n]===t[i-1-n]&&i-n>r&&a-n>r;)n++;return{from:{start:r,end:a-n},to:{start:r,end:i-n}}}),Pe=function(e,t){var r=Math.min(e.selectionStart,t);return{from:{start:r,end:e.selectionEnd},to:{start:r,end:t}}};function Ke(e,t,r){return Math.min(Math.max(e,t),r)}function ce(e){return Math.max(e.selectionStart,e.selectionEnd)}function We(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function Ue(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function $e(e){var t=e.currentValue,r=e.formattedValue,n=e.currentValueIndex,a=e.formattedValueIndex;return t[n]===r[a]}function Ge(e,t,r,n,a,i,l){l===void 0&&(l=$e);var h=a.findIndex(function(k){return k}),p=e.slice(0,h);!t&&!r.startsWith(p)&&(t=p,r=p+r,n=n+p.length);for(var x=r.length,S=e.length,c={},m=new Array(x),y=0;y<x;y++){m[y]=-1;for(var s=0,I=S;s<I;s++){var C=l({currentValue:r,lastValue:t,formattedValue:e,currentValueIndex:y,formattedValueIndex:s});if(C&&c[s]!==!0){m[y]=s,c[s]=!0;break}}}for(var g=n;g<x&&(m[g]===-1||!i(r[g]));)g++;var B=g===x||m[g]===-1?S:m[g];for(g=n-1;g>0&&m[g]===-1;)g--;var F=g===-1||m[g]===-1?0:m[g]+1;return F>B?B:n-F<B-n?F:B}function me(e,t,r,n){var a=e.length;if(t=Ke(t,0,a),n==="left"){for(;t>=0&&!r[t];)t--;t===-1&&(t=r.indexOf(!0))}else{for(;t<=a&&!r[t];)t++;t>a&&(t=r.lastIndexOf(!0))}return t===-1&&(t=a),t}function Ze(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),r=0,n=t.length;r<n;r++)t[r]=!!(ae(e[r])||ae(e[r-1]));return t}function Ne(e,t,r,n,a,i){i===void 0&&(i=q);var l=Me(function(s,I){var C,g;return pe(s)?(g="",C=""):typeof s=="number"||I?(g=typeof s=="number"?be(s):s,C=n(g)):(g=a(s,void 0),C=n(g)),{formattedValue:C,numAsString:g}}),h=T.useState(function(){return l(Y(e)?t:e,r)}),p=h[0],x=h[1],S=function(s,I){s.formattedValue!==p.formattedValue&&x({formattedValue:s.formattedValue,numAsString:s.value}),i(s,I)},c=e,m=r;Y(e)&&(c=p.numAsString,m=!0);var y=l(c,m);return T.useMemo(function(){x(y)},[y.formattedValue]),[p,S]}function qe(e){return e.replace(/[^0-9]/g,"")}function ze(e){return e}function He(e){var t=e.type;t===void 0&&(t="text");var r=e.displayType;r===void 0&&(r="input");var n=e.customInput,a=e.renderText,i=e.getInputRef,l=e.format;l===void 0&&(l=ze);var h=e.removeFormatting;h===void 0&&(h=qe);var p=e.defaultValue,x=e.valueIsNumericString,S=e.onValueChange,c=e.isAllowed,m=e.onChange;m===void 0&&(m=q);var y=e.onKeyDown;y===void 0&&(y=q);var s=e.onMouseUp;s===void 0&&(s=q);var I=e.onFocus;I===void 0&&(I=q);var C=e.onBlur;C===void 0&&(C=q);var g=e.value,B=e.getCaretBoundary;B===void 0&&(B=Ze);var F=e.isValidInputCharacter;F===void 0&&(F=ae);var k=e.isCharacterSame,j=Se(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),z=Ne(g,p,!!x,l,h,S),P=z[0],V=P.formattedValue,L=P.numAsString,W=z[1],M=T.useRef(),U=T.useRef({formattedValue:V,numAsString:L}),$=function(o,u){U.current={formattedValue:o.formattedValue,numAsString:o.value},W(o,u)},J=T.useState(!1),ee=J[0],d=J[1],f=T.useRef(null),N=T.useRef({setCaretTimeout:null,focusTimeout:null});T.useEffect(function(){return d(!0),function(){clearTimeout(N.current.setCaretTimeout),clearTimeout(N.current.focusTimeout)}},[]);var R=l,A=function(o,u){var v=parseFloat(u);return{formattedValue:o,value:u,floatValue:isNaN(v)?void 0:v}},E=function(o,u,v){o.selectionStart===0&&o.selectionEnd===o.value.length||(H(o,u),N.current.setCaretTimeout=setTimeout(function(){o.value===v&&o.selectionStart!==u&&H(o,u)},0))},O=function(o,u,v){return me(o,u,B(o),v)},Q=function(o,u,v){var w=B(u),_=Ge(u,V,o,v,w,F,k);return _=me(u,_,w),_},oe=function(o){var u=o.formattedValue;u===void 0&&(u="");var v=o.input,w=o.source,_=o.event,D=o.numAsString,b;if(v){var K=o.inputValue||v.value,G=ce(v);v.value=u,b=Q(K,u,G),b!==void 0&&E(v,b,u)}u!==V&&$(A(u,D),{event:_,source:w})};T.useEffect(function(){var o=U.current,u=o.formattedValue,v=o.numAsString;(V!==u||L!==v)&&$(A(V,L),{event:void 0,source:re.props})},[V,L]);var te=f.current?ce(f.current):void 0,ne=typeof window<"u"?T.useLayoutEffect:T.useEffect;ne(function(){var o=f.current;if(V!==U.current.formattedValue&&o){var u=Q(U.current.formattedValue,V,te);o.value=V,E(o,u,V)}},[V]);var ue=function(o,u,v){var w=u.target,_=M.current?Pe(M.current,w.selectionEnd):Ve(V,o),D=Object.assign(Object.assign({},_),{lastValue:V}),b=h(o,D),K=R(b);if(b=h(K,void 0),c&&!c(A(K,b))){var G=u.target,Z=ce(G),fe=Q(o,V,Z);return G.value=V,E(G,fe,V),!1}return oe({formattedValue:K,numAsString:b,inputValue:o,event:u,source:v,input:u.target}),!0},le=function(o,u){u===void 0&&(u=0);var v=o.selectionStart,w=o.selectionEnd;M.current={selectionStart:v,selectionEnd:w+u}},De=function(o){var u=o.target,v=u.value,w=ue(v,o,re.event);w&&m(o),M.current=void 0},Ie=function(o){var u=o.target,v=o.key,w=u.selectionStart,_=u.selectionEnd,D=u.value;D===void 0&&(D="");var b;v==="ArrowLeft"||v==="Backspace"?b=Math.max(w-1,0):v==="ArrowRight"?b=Math.min(w+1,D.length):v==="Delete"&&(b=w);var K=0;v==="Delete"&&w===_&&(K=1);var G=v==="ArrowLeft"||v==="ArrowRight";if(b===void 0||w!==_&&!G){y(o),le(u,K);return}var Z=b;if(G){var fe=v==="ArrowLeft"?"left":"right";Z=O(D,b,fe),Z!==b&&o.preventDefault()}else v==="Delete"&&!F(D[b])?Z=O(D,b,"right"):v==="Backspace"&&!F(D[b])&&(Z=O(D,b,"left"));Z!==b&&E(u,Z,D),y(o),le(u,K)},Ce=function(o){var u=o.target,v=function(){var w=u.selectionStart,_=u.selectionEnd,D=u.value;if(D===void 0&&(D=""),w===_){var b=O(D,w);b!==w&&E(u,b,D)}};v(),requestAnimationFrame(function(){v()}),s(o),le(u)},Ee=function(o){o.persist&&o.persist();var u=o.target,v=o.currentTarget;f.current=u,N.current.focusTimeout=setTimeout(function(){var w=u.selectionStart,_=u.selectionEnd,D=u.value;D===void 0&&(D="");var b=O(D,w);b!==w&&!(w===0&&_===D.length)&&E(u,b,D),I(Object.assign(Object.assign({},o),{currentTarget:v}))},0)},Re=function(o){f.current=null,clearTimeout(N.current.focusTimeout),clearTimeout(N.current.setCaretTimeout),C(o)},Ae=ee&&We()?"numeric":void 0,ve=Object.assign({inputMode:Ae},j,{type:t,value:V,onChange:De,onKeyDown:Ie,onMouseUp:Ce,onFocus:Ee,onBlur:Re});if(r==="text")return a?X.createElement(X.Fragment,null,a(V,j)||null):X.createElement("span",Object.assign({},j,{ref:i}),V);if(n){var Oe=n;return X.createElement(Oe,Object.assign({},ve,{ref:i}))}return X.createElement("input",Object.assign({},ve,{ref:i}))}function he(e,t){var r=t.decimalScale,n=t.fixedDecimalScale,a=t.prefix;a===void 0&&(a="");var i=t.suffix;i===void 0&&(i="");var l=t.allowNegative,h=t.thousandsGroupStyle;if(h===void 0&&(h="thousand"),e===""||e==="-")return e;var p=ie(t),x=p.thousandSeparator,S=p.decimalSeparator,c=r!==0&&e.indexOf(".")!==-1||r&&n,m=se(e,l),y=m.beforeDecimal,s=m.afterDecimal,I=m.addNegation;return r!==void 0&&(s=ye(s,r,!!n)),x&&(y=Le(y,x,h)),a&&(y=a+y),i&&(s=s+i),I&&(y="-"+y),e=y+(c&&S||"")+s,e}function ie(e){var t=e.decimalSeparator;t===void 0&&(t=".");var r=e.thousandSeparator,n=e.allowedDecimalSeparators;return r===!0&&(r=","),n||(n=[t,"."]),{decimalSeparator:t,thousandSeparator:r,allowedDecimalSeparators:n}}function Je(e,t){e===void 0&&(e="");var r=new RegExp("(-)"),n=new RegExp("(-)(.)*(-)"),a=r.test(e),i=n.test(e);return e=e.replace(/-/g,""),a&&!i&&t&&(e="-"+e),e}function Qe(e,t){return new RegExp("(^-)|[0-9]|"+xe(e),"g")}function Xe(e,t,r){return e===""?!0:!(t!=null&&t.match(/\d/))&&!(r!=null&&r.match(/\d/))&&typeof e=="string"&&!isNaN(Number(e))}function Ye(e,t,r){var n;t===void 0&&(t=Ue(e));var a=r.allowNegative,i=r.prefix;i===void 0&&(i="");var l=r.suffix;l===void 0&&(l="");var h=r.decimalScale,p=t.from,x=t.to,S=x.start,c=x.end,m=ie(r),y=m.allowedDecimalSeparators,s=m.decimalSeparator,I=e[c]===s;if(ae(e)&&(e===i||e===l)&&t.lastValue==="")return e;if(c-S===1&&y.indexOf(e[S])!==-1){var C=h===0?"":s;e=e.substring(0,S)+C+e.substring(S+1,e.length)}var g=function(f,N,R){var A=!1,E=!1;i.startsWith("-")?A=!1:f.startsWith("--")?(A=!1,E=!0):l.startsWith("-")&&f.length===l.length?A=!1:f[0]==="-"&&(A=!0);var O=A?1:0;return E&&(O=2),O&&(f=f.substring(O),N-=O,R-=O),{value:f,start:N,end:R,hasNegation:A}},B=g(e,S,c),F=B.hasNegation;n=B,e=n.value,S=n.start,c=n.end;var k=g(t.lastValue,p.start,p.end),j=k.start,z=k.end,P=k.value,V=e.substring(S,c);e.length&&P.length&&(j>P.length-l.length||z<i.length)&&!(V&&l.startsWith(V))&&(e=P);var L=0;e.startsWith(i)?L+=i.length:S<i.length&&(L=S),e=e.substring(L),c-=L;var W=e.length,M=e.length-l.length;e.endsWith(l)?W=M:(c>M||c>e.length-l.length)&&(W=c),e=e.substring(0,W),e=Je(F?"-"+e:e,a),e=(e.match(Qe(s))||[]).join("");var U=e.indexOf(s);e=e.replace(new RegExp(xe(s),"g"),function(f,N){return N===U?".":""});var $=se(e,a),J=$.beforeDecimal,ee=$.afterDecimal,d=$.addNegation;return x.end-x.start<p.end-p.start&&J===""&&I&&!parseFloat(ee)&&(e=d?"-":""),e}function et(e,t){var r=t.prefix;r===void 0&&(r="");var n=t.suffix;n===void 0&&(n="");var a=Array.from({length:e.length+1}).map(function(){return!0}),i=e[0]==="-";a.fill(!1,0,r.length+(i?1:0));var l=e.length;return a.fill(!1,l-n.length+1,l+1),a}function tt(e){var t=ie(e),r=t.thousandSeparator,n=t.decimalSeparator,a=e.prefix;a===void 0&&(a="");var i=e.allowNegative;if(i===void 0&&(i=!0),r===n)throw new Error(`
|
2
2
|
Decimal separator can't be same as thousand separator.
|
3
3
|
thousandSeparator: `+r+` (thousandSeparator = {true} is same as thousandSeparator = ",")
|
4
4
|
decimalSeparator: `+n+` (default value for decimalSeparator is .)
|
@@ -1 +1 @@
|
|
1
|
-
import{
|
1
|
+
import{c7 as c,c8 as u,aq as s,aV as f}from"./index.2EE80u0h.js";function n(r,t){(t==null||t>r.length)&&(t=r.length);for(var e=0,o=Array(t);e<t;e++)o[e]=r[e];return o}function l(r,t){if(r){if(typeof r=="string")return n(r,t);var e={}.toString.call(r).slice(8,-1);return e==="Object"&&r.constructor&&(e=r.constructor.name),e==="Map"||e==="Set"?Array.from(r):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?n(r,t):void 0}}function y(r,t){if(!(r instanceof t))throw new TypeError("Cannot call a class as a function")}function i(r,t){for(var e=0;e<t.length;e++){var o=t[e];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(r,c(o.key),o)}}function b(r,t,e){return t&&i(r.prototype,t),e&&i(r,e),Object.defineProperty(r,"prototype",{writable:!1}),r}function _(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),t&&u(r,t)}function a(r){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},a(r)}function d(r,t){if(t&&(s(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return f(r)}export{_,y as a,b,a as c,d,l as e,n as f};
|
@@ -1 +1 @@
|
|
1
|
-
import{e as l}from"./es6.
|
1
|
+
import{e as l}from"./es6.UQDWlCyE.js";import"./index.2EE80u0h.js";const{DISALLOWED:d}=l;class a{constructor(e,t){this.writer=e,this.fileEntry=t}async write(e){if(typeof e=="object"){if(e.type==="write"){if(Number.isInteger(e.position)&&e.position>=0&&(this.writer.seek(e.position),this.writer.position!==e.position&&(await new Promise((t,i)=>{this.writer.onwriteend=t,this.writer.onerror=i,this.writer.truncate(e.position)}),this.writer.seek(e.position))),!("data"in e))throw new DOMException("Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. write requires a data argument","SyntaxError");e=e.data}else if(e.type==="seek")if(Number.isInteger(e.position)&&e.position>=0){if(this.writer.seek(e.position),this.writer.position!==e.position)throw new DOMException("seeking position failed","InvalidStateError");return}else throw new DOMException("Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. seek requires a position argument","SyntaxError");else if(e.type==="truncate")return new Promise(t=>{if(Number.isInteger(e.size)&&e.size>=0)this.writer.onwriteend=i=>t(),this.writer.truncate(e.size);else throw new DOMException("Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. truncate requires a size argument","SyntaxError")})}await new Promise((t,i)=>{this.writer.onwriteend=t,this.writer.onerror=i,this.writer.write(new Blob([e]))})}close(){return new Promise(this.fileEntry.file.bind(this.fileEntry))}}class w{constructor(e,t=!0){this.file=e,this.kind="file",this.writable=t,this.readable=!0}get name(){return this.file.name}isSameEntry(e){return this.file.toURL()===e.file.toURL()}getFile(){return new Promise(this.file.file.bind(this.file))}createWritable(e){if(!this.writable)throw new DOMException(...d);return new Promise((t,i)=>this.file.createWriter(r=>{e.keepExistingData===!1?(r.onwriteend=s=>t(new a(r,this.file)),r.truncate(0)):t(new a(r,this.file))},i))}}class n{constructor(e,t=!0){this.dir=e,this.writable=t,this.readable=!0,this.kind="directory",this.name=e.name}isSameEntry(e){return this.dir.fullPath===e.dir.fullPath}async*entries(){const e=this.dir.createReader(),t=await new Promise(e.readEntries.bind(e));for(const i of t)yield[i.name,i.isFile?new w(i,this.writable):new n(i,this.writable)]}getDirectoryHandle(e,t){return new Promise((i,r)=>{this.dir.getDirectory(e,t,s=>{i(new n(s))},r)})}getFileHandle(e,t){return new Promise((i,r)=>this.dir.getFile(e,t,s=>i(new w(s)),r))}async removeEntry(e,t){const i=await this.getDirectoryHandle(e,{create:!1}).catch(r=>r.name==="TypeMismatchError"?this.getFileHandle(e,{create:!1}):r);if(i instanceof Error)throw i;return new Promise((r,s)=>{i instanceof n?t.recursive?i.dir.removeRecursively(()=>r(),s):i.dir.remove(()=>r(),s):i.file&&i.file.remove(()=>r(),s)})}}const p=(o={})=>new Promise((e,t)=>window.webkitRequestFileSystem(o._persistent,0,i=>e(new n(i.root)),t));export{w as FileHandle,n as FolderHandle,p as default};
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{
|
2
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function N(e,t){if(e){if(typeof e=="string")return
|
1
|
+
import{bw as v,bx as T,bW as x,r as d,cg as j,ch as R}from"./index.2EE80u0h.js";import{g as $,a as I,b as A,B as F}from"./base-input.B5AcLp6p.js";function _(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_(Object(r),!0).forEach(function(n){E(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function E(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var O=v("div",function(e){return s(s({},$(s(s({$positive:!1},e),{},{$hasIconTrailing:!1}))),{},{width:e.$resize?"fit-content":"100%"})});O.displayName="StyledTextAreaRoot";O.displayName="StyledTextAreaRoot";var m=v("div",function(e){return I(s({$positive:!1},e))});m.displayName="StyledTextareaContainer";m.displayName="StyledTextareaContainer";var g=v("textarea",function(e){return s(s({},A(e)),{},{resize:e.$resize||"none"})});g.displayName="StyledTextarea";g.displayName="StyledTextarea";function b(e){"@babel/helpers - typeof";return b=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},b(e)}function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},l.apply(this,arguments)}function B(e,t){return D(e)||C(e,t)||N(e,t)||z()}function z(){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 N(e,t){if(e){if(typeof e=="string")return w(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return w(e,t)}}function w(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function C(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],o=!0,i=!1,a,u;try{for(r=r.call(e);!(o=(a=r.next()).done)&&(n.push(a.value),!(t&&n.length===t));o=!0);}catch(y){i=!0,u=y}finally{try{!o&&r.return!=null&&r.return()}finally{if(i)throw u}}return n}}function D(e){if(Array.isArray(e))return e}function K(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function U(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function q(e,t,r){return t&&U(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function M(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&&h(e,t)}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},h(e,t)}function W(e){var t=L();return function(){var n=p(e),o;if(t){var i=p(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return H(this,o)}}function H(e,t){if(t&&(b(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return f(e)}function f(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function L(){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 p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},p(e)}function c(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Y=function(e){M(r,e);var t=W(r);function r(){var n;K(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=t.call.apply(t,[this].concat(i)),c(f(n),"state",{isFocused:n.props.autoFocus||!1}),c(f(n),"onFocus",function(u){n.setState({isFocused:!0}),n.props.onFocus(u)}),c(f(n),"onBlur",function(u){n.setState({isFocused:!1}),n.props.onBlur(u)}),n}return q(r,[{key:"render",value:function(){var o=this.props.overrides,i=o===void 0?{}:o,a=T(i.Root,O),u=B(a,2),y=u[0],P=u[1],S=x({Input:{component:g},InputContainer:{component:m}},i);return d.createElement(y,l({"data-baseweb":"textarea",$isFocused:this.state.isFocused,$isReadOnly:this.props.readOnly,$disabled:this.props.disabled,$error:this.props.error,$positive:this.props.positive,$required:this.props.required,$resize:this.props.resize},P),d.createElement(F,l({},this.props,{type:j.textarea,overrides:S,onFocus:this.onFocus,onBlur:this.onBlur,resize:this.props.resize})))}}]),r}(d.Component);c(Y,"defaultProps",{autoFocus:!1,disabled:!1,readOnly:!1,error:!1,name:"",onBlur:function(){},onChange:function(){},onKeyDown:function(){},onKeyPress:function(){},onKeyUp:function(){},onFocus:function(){},overrides:{},placeholder:"",required:!1,rows:3,size:R.default});export{Y as T};
|