@stlite/desktop 0.95.0 → 0.96.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/bin/dump_artifacts.js +1 -1
  3. package/build/assets/{ErrorOutline.esm-C-dv9Xq1-skkXNqDc.js → ErrorOutline.esm-_LuTQzkr-BFWi9Uuj.js} +1 -1
  4. package/build/assets/{FileDownload.esm-ORp-UC-S-BrsUfuH5.js → FileDownload.esm-CUqXYNk4-DieQ2Qle.js} +1 -1
  5. package/build/assets/FileHelper-DbeeBEs5-Co0d-OBP.js +5 -0
  6. package/build/assets/{FormClearHelper-DtwjWakY-CxfcniD6.js → FormClearHelper-C58X4iX0-CI3cpm91.js} +1 -1
  7. package/build/assets/IFrameUtil-8kJzIdKx-BKMrKnrz.js +1 -0
  8. package/build/assets/{InputInstructions-CshBE9XZ-BbegIdTI.js → InputInstructions-BSpH125g-CSupbuK3.js} +1 -1
  9. package/build/assets/Particles-6ak5Hlgw-4VTgCETZ.js +1 -0
  10. package/build/assets/ProgressBar-CQHaVJeY-Bo6RDYz5.js +2 -0
  11. package/build/assets/StreamlitSyntaxHighlighter-DSYWFRjz-B77VB7yz.js +8 -0
  12. package/build/assets/Toolbar-Cr9ArNQU-D5-awBnv.js +1 -0
  13. package/build/assets/_baseAssignValue-3fAevQ7t-BOcc6F75.js +1 -0
  14. package/build/assets/_baseIndexOf-OsCSwRmV--aVpkM1d.js +1 -0
  15. package/build/assets/{base-input-DbV2D5sF-DJkpBRM1.js → base-input-CAXjxi6E-LJzeEbPm.js} +4 -4
  16. package/build/assets/{checkbox-CG80fxUD-CavQvTtP.js → checkbox-OEhCo8NJ-C1rXZb97.js} +2 -2
  17. package/build/assets/{createSuper-BlgWzn8_-h1vcwEzv.js → createSuper-bIcQlS98-B8MWK81T.js} +1 -1
  18. package/build/assets/data-grid-overlay-editor-DbHL3o_S-CiO7EIHu.js +1 -0
  19. package/build/assets/{downloader-DcCTL3Wz-CqotLrf1.js → downloader-DcCTL3Wz-Dj-02g6N.js} +1 -1
  20. package/build/assets/embed-DJe7ZhON-C4OnDOK-.js +195 -0
  21. package/build/assets/{es6--XPcqeHG-DdkxL8eW.js → es6--XPcqeHG-2BbC2xK9.js} +2 -2
  22. package/build/assets/{iframeResizer.contentWindow-DEXh82Lp-CG3rnwWO.js → iframeResizer.contentWindow-9ByjY9IM-BBpPzlnE.js} +1 -1
  23. package/build/assets/{index-vRM8HrbM-CZbE9IiJ.js → index-10RiWKwV-Cn-PcXb4.js} +3 -3
  24. package/build/assets/index-47jAZmzN-8ZV_muwb.js +1 -0
  25. package/build/assets/index-99W3Zegr-DhiLonYo.js +1 -0
  26. package/build/assets/index-BGCCnxH2-jQwb1QhH.js +1 -0
  27. package/build/assets/{index-CNKtyIol-BPke8suV.js → index-BHN72E4J-BztQAHMJ.js} +1 -1
  28. package/build/assets/index-BSOGSXpv-Bd9gyoUy.js +27 -0
  29. package/build/assets/index-BVhYQGzc-Do7aV0dQ.js +1 -0
  30. package/build/assets/index-BVuioNdm-CVDd_GaD.js +1 -0
  31. package/build/assets/index-BYGDMULw-4dwQq_lE.js +1 -0
  32. package/build/assets/index-B_94eI3S-ADuW4ppz.js +6 -0
  33. package/build/assets/index-Bck9VlwE-zB2PlFuX.js +3 -0
  34. package/build/assets/index-Bdi0ug4X.js +181 -0
  35. package/build/assets/{index-y3ITDERN-Ccy-wRE2.js → index-BrYfiXJ9-D7No2wma.js} +1 -1
  36. package/build/assets/index-BwqdV017-BaIzlXlX.js +2 -0
  37. package/build/assets/index-C6MBr137-B6bz_i6a.js +1 -0
  38. package/build/assets/index-CAtZcI5--D0BcKLsl.js +2 -0
  39. package/build/assets/index-CF9SDiIL-0Yw8O39Y.js +1 -0
  40. package/build/assets/index-CFA5JkEa-DUK-7VD7.js +1 -0
  41. package/build/assets/index-CJA4Tdig-Rs7zFCTh.js +1 -0
  42. package/build/assets/index-CVld_lKx-CBWAU0gM.js +14 -0
  43. package/build/assets/{index-BqCY3Zlk-mm_Bt8ZF.js → index-CY18be0x-Bq4JW-41.js} +1 -1
  44. package/build/assets/index-CaWaI2PT-DvorZu2G.js +2 -0
  45. package/build/assets/{index-CiBn_-AR-CMINgD7R.js → index-Cbq5ClnA-Ct1ftt5G.js} +1 -1
  46. package/build/assets/index-CceTm1nk-D-m7sDsR.js +1 -0
  47. package/build/assets/{index-SbKh1OIB-BjfuWdcF.js → index-Cp-N8m1m-CSwdpflI.js} +4 -4
  48. package/build/assets/index-CucLKMvI-CdFsTlcF.js +1 -0
  49. package/build/assets/index-CxZCITs0-CLi85oo1.js +1 -0
  50. package/build/assets/{index-C7cG_aL6-BWm5S1-m.js → index-D3vT_IC--BZlisRXs.js} +64 -64
  51. package/build/assets/index-D5L-gN8f-Bny7-WhK.js +11 -0
  52. package/build/assets/index-D7zRUNKG-2cwkh8qP.js +1 -0
  53. package/build/assets/index-D8RPh1xj-BLIXkU4c.js +1 -0
  54. package/build/assets/index-DNE2UpRK-CMtd92Tg.js +1 -0
  55. package/build/assets/index-D_5mY4iN-C3O2lE89.js +1 -0
  56. package/build/assets/index-DfPnrVLL-B6NKOBTt.js +1 -0
  57. package/build/assets/index-Do4wh7Iw-cPdQGRDQ.js +1 -0
  58. package/build/assets/{index-D2j0kQLw-67iH-2yA.js → index-DttfDE80-GomZzukD.js} +1 -1
  59. package/build/assets/index-DwedDN1c-C-Y3cCQP.js +1 -0
  60. package/build/assets/index-Fvxtopfe-CxLnCat0.js +1 -0
  61. package/build/assets/index-G4vqu33f-DO7BfNY6.js +1 -0
  62. package/build/assets/index-KWOwopwF-CN_5PcLU.js +2 -0
  63. package/build/assets/index-NPM6VaN3-C-0cbqN2.js +3 -0
  64. package/build/assets/index-Q4xI4OhR-D81jje-l.js +1 -0
  65. package/build/assets/index-R0bDPfYF-CRQIdCoC.js +263 -0
  66. package/build/assets/index-R1QyBsfg-tcyjJ4fb.js +1 -0
  67. package/build/assets/index-YOustUZZ-CX09XTf8.js +2 -0
  68. package/build/assets/index-b6W2ubHd-BapgUWLx.js +1 -0
  69. package/build/assets/index-h-ZgFEXT-DdL6EMUv.js +2 -0
  70. package/build/assets/index-lGTf3abu-B6CGTEed.js +1 -0
  71. package/build/assets/index-nXfHwIms-cOwCevci.js +198 -0
  72. package/build/assets/index-tU7dWFCN-DURbp79P.js +1 -0
  73. package/build/assets/inherits-Byw8NQvD-DdaLbWVP.js +1 -0
  74. package/build/assets/{input-DNUwcYWK-C9eVW6-S.js → input-5gXdrXd2-J6HaBKjM.js} +2 -2
  75. package/build/assets/main-DvFfgny--BkQIK2a9.js +13 -0
  76. package/build/assets/{memory-B3L1Fctl-CQ-Y_gc6.js → memory-B3L1Fctl-mli5o0A1.js} +1 -1
  77. package/build/assets/moment-CU6QKNej-DcQX_LE0.js +4 -0
  78. package/build/assets/number-overlay-editor-BQ0qCmxT-5g_cUv4i.js +9 -0
  79. package/build/assets/pandasStylerUtils-BvB3vP-L-D9viw-G9.js +1 -0
  80. package/build/assets/{sandbox-ChAzL-i--DqMwo4R7.js → sandbox-ChAzL-i--CSnZJIg8.js} +1 -1
  81. package/build/assets/slicedToArray-CrkrjOeW-7_omneg6.js +2 -0
  82. package/build/assets/styled-components-DkuYntx5-DrGZZlKf.js +1 -0
  83. package/build/assets/threshold-eWsxmMyL-jpRnj60B.js +1 -0
  84. package/build/assets/{timepicker-CkLW19xP-CTuglWU6.js → timepicker-BMxsIjZb-Uq5-wJ6H.js} +1 -1
  85. package/build/assets/timer-DAAwtI0i-CB52lra-.js +1 -0
  86. package/build/assets/toConsumableArray-BpgQ3N5A-AHKfFeLf.js +2 -0
  87. package/build/assets/uniqueId-BrCTHDA7-CGglDaT_.js +1 -0
  88. package/build/assets/unsupportedIterableToArray-CFN3yOc2-C4SckrTc.js +1 -0
  89. package/build/assets/urls-CuMqgoDl-BWqF1s4U.js +1 -0
  90. package/build/assets/{useBasicWidgetState-BTyLgyXa-DI96f9E0.js → useBasicWidgetState-CzHHKP20-CGMCneWD.js} +1 -1
  91. package/build/assets/useIntlLocale-5C0LAQxq-ow_F-T5t.js +12 -0
  92. package/build/assets/{useTextInputAutoExpand-YLx_K1sh-DhWKaGOV.js → useTextInputAutoExpand-BMCOrWKx-DmoV3o2_.js} +2 -2
  93. package/build/assets/{useUpdateUiValue-B9j1K8e5-CIeTAxHC.js → useUpdateUiValue-BtVkPggP-4VTS40xs.js} +1 -1
  94. package/build/assets/useWaveformController-DuJh2iwj-BQGl9KsR.js +1 -0
  95. package/build/assets/value-DwxUZIyI-CNuykc50.js +1 -0
  96. package/build/assets/withCalculatedWidth-C0lBnc3E-BAFtxM9t.js +1 -0
  97. package/build/assets/withFullScreenWrapper-wajYPLRg-e8FnO2xN.js +1 -0
  98. package/build/index.html +1 -1
  99. package/package.json +3 -3
  100. package/wheels/streamlit-1.52.2-cp313-none-any.whl +0 -0
  101. package/build/assets/FileHelper-DQKV3o5U-qFf0CL_R.js +0 -5
  102. package/build/assets/Particles-DbEEaBdi-Cslh0fnd.js +0 -1
  103. package/build/assets/ProgressBar-ohpf-YR2-PWD0xacp.js +0 -2
  104. package/build/assets/Toolbar-Cc8tCeKL-JHIp2NvW.js +0 -1
  105. package/build/assets/data-grid-overlay-editor-DsmOmCoE-DU0EvyVM.js +0 -1
  106. package/build/assets/index-3Q8l-56I-Bp9UZWPZ.js +0 -27
  107. package/build/assets/index-8FM--PX3-C2rsm2es.js +0 -1
  108. package/build/assets/index-B1y_Hrx0-DDwLQ3XW.js +0 -1
  109. package/build/assets/index-BECG__WC-DerPiN--.js +0 -1
  110. package/build/assets/index-BQn4Faen-CVQ5ESXY.js +0 -3
  111. package/build/assets/index-BReUOw2L-emeACiGh.js +0 -1371
  112. package/build/assets/index-BiS_E3zu-CwIGZcqG.js +0 -1
  113. package/build/assets/index-BmlZuG1z-BtaDcb9o.js +0 -1
  114. package/build/assets/index-BvblFOYP.js +0 -691
  115. package/build/assets/index-Bzy7yu67-C3L4ShMk.js +0 -2
  116. package/build/assets/index-CO05R5cS-DHfFy15g.js +0 -1
  117. package/build/assets/index-CQfw52g6-BJ-a84bb.js +0 -1
  118. package/build/assets/index-CTvmRzFN-By1zFrdQ.js +0 -2
  119. package/build/assets/index-Cb_C2vCk-DrzTyNQF.js +0 -198
  120. package/build/assets/index-CnMc0ayy-CKIU12h5.js +0 -1
  121. package/build/assets/index-D0Ry9mHz-DBJluHQV.js +0 -3
  122. package/build/assets/index-D42P77wj-jZCT0fQL.js +0 -1
  123. package/build/assets/index-D7LfqMh3-DvKIa3UK.js +0 -1
  124. package/build/assets/index-DD64_I3e-Cxdt0Oji.js +0 -1
  125. package/build/assets/index-DEYeMrzr-DP5rSRot.js +0 -1
  126. package/build/assets/index-DTog-cZN-vTBq72Ci.js +0 -1
  127. package/build/assets/index-DU0kTHM_-CInhbPr8.js +0 -12
  128. package/build/assets/index-DeKEPgyN-DF3OyxuW.js +0 -1
  129. package/build/assets/index-DrS8S2M--C4mGh6T8.js +0 -1
  130. package/build/assets/index-DxTzjSNF-B-v_CQEN.js +0 -2
  131. package/build/assets/index-IXLMpVV4-D8dPiMEz.js +0 -2
  132. package/build/assets/index-Ray843Xd-CpBr9wfH.js +0 -1
  133. package/build/assets/index-S-A7KecP-DJ0BKtLt.js +0 -1
  134. package/build/assets/index-Uvv6so0Q-Lbl8GAad.js +0 -1
  135. package/build/assets/index-YbT2v6Cb-CoC81Jcm.js +0 -1
  136. package/build/assets/inherits-CYghrBFU-Cf4k8aUQ.js +0 -1
  137. package/build/assets/number-overlay-editor-C2e7pY6x-BnC-vP7l.js +0 -9
  138. package/build/assets/slicedToArray-D4uL3Bzl-95JmZlNK.js +0 -2
  139. package/build/assets/uniqueId-C6wp_e1D-D_RnWRJW.js +0 -1
  140. package/build/assets/withFullScreenWrapper-DqrJMIkm-BwrYir6f.js +0 -1
  141. package/wheels/streamlit-1.51.0-cp313-none-any.whl +0 -0
