@stlite/desktop 0.76.3 → 0.77.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 (72) hide show
  1. package/build/assets/{FileDownload.esm-BIJCW18t.js → FileDownload.esm-DJiSKkNf.js} +1 -1
  2. package/build/assets/{FormClearHelper-9eaBETaU.js → FormClearHelper-Dhc_r76k.js} +1 -1
  3. package/build/assets/{Hooks-BNfoYvra.js → Hooks-DrFfRfR6.js} +1 -1
  4. package/build/assets/{InputInstructions-C-ODKekf.js → InputInstructions-DBmZV4qq.js} +1 -1
  5. package/build/assets/{ProgressBar-556DCe2G.js → ProgressBar-D8toyv14.js} +1 -1
  6. package/build/assets/{RenderInPortalIfExists-CUkPZKNv.js → RenderInPortalIfExists-BgiI3__B.js} +1 -1
  7. package/build/assets/{Toolbar-CTzbm8jh.js → Toolbar-BTpOoeAP.js} +1 -1
  8. package/build/assets/{base-input-Dtkz4-6L.js → base-input-BNFPjj94.js} +1 -1
  9. package/build/assets/{createSuper-DEEzb3jl.js → createSuper-D-IHZlzE.js} +1 -1
  10. package/build/assets/{data-grid-overlay-editor-DPoQdFTw.js → data-grid-overlay-editor-3T3wOgR5.js} +1 -1
  11. package/build/assets/{downloader-ByyRLqH8.js → downloader-BRNWhhPt.js} +1 -1
  12. package/build/assets/{es6-DuFilFNR.js → es6-BGfGTfFo.js} +2 -2
  13. package/build/assets/{getPrototypeOf-CddPd8GH.js → getPrototypeOf-Bfvf6jYJ.js} +1 -1
  14. package/build/assets/{iframeResizer.contentWindow-WXhkpkLh.js → iframeResizer.contentWindow-CAd9E7Yv.js} +1 -1
  15. package/build/assets/{index-C6_T4XU6.js → index-14giYAR7.js} +1 -1
  16. package/build/assets/{index-CLyeNt_C.js → index-2GihT9MS.js} +1 -1
  17. package/build/assets/{index-DDdOpIWs.js → index-BCXIPEnn.js} +1 -1
  18. package/build/assets/{index-Bi-U93sQ.js → index-BbkQg7FB.js} +1 -1
  19. package/build/assets/{index-DjD7cT7O.js → index-Bf8NyENV.js} +1 -1
  20. package/build/assets/{index-TIt04xnQ.js → index-BgM3jrky.js} +1 -1
  21. package/build/assets/{index-BYNFhnUr.js → index-BkQMwfmi.js} +1 -1
  22. package/build/assets/{index-C3tRfgPv.js → index-BzdmnoFw.js} +1 -1
  23. package/build/assets/{index-DNTxN24q.js → index-C1nS5RIf.js} +1 -1
  24. package/build/assets/{index-m3gyit8Q.js → index-CCQ8WBbz.js} +1 -1
  25. package/build/assets/{index-BVYH87rb.js → index-CRU3QRmk.js} +1 -1
  26. package/build/assets/{index-BM1ZT3Ff.js → index-CSeZQPbV.js} +1 -1
  27. package/build/assets/{index-CHFwO0AW.js → index-CWQIbxk6.js} +1 -1
  28. package/build/assets/{index-CBHc7z3n.js → index-CeMslFeR.js} +1 -1
  29. package/build/assets/{index-MeAdQQio.js → index-CqPAWIlG.js} +1 -1
  30. package/build/assets/{index-y4Hom3N9.js → index-CzMG-04F.js} +1 -1
  31. package/build/assets/{index-CpMQR4wM.js → index-D20xuISa.js} +1 -1
  32. package/build/assets/{index-BcOJcuIY.js → index-DEAAmCoL.js} +1 -1
  33. package/build/assets/{index-DegiiTk-.js → index-DGyUD6Fc.js} +1 -1
  34. package/build/assets/{index-CEvXUeud.js → index-DLzppoKu.js} +1 -1
  35. package/build/assets/{index-De3JC6IK.js → index-DS1KzaKA.js} +1 -1
  36. package/build/assets/{index-Dk9XWjMr.js → index-DSp2Cc2a.js} +1 -1
  37. package/build/assets/{index-Q8BeOtD9.js → index-DVBTaPM3.js} +5 -5
  38. package/build/assets/{index-HPV1LTrz.js → index-DWl7GYN1.js} +1 -1
  39. package/build/assets/{index-V2cMT1WJ.js → index-DXhp4_Bh.js} +1 -1
  40. package/build/assets/{index-BhoRIEB3.js → index-Dd4zWSqM.js} +1 -1
  41. package/build/assets/{index-DTaHLfXk.js → index-DlrQfTa3.js} +1 -1
  42. package/build/assets/{index-CpjZwpIx.js → index-DpQaX_zS.js} +1 -1
  43. package/build/assets/{index-Cq7Gc9v7.js → index-DtCnxC7q.js} +1 -1
  44. package/build/assets/{index-CoFiEMgW.js → index-DvDmgZ7F.js} +1 -1
  45. package/build/assets/{index-B7jeBG3I.js → index-DwF2Kd5G.js} +1 -1
  46. package/build/assets/{index-PUIfv8RQ.js → index-IG3UXYla.js} +1 -1
  47. package/build/assets/{index-xBvoLAr1.js → index-R99zJVpL.js} +1 -1
  48. package/build/assets/{index-D_klJm3B.js → index-c-P5wgpW.js} +1 -1
  49. package/build/assets/{index-BjuVmbek.js → index-hfjIuaWS.js} +1 -1
  50. package/build/assets/{index-B-xJO1Ho.js → index-lyJc68Dt.js} +4 -4
  51. package/build/assets/{index-ChjuSLOe.js → index-uFJhQ6op.js} +1 -1
  52. package/build/assets/{input-CR_-e9gB.js → input-B0OfG1Hd.js} +1 -1
  53. package/build/assets/{memory-VreDnN7X.js → memory-Db7tbqiS.js} +1 -1
  54. package/build/assets/{number-overlay-editor-BRKoTj3K.js → number-overlay-editor-DNvGPhC6.js} +1 -1
  55. package/build/assets/{sandbox-BESdsCEV.js → sandbox-0hHf-j9y.js} +1 -1
  56. package/build/assets/{slicedToArray-DFtVT9Ta.js → slicedToArray-C3Kk8BEP.js} +1 -1
  57. package/build/assets/{textarea-zpR5l8uh.js → textarea-DjoYY0dF.js} +1 -1
  58. package/build/assets/{timepicker-CBUeK5RX.js → timepicker-Cn0ZGw9I.js} +1 -1
  59. package/build/assets/{uniqueId-DHqXS3LS.js → uniqueId-K4UOiJl2.js} +1 -1
  60. package/build/assets/{useBasicWidgetState-H1nJNjQy.js → useBasicWidgetState-BzSjsdCt.js} +1 -1
  61. package/build/assets/{useOnInputChange-D46JoCXj.js → useOnInputChange-VVCu-n8v.js} +1 -1
  62. package/build/assets/{withFullScreenWrapper--g6uY0Wf.js → withFullScreenWrapper-BggmGF09.js} +1 -1
  63. package/build/assets/{worker-DzcNcnW5.js → worker-DddKT6_v.js} +1 -1
  64. package/build/electron/worker.js +3 -3
  65. package/build/index.html +1 -1
  66. package/build/pyodide/pyodide-lock.json +1 -1
  67. package/build/pyodide/pyodide.asm.js +1 -1
  68. package/build/pyodide/pyodide.asm.wasm +0 -0
  69. package/build/pyodide/pyodide.mjs +3 -3
  70. package/build/pyodide/python_stdlib.zip +0 -0
  71. package/package.json +6 -6
  72. package/wheels/streamlit-1.41.0-cp312-none-any.whl +0 -0
@@ -1,2 +1,2 @@
1
- import{b2 as q,r as f,b3 as H,b4 as J,M as Q,b5 as l,j as d,a_ as Y,a$ as Z,b6 as ee,b7 as te,b0 as re,aK as ne,aX as oe,aG as _,aF as U,al as ie,a2 as ae}from"./index-B-xJO1Ho.js";import{a as ce}from"./useBasicWidgetState-H1nJNjQy.js";import"./FormClearHelper-9eaBETaU.js";var le={primary:"primary",secondary:"secondary",tertiary:"tertiary"},A={default:"default",pill:"pill",round:"round",circle:"circle",square:"square"},ue={mini:"mini",default:"default",compact:"compact",large:"large"},R=Object.freeze({radio:"radio",checkbox:"checkbox"}),T=q("div",function(e){var t=e.$shape,r=e.$length,n=e.$theme,o=r===1?void 0:t!==A.default?"-".concat(n.sizing.scale100):"-0.5px";return{display:"flex",marginLeft:o,marginRight:o}});T.displayName="StyledRoot",T.displayName="StyledRoot";function G(e){"@babel/helpers - typeof";return G=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},G(e)}function 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 V(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 se(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?V(Object(r),!0).forEach(function(n){N(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):V(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function fe(e,t){return be(e)||ye(e,t)||de(e,t)||pe()}function pe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{b2 as q,r as f,b3 as H,b4 as J,M as Q,b5 as l,j as d,a_ as Y,a$ as Z,b6 as ee,b7 as te,b0 as re,aK as ne,aX as oe,aG as _,aF as U,al as ie,a2 as ae}from"./index-lyJc68Dt.js";import{a as ce}from"./useBasicWidgetState-BzSjsdCt.js";import"./FormClearHelper-Dhc_r76k.js";var le={primary:"primary",secondary:"secondary",tertiary:"tertiary"},A={default:"default",pill:"pill",round:"round",circle:"circle",square:"square"},ue={mini:"mini",default:"default",compact:"compact",large:"large"},R=Object.freeze({radio:"radio",checkbox:"checkbox"}),T=q("div",function(e){var t=e.$shape,r=e.$length,n=e.$theme,o=r===1?void 0:t!==A.default?"-".concat(n.sizing.scale100):"-0.5px";return{display:"flex",marginLeft:o,marginRight:o}});T.displayName="StyledRoot",T.displayName="StyledRoot";function G(e){"@babel/helpers - typeof";return G=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},G(e)}function 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 V(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 se(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?V(Object(r),!0).forEach(function(n){N(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):V(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function fe(e,t){return be(e)||ye(e,t)||de(e,t)||pe()}function pe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function de(e,t){if(e){if(typeof e=="string")return X(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 X(e,t)}}function X(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 ye(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(s){i=!0,u=s}finally{try{!o&&r.return!=null&&r.return()}finally{if(i)throw u}}return n}}function be(e){if(Array.isArray(e))return e}function me(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function he(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 ge(e,t,r){return he(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Se(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&&B(e,t)}function B(e,t){return B=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},B(e,t)}function ve(e){var t=Ee();return function(){var r=P(e),n;if(t){var o=P(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Oe(this,n)}}function Oe(e,t){if(t&&(G(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return 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 Ee(){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(t){return t.__proto__||Object.getPrototypeOf(t)},P(e)}function N(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function we(e,t){return!Array.isArray(e)&&typeof e!="number"?!1:Array.isArray(e)?e.includes(t):e===t}var W=function(e){Se(r,e);var t=ve(r);function r(){var n;me(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)),N(F(n),"childRefs",{}),n}return ge(r,[{key:"render",value:function(){var n=this,o=this.props,i=o.overrides,a=i===void 0?{}:i,u=o.mode,s=u===void 0?R.checkbox:u,m=o.children,y=o.selected,g=o.disabled,p=o.onClick,b=o.kind,S=o.shape,x=o.size,w=H(a.Root,T),k=fe(w,2),j=k[0],E=k[1],L=this.props["aria-label"]||this.props.ariaLabel,v=s===R.radio,$=f.Children.count(m);return f.createElement(J.Consumer,null,function(K){return f.createElement(j,z({"aria-label":L||K.buttongroup.ariaLabel,"data-baseweb":"button-group",role:v?"radiogroup":"group",$shape:S,$length:m.length},E),f.Children.map(m,function(h,C){if(!f.isValidElement(h))return null;var D=h.props.isSelected?h.props.isSelected:we(y,C);return v&&(n.childRefs[C]=f.createRef()),f.cloneElement(h,{disabled:g||h.props.disabled,isSelected:D,ref:v?n.childRefs[C]:void 0,tabIndex:!v||D||v&&(!y||y===-1)&&C===0?0:-1,onKeyDown:function(c){if(v){var O=Number(y)?Number(y):0;if(c.key==="ArrowUp"||c.key==="ArrowLeft"){c.preventDefault&&c.preventDefault();var I=O-1<0?$-1:O-1;p&&p(c,I),n.childRefs[I].current&&n.childRefs[I].current.focus()}if(c.key==="ArrowDown"||c.key==="ArrowRight"){c.preventDefault&&c.preventDefault();var M=O+1>$-1?0:O+1;p&&p(c,M),n.childRefs[M].current&&n.childRefs[M].current.focus()}}},kind:b,onClick:function(c){g||(h.props.onClick&&h.props.onClick(c),p&&p(c,C))},shape:S,size:x,overrides:se({BaseButton:{style:function(c){var O=c.$theme;return m.length===1?{}:S!==A.default?{marginLeft:O.sizing.scale100,marginRight:O.sizing.scale100}:{marginLeft:"0.5px",marginRight:"0.5px"}},props:{"aria-checked":D,role:v?"radio":"checkbox"}}},h.props.overrides)})}))})}}]),r}(f.Component);N(W,"defaultProps",{disabled:!1,onClick:function(){},shape:A.default,size:ue.default,kind:le.secondary});function je(e,t){return t.includes(e)?t.filter(r=>r!==e):[...t,e]}function Le(e,t,r){return e==l.ClickMode.MULTI_SELECT?je(t,r??[]):r!=null&&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 Re(e,t,r){const n=r===l.Style.PILLS?_.PILLS:r===l.Style.BORDERLESS?_.BORDERLESS_ICON:_.SEGMENTED_CONTROL,o=r===l.Style.BORDERLESS?U.XSMALL:U.MEDIUM,i=r===l.Style.BORDERLESS?"lg":"base";return{element:d.jsxs(d.Fragment,{children:[t&&d.jsx(ie,{size:i,iconValue:t}),e&&d.jsx(ae,{source:e,allowHTML:!1})]}),kind:n,size:o}}function Pe(e,t,r,n){return r.indexOf(n)>-1?!0:t!==l.ClickMode.SINGLE_SELECT||e!==l.SelectionVisualization.ALL_UP_TO_SELECTED?!1:r.length>0&&n<r[0]}function xe(e,t){return e&&(t=`${t}Active`),t}function De(e,t){const r={flexWrap:"wrap",maxWidth:"fit-content"};switch(e){case l.Style.BORDERLESS:return{...r,columnGap:t.threeXS,rowGap:t.threeXS};case l.Style.PILLS:return{...r,columnGap:t.twoXS,rowGap:t.twoXS};case l.Style.SEGMENTED_CONTROL:return{...r,columnGap:t.none,rowGap:t.twoXS,"::after":{content:"''",flex:1e4}};default:return r}}function Ie(e,t,r,n,o,i){const a=Pe(r,n,o,t);let u=e.content,s=e.contentIcon;return a&&(u=e.selectedContent?e.selectedContent:u,s=e.selectedContentIcon?e.selectedContentIcon:s),f.forwardRef(function(m,y){const{element:g,kind:p,size:b}=Re(u??"",s??void 0,i),S=xe(!!(a&&!e.selectedContent&&!e.selectedContentIcon),p);return d.jsx(oe,{...m,size:b,kind:S,children:g})})}function Me(e,t){return e.getIntArrayValue(t)}function _e(e){return e.default??null}function Ae(e){return e.value??null}function Te(e){const{disabled:t,element:r,fragmentId:n,widgetMgr:o}=e,{clickMode:i,options:a,selectionVisualization:u,style:s,label:m,labelVisibility:y,help:g}=r,p=Q(),[b,S]=ce({getStateFromWidgetMgr:Me,getDefaultStateFromProto:_e,getCurrStateFromProto:Ae,updateWidgetMgrState:ke,element:r,widgetMgr:o,fragmentId:n}),x=(j,E)=>{const L=Le(i,E,b);S({value:L,fromUi:!0})};let w;i===l.ClickMode.SINGLE_SELECT?w=R.radio:i===l.ClickMode.MULTI_SELECT&&(w=R.checkbox);const k=f.useMemo(()=>a.map((j,E)=>{const L=Ie(j,E,u,i,b,s);return d.jsx(L,{},`${j.content}-${E}`)}),[i,a,u,s,b]);return d.jsxs("div",{className:"stButtonGroup","data-testid":"stButtonGroup",children:[d.jsx(Y,{label:m,disabled:t,labelVisibility:Z((y==null?void 0:y.value)??ee.LabelVisibilityOptions.COLLAPSED),children:g&&d.jsx(te,{children:d.jsx(re,{content:g,placement:ne.TOP})})}),d.jsx(W,{disabled:t,mode:w,onClick:x,selected:i===l.ClickMode.MULTI_SELECT?b:Ce(b),overrides:{Root:{style:f.useCallback(()=>De(s,p.spacing),[s,p.spacing])}},children:k})]})}const Ge=f.memo(Te);export{Ge as default};
@@ -1,4 +1,4 @@
1
- import{b2 as w,r as p,bd as ne,be as x,bf as R,M as ae,a5 as le,j as F,bg as ce,bh as se,Q as de,bi as ue,a$ as ge,a2 as be,b7 as pe,b0 as he,aK as me}from"./index-B-xJO1Ho.js";import{a as fe}from"./useBasicWidgetState-H1nJNjQy.js";import"./FormClearHelper-9eaBETaU.js";var T=Object.freeze({default:"default",toggle:"toggle",toggle_round:"toggle"}),ve=Object.freeze({top:"top",right:"right",bottom:"bottom",left:"left"});function X(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(c){return Object.getOwnPropertyDescriptor(e,c).enumerable})),r.push.apply(r,o)}return r}function j(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?X(Object(r),!0).forEach(function(o){q(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):X(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function q(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ye(e){var t=e.$disabled,r=e.$checked,o=e.$error,c=e.$isIndeterminate,n=e.$theme,a=e.$isFocusVisible,l=n.colors;return t?l.tickFillDisabled:r||c?"transparent":o?l.borderNegative:a?l.borderSelected:l.tickBorder}function ke(e){var t=e.$labelPlacement,r=t===void 0?"":t,o=e.$theme,c=o.sizing,n=c.scale300,a;switch(r){case"top":a="Bottom";break;case"bottom":a="Top";break;case"left":a="Right";break;default:case"right":a="Left";break}return o.direction==="rtl"&&a==="Left"?a="Right":o.direction==="rtl"&&a==="Right"&&(a="Left"),q({},"padding".concat(a),n)}function $e(e){var t=e.$disabled,r=e.$checked,o=e.$isIndeterminate,c=e.$error,n=e.$isHovered,a=e.$isActive,l=e.$theme,i=l.colors;return t?r||o?i.tickFillDisabled:i.tickFill:c&&(o||r)?a?i.tickFillErrorSelectedHoverActive:n?i.tickFillErrorSelectedHover:i.tickFillErrorSelected:c?a?i.tickFillErrorHoverActive:n?i.tickFillErrorHover:i.tickFillError:o||r?a?i.tickFillSelectedHoverActive:n?i.tickFillSelectedHover:i.tickFillSelected:a?i.tickFillActive:n?i.tickFillHover:i.tickFill}function we(e){var t=e.$disabled,r=e.$theme,o=r.colors;return t?o.contentSecondary:o.contentPrimary}var C=w("label",function(e){var t=e.$disabled,r=e.$labelPlacement;return{flexDirection:r==="top"||r==="bottom"?"column":"row",display:"flex",alignItems:r==="top"||r==="bottom"?"center":"flex-start",cursor:t?"not-allowed":"pointer",userSelect:"none"}});C.displayName="Root",C.displayName="Root";var M=w("span",function(e){var t=e.$checked,r=e.$disabled,o=e.$error,c=e.$isIndeterminate,n=e.$theme,a=e.$isFocusVisible,l=n.sizing,i=n.animation,s=r?n.colors.tickMarkFillDisabled:o?n.colors.tickMarkFillError:n.colors.tickMarkFill,k=encodeURIComponent(`
1
+ import{b2 as w,r as p,bd as ne,be as x,bf as R,M as ae,a5 as le,j as F,bg as ce,bh as se,Q as de,bi as ue,a$ as ge,a2 as be,b7 as pe,b0 as he,aK as me}from"./index-lyJc68Dt.js";import{a as fe}from"./useBasicWidgetState-BzSjsdCt.js";import"./FormClearHelper-Dhc_r76k.js";var T=Object.freeze({default:"default",toggle:"toggle",toggle_round:"toggle"}),ve=Object.freeze({top:"top",right:"right",bottom:"bottom",left:"left"});function X(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(c){return Object.getOwnPropertyDescriptor(e,c).enumerable})),r.push.apply(r,o)}return r}function j(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?X(Object(r),!0).forEach(function(o){q(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):X(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function q(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ye(e){var t=e.$disabled,r=e.$checked,o=e.$error,c=e.$isIndeterminate,n=e.$theme,a=e.$isFocusVisible,l=n.colors;return t?l.tickFillDisabled:r||c?"transparent":o?l.borderNegative:a?l.borderSelected:l.tickBorder}function ke(e){var t=e.$labelPlacement,r=t===void 0?"":t,o=e.$theme,c=o.sizing,n=c.scale300,a;switch(r){case"top":a="Bottom";break;case"bottom":a="Top";break;case"left":a="Right";break;default:case"right":a="Left";break}return o.direction==="rtl"&&a==="Left"?a="Right":o.direction==="rtl"&&a==="Right"&&(a="Left"),q({},"padding".concat(a),n)}function $e(e){var t=e.$disabled,r=e.$checked,o=e.$isIndeterminate,c=e.$error,n=e.$isHovered,a=e.$isActive,l=e.$theme,i=l.colors;return t?r||o?i.tickFillDisabled:i.tickFill:c&&(o||r)?a?i.tickFillErrorSelectedHoverActive:n?i.tickFillErrorSelectedHover:i.tickFillErrorSelected:c?a?i.tickFillErrorHoverActive:n?i.tickFillErrorHover:i.tickFillError:o||r?a?i.tickFillSelectedHoverActive:n?i.tickFillSelectedHover:i.tickFillSelected:a?i.tickFillActive:n?i.tickFillHover:i.tickFill}function we(e){var t=e.$disabled,r=e.$theme,o=r.colors;return t?o.contentSecondary:o.contentPrimary}var C=w("label",function(e){var t=e.$disabled,r=e.$labelPlacement;return{flexDirection:r==="top"||r==="bottom"?"column":"row",display:"flex",alignItems:r==="top"||r==="bottom"?"center":"flex-start",cursor:t?"not-allowed":"pointer",userSelect:"none"}});C.displayName="Root",C.displayName="Root";var M=w("span",function(e){var t=e.$checked,r=e.$disabled,o=e.$error,c=e.$isIndeterminate,n=e.$theme,a=e.$isFocusVisible,l=n.sizing,i=n.animation,s=r?n.colors.tickMarkFillDisabled:o?n.colors.tickMarkFillError:n.colors.tickMarkFill,k=encodeURIComponent(`
2
2
  <svg width="14" height="4" viewBox="0 0 14 4" fill="none" xmlns="http://www.w3.org/2000/svg">
3
3
  <path d="M14 0.5H0V3.5H14V0.5Z" fill="`.concat(s,`"/>
4
4
  </svg>
@@ -1 +1 @@
1
- import{c as V,r as i,M as k,bZ as x,j as s,a_ as z,a$ as P,bc as D,b0 as E,aK as H,b$ as M}from"./index-B-xJO1Ho.js";import{u as U}from"./uniqueId-DHqXS3LS.js";import{u as _,a as B,b as L}from"./useOnInputChange-D46JoCXj.js";import{a as K}from"./useBasicWidgetState-H1nJNjQy.js";import{I as O}from"./InputInstructions-C-ODKekf.js";import{I as $}from"./input-CR_-e9gB.js";import"./inputUtils-CptNuJwn.js";import"./FormClearHelper-9eaBETaU.js";import"./base-input-Dtkz4-6L.js";const A=V("div",{target:"e11y4ecf0"})(({width:t})=>({position:"relative",width:t}),"");function G({disabled:t,element:e,widgetMgr:r,width:d,fragmentId:h}){var b;const[l,n]=i.useState(I(r,e)??null),[o,u]=i.useState(!1),S=i.useCallback(()=>{n(e.default??null),u(!0)},[e.default]),[W,m]=K({getStateFromWidgetMgr:I,getDefaultStateFromProto:N,getCurrStateFromProto:Z,updateWidgetMgrState:q,element:e,widgetMgr:r,fragmentId:h,onFormCleared:S});_(W,l,n,o);const[y,g]=i.useState(!1),a=k(),[c]=i.useState(()=>U("text_input_")),{placeholder:C,formId:f}=e,p=i.useCallback(()=>{u(!1),m({value:l,fromUi:!0})},[l,m]),T=x({formId:f})?r.allowFormEnterToSubmit(f):o,v=y&&d>a.breakpoints.hideWidgetDetails,w=i.useCallback(()=>{o&&p(),g(!1)},[o,p]),F=i.useCallback(()=>{g(!0)},[]),j=B({formId:e.formId,maxChars:e.maxChars,setDirty:u,setUiValue:n,setValueWithSource:m}),R=L(e.formId,p,o,r,h);return s.jsxs(A,{className:"stTextInput","data-testid":"stTextInput",width:d,children:[s.jsx(z,{label:e.label,disabled:t,labelVisibility:P((b=e.labelVisibility)==null?void 0:b.value),htmlFor:c,children:e.help&&s.jsx(D,{children:s.jsx(E,{content:e.help,placement:H.TOP_RIGHT})})}),s.jsx($,{value:l??"",placeholder:C,onBlur:w,onFocus:F,onChange:j,onKeyPress:R,"aria-label":e.label,disabled:t,id:c,type:J(e),autoComplete:e.autocomplete,overrides:{Input:{style:{minWidth:0,"::placeholder":{opacity:"0.7"},lineHeight:a.lineHeights.inputWidget,paddingRight:a.spacing.sm,paddingLeft:a.spacing.sm,paddingBottom:a.spacing.sm,paddingTop:a.spacing.sm}},Root:{props:{"data-testid":"stTextInputRootElement"},style:{height:a.sizes.minElementHeight,borderLeftWidth:a.sizes.borderWidth,borderRightWidth:a.sizes.borderWidth,borderTopWidth:a.sizes.borderWidth,borderBottomWidth:a.sizes.borderWidth}}}}),v&&s.jsx(O,{dirty:o,value:l??"",maxLength:e.maxChars,inForm:x({formId:e.formId}),allowEnterToSubmit:T})]})}function I(t,e){return t.getStringValue(e)??null}function N(t){return t.default??null}function Z(t){return t.value??null}function q(t,e,r,d){e.setStringValue(t,r.value,{fromUi:r.fromUi},d)}function J(t){return t.type===M.Type.PASSWORD?"password":"text"}export{G as default};
1
+ import{c as V,r as i,M as k,bZ as x,j as s,a_ as z,a$ as P,bc as D,b0 as E,aK as H,b$ as M}from"./index-lyJc68Dt.js";import{u as U}from"./uniqueId-K4UOiJl2.js";import{u as _,a as B,b as L}from"./useOnInputChange-VVCu-n8v.js";import{a as K}from"./useBasicWidgetState-BzSjsdCt.js";import{I as O}from"./InputInstructions-DBmZV4qq.js";import{I as $}from"./input-B0OfG1Hd.js";import"./inputUtils-CptNuJwn.js";import"./FormClearHelper-Dhc_r76k.js";import"./base-input-BNFPjj94.js";const A=V("div",{target:"e11y4ecf0"})(({width:t})=>({position:"relative",width:t}),"");function G({disabled:t,element:e,widgetMgr:r,width:d,fragmentId:h}){var b;const[l,n]=i.useState(I(r,e)??null),[o,u]=i.useState(!1),S=i.useCallback(()=>{n(e.default??null),u(!0)},[e.default]),[W,m]=K({getStateFromWidgetMgr:I,getDefaultStateFromProto:N,getCurrStateFromProto:Z,updateWidgetMgrState:q,element:e,widgetMgr:r,fragmentId:h,onFormCleared:S});_(W,l,n,o);const[y,g]=i.useState(!1),a=k(),[c]=i.useState(()=>U("text_input_")),{placeholder:C,formId:f}=e,p=i.useCallback(()=>{u(!1),m({value:l,fromUi:!0})},[l,m]),T=x({formId:f})?r.allowFormEnterToSubmit(f):o,v=y&&d>a.breakpoints.hideWidgetDetails,w=i.useCallback(()=>{o&&p(),g(!1)},[o,p]),F=i.useCallback(()=>{g(!0)},[]),j=B({formId:e.formId,maxChars:e.maxChars,setDirty:u,setUiValue:n,setValueWithSource:m}),R=L(e.formId,p,o,r,h);return s.jsxs(A,{className:"stTextInput","data-testid":"stTextInput",width:d,children:[s.jsx(z,{label:e.label,disabled:t,labelVisibility:P((b=e.labelVisibility)==null?void 0:b.value),htmlFor:c,children:e.help&&s.jsx(D,{children:s.jsx(E,{content:e.help,placement:H.TOP_RIGHT})})}),s.jsx($,{value:l??"",placeholder:C,onBlur:w,onFocus:F,onChange:j,onKeyPress:R,"aria-label":e.label,disabled:t,id:c,type:J(e),autoComplete:e.autocomplete,overrides:{Input:{style:{minWidth:0,"::placeholder":{opacity:"0.7"},lineHeight:a.lineHeights.inputWidget,paddingRight:a.spacing.sm,paddingLeft:a.spacing.sm,paddingBottom:a.spacing.sm,paddingTop:a.spacing.sm}},Root:{props:{"data-testid":"stTextInputRootElement"},style:{height:a.sizes.minElementHeight,borderLeftWidth:a.sizes.borderWidth,borderRightWidth:a.sizes.borderWidth,borderTopWidth:a.sizes.borderWidth,borderBottomWidth:a.sizes.borderWidth}}}}),v&&s.jsx(O,{dirty:o,value:l??"",maxLength:e.maxChars,inForm:x({formId:e.formId}),allowEnterToSubmit:T})]})}function I(t,e){return t.getStringValue(e)??null}function N(t){return t.default??null}function Z(t){return t.value??null}function q(t,e,r,d){e.setStringValue(t,r.value,{fromUi:r.fromUi},d)}function J(t){return t.type===M.Type.PASSWORD?"password":"text"}export{G as default};
@@ -1 +1 @@
1
- import{r as a,E as S,_ as B,c,a5 as T,M as L,j as s,aY as V}from"./index-B-xJO1Ho.js";import{I as K}from"./InputInstructions-C-ODKekf.js";import{i as M}from"./inputUtils-CptNuJwn.js";import{T as A}from"./textarea-zpR5l8uh.js";import"./base-input-Dtkz4-6L.js";var R=a.forwardRef(function(e,r){var l={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return a.createElement(S,B({iconAttrs:l,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:r}),a.createElement("rect",{width:24,height:24,fill:"none"}),a.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"}))});R.displayName="Send";const D=c("div",{target:"e1d2x3se4"})(({theme:e,width:r})=>({borderRadius:e.radii.default,display:"flex",backgroundColor:e.colors.widgetBackgroundColor??e.colors.secondaryBg,width:`${r}px`}),""),N=c("div",{target:"e1d2x3se3"})(({theme:e})=>({backgroundColor:e.colors.transparent,position:"relative",flexGrow:1,borderRadius:e.radii.default,display:"flex",alignItems:"center"}),""),F=c("button",{target:"e1d2x3se2"})(({theme:e,disabled:r,extended:l})=>{const g=T(e),[t,h]=g?[e.colors.gray60,e.colors.gray80]:[e.colors.gray80,e.colors.gray40];return{border:"none",backgroundColor:e.colors.transparent,borderTopRightRadius:l?"0":e.radii.default,borderTopLeftRadius:l?e.radii.default:"0",borderBottomRightRadius:e.radii.default,display:"inline-flex",alignItems:"center",justifyContent:"center",lineHeight:e.lineHeights.none,margin:e.spacing.none,padding:e.spacing.sm,color:r?t:h,pointerEvents:"auto","&:focus":{outline:"none"},":focus":{outline:"none"},"&:focus-visible":{backgroundColor:g?e.colors.gray10:e.colors.gray90},"&:hover":{backgroundColor:e.colors.primary,color:e.colors.white},"&:disabled, &:disabled:hover, &:disabled:active":{backgroundColor:e.colors.transparent,borderColor:e.colors.transparent,color:e.colors.gray}}},""),G=c("div",{target:"e1d2x3se1"})({name:"1v03qtz",styles:"display:flex;align-items:flex-end;height:100%;position:absolute;right:0;pointer-events:none"}),U=c("div",{target:"e1d2x3se0"})(({theme:e})=>({position:"absolute",bottom:"0px",right:`calc(${e.iconSizes.xl} + 2 * ${e.spacing.sm} + ${e.spacing.sm})`}),""),_=6.5,k=1;function q({width:e,element:r,widgetMgr:l,fragmentId:g}){const t=L(),[h,p]=a.useState(!1),[u,m]=a.useState(r.default),[f,x]=a.useState(0),n=a.useRef(null),b=a.useRef({minHeight:0,maxHeight:0}),z=()=>{let o=0;const{current:i}=n;if(i){const d=i.placeholder;i.placeholder="",i.style.height="auto",o=i.scrollHeight,i.placeholder=d,i.style.height=""}return o},y=()=>{n.current&&n.current.focus(),u&&(l.setStringTriggerValue(r,u,{fromUi:!0},g),p(!1),m(""),x(0))},j=o=>{const{metaKey:i,ctrlKey:d,shiftKey:E}=o;M(o)&&!E&&!d&&!i&&(o.preventDefault(),y())},I=o=>{const{value:i}=o.target,{maxChars:d}=r;d!==0&&i.length>d||(p(i!==""),m(i),x(z()))};a.useEffect(()=>{if(r.setValue){r.setValue=!1;const o=r.value||"";m(o),p(o!=="")}},[r]),a.useEffect(()=>{if(n.current){const{offsetHeight:o}=n.current;b.current.minHeight=o,b.current.maxHeight=o*_}},[n]);const{disabled:v,placeholder:C,maxChars:W}=r,{minHeight:$,maxHeight:w}=b.current,H=f>0&&n.current?Math.abs(f-$)>k:!1;return s.jsx(D,{className:"stChatInput","data-testid":"stChatInput",width:e,children:s.jsxs(N,{children:[s.jsx(A,{inputRef:n,value:u,placeholder:C,onChange:I,onKeyDown:j,"aria-label":C,disabled:v,rows:1,overrides:{Root:{style:{minHeight:t.sizes.minElementHeight,outline:"none",backgroundColor:t.colors.transparent,borderLeftWidth:t.sizes.borderWidth,borderRightWidth:t.sizes.borderWidth,borderTopWidth:t.sizes.borderWidth,borderBottomWidth:t.sizes.borderWidth,width:`${e}px`}},InputContainer:{style:{backgroundColor:t.colors.transparent}},Input:{props:{"data-testid":"stChatInputTextArea"},style:{lineHeight:t.lineHeights.inputWidget,backgroundColor:t.colors.transparent,resize:"none","::placeholder":{opacity:"0.7"},height:H?`${f+k}px`:"auto",maxHeight:w?`${w}px`:"none",paddingLeft:t.spacing.sm,paddingBottom:t.spacing.sm,paddingTop:t.spacing.sm,paddingRight:`calc(${t.iconSizes.xl} + 2 * ${t.spacing.sm} + ${t.spacing.sm})`}}}}),e>t.breakpoints.hideWidgetDetails&&s.jsx(U,{children:s.jsx(K,{dirty:h,value:u,maxLength:W,type:"chat",inForm:!1})}),s.jsx(G,{children:s.jsx(F,{onClick:y,disabled:!h||v,extended:H,"data-testid":"stChatInputSubmitButton",children:s.jsx(V,{content:R,size:"xl",color:"inherit"})})})]})})}export{q as default};
1
+ import{r as a,E as S,_ as B,c,a5 as T,M as L,j as s,aY as V}from"./index-lyJc68Dt.js";import{I as K}from"./InputInstructions-DBmZV4qq.js";import{i as M}from"./inputUtils-CptNuJwn.js";import{T as A}from"./textarea-DjoYY0dF.js";import"./base-input-BNFPjj94.js";var R=a.forwardRef(function(e,r){var l={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return a.createElement(S,B({iconAttrs:l,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:r}),a.createElement("rect",{width:24,height:24,fill:"none"}),a.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"}))});R.displayName="Send";const D=c("div",{target:"e1d2x3se4"})(({theme:e,width:r})=>({borderRadius:e.radii.default,display:"flex",backgroundColor:e.colors.widgetBackgroundColor??e.colors.secondaryBg,width:`${r}px`}),""),N=c("div",{target:"e1d2x3se3"})(({theme:e})=>({backgroundColor:e.colors.transparent,position:"relative",flexGrow:1,borderRadius:e.radii.default,display:"flex",alignItems:"center"}),""),F=c("button",{target:"e1d2x3se2"})(({theme:e,disabled:r,extended:l})=>{const g=T(e),[t,h]=g?[e.colors.gray60,e.colors.gray80]:[e.colors.gray80,e.colors.gray40];return{border:"none",backgroundColor:e.colors.transparent,borderTopRightRadius:l?"0":e.radii.default,borderTopLeftRadius:l?e.radii.default:"0",borderBottomRightRadius:e.radii.default,display:"inline-flex",alignItems:"center",justifyContent:"center",lineHeight:e.lineHeights.none,margin:e.spacing.none,padding:e.spacing.sm,color:r?t:h,pointerEvents:"auto","&:focus":{outline:"none"},":focus":{outline:"none"},"&:focus-visible":{backgroundColor:g?e.colors.gray10:e.colors.gray90},"&:hover":{backgroundColor:e.colors.primary,color:e.colors.white},"&:disabled, &:disabled:hover, &:disabled:active":{backgroundColor:e.colors.transparent,borderColor:e.colors.transparent,color:e.colors.gray}}},""),G=c("div",{target:"e1d2x3se1"})({name:"1v03qtz",styles:"display:flex;align-items:flex-end;height:100%;position:absolute;right:0;pointer-events:none"}),U=c("div",{target:"e1d2x3se0"})(({theme:e})=>({position:"absolute",bottom:"0px",right:`calc(${e.iconSizes.xl} + 2 * ${e.spacing.sm} + ${e.spacing.sm})`}),""),_=6.5,k=1;function q({width:e,element:r,widgetMgr:l,fragmentId:g}){const t=L(),[h,p]=a.useState(!1),[u,m]=a.useState(r.default),[f,x]=a.useState(0),n=a.useRef(null),b=a.useRef({minHeight:0,maxHeight:0}),z=()=>{let o=0;const{current:i}=n;if(i){const d=i.placeholder;i.placeholder="",i.style.height="auto",o=i.scrollHeight,i.placeholder=d,i.style.height=""}return o},y=()=>{n.current&&n.current.focus(),u&&(l.setStringTriggerValue(r,u,{fromUi:!0},g),p(!1),m(""),x(0))},j=o=>{const{metaKey:i,ctrlKey:d,shiftKey:E}=o;M(o)&&!E&&!d&&!i&&(o.preventDefault(),y())},I=o=>{const{value:i}=o.target,{maxChars:d}=r;d!==0&&i.length>d||(p(i!==""),m(i),x(z()))};a.useEffect(()=>{if(r.setValue){r.setValue=!1;const o=r.value||"";m(o),p(o!=="")}},[r]),a.useEffect(()=>{if(n.current){const{offsetHeight:o}=n.current;b.current.minHeight=o,b.current.maxHeight=o*_}},[n]);const{disabled:v,placeholder:C,maxChars:W}=r,{minHeight:$,maxHeight:w}=b.current,H=f>0&&n.current?Math.abs(f-$)>k:!1;return s.jsx(D,{className:"stChatInput","data-testid":"stChatInput",width:e,children:s.jsxs(N,{children:[s.jsx(A,{inputRef:n,value:u,placeholder:C,onChange:I,onKeyDown:j,"aria-label":C,disabled:v,rows:1,overrides:{Root:{style:{minHeight:t.sizes.minElementHeight,outline:"none",backgroundColor:t.colors.transparent,borderLeftWidth:t.sizes.borderWidth,borderRightWidth:t.sizes.borderWidth,borderTopWidth:t.sizes.borderWidth,borderBottomWidth:t.sizes.borderWidth,width:`${e}px`}},InputContainer:{style:{backgroundColor:t.colors.transparent}},Input:{props:{"data-testid":"stChatInputTextArea"},style:{lineHeight:t.lineHeights.inputWidget,backgroundColor:t.colors.transparent,resize:"none","::placeholder":{opacity:"0.7"},height:H?`${f+k}px`:"auto",maxHeight:w?`${w}px`:"none",paddingLeft:t.spacing.sm,paddingBottom:t.spacing.sm,paddingTop:t.spacing.sm,paddingRight:`calc(${t.iconSizes.xl} + 2 * ${t.spacing.sm} + ${t.spacing.sm})`}}}}),e>t.breakpoints.hideWidgetDetails&&s.jsx(U,{children:s.jsx(K,{dirty:h,value:u,maxLength:W,type:"chat",inForm:!1})}),s.jsx(G,{children:s.jsx(F,{onClick:y,disabled:!h||v,extended:H,"data-testid":"stChatInputSubmitButton",children:s.jsx(V,{content:R,size:"xl",color:"inherit"})})})]})})}export{q as default};
@@ -1,2 +1,2 @@
1
- import{e as N,r as k,b2 as Q,bs as dt,bd as ht,b3 as J,bt as ft,bu as pt,c as he,Q as gt,M as mt,a7 as vt,j as Y,R as Ne,bQ as bt,a_ as yt,a$ as wt,bc as Tt,b0 as xt,aK as kt,G as Ot,bR as Se}from"./index-B-xJO1Ho.js";import{s as _e}from"./sprintf-C-r3gIuM.js";import{a as Rt}from"./useBasicWidgetState-H1nJNjQy.js";import"./FormClearHelper-9eaBETaU.js";var De={},Ee={},Ie={},fe={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Direction=void 0,function(n){n.Right="to right",n.Left="to left",n.Down="to bottom",n.Up="to top"}(t.Direction||(t.Direction={}))})(fe),function(t){var n=N&&N.__spreadArray||function(o,c,l){if(l||arguments.length===2)for(var g=0,v=c.length,m;g<v;g++)(m||!(g in c))&&(m||(m=Array.prototype.slice.call(c,0,g)),m[g]=c[g]);return o.concat(m||Array.prototype.slice.call(c))};Object.defineProperty(t,"__esModule",{value:!0}),t.useThumbOverlap=t.assertUnreachable=t.voidFn=t.getTrackBackground=t.replaceAt=t.schd=t.translate=t.getClosestThumbIndex=t.translateThumbs=t.getPaddingAndBorder=t.getMargin=t.checkInitialOverlap=t.checkValuesAgainstBoundaries=t.checkBoundaries=t.isVertical=t.relativeValue=t.normalizeValue=t.isStepDivisible=t.isTouchEvent=t.getStepDecimals=void 0;var r=k,e=fe,a=function(o){var c=o.toString().split(".")[1];return c?c.length:0};t.getStepDecimals=a;function i(o){return o.touches&&o.touches.length||o.changedTouches&&o.changedTouches.length}t.isTouchEvent=i;function s(o,c,l){var g=(c-o)/l,v=8,m=Number(g.toFixed(v));return parseInt(m.toString(),10)===m}t.isStepDivisible=s;function u(o,c,l,g,v,m,T){var b=1e11;if(o=Math.round(o*b)/b,!m){var E=T[c-1],S=T[c+1];if(E&&E>o)return E;if(S&&S<o)return S}if(o>g)return g;if(o<l)return l;var _=Math.floor(o*b-l*b)%Math.floor(v*b),F=Math.floor(o*b-Math.abs(_)),U=_===0?o:F/b,j=Math.abs(_/b)<v/2?U:U+v,V=(0,t.getStepDecimals)(v);return parseFloat(j.toFixed(V))}t.normalizeValue=u;function d(o,c,l){return(o-c)/(l-c)}t.relativeValue=d;function y(o){return o===e.Direction.Up||o===e.Direction.Down}t.isVertical=y;function f(o,c,l){if(c>=l)throw new RangeError("min (".concat(c,") is equal/bigger than max (").concat(l,")"));if(o<c)throw new RangeError("value (".concat(o,") is smaller than min (").concat(c,")"));if(o>l)throw new RangeError("value (".concat(o,") is bigger than max (").concat(l,")"))}t.checkBoundaries=f;function h(o,c,l){return o<c?c:o>l?l:o}t.checkValuesAgainstBoundaries=h;function p(o){if(!(o.length<2)&&!o.slice(1).every(function(c,l){return o[l]<=c}))throw new RangeError("values={[".concat(o,"]} needs to be sorted when allowOverlap={false}"))}t.checkInitialOverlap=p;function R(o){var c=window.getComputedStyle(o);return{top:parseInt(c["margin-top"],10),bottom:parseInt(c["margin-bottom"],10),left:parseInt(c["margin-left"],10),right:parseInt(c["margin-right"],10)}}t.getMargin=R;function w(o){var c=window.getComputedStyle(o);return{top:parseInt(c["padding-top"],10)+parseInt(c["border-top-width"],10),bottom:parseInt(c["padding-bottom"],10)+parseInt(c["border-bottom-width"],10),left:parseInt(c["padding-left"],10)+parseInt(c["border-left-width"],10),right:parseInt(c["padding-right"],10)+parseInt(c["border-right-width"],10)}}t.getPaddingAndBorder=w;function M(o,c,l){var g=l?-1:1;o.forEach(function(v,m){return D(v,g*c[m].x,c[m].y)})}t.translateThumbs=M;function L(o,c,l,g){for(var v=0,m=$(o[0],c,l,g),T=1;T<o.length;T++){var b=$(o[T],c,l,g);b<m&&(m=b,v=T)}return v}t.getClosestThumbIndex=L;function D(o,c,l){o.style.transform="translate(".concat(c,"px, ").concat(l,"px)")}t.translate=D;var O=function(o){var c=[],l=null,g=function(){for(var v=[],m=0;m<arguments.length;m++)v[m]=arguments[m];c=v,!l&&(l=requestAnimationFrame(function(){l=null,o.apply(void 0,c)}))};return g};t.schd=O;function I(o,c,l){var g=o.slice(0);return g[c]=l,g}t.replaceAt=I;function q(o){var c=o.values,l=o.colors,g=o.min,v=o.max,m=o.direction,T=m===void 0?e.Direction.Right:m,b=o.rtl,E=b===void 0?!1:b;E&&T===e.Direction.Right?T=e.Direction.Left:E&&e.Direction.Left&&(T=e.Direction.Right);var S=c.slice(0).sort(function(F,U){return F-U}).map(function(F){return(F-g)/(v-g)*100}),_=S.reduce(function(F,U,j){return"".concat(F,", ").concat(l[j]," ").concat(U,"%, ").concat(l[j+1]," ").concat(U,"%")},"");return"linear-gradient(".concat(T,", ").concat(l[0]," 0%").concat(_,", ").concat(l[l.length-1]," 100%)")}t.getTrackBackground=q;function ee(){}t.voidFn=ee;function z(o){throw new Error("Didn't expect to get here")}t.assertUnreachable=z;var P=function(o,c,l,g,v){v===void 0&&(v=function(T){return T});var m=Math.ceil(n([o],Array.from(o.children),!0).reduce(function(T,b){var E=Math.ceil(b.getBoundingClientRect().width);if(b.innerText&&b.innerText.includes(l)&&b.childElementCount===0){var S=b.cloneNode(!0);S.innerHTML=v(c.toFixed(g)),S.style.visibility="hidden",document.body.appendChild(S),E=Math.ceil(S.getBoundingClientRect().width),document.body.removeChild(S)}return E>T?E:T},o.getBoundingClientRect().width));return m},Z=function(o,c,l,g,v,m,T){T===void 0&&(T=function(S){return S});var b=[],E=function(S){var _=P(l[S],g[S],v,m,T),F=c[S].x;c.forEach(function(U,j){var V=U.x,A=P(l[j],g[j],v,m,T);S!==j&&(F>=V&&F<=V+A||F+_>=V&&F+_<=V+A)&&(b.includes(j)||(b.push(S),b.push(j),b=n(n([],b,!0),[S,j],!1),E(j)))})};return E(o),Array.from(new Set(b.sort()))},G=function(o,c,l,g,v,m){g===void 0&&(g=.1),v===void 0&&(v=" - "),m===void 0&&(m=function(j){return j});var T=(0,t.getStepDecimals)(g),b=(0,r.useState)({}),E=b[0],S=b[1],_=(0,r.useState)(m(c[l].toFixed(T))),F=_[0],U=_[1];return(0,r.useEffect)(function(){if(o){var j=o.getThumbs();if(j.length<1)return;var V={},A=o.getOffsets(),re=Z(l,A,j,c,v,T,m),se=m(c[l].toFixed(T));if(re.length){var ae=re.reduce(function(te,le,ce,de){return te.length?n(n([],te,!0),[A[de[ce]].x],!1):[A[de[ce]].x]},[]);if(Math.min.apply(Math,ae)===A[l].x){var ie=[];re.forEach(function(te){ie.push(c[te].toFixed(T))}),se=Array.from(new Set(ie.sort(function(te,le){return parseFloat(te)-parseFloat(le)}))).map(m).join(v);var Re=Math.min.apply(Math,ae),ue=Math.max.apply(Math,ae),Me=j[re[ae.indexOf(ue)]].getBoundingClientRect().width;V.left="".concat(Math.abs(Re-(ue+Me))/2,"px"),V.transform="translate(-50%, 0)"}else V.visibility="hidden"}U(se),S(V)}},[o,c]),[F,E]};t.useThumbOverlap=G;function $(o,c,l,g){var v=o.getBoundingClientRect(),m=v.left,T=v.top,b=v.width,E=v.height;return y(g)?Math.abs(l-(T+E/2)):Math.abs(c-(m+b/2))}}(Ie);var Mt=N&&N.__extends||function(){var t=function(n,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(e[i]=a[i])},t(n,r)};return function(n,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(n,r);function e(){this.constructor=n}n.prototype=r===null?Object.create(r):(e.prototype=r.prototype,new e)}}(),St=N&&N.__createBinding||(Object.create?function(t,n,r,e){e===void 0&&(e=r);var a=Object.getOwnPropertyDescriptor(n,r);(!a||("get"in a?!n.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return n[r]}}),Object.defineProperty(t,e,a)}:function(t,n,r,e){e===void 0&&(e=r),t[e]=n[r]}),Dt=N&&N.__setModuleDefault||(Object.create?function(t,n){Object.defineProperty(t,"default",{enumerable:!0,value:n})}:function(t,n){t.default=n}),Et=N&&N.__importStar||function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&St(n,t,r);return Dt(n,t),n},Ue=N&&N.__spreadArray||function(t,n,r){if(r||arguments.length===2)for(var e=0,a=n.length,i;e<a;e++)(i||!(e in n))&&(i||(i=Array.prototype.slice.call(n,0,e)),i[e]=n[e]);return t.concat(i||Array.prototype.slice.call(n))};Object.defineProperty(Ee,"__esModule",{value:!0});var pe=Et(k),x=Ie,B=fe,It=["ArrowRight","ArrowUp","k","PageUp"],Ct=["ArrowLeft","ArrowDown","j","PageDown"],Pt=function(t){Mt(n,t);function n(r){var e=t.call(this,r)||this;if(e.trackRef=pe.createRef(),e.thumbRefs=[],e.state={draggedTrackPos:[-1,-1],draggedThumbIndex:-1,thumbZIndexes:new Array(e.props.values.length).fill(0).map(function(a,i){return i}),isChanged:!1,markOffsets:[]},e.getOffsets=function(){var a=e.props,i=a.direction,s=a.values,u=a.min,d=a.max,y=e.trackRef.current,f=y.getBoundingClientRect(),h=(0,x.getPaddingAndBorder)(y);return e.getThumbs().map(function(p,R){var w={x:0,y:0},M=p.getBoundingClientRect(),L=(0,x.getMargin)(p);switch(i){case B.Direction.Right:return w.x=(L.left+h.left)*-1,w.y=((M.height-f.height)/2+h.top)*-1,w.x+=f.width*(0,x.relativeValue)(s[R],u,d)-M.width/2,w;case B.Direction.Left:return w.x=(L.right+h.right)*-1,w.y=((M.height-f.height)/2+h.top)*-1,w.x+=f.width-f.width*(0,x.relativeValue)(s[R],u,d)-M.width/2,w;case B.Direction.Up:return w.x=((M.width-f.width)/2+L.left+h.left)*-1,w.y=-h.left,w.y+=f.height-f.height*(0,x.relativeValue)(s[R],u,d)-M.height/2,w;case B.Direction.Down:return w.x=((M.width-f.width)/2+L.left+h.left)*-1,w.y=-h.left,w.y+=f.height*(0,x.relativeValue)(s[R],u,d)-M.height/2,w;default:return(0,x.assertUnreachable)(i)}})},e.getThumbs=function(){return e.trackRef&&e.trackRef.current?Array.from(e.trackRef.current.children).filter(function(a){return a.hasAttribute("aria-valuenow")}):(console.warn("No thumbs found in the track container. Did you forget to pass & spread the `props` param in renderTrack?"),[])},e.getTargetIndex=function(a){return e.getThumbs().findIndex(function(i){return i===a.target||i.contains(a.target)})},e.addTouchEvents=function(a){document.addEventListener("touchmove",e.schdOnTouchMove,{passive:!1}),document.addEventListener("touchend",e.schdOnEnd,{passive:!1}),document.addEventListener("touchcancel",e.schdOnEnd,{passive:!1})},e.addMouseEvents=function(a){document.addEventListener("mousemove",e.schdOnMouseMove),document.addEventListener("mouseup",e.schdOnEnd)},e.onMouseDownTrack=function(a){var i;if(a.button===0)if(a.persist(),a.preventDefault(),e.addMouseEvents(a.nativeEvent),e.props.values.length>1&&e.props.draggableTrack){if(e.thumbRefs.some(function(u){var d;return(d=u.current)===null||d===void 0?void 0:d.contains(a.target)}))return;e.setState({draggedTrackPos:[a.clientX,a.clientY]},function(){return e.onMove(a.clientX,a.clientY)})}else{var s=(0,x.getClosestThumbIndex)(e.thumbRefs.map(function(u){return u.current}),a.clientX,a.clientY,e.props.direction);(i=e.thumbRefs[s].current)===null||i===void 0||i.focus(),e.setState({draggedThumbIndex:s},function(){return e.onMove(a.clientX,a.clientY)})}},e.onResize=function(){(0,x.translateThumbs)(e.getThumbs(),e.getOffsets(),e.props.rtl),e.calculateMarkOffsets()},e.onTouchStartTrack=function(a){var i;if(a.persist(),e.addTouchEvents(a.nativeEvent),e.props.values.length>1&&e.props.draggableTrack){if(e.thumbRefs.some(function(u){var d;return(d=u.current)===null||d===void 0?void 0:d.contains(a.target)}))return;e.setState({draggedTrackPos:[a.touches[0].clientX,a.touches[0].clientY]},function(){return e.onMove(a.touches[0].clientX,a.touches[0].clientY)})}else{var s=(0,x.getClosestThumbIndex)(e.thumbRefs.map(function(u){return u.current}),a.touches[0].clientX,a.touches[0].clientY,e.props.direction);(i=e.thumbRefs[s].current)===null||i===void 0||i.focus(),e.setState({draggedThumbIndex:s},function(){return e.onMove(a.touches[0].clientX,a.touches[0].clientY)})}},e.onMouseOrTouchStart=function(a){if(!e.props.disabled){var i=(0,x.isTouchEvent)(a);if(!(!i&&a.button!==0)){var s=e.getTargetIndex(a);s!==-1&&(i?e.addTouchEvents(a):e.addMouseEvents(a),e.setState({draggedThumbIndex:s,thumbZIndexes:e.state.thumbZIndexes.map(function(u,d){return d===s?Math.max.apply(Math,e.state.thumbZIndexes):u<=e.state.thumbZIndexes[s]?u:u-1})}))}}},e.onMouseMove=function(a){a.preventDefault(),e.onMove(a.clientX,a.clientY)},e.onTouchMove=function(a){a.preventDefault(),e.onMove(a.touches[0].clientX,a.touches[0].clientY)},e.onKeyDown=function(a){var i=e.props,s=i.values,u=i.onChange,d=i.step,y=i.rtl,f=i.direction,h=e.state.isChanged,p=e.getTargetIndex(a.nativeEvent),R=y||f===B.Direction.Left||f===B.Direction.Down?-1:1;p!==-1&&(It.includes(a.key)?(a.preventDefault(),e.setState({draggedThumbIndex:p,isChanged:!0}),u((0,x.replaceAt)(s,p,e.normalizeValue(s[p]+R*(a.key==="PageUp"?d*10:d),p)))):Ct.includes(a.key)?(a.preventDefault(),e.setState({draggedThumbIndex:p,isChanged:!0}),u((0,x.replaceAt)(s,p,e.normalizeValue(s[p]-R*(a.key==="PageDown"?d*10:d),p)))):a.key==="Tab"?e.setState({draggedThumbIndex:-1},function(){h&&e.fireOnFinalChange()}):h&&e.fireOnFinalChange())},e.onKeyUp=function(a){var i=e.state.isChanged;e.setState({draggedThumbIndex:-1},function(){i&&e.fireOnFinalChange()})},e.onMove=function(a,i){var s=e.state,u=s.draggedThumbIndex,d=s.draggedTrackPos,y=e.props,f=y.direction,h=y.min,p=y.max,R=y.onChange,w=y.values,M=y.step,L=y.rtl;if(u===-1&&d[0]===-1&&d[1]===-1)return null;var D=e.trackRef.current;if(!D)return null;var O=D.getBoundingClientRect(),I=(0,x.isVertical)(f)?O.height:O.width;if(d[0]!==-1&&d[1]!==-1){var q=a-d[0],ee=i-d[1],z=0;switch(f){case B.Direction.Right:case B.Direction.Left:z=q/I*(p-h);break;case B.Direction.Down:case B.Direction.Up:z=ee/I*(p-h);break;default:(0,x.assertUnreachable)(f)}if(L&&(z*=-1),Math.abs(z)>=M/2){for(var P=0;P<e.thumbRefs.length;P++){if(w[P]===p&&Math.sign(z)===1||w[P]===h&&Math.sign(z)===-1)return;var Z=w[P]+z;Z>p?z=p-w[P]:Z<h&&(z=h-w[P])}for(var G=w.slice(0),P=0;P<e.thumbRefs.length;P++)G=(0,x.replaceAt)(G,P,e.normalizeValue(w[P]+z,P));e.setState({draggedTrackPos:[a,i]}),R(G)}}else{var $=0;switch(f){case B.Direction.Right:$=(a-O.left)/I*(p-h)+h;break;case B.Direction.Left:$=(I-(a-O.left))/I*(p-h)+h;break;case B.Direction.Down:$=(i-O.top)/I*(p-h)+h;break;case B.Direction.Up:$=(I-(i-O.top))/I*(p-h)+h;break;default:(0,x.assertUnreachable)(f)}L&&($=p+h-$),Math.abs(w[u]-$)>=M/2&&R((0,x.replaceAt)(w,u,e.normalizeValue($,u)))}},e.normalizeValue=function(a,i){var s=e.props,u=s.min,d=s.max,y=s.step,f=s.allowOverlap,h=s.values;return(0,x.normalizeValue)(a,i,u,d,y,f,h)},e.onEnd=function(a){if(a.preventDefault(),document.removeEventListener("mousemove",e.schdOnMouseMove),document.removeEventListener("touchmove",e.schdOnTouchMove),document.removeEventListener("mouseup",e.schdOnEnd),document.removeEventListener("touchend",e.schdOnEnd),document.removeEventListener("touchcancel",e.schdOnEnd),e.state.draggedThumbIndex===-1&&e.state.draggedTrackPos[0]===-1&&e.state.draggedTrackPos[1]===-1)return null;e.setState({draggedThumbIndex:-1,draggedTrackPos:[-1,-1]},function(){e.fireOnFinalChange()})},e.fireOnFinalChange=function(){e.setState({isChanged:!1});var a=e.props,i=a.onFinalChange,s=a.values;i&&i(s)},e.updateMarkRefs=function(a){if(!a.renderMark){e.numOfMarks=void 0,e.markRefs=void 0;return}e.numOfMarks=(a.max-a.min)/e.props.step,e.markRefs=[];for(var i=0;i<e.numOfMarks+1;i++)e.markRefs[i]=pe.createRef()},e.calculateMarkOffsets=function(){if(!(!e.props.renderMark||!e.trackRef||!e.numOfMarks||!e.markRefs||e.trackRef.current===null)){for(var a=window.getComputedStyle(e.trackRef.current),i=parseInt(a.width,10),s=parseInt(a.height,10),u=parseInt(a.paddingLeft,10),d=parseInt(a.paddingTop,10),y=[],f=0;f<e.numOfMarks+1;f++){var h=9999,p=9999;if(e.markRefs[f].current){var R=e.markRefs[f].current.getBoundingClientRect();h=R.height,p=R.width}e.props.direction===B.Direction.Left||e.props.direction===B.Direction.Right?y.push([Math.round(i/e.numOfMarks*f+u-p/2),-Math.round((h-s)/2)]):y.push([Math.round(s/e.numOfMarks*f+d-h/2),-Math.round((p-i)/2)])}e.setState({markOffsets:y})}},r.step===0)throw new Error('"step" property should be a positive number');return e.schdOnMouseMove=(0,x.schd)(e.onMouseMove),e.schdOnTouchMove=(0,x.schd)(e.onTouchMove),e.schdOnEnd=(0,x.schd)(e.onEnd),e.thumbRefs=r.values.map(function(){return pe.createRef()}),e.updateMarkRefs(r),e}return n.prototype.componentDidMount=function(){var r=this,e=this.props,a=e.values,i=e.min,s=e.step;this.resizeObserver=window.ResizeObserver?new window.ResizeObserver(this.onResize):{observe:function(){return window.addEventListener("resize",r.onResize)},unobserve:function(){return window.removeEventListener("resize",r.onResize)}},document.addEventListener("touchstart",this.onMouseOrTouchStart,{passive:!1}),document.addEventListener("mousedown",this.onMouseOrTouchStart,{passive:!1}),!this.props.allowOverlap&&(0,x.checkInitialOverlap)(this.props.values),this.props.values.forEach(function(u){return(0,x.checkBoundaries)(u,r.props.min,r.props.max)}),this.resizeObserver.observe(this.trackRef.current),(0,x.translateThumbs)(this.getThumbs(),this.getOffsets(),this.props.rtl),this.calculateMarkOffsets(),a.forEach(function(u){(0,x.isStepDivisible)(i,u,s)||console.warn("The `values` property is in conflict with the current `step`, `min`, and `max` properties. Please provide values that are accessible using the min, max, and step values.")})},n.prototype.componentDidUpdate=function(r,e){var a=this.props,i=a.max,s=a.min,u=a.step,d=a.values,y=a.rtl;(r.max!==i||r.min!==s||r.step!==u)&&this.updateMarkRefs(this.props),(0,x.translateThumbs)(this.getThumbs(),this.getOffsets(),y),(r.max!==i||r.min!==s||r.step!==u||e.markOffsets.length!==this.state.markOffsets.length)&&(this.calculateMarkOffsets(),d.forEach(function(f){(0,x.isStepDivisible)(s,f,u)||console.warn("The `values` property is in conflict with the current `step`, `min`, and `max` properties. Please provide values that are accessible using the min, max, and step values.")}))},n.prototype.componentWillUnmount=function(){var r={passive:!1};document.removeEventListener("mousedown",this.onMouseOrTouchStart,r),document.removeEventListener("mousemove",this.schdOnMouseMove),document.removeEventListener("touchmove",this.schdOnTouchMove),document.removeEventListener("touchstart",this.onMouseOrTouchStart),document.removeEventListener("mouseup",this.schdOnEnd),document.removeEventListener("touchend",this.schdOnEnd),this.resizeObserver.unobserve(this.trackRef.current)},n.prototype.render=function(){var r=this,e=this.props,a=e.renderTrack,i=e.renderThumb,s=e.renderMark,u=s===void 0?function(){return null}:s,d=e.values,y=e.min,f=e.max,h=e.allowOverlap,p=e.disabled,R=this.state,w=R.draggedThumbIndex,M=R.thumbZIndexes,L=R.markOffsets;return a({props:{style:{transform:"scale(1)",cursor:w>-1?"grabbing":this.props.draggableTrack?(0,x.isVertical)(this.props.direction)?"ns-resize":"ew-resize":d.length===1&&!p?"pointer":"inherit"},onMouseDown:p?x.voidFn:this.onMouseDownTrack,onTouchStart:p?x.voidFn:this.onTouchStartTrack,ref:this.trackRef},isDragged:this.state.draggedThumbIndex>-1,disabled:p,children:Ue(Ue([],L.map(function(D,O,I){return u({props:{style:r.props.direction===B.Direction.Left||r.props.direction===B.Direction.Right?{position:"absolute",left:"".concat(D[0],"px"),marginTop:"".concat(D[1],"px")}:{position:"absolute",top:"".concat(D[0],"px"),marginLeft:"".concat(D[1],"px")},key:"mark".concat(O),ref:r.markRefs[O]},index:O})}),!0),d.map(function(D,O){var I=r.state.draggedThumbIndex===O;return i({index:O,value:D,isDragged:I,props:{style:{position:"absolute",zIndex:M[O],cursor:p?"inherit":I?"grabbing":"grab",userSelect:"none",touchAction:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none"},key:O,tabIndex:p?void 0:0,"aria-valuemax":h?f:d[O+1]||f,"aria-valuemin":h?y:d[O-1]||y,"aria-valuenow":D,draggable:!1,ref:r.thumbRefs[O],role:"slider",onKeyDown:p?x.voidFn:r.onKeyDown,onKeyUp:p?x.voidFn:r.onKeyUp}})}),!0)})},n.defaultProps={step:1,direction:B.Direction.Right,rtl:!1,disabled:!1,allowOverlap:!1,draggableTrack:!1,min:0,max:100},n}(pe.Component);Ee.default=Pt,function(t){var n=N&&N.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(t,"__esModule",{value:!0}),t.checkValuesAgainstBoundaries=t.relativeValue=t.useThumbOverlap=t.Direction=t.getTrackBackground=t.Range=void 0;var r=n(Ee);t.Range=r.default;var e=Ie;Object.defineProperty(t,"getTrackBackground",{enumerable:!0,get:function(){return e.getTrackBackground}}),Object.defineProperty(t,"useThumbOverlap",{enumerable:!0,get:function(){return e.useThumbOverlap}}),Object.defineProperty(t,"relativeValue",{enumerable:!0,get:function(){return e.relativeValue}}),Object.defineProperty(t,"checkValuesAgainstBoundaries",{enumerable:!0,get:function(){return e.checkValuesAgainstBoundaries}});var a=fe;Object.defineProperty(t,"Direction",{enumerable:!0,get:function(){return a.Direction}})}(De);function He(t,n){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);n&&(e=e.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,e)}return r}function ge(t){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?He(Object(r),!0).forEach(function(e){jt(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):He(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function jt(t,n,r){return n in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t}var me=Q("div",{position:"relative",width:"100%"});me.displayName="Root",me.displayName="Root",me.displayName="StyledRoot";var ve=Q("div",function(t){var n=t.$theme,r=t.$value,e=r===void 0?[]:r,a=t.$disabled,i=t.$isDragged,s=n.sizing,u="inherit";return a?u="not-allowed":i?u="grabbing":e.length===1&&(u="pointer"),{paddingTop:s.scale600,paddingBottom:s.scale600,paddingRight:s.scale600,paddingLeft:s.scale600,display:"flex",cursor:u,backgroundColor:n.colors.sliderTrackFill}});ve.displayName="Track",ve.displayName="Track",ve.displayName="StyledTrack";var be=Q("div",function(t){var n=t.$theme,r=t.$value,e=r===void 0?[]:r,a=t.$min,i=t.$max,s=t.$disabled,u=n.colors,d=n.borders,y=n.direction,f=n.borders.useRoundedCorners?d.radius100:0;return{borderTopLeftRadius:f,borderTopRightRadius:f,borderBottomRightRadius:f,borderBottomLeftRadius:f,background:De.getTrackBackground({values:e,colors:e.length===1?[s?u.borderOpaque:u.primary,s?u.backgroundSecondary:u.borderOpaque]:[s?u.backgroundSecondary:u.borderOpaque,s?u.borderOpaque:u.primary,s?u.backgroundSecondary:u.borderOpaque],min:a||0,max:i||0,rtl:y==="rtl"}),height:"2px",width:"100%",alignSelf:"center",cursor:s?"not-allowed":"inherit"}});be.displayName="InnerTrack",be.displayName="InnerTrack",be.displayName="StyledInnerTrack";var ye=Q("div",function(t){return{width:"4px",height:"2px",backgroundColor:t.$theme.colors.backgroundPrimary,marginLeft:"16px"}});ye.displayName="Mark",ye.displayName="Mark",ye.displayName="StyledMark";var we=Q("div",function(t){return ge(ge({},t.$theme.typography.font200),{},{color:t.$theme.colors.contentPrimary})});we.displayName="Tick",we.displayName="Tick",we.displayName="StyledTick";var Te=Q("div",function(t){var n=t.$theme,r=n.sizing;return{display:"flex",justifyContent:"space-between",alignItems:"center",paddingRight:r.scale600,paddingLeft:r.scale600,paddingBottom:r.scale400}});Te.displayName="TickBar",Te.displayName="TickBar",Te.displayName="StyledTickBar";var xe=Q("div",function(t){var n=t.$theme,r=t.$value,e=r===void 0?[]:r,a=t.$thumbIndex,i=t.$disabled,s=e.length===2&&a===0,u=e.length===2&&a===1;return n.direction==="rtl"&&(u||s)&&(s=!s,u=!u),{height:"24px",width:"24px",borderTopLeftRadius:"24px",borderTopRightRadius:"24px",borderBottomLeftRadius:"24px",borderBottomRightRadius:"24px",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:i?n.colors.sliderHandleFillDisabled:n.colors.sliderHandleFill,outline:"none",boxShadow:t.$isFocusVisible?"0 0 0 3px ".concat(n.colors.accent):"0 1px 4px rgba(0, 0, 0, 0.12)",cursor:i?"not-allowed":"inherit"}});xe.displayName="Thumb",xe.displayName="Thumb",xe.displayName="StyledThumb";var ke=Q("div",function(t){var n=t.$disabled,r=t.$theme;return{position:"absolute",top:"-16px",width:"4px",height:"20px",backgroundColor:n?r.colors.sliderHandleFillDisabled:r.colors.sliderHandleInnerFill}});ke.displayName="InnerThumb",ke.displayName="InnerThumb",ke.displayName="StyledInnerThumb";var Oe=Q("div",function(t){var n=t.$disabled,r=t.$theme;return ge(ge({position:"absolute",top:"-".concat(r.sizing.scale1400)},r.typography.font200),{},{backgroundColor:n?r.colors.sliderHandleFillDisabled:r.colors.sliderHandleInnerFill,color:r.colors.contentInversePrimary,paddingLeft:r.sizing.scale600,paddingRight:r.sizing.scale600,paddingTop:r.sizing.scale500,paddingBottom:r.sizing.scale500,borderBottomLeftRadius:"48px",borderBottomRightRadius:"48px",borderTopLeftRadius:"48px",borderTopRightRadius:"48px",whiteSpace:"nowrap"})});Oe.displayName="ThumbValue",Oe.displayName="ThumbValue",Oe.displayName="StyledThumbValue";function Xe(t,n){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);n&&(e=e.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,e)}return r}function Bt(t){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?Xe(Object(r),!0).forEach(function(e){Lt(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Xe(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function Lt(t,n,r){return n in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t}function X(){return X=Object.assign?Object.assign.bind():function(t){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])}return t},X.apply(this,arguments)}function K(t,n){return zt(t)||Ft(t,n)||$t(t,n)||At()}function At(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{e as N,r as k,b2 as Q,bs as dt,bd as ht,b3 as J,bt as ft,bu as pt,c as he,Q as gt,M as mt,a7 as vt,j as Y,R as Ne,bQ as bt,a_ as yt,a$ as wt,bc as Tt,b0 as xt,aK as kt,G as Ot,bR as Se}from"./index-lyJc68Dt.js";import{s as _e}from"./sprintf-C-r3gIuM.js";import{a as Rt}from"./useBasicWidgetState-BzSjsdCt.js";import"./FormClearHelper-Dhc_r76k.js";var De={},Ee={},Ie={},fe={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Direction=void 0,function(n){n.Right="to right",n.Left="to left",n.Down="to bottom",n.Up="to top"}(t.Direction||(t.Direction={}))})(fe),function(t){var n=N&&N.__spreadArray||function(o,c,l){if(l||arguments.length===2)for(var g=0,v=c.length,m;g<v;g++)(m||!(g in c))&&(m||(m=Array.prototype.slice.call(c,0,g)),m[g]=c[g]);return o.concat(m||Array.prototype.slice.call(c))};Object.defineProperty(t,"__esModule",{value:!0}),t.useThumbOverlap=t.assertUnreachable=t.voidFn=t.getTrackBackground=t.replaceAt=t.schd=t.translate=t.getClosestThumbIndex=t.translateThumbs=t.getPaddingAndBorder=t.getMargin=t.checkInitialOverlap=t.checkValuesAgainstBoundaries=t.checkBoundaries=t.isVertical=t.relativeValue=t.normalizeValue=t.isStepDivisible=t.isTouchEvent=t.getStepDecimals=void 0;var r=k,e=fe,a=function(o){var c=o.toString().split(".")[1];return c?c.length:0};t.getStepDecimals=a;function i(o){return o.touches&&o.touches.length||o.changedTouches&&o.changedTouches.length}t.isTouchEvent=i;function s(o,c,l){var g=(c-o)/l,v=8,m=Number(g.toFixed(v));return parseInt(m.toString(),10)===m}t.isStepDivisible=s;function u(o,c,l,g,v,m,T){var b=1e11;if(o=Math.round(o*b)/b,!m){var E=T[c-1],S=T[c+1];if(E&&E>o)return E;if(S&&S<o)return S}if(o>g)return g;if(o<l)return l;var _=Math.floor(o*b-l*b)%Math.floor(v*b),F=Math.floor(o*b-Math.abs(_)),U=_===0?o:F/b,j=Math.abs(_/b)<v/2?U:U+v,V=(0,t.getStepDecimals)(v);return parseFloat(j.toFixed(V))}t.normalizeValue=u;function d(o,c,l){return(o-c)/(l-c)}t.relativeValue=d;function y(o){return o===e.Direction.Up||o===e.Direction.Down}t.isVertical=y;function f(o,c,l){if(c>=l)throw new RangeError("min (".concat(c,") is equal/bigger than max (").concat(l,")"));if(o<c)throw new RangeError("value (".concat(o,") is smaller than min (").concat(c,")"));if(o>l)throw new RangeError("value (".concat(o,") is bigger than max (").concat(l,")"))}t.checkBoundaries=f;function h(o,c,l){return o<c?c:o>l?l:o}t.checkValuesAgainstBoundaries=h;function p(o){if(!(o.length<2)&&!o.slice(1).every(function(c,l){return o[l]<=c}))throw new RangeError("values={[".concat(o,"]} needs to be sorted when allowOverlap={false}"))}t.checkInitialOverlap=p;function R(o){var c=window.getComputedStyle(o);return{top:parseInt(c["margin-top"],10),bottom:parseInt(c["margin-bottom"],10),left:parseInt(c["margin-left"],10),right:parseInt(c["margin-right"],10)}}t.getMargin=R;function w(o){var c=window.getComputedStyle(o);return{top:parseInt(c["padding-top"],10)+parseInt(c["border-top-width"],10),bottom:parseInt(c["padding-bottom"],10)+parseInt(c["border-bottom-width"],10),left:parseInt(c["padding-left"],10)+parseInt(c["border-left-width"],10),right:parseInt(c["padding-right"],10)+parseInt(c["border-right-width"],10)}}t.getPaddingAndBorder=w;function M(o,c,l){var g=l?-1:1;o.forEach(function(v,m){return D(v,g*c[m].x,c[m].y)})}t.translateThumbs=M;function L(o,c,l,g){for(var v=0,m=$(o[0],c,l,g),T=1;T<o.length;T++){var b=$(o[T],c,l,g);b<m&&(m=b,v=T)}return v}t.getClosestThumbIndex=L;function D(o,c,l){o.style.transform="translate(".concat(c,"px, ").concat(l,"px)")}t.translate=D;var O=function(o){var c=[],l=null,g=function(){for(var v=[],m=0;m<arguments.length;m++)v[m]=arguments[m];c=v,!l&&(l=requestAnimationFrame(function(){l=null,o.apply(void 0,c)}))};return g};t.schd=O;function I(o,c,l){var g=o.slice(0);return g[c]=l,g}t.replaceAt=I;function q(o){var c=o.values,l=o.colors,g=o.min,v=o.max,m=o.direction,T=m===void 0?e.Direction.Right:m,b=o.rtl,E=b===void 0?!1:b;E&&T===e.Direction.Right?T=e.Direction.Left:E&&e.Direction.Left&&(T=e.Direction.Right);var S=c.slice(0).sort(function(F,U){return F-U}).map(function(F){return(F-g)/(v-g)*100}),_=S.reduce(function(F,U,j){return"".concat(F,", ").concat(l[j]," ").concat(U,"%, ").concat(l[j+1]," ").concat(U,"%")},"");return"linear-gradient(".concat(T,", ").concat(l[0]," 0%").concat(_,", ").concat(l[l.length-1]," 100%)")}t.getTrackBackground=q;function ee(){}t.voidFn=ee;function z(o){throw new Error("Didn't expect to get here")}t.assertUnreachable=z;var P=function(o,c,l,g,v){v===void 0&&(v=function(T){return T});var m=Math.ceil(n([o],Array.from(o.children),!0).reduce(function(T,b){var E=Math.ceil(b.getBoundingClientRect().width);if(b.innerText&&b.innerText.includes(l)&&b.childElementCount===0){var S=b.cloneNode(!0);S.innerHTML=v(c.toFixed(g)),S.style.visibility="hidden",document.body.appendChild(S),E=Math.ceil(S.getBoundingClientRect().width),document.body.removeChild(S)}return E>T?E:T},o.getBoundingClientRect().width));return m},Z=function(o,c,l,g,v,m,T){T===void 0&&(T=function(S){return S});var b=[],E=function(S){var _=P(l[S],g[S],v,m,T),F=c[S].x;c.forEach(function(U,j){var V=U.x,A=P(l[j],g[j],v,m,T);S!==j&&(F>=V&&F<=V+A||F+_>=V&&F+_<=V+A)&&(b.includes(j)||(b.push(S),b.push(j),b=n(n([],b,!0),[S,j],!1),E(j)))})};return E(o),Array.from(new Set(b.sort()))},G=function(o,c,l,g,v,m){g===void 0&&(g=.1),v===void 0&&(v=" - "),m===void 0&&(m=function(j){return j});var T=(0,t.getStepDecimals)(g),b=(0,r.useState)({}),E=b[0],S=b[1],_=(0,r.useState)(m(c[l].toFixed(T))),F=_[0],U=_[1];return(0,r.useEffect)(function(){if(o){var j=o.getThumbs();if(j.length<1)return;var V={},A=o.getOffsets(),re=Z(l,A,j,c,v,T,m),se=m(c[l].toFixed(T));if(re.length){var ae=re.reduce(function(te,le,ce,de){return te.length?n(n([],te,!0),[A[de[ce]].x],!1):[A[de[ce]].x]},[]);if(Math.min.apply(Math,ae)===A[l].x){var ie=[];re.forEach(function(te){ie.push(c[te].toFixed(T))}),se=Array.from(new Set(ie.sort(function(te,le){return parseFloat(te)-parseFloat(le)}))).map(m).join(v);var Re=Math.min.apply(Math,ae),ue=Math.max.apply(Math,ae),Me=j[re[ae.indexOf(ue)]].getBoundingClientRect().width;V.left="".concat(Math.abs(Re-(ue+Me))/2,"px"),V.transform="translate(-50%, 0)"}else V.visibility="hidden"}U(se),S(V)}},[o,c]),[F,E]};t.useThumbOverlap=G;function $(o,c,l,g){var v=o.getBoundingClientRect(),m=v.left,T=v.top,b=v.width,E=v.height;return y(g)?Math.abs(l-(T+E/2)):Math.abs(c-(m+b/2))}}(Ie);var Mt=N&&N.__extends||function(){var t=function(n,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(e[i]=a[i])},t(n,r)};return function(n,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(n,r);function e(){this.constructor=n}n.prototype=r===null?Object.create(r):(e.prototype=r.prototype,new e)}}(),St=N&&N.__createBinding||(Object.create?function(t,n,r,e){e===void 0&&(e=r);var a=Object.getOwnPropertyDescriptor(n,r);(!a||("get"in a?!n.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return n[r]}}),Object.defineProperty(t,e,a)}:function(t,n,r,e){e===void 0&&(e=r),t[e]=n[r]}),Dt=N&&N.__setModuleDefault||(Object.create?function(t,n){Object.defineProperty(t,"default",{enumerable:!0,value:n})}:function(t,n){t.default=n}),Et=N&&N.__importStar||function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&St(n,t,r);return Dt(n,t),n},Ue=N&&N.__spreadArray||function(t,n,r){if(r||arguments.length===2)for(var e=0,a=n.length,i;e<a;e++)(i||!(e in n))&&(i||(i=Array.prototype.slice.call(n,0,e)),i[e]=n[e]);return t.concat(i||Array.prototype.slice.call(n))};Object.defineProperty(Ee,"__esModule",{value:!0});var pe=Et(k),x=Ie,B=fe,It=["ArrowRight","ArrowUp","k","PageUp"],Ct=["ArrowLeft","ArrowDown","j","PageDown"],Pt=function(t){Mt(n,t);function n(r){var e=t.call(this,r)||this;if(e.trackRef=pe.createRef(),e.thumbRefs=[],e.state={draggedTrackPos:[-1,-1],draggedThumbIndex:-1,thumbZIndexes:new Array(e.props.values.length).fill(0).map(function(a,i){return i}),isChanged:!1,markOffsets:[]},e.getOffsets=function(){var a=e.props,i=a.direction,s=a.values,u=a.min,d=a.max,y=e.trackRef.current,f=y.getBoundingClientRect(),h=(0,x.getPaddingAndBorder)(y);return e.getThumbs().map(function(p,R){var w={x:0,y:0},M=p.getBoundingClientRect(),L=(0,x.getMargin)(p);switch(i){case B.Direction.Right:return w.x=(L.left+h.left)*-1,w.y=((M.height-f.height)/2+h.top)*-1,w.x+=f.width*(0,x.relativeValue)(s[R],u,d)-M.width/2,w;case B.Direction.Left:return w.x=(L.right+h.right)*-1,w.y=((M.height-f.height)/2+h.top)*-1,w.x+=f.width-f.width*(0,x.relativeValue)(s[R],u,d)-M.width/2,w;case B.Direction.Up:return w.x=((M.width-f.width)/2+L.left+h.left)*-1,w.y=-h.left,w.y+=f.height-f.height*(0,x.relativeValue)(s[R],u,d)-M.height/2,w;case B.Direction.Down:return w.x=((M.width-f.width)/2+L.left+h.left)*-1,w.y=-h.left,w.y+=f.height*(0,x.relativeValue)(s[R],u,d)-M.height/2,w;default:return(0,x.assertUnreachable)(i)}})},e.getThumbs=function(){return e.trackRef&&e.trackRef.current?Array.from(e.trackRef.current.children).filter(function(a){return a.hasAttribute("aria-valuenow")}):(console.warn("No thumbs found in the track container. Did you forget to pass & spread the `props` param in renderTrack?"),[])},e.getTargetIndex=function(a){return e.getThumbs().findIndex(function(i){return i===a.target||i.contains(a.target)})},e.addTouchEvents=function(a){document.addEventListener("touchmove",e.schdOnTouchMove,{passive:!1}),document.addEventListener("touchend",e.schdOnEnd,{passive:!1}),document.addEventListener("touchcancel",e.schdOnEnd,{passive:!1})},e.addMouseEvents=function(a){document.addEventListener("mousemove",e.schdOnMouseMove),document.addEventListener("mouseup",e.schdOnEnd)},e.onMouseDownTrack=function(a){var i;if(a.button===0)if(a.persist(),a.preventDefault(),e.addMouseEvents(a.nativeEvent),e.props.values.length>1&&e.props.draggableTrack){if(e.thumbRefs.some(function(u){var d;return(d=u.current)===null||d===void 0?void 0:d.contains(a.target)}))return;e.setState({draggedTrackPos:[a.clientX,a.clientY]},function(){return e.onMove(a.clientX,a.clientY)})}else{var s=(0,x.getClosestThumbIndex)(e.thumbRefs.map(function(u){return u.current}),a.clientX,a.clientY,e.props.direction);(i=e.thumbRefs[s].current)===null||i===void 0||i.focus(),e.setState({draggedThumbIndex:s},function(){return e.onMove(a.clientX,a.clientY)})}},e.onResize=function(){(0,x.translateThumbs)(e.getThumbs(),e.getOffsets(),e.props.rtl),e.calculateMarkOffsets()},e.onTouchStartTrack=function(a){var i;if(a.persist(),e.addTouchEvents(a.nativeEvent),e.props.values.length>1&&e.props.draggableTrack){if(e.thumbRefs.some(function(u){var d;return(d=u.current)===null||d===void 0?void 0:d.contains(a.target)}))return;e.setState({draggedTrackPos:[a.touches[0].clientX,a.touches[0].clientY]},function(){return e.onMove(a.touches[0].clientX,a.touches[0].clientY)})}else{var s=(0,x.getClosestThumbIndex)(e.thumbRefs.map(function(u){return u.current}),a.touches[0].clientX,a.touches[0].clientY,e.props.direction);(i=e.thumbRefs[s].current)===null||i===void 0||i.focus(),e.setState({draggedThumbIndex:s},function(){return e.onMove(a.touches[0].clientX,a.touches[0].clientY)})}},e.onMouseOrTouchStart=function(a){if(!e.props.disabled){var i=(0,x.isTouchEvent)(a);if(!(!i&&a.button!==0)){var s=e.getTargetIndex(a);s!==-1&&(i?e.addTouchEvents(a):e.addMouseEvents(a),e.setState({draggedThumbIndex:s,thumbZIndexes:e.state.thumbZIndexes.map(function(u,d){return d===s?Math.max.apply(Math,e.state.thumbZIndexes):u<=e.state.thumbZIndexes[s]?u:u-1})}))}}},e.onMouseMove=function(a){a.preventDefault(),e.onMove(a.clientX,a.clientY)},e.onTouchMove=function(a){a.preventDefault(),e.onMove(a.touches[0].clientX,a.touches[0].clientY)},e.onKeyDown=function(a){var i=e.props,s=i.values,u=i.onChange,d=i.step,y=i.rtl,f=i.direction,h=e.state.isChanged,p=e.getTargetIndex(a.nativeEvent),R=y||f===B.Direction.Left||f===B.Direction.Down?-1:1;p!==-1&&(It.includes(a.key)?(a.preventDefault(),e.setState({draggedThumbIndex:p,isChanged:!0}),u((0,x.replaceAt)(s,p,e.normalizeValue(s[p]+R*(a.key==="PageUp"?d*10:d),p)))):Ct.includes(a.key)?(a.preventDefault(),e.setState({draggedThumbIndex:p,isChanged:!0}),u((0,x.replaceAt)(s,p,e.normalizeValue(s[p]-R*(a.key==="PageDown"?d*10:d),p)))):a.key==="Tab"?e.setState({draggedThumbIndex:-1},function(){h&&e.fireOnFinalChange()}):h&&e.fireOnFinalChange())},e.onKeyUp=function(a){var i=e.state.isChanged;e.setState({draggedThumbIndex:-1},function(){i&&e.fireOnFinalChange()})},e.onMove=function(a,i){var s=e.state,u=s.draggedThumbIndex,d=s.draggedTrackPos,y=e.props,f=y.direction,h=y.min,p=y.max,R=y.onChange,w=y.values,M=y.step,L=y.rtl;if(u===-1&&d[0]===-1&&d[1]===-1)return null;var D=e.trackRef.current;if(!D)return null;var O=D.getBoundingClientRect(),I=(0,x.isVertical)(f)?O.height:O.width;if(d[0]!==-1&&d[1]!==-1){var q=a-d[0],ee=i-d[1],z=0;switch(f){case B.Direction.Right:case B.Direction.Left:z=q/I*(p-h);break;case B.Direction.Down:case B.Direction.Up:z=ee/I*(p-h);break;default:(0,x.assertUnreachable)(f)}if(L&&(z*=-1),Math.abs(z)>=M/2){for(var P=0;P<e.thumbRefs.length;P++){if(w[P]===p&&Math.sign(z)===1||w[P]===h&&Math.sign(z)===-1)return;var Z=w[P]+z;Z>p?z=p-w[P]:Z<h&&(z=h-w[P])}for(var G=w.slice(0),P=0;P<e.thumbRefs.length;P++)G=(0,x.replaceAt)(G,P,e.normalizeValue(w[P]+z,P));e.setState({draggedTrackPos:[a,i]}),R(G)}}else{var $=0;switch(f){case B.Direction.Right:$=(a-O.left)/I*(p-h)+h;break;case B.Direction.Left:$=(I-(a-O.left))/I*(p-h)+h;break;case B.Direction.Down:$=(i-O.top)/I*(p-h)+h;break;case B.Direction.Up:$=(I-(i-O.top))/I*(p-h)+h;break;default:(0,x.assertUnreachable)(f)}L&&($=p+h-$),Math.abs(w[u]-$)>=M/2&&R((0,x.replaceAt)(w,u,e.normalizeValue($,u)))}},e.normalizeValue=function(a,i){var s=e.props,u=s.min,d=s.max,y=s.step,f=s.allowOverlap,h=s.values;return(0,x.normalizeValue)(a,i,u,d,y,f,h)},e.onEnd=function(a){if(a.preventDefault(),document.removeEventListener("mousemove",e.schdOnMouseMove),document.removeEventListener("touchmove",e.schdOnTouchMove),document.removeEventListener("mouseup",e.schdOnEnd),document.removeEventListener("touchend",e.schdOnEnd),document.removeEventListener("touchcancel",e.schdOnEnd),e.state.draggedThumbIndex===-1&&e.state.draggedTrackPos[0]===-1&&e.state.draggedTrackPos[1]===-1)return null;e.setState({draggedThumbIndex:-1,draggedTrackPos:[-1,-1]},function(){e.fireOnFinalChange()})},e.fireOnFinalChange=function(){e.setState({isChanged:!1});var a=e.props,i=a.onFinalChange,s=a.values;i&&i(s)},e.updateMarkRefs=function(a){if(!a.renderMark){e.numOfMarks=void 0,e.markRefs=void 0;return}e.numOfMarks=(a.max-a.min)/e.props.step,e.markRefs=[];for(var i=0;i<e.numOfMarks+1;i++)e.markRefs[i]=pe.createRef()},e.calculateMarkOffsets=function(){if(!(!e.props.renderMark||!e.trackRef||!e.numOfMarks||!e.markRefs||e.trackRef.current===null)){for(var a=window.getComputedStyle(e.trackRef.current),i=parseInt(a.width,10),s=parseInt(a.height,10),u=parseInt(a.paddingLeft,10),d=parseInt(a.paddingTop,10),y=[],f=0;f<e.numOfMarks+1;f++){var h=9999,p=9999;if(e.markRefs[f].current){var R=e.markRefs[f].current.getBoundingClientRect();h=R.height,p=R.width}e.props.direction===B.Direction.Left||e.props.direction===B.Direction.Right?y.push([Math.round(i/e.numOfMarks*f+u-p/2),-Math.round((h-s)/2)]):y.push([Math.round(s/e.numOfMarks*f+d-h/2),-Math.round((p-i)/2)])}e.setState({markOffsets:y})}},r.step===0)throw new Error('"step" property should be a positive number');return e.schdOnMouseMove=(0,x.schd)(e.onMouseMove),e.schdOnTouchMove=(0,x.schd)(e.onTouchMove),e.schdOnEnd=(0,x.schd)(e.onEnd),e.thumbRefs=r.values.map(function(){return pe.createRef()}),e.updateMarkRefs(r),e}return n.prototype.componentDidMount=function(){var r=this,e=this.props,a=e.values,i=e.min,s=e.step;this.resizeObserver=window.ResizeObserver?new window.ResizeObserver(this.onResize):{observe:function(){return window.addEventListener("resize",r.onResize)},unobserve:function(){return window.removeEventListener("resize",r.onResize)}},document.addEventListener("touchstart",this.onMouseOrTouchStart,{passive:!1}),document.addEventListener("mousedown",this.onMouseOrTouchStart,{passive:!1}),!this.props.allowOverlap&&(0,x.checkInitialOverlap)(this.props.values),this.props.values.forEach(function(u){return(0,x.checkBoundaries)(u,r.props.min,r.props.max)}),this.resizeObserver.observe(this.trackRef.current),(0,x.translateThumbs)(this.getThumbs(),this.getOffsets(),this.props.rtl),this.calculateMarkOffsets(),a.forEach(function(u){(0,x.isStepDivisible)(i,u,s)||console.warn("The `values` property is in conflict with the current `step`, `min`, and `max` properties. Please provide values that are accessible using the min, max, and step values.")})},n.prototype.componentDidUpdate=function(r,e){var a=this.props,i=a.max,s=a.min,u=a.step,d=a.values,y=a.rtl;(r.max!==i||r.min!==s||r.step!==u)&&this.updateMarkRefs(this.props),(0,x.translateThumbs)(this.getThumbs(),this.getOffsets(),y),(r.max!==i||r.min!==s||r.step!==u||e.markOffsets.length!==this.state.markOffsets.length)&&(this.calculateMarkOffsets(),d.forEach(function(f){(0,x.isStepDivisible)(s,f,u)||console.warn("The `values` property is in conflict with the current `step`, `min`, and `max` properties. Please provide values that are accessible using the min, max, and step values.")}))},n.prototype.componentWillUnmount=function(){var r={passive:!1};document.removeEventListener("mousedown",this.onMouseOrTouchStart,r),document.removeEventListener("mousemove",this.schdOnMouseMove),document.removeEventListener("touchmove",this.schdOnTouchMove),document.removeEventListener("touchstart",this.onMouseOrTouchStart),document.removeEventListener("mouseup",this.schdOnEnd),document.removeEventListener("touchend",this.schdOnEnd),this.resizeObserver.unobserve(this.trackRef.current)},n.prototype.render=function(){var r=this,e=this.props,a=e.renderTrack,i=e.renderThumb,s=e.renderMark,u=s===void 0?function(){return null}:s,d=e.values,y=e.min,f=e.max,h=e.allowOverlap,p=e.disabled,R=this.state,w=R.draggedThumbIndex,M=R.thumbZIndexes,L=R.markOffsets;return a({props:{style:{transform:"scale(1)",cursor:w>-1?"grabbing":this.props.draggableTrack?(0,x.isVertical)(this.props.direction)?"ns-resize":"ew-resize":d.length===1&&!p?"pointer":"inherit"},onMouseDown:p?x.voidFn:this.onMouseDownTrack,onTouchStart:p?x.voidFn:this.onTouchStartTrack,ref:this.trackRef},isDragged:this.state.draggedThumbIndex>-1,disabled:p,children:Ue(Ue([],L.map(function(D,O,I){return u({props:{style:r.props.direction===B.Direction.Left||r.props.direction===B.Direction.Right?{position:"absolute",left:"".concat(D[0],"px"),marginTop:"".concat(D[1],"px")}:{position:"absolute",top:"".concat(D[0],"px"),marginLeft:"".concat(D[1],"px")},key:"mark".concat(O),ref:r.markRefs[O]},index:O})}),!0),d.map(function(D,O){var I=r.state.draggedThumbIndex===O;return i({index:O,value:D,isDragged:I,props:{style:{position:"absolute",zIndex:M[O],cursor:p?"inherit":I?"grabbing":"grab",userSelect:"none",touchAction:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none"},key:O,tabIndex:p?void 0:0,"aria-valuemax":h?f:d[O+1]||f,"aria-valuemin":h?y:d[O-1]||y,"aria-valuenow":D,draggable:!1,ref:r.thumbRefs[O],role:"slider",onKeyDown:p?x.voidFn:r.onKeyDown,onKeyUp:p?x.voidFn:r.onKeyUp}})}),!0)})},n.defaultProps={step:1,direction:B.Direction.Right,rtl:!1,disabled:!1,allowOverlap:!1,draggableTrack:!1,min:0,max:100},n}(pe.Component);Ee.default=Pt,function(t){var n=N&&N.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(t,"__esModule",{value:!0}),t.checkValuesAgainstBoundaries=t.relativeValue=t.useThumbOverlap=t.Direction=t.getTrackBackground=t.Range=void 0;var r=n(Ee);t.Range=r.default;var e=Ie;Object.defineProperty(t,"getTrackBackground",{enumerable:!0,get:function(){return e.getTrackBackground}}),Object.defineProperty(t,"useThumbOverlap",{enumerable:!0,get:function(){return e.useThumbOverlap}}),Object.defineProperty(t,"relativeValue",{enumerable:!0,get:function(){return e.relativeValue}}),Object.defineProperty(t,"checkValuesAgainstBoundaries",{enumerable:!0,get:function(){return e.checkValuesAgainstBoundaries}});var a=fe;Object.defineProperty(t,"Direction",{enumerable:!0,get:function(){return a.Direction}})}(De);function He(t,n){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);n&&(e=e.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,e)}return r}function ge(t){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?He(Object(r),!0).forEach(function(e){jt(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):He(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function jt(t,n,r){return n in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t}var me=Q("div",{position:"relative",width:"100%"});me.displayName="Root",me.displayName="Root",me.displayName="StyledRoot";var ve=Q("div",function(t){var n=t.$theme,r=t.$value,e=r===void 0?[]:r,a=t.$disabled,i=t.$isDragged,s=n.sizing,u="inherit";return a?u="not-allowed":i?u="grabbing":e.length===1&&(u="pointer"),{paddingTop:s.scale600,paddingBottom:s.scale600,paddingRight:s.scale600,paddingLeft:s.scale600,display:"flex",cursor:u,backgroundColor:n.colors.sliderTrackFill}});ve.displayName="Track",ve.displayName="Track",ve.displayName="StyledTrack";var be=Q("div",function(t){var n=t.$theme,r=t.$value,e=r===void 0?[]:r,a=t.$min,i=t.$max,s=t.$disabled,u=n.colors,d=n.borders,y=n.direction,f=n.borders.useRoundedCorners?d.radius100:0;return{borderTopLeftRadius:f,borderTopRightRadius:f,borderBottomRightRadius:f,borderBottomLeftRadius:f,background:De.getTrackBackground({values:e,colors:e.length===1?[s?u.borderOpaque:u.primary,s?u.backgroundSecondary:u.borderOpaque]:[s?u.backgroundSecondary:u.borderOpaque,s?u.borderOpaque:u.primary,s?u.backgroundSecondary:u.borderOpaque],min:a||0,max:i||0,rtl:y==="rtl"}),height:"2px",width:"100%",alignSelf:"center",cursor:s?"not-allowed":"inherit"}});be.displayName="InnerTrack",be.displayName="InnerTrack",be.displayName="StyledInnerTrack";var ye=Q("div",function(t){return{width:"4px",height:"2px",backgroundColor:t.$theme.colors.backgroundPrimary,marginLeft:"16px"}});ye.displayName="Mark",ye.displayName="Mark",ye.displayName="StyledMark";var we=Q("div",function(t){return ge(ge({},t.$theme.typography.font200),{},{color:t.$theme.colors.contentPrimary})});we.displayName="Tick",we.displayName="Tick",we.displayName="StyledTick";var Te=Q("div",function(t){var n=t.$theme,r=n.sizing;return{display:"flex",justifyContent:"space-between",alignItems:"center",paddingRight:r.scale600,paddingLeft:r.scale600,paddingBottom:r.scale400}});Te.displayName="TickBar",Te.displayName="TickBar",Te.displayName="StyledTickBar";var xe=Q("div",function(t){var n=t.$theme,r=t.$value,e=r===void 0?[]:r,a=t.$thumbIndex,i=t.$disabled,s=e.length===2&&a===0,u=e.length===2&&a===1;return n.direction==="rtl"&&(u||s)&&(s=!s,u=!u),{height:"24px",width:"24px",borderTopLeftRadius:"24px",borderTopRightRadius:"24px",borderBottomLeftRadius:"24px",borderBottomRightRadius:"24px",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:i?n.colors.sliderHandleFillDisabled:n.colors.sliderHandleFill,outline:"none",boxShadow:t.$isFocusVisible?"0 0 0 3px ".concat(n.colors.accent):"0 1px 4px rgba(0, 0, 0, 0.12)",cursor:i?"not-allowed":"inherit"}});xe.displayName="Thumb",xe.displayName="Thumb",xe.displayName="StyledThumb";var ke=Q("div",function(t){var n=t.$disabled,r=t.$theme;return{position:"absolute",top:"-16px",width:"4px",height:"20px",backgroundColor:n?r.colors.sliderHandleFillDisabled:r.colors.sliderHandleInnerFill}});ke.displayName="InnerThumb",ke.displayName="InnerThumb",ke.displayName="StyledInnerThumb";var Oe=Q("div",function(t){var n=t.$disabled,r=t.$theme;return ge(ge({position:"absolute",top:"-".concat(r.sizing.scale1400)},r.typography.font200),{},{backgroundColor:n?r.colors.sliderHandleFillDisabled:r.colors.sliderHandleInnerFill,color:r.colors.contentInversePrimary,paddingLeft:r.sizing.scale600,paddingRight:r.sizing.scale600,paddingTop:r.sizing.scale500,paddingBottom:r.sizing.scale500,borderBottomLeftRadius:"48px",borderBottomRightRadius:"48px",borderTopLeftRadius:"48px",borderTopRightRadius:"48px",whiteSpace:"nowrap"})});Oe.displayName="ThumbValue",Oe.displayName="ThumbValue",Oe.displayName="StyledThumbValue";function Xe(t,n){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);n&&(e=e.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,e)}return r}function Bt(t){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?Xe(Object(r),!0).forEach(function(e){Lt(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Xe(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function Lt(t,n,r){return n in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t}function X(){return X=Object.assign?Object.assign.bind():function(t){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])}return t},X.apply(this,arguments)}function K(t,n){return zt(t)||Ft(t,n)||$t(t,n)||At()}function At(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $t(t,n){if(t){if(typeof t=="string")return Ke(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ke(t,n)}}function Ke(t,n){(n==null||n>t.length)&&(n=t.length);for(var r=0,e=new Array(n);r<n;r++)e[r]=t[r];return e}function Ft(t,n){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var e=[],a=!0,i=!1,s,u;try{for(r=r.call(t);!(a=(s=r.next()).done)&&(e.push(s.value),!(n&&e.length===n));a=!0);}catch(d){i=!0,u=d}finally{try{!a&&r.return!=null&&r.return()}finally{if(i)throw u}}return e}}function zt(t){if(Array.isArray(t))return t}var Vt=function(t){if(t.length>2||t.length===0)throw new Error("the value prop represents positions of thumbs, so its length can be only one or two");return t};function Nt(t){var n=t.overrides,r=n===void 0?{}:n,e=t.disabled,a=e===void 0?!1:e,i=t.marks,s=i===void 0?!1:i,u=t.onChange,d=u===void 0?function(){}:u,y=t.onFinalChange,f=y===void 0?function(){}:y,h=t.min,p=h===void 0?0:h,R=t.max,w=R===void 0?100:R,M=t.step,L=M===void 0?1:M,D=t.persistentThumb,O=D===void 0?!1:D,I=t.valueToLabel,q=I===void 0?function(C){return C}:I,ee=t.value,z=k.useContext(dt),P=k.useState(!1),Z=K(P,2),G=Z[0],$=Z[1],o=k.useState(!1),c=K(o,2),l=c[0],g=c[1],v=k.useState(!1),m=K(v,2),T=m[0],b=m[1],E=k.useState(-1),S=K(E,2),_=S[0],F=S[1],U=k.useCallback(function(C){ht(C)&&b(!0);var W=C.target.parentNode.firstChild===C.target?0:1;F(W)},[]),j=k.useCallback(function(C){T!==!1&&b(!1),F(-1)},[]),V=Vt(ee),A={$disabled:a,$step:L,$min:p,$max:w,$marks:s,$value:V,$isFocusVisible:T},re=J(r.Root,me),se=K(re,2),ae=se[0],ie=se[1],Re=J(r.Track,ve),ue=K(Re,2),Me=ue[0],te=ue[1],le=J(r.InnerTrack,be),ce=K(le,2),de=ce[0],Ye=ce[1],qe=J(r.Thumb,xe),Pe=K(qe,2),Ze=Pe[0],Ge=Pe[1],Qe=J(r.InnerThumb,ke),je=K(Qe,2),Je=je[0],et=je[1],tt=J(r.ThumbValue,Oe),Be=K(tt,2),nt=Be[0],rt=Be[1],at=J(r.Tick,we),Le=K(at,2),Ae=Le[0],$e=Le[1],it=J(r.TickBar,Te),Fe=K(it,2),ot=Fe[0],st=Fe[1],ut=J(r.Mark,ye),ze=K(ut,2),ct=ze[0],lt=ze[1];return k.createElement(ae,X({"data-baseweb":"slider"},A,ie,{onFocus:ft(ie,U),onBlur:pt(ie,j)}),k.createElement(De.Range,X({step:L,min:p,max:w,values:V,disabled:a,onChange:function(C){return d({value:C})},onFinalChange:function(C){return f({value:C})},rtl:z.direction==="rtl",renderTrack:function(C){var W=C.props,H=C.children,ne=C.isDragged;return k.createElement(Me,X({onMouseDown:W.onMouseDown,onTouchStart:W.onTouchStart,$isDragged:ne},A,te),k.createElement(de,X({$isDragged:ne,ref:W.ref},A,Ye),H))},renderThumb:function(C){var W=C.props,H=C.index,ne=C.isDragged,Ve=O||(!!H&&l||!H&&G||ne)&&!a;return k.createElement(Ze,X({},W,{onMouseEnter:function(){H===0?$(!0):g(!0)},onMouseLeave:function(){H===0?$(!1):g(!1)},$thumbIndex:H,$isDragged:ne,style:Bt({},W.style)},A,Ge,{$isFocusVisible:T&&_===H}),Ve&&k.createElement(nt,X({$thumbIndex:H,$isDragged:ne},A,rt),q(V[H])),Ve&&k.createElement(Je,X({$thumbIndex:H,$isDragged:ne},A,et)))}},s?{renderMark:function(C){var W=C.props,H=C.index;return k.createElement(ct,X({$markIndex:H},W,A,lt))}}:{})),k.createElement(ot,X({},A,st),k.createElement(Ae,X({},A,$e),q(p)),k.createElement(Ae,X({},A,$e),q(w))))}const _t=he("div",{target:"ew7r33m3"})(({disabled:t,theme:n})=>({alignItems:"center",backgroundColor:t?n.colors.gray:n.colors.primary,borderTopLeftRadius:"100%",borderTopRightRadius:"100%",borderBottomLeftRadius:"100%",borderBottomRightRadius:"100%",borderTopStyle:"none",borderBottomStyle:"none",borderRightStyle:"none",borderLeftStyle:"none",boxShadow:"none",display:"flex",justifyContent:"center",height:n.sizes.sliderThumb,width:n.sizes.sliderThumb,":focus":{outline:"none"},":focus-visible":{boxShadow:`0 0 0 0.2rem ${gt(n.colors.primary,.5)}`}}),""),Ut=he("div",{target:"ew7r33m2"})(({disabled:t,theme:n})=>({fontFamily:n.genericFonts.codeFont,fontSize:n.fontSizes.sm,color:t?n.colors.gray:n.colors.primary,top:"-1.6em",position:"absolute",whiteSpace:"nowrap",backgroundColor:n.colors.transparent,lineHeight:n.lineHeights.base,fontWeight:n.fontWeights.normal,pointerEvents:"none"}),""),Ht=he("div",{target:"ew7r33m1"})(({theme:t})=>({fontSize:t.fontSizes.sm,paddingBottom:t.spacing.none,paddingLeft:t.spacing.none,paddingRight:t.spacing.none,paddingTop:"0.65em",justifyContent:"space-between",alignItems:"center",display:"flex"}),""),We=he("div",{target:"ew7r33m0"})(({disabled:t,theme:n})=>({lineHeight:n.lineHeights.base,fontWeight:n.fontWeights.normal,fontFamily:n.genericFonts.codeFont,color:t?n.colors.fadedText40:"inherit"}),""),Xt=200;function Kt({disabled:t,element:n,widgetMgr:r,width:e,fragmentId:a}){var $;const[i,s]=Rt({getStateFromWidgetMgr:Wt,getDefaultStateFromProto:Yt,getCurrStateFromProto:qt,updateWidgetMgrState:Zt,element:n,widgetMgr:r,fragmentId:a}),[u,d]=k.useState(i),y=k.useRef(null),[f]=k.useState([]),[h]=k.useState([]),{colors:p,fonts:R,fontSizes:w,spacing:M}=mt(),L={width:e},D=u.map(o=>Ce(o,n)),O=Ce(n.min,n),I=Ce(n.max,n),q=n.label;k.useEffect(()=>{d(i)},[i]);const ee=k.useCallback(vt(Xt,o=>{s({value:o,fromUi:!0})}),[]),z=k.useCallback(({value:o})=>{d(o),ee(o)},[ee]),P=k.useCallback(()=>Y.jsxs(Ht,{"data-testid":"stSliderTickBar",children:[Y.jsx(We,{disabled:t,"data-testid":"stSliderTickBarMin",children:O}),Y.jsx(We,{disabled:t,"data-testid":"stSliderTickBarMax",children:I})]}),[O,I,t]),Z=k.useCallback(Ne.forwardRef(function(o,c){const{$thumbIndex:l}=o,g=l||0;f[g]=c,h[g]||(h[g]=Ne.createRef());const v=bt(o,["role","style","aria-valuemax","aria-valuemin","aria-valuenow","tabIndex","onKeyUp","onKeyDown","onMouseEnter","onMouseLeave","draggable"]),m=D[g];return Y.jsx(_t,{...v,disabled:o.$disabled===!0,ref:f[g],"aria-valuetext":m,"aria-label":q,children:Y.jsx(Ut,{"data-testid":"stSliderThumbValue",disabled:o.$disabled===!0,ref:h[g],children:m})})}),[]);k.useEffect(()=>{var m,T;h.map((b,E)=>{b.current&&(b.current.innerText=D[E])}),f.map((b,E)=>{b.current&&b.current.setAttribute("aria-valuetext",D[E])});const o=y.current??null,c=f[0].current,l=(m=f[1])==null?void 0:m.current,g=h[0].current,v=(T=h[1])==null?void 0:T.current;Jt(o,c,l,g,v)});const G=k.useCallback(({$disabled:o})=>({height:M.twoXS,...o?{background:p.darkenedBgMix25}:{}}),[p,M]);return Y.jsxs("div",{ref:y,className:"stSlider","data-testid":"stSlider",style:L,children:[Y.jsx(yt,{label:n.label,disabled:t,labelVisibility:wt(($=n.labelVisibility)==null?void 0:$.value),children:n.help&&Y.jsx(Tt,{children:Y.jsx(xt,{content:n.help,placement:kt.TOP_RIGHT})})}),Y.jsx(Nt,{min:n.min,max:n.max,step:n.step,value:Qt(u,n),onChange:z,disabled:t,overrides:{Thumb:Z,Tick:{style:{fontFamily:R.monospace}},Track:{style:{backgroundColor:"none !important",paddingBottom:M.none,paddingLeft:M.none,paddingRight:M.none,paddingTop:`calc(${w.sm} * 1.35)`}},InnerTrack:{style:G},TickBar:P}})]})}function Wt(t,n){return t.getDoubleArrayValue(n)}function Yt(t){return t.default}function qt(t){return t.value}function Zt(t,n,r,e){n.setDoubleArrayValue(t,r.value,{fromUi:r.fromUi},e)}function Gt(t){const{dataType:n}=t;return n===Se.DataType.DATETIME||n===Se.DataType.DATE||n===Se.DataType.TIME}function Ce(t,n){const{format:r,options:e}=n;return Gt(n)?Ot.utc(t/1e3).format(r):e.length>0?_e.sprintf(r,e[t]):_e.sprintf(r,t)}function Qt(t,n){const{min:r,max:e}=n;let a=t[0],i=t.length>1?t[1]:t[0];return a>i&&(a=i),a<r&&(a=r),a>e&&(a=e),i<r&&(i=r),i>e&&(i=e),t.length>1?[a,i]:[a]}function Jt(t,n,r,e,a){!t||!n||!e||(oe(t,n,e),r&&a&&(oe(t,r,a),en(t,n,r,e,a)))}function oe(t,n,r){const e=t.getBoundingClientRect(),a=n.getBoundingClientRect(),i=r.getBoundingClientRect(),s=a.left+a.width/2,u=s-i.width/2<e.left,d=s+i.width/2>e.right;r.style.left=u?"0":"",r.style.right=d?"0":""}function en(t,n,r,e,a){const i=t.getBoundingClientRect(),s=n.getBoundingClientRect(),u=r.getBoundingClientRect(),d=e.getBoundingClientRect(),y=a.getBoundingClientRect(),f=i.left+i.width/2,h=s.left+s.width/2,p=u.left+u.width/2,R=h-d.width/2>=i.left,w=p+y.width/2<=i.right,M=s.left-d.width>=i.left,L=u.right+y.width<=i.right,D=R?d.width/2:d.width,O=w?y.width/2:y.width,I=h+D;if(p-O-I>24){oe(t,n,e),oe(t,r,a);return}if(M&&L){e.style.left="",e.style.right=`${Math.round(s.width)}px`,a.style.left=`${Math.round(u.width)}px`,a.style.right="";return}h<f?(oe(t,n,e),a.style.left=`${Math.round(h+D+24-p)}px`,a.style.right=""):(oe(t,r,a),e.style.left="",e.style.right=`${-Math.round(p-O-24-h)}px`)}const tn=k.memo(Kt);export{tn as default};
@@ -1,4 +1,4 @@
1
- var eO=Object.defineProperty;var iO=(e,t,i)=>t in e?eO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;var z=(e,t,i)=>iO(e,typeof t!="symbol"?t+"":t,i);var y5,mw;import{g as jf,r as re,U as Ge,p as Ht,e as JE,ap as fu,_ as YE,Z as rO,j as wr,aq as zy,ar as Uy,as as nO,at as oO,au as $E,a6 as sO,av as aO,aj as lO,c as tC,a5 as eC,aw as Gy,ax as iC,$ as cO,M as uO,ay as rC}from"./index-B-xJO1Ho.js";import{_ as Gn,C as hO}from"./slicedToArray-DFtVT9Ta.js";import{b as du,a as pu,_ as jy,c as Vf,d as Vy}from"./getPrototypeOf-CddPd8GH.js";import{T as fO,a as dO}from"./Toolbar-CTzbm8jh.js";import{u as nC,E as oC,w as pO}from"./withFullScreenWrapper--g6uY0Wf.js";import{u as AO}from"./useBasicWidgetState-H1nJNjQy.js";import{c as gO}from"./_commonjs-dynamic-modules-TDtrdbi3.js";import{D as mO,C as _O}from"./threshold-C19zgWBv.js";import"./FormClearHelper-9eaBETaU.js";import"./string-Bl9OLDCw.js";function yO(e,t){for(var i=0;i<t.length;i++){const r=t[i];if(typeof r!="string"&&!Array.isArray(r)){for(const n in r)if(n!=="default"&&!(n in e)){const s=Object.getOwnPropertyDescriptor(r,n);s&&Object.defineProperty(e,n,s.get?s:{enumerable:!0,get:()=>r[n]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}async function Hf(e,t,i,r){return r._parse(e,t,i,r)}function Gr(e,t){if(!e)throw new Error(t||"loader assertion failed.")}const K0=!!(typeof process!="object"||String(process)!=="[object process]"||process.browser),sC=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version);sC&&parseFloat(sC[1]);const Q0=globalThis,Wf=globalThis.process||{},vO=globalThis.navigator||{};function aC(e){var i,r;if(typeof window<"u"&&((i=window.process)==null?void 0:i.type)==="renderer"||typeof process<"u"&&((r=process.versions)!=null&&r.electron))return!0;const t=typeof navigator<"u"&&navigator.userAgent;return!!(t&&t.indexOf("Electron")>=0)}function Au(){return!(typeof process=="object"&&String(process)==="[object process]"&&!(process!=null&&process.browser))||aC()}function bO(e){return Au()?aC()?"Electron":(vO.userAgent||"").indexOf("Edge")>-1?"Edge":globalThis.chrome?"Chrome":globalThis.safari?"Safari":globalThis.mozInnerScreenX?"Firefox":"Unknown":"Node"}const lC="4.0.7";function xO(e){try{const t=window[e],i="__storage_test__";return t.setItem(i,i),t.removeItem(i),t}catch{return null}}class wO{constructor(t,i,r="sessionStorage"){this.storage=xO(r),this.id=t,this.config=i,this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(t){if(Object.assign(this.config,t),this.storage){const i=JSON.stringify(this.config);this.storage.setItem(this.id,i)}}_loadConfiguration(){let t={};if(this.storage){const i=this.storage.getItem(this.id);t=i?JSON.parse(i):{}}return Object.assign(this.config,t),this}}function EO(e){let t;return e<10?t=`${e.toFixed(2)}ms`:e<100?t=`${e.toFixed(1)}ms`:e<1e3?t=`${e.toFixed(0)}ms`:t=`${(e/1e3).toFixed(2)}s`,t}function CO(e,t=8){const i=Math.max(t-e.length,0);return`${" ".repeat(i)}${e}`}var J0;(function(e){e[e.BLACK=30]="BLACK",e[e.RED=31]="RED",e[e.GREEN=32]="GREEN",e[e.YELLOW=33]="YELLOW",e[e.BLUE=34]="BLUE",e[e.MAGENTA=35]="MAGENTA",e[e.CYAN=36]="CYAN",e[e.WHITE=37]="WHITE",e[e.BRIGHT_BLACK=90]="BRIGHT_BLACK",e[e.BRIGHT_RED=91]="BRIGHT_RED",e[e.BRIGHT_GREEN=92]="BRIGHT_GREEN",e[e.BRIGHT_YELLOW=93]="BRIGHT_YELLOW",e[e.BRIGHT_BLUE=94]="BRIGHT_BLUE",e[e.BRIGHT_MAGENTA=95]="BRIGHT_MAGENTA",e[e.BRIGHT_CYAN=96]="BRIGHT_CYAN",e[e.BRIGHT_WHITE=97]="BRIGHT_WHITE"})(J0||(J0={}));const SO=10;function cC(e){return typeof e!="string"?e:(e=e.toUpperCase(),J0[e]||J0.WHITE)}function TO(e,t,i){return!Au&&typeof e=="string"&&(t&&(e=`\x1B[${cC(t)}m${e}\x1B[39m`),i&&(e=`\x1B[${cC(i)+SO}m${e}\x1B[49m`)),e}function IO(e,t=["constructor"]){const i=Object.getPrototypeOf(e),r=Object.getOwnPropertyNames(i),n=e;for(const s of r){const o=n[s];typeof o=="function"&&(t.find(f=>s===f)||(n[s]=o.bind(e)))}}function Hy(e,t){if(!e)throw new Error("Assertion failed")}function qf(){var t,i,r;let e;if(Au()&&Q0.performance)e=(i=(t=Q0==null?void 0:Q0.performance)==null?void 0:t.now)==null?void 0:i.call(t);else if("hrtime"in Wf){const n=(r=Wf==null?void 0:Wf.hrtime)==null?void 0:r.call(Wf);e=n[0]*1e3+n[1]/1e6}else e=Date.now();return e}const Zf={debug:Au()&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},PO={enabled:!0,level:0};function Xf(){}const uC={},hC={once:!0};class Kf{constructor({id:t}={id:""}){this.VERSION=lC,this._startTs=qf(),this._deltaTs=qf(),this.userData={},this.LOG_THROTTLE_TIMEOUT=0,this.id=t,this.userData={},this._storage=new wO(`__probe-${this.id}__`,PO),this.timeStamp(`${this.id} started`),IO(this),Object.seal(this)}set level(t){this.setLevel(t)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((qf()-this._startTs).toPrecision(10))}getDelta(){return Number((qf()-this._deltaTs).toPrecision(10))}set priority(t){this.level=t}get priority(){return this.level}getPriority(){return this.level}enable(t=!0){return this._storage.setConfiguration({enabled:t}),this}setLevel(t){return this._storage.setConfiguration({level:t}),this}get(t){return this._storage.config[t]}set(t,i){this._storage.setConfiguration({[t]:i})}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}assert(t,i){if(!t)throw new Error(i||"Assertion failed")}warn(t){return this._getLogFunction(0,t,Zf.warn,arguments,hC)}error(t){return this._getLogFunction(0,t,Zf.error,arguments)}deprecated(t,i){return this.warn(`\`${t}\` is deprecated and will be removed in a later version. Use \`${i}\` instead`)}removed(t,i){return this.error(`\`${t}\` has been removed. Use \`${i}\` instead`)}probe(t,i){return this._getLogFunction(t,i,Zf.log,arguments,{time:!0,once:!0})}log(t,i){return this._getLogFunction(t,i,Zf.debug,arguments)}info(t,i){return this._getLogFunction(t,i,console.info,arguments)}once(t,i){return this._getLogFunction(t,i,Zf.debug||Zf.info,arguments,hC)}table(t,i,r){return i?this._getLogFunction(t,i,console.table||Xf,r&&[r],{tag:BO(i)}):Xf}time(t,i){return this._getLogFunction(t,i,console.time?console.time:console.info)}timeEnd(t,i){return this._getLogFunction(t,i,console.timeEnd?console.timeEnd:console.info)}timeStamp(t,i){return this._getLogFunction(t,i,console.timeStamp||Xf)}group(t,i,r={collapsed:!1}){const n=dC({logLevel:t,message:i,opts:r}),{collapsed:s}=r;return n.method=(s?console.groupCollapsed:console.group)||console.info,this._getLogFunction(n)}groupCollapsed(t,i,r={}){return this.group(t,i,Object.assign({},r,{collapsed:!0}))}groupEnd(t){return this._getLogFunction(t,"",console.groupEnd||Xf)}withGroup(t,i,r){this.group(t,i)();try{r()}finally{this.groupEnd(t)()}}trace(){console.trace&&console.trace()}_shouldLog(t){return this.isEnabled()&&this.getLevel()>=fC(t)}_getLogFunction(t,i,r,n,s){if(this._shouldLog(t)){s=dC({logLevel:t,message:i,args:n,opts:s}),r=r||s.method,Hy(r),s.total=this.getTotal(),s.delta=this.getDelta(),this._deltaTs=qf();const o=s.tag||s.message;if(s.once&&o)if(!uC[o])uC[o]=qf();else return Xf;return i=MO(this.id,s.message,s),r.bind(console,i,...s.args)}return Xf}}Kf.VERSION=lC;function fC(e){if(!e)return 0;let t;switch(typeof e){case"number":t=e;break;case"object":t=e.logLevel||e.priority||0;break;default:return 0}return Hy(Number.isFinite(t)&&t>=0),t}function dC(e){const{logLevel:t,message:i}=e;e.logLevel=fC(t);const r=e.args?Array.from(e.args):[];for(;r.length&&r.shift()!==i;);switch(typeof t){case"string":case"function":i!==void 0&&r.unshift(i),e.message=t;break;case"object":Object.assign(e,t);break}typeof e.message=="function"&&(e.message=e.message());const n=typeof e.message;return Hy(n==="string"||n==="object"),Object.assign(e,{args:r},e.opts)}function MO(e,t,i){if(typeof t=="string"){const r=i.time?CO(EO(i.total)):"";t=i.time?`${e}: ${r} ${t}`:`${e}: ${t}`,t=TO(t,i.color,i.background)}return t}function BO(e){for(const t in e)for(const i in e[t])return i||"untitled";return"empty"}globalThis.probe={};const pC=new Kf({id:"@probe.gl/log"}),Wy="4.3.1",RO=Wy[0]>="0"&&Wy[0]<="9"?`v${Wy}`:"";function LO(){const e=new Kf({id:"loaders.gl"});return globalThis.loaders=globalThis.loaders||{},globalThis.loaders.log=e,globalThis.loaders.version=RO,globalThis.probe=globalThis.probe||{},globalThis.probe.loaders=e,e}const AC=LO();function gC(e,t){return mC(e||{},t)}function mC(e,t,i=0){if(i>3)return t;const r={...e};for(const[n,s]of Object.entries(t))s&&typeof s=="object"&&!Array.isArray(s)?r[n]=mC(r[n]||{},t[n],i+1):r[n]=t[n];return r}function DO(e){var t;globalThis.loaders||(globalThis.loaders={}),(t=globalThis.loaders).modules||(t.modules={}),Object.assign(globalThis.loaders.modules,e)}function OO(e){var t,i;return((i=(t=globalThis.loaders)==null?void 0:t.modules)==null?void 0:i[e])||null}const kO="latest";function FO(){var e;return(e=globalThis._loadersgl_)!=null&&e.version||(globalThis._loadersgl_=globalThis._loadersgl_||{},globalThis._loadersgl_.version="4.3.1"),globalThis._loadersgl_.version}const _C=FO();function Ac(e,t){if(!e)throw new Error(t||"loaders.gl assertion failed.")}const va=typeof process!="object"||String(process)!=="[object process]"||process.browser,qy=typeof importScripts=="function",NO=typeof window<"u"&&typeof window.orientation<"u",yC=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version);yC&&parseFloat(yC[1]);class zO{constructor(t,i){z(this,"name");z(this,"workerThread");z(this,"isRunning",!0);z(this,"result");z(this,"_resolve",()=>{});z(this,"_reject",()=>{});this.name=t,this.workerThread=i,this.result=new Promise((r,n)=>{this._resolve=r,this._reject=n})}postMessage(t,i){this.workerThread.postMessage({source:"loaders.gl",type:t,payload:i})}done(t){Ac(this.isRunning),this.isRunning=!1,this._resolve(t)}error(t){Ac(this.isRunning),this.isRunning=!1,this._reject(t)}}class Zy{terminate(){}}const Xy=new Map;function UO(e){Ac(e.source&&!e.url||!e.source&&e.url);let t=Xy.get(e.source||e.url);return t||(e.url&&(t=GO(e.url),Xy.set(e.url,t)),e.source&&(t=vC(e.source),Xy.set(e.source,t))),Ac(t),t}function GO(e){if(!e.startsWith("http"))return e;const t=jO(e);return vC(t)}function vC(e){const t=new Blob([e],{type:"application/javascript"});return URL.createObjectURL(t)}function jO(e){return`try {
1
+ var eO=Object.defineProperty;var iO=(e,t,i)=>t in e?eO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;var z=(e,t,i)=>iO(e,typeof t!="symbol"?t+"":t,i);var y5,mw;import{g as jf,r as re,U as Ge,p as Ht,e as JE,ap as fu,_ as YE,Z as rO,j as wr,aq as zy,ar as Uy,as as nO,at as oO,au as $E,a6 as sO,av as aO,aj as lO,c as tC,a5 as eC,aw as Gy,ax as iC,$ as cO,M as uO,ay as rC}from"./index-lyJc68Dt.js";import{_ as Gn,C as hO}from"./slicedToArray-C3Kk8BEP.js";import{b as du,a as pu,_ as jy,c as Vf,d as Vy}from"./getPrototypeOf-Bfvf6jYJ.js";import{T as fO,a as dO}from"./Toolbar-BTpOoeAP.js";import{u as nC,E as oC,w as pO}from"./withFullScreenWrapper-BggmGF09.js";import{u as AO}from"./useBasicWidgetState-BzSjsdCt.js";import{c as gO}from"./_commonjs-dynamic-modules-TDtrdbi3.js";import{D as mO,C as _O}from"./threshold-C19zgWBv.js";import"./FormClearHelper-Dhc_r76k.js";import"./string-Bl9OLDCw.js";function yO(e,t){for(var i=0;i<t.length;i++){const r=t[i];if(typeof r!="string"&&!Array.isArray(r)){for(const n in r)if(n!=="default"&&!(n in e)){const s=Object.getOwnPropertyDescriptor(r,n);s&&Object.defineProperty(e,n,s.get?s:{enumerable:!0,get:()=>r[n]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}async function Hf(e,t,i,r){return r._parse(e,t,i,r)}function Gr(e,t){if(!e)throw new Error(t||"loader assertion failed.")}const K0=!!(typeof process!="object"||String(process)!=="[object process]"||process.browser),sC=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version);sC&&parseFloat(sC[1]);const Q0=globalThis,Wf=globalThis.process||{},vO=globalThis.navigator||{};function aC(e){var i,r;if(typeof window<"u"&&((i=window.process)==null?void 0:i.type)==="renderer"||typeof process<"u"&&((r=process.versions)!=null&&r.electron))return!0;const t=typeof navigator<"u"&&navigator.userAgent;return!!(t&&t.indexOf("Electron")>=0)}function Au(){return!(typeof process=="object"&&String(process)==="[object process]"&&!(process!=null&&process.browser))||aC()}function bO(e){return Au()?aC()?"Electron":(vO.userAgent||"").indexOf("Edge")>-1?"Edge":globalThis.chrome?"Chrome":globalThis.safari?"Safari":globalThis.mozInnerScreenX?"Firefox":"Unknown":"Node"}const lC="4.0.7";function xO(e){try{const t=window[e],i="__storage_test__";return t.setItem(i,i),t.removeItem(i),t}catch{return null}}class wO{constructor(t,i,r="sessionStorage"){this.storage=xO(r),this.id=t,this.config=i,this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(t){if(Object.assign(this.config,t),this.storage){const i=JSON.stringify(this.config);this.storage.setItem(this.id,i)}}_loadConfiguration(){let t={};if(this.storage){const i=this.storage.getItem(this.id);t=i?JSON.parse(i):{}}return Object.assign(this.config,t),this}}function EO(e){let t;return e<10?t=`${e.toFixed(2)}ms`:e<100?t=`${e.toFixed(1)}ms`:e<1e3?t=`${e.toFixed(0)}ms`:t=`${(e/1e3).toFixed(2)}s`,t}function CO(e,t=8){const i=Math.max(t-e.length,0);return`${" ".repeat(i)}${e}`}var J0;(function(e){e[e.BLACK=30]="BLACK",e[e.RED=31]="RED",e[e.GREEN=32]="GREEN",e[e.YELLOW=33]="YELLOW",e[e.BLUE=34]="BLUE",e[e.MAGENTA=35]="MAGENTA",e[e.CYAN=36]="CYAN",e[e.WHITE=37]="WHITE",e[e.BRIGHT_BLACK=90]="BRIGHT_BLACK",e[e.BRIGHT_RED=91]="BRIGHT_RED",e[e.BRIGHT_GREEN=92]="BRIGHT_GREEN",e[e.BRIGHT_YELLOW=93]="BRIGHT_YELLOW",e[e.BRIGHT_BLUE=94]="BRIGHT_BLUE",e[e.BRIGHT_MAGENTA=95]="BRIGHT_MAGENTA",e[e.BRIGHT_CYAN=96]="BRIGHT_CYAN",e[e.BRIGHT_WHITE=97]="BRIGHT_WHITE"})(J0||(J0={}));const SO=10;function cC(e){return typeof e!="string"?e:(e=e.toUpperCase(),J0[e]||J0.WHITE)}function TO(e,t,i){return!Au&&typeof e=="string"&&(t&&(e=`\x1B[${cC(t)}m${e}\x1B[39m`),i&&(e=`\x1B[${cC(i)+SO}m${e}\x1B[49m`)),e}function IO(e,t=["constructor"]){const i=Object.getPrototypeOf(e),r=Object.getOwnPropertyNames(i),n=e;for(const s of r){const o=n[s];typeof o=="function"&&(t.find(f=>s===f)||(n[s]=o.bind(e)))}}function Hy(e,t){if(!e)throw new Error("Assertion failed")}function qf(){var t,i,r;let e;if(Au()&&Q0.performance)e=(i=(t=Q0==null?void 0:Q0.performance)==null?void 0:t.now)==null?void 0:i.call(t);else if("hrtime"in Wf){const n=(r=Wf==null?void 0:Wf.hrtime)==null?void 0:r.call(Wf);e=n[0]*1e3+n[1]/1e6}else e=Date.now();return e}const Zf={debug:Au()&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},PO={enabled:!0,level:0};function Xf(){}const uC={},hC={once:!0};class Kf{constructor({id:t}={id:""}){this.VERSION=lC,this._startTs=qf(),this._deltaTs=qf(),this.userData={},this.LOG_THROTTLE_TIMEOUT=0,this.id=t,this.userData={},this._storage=new wO(`__probe-${this.id}__`,PO),this.timeStamp(`${this.id} started`),IO(this),Object.seal(this)}set level(t){this.setLevel(t)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((qf()-this._startTs).toPrecision(10))}getDelta(){return Number((qf()-this._deltaTs).toPrecision(10))}set priority(t){this.level=t}get priority(){return this.level}getPriority(){return this.level}enable(t=!0){return this._storage.setConfiguration({enabled:t}),this}setLevel(t){return this._storage.setConfiguration({level:t}),this}get(t){return this._storage.config[t]}set(t,i){this._storage.setConfiguration({[t]:i})}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}assert(t,i){if(!t)throw new Error(i||"Assertion failed")}warn(t){return this._getLogFunction(0,t,Zf.warn,arguments,hC)}error(t){return this._getLogFunction(0,t,Zf.error,arguments)}deprecated(t,i){return this.warn(`\`${t}\` is deprecated and will be removed in a later version. Use \`${i}\` instead`)}removed(t,i){return this.error(`\`${t}\` has been removed. Use \`${i}\` instead`)}probe(t,i){return this._getLogFunction(t,i,Zf.log,arguments,{time:!0,once:!0})}log(t,i){return this._getLogFunction(t,i,Zf.debug,arguments)}info(t,i){return this._getLogFunction(t,i,console.info,arguments)}once(t,i){return this._getLogFunction(t,i,Zf.debug||Zf.info,arguments,hC)}table(t,i,r){return i?this._getLogFunction(t,i,console.table||Xf,r&&[r],{tag:BO(i)}):Xf}time(t,i){return this._getLogFunction(t,i,console.time?console.time:console.info)}timeEnd(t,i){return this._getLogFunction(t,i,console.timeEnd?console.timeEnd:console.info)}timeStamp(t,i){return this._getLogFunction(t,i,console.timeStamp||Xf)}group(t,i,r={collapsed:!1}){const n=dC({logLevel:t,message:i,opts:r}),{collapsed:s}=r;return n.method=(s?console.groupCollapsed:console.group)||console.info,this._getLogFunction(n)}groupCollapsed(t,i,r={}){return this.group(t,i,Object.assign({},r,{collapsed:!0}))}groupEnd(t){return this._getLogFunction(t,"",console.groupEnd||Xf)}withGroup(t,i,r){this.group(t,i)();try{r()}finally{this.groupEnd(t)()}}trace(){console.trace&&console.trace()}_shouldLog(t){return this.isEnabled()&&this.getLevel()>=fC(t)}_getLogFunction(t,i,r,n,s){if(this._shouldLog(t)){s=dC({logLevel:t,message:i,args:n,opts:s}),r=r||s.method,Hy(r),s.total=this.getTotal(),s.delta=this.getDelta(),this._deltaTs=qf();const o=s.tag||s.message;if(s.once&&o)if(!uC[o])uC[o]=qf();else return Xf;return i=MO(this.id,s.message,s),r.bind(console,i,...s.args)}return Xf}}Kf.VERSION=lC;function fC(e){if(!e)return 0;let t;switch(typeof e){case"number":t=e;break;case"object":t=e.logLevel||e.priority||0;break;default:return 0}return Hy(Number.isFinite(t)&&t>=0),t}function dC(e){const{logLevel:t,message:i}=e;e.logLevel=fC(t);const r=e.args?Array.from(e.args):[];for(;r.length&&r.shift()!==i;);switch(typeof t){case"string":case"function":i!==void 0&&r.unshift(i),e.message=t;break;case"object":Object.assign(e,t);break}typeof e.message=="function"&&(e.message=e.message());const n=typeof e.message;return Hy(n==="string"||n==="object"),Object.assign(e,{args:r},e.opts)}function MO(e,t,i){if(typeof t=="string"){const r=i.time?CO(EO(i.total)):"";t=i.time?`${e}: ${r} ${t}`:`${e}: ${t}`,t=TO(t,i.color,i.background)}return t}function BO(e){for(const t in e)for(const i in e[t])return i||"untitled";return"empty"}globalThis.probe={};const pC=new Kf({id:"@probe.gl/log"}),Wy="4.3.1",RO=Wy[0]>="0"&&Wy[0]<="9"?`v${Wy}`:"";function LO(){const e=new Kf({id:"loaders.gl"});return globalThis.loaders=globalThis.loaders||{},globalThis.loaders.log=e,globalThis.loaders.version=RO,globalThis.probe=globalThis.probe||{},globalThis.probe.loaders=e,e}const AC=LO();function gC(e,t){return mC(e||{},t)}function mC(e,t,i=0){if(i>3)return t;const r={...e};for(const[n,s]of Object.entries(t))s&&typeof s=="object"&&!Array.isArray(s)?r[n]=mC(r[n]||{},t[n],i+1):r[n]=t[n];return r}function DO(e){var t;globalThis.loaders||(globalThis.loaders={}),(t=globalThis.loaders).modules||(t.modules={}),Object.assign(globalThis.loaders.modules,e)}function OO(e){var t,i;return((i=(t=globalThis.loaders)==null?void 0:t.modules)==null?void 0:i[e])||null}const kO="latest";function FO(){var e;return(e=globalThis._loadersgl_)!=null&&e.version||(globalThis._loadersgl_=globalThis._loadersgl_||{},globalThis._loadersgl_.version="4.3.1"),globalThis._loadersgl_.version}const _C=FO();function Ac(e,t){if(!e)throw new Error(t||"loaders.gl assertion failed.")}const va=typeof process!="object"||String(process)!=="[object process]"||process.browser,qy=typeof importScripts=="function",NO=typeof window<"u"&&typeof window.orientation<"u",yC=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version);yC&&parseFloat(yC[1]);class zO{constructor(t,i){z(this,"name");z(this,"workerThread");z(this,"isRunning",!0);z(this,"result");z(this,"_resolve",()=>{});z(this,"_reject",()=>{});this.name=t,this.workerThread=i,this.result=new Promise((r,n)=>{this._resolve=r,this._reject=n})}postMessage(t,i){this.workerThread.postMessage({source:"loaders.gl",type:t,payload:i})}done(t){Ac(this.isRunning),this.isRunning=!1,this._resolve(t)}error(t){Ac(this.isRunning),this.isRunning=!1,this._reject(t)}}class Zy{terminate(){}}const Xy=new Map;function UO(e){Ac(e.source&&!e.url||!e.source&&e.url);let t=Xy.get(e.source||e.url);return t||(e.url&&(t=GO(e.url),Xy.set(e.url,t)),e.source&&(t=vC(e.source),Xy.set(e.source,t))),Ac(t),t}function GO(e){if(!e.startsWith("http"))return e;const t=jO(e);return vC(t)}function vC(e){const t=new Blob([e],{type:"application/javascript"});return URL.createObjectURL(t)}function jO(e){return`try {
2
2
  importScripts('${e}');
3
3
  } catch (error) {
4
4
  console.error(error);
@@ -1 +1 @@
1
- import{c as l,aD as y,j as i}from"./index-B-xJO1Ho.js";import{S as m,T as F}from"./Toolbar-CTzbm8jh.js";import{w as b,u as C,E as I}from"./withFullScreenWrapper--g6uY0Wf.js";const S=l("div",{target:"e115fcil2"})(({theme:e})=>({display:"flex",flexDirection:"row",flexWrap:"wrap",rowGap:e.spacing.lg,maxWidth:"100%",width:"fit-content"}),""),W=l("div",{target:"e115fcil1"})({name:"1xf0csu",styles:"display:flex;flex-direction:column;align-items:stretch;width:auto;flex-grow:0"}),v=l("div",{target:"e115fcil0"})(({theme:e})=>({fontFamily:e.genericFonts.bodyFont,fontSize:e.fontSizes.sm,color:e.colors.fadedText60,textAlign:"center",marginTop:e.spacing.xs,wordWrap:"break-word",padding:e.spacing.threeXS}),"");function E({element:e,width:g,endpoints:h,disableFullscreenMode:p}){const x=y(e.imgs),{expanded:s,width:f,height:o,expand:u,collapse:w}=C(I),r=s?f:g;let n;const a=e.width;if([-1,-3,-4].includes(a))n=void 0;else if([-2,-5].includes(a))n=r;else if(a>0)n=a;else throw Error(`Invalid image width: ${a}`);const t={};return o&&s?(t.maxHeight=o,t.objectFit="contain"):(t.width=n,t.maxWidth="100%"),i.jsxs(m,{width:r,height:o,useContainerWidth:s,topCentered:!0,children:[i.jsx(F,{target:m,isFullScreen:s,onExpand:u,onCollapse:w,disableFullscreenMode:p}),i.jsx(S,{className:"stImage","data-testid":"stImage",children:x.map((j,c)=>{const d=j;return i.jsxs(W,{"data-testid":"stImageContainer",children:[i.jsx("img",{style:t,src:h.buildMediaURL(d.url),alt:c.toString()}),d.caption&&i.jsx(v,{"data-testid":"stImageCaption",style:t,children:` ${d.caption} `})]},c)})})]})}const T=b(E);export{T as default};
1
+ import{c as l,aD as y,j as i}from"./index-lyJc68Dt.js";import{S as m,T as F}from"./Toolbar-BTpOoeAP.js";import{w as b,u as C,E as I}from"./withFullScreenWrapper-BggmGF09.js";const S=l("div",{target:"e115fcil2"})(({theme:e})=>({display:"flex",flexDirection:"row",flexWrap:"wrap",rowGap:e.spacing.lg,maxWidth:"100%",width:"fit-content"}),""),W=l("div",{target:"e115fcil1"})({name:"1xf0csu",styles:"display:flex;flex-direction:column;align-items:stretch;width:auto;flex-grow:0"}),v=l("div",{target:"e115fcil0"})(({theme:e})=>({fontFamily:e.genericFonts.bodyFont,fontSize:e.fontSizes.sm,color:e.colors.fadedText60,textAlign:"center",marginTop:e.spacing.xs,wordWrap:"break-word",padding:e.spacing.threeXS}),"");function E({element:e,width:g,endpoints:h,disableFullscreenMode:p}){const x=y(e.imgs),{expanded:s,width:f,height:o,expand:u,collapse:w}=C(I),r=s?f:g;let n;const a=e.width;if([-1,-3,-4].includes(a))n=void 0;else if([-2,-5].includes(a))n=r;else if(a>0)n=a;else throw Error(`Invalid image width: ${a}`);const t={};return o&&s?(t.maxHeight=o,t.objectFit="contain"):(t.width=n,t.maxWidth="100%"),i.jsxs(m,{width:r,height:o,useContainerWidth:s,topCentered:!0,children:[i.jsx(F,{target:m,isFullScreen:s,onExpand:u,onCollapse:w,disableFullscreenMode:p}),i.jsx(S,{className:"stImage","data-testid":"stImage",children:x.map((j,c)=>{const d=j;return i.jsxs(W,{"data-testid":"stImageContainer",children:[i.jsx("img",{style:t,src:h.buildMediaURL(d.url),alt:c.toString()}),d.caption&&i.jsx(v,{"data-testid":"stImageCaption",style:t,children:` ${d.caption} `})]},c)})})]})}const T=b(E);export{T as default};