@@ -1,2 +0,0 @@
1
- import{r as f,m as K,s as J,aU as u,j as g,aV as Y,aH as Z,aI as q,aW as Q,aJ as ee,ap as te,aX as re,aR as ne,ai as k,al as $,am as oe,aY as ie,aZ as ae,a_ as le}from"./index-BvblFOYP.js";import{B as ce}from"./useBasicWidgetState-BTyLgyXa-DI96f9E0.js";import"./FormClearHelper-DtwjWakY-CxfcniD6.js";var ue={secondary:"secondary"},z={default:"default"},se={default:"default"},P=Object.freeze({radio:"radio",checkbox:"checkbox"}),N=ie("div",function(e){var t=e.$shape,r=e.$length,n=e.$theme,o=r===1?void 0:t!==z.default?"-".concat(n.sizing.scale100):"-0.5px";return{display:"flex",marginLeft:o,marginRight:o}});N.displayName="StyledRoot";N.displayName="StyledRoot";function D(e){"@babel/helpers - typeof";return D=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},D(e)}function A(){return A=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},A.apply(this,arguments)}function U(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 fe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?U(Object(r),!0).forEach(function(n){V(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):U(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function pe(e,t){return me(e)||be(e,t)||ye(e,t)||de()}function de(){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 ye(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 be(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,p;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,p=b}finally{try{!o&&r.return!=null&&r.return()}finally{if(a)throw p}}return n}}function me(e){if(Array.isArray(e))return e}function he(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ge(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 Se(e,t,r){return t&&ge(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ve(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&&G(e,t)}function G(e,t){return G=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},G(e,t)}function Oe(e){var t=we();return function(){var r=I(e),n;if(t){var o=I(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ee(this,n)}}function Ee(e,t){if(t&&(D(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return X(e)}function X(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function we(){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 I(e){return I=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},I(e)}function V(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Le(e,t){return!Array.isArray(e)&&typeof e!="number"?!1:Array.isArray(e)?e.includes(t):e===t}var F=(function(e){ve(r,e);var t=Oe(r);function r(){var n;he(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)),V(X(n),"childRefs",{}),n}return Se(r,[{key:"render",value:function(){var n=this,o=this.props,a=o.overrides,i=a===void 0?{}:a,p=o.mode,b=p===void 0?P.checkbox:p,c=o.children,m=o.selected,w=o.disabled,d=o.onClick,O=o.kind,y=o.shape,L=o.size,S=ae(i.Root,N),x=pe(S,2),j=x[0],T=x[1],R=this.props["aria-label"]||this.props.ariaLabel,s=b===P.radio,E=f.Children.count(c);return f.createElement(le.Consumer,null,function(H){return f.createElement(j,A({"aria-label":R||H.buttongroup.ariaLabel,"data-baseweb":"button-group",role:s?"radiogroup":"group",$shape:y,$length:c.length},T),f.Children.map(c,function(h,C){if(!f.isValidElement(h))return null;var _=h.props.isSelected?h.props.isSelected:Le(m,C);return s&&(n.childRefs[C]=f.createRef()),f.cloneElement(h,{disabled:w||h.props.disabled,isSelected:_,ref:s?n.childRefs[C]:void 0,tabIndex:!s||_||s&&(!m||m===-1)&&C===0?0:-1,onKeyDown:function(l){if(s){var v=Number(m)?Number(m):0;if(l.key==="ArrowUp"||l.key==="ArrowLeft"){l.preventDefault&&l.preventDefault();var B=v-1<0?E-1:v-1;d&&d(l,B),n.childRefs[B].current&&n.childRefs[B].current.focus()}if(l.key==="ArrowDown"||l.key==="ArrowRight"){l.preventDefault&&l.preventDefault();var M=v+1>E-1?0:v+1;d&&d(l,M),n.childRefs[M].current&&n.childRefs[M].current.focus()}}},kind:O,onClick:function(l){w||(h.props.onClick&&h.props.onClick(l),d&&d(l,C))},shape:y,size:L,overrides:fe({BaseButton:{style:function(l){var v=l.$theme;return c.length===1?{}:y!==z.default?{marginLeft:v.sizing.scale100,marginRight:v.sizing.scale100}:{marginLeft:"0.5px",marginRight:"0.5px"}},props:{"aria-checked":_,role:s?"radio":"checkbox"}}},h.props.overrides)})}))})}}]),r})(f.Component);V(F,"defaultProps",{disabled:!1,onClick:function(){},shape:z.default,size:se.default,kind:ue.secondary});function je(e,t){return t.includes(e)?t.filter(r=>r!==e):[...t,e]}function Re(e,t,r){return e==u.ClickMode.MULTI_SELECT?je(t,r??[]):r?.includes(t)?[]:[t]}function Ce(e){return e.length===0?-1:e[0]}function ke(e,t,r,n){t.setIntArrayValue(e,r.value,{fromUi:r.fromUi},n)}function xe(e,t,r){const n=r===u.Style.PILLS?k.PILLS:r===u.Style.BORDERLESS?k.BORDERLESS_ICON:k.SEGMENTED_CONTROL,o=r===u.Style.BORDERLESS?$.XSMALL:$.MEDIUM,a=n===k.PILLS||n===k.SEGMENTED_CONTROL,i=r===u.Style.BORDERLESS?"lg":"base";return{element:g.jsx(oe,{icon:t,label:e,iconSize:i,useSmallerFont:a}),kind:n,size:o}}function Pe(e,t,r,n){return r.indexOf(n)>-1?!0:t!==u.ClickMode.SINGLE_SELECT||e!==u.SelectionVisualization.ALL_UP_TO_SELECTED?!1:r.length>0&&n<r[0]}function Ie(e,t){return e&&(t=`${t}Active`),t}function Te(e,t,r){const n={flexWrap:"wrap",maxWidth:"100%",margin:"0 0"},o=r?"100%":"auto",a=r?{}:{content:"''",flex:1e4};switch(e){case u.Style.BORDERLESS:return{...n,columnGap:t.threeXS,rowGap:t.threeXS};case u.Style.PILLS:return{...n,columnGap:t.twoXS,rowGap:t.twoXS,width:o};case u.Style.SEGMENTED_CONTROL:return{...n,columnGap:t.none,rowGap:t.twoXS,"::after":a,width:o};default:return n}}function _e(e,t,r,n,o,a,i){const p=Pe(r,n,o,t);let b=e.content,c=e.contentIcon;return p&&(b=e.selectedContent?e.selectedContent:b,c=e.selectedContentIcon?e.selectedContentIcon:c),f.forwardRef(function(m,w){const{element:d,kind:O,size:y}=xe(b??"",c??void 0,a),L=Ie(!!(p&&!e.selectedContent&&!e.selectedContentIcon),O);return g.jsx(ne,{...m,size:y,kind:L,containerWidth:i,children:d})})}function Be(e,t){return e.getIntArrayValue(t)}function Me(e){return e.default??null}function De(e){return e.value??null}function Ae(e){const{disabled:t,element:r,fragmentId:n,widgetMgr:o,widthConfig:a}=e,{clickMode:i,options:p,selectionVisualization:b,style:c,label:m,labelVisibility:w,help:d}=r,O=K(),[y,L]=ce({getStateFromWidgetMgr:Be,getDefaultStateFromProto:Me,getCurrStateFromProto:De,updateWidgetMgrState:ke,element:r,widgetMgr:o,fragmentId:n}),S=J(a),x=(R,s)=>{const E=Re(i,s,y);L({value:E,fromUi:!0})};let j;i===u.ClickMode.SINGLE_SELECT?j=P.radio:i===u.ClickMode.MULTI_SELECT&&(j=P.checkbox);const T=f.useMemo(()=>p.map((R,s)=>{const E=_e(R,s,b,i,y,c,S);return g.jsx(E,{},`${R.content}-${s}`)}),[i,p,b,c,y,S]);return g.jsxs(Y,{className:"stButtonGroup","data-testid":"stButtonGroup",containerWidth:S,children:[g.jsx(Z,{label:m,disabled:t,labelVisibility:q(w?.value??re.LabelVisibilityOptions.COLLAPSED),children:d&&g.jsx(Q,{children:g.jsx(ee,{content:d,placement:te.TOP})})}),g.jsx(F,{disabled:t,mode:j,onClick:x,selected:i===u.ClickMode.MULTI_SELECT?y:Ce(y),overrides:{Root:{style:f.useCallback(()=>Te(c,O.spacing,S),[c,O.spacing,S])}},children:T})]})}const Ve=f.memo(Ae);export{Ve as default};
@@ -1 +0,0 @@
1
- import{r as c,m as P,f as ce,aF as pe,b5 as ue,v as L,b6 as b,j as o,c as g,aS as R,aM as ge,M as he,E as K,_ as X,aJ as me,ap as _,aR as q,ai as Y,aO as fe,aN as xe,N as J,aP as be,aT as ye}from"./index-BvblFOYP.js";import{q as ve,A as H,D as Ie,S as je,I as Q,C as we,f as Ce,_ as Fe,P as ze}from"./FileHelper-DQKV3o5U-qFf0CL_R.js";import{e as Ee}from"./InputInstructions-CshBE9XZ-BbegIdTI.js";import{p as Re,r as Te}from"./useTextInputAutoExpand-YLx_K1sh-DhWKaGOV.js";import{r as Se}from"./inputUtils-DCYiajnz-DsrlAoKH.js";import{i as De}from"./ErrorOutline.esm-C-dv9Xq1-skkXNqDc.js";import{t as Z}from"./UploadFileInfo-B5SttewO-BfvME59S.js";import"./base-input-DbV2D5sF-DJkpBRM1.js";var G=c.forwardRef(function(e,t){var i={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return c.createElement(K,X({iconAttrs:i,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),c.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),c.createElement("path",{d:"M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5a2.5 2.5 0 015 0v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5a2.5 2.5 0 005 0V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6h-1.5z"}))});G.displayName="AttachFile";var ee=c.forwardRef(function(e,t){var i={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return c.createElement(K,X({iconAttrs:i,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),c.createElement("rect",{width:24,height:24,fill:"none"}),c.createElement("path",{d:"M3 5.51v3.71c0 .46.31.86.76.97L11 12l-7.24 1.81c-.45.11-.76.51-.76.97v3.71c0 .72.73 1.2 1.39.92l15.42-6.49c.82-.34.82-1.5 0-1.84L4.39 4.58C3.73 4.31 3 4.79 3 5.51z"}))});ee.displayName="Send";const te=(e,t)=>t===b.Directory?{...e,webkitdirectory:"",multiple:!0}:e,Me=(e,t)=>{if(!t||t.length===0)return!0;const i=e.name.toLowerCase(),a=i.lastIndexOf(".");if(a===-1||a===i.length-1)return t.some(f=>f===""||f===".");const p=i.substring(a),n=i.substring(a+1);return t.some(f=>{const y=f.toLowerCase();return y.startsWith(".")?p===y:n===y})},Le=(e,t)=>Me(e,t)?{isValid:!0}:{isValid:!1,errorMessage:`${e.type||"This type of"} files are not allowed.`},oe=e=>{switch(e){case b.None:return"a file";case b.Single:return"a file";case b.Multiple:return"files";case b.Directory:return"a directory";default:return J(e),"a file"}},Be=g("div",{target:"e3id6jz12"})(({theme:e,height:t})=>({backgroundColor:e.colors.transparent,position:"absolute",left:0,bottom:0,minHeight:`max(${e.sizes.emptyDropdownHeight}, ${t})`,width:"100%",zIndex:e.zIndices.priority}),""),Ue=g("div",{target:"e3id6jz11"})(({theme:e,height:t})=>({border:`${e.sizes.borderWidth} solid`,borderColor:e.colors.primary,borderRadius:e.radii.chatInput,backgroundColor:e.colors.secondaryBg,color:e.colors.primary,display:"flex",alignItems:"center",justifyContent:"center",height:t,width:"100%",fontWeight:e.fontWeights.bold}),""),He=g("div",{target:"e3id6jz10"})(({theme:e,disabled:t})=>({display:"flex",alignItems:"top",height:"100%",marginTop:`-${e.sizes.borderWidth}`,cursor:t?"not-allowed":"auto"}),""),Pe=g("div",{target:"e3id6jz9"})(({disabled:e})=>({pointerEvents:e?"none":"auto"}),""),We=g("div",{target:"e3id6jz8"})(({theme:e})=>({marginTop:"0.625em",marginLeft:e.spacing.sm,height:e.spacing.xl,width:e.sizes.borderWidth,backgroundColor:e.colors.fadedText20}),""),$e=g("div",{target:"e3id6jz7"})(({theme:e})=>({left:0,right:0,lineHeight:e.lineHeights.tight,paddingLeft:e.spacing.sm,paddingRight:e.spacing.sm,overflowX:"auto"}),""),Ne=g("div",{target:"e3id6jz6"})({name:"zjik7",styles:"display:flex"}),ke=g("div",{target:"e3id6jz5"})({name:"ou8xsw",styles:"flex:0 0 auto"}),Ve=g("div",{target:"e3id6jz4"})(({theme:e})=>({display:"flex",alignItems:"center",padding:e.spacing.sm,gap:e.spacing.twoXS}),""),Ae=g("div",{target:"e3id6jz3"})(({theme:e})=>({color:e.colors.fadedText60}),""),Oe=g("div",{target:"e3id6jz2"})(({theme:e,fileStatus:t})=>({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:t.type==="uploaded"?e.colors.bodyText:e.colors.fadedText60}),""),Ke=g("div",{target:"e3id6jz1"})(({theme:e})=>({marginRight:e.spacing.md,color:e.colors.fadedText60}),""),Xe=g("small",{target:"e3id6jz0"})(({theme:e})=>({display:"flex",alignItems:"center",maxHeight:e.sizes.smallElementHeight,color:e.colors.fadedText60,"& :hover":{color:e.colors.bodyText}}),""),_e=({getRootProps:e,getInputProps:t,acceptFile:i,disabled:a,theme:p})=>{const n=te(t(),i);return o.jsxs(He,{disabled:a,children:[o.jsxs(Pe,{"data-testid":"stChatInputFileUploadButton",disabled:a,...e(),children:[o.jsx("input",{...n}),o.jsx(me,{content:`Upload or drag and drop ${oe(i)}`,placement:_.TOP,onMouseEnterDelay:500,children:o.jsx(q,{kind:Y.MINIMAL,disabled:a,children:o.jsx(R,{content:G,size:"lg",color:a?p.colors.fadedText40:p.colors.fadedText60})})})]}),o.jsx(We,{})]})},qe=c.memo(_e),Ye=({getRootProps:e,getInputProps:t,acceptFile:i,inputHeight:a})=>{const p=te(t(),i);return o.jsxs(o.Fragment,{children:[o.jsx(Be,{height:a,...e(),children:o.jsx("input",{...p})}),o.jsx(Ue,{height:a,children:`Drag and drop ${oe(i)} here`})]})},Je=c.memo(Ye);function Qe({children:e,content:t}){const i=P();return o.jsx(ye,{content:t,placement:_.TOP,overrides:{Body:{style:{top:`-${i.sizes.minElementHeight}`}}},children:e})}const Ze=({fileInfo:e})=>{const t=P(),{type:i}=e.status;switch(i){case"uploading":return o.jsx(be,{"data-testid":"stChatInputFileIconSpinner",size:"lg",margin:"0",padding:"0"});case"error":return o.jsx(Qe,{content:e.status.errorMessage,children:o.jsx(R,{color:t.colors.redTextColor,content:De,size:"lg"})});case"uploaded":return o.jsx(R,{content:ze,size:"lg"});default:return J(i),null}},Ge=({fileInfo:e,onDelete:t})=>o.jsxs(Ve,{className:"stChatInputFile","data-testid":"stChatInputFile",children:[o.jsx(Ae,{children:o.jsx(Ze,{fileInfo:e})}),o.jsx(Oe,{className:"stChatInputFileName","data-testid":"stChatInputFileName",title:e.name,fileStatus:e.status,children:e.name}),o.jsx(Ke,{children:Ce(e.size,H.Byte)}),o.jsx(Xe,{"data-testid":"stChatInputDeleteBtn",children:o.jsx(q,{onClick:()=>t(e.id),kind:Y.MINIMAL,children:o.jsx(R,{content:Fe,size:"lg"})})})]}),et=c.memo(Ge),tt=({items:e,onDelete:t})=>o.jsx($e,{"data-testid":"stChatUploadedFiles",children:o.jsx(Ne,{children:e.map(i=>o.jsx(ke,{children:o.jsx(et,{fileInfo:i,onDelete:t})},i.id))})}),ot=c.memo(tt),it=(e,t)=>{const i=[],a=[];return e.forEach(p=>{const n=Le(p,t.fileType);n.isValid?i.push(p):a.push({file:p,errors:[{code:Q.FileInvalidType,message:n.errorMessage||"File type not allowed."}]})}),{accepted:i,rejected:a}},rt=({acceptMultipleFiles:e,acceptDirectoryFiles:t,maxFileSize:i,uploadClient:a,uploadFile:p,addFiles:n,getNextLocalFileId:f,deleteExistingFiles:y,onUploadComplete:j,element:v})=>(m,h)=>{if(t&&m.length>0){const{accepted:u,rejected:x}=it(m,v);m=u,h=[...h,...x]}if(!e&&m.length===0&&h.length>1){const u=h.findIndex(x=>x.errors?.[0].code===Q.TooManyFiles);u>=0&&(m.push(h[u].file),h.splice(u,1))}if(!e&&m.length>0&&y(),a.fetchFileURLs(m).then(u=>{ge(u,m).forEach(([x,w])=>{p(x,w)})}).catch(u=>{n(m.map(x=>new Z(x.name,x.size,f(),{type:"error",errorMessage:u})))}),h.length>0){const u=h.map(x=>we(x,f(),i));n(u)}j()},st=({getNextLocalFileId:e,addFiles:t,updateFile:i,uploadClient:a,element:p,onUploadProgress:n,onUploadComplete:f})=>(y,j)=>{const v=j.webkitRelativePath||j.name,m=new AbortController,h=new Z(v,j.size,e(),{type:"uploading",abortController:m,progress:1});t([h]),a.uploadFile({formId:"",...p},y.uploadUrl,j,u=>n(u,h.id),m.signal).then(()=>f(h.id,y)).catch(u=>{u instanceof DOMException&&u.name==="AbortError"||i(h.id,h.setStatus({type:"error",errorMessage:u?u.toString():"Unknown error"}))})},at=g("div",{target:"e1d2x3se4"})({name:"1nibcdy",styles:"border:none;position:relative;display:flex"}),nt=g("div",{target:"e1d2x3se3"})(({theme:e,extended:t})=>({border:`${e.sizes.borderWidth} solid`,borderColor:e.colors.widgetBorderColor??e.colors.transparent,borderRadius:e.radii.chatInput,backgroundColor:e.colors.secondaryBg,position:"relative",flexGrow:1,display:"flex",alignItems:"center",paddingLeft:e.spacing.lg,maxHeight:t?"none":e.sizes.minElementHeight,gap:e.spacing.sm,overflow:"hidden",":focus-within":{borderColor:e.colors.primary}}),""),lt=g("button",{target:"e1d2x3se2"})(({theme:e,disabled:t,extended:i})=>{const a=he(e),[p,n]=a?[e.colors.gray60,e.colors.gray80]:[e.colors.gray80,e.colors.gray40];return{border:"none",backgroundColor:e.colors.transparent,borderTopRightRadius:i?"0":e.radii.chatInput,borderTopLeftRadius:i?e.radii.default:"0",borderBottomRightRadius:e.radii.chatInput,display:"inline-flex",alignItems:"center",justifyContent:"center",lineHeight:e.lineHeights.none,margin:e.spacing.none,padding:e.spacing.sm,color:t?p:n,pointerEvents:"auto","&:focus":{outline:"none"},":focus":{outline:"none"},"&:focus-visible":{backgroundColor:a?e.colors.gray10:e.colors.gray90},"&:hover":{color:e.colors.primary},"&:disabled, &:disabled:hover, &:disabled:active":{backgroundColor:e.colors.transparent,borderColor:e.colors.transparent,color:e.colors.gray60,cursor:"not-allowed"}}},""),dt=g("div",{target:"e1d2x3se1"})(({theme:e})=>({display:"flex",alignItems:"flex-end",height:"100%",position:"absolute",right:0,marginBottom:`-${e.sizes.borderWidth}`,pointerEvents:"none"}),""),ct=g("div",{target:"e1d2x3se0"})(({theme:e})=>({position:"absolute",bottom:"0px",right:`calc(${e.iconSizes.xl} + 2 * ${e.spacing.sm} + ${e.spacing.sm})`}),""),B=(e,t,i)=>i.map(a=>a.id===e?t:a),U=(e,t)=>t.find(i=>i.id===e);function pt({disabled:e,element:t,widgetMgr:i,fragmentId:a,uploadClient:p}){const n=P(),{placeholder:f,maxChars:y}=t,j=c.useRef(0),v=c.useRef(null),{width:m,elementRef:h}=ce(),{innerWidth:u,innerHeight:x}=pe(),[w,S]=c.useState(t.default),[F,z]=c.useState([]),[E,D]=c.useState(!1),C=Re({textareaRef:v,dependencies:[f]}),M=c.useMemo(()=>F.some(r=>r.status.type==="uploading")?!1:w!==""||F.length>0,[F,w]),I=ue(t.acceptFile),W=ve(t.maxUploadSizeMb,H.Megabyte,H.Byte),$=c.useCallback(r=>z(l=>[...l,...r]),[]),N=c.useCallback(r=>{z(l=>{const d=U(r,l);return L(d)?l:(d.status.type==="uploading"&&d.status.abortController.abort(),d.status.type==="uploaded"&&d.status.fileUrls.deleteUrl&&p.deleteFile(d.status.fileUrls.deleteUrl),l.filter(s=>s.id!==r))})},[p]),ie=()=>{const r=F.filter(l=>l.status.type==="uploaded").map(l=>{const{name:d,size:s,status:T}=l,{fileId:le,fileUrls:de}=T;return new fe({fileId:le,fileUrls:de,name:d,size:s})});return new xe({uploadedFileInfo:r})},k=()=>j.current++,re=rt({acceptMultipleFiles:I===b.Multiple||I===b.Directory,acceptDirectoryFiles:I===b.Directory,maxFileSize:W,uploadClient:p,uploadFile:st({getNextLocalFileId:k,addFiles:$,updateFile:(r,l)=>{z(d=>B(r,l,d))},uploadClient:p,element:t,onUploadProgress:(r,l)=>{z(d=>{const s=U(l,d);if(L(s)||s.status.type!=="uploading")return d;const T=Math.round(r.loaded*100/r.total);return s.status.progress===T?d:B(l,s.setStatus({type:"uploading",abortController:s.status.abortController,progress:T}),d)})},onUploadComplete:(r,l)=>{z(d=>{const s=U(r,d);return L(s)||s.status.type!=="uploading"?d:B(s.id,s.setStatus({type:"uploaded",fileId:l.fileId,fileUrls:l}),d)})}}),addFiles:$,getNextLocalFileId:k,deleteExistingFiles:()=>F.forEach(r=>N(r.id)),onUploadComplete:()=>{v.current&&v.current.focus()},element:t}),{getRootProps:V,getInputProps:A}=Ie({onDrop:re,multiple:I===b.Multiple||I===b.Directory,accept:je(t.fileType),maxSize:W}),O=()=>{if(v.current&&v.current.focus(),!M||e)return;const r={data:w,fileUploaderState:ie()};i.setChatInputValue(t,r,{fromUi:!0},a),z([]),S(""),C.clearScrollHeight()},se=r=>{const{metaKey:l,ctrlKey:d,shiftKey:s}=r;Se(r)&&!s&&!d&&!l&&(r.preventDefault(),O())},ae=r=>{const{value:l}=r.target;y!==0&&l.length>y||(S(l),C.updateScrollHeight())};c.useEffect(()=>{if(t.setValue){t.setValue=!1;const r=t.value||"";S(r)}},[t]),c.useEffect(()=>{const r=s=>{s.preventDefault(),s.stopPropagation(),!E&&s.dataTransfer?.types.includes("Files")&&D(!0)},l=s=>{s.preventDefault(),s.stopPropagation(),E&&(s.clientX<=0&&s.clientY<=0||s.clientX>=u&&s.clientY>=x)&&D(!1)},d=s=>{s.preventDefault(),s.stopPropagation(),E&&D(!1)};return window.addEventListener("dragover",r),window.addEventListener("drop",d),window.addEventListener("dragleave",l),()=>{window.removeEventListener("dragover",r),window.removeEventListener("drop",d),window.removeEventListener("dragleave",l)}},[E,u,x]);const ne=I!==b.None&&E;return o.jsxs(o.Fragment,{children:[I===b.None?null:o.jsx(ot,{items:[...F],onDelete:N}),o.jsx(at,{className:"stChatInput","data-testid":"stChatInput",ref:h,children:ne?o.jsx(Je,{getRootProps:V,getInputProps:A,acceptFile:I,inputHeight:C.height}):o.jsxs(nt,{extended:C.isExtended,children:[I===b.None?null:o.jsx(qe,{getRootProps:V,getInputProps:A,acceptFile:I,disabled:e,theme:n}),o.jsx(Te,{inputRef:v,value:w,placeholder:f,onChange:ae,onKeyDown:se,"aria-label":f,disabled:e,rows:1,overrides:{Root:{style:{minHeight:n.sizes.minElementHeight,outline:"none",borderLeftWidth:"0",borderRightWidth:"0",borderTopWidth:"0",borderBottomWidth:"0",borderTopLeftRadius:"0",borderTopRightRadius:"0",borderBottomRightRadius:"0",borderBottomLeftRadius:"0"}},Input:{props:{"data-testid":"stChatInputTextArea"},style:{fontWeight:n.fontWeights.normal,lineHeight:n.lineHeights.inputWidget,"::placeholder":{color:n.colors.fadedText60},height:C.height,maxHeight:C.maxHeight,paddingLeft:n.spacing.none,paddingBottom:n.spacing.sm,paddingTop:n.spacing.sm,paddingRight:`calc(${n.iconSizes.xl} + 2 * ${n.spacing.sm} + ${n.spacing.sm})`}}}}),m>n.breakpoints.hideWidgetDetails&&o.jsx(ct,{children:o.jsx(Ee,{dirty:M,value:w,maxLength:y,type:"chat",inForm:!1})}),o.jsx(dt,{children:o.jsx(lt,{onClick:O,disabled:!M||e,extended:C.isExtended,"data-testid":"stChatInputSubmitButton",children:o.jsx(R,{content:ee,size:"xl",color:"inherit"})})})]})})]})}const vt=c.memo(pt);export{vt as default};
@@ -1 +0,0 @@
1
- import{r as l,ai as s,j as e,aj as d,ak as u,aR as c,al as m,am as B}from"./index-BvblFOYP.js";function p(i){const{disabled:n,element:t,widgetMgr:r,fragmentId:o}=i;let a=s.SECONDARY;return t.type==="primary"?a=s.PRIMARY:t.type==="tertiary"&&(a=s.TERTIARY),e.jsx(d,{className:"stButton","data-testid":"stButton",children:e.jsx(u,{help:t.help,containerWidth:!0,children:e.jsx(c,{kind:a,size:m.SMALL,disabled:n,containerWidth:!0,onClick:()=>r.setTriggerValue(t,{fromUi:!0},o),children:e.jsx(B,{icon:t.icon,label:t.label})})})})}const h=l.memo(p);export{h as default};
@@ -1 +0,0 @@
1
- import{r as a,x as r,j as t,c as i,af as c,ag as d,v as l}from"./index-BvblFOYP.js";const m=i("iframe",{target:"e1u6k47s0"})(({theme:e,disableScrolling:n})=>({width:"100%",height:"100%",colorScheme:"normal",border:"none",padding:e.spacing.none,margin:e.spacing.none,overflow:n?"hidden":void 0}),"");function o(e){return l(e)||e===""?void 0:e}function g({element:e}){const n=o(e.src),s=r(n)?void 0:o(e.srcdoc);return t.jsx(m,{className:"stIFrame","data-testid":"stIFrame",allow:d,disableScrolling:!e.scrolling,src:n,srcDoc:s,scrolling:e.scrolling?"auto":"no",sandbox:c,title:"st.iframe",tabIndex:e.tabIndex??void 0})}const f=a.memo(g);export{f as default};
@@ -1 +0,0 @@
1
- import{r as p,m as k,M as T,j as n,b7 as y,b8 as C,aI as S,H as $,aW as L,aJ as w,ap as W,ao as R,b9 as B}from"./index-BvblFOYP.js";import{B as v}from"./useBasicWidgetState-BTyLgyXa-DI96f9E0.js";import{v as H,y as M,T as u}from"./checkbox-CG80fxUD-CavQvTtP.js";import"./FormClearHelper-DtwjWakY-CxfcniD6.js";function j({element:e,disabled:a,widgetMgr:s,fragmentId:c}){const[f,g]=v({getStateFromWidgetMgr:I,getDefaultStateFromProto:V,getCurrStateFromProto:X,updateWidgetMgrState:P,element:e,widgetMgr:s,fragmentId:c}),x=p.useCallback(i=>{g({value:i.target.checked,fromUi:!0})},[g]),t=k(),{colors:o,spacing:h,sizes:r}=t,b=T(t),m=a?o.fadedText40:o.bodyText;return n.jsx(y,{className:"row-widget stCheckbox","data-testid":"stCheckbox",children:n.jsx(H,{checked:f,disabled:a,onChange:x,"aria-label":e.label,checkmarkType:e.type===B.StyleType.TOGGLE?u.toggle:u.default,labelPlacement:M.right,overrides:{Root:{style:({$isFocusVisible:i})=>({marginBottom:h.none,marginTop:h.none,backgroundColor:i?o.darkenedBgMix25:"",display:"flex",alignItems:"start"})},Toggle:{style:({$checked:i})=>{let d=b?o.bgColor:o.bodyText;return a&&(d=b?o.gray70:o.gray90),{width:`calc(${r.checkbox} - ${t.spacing.twoXS})`,height:`calc(${r.checkbox} - ${t.spacing.twoXS})`,transform:i?`translateX(${r.checkbox})`:"",backgroundColor:d,boxShadow:""}}},ToggleTrack:{style:({$checked:i,$isHovered:d})=>{let l=o.fadedText40;return d&&!a&&(l=o.fadedText20),i&&!a&&(l=o.primary),{marginRight:0,marginLeft:0,marginBottom:0,marginTop:t.spacing.twoXS,paddingLeft:t.spacing.threeXS,paddingRight:t.spacing.threeXS,width:`calc(2 * ${r.checkbox})`,minWidth:`calc(2 * ${r.checkbox})`,height:r.checkbox,minHeight:r.checkbox,borderBottomLeftRadius:t.radii.full,borderTopLeftRadius:t.radii.full,borderBottomRightRadius:t.radii.full,borderTopRightRadius:t.radii.full,backgroundColor:l}}},Checkmark:{style:({$isFocusVisible:i,$checked:d})=>{const l=d&&!a?o.primary:o.fadedText40;return{outline:0,width:r.checkbox,height:r.checkbox,marginTop:t.spacing.twoXS,marginLeft:0,marginBottom:0,boxShadow:i&&d?`0 0 0 0.2rem ${R(o.primary,.5)}`:"",borderLeftWidth:r.borderWidth,borderRightWidth:r.borderWidth,borderTopWidth:r.borderWidth,borderBottomWidth:r.borderWidth,borderLeftColor:l,borderRightColor:l,borderTopColor:l,borderBottomColor:l}}},Label:{style:{lineHeight:t.lineHeights.small,paddingLeft:t.spacing.sm,position:"relative",color:m}}},children:n.jsxs(C,{visibility:S(e.labelVisibility?.value),"data-testid":"stWidgetLabel",children:[n.jsx($,{source:e.label,allowHTML:!1,isLabel:!0,largerLabel:!0}),e.help&&n.jsx(L,{color:m,children:n.jsx(w,{content:e.help,placement:W.TOP_RIGHT})})]})})})}function I(e,a){return e.getBoolValue(a)}function V(e){return e.default??null}function X(e){return e.value??null}function P(e,a,s,c){a.setBoolValue(e,s.value,{fromUi:s.fromUi},c)}const U=p.memo(j);export{U as default};
@@ -1 +0,0 @@
1
- import{bR as f,bS as u,bT as a,Z as c}from"./index-BvblFOYP.js";function b(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var o=0;o<t.length;o++){var r=t[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,f(r.key),r)}}function l(e,t,o){return t&&n(e.prototype,t),o&&n(e,o),Object.defineProperty(e,"prototype",{writable:!1}),e}function y(e,t){if(t&&(a(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return c(e)}function i(e){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},i(e)}function s(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}export{i as a,s as b,l,b as p,y};
@@ -1,9 +0,0 @@
1
- import{r as I,aC as Y}from"./index-BvblFOYP.js";import{f as Ie}from"./index-Cb_C2vCk-DrzTyNQF.js";import"./withFullScreenWrapper-DqrJMIkm-BwrYir6f.js";import"./Toolbar-Cc8tCeKL-JHIp2NvW.js";import"./FormClearHelper-DtwjWakY-CxfcniD6.js";import"./sprintf-D5E86llw-6tzWM3a-.js";import"./checkbox-CG80fxUD-CavQvTtP.js";import"./createDownloadLinkElement-CbRjLJ8e-NbV49OP9.js";import"./slicedToArray-D4uL3Bzl-95JmZlNK.js";import"./inherits-CYghrBFU-Cf4k8aUQ.js";import"./createSuper-BlgWzn8_-h1vcwEzv.js";import"./FileDownload.esm-ORp-UC-S-BrsUfuH5.js";const je=Ie("div")({name:"NumberOverlayEditorStyle",class:"gdg-n15fjm3e",propsAsIs:!1});function he(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 H(){}function Be(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(u,l){return u===t[l]})||(t=n,r=e.apply(void 0,n)),r}}function ae(e){return!!(e||"").match(/\d/)}function X(e){return e==null}function Fe(e){return typeof e=="number"&&isNaN(e)}function Se(e){return X(e)||Fe(e)||typeof e=="number"&&!isFinite(e)}function be(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function Me(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 ke(e,t,r){var n=Me(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 We(e){var t=I.useRef(e);t.current=e;var r=I.useRef(function(){for(var n=[],a=arguments.length;a--;)n[a]=arguments[a];return t.current.apply(t,n)});return r.current}function fe(e,t){t===void 0&&(t=!0);var r=e[0]==="-",n=r&&t;e=e.replace("-","");var a=e.split("."),u=a[0],l=a[1]||"";return{beforeDecimal:u,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":"",u=0;u<=t-1;u++)n+=e[u]||a;return n}function de(e,t){return Array(t+1).join(e)}function Ve(e){var t=e+"",r=t[0]==="-"?"-":"";r&&(t=t.substring(1));var n=t.split(/[eE]/g),a=n[0],u=n[1];if(u=Number(u),!u)return r+a;a=a.replace(".","");var l=1+u,g=a.length;return l<0?a="0."+de("0",Math.abs(l))+a:l>=g?a=a+de("0",l-g):a=(a.substring(0,l)||"0")+"."+a.substring(l),r+a}function me(e,t,r){if(["","-"].indexOf(e)!==-1)return e;var n=(e.indexOf(".")!==-1||r)&&t,a=fe(e),u=a.beforeDecimal,l=a.afterDecimal,g=a.hasNegation,h=parseFloat("0."+(l||"0")),S=l.length<=t?"0."+l:h.toFixed(t),p=S.split("."),v=u;u&&Number(p[0])&&(v=u.split("").reverse().reduce(function(O,E,m){return O.length>m?(Number(O[0])+Number(E)).toString()+O.substring(1,O.length):E+O},p[0]));var V=ye(p[1]||"",t,r),b=g?"-":"",c=n?".":"";return""+b+v+c+V}function $(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 we=Be(function(e,t){for(var r=0,n=0,a=e.length,u=t.length;e[r]===t[r]&&r<a;)r++;for(;e[a-1-n]===t[u-1-n]&&u-n>r&&a-n>r;)n++;return{from:{start:r,end:a-n},to:{start:r,end:u-n}}}),Le=function(e,t){var r=Math.min(e.selectionStart,t);return{from:{start:r,end:e.selectionEnd},to:{start:r,end:t}}};function Pe(e,t,r){return Math.min(Math.max(e,t),r)}function ce(e){return Math.max(e.selectionStart,e.selectionEnd)}function Ue(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function _e(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function qe(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,u,l){l===void 0&&(l=qe);var g=a.findIndex(function(K){return K}),h=e.slice(0,g);!t&&!r.startsWith(h)&&(t=h,r=h+r,n=n+h.length);for(var S=r.length,p=e.length,v={},V=new Array(S),b=0;b<S;b++){V[b]=-1;for(var c=0,O=p;c<O;c++){var E=l({currentValue:r,lastValue:t,formattedValue:e,currentValueIndex:b,formattedValueIndex:c});if(E&&v[c]!==!0){V[b]=c,v[c]=!0;break}}}for(var m=n;m<S&&(V[m]===-1||!u(r[m]));)m++;var j=m===S||V[m]===-1?p:V[m];for(m=n-1;m>0&&V[m]===-1;)m--;var B=m===-1||V[m]===-1?0:V[m]+1;return B>j?j:n-B<j-n?B:j}function ge(e,t,r,n){var a=e.length;if(t=Pe(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 He(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 xe(e,t,r,n,a,u){u===void 0&&(u=H);var l=We(function(c,O){var E,m;return Se(c)?(m="",E=""):typeof c=="number"||O?(m=typeof c=="number"?Ve(c):c,E=n(m)):(m=a(c,void 0),E=n(m)),{formattedValue:E,numAsString:m}}),g=I.useState(function(){return l(X(e)?t:e,r)}),h=g[0],S=g[1],p=function(c,O){c.formattedValue!==h.formattedValue&&S({formattedValue:c.formattedValue,numAsString:c.value}),u(c,O)},v=e,V=r;X(e)&&(v=h.numAsString,V=!0);var b=l(v,V);return I.useMemo(function(){S(b)},[b.formattedValue]),[h,p]}function Ze(e){return e.replace(/[^0-9]/g,"")}function Je(e){return e}function $e(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,u=e.getInputRef,l=e.format;l===void 0&&(l=Je);var g=e.removeFormatting;g===void 0&&(g=Ze);var h=e.defaultValue,S=e.valueIsNumericString,p=e.onValueChange,v=e.isAllowed,V=e.onChange;V===void 0&&(V=H);var b=e.onKeyDown;b===void 0&&(b=H);var c=e.onMouseUp;c===void 0&&(c=H);var O=e.onFocus;O===void 0&&(O=H);var E=e.onBlur;E===void 0&&(E=H);var m=e.value,j=e.getCaretBoundary;j===void 0&&(j=He);var B=e.isValidInputCharacter;B===void 0&&(B=ae);var K=e.isCharacterSame,M=he(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),Z=xe(m,h,!!S,l,g,p),L=Z[0],w=L.formattedValue,k=L.numAsString,J=Z[1],W=I.useRef(),U=I.useRef({formattedValue:w,numAsString:k}),_=function(o,i){U.current={formattedValue:o.formattedValue,numAsString:o.value},J(o,i)},z=I.useState(!1),ee=z[0],d=z[1],s=I.useRef(null),x=I.useRef({setCaretTimeout:null,focusTimeout:null});I.useEffect(function(){return d(!0),function(){clearTimeout(x.current.setCaretTimeout),clearTimeout(x.current.focusTimeout)}},[]);var C=l,A=function(o,i){var f=parseFloat(i);return{formattedValue:o,value:i,floatValue:isNaN(f)?void 0:f}},T=function(o,i,f){o.selectionStart===0&&o.selectionEnd===o.value.length||($(o,i),x.current.setCaretTimeout=setTimeout(function(){o.value===f&&o.selectionStart!==i&&$(o,i)},0))},R=function(o,i,f){return ge(o,i,j(o),f)},Q=function(o,i,f){var D=j(i),F=Ge(i,w,o,f,D,B,K);return F=ge(i,F,D),F},oe=function(o){var i=o.formattedValue;i===void 0&&(i="");var f=o.input,D=o.source,F=o.event,N=o.numAsString,y;if(f){var P=o.inputValue||f.value,q=ce(f);f.value=i,y=Q(P,i,q),y!==void 0&&T(f,y,i)}i!==w&&_(A(i,N),{event:F,source:D})};I.useEffect(function(){var o=U.current,i=o.formattedValue,f=o.numAsString;(w!==i||k!==f)&&_(A(w,k),{event:void 0,source:re.props})},[w,k]);var te=s.current?ce(s.current):void 0,ne=typeof window<"u"?I.useLayoutEffect:I.useEffect;ne(function(){var o=s.current;if(w!==U.current.formattedValue&&o){var i=Q(U.current.formattedValue,w,te);o.value=w,T(o,i,w)}},[w]);var ie=function(o,i,f){var D=i.target,F=W.current?Le(W.current,D.selectionEnd):we(w,o),N=Object.assign(Object.assign({},F),{lastValue:w}),y=g(o,N),P=C(y);if(y=g(P,void 0),v&&!v(A(P,y))){var q=i.target,G=ce(q),se=Q(o,w,G);return q.value=w,T(q,se,w),!1}return oe({formattedValue:P,numAsString:y,inputValue:o,event:i,source:f,input:i.target}),!0},le=function(o,i){i===void 0&&(i=0);var f=o.selectionStart,D=o.selectionEnd;W.current={selectionStart:f,selectionEnd:D+i}},Ne=function(o){var i=o.target,f=i.value,D=ie(f,o,re.event);D&&V(o),W.current=void 0},Oe=function(o){var i=o.target,f=o.key,D=i.selectionStart,F=i.selectionEnd,N=i.value;N===void 0&&(N="");var y;f==="ArrowLeft"||f==="Backspace"?y=Math.max(D-1,0):f==="ArrowRight"?y=Math.min(D+1,N.length):f==="Delete"&&(y=D);var P=0;f==="Delete"&&D===F&&(P=1);var q=f==="ArrowLeft"||f==="ArrowRight";if(y===void 0||D!==F&&!q){b(o),le(i,P);return}var G=y;if(q){var se=f==="ArrowLeft"?"left":"right";G=R(N,y,se),G!==y&&o.preventDefault()}else f==="Delete"&&!B(N[y])?G=R(N,y,"right"):f==="Backspace"&&!B(N[y])&&(G=R(N,y,"left"));G!==y&&T(i,G,N),b(o),le(i,P)},Ee=function(o){var i=o.target,f=function(){var D=i.selectionStart,F=i.selectionEnd,N=i.value;if(N===void 0&&(N=""),D===F){var y=R(N,D);y!==D&&T(i,y,N)}};f(),requestAnimationFrame(function(){f()}),c(o),le(i)},Te=function(o){o.persist&&o.persist();var i=o.target,f=o.currentTarget;s.current=i,x.current.focusTimeout=setTimeout(function(){var D=i.selectionStart,F=i.selectionEnd,N=i.value;N===void 0&&(N="");var y=R(N,D);y!==D&&!(D===0&&F===N.length)&&T(i,y,N),O(Object.assign(Object.assign({},o),{currentTarget:f}))},0)},Ce=function(o){s.current=null,clearTimeout(x.current.focusTimeout),clearTimeout(x.current.setCaretTimeout),E(o)},Ae=ee&&Ue()?"numeric":void 0,ve=Object.assign({inputMode:Ae},M,{type:t,value:w,onChange:Ne,onKeyDown:Oe,onMouseUp:Ee,onFocus:Te,onBlur:Ce});if(r==="text")return a?Y.createElement(Y.Fragment,null,a(w,M)||null):Y.createElement("span",Object.assign({},M,{ref:u}),w);if(n){var Re=n;return Y.createElement(Re,Object.assign({},ve,{ref:u}))}return Y.createElement("input",Object.assign({},ve,{ref:u}))}function pe(e,t){var r=t.decimalScale,n=t.fixedDecimalScale,a=t.prefix;a===void 0&&(a="");var u=t.suffix;u===void 0&&(u="");var l=t.allowNegative,g=t.thousandsGroupStyle;if(g===void 0&&(g="thousand"),e===""||e==="-")return e;var h=ue(t),S=h.thousandSeparator,p=h.decimalSeparator,v=r!==0&&e.indexOf(".")!==-1||r&&n,V=fe(e,l),b=V.beforeDecimal,c=V.afterDecimal,O=V.addNegation;return r!==void 0&&(c=ye(c,r,!!n)),S&&(b=ke(b,S,g)),a&&(b=a+b),u&&(c=c+u),O&&(b="-"+b),e=b+(v&&p||"")+c,e}function ue(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 ze(e,t){e===void 0&&(e="");var r=new RegExp("(-)"),n=new RegExp("(-)(.)*(-)"),a=r.test(e),u=n.test(e);return e=e.replace(/-/g,""),a&&!u&&t&&(e="-"+e),e}function Qe(e,t){return new RegExp("(^-)|[0-9]|"+be(e),"g")}function Ye(e,t,r){return e===""?!0:!t?.match(/\d/)&&!r?.match(/\d/)&&typeof e=="string"&&!isNaN(Number(e))}function Xe(e,t,r){var n;t===void 0&&(t=_e(e));var a=r.allowNegative,u=r.prefix;u===void 0&&(u="");var l=r.suffix;l===void 0&&(l="");var g=r.decimalScale,h=t.from,S=t.to,p=S.start,v=S.end,V=ue(r),b=V.allowedDecimalSeparators,c=V.decimalSeparator,O=e[v]===c;if(ae(e)&&(e===u||e===l)&&t.lastValue==="")return e;if(v-p===1&&b.indexOf(e[p])!==-1){var E=g===0?"":c;e=e.substring(0,p)+E+e.substring(p+1,e.length)}var m=function(s,x,C){var A=!1,T=!1;u.startsWith("-")?A=!1:s.startsWith("--")?(A=!1,T=!0):l.startsWith("-")&&s.length===l.length?A=!1:s[0]==="-"&&(A=!0);var R=A?1:0;return T&&(R=2),R&&(s=s.substring(R),x-=R,C-=R),{value:s,start:x,end:C,hasNegation:A}},j=m(e,p,v),B=j.hasNegation;n=j,e=n.value,p=n.start,v=n.end;var K=m(t.lastValue,h.start,h.end),M=K.start,Z=K.end,L=K.value,w=e.substring(p,v);e.length&&L.length&&(M>L.length-l.length||Z<u.length)&&!(w&&l.startsWith(w))&&(e=L);var k=0;e.startsWith(u)?k+=u.length:p<u.length&&(k=p),e=e.substring(k),v-=k;var J=e.length,W=e.length-l.length;e.endsWith(l)?J=W:(v>W||v>e.length-l.length)&&(J=v),e=e.substring(0,J),e=ze(B?"-"+e:e,a),e=(e.match(Qe(c))||[]).join("");var U=e.indexOf(c);e=e.replace(new RegExp(be(c),"g"),function(s,x){return x===U?".":""});var _=fe(e,a),z=_.beforeDecimal,ee=_.afterDecimal,d=_.addNegation;return S.end-S.start<h.end-h.start&&z===""&&O&&!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}),u=e[0]==="-";a.fill(!1,0,r.length+(u?1:0));var l=e.length;return a.fill(!1,l-n.length+1,l+1),a}function tt(e){var t=ue(e),r=t.thousandSeparator,n=t.decimalSeparator,a=e.prefix;a===void 0&&(a="");var u=e.allowNegative;if(u===void 0&&(u=!0),r===n)throw new Error(`
2
- Decimal separator can't be same as thousand separator.
3
- thousandSeparator: `+r+` (thousandSeparator = {true} is same as thousandSeparator = ",")
4
- decimalSeparator: `+n+` (default value for decimalSeparator is .)
5
- `);return a.startsWith("-")&&u&&(console.error(`
6
- Prefix can't start with '-' when allowNegative is true.
7
- prefix: `+a+`
8
- allowNegative: `+u+`
9
- `),u=!1),Object.assign(Object.assign({},e),{allowNegative:u})}function rt(e){e=tt(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var t=e.suffix,r=e.allowNegative,n=e.allowLeadingZeros,a=e.onKeyDown;a===void 0&&(a=H);var u=e.onBlur;u===void 0&&(u=H);var l=e.thousandSeparator,g=e.decimalScale,h=e.fixedDecimalScale,S=e.prefix;S===void 0&&(S="");var p=e.defaultValue,v=e.value,V=e.valueIsNumericString,b=e.onValueChange,c=he(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),O=ue(e),E=O.decimalSeparator,m=O.allowedDecimalSeparators,j=function(d){return pe(d,e)},B=function(d,s){return Xe(d,s,e)},K=X(v)?p:v,M=V??Ye(K,S,t);X(v)?X(p)||(M=M||typeof p=="number"):M=M||typeof v=="number";var Z=function(d){return Se(d)?d:(typeof d=="number"&&(d=Ve(d)),M&&typeof g=="number"?me(d,g,!!h):d)},L=xe(Z(v),Z(p),!!M,j,B,b),w=L[0],k=w.numAsString,J=w.formattedValue,W=L[1],U=function(d){var s=d.target,x=d.key,C=s.selectionStart,A=s.selectionEnd,T=s.value;if(T===void 0&&(T=""),(x==="Backspace"||x==="Delete")&&A<S.length){d.preventDefault();return}if(C!==A){a(d);return}x==="Backspace"&&T[0]==="-"&&C===S.length+1&&r&&$(s,1),g&&h&&(x==="Backspace"&&T[C-1]===E?($(s,C-1),d.preventDefault()):x==="Delete"&&T[C]===E&&d.preventDefault()),m?.includes(x)&&T[C]===E&&$(s,C+1);var R=l===!0?",":l;x==="Backspace"&&T[C-1]===R&&$(s,C-1),x==="Delete"&&T[C]===R&&$(s,C+1),a(d)},_=function(d){var s=k;if(s.match(/\d/g)||(s=""),n||(s=Ke(s)),h&&g&&(s=me(s,g,h)),s!==k){var x=pe(s,e);W({formattedValue:x,value:s,floatValue:parseFloat(s)},{event:d,source:re.event})}u(d)},z=function(d){return d===E?!0:ae(d)},ee=function(d){var s=d.currentValue,x=d.lastValue,C=d.formattedValue,A=d.currentValueIndex,T=d.formattedValueIndex,R=s[A],Q=C[T],oe=we(x,s),te=oe.to,ne=function(ie){return B(ie).indexOf(".")+S.length};return v===0&&h&&g&&s[te.start]===E&&ne(s)<A&&ne(C)>T?!1:A>=te.start&&A<te.end&&m&&m.includes(R)&&Q===E?!0:R===Q};return Object.assign(Object.assign({},c),{value:J,valueIsNumericString:!1,isValidInputCharacter:z,isCharacterSame:ee,onValueChange:W,format:j,removeFormatting:B,getCaretBoundary:function(d){return et(d,e)},onKeyDown:U,onBlur:_})}function at(e){var t=rt(e);return Y.createElement($e,Object.assign({},t))}function De(){return Intl.NumberFormat()?.formatToParts(1.1)?.find(e=>e.type==="decimal")?.value??"."}function nt(){return De()==="."?",":"."}const ht=e=>{const{value:t,onChange:r,disabled:n,highlight:a,validatedSelection:u,fixedDecimals:l,allowNegative:g,thousandSeparator:h,decimalSeparator:S}=e,p=I.useRef();return I.useLayoutEffect(()=>{if(u!==void 0){const v=typeof u=="number"?[u,null]:u;p.current?.setSelectionRange(v[0],v[1])}},[u]),I.createElement(je,null,I.createElement(at,{autoFocus:!0,getInputRef:p,className:"gdg-input",onFocus:v=>v.target.setSelectionRange(a?0:v.target.value.length,v.target.value.length),disabled:n===!0,decimalScale:l,allowNegative:g,thousandSeparator:h??nt(),decimalSeparator:S??De(),value:Object.is(t,-0)?"-":t??"",onValueChange:r}))};export{ht as default};
@@ -1,2 +0,0 @@
1
- import{r as a,E as m,_ as p,a0 as y}from"./index-BvblFOYP.js";var d=a.forwardRef(function(r,e){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return a.createElement(m,p({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},r,{ref:e}),a.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),a.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"}))});d.displayName="Close";function h(r){if(Array.isArray(r))return r}function b(r,e){var t=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(t!=null){var i,u,c,o,l=[],n=!0,f=!1;try{if(c=(t=t.call(r)).next,e===0){if(Object(t)!==t)return;n=!1}else for(;!(n=(i=c.call(t)).done)&&(l.push(i.value),l.length!==e);n=!0);}catch(s){f=!0,u=s}finally{try{if(!n&&t.return!=null&&(o=t.return(),Object(o)!==o))return}finally{if(f)throw u}}return l}}function v(){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 E(r,e){return h(r)||b(r,e)||y(r,e)||v()}export{E as _,d as p};
@@ -1 +0,0 @@
1
- import{X as i,c6 as f}from"./index-BvblFOYP.js";var r,t;function s(){if(t)return r;t=1;var n=f(),e=0;function o(a){var u=++e;return n(a)+u}return r=o,r}var c=s();const m=i(c);export{m as I};
@@ -1 +0,0 @@
1
- import{aE as f,j as c,r as n,m as p,f as h,c as x,L as g,aF as y}from"./index-BvblFOYP.js";const m=n.createContext(null);m.displayName="ElementFullscreenContext";const C=x("div",{target:"elp1w7k0"})(({theme:e,isExpanded:t})=>({width:"100%",height:"100%",...t?{position:"fixed",top:0,left:0,bottom:0,right:0,background:e.colors.bgColor,zIndex:e.zIndices.fullscreenWrapper,padding:e.spacing.md,paddingTop:e.sizes.fullScreenHeaderHeight,overflow:"auto",display:"flex",alignItems:"center",justifyContent:"center"}:{}}),""),v=()=>{const{setFullScreen:e}=n.useContext(g),[t,s]=n.useState(!1),{fullHeight:d,fullWidth:i}=y(),o=n.useCallback(l=>{s(l),e(l)},[e]),r=n.useCallback(()=>{document.body.style.overflow="hidden",o(!0)},[o]),a=n.useCallback(()=>{document.body.style.overflow="unset",o(!1)},[o]),u=n.useCallback(l=>{l.keyCode===27&&t&&a()},[a,t]);return n.useEffect(()=>(document.addEventListener("keydown",u,!1),()=>{document.removeEventListener("keydown",u,!1)}),[u]),n.useMemo(()=>({expanded:t,zoomIn:r,zoomOut:a,fullHeight:d,fullWidth:i}),[t,r,a,d,i])},w=({children:e})=>{const t=p(),{expanded:s,fullHeight:d,fullWidth:i,zoomIn:o,zoomOut:r}=v(),{width:a,elementRef:u}=h(),l=n.useMemo(()=>({width:s?i:a,height:s?d:void 0,expanded:s,expand:o,collapse:r}),[s,d,i,a,o,r]);return c.jsx(m.Provider,{value:l,children:c.jsx(C,{ref:u,isExpanded:s,"data-testid":"stFullScreenFrame",theme:t,children:e})})};function E(e){const t=s=>c.jsx(w,{children:c.jsx(e,{...s})});return t.displayName=`withFullScreenWrapper(${e.displayName||e.name})`,f(t,e)}export{m as d,E as v};