@stlite/desktop 0.66.0 → 0.67.1
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.
- package/bin/dump_artifacts.js +1 -1
- package/build/asset-manifest.json +41 -38
- package/build/index.html +1 -1
- package/build/static/js/1001.b6744dec.chunk.js +1 -0
- package/build/static/js/1046.52decb2e.chunk.js +1 -0
- package/build/static/js/1189.ab8bacef.chunk.js +1 -0
- package/build/static/js/{1261.15eb6eb4.chunk.js → 1261.b566da4d.chunk.js} +1 -1
- package/build/static/js/{144.ab9b4469.chunk.js → 144.9ec5bd27.chunk.js} +1 -1
- package/build/static/js/1740.23a03bbe.chunk.js +1 -0
- package/build/static/js/241.e65eeb7b.chunk.js +1 -0
- package/build/static/js/2448.285a20d7.chunk.js +1 -0
- package/build/static/js/{2450.d2094d4f.chunk.js → 2450.3fbfa728.chunk.js} +1 -1
- package/build/static/js/2664.fcbdd10d.chunk.js +1 -0
- package/build/static/js/{2873.3a5dcb34.chunk.js → 2873.b29b2eeb.chunk.js} +1 -1
- package/build/static/js/2940.4e6caf5c.chunk.js +1 -0
- package/build/static/js/3849.3df70f1e.chunk.js +2 -0
- package/build/static/js/4482.a589131e.chunk.js +17 -0
- package/build/static/js/{4494.23456267.chunk.js → 4494.6e8d3b6e.chunk.js} +1 -1
- package/build/static/js/4724.917b0590.chunk.js +5 -0
- package/build/static/js/{4785.4ad0def4.chunk.js → 4785.98dbde84.chunk.js} +1 -1
- package/build/static/js/4831.0fbd4ca7.chunk.js +5 -0
- package/build/static/js/5299.b77de2fc.chunk.js +9 -0
- package/build/static/js/{6134.c33ca2c8.chunk.js → 6134.bdbf7672.chunk.js} +1 -1
- package/build/static/js/6463.cd216036.chunk.js +2 -0
- package/build/static/js/6463.cd216036.chunk.js.LICENSE.txt +1 -0
- package/build/static/js/6944.444c0fa6.chunk.js +1 -0
- package/build/static/js/{698.13ad7058.chunk.js → 698.0dd9747b.chunk.js} +1 -1
- package/build/static/js/7463.04979eb1.chunk.js +1 -0
- package/build/static/js/7579.b7954b39.chunk.js +1 -0
- package/build/static/js/7696.05d95d4d.chunk.js +1 -0
- package/build/static/js/7809.e90cb7d7.chunk.js +1 -0
- package/build/static/js/7866.47855e8c.chunk.js +2 -0
- package/build/static/js/8186.e2b282ee.chunk.js +2 -0
- package/build/static/js/8801.534f3181.chunk.js +1 -0
- package/build/static/js/8853.35db34e3.chunk.js +5 -0
- package/build/static/js/9005.980d0bb3.chunk.js +5 -0
- package/build/static/js/973.df151fda.chunk.js +1 -0
- package/build/static/js/9813.a08c138f.chunk.js +1 -0
- package/build/static/js/9846.9ae3ba57.chunk.js +1 -0
- package/build/static/js/main.099ed3b9.js +28 -0
- package/package.json +5 -5
- package/wheels/stlite_lib-0.1.0-py3-none-any.whl +0 -0
- package/wheels/streamlit-1.39.0-cp312-none-any.whl +0 -0
- package/build/static/js/1046.b35a30bb.chunk.js +0 -1
- package/build/static/js/1122.826a4d4a.chunk.js +0 -1
- package/build/static/js/1189.cfab8e1b.chunk.js +0 -1
- package/build/static/js/1740.94292e1e.chunk.js +0 -1
- package/build/static/js/188.76c35a12.chunk.js +0 -1
- package/build/static/js/2448.7421fffc.chunk.js +0 -1
- package/build/static/js/2664.826d28ff.chunk.js +0 -1
- package/build/static/js/2940.febd403d.chunk.js +0 -1
- package/build/static/js/4482.83141a76.chunk.js +0 -17
- package/build/static/js/4724.bece40dd.chunk.js +0 -5
- package/build/static/js/4831.c90232de.chunk.js +0 -5
- package/build/static/js/5299.e46d6a7b.chunk.js +0 -9
- package/build/static/js/6463.d6201add.chunk.js +0 -2
- package/build/static/js/6463.d6201add.chunk.js.LICENSE.txt +0 -1
- package/build/static/js/6944.41de199c.chunk.js +0 -1
- package/build/static/js/7579.7586a966.chunk.js +0 -1
- package/build/static/js/7696.d4742d64.chunk.js +0 -1
- package/build/static/js/8097.f846eb83.chunk.js +0 -2
- package/build/static/js/8186.711bca96.chunk.js +0 -2
- package/build/static/js/8801.f029b6c3.chunk.js +0 -1
- package/build/static/js/8853.2cc975d3.chunk.js +0 -5
- package/build/static/js/9005.b52b87da.chunk.js +0 -5
- package/build/static/js/9813.a3f195fe.chunk.js +0 -1
- package/build/static/js/9846.309b75be.chunk.js +0 -1
- package/build/static/js/989.d6cd1f50.chunk.js +0 -2
- package/build/static/js/main.eec824c7.js +0 -28
- package/wheels/streamlit-1.38.0-cp312-none-any.whl +0 -0
- /package/build/static/css/{188.da3ff442.chunk.css → 7463.da3ff442.chunk.css} +0 -0
- /package/build/static/css/{989.1edfa457.chunk.css → 7866.1edfa457.chunk.css} +0 -0
- /package/build/static/js/{8097.f846eb83.chunk.js.LICENSE.txt → 3849.3df70f1e.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{989.d6cd1f50.chunk.js.LICENSE.txt → 7866.47855e8c.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{8186.711bca96.chunk.js.LICENSE.txt → 8186.e2b282ee.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{main.eec824c7.js.LICENSE.txt → main.099ed3b9.js.LICENSE.txt} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stlite/desktop",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.67.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -70,10 +70,10 @@
|
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@craco/craco": "^7.0.0",
|
|
73
|
-
"@stlite/common": "^0.
|
|
74
|
-
"@stlite/common-react": "^0.
|
|
75
|
-
"@stlite/kernel": "^0.
|
|
76
|
-
"@streamlit/app": "1.
|
|
73
|
+
"@stlite/common": "^0.67.1",
|
|
74
|
+
"@stlite/common-react": "^0.67.1",
|
|
75
|
+
"@stlite/kernel": "^0.67.1",
|
|
76
|
+
"@streamlit/app": "1.39.0",
|
|
77
77
|
"@testing-library/react": "^14.1.2",
|
|
78
78
|
"@testing-library/user-event": "^14.0.0",
|
|
79
79
|
"@types/jest": "^27.4.3",
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_stlite_desktop=self.webpackChunk_stlite_desktop||[]).push([[1046],{52955:(e,t,r)=>{r.d(t,{K:()=>n});var o=r(50120);class n{constructor(){this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}manageFormClearListener(e,t,r){(0,o.bb)(this.formClearListener)&&this.lastWidgetMgr===e&&this.lastFormId===t||(this.disconnect(),(0,o.bM)(t)&&(this.formClearListener=e.addFormClearedListener(t,r),this.lastWidgetMgr=e,this.lastFormId=t))}disconnect(){var e;null===(e=this.formClearListener)||void 0===e||e.disconnect(),this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}}},31046:(e,t,r)=>{r.r(t),r.d(t,{default:()=>m});var o=r(5057),n=r(61839),i=r(97296),l=r(81607),a=r(47206),s=r(52955),u=r(38944),d=r(93905),c=r(21034),p=r(98790),f=r(50120);const b=(0,r(82160).Z)("div",{target:"e1ipygm10"})((()=>({position:"absolute",top:"50%",right:"2.05em"})),"");var y=r(96266);class g extends o.PureComponent{constructor(){super(...arguments),this.formClearHelper=new s.K,this.state={value:this.initialValue},this.commitWidgetValue=e=>{const{widgetMgr:t,element:r,fragmentId:o}=this.props;t.setStringValue(r,this.state.value,e,o)},this.onFormCleared=()=>{this.setState(((e,t)=>{var r;return{value:null!==(r=t.element.default)&&void 0!==r?r:null}}),(()=>this.commitWidgetValue({fromUi:!0})))},this.handleChange=e=>{let t;t=null===e?null:this.dateToString(e),this.setState({value:t},(()=>this.commitWidgetValue({fromUi:!0})))},this.stringToDate=e=>{if(null===e)return null;const[t,r]=e.split(":").map(Number),o=new Date;return o.setHours(t),o.setMinutes(r),o},this.dateToString=e=>`${e.getHours().toString().padStart(2,"0")}:${e.getMinutes().toString().padStart(2,"0")}`}get initialValue(){var e;const t=this.props.widgetMgr.getStringValue(this.props.element);return null!==(e=null!==t&&void 0!==t?t:this.props.element.default)&&void 0!==e?e:null}componentDidMount(){this.props.element.setValue?this.updateFromProtobuf():this.commitWidgetValue({fromUi:!1})}componentDidUpdate(){this.maybeUpdateFromProtobuf()}componentWillUnmount(){this.formClearHelper.disconnect()}maybeUpdateFromProtobuf(){const{setValue:e}=this.props.element;e&&this.updateFromProtobuf()}updateFromProtobuf(){const{value:e}=this.props.element;this.props.element.setValue=!1,this.setState({value:null!==e&&void 0!==e?e:null},(()=>{this.commitWidgetValue({fromUi:!1})}))}render(){var e;const{disabled:t,width:r,element:o,widgetMgr:a,theme:s}=this.props,g=(0,f.le)(o.default)&&!t,m={width:r},h={Select:{props:{disabled:t,overrides:{ControlContainer:{style:{height:s.sizes.minElementHeight,borderLeftWidth:s.sizes.borderWidth,borderRightWidth:s.sizes.borderWidth,borderTopWidth:s.sizes.borderWidth,borderBottomWidth:s.sizes.borderWidth}},IconsContainer:{style:()=>({paddingRight:s.spacing.sm})},ValueContainer:{style:()=>({lineHeight:s.lineHeights.inputWidget,paddingRight:s.spacing.sm,paddingLeft:s.spacing.sm,paddingBottom:s.spacing.sm,paddingTop:s.spacing.sm})},SingleValue:{props:{"data-testid":"stTimeInputTimeDisplay"}},Dropdown:{style:()=>({paddingTop:s.spacing.none,paddingBottom:s.spacing.none})},Popover:{props:{overrides:{Body:{style:()=>({marginTop:s.spacing.px})}}}},SelectArrow:{component:l.Z,props:{overrides:{Svg:{style:()=>({width:s.iconSizes.xl,height:s.iconSizes.xl})}}}}}}}};return this.formClearHelper.manageFormClearListener(a,o.formId,this.onFormCleared),(0,y.jsxs)("div",{className:"stTimeInput","data-testid":"stTimeInput",style:m,children:[(0,y.jsx)(u.O,{label:o.label,disabled:t,labelVisibility:(0,f.iF)(null===(e=o.labelVisibility)||void 0===e?void 0:e.value),children:o.help&&(0,y.jsx)(d.dT,{children:(0,y.jsx)(c.Z,{content:o.help,placement:p.u.TOP_RIGHT})})}),(0,y.jsx)(n.Z,{format:"24",step:o.step?Number(o.step):900,value:(0,f.le)(this.state.value)?void 0:this.stringToDate(this.state.value),onChange:this.handleChange,overrides:h,nullable:g,creatable:!0,"aria-label":o.label}),g&&!(0,f.le)(this.state.value)&&(0,y.jsx)(b,{onClick:()=>{this.handleChange(null)},"data-testid":"stTimeInputClearButton",children:(0,y.jsx)(i.i,{overrides:{Svg:{style:{color:s.colors.darkGray,transform:"scale(1.41)",width:s.spacing.twoXL,":hover":{fill:s.colors.bodyText}}}},$isFocusVisible:!1})})]})}}const m=(0,a.b)(g)},51347:(e,t,r)=>{r.r(t),r.d(t,{ThemeConsumer:()=>l,ThemeProvider:()=>o.Z,createThemedStyled:()=>n.Tp,createThemedUseStyletron:()=>n.fj,createThemedWithStyle:()=>n.o4,expandBorderStyles:()=>i.Qj,hexToRgb:()=>i.oo,styled:()=>n.zo,useStyletron:()=>n.hQ,withStyle:()=>n.w1,withWrapper:()=>n.Le});var o=r(6532),n=r(53381),i=r(97012),l=o.N.Consumer},56653:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getOverride=f,t.getOverrideProps=b,t.getOverrides=g,t.mergeConfigurationOverrides=h,t.mergeOverride=m,t.mergeOverrides=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Object.assign({},e,t);return Object.keys(r).reduce((function(r,o){return r[o]=m(y(e[o]),y(t[o])),r}),{})},t.toObjectOverride=y,t.useOverrides=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n.useMemo((function(){return Object.keys(e).reduce((function(r,o){return r[o]=g(t[o],e[o]),r}),{})}),[t])};var o,n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==p(e)&&"function"!==typeof e)return{default:e};var r=a(t);if(r&&r.has(e))return r.get(e);var o={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=n?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,r&&r.set(e,o);return o}(r(5057)),i=r(97408),l=(o=r(85794))&&o.__esModule?o:{default:o};function a(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(a=function(e){return e?r:t})(e)}function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},s.apply(this,arguments)}function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){c(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function c(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}function f(e){return(0,i.isValidElementType)(e)?e:e&&"object"===p(e)?e.component:e}function b(e){return e&&"object"===p(e)?"object"===p(e.props)?d(d({},e.props),{},{$style:e.style}):{$style:e.style}:{}}function y(e){return(0,i.isValidElementType)(e)?{component:e}:e||{}}function g(e,t){var r=f(e)||t;if(e&&"object"===p(e)&&"function"===typeof e.props){0;var o=n.forwardRef((function(t,o){var i=e.props(t),l=b(d(d({},e),{},{props:i}));return n.createElement(r,s({ref:o},l))}));return o.displayName=r.displayName,[o,{}]}var i=b(e);return[r,i]}function m(e,t){var r=d(d({},e),t);return e.props&&t.props&&(r.props=h(e.props,t.props)),e.style&&t.style&&(r.style=h(e.style,t.style)),r}function h(e,t){return"object"===p(e)&&"object"===p(t)?(0,l.default)({},e,t):function(){return(0,l.default)({},"function"===typeof e?e.apply(void 0,arguments):e,"function"===typeof t?t.apply(void 0,arguments):t)}}},85669:(e,t,r)=>{function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==o(e)&&"function"!==typeof e)return{default:e};var r=d(t);if(r&&r.has(e))return r.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if("default"!==l&&Object.prototype.hasOwnProperty.call(e,l)){var a=i?Object.getOwnPropertyDescriptor(e,l):null;a&&(a.get||a.set)?Object.defineProperty(n,l,a):n[l]=e[l]}n.default=e,r&&r.set(e,n);return n}(r(5057)),l=r(51347),a=r(56653),s=(n=r(79746))&&n.__esModule?n:{default:n},u=["title","size","color","overrides"];function d(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(d=function(e){return e?r:t})(e)}function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},c.apply(this,arguments)}function p(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},i=Object.keys(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var o,n,i=[],l=!0,a=!1;try{for(r=r.call(e);!(l=(o=r.next()).done)&&(i.push(o.value),!t||i.length!==t);l=!0);}catch(s){a=!0,n=s}finally{try{l||null==r.return||r.return()}finally{if(a)throw n}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return b(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return b(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function y(e,t){var r=f((0,l.useStyletron)(),2)[1],o=e.title,n=void 0===o?"Delete Alt":o,d=e.size,b=e.color,y=e.overrides,g=void 0===y?{}:y,m=p(e,u),h=(0,a.mergeOverride)({component:r.icons&&r.icons.DeleteAlt?r.icons.DeleteAlt:null},g&&g.Svg?(0,a.toObjectOverride)(g.Svg):{});return i.createElement(s.default,c({viewBox:"0 0 24 24",ref:t,title:n,size:d,color:b,overrides:{Svg:h}},m),i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 20C16.4183 20 20 16.4183 20 12C20 7.58173 16.4183 4 12 4C7.58173 4 4 7.58173 4 12C4 16.4183 7.58173 20 12 20ZM10.0303 8.96967C9.73743 8.67679 9.26257 8.67679 8.96967 8.96967C8.67676 9.26257 8.67676 9.73743 8.96967 10.0303L10.9393 12L8.96967 13.9697C8.67676 14.2626 8.67676 14.7374 8.96967 15.0303C9.26257 15.3232 9.73743 15.3232 10.0303 15.0303L12 13.0607L13.9697 15.0303C14.2626 15.3232 14.7374 15.3232 15.0303 15.0303C15.3232 14.7374 15.3232 14.2626 15.0303 13.9697L13.0607 12L15.0303 10.0303C15.3232 9.73743 15.3232 9.26257 15.0303 8.96967C14.7374 8.67679 14.2626 8.67679 13.9697 8.96967L12 10.9393L10.0303 8.96967Z"}))}var g=i.forwardRef(y);t.default=g},79746:(e,t,r)=>{function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==o(e)&&"function"!==typeof e)return{default:e};var r=d(t);if(r&&r.has(e))return r.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if("default"!==l&&Object.prototype.hasOwnProperty.call(e,l)){var a=i?Object.getOwnPropertyDescriptor(e,l):null;a&&(a.get||a.set)?Object.defineProperty(n,l,a):n[l]=e[l]}n.default=e,r&&r.set(e,n);return n}(r(5057)),l=r(56653),a=r(53413),s=(n=r(74155))&&n.__esModule?n:{default:n},u=["children","title","size","color","overrides"];function d(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(d=function(e){return e?r:t})(e)}function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},c.apply(this,arguments)}function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function f(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?p(Object(r),!0).forEach((function(t){b(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function b(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function y(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var o,n,i=[],l=!0,a=!1;try{for(r=r.call(e);!(l=(o=r.next()).done)&&(i.push(o.value),!t||i.length!==t);l=!0);}catch(s){a=!0,n=s}finally{try{l||null==r.return||r.return()}finally{if(a)throw n}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return g(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return g(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function m(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},i=Object.keys(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var h=function(e,t){var r=e.children,o=e.title,n=e.size,d=e.color,p=e.overrides,b=void 0===p?{}:p,g=m(e,u),h=y((0,l.getOverrides)(b.Svg,a.Svg),2),v=h[0],O=h[1],S=v.__STYLETRON__?f(f({title:o,$color:d,$size:n},g),O):f(f({title:o,color:d,size:n},(0,s.default)(g)),(0,s.default)(O));return i.createElement(v,c({"data-baseweb":"icon",ref:t},S),o?i.createElement("title",null,o):null,r)},v=i.forwardRef(h);t.default=v},74155:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t={};for(var r in e)"$"!==r[0]&&(t[r]=e[r]);return t}},53413:(e,t,r)=>{function o(e){var t=e.$theme,r=e.$size,o=e.$color,n=t.sizing.scale600;r&&(n=t.sizing[r]?t.sizing[r]:"number"===typeof r?"".concat(r,"px"):r);var i="currentColor";return o&&(i=t.colors[o]?t.colors[o]:o),{display:"inline-block",fill:i,color:i,height:n,width:n}}Object.defineProperty(t,"__esModule",{value:!0}),t.Svg=void 0,t.getSvgStyles=o;var n=(0,r(51347).styled)("svg",o);t.Svg=n,n.displayName="Svg",n.displayName="Svg"},85384:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.STATE_CHANGE_TYPE=t.SIZE=t.ENHANCER_POSITION=t.CUSTOM_INPUT_TYPE=t.ADJOINED=void 0;t.STATE_CHANGE_TYPE={change:"change"};t.CUSTOM_INPUT_TYPE={textarea:"textarea"};t.ADJOINED={none:"none",left:"left",right:"right",both:"both"};t.SIZE={mini:"mini",default:"default",compact:"compact",large:"large"};t.ENHANCER_POSITION={start:"start",end:"end"}},97296:(e,t,r)=>{t.i=void 0;var o,n=r(51347),i=r(85384),l=(o=r(85669))&&o.__esModule?o:{default:o};function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){u(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function u(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var d=(0,n.styled)("button",(function(e){var t,r=e.$theme,o=e.$size,n=e.$isFocusVisible,l=(t={},u(t,i.SIZE.mini,r.sizing.scale400),u(t,i.SIZE.compact,r.sizing.scale400),u(t,i.SIZE.default,r.sizing.scale300),u(t,i.SIZE.large,r.sizing.scale200),t)[o];return{display:"flex",alignItems:"center",borderTopStyle:"none",borderBottomStyle:"none",borderLeftStyle:"none",borderRightStyle:"none",background:"none",paddingLeft:l,paddingRight:l,outline:n?"solid 3px ".concat(r.colors.accent):"none",color:r.colors.contentPrimary}}));d.displayName="StyledMaskToggleButton",d.displayName="StyledMaskToggleButton";var c=(0,n.styled)("div",(function(e){var t,r=e.$alignTop,o=void 0!==r&&r,n=e.$size,l=e.$theme,a=(t={},u(t,i.SIZE.mini,l.sizing.scale200),u(t,i.SIZE.compact,l.sizing.scale200),u(t,i.SIZE.default,l.sizing.scale100),u(t,i.SIZE.large,l.sizing.scale0),t)[n];return{display:"flex",alignItems:o?"flex-start":"center",paddingLeft:a,paddingRight:a,paddingTop:o?l.sizing.scale500:"0px",color:l.colors.contentPrimary}}));c.displayName="StyledClearIconContainer",c.displayName="StyledClearIconContainer";var p=(0,n.styled)(l.default,(function(e){var t=e.$theme;return{cursor:"pointer",outline:e.$isFocusVisible?"solid 3px ".concat(t.colors.accent):"none"}}));function f(e,t){var r;return(r={},u(r,i.SIZE.mini,t.font100),u(r,i.SIZE.compact,t.font200),u(r,i.SIZE.default,t.font300),u(r,i.SIZE.large,t.font400),r)[e]}t.i=p,p.displayName="StyledClearIcon",p.displayName="StyledClearIcon";var b=function(e){var t=e.$isFocused,r=e.$adjoined,o=e.$error,n=e.$disabled,l=e.$positive,a=e.$size,u=e.$theme,d=e.$theme,c=d.borders,p=d.colors,b=d.sizing,y=d.typography,g=d.animation,m=e.$hasIconTrailing;return s(s(s(s({boxSizing:"border-box",display:"flex",overflow:"hidden",width:"100%",borderLeftWidth:"2px",borderRightWidth:"2px",borderTopWidth:"2px",borderBottomWidth:"2px",borderLeftStyle:"solid",borderRightStyle:"solid",borderTopStyle:"solid",borderBottomStyle:"solid",transitionProperty:"border",transitionDuration:g.timing200,transitionTimingFunction:g.easeOutCurve},function(e,t){var r=t.inputBorderRadius;return e===i.SIZE.mini&&(r=t.inputBorderRadiusMini),{borderTopLeftRadius:r,borderBottomLeftRadius:r,borderTopRightRadius:r,borderBottomRightRadius:r}}(a,c)),f(a,y)),function(e,t,r){var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],n=arguments.length>4?arguments[4]:void 0;return e?{borderLeftColor:n.inputFillDisabled,borderRightColor:n.inputFillDisabled,borderTopColor:n.inputFillDisabled,borderBottomColor:n.inputFillDisabled,backgroundColor:n.inputFillDisabled}:t?{borderLeftColor:n.borderSelected,borderRightColor:n.borderSelected,borderTopColor:n.borderSelected,borderBottomColor:n.borderSelected,backgroundColor:n.inputFillActive}:r?{borderLeftColor:n.inputBorderError,borderRightColor:n.inputBorderError,borderTopColor:n.inputBorderError,borderBottomColor:n.inputBorderError,backgroundColor:n.inputFillError}:o?{borderLeftColor:n.inputBorderPositive,borderRightColor:n.inputBorderPositive,borderTopColor:n.inputBorderPositive,borderBottomColor:n.inputBorderPositive,backgroundColor:n.inputFillPositive}:{borderLeftColor:n.inputBorder,borderRightColor:n.inputBorder,borderTopColor:n.inputBorder,borderBottomColor:n.inputBorder,backgroundColor:n.inputFill}}(n,t,o,l,p)),function(e,t,r,o,n){var l=e===i.ADJOINED.both||e===i.ADJOINED.left&&"rtl"!==o||e===i.ADJOINED.right&&"rtl"===o||n&&"rtl"===o,a=e===i.ADJOINED.both||e===i.ADJOINED.right&&"rtl"!==o||e===i.ADJOINED.left&&"rtl"===o||n&&"rtl"!==o;return{paddingLeft:l?r.scale550:"0px",paddingRight:a?r.scale550:"0px"}}(r,0,b,u.direction,m))};var y=(0,n.styled)("div",b);y.displayName="Root",y.displayName="Root";var g=(0,n.styled)("div",(function(e){var t=e.$size,r=e.$disabled,o=e.$isFocused,n=e.$error,l=e.$positive,a=e.$theme,d=a.colors,c=a.sizing,p=a.typography,b=a.animation;return s(s(s({display:"flex",alignItems:"center",justifyContent:"center",transitionProperty:"color, background-color",transitionDuration:b.timing200,transitionTimingFunction:b.easeOutCurve},f(t,p)),function(e,t){var r;return(r={},u(r,i.SIZE.mini,{paddingRight:t.scale400,paddingLeft:t.scale400}),u(r,i.SIZE.compact,{paddingRight:t.scale400,paddingLeft:t.scale400}),u(r,i.SIZE.default,{paddingRight:t.scale300,paddingLeft:t.scale300}),u(r,i.SIZE.large,{paddingRight:t.scale200,paddingLeft:t.scale200}),r)[e]}(t,c)),function(e,t,r,o,n){return e?{color:n.inputEnhancerTextDisabled,backgroundColor:n.inputFillDisabled}:t?{color:n.contentPrimary,backgroundColor:n.inputFillActive}:r?{color:n.contentPrimary,backgroundColor:n.inputFillError}:o?{color:n.contentPrimary,backgroundColor:n.inputFillPositive}:{color:n.contentPrimary,backgroundColor:n.inputFill}}(r,o,n,l,d))}));g.displayName="InputEnhancer",g.displayName="InputEnhancer";var m=function(e){var t=e.$isFocused,r=e.$error,o=e.$disabled,n=e.$positive,i=e.$size,l=e.$theme,a=l.colors,u=l.typography,d=l.animation;return s(s({display:"flex",width:"100%",transitionProperty:"background-color",transitionDuration:d.timing200,transitionTimingFunction:d.easeOutCurve},f(i,u)),function(e,t,r,o,n){return e?{color:n.inputTextDisabled,backgroundColor:n.inputFillDisabled}:t?{color:n.contentPrimary,backgroundColor:n.inputFillActive}:r?{color:n.contentPrimary,backgroundColor:n.inputFillError}:o?{color:n.contentPrimary,backgroundColor:n.inputFillPositive}:{color:n.contentPrimary,backgroundColor:n.inputFill}}(o,t,r,n,a))};var h=(0,n.styled)("div",m);h.displayName="InputContainer",h.displayName="InputContainer";var v=function(e){var t=e.$disabled,r=(e.$isFocused,e.$error,e.$size),o=e.$theme,n=o.colors,l=o.sizing;return s(s(s({boxSizing:"border-box",backgroundColor:"transparent",borderLeftWidth:0,borderRightWidth:0,borderTopWidth:0,borderBottomWidth:0,borderLeftStyle:"none",borderRightStyle:"none",borderTopStyle:"none",borderBottomStyle:"none",outline:"none",width:"100%",minWidth:0,maxWidth:"100%",cursor:t?"not-allowed":"text",margin:"0",paddingTop:"0",paddingBottom:"0",paddingLeft:"0",paddingRight:"0"},f(r,o.typography)),function(e,t){var r;return(r={},u(r,i.SIZE.mini,{paddingTop:t.scale100,paddingBottom:t.scale100,paddingLeft:t.scale550,paddingRight:t.scale550}),u(r,i.SIZE.compact,{paddingTop:t.scale200,paddingBottom:t.scale200,paddingLeft:t.scale550,paddingRight:t.scale550}),u(r,i.SIZE.default,{paddingTop:t.scale400,paddingBottom:t.scale400,paddingLeft:t.scale550,paddingRight:t.scale550}),u(r,i.SIZE.large,{paddingTop:t.scale550,paddingBottom:t.scale550,paddingLeft:t.scale550,paddingRight:t.scale550}),r)[e]}(r,l)),function(e,t,r,o){return e?{color:o.inputTextDisabled,"-webkit-text-fill-color":o.inputTextDisabled,caretColor:o.contentPrimary,"::placeholder":{color:o.inputPlaceholderDisabled}}:{color:o.contentPrimary,caretColor:o.contentPrimary,"::placeholder":{color:o.inputPlaceholder}}}(t,0,0,n))};var O=(0,n.styled)("input",v);O.displayName="Input",O.displayName="Input"},85794:(e,t)=>{function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(e){return Array.isArray(e)||"[object Object]"=={}.toString.call(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){t=t||{};for(var n,i,l=arguments.length<=1?0:arguments.length-1,a=0;a<l;a++)for(var s in n=(a+1<1||arguments.length<=a+1?void 0:arguments[a+1])||{})void 0!==r(n[s])&&(o(i=n[s])?t[s]=e(t[s]||Array.isArray(i)&&[]||{},i):t[s]=i);return t}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_stlite_desktop=self.webpackChunk_stlite_desktop||[]).push([[1122],{21122:(e,t,i)=>{i.r(t),i.d(t,{default:()=>R});var o=i(5057),s=i(59663),n=i(41656),r=i(50482),a=i.n(r),l=i(87333),h=i(47206),d=i(12136),c=i(34971),p=i(57440),m=i(5156),u=i(72212),g=i(80552),x=i(69301),w=i(65815),b=i(50256),y=i(98899),S=i(31324),v=i(719),k=i(17966),f=i(10266),j=i(56129),T=i.n(j),C=i(69178),z=i(64327),E=i(60913),F=i(24589),V=i(31808),Z=i(87672),I=i(96266);const O=e=>{let{error:t,width:i,deltaType:o}=e;return t instanceof D?(0,I.jsx)(Z.Z,{width:i,name:"No Mapbox token provided",message:(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)("p",{children:["To use ",(0,I.jsxs)("code",{children:["st.",o]})," or ",(0,I.jsx)("code",{children:"st.map"})," you need to set up a Mapbox access token."]}),(0,I.jsxs)("p",{children:["To get a token, create an account at"," ",(0,I.jsx)("a",{href:"https://mapbox.com",children:"https://mapbox.com"}),". It's free for moderate usage levels!"]}),(0,I.jsxs)("p",{children:["Once you have a token, just set it using the Streamlit config option ",(0,I.jsx)("code",{children:"mapbox.token"})," and don't forget to restart your Streamlit server at this point if it's still running, then reload this tab."]}),(0,I.jsxs)("p",{children:["See"," ",(0,I.jsx)("a",{href:"https://docs.streamlit.io/develop/api-reference/configuration/config.toml",children:"our documentation"})," ","for more info on how to set config options."]})]})}):t instanceof M?(0,I.jsx)(Z.Z,{width:i,name:"Error fetching Streamlit Mapbox token",message:(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)("p",{children:"This app requires an internet connection."}),(0,I.jsx)("p",{children:"Please check your connection and try again."}),(0,I.jsxs)("p",{children:["If you think this is a bug, please file bug report"," ",(0,I.jsx)("a",{href:"https://github.com/streamlit/streamlit/issues/new/choose",children:"here"}),"."]})]})}):(0,I.jsx)(Z.Z,{width:i,name:"Error fetching Streamlit Mapbox token",message:t.message})};class D extends Error{}class M extends Error{}const P="https://data.streamlit.io/tokens.json",J="mapbox",W=e=>t=>{class i extends o.PureComponent{constructor(i){super(i),this.context=void 0,this.initMapboxToken=async()=>{try{const e=await C.Z.get(P),{[J]:t}=e.data;if(!t)throw new Error(`Missing token ${J}`);this.setState({mapboxToken:t,isFetching:!1})}catch(e){const t=(0,z.b)(e);throw this.setState({mapboxTokenError:t,isFetching:!1}),new M(`${t.message} (${P})`)}},this.render=()=>{const{mapboxToken:i,mapboxTokenError:o,isFetching:s}=this.state,{width:n}=this.props;return o?(0,I.jsx)(O,{width:n,error:o,deltaType:e}):s?(0,I.jsx)(F.O,{element:E.Od.create({style:E.Od.SkeletonStyle.ELEMENT})}):(0,I.jsx)(t,{...this.props,mapboxToken:i,width:n})},this.state={isFetching:!0,mapboxToken:void 0,mapboxTokenError:void 0}}componentDidMount(){const e=this.props.element.mapboxToken||this.context.libConfig.mapboxToken;e?this.setState({mapboxToken:e,isFetching:!1}):this.initMapboxToken()}}return i.displayName=`withMapboxToken(${t.displayName||t.name})`,i.contextType=V.E,T()(i,t)};var L=i(82160);const H=(0,L.Z)("div",{target:"e1az0zs51"})((e=>{let{width:t,height:i,theme:o}=e;return{marginTop:o.spacing.sm,position:"relative",height:i,width:t}}),""),N=(0,L.Z)("div",{target:"e1az0zs50"})((e=>{let{theme:t}=e;return{position:"absolute",right:"2.625rem",top:t.spacing.md,zIndex:1,"button:not(:disabled)":{background:t.colors.bgColor,"& + button":{borderTopColor:t.colors.secondaryBg},"& span":{filter:(0,k.Iy)(t)?"":"invert(100%)"}}}}),"");i(20512);const $={classes:{...u,...w,...x,...b,CartoLayer:d.Z},functions:{colorBins:c.Z,colorCategories:p.Z,colorContinuous:m.Z}};(0,v.fh)([y.w,S.E]);const B=new g.Z({configuration:$});class _ extends o.PureComponent{constructor(){super(...arguments),this.state={viewState:{bearing:0,pitch:0,zoom:11},initialized:!1,initialViewState:{},id:void 0,pydeckJson:void 0,isFullScreen:!1,isLightTheme:(0,k.Iy)(this.props.theme)},this.componentDidMount=()=>{this.setState({initialized:!0})},this.createTooltip=e=>{const{element:t}=this.props;if(!e||!e.object||!t.tooltip)return!1;const i=n.Z.parse(t.tooltip);return i.html?i.html=this.interpolate(e,i.html):i.text=this.interpolate(e,i.text),i},this.interpolate=(e,t)=>{const i=t.match(/{(.*?)}/g);return i&&i.forEach((i=>{const o=i.substring(1,i.length-1);e.object.hasOwnProperty(o)?t=t.replace(i,e.object[o]):e.object.hasOwnProperty("properties")&&e.object.properties.hasOwnProperty(o)&&(t=t.replace(i,e.object.properties[o]))})),t},this.onViewStateChange=e=>{let{viewState:t}=e;this.setState({viewState:t})}}static getDerivedStateFromProps(e,t){const i=_.getDeckObject(e,t);if(!a()(i.initialViewState,t.initialViewState)){const e=Object.keys(i.initialViewState).reduce(((e,o)=>i.initialViewState[o]===t.initialViewState[o]?e:{...e,[o]:i.initialViewState[o]}),{});return{viewState:{...t.viewState,...e},initialViewState:i.initialViewState}}return null}render(){const e=_.getDeckObject(this.props,this.state),{viewState:t}=this.state,{width:i}=this.props;return(0,I.jsx)(H,{className:"stDeckGlJsonChart","data-testid":"stDeckGlJsonChart",width:i,height:e.initialViewState.height,children:(0,I.jsxs)(s.Z,{viewState:t,onViewStateChange:this.onViewStateChange,height:e.initialViewState.height,width:i,layers:this.state.initialized?e.layers:[],getTooltip:this.createTooltip,ContextProvider:l.X$.Provider,controller:!0,children:[(0,I.jsx)(l.Z3,{height:e.initialViewState.height,width:i,mapStyle:e.mapStyle&&("string"===typeof e.mapStyle?e.mapStyle:e.mapStyle[0]),mapboxApiAccessToken:this.props.element.mapboxToken||this.props.mapboxToken}),(0,I.jsx)(N,{children:(0,I.jsx)(l.Pv,{"data-testid":"stDeckGlJsonChartZoomButton",showCompass:!1})})]})})}}_.getDeckObject=(e,t)=>{var i,o;const{element:s,width:r,height:a,theme:l,isFullScreen:h}=e,d=null!==h&&void 0!==h&&h;var c,p,m;(s.id===t.id&&t.isFullScreen===d&&t.isLightTheme===(0,k.Iy)(l)||(t.pydeckJson=n.Z.parse(s.json),t.id=s.id),null!==(i=t.pydeckJson)&&void 0!==i&&i.mapStyle||(t.pydeckJson.mapStyle=`mapbox://styles/mapbox/${(0,k.Iy)(l)?"light":"dark"}-v9`),h)?Object.assign(null===(c=t.pydeckJson)||void 0===c?void 0:c.initialViewState,{width:r,height:a}):(null!==(p=t.pydeckJson)&&void 0!==p&&null!==(m=p.initialViewState)&&void 0!==m&&m.height||(t.pydeckJson.initialViewState.height=500),s.useContainerWidth&&(t.pydeckJson.initialViewState.width=r));return t.isFullScreen=h,t.isLightTheme=(0,k.Iy)(l),null===(o=t.pydeckJson)||void 0===o||delete o.views,B.convert(t.pydeckJson)};const R=(0,h.b)(W("st.pydeck_chart")((0,f.Z)(_)))},10266:(e,t,i)=>{i.d(t,{Z:()=>w});var o=i(5057),s=i(56129),n=i.n(s),r=i(47206),a=i(53136),l=i(88916),h=i(73401),d=i(31808),c=i(82160);const p=(0,c.Z)("button",{target:"e1vs0wn31"})((e=>{let{isExpanded:t,theme:i}=e;const o=t?{right:"0.4rem",top:"0.5rem",backgroundColor:"transparent"}:{right:"-3.0rem",top:"-0.375rem",opacity:0,transform:"scale(0)",backgroundColor:i.colors.lightenedBg05};return{position:"absolute",display:"flex",alignItems:"center",justifyContent:"center",zIndex:i.zIndices.sidebar+1,height:"2.5rem",width:"2.5rem",transition:"opacity 300ms 150ms, transform 300ms 150ms",border:"none",color:i.colors.fadedText60,borderRadius:"50%",...o,"&:focus":{outline:"none"},"&:active, &:focus-visible, &:hover":{opacity:1,outline:"none",transform:"scale(1)",color:i.colors.bodyText,transition:"none"}}}),""),m=(0,c.Z)("div",{target:"e1vs0wn30"})((e=>{let{theme:t,isExpanded:i}=e;return{"&:hover":{[p]:{opacity:1,transform:"scale(1)",transition:"none"}},...i?{position:"fixed",top:0,left:0,bottom:0,right:0,background:t.colors.bgColor,zIndex:t.zIndices.fullscreenWrapper,padding:t.spacing.md,paddingTop:t.sizes.fullScreenHeaderHeight,overflow:["auto","overlay"],display:"flex",alignItems:"center",justifyContent:"center"}:{}}}),"");var u=i(96266);class g extends o.PureComponent{constructor(e){super(e),this.context=void 0,this.controlKeys=e=>{const{expanded:t}=this.state;27===e.keyCode&&t&&this.zoomOut()},this.zoomIn=()=>{document.body.style.overflow="hidden",this.context.setFullScreen(!0),this.setState({expanded:!0})},this.zoomOut=()=>{document.body.style.overflow="unset",this.context.setFullScreen(!1),this.setState({expanded:!1})},this.convertScssRemValueToPixels=e=>parseFloat(e)*parseFloat(getComputedStyle(document.documentElement).fontSize),this.getWindowDimensions=()=>{const e=this.convertScssRemValueToPixels(this.props.theme.spacing.md),t=this.convertScssRemValueToPixels(this.props.theme.sizes.fullScreenHeaderHeight);return{fullWidth:window.innerWidth-2*e,fullHeight:window.innerHeight-(e+t)}},this.updateWindowDimensions=()=>{this.setState(this.getWindowDimensions())},this.state={expanded:!1,...this.getWindowDimensions()}}componentDidMount(){window.addEventListener("resize",this.updateWindowDimensions),document.addEventListener("keydown",this.controlKeys,!1)}componentWillUnmount(){window.removeEventListener("resize",this.updateWindowDimensions),document.removeEventListener("keydown",this.controlKeys,!1)}render(){const{expanded:e,fullWidth:t,fullHeight:i}=this.state,{children:o,width:s,height:n,disableFullscreenMode:r}=this.props;let d=a.d,c=this.zoomIn,g="View fullscreen";return e&&(d=l.m,c=this.zoomOut,g="Exit fullscreen"),(0,u.jsxs)(m,{isExpanded:e,"data-testid":"stFullScreenFrame",children:[!r&&(0,u.jsx)(p,{"data-testid":"StyledFullScreenButton",onClick:c,title:g,isExpanded:e,children:(0,u.jsx)(h.Z,{content:d})}),o(e?{width:t,height:i,expanded:e,expand:this.zoomIn,collapse:this.zoomOut}:{width:s,height:n,expanded:e,expand:this.zoomIn,collapse:this.zoomOut})]})}}g.contextType=d.E;const x=(0,r.b)(g);const w=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];class i extends o.PureComponent{constructor(){super(...arguments),this.render=()=>{const{width:i,height:o,disableFullscreenMode:s}=this.props;return(0,u.jsx)(x,{width:i,height:o,disableFullscreenMode:t||s,children:t=>{let{width:i,height:o,expanded:s,expand:n,collapse:r}=t;return(0,u.jsx)(e,{...this.props,width:i,height:o,isFullScreen:s,expand:n,collapse:r})}})}}}return i.displayName=`withFullScreenWrapper(${e.displayName||e.name})`,n()(i,e)}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_stlite_desktop=self.webpackChunk_stlite_desktop||[]).push([[1189],{71189:(e,t,s)=>{s.r(t),s.d(t,{default:()=>r});s(5057);var i=s(44088),l=s(92649),d=s(38830),n=s(9847),a=s(96266);const r=function(e){const{disabled:t,element:s,widgetMgr:r,width:h,fragmentId:u}=e,c={width:h},o="primary"===s.type?i.nW.PRIMARY:i.nW.SECONDARY,p=!s.help||h;return(0,a.jsx)("div",{className:"stButton","data-testid":"stButton",style:c,children:(0,a.jsx)(l.t,{help:s.help,children:(0,a.jsx)(d.ZP,{kind:o,size:i.V5.SMALL,disabled:t,fluidWidth:!!s.useContainerWidth&&p,onClick:()=>r.setTriggerValue(s,{fromUi:!0},u),children:(0,a.jsx)(n.ZP,{source:s.label,allowHTML:!1,isLabel:!0,largerLabel:!0,disableLinks:!0})})})})}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_stlite_desktop=self.webpackChunk_stlite_desktop||[]).push([[1740],{31740:(t,e,i)=>{i.r(e),i.d(e,{default:()=>c});var s=i(5057),l=i(44088),n=i(92649),r=i(38830),d=i(9847),a=i(31808),o=i(82603),u=i(96266);const c=function(t){const{disabled:e,element:i,widgetMgr:c,width:b,endpoints:h,fragmentId:f}=t,k={width:b},{libConfig:{enforceDownloadInNewTab:p=!1}}=s.useContext(a.E),w="primary"===i.type?l.nW.PRIMARY:l.nW.SECONDARY,g=(0,o.v_)(),m=!i.help||b;return(0,u.jsx)("div",{className:"stDownloadButton","data-testid":"stDownloadButton",style:k,children:(0,u.jsx)(n.t,{help:i.help,children:(0,u.jsx)(r.ZP,{kind:w,size:l.V5.SMALL,disabled:e,onClick:()=>{if(c.setTriggerValue(i,{fromUi:!0},f),i.url.startsWith("/media"))return void(0,o.uP)(g,i.url);const t=function(t,e,i){const s=document.createElement("a"),l=t.buildMediaURL(e);return s.setAttribute("href",l),i?s.setAttribute("target","_blank"):s.setAttribute("target","_self"),s.setAttribute("download",""),s}(h,i.url,p);t.click()},fluidWidth:!!i.useContainerWidth&&m,children:(0,u.jsx)(d.ZP,{source:i.label,allowHTML:!1,isLabel:!0,largerLabel:!0,disableLinks:!0})})})})}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_stlite_desktop=self.webpackChunk_stlite_desktop||[]).push([[188],{10266:(e,t,n)=>{n.d(t,{Z:()=>b});var i=n(5057),o=n(56129),r=n.n(o),l=n(47206),a=n(53136),s=n(88916),d=n(73401),u=n(31808),c=n(82160);const m=(0,c.Z)("button",{target:"e1vs0wn31"})((e=>{let{isExpanded:t,theme:n}=e;const i=t?{right:"0.4rem",top:"0.5rem",backgroundColor:"transparent"}:{right:"-3.0rem",top:"-0.375rem",opacity:0,transform:"scale(0)",backgroundColor:n.colors.lightenedBg05};return{position:"absolute",display:"flex",alignItems:"center",justifyContent:"center",zIndex:n.zIndices.sidebar+1,height:"2.5rem",width:"2.5rem",transition:"opacity 300ms 150ms, transform 300ms 150ms",border:"none",color:n.colors.fadedText60,borderRadius:"50%",...i,"&:focus":{outline:"none"},"&:active, &:focus-visible, &:hover":{opacity:1,outline:"none",transform:"scale(1)",color:n.colors.bodyText,transition:"none"}}}),""),h=(0,c.Z)("div",{target:"e1vs0wn30"})((e=>{let{theme:t,isExpanded:n}=e;return{"&:hover":{[m]:{opacity:1,transform:"scale(1)",transition:"none"}},...n?{position:"fixed",top:0,left:0,bottom:0,right:0,background:t.colors.bgColor,zIndex:t.zIndices.fullscreenWrapper,padding:t.spacing.md,paddingTop:t.sizes.fullScreenHeaderHeight,overflow:["auto","overlay"],display:"flex",alignItems:"center",justifyContent:"center"}:{}}}),"");var p=n(96266);class g extends i.PureComponent{constructor(e){super(e),this.context=void 0,this.controlKeys=e=>{const{expanded:t}=this.state;27===e.keyCode&&t&&this.zoomOut()},this.zoomIn=()=>{document.body.style.overflow="hidden",this.context.setFullScreen(!0),this.setState({expanded:!0})},this.zoomOut=()=>{document.body.style.overflow="unset",this.context.setFullScreen(!1),this.setState({expanded:!1})},this.convertScssRemValueToPixels=e=>parseFloat(e)*parseFloat(getComputedStyle(document.documentElement).fontSize),this.getWindowDimensions=()=>{const e=this.convertScssRemValueToPixels(this.props.theme.spacing.md),t=this.convertScssRemValueToPixels(this.props.theme.sizes.fullScreenHeaderHeight);return{fullWidth:window.innerWidth-2*e,fullHeight:window.innerHeight-(e+t)}},this.updateWindowDimensions=()=>{this.setState(this.getWindowDimensions())},this.state={expanded:!1,...this.getWindowDimensions()}}componentDidMount(){window.addEventListener("resize",this.updateWindowDimensions),document.addEventListener("keydown",this.controlKeys,!1)}componentWillUnmount(){window.removeEventListener("resize",this.updateWindowDimensions),document.removeEventListener("keydown",this.controlKeys,!1)}render(){const{expanded:e,fullWidth:t,fullHeight:n}=this.state,{children:i,width:o,height:r,disableFullscreenMode:l}=this.props;let u=a.d,c=this.zoomIn,g="View fullscreen";return e&&(u=s.m,c=this.zoomOut,g="Exit fullscreen"),(0,p.jsxs)(h,{isExpanded:e,"data-testid":"stFullScreenFrame",children:[!l&&(0,p.jsx)(m,{"data-testid":"StyledFullScreenButton",onClick:c,title:g,isExpanded:e,children:(0,p.jsx)(d.Z,{content:u})}),i(e?{width:t,height:n,expanded:e,expand:this.zoomIn,collapse:this.zoomOut}:{width:o,height:r,expanded:e,expand:this.zoomIn,collapse:this.zoomOut})]})}}g.contextType=u.E;const f=(0,l.b)(g);const b=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];class n extends i.PureComponent{constructor(){super(...arguments),this.render=()=>{const{width:n,height:i,disableFullscreenMode:o}=this.props;return(0,p.jsx)(f,{width:n,height:i,disableFullscreenMode:t||o,children:t=>{let{width:n,height:i,expanded:o,expand:r,collapse:l}=t;return(0,p.jsx)(e,{...this.props,width:n,height:i,isFullScreen:o,expand:r,collapse:l})}})}}}return n.displayName=`withFullScreenWrapper(${e.displayName||e.name})`,r()(n,e)}},32472:(e,t,n)=>{n.r(t),n.d(t,{default:()=>$t});var i=n(5057),o=n(43128),r=n(6095),l=n(27179),a=n(99430),s=n(23046),d=n(30383),u=n(61078),c=n(83221),m=n(52955),h=n(10266),p=n(60913),g=n(50120),f=n(47206),b=n(18932),v=n(93576),y=n(9847),w=n(98790),x=n(38830),C=n(44088),E=n(73401),S=n(82160),M=n(17966);const k="-2.4rem",T=(0,S.Z)("div",{target:"e2wxzia1"})((e=>{let{theme:t,locked:n,target:i}=e;return{padding:`${t.spacing.sm} 0 ${t.spacing.sm} ${t.spacing.sm}`,position:"absolute",top:n?k:"-1rem",right:t.spacing.none,transition:"none",...!n&&{opacity:0,"&:active, &:focus-visible, &:hover":{transition:"opacity 150ms 100ms, top 100ms 100ms",opacity:1,top:k},...i&&{[`${i}:hover &, ${i}:active &, ${i}:focus-visible &`]:{transition:"opacity 150ms 100ms, top 100ms 100ms",opacity:1,top:k}}}}}),""),R=(0,S.Z)("div",{target:"e2wxzia0"})((e=>{let{theme:t}=e;return{color:(0,M.Iy)(t)?t.colors.fadedText60:t.colors.bodyText,display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-end",boxShadow:"1px 2px 8px rgba(0, 0, 0, 0.08)",borderRadius:t.radii.default,backgroundColor:t.colors.lightenedBg05,width:"fit-content",zIndex:t.zIndices.sidebar+1}}),"");var I=n(96266);function N(e){let{label:t,show_label:n,icon:i,onClick:o}=e;const r=(0,f.u)(),l=n?t:"";return(0,I.jsx)("div",{"data-testid":"stElementToolbarButton",children:(0,I.jsx)(w.Z,{content:(0,I.jsx)(y.ZP,{source:t,allowHTML:!1,style:{fontSize:r.fontSizes.sm}}),placement:w.u.TOP,onMouseEnterDelay:1e3,inline:!0,children:(0,I.jsxs)(x.ZP,{onClick:e=>{o&&o(),e.stopPropagation()},kind:C.nW.ELEMENT_TOOLBAR,children:[i&&(0,I.jsx)(E.Z,{content:i,size:"md",testid:"stElementToolbarButtonIcon"}),l&&(0,I.jsx)("span",{children:l})]})})})}const _=e=>{let{onExpand:t,onCollapse:n,isFullScreen:i,locked:o,children:r,target:l,disableFullscreenMode:a}=e;return(0,I.jsx)(T,{className:"stElementToolbar","data-testid":"stElementToolbar",locked:o||i,target:l,children:(0,I.jsxs)(R,{children:[r,t&&!a&&!i&&(0,I.jsx)(N,{label:"Fullscreen",icon:b.i,onClick:()=>t()}),n&&!a&&i&&(0,I.jsx)(N,{label:"Close fullscreen",icon:v.m,onClick:()=>n()})]})})};var O=n(31808),D=n(26849),F=n.n(D),A=n(40807),z=n.n(A),H=n(61918),$=n.n(H),V=n(59500),L=n(88084),W=n.n(L),j=(n(56719),n(27055)),B=n.n(j),P=n(55490);const Z=["true","t","yes","y","on","1"],Y=["false","f","no","n","off","0"];function U(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e=`\u26a0\ufe0f ${e}`,{kind:o.p6.Text,readonly:!0,allowOverlay:!0,data:e+(t?`\n\n${t}\n`:""),displayData:e,isError:!0}}function q(e){return e.hasOwnProperty("isError")&&e.isError}function J(e){return e.hasOwnProperty("isMissingValue")&&e.isMissingValue}function K(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]?{kind:o.p6.Loading,allowOverlay:!1,isMissingValue:!0}:{kind:o.p6.Loading,allowOverlay:!1}}function G(e,t){const n=t?"faded":"normal";return{kind:o.p6.Text,data:"",displayData:"",allowOverlay:!0,readonly:e,style:n}}function X(e){return{id:e.id,title:e.title,hasMenu:!1,themeOverride:e.themeOverride,icon:e.icon,...e.isStretched&&{grow:e.isIndex?1:3},...e.width&&{width:e.width}}}function Q(e,t){return(0,g.le)(e)?t||{}:(0,g.le)(t)?e||{}:z()(e,t)}function ee(e){if((0,g.le)(e))return[];if("number"===typeof e||"boolean"===typeof e)return[e];if(e instanceof Uint8Array&&(e=new TextDecoder("utf-8").decode(e)),"string"===typeof e){if(""===e)return[];if(!e.trim().startsWith("[")||!e.trim().endsWith("]"))return e.split(",");try{return JSON.parse(e)}catch(t){return[e]}}try{const t=JSON.parse(JSON.stringify(e,((e,t)=>"bigint"===typeof t?Number(t):t)));return Array.isArray(t)?t.map((e=>["string","number","boolean","null"].includes(typeof e)?e:te(e))):[te(t)]}catch(t){return[te(e)]}}function te(e){try{try{return F()(e)}catch(t){return JSON.stringify(e,((e,t)=>"bigint"===typeof t?Number(t):t))}}catch(t){return`[${typeof e}]`}}function ne(e){if((0,g.le)(e))return null;if("boolean"===typeof e)return e;const t=te(e).toLowerCase().trim();return""===t?null:!!Z.includes(t)||!Y.includes(t)&&void 0}function ie(e){if((0,g.le)(e))return null;if(Array.isArray(e))return NaN;if("string"===typeof e){if(0===e.trim().length)return null;try{const t=$().unformat(e.trim());if((0,g.bb)(t))return t}catch(t){}}else if(e instanceof Int32Array)return Number(e[0]);return Number(e)}function oe(e,t,n){return Number.isNaN(e)||!Number.isFinite(e)?"":(0,g.le)(t)||""===t?(0===n&&(e=Math.round(e)),$()(e).format((0,g.bb)(n)?`0,0.${"0".repeat(n)}`:"0,0.[0000]")):"percent"===t?new Intl.NumberFormat(void 0,{style:"percent",minimumFractionDigits:2,maximumFractionDigits:2}).format(e):["compact","scientific","engineering"].includes(t)?new Intl.NumberFormat(void 0,{notation:t}).format(e):"duration[ns]"===t?W().duration(e/1e6,"milliseconds").humanize():t.startsWith("period[")?P.fu.formatPeriodType(BigInt(e),t):(0,V.sprintf)(t,e)}function re(e,t){return"locale"===t?new Intl.DateTimeFormat(void 0,{dateStyle:"medium",timeStyle:"medium"}).format(e.toDate()):"distance"===t?e.fromNow():"relative"===t?e.calendar():e.format(t)}function le(e){if((0,g.le)(e))return null;if(e instanceof Date)return isNaN(e.getTime())?void 0:e;if("string"===typeof e&&0===e.trim().length)return null;try{const t=Number(e);if(!isNaN(t)){let e=t;t>=10**18?e=t/1e3**3:t>=10**15?e=t/1e6:t>=10**12&&(e=t/1e3);const n=W().unix(e).utc();if(n.isValid())return n.toDate()}if("string"===typeof e){const t=W().utc(e);if(t.isValid())return t.toDate();const n=W().utc(e,[W().HTML5_FMT.TIME_MS,W().HTML5_FMT.TIME_SECONDS,W().HTML5_FMT.TIME]);if(n.isValid())return n.toDate()}}catch(t){return}}function ae(e){if(e%1===0)return 0;let t=e.toString();return-1!==t.indexOf("e")&&(t=e.toLocaleString("fullwide",{useGrouping:!1,maximumFractionDigits:20})),-1===t.indexOf(".")?0:t.split(".")[1].length}const se=new RegExp(/(\r\n|\n|\r)/gm);function de(e){return-1!==e.indexOf("\n")?e.replace(se," "):e}var ue=n(70714);function ce(e){const t={kind:o.p6.Text,data:"",displayData:"",allowOverlay:!0,contentAlignment:e.contentAlignment,readonly:!0,style:e.isIndex?"faded":"normal"};return{...e,kind:"object",sortMode:"default",isEditable:!1,getCell(e){try{const n=(0,g.bb)(e)?te(e):null,i=(0,g.bb)(n)?de(n):"";return{...t,data:n,displayData:i,isMissingValue:(0,g.le)(e)}}catch(n){return U(te(e),`The value cannot be interpreted as a string. Error: ${n}`)}},getCellValue:e=>void 0===e.data?null:e.data}}ce.isEditableType=!1;const me=ce;function he(e){const t=e.columnTypeOptions||{};let n;if(t.validate)try{n=new RegExp(t.validate,"us")}catch(l){n=`Invalid validate regex: ${t.validate}.\nError: ${l}`}const i={kind:o.p6.Text,data:"",displayData:"",allowOverlay:!0,contentAlignment:e.contentAlignment,readonly:!e.isEditable,style:e.isIndex?"faded":"normal"},r=i=>{if((0,g.le)(i))return!e.isRequired;let o=te(i),r=!1;return t.max_chars&&o.length>t.max_chars&&(o=o.slice(0,t.max_chars),r=!0),!(n instanceof RegExp&&!1===n.test(o))&&(!r||o)};return{...e,kind:"text",sortMode:"default",validateInput:r,getCell(e,t){if("string"===typeof n)return U(te(e),n);if(t){const t=r(e);if(!1===t)return U(te(e),"Invalid input.");"string"===typeof t&&(e=t)}try{const t=(0,g.bb)(e)?te(e):null,n=(0,g.bb)(t)?de(t):"";return{...i,isMissingValue:(0,g.le)(t),data:t,displayData:n}}catch(l){return U("Incompatible value",`The value cannot be interpreted as string. Error: ${l}`)}},getCellValue:e=>void 0===e.data?null:e.data}}he.isEditableType=!0;const pe=he;function ge(e,t){return e=t.startsWith("+")||t.startsWith("-")?e.utcOffset(t,!1):e.tz(t)}function fe(e,t,n,i,r,l,a){var s;const d=Q({format:n,step:i,timezone:a},t.columnTypeOptions);let u,c,m;if((0,g.bb)(d.timezone))try{var h;u=(null===(h=ge(B()(),d.timezone))||void 0===h?void 0:h.utcOffset())||void 0}catch(b){}(0,g.bb)(d.min_value)&&(c=le(d.min_value)||void 0),(0,g.bb)(d.max_value)&&(m=le(d.max_value)||void 0);const p={kind:o.p6.Custom,allowOverlay:!0,copyData:"",readonly:!t.isEditable,contentAlign:t.contentAlignment,style:t.isIndex?"faded":"normal",data:{kind:"date-picker-cell",date:void 0,displayDate:"",step:(null===(s=d.step)||void 0===s?void 0:s.toString())||"1",format:r,min:c,max:m}},f=e=>{const n=le(e);return null===n?!t.isRequired:void 0!==n&&(!((0,g.bb)(c)&&l(n)<l(c))&&!((0,g.bb)(m)&&l(n)>l(m)))};return{...t,kind:e,sortMode:"default",validateInput:f,getCell(e,t){if(!0===t){const t=f(e);if(!1===t)return U(te(e),"Invalid input.");t instanceof Date&&(e=t)}const i=le(e);let o="",r="",l=u;if(void 0===i)return U(te(e),"The value cannot be interpreted as a datetime object.");if(null!==i){let e=B().utc(i);if(!e.isValid())return U(te(i),`This should never happen. Please report this bug. \nError: ${e.toString()}`);if(d.timezone){try{e=ge(e,d.timezone)}catch(b){return U(e.toISOString(),`Failed to adjust to the provided timezone: ${d.timezone}. \nError: ${b}`)}l=e.utcOffset()}try{r=re(e,d.format||n)}catch(b){return U(e.toISOString(),`Failed to format the date for rendering with: ${d.format}. \nError: ${b}`)}o=re(e,n)}return{...p,copyData:o,isMissingValue:(0,g.le)(i),data:{...p.data,date:i,displayDate:r,timezoneOffset:l}}},getCellValue(e){var t;return(0,g.le)(null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.date)?null:l(e.data.date)}}}function be(e){var t,n,i,o,r;let l="YYYY-MM-DD HH:mm:ss";(null===(t=e.columnTypeOptions)||void 0===t?void 0:t.step)>=60?l="YYYY-MM-DD HH:mm":(null===(n=e.columnTypeOptions)||void 0===n?void 0:n.step)<1&&(l="YYYY-MM-DD HH:mm:ss.SSS");const a=null===(i=e.arrowType)||void 0===i||null===(o=i.meta)||void 0===o?void 0:o.timezone,s=(0,g.bb)(a)||(0,g.bb)(null===e||void 0===e||null===(r=e.columnTypeOptions)||void 0===r?void 0:r.timezone);return fe("datetime",e,s?l+"Z":l,1,"datetime-local",(e=>s?e.toISOString():e.toISOString().replace("Z","")),a)}function ve(e){var t,n;let i="HH:mm:ss";return(null===(t=e.columnTypeOptions)||void 0===t?void 0:t.step)>=60?i="HH:mm":(null===(n=e.columnTypeOptions)||void 0===n?void 0:n.step)<1&&(i="HH:mm:ss.SSS"),fe("time",e,i,1,"time",(e=>e.toISOString().split("T")[1].replace("Z","")))}function ye(e){return fe("date",e,"YYYY-MM-DD",1,"date",(e=>e.toISOString().split("T")[0]))}function we(e){const t={kind:o.p6.Boolean,data:!1,allowOverlay:!1,contentAlign:e.contentAlignment,readonly:!e.isEditable,style:e.isIndex?"faded":"normal"};return{...e,kind:"checkbox",sortMode:"default",getCell(e){let n=null;return n=ne(e),void 0===n?U(te(e),"The value cannot be interpreted as boolean."):{...t,data:n,isMissingValue:(0,g.le)(n)}},getCellValue:e=>void 0===e.data?null:e.data}}be.isEditableType=!0,ve.isEditableType=!0,ye.isEditableType=!0,we.isEditableType=!0;const xe=we;function Ce(e){return e.startsWith("int")&&!e.startsWith("interval")||"range"===e||e.startsWith("uint")}function Ee(e){const t=P.fu.getTypeName(e.arrowType);let n;"timedelta64[ns]"===t?n="duration[ns]":t.startsWith("period[")&&(n=t);const i=Q({step:Ce(t)?1:void 0,min_value:t.startsWith("uint")?0:void 0,format:n},e.columnTypeOptions),r=(0,g.le)(i.min_value)||i.min_value<0,l=(0,g.bb)(i.step)&&!Number.isNaN(i.step)?ae(i.step):void 0,a={kind:o.p6.Number,data:void 0,displayData:"",readonly:!e.isEditable,allowOverlay:!0,contentAlign:e.contentAlignment||"right",style:e.isIndex?"faded":"normal",allowNegative:r,fixedDecimals:l,thousandSeparator:""},s=t=>{let n=ie(t);if((0,g.le)(n))return!e.isRequired;if(Number.isNaN(n))return!1;let o=!1;return(0,g.bb)(i.max_value)&&n>i.max_value&&(n=i.max_value,o=!0),!((0,g.bb)(i.min_value)&&n<i.min_value)&&(!o||n)};return{...e,kind:"number",sortMode:"smart",validateInput:s,getCell(e,t){if(!0===t){const t=s(e);if(!1===t)return U(te(e),"Invalid input.");"number"===typeof t&&(e=t)}let n=ie(e),o="";if((0,g.bb)(n)){if(Number.isNaN(n))return U(te(e),"The value cannot be interpreted as a number.");if((0,g.bb)(l)&&(r=n,n=0===(d=l)?Math.trunc(r):Math.trunc(r*10**d)/10**d),Number.isInteger(n)&&!Number.isSafeInteger(n))return U(te(e),"The value is larger than the maximum supported integer values in number columns (2^53).");try{o=oe(n,i.format,l)}catch(u){return U(te(n),(0,g.bb)(i.format)?`Failed to format the number based on the provided format configuration: (${i.format}). Error: ${u}`:`Failed to format the number. Error: ${u}`)}}var r,d;return{...a,data:n,displayData:o,isMissingValue:(0,g.le)(n),copyData:(0,g.le)(n)?"":te(n)}},getCellValue:e=>void 0===e.data?null:e.data}}Ee.isEditableType=!0;const Se=Ee;function Me(e){let t="string";const n=Q({options:"bool"===P.fu.getTypeName(e.arrowType)?[!0,!1]:[]},e.columnTypeOptions),i=new Set(n.options.map((e=>typeof e)));1===i.size&&(i.has("number")||i.has("bigint")?t="number":i.has("boolean")&&(t="boolean"));const r={kind:o.p6.Custom,allowOverlay:!0,copyData:"",contentAlign:e.contentAlignment,readonly:!e.isEditable,style:e.isIndex?"faded":"normal",data:{kind:"dropdown-cell",allowedValues:[...!0!==e.isRequired?[null]:[],...n.options.filter((e=>null!==e&&""!==e)).map((e=>te(e)))],value:""}};return{...e,kind:"selectbox",sortMode:"default",getCell(e,t){let n=null;return(0,g.bb)(e)&&""!==e&&(n=te(e)),t&&!r.data.allowedValues.includes(n)?U(te(n),"The value is not part of the allowed options."):{...r,isMissingValue:null===n,copyData:n||"",data:{...r.data,value:n}}},getCellValue(e){var n,i,o,r,l,a,s;return(0,g.le)(null===(n=e.data)||void 0===n?void 0:n.value)||""===(null===(i=e.data)||void 0===i?void 0:i.value)?null:"number"===t?null!==(r=ie(null===(l=e.data)||void 0===l?void 0:l.value))&&void 0!==r?r:null:"boolean"===t?null!==(a=ne(null===(s=e.data)||void 0===s?void 0:s.value))&&void 0!==a?a:null:null===(o=e.data)||void 0===o?void 0:o.value}}}Me.isEditableType=!0;const ke=Me;function Te(e){const t={kind:o.p6.Bubble,data:[],allowOverlay:!0,contentAlign:e.contentAlignment,style:e.isIndex?"faded":"normal"};return{...e,kind:"list",sortMode:"default",isEditable:!1,getCell(e){const n=(0,g.le)(e)?[]:ee(e);return{...t,data:n,isMissingValue:(0,g.le)(e),copyData:(0,g.le)(e)?"":te(n.map((e=>"string"===typeof e&&e.includes(",")?e.replace(/,/g," "):e)))}},getCellValue:e=>(0,g.le)(e.data)||J(e)?null:e.data}}Te.isEditableType=!1;const Re=Te;function Ie(e,t,n){const i=new RegExp(`${e}[,\\s].*{(?:[^}]*[\\s;]{1})?${t}:\\s*([^;}]+)[;]?.*}`,"gm");n=n.replace(/{/g," {");const o=i.exec(n);if(o)return o[1].trim()}function Ne(e,t){const n=e.types.index[t],i=e.indexNames[t];let o=!0;return"range"===P.fu.getTypeName(n)&&(o=!1),{id:`index-${t}`,name:i,title:i,isEditable:o,arrowType:n,isIndex:!0,isHidden:!1}}function _e(e,t){const n=e.columns[0][t];let i,o=e.types.data[t];if((0,g.le)(o)&&(o={meta:null,numpy_type:"object",pandas_type:"object"}),"categorical"===P.fu.getTypeName(o)){const n=e.getCategoricalOptions(t);(0,g.bb)(n)&&(i={options:n})}return{id:`column-${n}-${t}`,name:n,title:n,isEditable:!0,arrowType:o,columnTypeOptions:i,isIndex:!1,isHidden:!1}}function Oe(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;const i=e.arrowType?P.fu.getTypeName(e.arrowType):null;let r;if("object"===e.kind)r=e.getCell((0,g.bb)(t.content)?de(P.fu.format(t.content,t.contentType,t.field)):null);else if(["time","date","datetime"].includes(e.kind)&&(0,g.bb)(t.content)&&("number"===typeof t.content||"bigint"===typeof t.content)){var l,a;let n;var s,d,u;if("time"===i&&(0,g.bb)(null===(l=t.field)||void 0===l||null===(a=l.type)||void 0===a?void 0:a.unit))n=W().unix(P.fu.convertToSeconds(t.content,null!==(s=null===(d=t.field)||void 0===d||null===(u=d.type)||void 0===u?void 0:u.unit)&&void 0!==s?s:0)).utc().toDate();else n=W().utc(Number(t.content)).toDate();r=e.getCell(n)}else if("decimal"===i){const n=(0,g.le)(t.content)?null:P.fu.format(t.content,t.contentType,t.field);r=e.getCell(n)}else r=e.getCell(t.content);if(q(r))return r;if(!e.isEditable){if((0,g.bb)(t.displayContent)){var c;const e=de(t.displayContent);r.kind===o.p6.Text||r.kind===o.p6.Number||r.kind===o.p6.Uri?r={...r,displayData:e}:r.kind===o.p6.Custom&&"date-picker-cell"===(null===(c=r.data)||void 0===c?void 0:c.kind)&&(r={...r,data:{...r.data,displayDate:e}})}n&&t.cssId&&(r=function(e,t,n){const i={},o=Ie(t,"color",n);o&&(i.textDark=o);const r=Ie(t,"background-color",n);return r&&(i.bgCell=r),"yellow"===r&&void 0===o&&(i.textDark="#31333F"),i?{...e,themeOverride:i}:e}(r,t.cssId,n))}return r}function De(e){const t=e.columnTypeOptions||{};let n,i;if(t.validate)try{n=new RegExp(t.validate,"us")}catch(a){n=`Invalid validate regex: ${t.validate}.\nError: ${a}`}if(!(0,g.le)(t.display_text)&&t.display_text.includes("(")&&t.display_text.includes(")"))try{i=new RegExp(t.display_text,"us")}catch(a){i=void 0}const r={kind:o.p6.Uri,readonly:!e.isEditable,allowOverlay:!0,contentAlign:e.contentAlignment,style:e.isIndex?"faded":"normal",hoverEffect:!0,data:"",displayData:"",copyData:""},l=i=>{if((0,g.le)(i))return!e.isRequired;const o=te(i);return!(t.max_chars&&o.length>t.max_chars)&&!(n instanceof RegExp&&!1===n.test(o))};return{...e,kind:"link",sortMode:"default",validateInput:l,getCell(e,o){if((0,g.le)(e))return{...r,data:null,isMissingValue:!0,onClickUri:()=>{}};const s=e;if("string"===typeof n)return U(te(s),n);if(o){if(!1===l(s))return U(te(s),"Invalid input.")}let d="";return s&&(d=void 0!==i?function(e,t){if((0,g.le)(t))return"";try{const n=t.match(e);return n&&void 0!==n[1]?decodeURI(n[1]):t}catch(a){return t}}(i,s):t.display_text||s),{...r,data:s,displayData:d,isMissingValue:(0,g.le)(s),onClickUri:e=>{window.open(s.startsWith("www.")?`https://${s}`:s,"_blank","noopener,noreferrer"),e.preventDefault()},copyData:s}},getCellValue:e=>(0,g.le)(e.data)?null:e.data}}De.isEditableType=!0;const Fe=De;function Ae(e){const t={kind:o.p6.Image,data:[],displayData:[],readonly:!0,allowOverlay:!0,contentAlign:e.contentAlignment||"center",style:e.isIndex?"faded":"normal"};return{...e,kind:"image",sortMode:"default",isEditable:!1,getCell(e){const n=(0,g.bb)(e)?[te(e)]:[];return{...t,data:n,isMissingValue:!(0,g.bb)(e),displayData:n}},getCellValue:e=>void 0===e.data||0===e.data.length?null:e.data[0]}}Ae.isEditableType=!1;const ze=Ae;function He(e){const t=Ce(P.fu.getTypeName(e.arrowType)),n=Q({min_value:0,max_value:t?100:1,step:t?1:.01,format:t?"%3d%%":"percent"},e.columnTypeOptions);let i;try{i=oe(n.max_value,n.format)}catch(a){i=te(n.max_value)}const r=(0,g.le)(n.step)||Number.isNaN(n.step)?void 0:ae(n.step),l={kind:o.p6.Custom,allowOverlay:!1,copyData:"",contentAlign:e.contentAlignment,data:{kind:"range-cell",min:n.min_value,max:n.max_value,step:n.step,value:n.min_value,label:String(n.min_value),measureLabel:i,readonly:!0}};return{...e,kind:"progress",sortMode:"smart",isEditable:!1,getCell(e){if((0,g.le)(e))return K();if((0,g.le)(n.min_value)||(0,g.le)(n.max_value)||Number.isNaN(n.min_value)||Number.isNaN(n.max_value)||n.min_value>=n.max_value)return U("Invalid min/max parameters",`The min_value (${n.min_value}) and max_value (${n.max_value}) parameters must be valid numbers.`);if((0,g.le)(n.step)||Number.isNaN(n.step))return U("Invalid step parameter",`The step parameter (${n.step}) must be a valid number.`);const t=ie(e);if(Number.isNaN(t)||(0,g.le)(t))return U(te(e),"The value cannot be interpreted as a number.");if(Number.isInteger(t)&&!Number.isSafeInteger(t))return U(te(e),"The value is larger than the maximum supported integer values in number columns (2^53).");let i="";try{i=oe(t,n.format,r)}catch(a){return U(te(t),(0,g.bb)(n.format)?`Failed to format the number based on the provided format configuration: (${n.format}). Error: ${a}`:`Failed to format the number. Error: ${a}`)}const o=Math.min(n.max_value,Math.max(n.min_value,t));return{...l,isMissingValue:(0,g.le)(e),copyData:String(t),data:{...l.data,value:o,label:i}}},getCellValue(e){var t,n;return e.kind===o.p6.Loading||void 0===(null===(t=e.data)||void 0===t?void 0:t.value)?null:null===(n=e.data)||void 0===n?void 0:n.value}}}He.isEditableType=!1;const $e=He;function Ve(e,t,n){const i=Q({y_min:0,y_max:1},t.columnTypeOptions),r={kind:o.p6.Custom,allowOverlay:!1,copyData:"",contentAlign:t.contentAlignment,data:{kind:"sparkline-cell",values:[],displayValues:[],graphKind:n,yAxis:[i.y_min,i.y_max]}};return{...t,kind:e,sortMode:"default",isEditable:!1,getCell(e){if((0,g.le)(i.y_min)||(0,g.le)(i.y_max)||Number.isNaN(i.y_min)||Number.isNaN(i.y_max)||i.y_min>=i.y_max)return U("Invalid min/max y-axis configuration",`The y_min (${i.y_min}) and y_max (${i.y_max}) configuration options must be valid numbers.`);if((0,g.le)(e))return K();const t=ee(e),n=[];let o=[];if(0===t.length)return K();let l=Number.MIN_SAFE_INTEGER,a=Number.MAX_SAFE_INTEGER;for(let i=0;i<t.length;i++){const e=ie(t[i]);if(Number.isNaN(e)||(0,g.le)(e))return U(te(t),`The value cannot be interpreted as a numeric array. ${te(e)} is not a number.`);e>l&&(l=e),e<a&&(a=e),n.push(e)}return o=n.length>0&&(l>i.y_max||a<i.y_min)?n.map((e=>l-a===0?l>(i.y_max||1)?i.y_max||1:i.y_min||0:((i.y_max||1)-(i.y_min||0))*((e-a)/(l-a))+(i.y_min||0))):n,{...r,copyData:n.join(","),data:{...r.data,values:o,displayValues:n.map((e=>oe(e)))},isMissingValue:(0,g.le)(e)}},getCellValue(e){var t,n;return e.kind===o.p6.Loading||void 0===(null===(t=e.data)||void 0===t?void 0:t.values)?null:null===(n=e.data)||void 0===n?void 0:n.values}}}function Le(e){return Ve("line_chart",e,"line")}function We(e){return Ve("bar_chart",e,"bar")}function je(e){return Ve("area_chart",e,"area")}Le.isEditableType=!1,We.isEditableType=!1,je.isEditableType=!1;const Be=new Map(Object.entries({object:me,text:pe,checkbox:xe,selectbox:ke,list:Re,number:Se,link:Fe,datetime:be,date:ye,time:ve,line_chart:Le,bar_chart:We,area_chart:je,image:ze,progress:$e})),Pe=[],Ze="_index",Ye="_pos:",Ue={small:75,medium:200,large:400};function qe(e){if(!(0,g.le)(e))return"number"===typeof e?e:e in Ue?Ue[e]:void 0}function Je(e,t){if(!t)return e;let n;return t.has(e.name)&&e.name!==Ze?n=t.get(e.name):t.has(`${Ye}${e.indexNumber}`)?n=t.get(`${Ye}${e.indexNumber}`):e.isIndex&&t.has(Ze)&&(n=t.get(Ze)),n?z()({...e},{title:n.label,width:qe(n.width),isEditable:(0,g.bb)(n.disabled)?!n.disabled:void 0,isHidden:n.hidden,isRequired:n.required,columnTypeOptions:n.type_config,contentAlignment:n.alignment,defaultValue:n.default,help:n.help}):e}function Ke(e){var t;const n=null===(t=e.columnTypeOptions)||void 0===t?void 0:t.type;let i;return(0,g.bb)(n)&&(Be.has(n)?i=Be.get(n):(0,ue.KE)(`Unknown column type configured in column configuration: ${n}`)),(0,g.le)(i)&&(i=function(e){let t=e?P.fu.getTypeName(e):null;return t?(t=t.toLowerCase().trim(),["unicode","empty","large_string[pyarrow]"].includes(t)?pe:["datetime","datetimetz"].includes(t)?be:"time"===t?ve:"date"===t?ye:["object","bytes"].includes(t)?me:["bool"].includes(t)?xe:["int8","int16","int32","int64","uint8","uint16","uint32","uint64","float16","float32","float64","float96","float128","range","decimal"].includes(t)?Se:"categorical"===t?ke:t.startsWith("list")?Re:me):me}(e.arrowType)),i}const Ge=function(e,t,n){const o=(0,f.u)(),r=i.useMemo((()=>function(e){if(!e)return new Map;try{return new Map(Object.entries(JSON.parse(e)))}catch(t){return(0,ue.H)(t),new Map}}(e.columns)),[e.columns]),l=e.useContainerWidth||(0,g.bb)(e.width)&&e.width>0;return{columns:i.useMemo((()=>{let i=function(e){const t=[],{dimensions:n}=e,i=n.headerColumns,o=n.dataColumns;if(0===i&&0===o)return t.push({id:"empty-index",title:"",indexNumber:0,isEditable:!1,isIndex:!0}),t;for(let r=0;r<i;r++){const n={...Ne(e,r),indexNumber:r};t.push(n)}for(let r=0;r<o;r++){const n={..._e(e,r),indexNumber:r+i};t.push(n)}return t}(t).map((t=>{let i={...t,...Je(t,r),isStretched:l};const a=Ke(i);return(e.editingMode===p.Eh.EditingMode.READ_ONLY||n||!1===a.isEditableType)&&(i={...i,isEditable:!1}),e.editingMode!==p.Eh.EditingMode.READ_ONLY&&1==i.isEditable&&(i={...i,icon:"editable"},i.isRequired&&e.editingMode===p.Eh.EditingMode.DYNAMIC&&(i={...i,isHidden:!1})),a(i,o)})).filter((e=>!e.isHidden));if(e.columnOrder&&e.columnOrder.length>0){const t=[];i.forEach((e=>{e.isIndex&&t.push(e)})),e.columnOrder.forEach((e=>{const n=i.find((t=>t.name===e));n&&!n.isIndex&&t.push(n)})),i=t}return i.length>0?i:[me({id:"empty-index",title:"",indexNumber:0,isEditable:!1,isIndex:!0})]}),[t,r,l,n,e.editingMode,e.columnOrder,o])}};function Xe(e){return e.isIndex?Ze:(0,g.le)(e.name)?"":e.name}const Qe=class{constructor(e){this.editedCells=new Map,this.addedRows=[],this.deletedRows=[],this.numRows=0,this.numRows=e}toJson(e){const t=new Map;e.forEach((e=>{t.set(e.indexNumber,e)}));const n={edited_rows:{},added_rows:[],deleted_rows:[]};this.editedCells.forEach(((e,i,o)=>{const r={};e.forEach(((e,n,i)=>{const o=t.get(n);o&&(r[Xe(o)]=o.getCellValue(e))})),n.edited_rows[i]=r})),this.addedRows.forEach((e=>{const i={};let o=!1;e.forEach(((e,n,r)=>{const l=t.get(n);if(l){const t=l.getCellValue(e);l.isRequired&&l.isEditable&&J(e)&&(o=!0),(0,g.bb)(t)&&(i[Xe(l)]=t)}})),o||n.added_rows.push(i)})),n.deleted_rows=this.deletedRows;return JSON.stringify(n,((e,t)=>void 0===t?null:t))}fromJson(e,t){this.editedCells=new Map,this.addedRows=[],this.deletedRows=[];const n=JSON.parse(e),i=new Map;t.forEach((e=>{i.set(e.indexNumber,e)}));const o=new Map;t.forEach((e=>{o.set(Xe(e),e)})),Object.keys(n.edited_rows).forEach((e=>{const t=Number(e),i=n.edited_rows[e];Object.keys(i).forEach((e=>{const n=i[e],r=o.get(e);if(r){const e=r.getCell(n);var l;if(e)this.editedCells.has(t)||this.editedCells.set(t,new Map),null===(l=this.editedCells.get(t))||void 0===l||l.set(r.indexNumber,e)}}))})),n.added_rows.forEach((e=>{const n=new Map;t.forEach((e=>{n.set(e.indexNumber,e.getCell(null))})),Object.keys(e).forEach((t=>{const i=e[t],r=o.get(t);if(r){const e=r.getCell(i);e&&n.set(r.indexNumber,e)}})),this.addedRows.push(n)})),this.deletedRows=n.deleted_rows}isAddedRow(e){return e>=this.numRows}getCell(e,t){if(this.isAddedRow(t))return this.addedRows[t-this.numRows].get(e);const n=this.editedCells.get(t);return void 0!==n?n.get(e):void 0}setCell(e,t,n){if(this.isAddedRow(t)){if(t-this.numRows>=this.addedRows.length)return;this.addedRows[t-this.numRows].set(e,n)}else{void 0===this.editedCells.get(t)&&this.editedCells.set(t,new Map);this.editedCells.get(t).set(e,n)}}addRow(e){this.addedRows.push(e)}deleteRows(e){e.sort(((e,t)=>t-e)).forEach((e=>{this.deleteRow(e)}))}deleteRow(e){(0,g.le)(e)||e<0||(this.isAddedRow(e)?this.addedRows.splice(e-this.numRows,1):(this.deletedRows.includes(e)||(this.deletedRows.push(e),this.deletedRows=this.deletedRows.sort(((e,t)=>e-t))),this.editedCells.delete(e)))}getOriginalRowIndex(e){let t=e;for(let n=0;n<this.deletedRows.length&&!(this.deletedRows[n]>t);n++)t+=1;return t}getNumRows(){return this.numRows+this.addedRows.length-this.deletedRows.length}};var et=n(59990);const tt=function(){const e=(0,f.u)(),t=i.useMemo((()=>({editable:e=>`<svg xmlns="http://www.w3.org/2000/svg" height="40" viewBox="0 96 960 960" width="40" fill="${e.bgColor}"><path d="m800.641 679.743-64.384-64.384 29-29q7.156-6.948 17.642-6.948 10.485 0 17.742 6.948l29 29q6.948 7.464 6.948 17.95 0 10.486-6.948 17.434l-29 29Zm-310.64 246.256v-64.383l210.82-210.821 64.384 64.384-210.821 210.82h-64.383Zm-360-204.872v-50.254h289.743v50.254H130.001Zm0-162.564v-50.255h454.615v50.255H130.001Zm0-162.307v-50.255h454.615v50.255H130.001Z"/></svg>`})),[]);return{theme:i.useMemo((()=>({accentColor:e.colors.primary,accentFg:e.colors.white,accentLight:(0,et.DZ)(e.colors.primary,.9),borderColor:e.colors.borderColorLight,horizontalBorderColor:e.colors.borderColorLight,fontFamily:e.genericFonts.bodyFont,bgSearchResult:(0,et.DZ)(e.colors.primary,.9),resizeIndicatorColor:e.colors.primary,bgIconHeader:e.colors.fadedText60,fgIconHeader:e.colors.white,bgHeader:e.colors.bgMix,bgHeaderHasFocus:e.colors.secondaryBg,bgHeaderHovered:e.colors.secondaryBg,textHeader:e.colors.fadedText60,textHeaderSelected:e.colors.white,textGroupHeader:e.colors.fadedText60,headerFontStyle:`${e.fontSizes.sm}`,baseFontStyle:e.fontSizes.sm,editorFontSize:e.fontSizes.sm,textDark:e.colors.bodyText,textMedium:(0,et.DZ)(e.colors.bodyText,.2),textLight:e.colors.fadedText40,textBubble:e.colors.fadedText60,bgCell:e.colors.bgColor,bgCellMedium:e.colors.bgColor,cellHorizontalPadding:8,cellVerticalPadding:3,bgBubble:e.colors.secondaryBg,bgBubbleSelected:e.colors.secondaryBg,linkColor:e.colors.linkText,drilldownBorder:e.colors.darkenedBgMix25})),[e]),tableBorderRadius:e.radii.default,headerIcons:t}};const nt=function(e,t,n,o){return{getCellContent:i.useCallback((i=>{let[r,l]=i;if(r>t.length-1)return U("Column index out of bounds.","This should never happen. Please report this bug.");if(l>n-1)return U("Row index out of bounds.","This should never happen. Please report this bug.");const a=t[r],s=a.indexNumber,d=o.current.getOriginalRowIndex(l),u=o.current.isAddedRow(d);if(a.isEditable||u){const e=o.current.getCell(s,d);if((0,g.bb)(e))return e;if(u)return U("Error during cell creation.",`This should never happen. Please report this bug. No cell found for an added row: col=${s}; row=${d}`)}try{return Oe(a,e.getCell(d+1,s),e.cssStyles)}catch(c){return U("Error during cell creation.",`This should never happen. Please report this bug. \nError: ${c}`)}}),[t,n,e,o])}};var it=n(71325);const ot=function(e,t,n){const[o,r]=i.useState(),{getCellContent:l,getOriginalIndex:a}=(0,it.fF)({columns:t.map((e=>X(e))),getCellContent:n,rows:e,sort:o}),s=i.useMemo((()=>function(e,t){return void 0===t?e:e.map((e=>e.id===t.column.id?{...e,title:"asc"===t.direction?`\u2191 ${e.title}`:`\u2193 ${e.title}`}:e))}(t,o)),[t,o]),d=i.useCallback((e=>{let t="asc";const n=s[e];if(o&&o.column.id===n.id){if("asc"!==o.direction)return void r(void 0);t="desc"}r({column:X(n),direction:t,mode:n.sortMode})}),[o,s]);return{columns:s,sortColumn:d,getOriginalIndex:a,getCellContent:l}};var rt=n(50482),lt=n.n(rt);const at=function(e,t,n,r,l){const[a,s]=i.useState({columns:o.EV.empty(),rows:o.EV.empty(),current:void 0}),d=!t&&!n&&(e.selectionMode.includes(p.Eh.SelectionMode.MULTI_ROW)||e.selectionMode.includes(p.Eh.SelectionMode.SINGLE_ROW)),u=d&&e.selectionMode.includes(p.Eh.SelectionMode.MULTI_ROW),c=!t&&!n&&(e.selectionMode.includes(p.Eh.SelectionMode.SINGLE_COLUMN)||e.selectionMode.includes(p.Eh.SelectionMode.MULTI_COLUMN)),m=c&&e.selectionMode.includes(p.Eh.SelectionMode.MULTI_COLUMN),h=a.rows.length>0,g=a.columns.length>0,f=void 0!==a.current,b=i.useCallback((e=>{const t=!lt()(e.rows.toArray(),a.rows.toArray()),n=!lt()(e.columns.toArray(),a.columns.toArray()),i=!lt()(e.current,a.current);let o=d&&t||c&&n,u=e;if((d||c)&&void 0!==e.current&&i&&(u={...e,rows:a.rows,columns:a.columns},o=!1),t&&e.rows.length>0&&n&&0===e.columns.length&&(u={...u,columns:a.columns},o=!0),n&&e.columns.length>0&&t&&0===e.rows.length&&(u={...u,rows:a.rows},o=!0),n&&u.columns.length>=0){let e=u.columns;r.forEach(((t,n)=>{t.isIndex&&(e=e.remove(n))})),e.length<u.columns.length&&(u={...u,columns:e})}s(u),o&&l(u)}),[a,d,c,l,r]),v=i.useCallback((function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n={columns:t?a.columns:o.EV.empty(),rows:e?a.rows:o.EV.empty(),current:void 0};s(n),(!e&&d||!t&&c)&&l(n)}),[a,d,c,l]);return{gridSelection:a,isRowSelectionActivated:d,isMultiRowSelectionActivated:u,isColumnSelectionActivated:c,isMultiColumnSelectionActivated:m,isRowSelected:h,isColumnSelected:g,isCellSelected:f,clearSelection:v,processSelectionChange:b}},st=",",dt='"',ut='"',ct="\n",mt="\ufeff",ht=new RegExp(`[${[st,dt,ct].join("")}]`);function pt(e){return e.map((e=>function(e){if((0,g.le)(e))return"";const t=te(e);if(ht.test(t))return`${dt}${t.replace(new RegExp(dt,"g"),ut+dt)}${dt}`;return t}(e))).join(st)+ct}async function gt(e,t,n,i){const o=new TextEncoder;await e.write(o.encode(mt));const r=n.map((e=>e.name));await e.write(o.encode(pt(r)));for(let l=0;l<i;l++){const i=[];n.forEach(((e,n,o)=>{i.push(e.getCellValue(t([n,l])))})),await e.write(o.encode(pt(i)))}await e.close()}const ft=function(e,t,o,r){return{exportToCsv:i.useCallback((async()=>{const i=`${(new Date).toISOString().slice(0,16).replace(":","-")}_export.csv`;try{const r=await n.e(5599).then(n.bind(n,95599)),l=await r.showSaveFilePicker({suggestedName:i,types:[{accept:{"text/csv":[".csv"]}}],excludeAcceptAllOption:!1}),a=await l.createWritable();await gt(a,e,t,o)}catch(l){if(l instanceof Error&&"AbortError"===l.name)return;try{(0,ue.KE)("Failed to export data as CSV with FileSystem API, trying fallback method",l);let n="";const a=new WritableStream({write:async e=>{n+=new TextDecoder("utf-8").decode(e)},close:async()=>{}});await gt(a.getWriter(),e,t,o);const s=new Blob([n],{type:"text/csv;charset=utf-8;"}),d=URL.createObjectURL(s),u=document.createElement("a");r?u.setAttribute("target","_blank"):u.setAttribute("target","_self"),u.style.display="none",u.href=d,u.download=i,document.body.appendChild(u),u.click(),document.body.removeChild(u),URL.revokeObjectURL(d)}catch(l){(0,ue.H)("Failed to export data as CSV",l)}}}),[t,o,e,r])}};const bt=function(e,t,n,o,r,l,a,s,d){const u=i.useCallback(((t,i)=>{let[l,a]=t;const d=e[l];if(!d.isEditable)return;const u=d.indexNumber,c=n.current.getOriginalRowIndex(r(a)),m=o([l,a]),h=d.getCellValue(m),p=d.getCellValue(i);if(!q(m)&&p===h)return;const g=d.getCell(p,!0);q(g)?(0,ue.KE)(`Not applying the cell edit since it causes this error:\n ${g.data}`):(n.current.setCell(u,c,{...g,lastUpdated:performance.now()}),s())}),[e,n,r,o,s]),c=i.useCallback((()=>{if(t)return;const i=new Map;e.forEach((e=>{i.set(e.indexNumber,e.getCell(e.defaultValue))})),n.current.addRow(i),a()}),[e,n,t,a]),m=i.useCallback((()=>{t||(c(),s())}),[c,s,t]),h=i.useCallback((i=>{var o;if(i.rows.length>0){if(t)return!0;const e=i.rows.toArray().map((e=>n.current.getOriginalRowIndex(r(e))));return n.current.deleteRows(e),a(),d(),s(),!1}if(null!==(o=i.current)&&void 0!==o&&o.range){const t=[],n=i.current.range;for(let i=n.y;i<n.y+n.height;i++)for(let o=n.x;o<n.x+n.width;o++){const n=e[o];n.isEditable&&!n.isRequired&&(t.push({cell:[o,i]}),u([o,i],n.getCell(null)))}return t.length>0&&(s(),l(t)),!1}return!0}),[e,n,t,l,r,s,u,d,a]),p=i.useCallback(((i,a)=>{const[d,u]=i,m=[];for(let h=0;h<a.length;h++){const i=a[h];if(h+u>=n.current.getNumRows()){if(t)break;c()}for(let t=0;t<i.length;t++){const l=i[t],a=h+u,s=t+d;if(s>=e.length)break;const c=e[s];if(c.isEditable){const e=c.getCell(l,!0);if((0,g.bb)(e)&&!q(e)){const t=c.indexNumber,i=n.current.getOriginalRowIndex(r(a)),l=c.getCellValue(o([s,a]));c.getCellValue(e)!==l&&(n.current.setCell(t,i,{...e,lastUpdated:performance.now()}),m.push({cell:[s,a]}))}}}m.length>0&&(s(),l(m))}return!1}),[e,n,t,r,o,c,s,l]),f=i.useCallback(((t,n)=>{const i=t[0];if(i>=e.length)return!0;const o=e[i];if(o.validateInput){const e=o.validateInput(o.getCellValue(n));return!0===e||!1===e?e:o.getCell(e)}return!0}),[e]);return{onCellEdited:u,onPaste:p,onRowAppended:m,onDelete:h,validateCell:f}};const vt=function(e,t){const[n,o]=i.useState(),r=i.useRef(null),l=i.useCallback((n=>{if(clearTimeout(r.current),r.current=0,o(void 0),("header"===n.kind||"cell"===n.kind)&&n.location){const i=n.location[0],l=n.location[1];let a;if(i<0||i>=e.length)return;const s=e[i];if("header"===n.kind&&(0,g.bb)(s))a=s.help;else if("cell"===n.kind){const e=t([i,l]);s.isRequired&&s.isEditable&&J(e)?a="\u26a0\ufe0f Please fill out this cell.":function(e){return e.hasOwnProperty("tooltip")&&""!==e.tooltip}(e)&&(a=e.tooltip)}a&&(r.current=setTimeout((()=>{a&&o({content:a,left:n.bounds.x+n.bounds.width/2,top:n.bounds.y})}),600))}}),[e,t,o,r]);return{tooltip:n,clearTooltip:i.useCallback((()=>{o(void 0)}),[o]),onItemHovered:l}};var yt=n(40047),wt=n(35185),xt=n(60353),Ct=n(74625),Et=n(23213);const St=function(e){return{drawCell:i.useCallback(((t,n)=>{const{cell:i,theme:o,ctx:r,rect:l}=t,a=t.col;if(J(i)&&a<e.length){const i=e[a];return["checkbox","line_chart","bar_chart","progress"].includes(i.kind)?n():(e=>{const{cell:t,theme:n,ctx:i}=e;(0,yt.L6)({...e,theme:{...n,textDark:n.textLight,headerFontFull:`${n.headerFontStyle} ${n.fontFamily}`,baseFontFull:`${n.baseFontStyle} ${n.fontFamily}`,markerFontFull:`${n.markerFontStyle} ${n.fontFamily}`},spriteManager:{},hyperWrapping:!1},"None",t.contentAlign),i.fillStyle=n.textDark})(t),void(i.isRequired&&i.isEditable&&function(e,t,n){e.save(),e.beginPath(),e.moveTo(t.x+t.width-8,t.y+1),e.lineTo(t.x+t.width,t.y+1),e.lineTo(t.x+t.width,t.y+1+8),e.fillStyle=n.accentColor,e.fill(),e.restore()}(r,l,o))}n()}),[e]),customRenderers:i.useMemo((()=>[wt.Z,xt.Z,Ct.Z,Et.ZP,...Pe]),[])}};const Mt=function(e){const[t,n]=(0,i.useState)((()=>new Map)),o=i.useCallback(((e,i,o,r)=>{e.id&&n(new Map(t).set(e.id,r))}),[t]);return{columns:i.useMemo((()=>e.map((e=>e.id&&t.has(e.id)&&void 0!==t.get(e.id)?{...e,width:t.get(e.id),grow:0}:e))),[e,t]),onColumnResize:o}},kt=2,Tt=35,Rt=50+kt,It=2*Tt+kt;const Nt=function(e,t,n,o,r){let l,a=function(e){return Math.max(e*Tt+kt,It)}(t+1+(e.editingMode===p.Eh.EditingMode.DYNAMIC?1:0)),s=Math.min(a,400);e.height&&(s=Math.max(e.height,It),a=Math.max(e.height,a)),o&&(s=Math.min(s,o),a=Math.min(a,o),e.height||(s=a));let d=n;e.useContainerWidth?l=n:e.width&&(l=Math.min(Math.max(e.width,Rt),n),d=Math.min(Math.max(e.width,d),n));const[u,c]=i.useState({width:l||"100%",height:s});return i.useLayoutEffect((()=>{e.useContainerWidth&&"100%"===u.width&&c({width:n,height:u.height})}),[n]),i.useLayoutEffect((()=>{c({width:u.width,height:s})}),[t]),i.useLayoutEffect((()=>{c({width:l||"100%",height:u.height})}),[l]),i.useLayoutEffect((()=>{c({width:u.width,height:s})}),[s]),i.useLayoutEffect((()=>{if(r){const t=e.useContainerWidth||(0,g.bb)(e.width)&&e.width>0;c({width:t?d:"100%",height:a})}else c({width:l||"100%",height:s})}),[r]),{minHeight:It,maxHeight:a,minWidth:Rt,maxWidth:d,resizableSize:u,setResizableSize:c}},_t=(0,S.Z)("img",{target:"e24uaba0"})((()=>({maxWidth:"100%",maxHeight:"600px",objectFit:"scale-down"})),""),Ot=e=>{let{urls:t}=e;const n=t&&t.length>0?t[0]:"";return n.startsWith("http")?(0,I.jsx)("a",{href:n,target:"_blank",rel:"noreferrer noopener",children:(0,I.jsx)(_t,{src:n})}):(0,I.jsx)(_t,{src:n})};var Dt=n(98399),Ft=n(73830),At=n(37661);const zt=function(e){let{top:t,left:n,content:o,clearTooltip:r}=e;const[l,a]=i.useState(!0),s=(0,f.u)(),{colors:d,fontSizes:u,radii:c}=s,m=i.useCallback((()=>{a(!1),r()}),[r,a]);return(0,I.jsx)(Dt.Z,{content:(0,I.jsx)(At.Uo,{"data-testid":"stDataFrameTooltipContent",children:(0,I.jsx)(y.ZP,{style:{fontSize:u.sm},source:o,allowHTML:!1})}),placement:Ft.r4.top,accessibilityType:Ft.SI.tooltip,showArrow:!1,popoverMargin:5,onClickOutside:m,onEsc:m,overrides:{Body:{style:{borderTopLeftRadius:c.default,borderTopRightRadius:c.default,borderBottomLeftRadius:c.default,borderBottomRightRadius:c.default,paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important",backgroundColor:"transparent"}},Inner:{style:{backgroundColor:(0,M.Iy)(s)?d.bgColor:d.secondaryBg,color:d.bodyText,fontSize:u.sm,fontWeight:"normal",paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important"}}},isOpen:l,children:(0,I.jsx)("div",{"data-testid":"stDataFrameTooltipTarget",style:{position:"fixed",top:t,left:n}})})},Ht=(0,S.Z)("div",{target:"e1w7nams0"})((e=>{let{hasCustomizedScrollbars:t,theme:n}=e;return{position:"relative",display:"inline-block","& .stDataFrameGlideDataEditor":{height:"100%",minWidth:"100%",borderRadius:n.radii.default},"& .dvn-scroller":{...!t&&{scrollbarWidth:"thin"},overflowX:"auto !important",overflowY:"auto !important"}}}),"");n(27235),n(33091);const $t=(0,h.Z)((function(e){let{element:t,data:n,width:h,height:f,disabled:b,widgetMgr:v,isFullScreen:y,disableFullscreenMode:w,expand:x,collapse:C,fragmentId:E}=e;const S=i.useRef(null),M=i.useRef(null),k=i.useRef(null),{theme:T,headerIcons:R,tableBorderRadius:D}=tt(),{libConfig:{enforceDownloadInNewTab:F=!1}}=i.useContext(O.E),[A,z]=i.useState(!0),[H,$]=i.useState(!1),[V,L]=i.useState(!1),[W,j]=i.useState(!1),B=i.useMemo((()=>window.matchMedia&&window.matchMedia("(pointer: coarse)").matches),[]),P=i.useMemo((()=>window.navigator.userAgent.includes("Mac OS")&&window.navigator.userAgent.includes("Safari")||window.navigator.userAgent.includes("Chrome")),[]);(0,g.le)(t.editingMode)&&(t.editingMode=p.Eh.EditingMode.READ_ONLY);const{READ_ONLY:Z,DYNAMIC:Y}=p.Eh.EditingMode,U=n.dimensions,q=Math.max(0,U.rows-1),J=0===q&&!(t.editingMode===Y&&U.dataColumns>0),K=q>15e4,Q=i.useRef(new Qe(q)),[ee,te]=i.useState(Q.current.getNumRows());i.useEffect((()=>{Q.current=new Qe(q),te(Q.current.getNumRows())}),[q]);const ne=i.useCallback((()=>{Q.current=new Qe(q),te(Q.current.getNumRows())}),[q]),{columns:ie}=Ge(t,n,b);i.useEffect((()=>{if(t.editingMode===Z)return;const e=v.getStringValue({id:t.id,formId:t.formId});e&&(Q.current.fromJson(e,ie),te(Q.current.getNumRows()))}),[]);const{getCellContent:oe}=nt(n,ie,ee,Q),{columns:re,sortColumn:le,getOriginalIndex:ae,getCellContent:se}=ot(q,ie,oe),de=i.useCallback((0,g.Ds)(150,(e=>{const n={selection:{rows:[],columns:[]}};n.selection.rows=e.rows.toArray().map((e=>ae(e))),n.selection.columns=e.columns.toArray().map((e=>Xe(re[e])));const i=JSON.stringify(n),o=v.getStringValue({id:t.id,formId:t.formId});void 0!==o&&o===i||v.setStringValue({id:t.id,formId:t.formId},i,{fromUi:!0},E)})),[t.id,t.formId,v,E,ae,Xe]),{gridSelection:ue,isRowSelectionActivated:ce,isMultiRowSelectionActivated:me,isColumnSelectionActivated:he,isMultiColumnSelectionActivated:pe,isRowSelected:ge,isColumnSelected:fe,isCellSelected:be,clearSelection:ve,processSelectionChange:ye}=at(t,J,b,re,de);i.useEffect((()=>{ve(!0,!0)}),[y]);const we=i.useCallback((e=>{var t;null===(t=M.current)||void 0===t||t.updateCells(e)}),[]);i.useEffect((()=>{if(!ce&&!he)return;const e=v.getStringValue({id:t.id,formId:t.formId});if(e){var n,i,r,l;const t=re.map((e=>Xe(e))),a=JSON.parse(e);let s=o.EV.empty(),d=o.EV.empty();if(null===(n=a.selection)||void 0===n||null===(i=n.rows)||void 0===i||i.forEach((e=>{s=s.add(e)})),null===(r=a.selection)||void 0===r||null===(l=r.columns)||void 0===l||l.forEach((e=>{d=d.add(t.indexOf(e))})),s.length>0||d.length>0){ye({rows:s,columns:d,current:void 0})}}}),[]);const xe=i.useCallback((()=>{ee!==Q.current.getNumRows()&&te(Q.current.getNumRows())}),[ee]),Ce=i.useCallback((0,g.Ds)(150,(()=>{const e=Q.current.toJson(re);let n=v.getStringValue({id:t.id,formId:t.formId});void 0===n&&(n=new Qe(0).toJson([])),e!==n&&v.setStringValue({id:t.id,formId:t.formId},e,{fromUi:!0},E)})),[t.id,t.formId,v,E,re,Q.current]),{exportToCsv:Ee}=ft(se,re,ee,F),{onCellEdited:Se,onPaste:Me,onRowAppended:ke,onDelete:Te,validateCell:Re}=bt(re,t.editingMode!==Y,Q,se,ae,we,xe,Ce,ve),{tooltip:Ie,clearTooltip:Ne,onItemHovered:_e}=vt(re,se),{drawCell:Oe,customRenderers:De}=St(re),Fe=i.useMemo((()=>re.map((e=>X(e)))),[re]),{columns:Ae,onColumnResize:ze}=Mt(Fe),{minHeight:He,maxHeight:$e,minWidth:Ve,maxWidth:Le,resizableSize:We,setResizableSize:je}=Nt(t,ee,h,f,y),Be=i.useCallback((e=>{let[t,n]=e;return{...G(!0,!1),displayData:"empty",contentAlign:"center",allowOverlay:!1,themeOverride:{textDark:T.textLight},span:[0,Math.max(re.length-1,0)]}}),[re,T.textLight]);i.useEffect((()=>{if(!t.formId)return;const e=new m.K;return e.manageFormClearListener(v,t.formId,(()=>{ne(),ve()})),()=>{e.disconnect()}}),[t.formId,ne,ve,v]);const Pe=!J&&t.editingMode===Y&&!b,Ze=J?0:re.filter((e=>e.isIndex)).length;return i.useEffect((()=>{setTimeout((()=>{if(k.current&&M.current){var e,t;const n=null===(e=k.current)||void 0===e||null===(t=e.querySelector(".dvn-stack"))||void 0===t?void 0:t.getBoundingClientRect();n&&(L(n.height>k.current.clientHeight),j(n.width>k.current.clientWidth))}}),1)}),[We,ee,Ae]),(0,I.jsxs)(Ht,{className:"stDataFrame","data-testid":"stDataFrame",hasCustomizedScrollbars:P,ref:k,onMouseDown:e=>{if(k.current&&P){const t=k.current.getBoundingClientRect();W&&t.height-7<e.clientY-t.top&&e.stopPropagation(),V&&t.width-7<e.clientX-t.left&&e.stopPropagation()}},onBlur:e=>{A||B||e.currentTarget.contains(e.relatedTarget)||ve(!0,!0)},children:[(0,I.jsxs)(_,{isFullScreen:y,disableFullscreenMode:w,locked:ge&&!ce||be||B&&A,onExpand:x,onCollapse:C,target:Ht,children:[(ce&&ge||he&&fe)&&(0,I.jsx)(N,{label:"Clear selection",icon:a.x,onClick:()=>{ve(),Ne()}}),Pe&&ge&&(0,I.jsx)(N,{label:"Delete row(s)",icon:s.H,onClick:()=>{Te&&(Te(ue),Ne())}}),Pe&&!ge&&(0,I.jsx)(N,{label:"Add row",icon:d.m,onClick:()=>{ke&&(z(!0),ke(),Ne())}}),!K&&!J&&(0,I.jsx)(N,{label:"Download as CSV",icon:u.k,onClick:()=>Ee()}),!J&&(0,I.jsx)(N,{label:"Search",icon:c.o,onClick:()=>{H?$(!1):(z(!0),$(!0)),Ne()}})]}),(0,I.jsx)(l.e,{"data-testid":"stDataFrameResizable",ref:S,defaultSize:We,style:{border:`1px solid ${T.borderColor}`,borderRadius:`${D}`},minHeight:He,maxHeight:$e,minWidth:Ve,maxWidth:Le,size:We,enable:{top:!1,right:!1,bottom:!1,left:!1,topRight:!1,bottomRight:!0,bottomLeft:!1,topLeft:!1},grid:[1,Tt],snapGap:Tt/3,onResizeStop:(e,t,n,i)=>{S.current&&je({width:S.current.size.width,height:$e-S.current.size.height===kt?S.current.size.height+kt:S.current.size.height})},children:(0,I.jsx)(r.F,{className:"stDataFrameGlideDataEditor","data-testid":"stDataFrameGlideDataEditor",ref:M,columns:Ae,rows:J?1:ee,minColumnWidth:50,maxColumnWidth:1e3,maxColumnAutoWidth:500,rowHeight:Tt,headerHeight:Tt,getCellContent:J?Be:se,onColumnResize:B?void 0:ze,resizeIndicator:"header",freezeColumns:Ze,smoothScrollX:!0,smoothScrollY:!0,verticalBorder:!0,getCellsForSelection:!0,rowMarkers:"none",rangeSelect:B?"cell":"rect",columnSelect:"none",rowSelect:"none",onItemHovered:_e,keybindings:{downFill:!0},onKeyDown:e=>{(e.ctrlKey||e.metaKey)&&"f"===e.key&&($((e=>!e)),e.stopPropagation(),e.preventDefault())},showSearch:H,onSearchClose:()=>{$(!1),Ne()},onHeaderClicked:(e,t)=>{J||K||he||(ce&&ge&&ve(),le(e))},gridSelection:ue,onGridSelectionChange:e=>{(A||B)&&(ye(e),void 0!==Ie&&Ne())},theme:T,onMouseMove:e=>{"out-of-bounds"===e.kind&&A?z(!1):"out-of-bounds"===e.kind||A||z(!0)},fixedShadowX:!0,fixedShadowY:!0,experimental:{scrollbarWidthOverride:0,...P&&{paddingBottom:W?-6:void 0,paddingRight:V?-6:void 0}},drawCell:Oe,customRenderers:De,imageEditorOverride:Ot,headerIcons:R,validateCell:Re,onPaste:!1,...ce&&{rowMarkers:{kind:"checkbox",checkboxStyle:"square",theme:{bgCell:T.bgHeader,bgCellMedium:T.bgHeader}},rowSelectionMode:me?"multi":"auto",rowSelect:b?"none":me?"multi":"single",rowSelectionBlending:"mixed",rangeSelectionBlending:"exclusive"},...he&&{columnSelect:b?"none":pe?"multi":"single",columnSelectionBlending:"mixed",rangeSelectionBlending:"exclusive"},...!J&&t.editingMode!==Z&&!b&&{fillHandle:!B,onCellEdited:Se,onPaste:Me,onDelete:Te},...!J&&t.editingMode===Y&&{trailingRowOptions:{sticky:!1,tint:!0},rowMarkers:{kind:"checkbox",checkboxStyle:"square",theme:{bgCell:T.bgHeader,bgCellMedium:T.bgHeader}},rowSelectionMode:"multi",rowSelect:b?"none":"multi",onRowAppended:b?void 0:ke,onHeaderClicked:void 0}})}),Ie&&Ie.content&&(0,I.jsx)(zt,{top:Ie.top,left:Ie.left,content:Ie.content,clearTooltip:Ne})]})}),!0)},52955:(e,t,n)=>{n.d(t,{K:()=>o});var i=n(50120);class o{constructor(){this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}manageFormClearListener(e,t,n){(0,i.bb)(this.formClearListener)&&this.lastWidgetMgr===e&&this.lastFormId===t||(this.disconnect(),(0,i.bM)(t)&&(this.formClearListener=e.addFormClearedListener(t,n),this.lastWidgetMgr=e,this.lastFormId=t))}disconnect(){var e;null===(e=this.formClearListener)||void 0===e||e.disconnect(),this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_stlite_desktop=self.webpackChunk_stlite_desktop||[]).push([[2448],{52955:(e,t,r)=>{r.d(t,{K:()=>n});var o=r(50120);class n{constructor(){this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}manageFormClearListener(e,t,r){(0,o.bb)(this.formClearListener)&&this.lastWidgetMgr===e&&this.lastFormId===t||(this.disconnect(),(0,o.bM)(t)&&(this.formClearListener=e.addFormClearedListener(t,r),this.lastWidgetMgr=e,this.lastFormId=t))}disconnect(){var e;null===(e=this.formClearListener)||void 0===e||e.disconnect(),this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}}},12448:(e,t,r)=>{r.r(t),r.d(t,{default:()=>ce});var o=r(5057),n=r(47206),i=r(80099),a=r(53381);function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){c(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function c(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var u=0,p=1,d=2;function f(e){return e.$isActive?d:e.$isHovered?p:u}function h(e){var t=e.$theme.colors,r=e.$disabled,o=e.$checked,n=e.$isFocusVisible,i=e.$error;if(r)return t.tickFillDisabled;if(!o)return n?t.borderSelected:i?t.tickBorderError:t.tickBorder;if(i)switch(f(e)){case u:return t.tickFillErrorSelected;case p:return t.tickFillErrorSelectedHover;case d:return t.tickFillErrorSelectedHoverActive}else switch(f(e)){case u:return t.tickFillSelected;case p:return t.tickFillSelectedHover;case d:return t.tickFillSelectedHoverActive}return null}function b(e){var t=e.$theme.colors;if(e.$disabled)return t.tickMarkFillDisabled;if(e.$checked)return t.tickMarkFill;if(e.$error)switch(f(e)){case u:return t.tickFillError;case p:return t.tickFillErrorHover;case d:return t.tickFillErrorHoverActive}else switch(f(e)){case u:return t.tickFill;case p:return t.tickFillHover;case d:return t.tickFillActive}}function m(e){var t=e.$disabled,r=e.$theme.colors;return t?r.contentSecondary:r.contentPrimary}var v=(0,a.zo)("div",(function(e){var t=e.$disabled,r=e.$align;return{display:"flex",flexWrap:"wrap",flexDirection:"horizontal"===r?"row":"column",alignItems:"horizontal"===r?"center":"flex-start",cursor:t?"not-allowed":"pointer","-webkit-tap-highlight-color":"transparent"}}));v.displayName="RadioGroupRoot",v.displayName="RadioGroupRoot";var g=(0,a.zo)("label",(function(e){var t,r=e.$disabled,o=e.$hasDescription,n=e.$labelPlacement,i=e.$theme,a=e.$align,s=i.sizing,l="horizontal"===a,u="rtl"===i.direction?"Left":"Right";return c(t={flexDirection:"top"===n||"bottom"===n?"column":"row",display:"flex",alignItems:"center",cursor:r?"not-allowed":"pointer",marginTop:s.scale200},"margin".concat(u),l?s.scale200:null),c(t,"marginBottom",o&&!l?null:s.scale200),t}));g.displayName="Root",g.displayName="Root";var y=(0,a.zo)("div",(function(e){var t=e.$theme,r=t.animation,o=t.sizing;return{backgroundColor:b(e),borderTopLeftRadius:"50%",borderTopRightRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",height:e.$checked?o.scale200:o.scale550,transitionDuration:r.timing200,transitionTimingFunction:r.easeOutCurve,width:e.$checked?o.scale200:o.scale550}}));y.displayName="RadioMarkInner",y.displayName="RadioMarkInner";var w=(0,a.zo)("div",(function(e){var t=e.$theme,r=t.animation,o=t.sizing;return{alignItems:"center",backgroundColor:h(e),borderTopLeftRadius:"50%",borderTopRightRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",boxShadow:e.$isFocusVisible&&e.$checked?"0 0 0 3px ".concat(e.$theme.colors.accent):"none",display:"flex",height:o.scale700,justifyContent:"center",marginTop:o.scale0,marginRight:o.scale0,marginBottom:o.scale0,marginLeft:o.scale0,outline:"none",verticalAlign:"middle",width:o.scale700,flexShrink:0,transitionDuration:r.timing200,transitionTimingFunction:r.easeOutCurve}}));w.displayName="RadioMarkOuter",w.displayName="RadioMarkOuter";var R=(0,a.zo)("div",(function(e){var t=e.$theme.typography;return l(l({verticalAlign:"middle"},function(e){var t,r=e.$labelPlacement,o=void 0===r?"":r,n=e.$theme;switch(o){case"top":t="Bottom";break;case"bottom":t="Top";break;case"left":t="rtl"===n.direction?"Left":"Right";break;default:t="rtl"===n.direction?"Right":"Left"}var i=n.sizing.scale300;return c({},"padding".concat(t),i)}(e)),{},{color:m(e)},t.LabelMedium)}));R.displayName="Label",R.displayName="Label";var O=(0,a.zo)("input",{width:0,height:0,marginTop:0,marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,clip:"rect(0 0 0 0)",position:"absolute"});O.displayName="Input",O.displayName="Input";var k=(0,a.zo)("div",(function(e){var t,r=e.$theme,o=e.$align,n="horizontal"===o,i="rtl"===r.direction?"Right":"Left",a="rtl"===r.direction?"Left":"Right";return l(l({},r.typography.ParagraphSmall),{},(c(t={color:r.colors.contentSecondary,cursor:"auto"},"margin".concat(i),"horizontal"===o?null:r.sizing.scale900),c(t,"margin".concat(a),n?r.sizing.scale200:null),c(t,"maxWidth","240px"),t))}));k.displayName="Description",k.displayName="Description";var j=r(94253);function F(e){return F="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},F(e)}function $(){return $=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},$.apply(this,arguments)}function M(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var o,n,i=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(o=r.next()).done)&&(i.push(o.value),!t||i.length!==t);a=!0);}catch(l){s=!0,n=l}finally{try{a||null==r.return||r.return()}finally{if(s)throw n}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return P(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return P(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function S(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function x(e,t){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},x(e,t)}function C(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,o=L(e);if(t){var n=L(this).constructor;r=Reflect.construct(o,arguments,n)}else r=o.apply(this,arguments);return function(e,t){if(t&&("object"===F(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return E(e)}(this,r)}}function E(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function L(e){return L=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},L(e)}function I(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var T=function(e){!function(e,t){if("function"!==typeof t&&null!==t)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&&x(e,t)}(s,e);var t,r,n,a=C(s);function s(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return I(E(e=a.call.apply(a,[this].concat(r))),"state",{isFocusVisible:!1,focusedRadioIndex:-1}),I(E(e),"handleFocus",(function(t,r){(0,j.E)(t)&&e.setState({isFocusVisible:!0}),e.setState({focusedRadioIndex:r}),e.props.onFocus&&e.props.onFocus(t)})),I(E(e),"handleBlur",(function(t,r){!1!==e.state.isFocusVisible&&e.setState({isFocusVisible:!1}),e.setState({focusedRadioIndex:-1}),e.props.onBlur&&e.props.onBlur(t)})),e}return t=s,(r=[{key:"render",value:function(){var e=this,t=this.props.overrides,r=void 0===t?{}:t,n=M((0,i.jb)(r.RadioGroupRoot,v),2),a=n[0],s=n[1];return o.createElement(a,$({id:this.props.id,role:"radiogroup","aria-describedby":this.props["aria-describedby"],"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props.error||null,"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],$align:this.props.align,$disabled:this.props.disabled,$error:this.props.error,$required:this.props.required},s),o.Children.map(this.props.children,(function(t,r){if(!o.isValidElement(t))return null;var n=e.props.value===t.props.value;return o.cloneElement(t,{align:e.props.align,autoFocus:e.props.autoFocus,checked:n,disabled:e.props.disabled||t.props.disabled,error:e.props.error,isFocused:e.state.focusedRadioIndex===r,isFocusVisible:e.state.isFocusVisible,tabIndex:0===r&&!e.props.value||n?"0":"-1",labelPlacement:e.props.labelPlacement,name:e.props.name,onBlur:function(t){return e.handleBlur(t,r)},onFocus:function(t){return e.handleFocus(t,r)},onChange:e.props.onChange,onMouseEnter:e.props.onMouseEnter,onMouseLeave:e.props.onMouseLeave})})))}}])&&S(t.prototype,r),n&&S(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(o.Component);I(T,"defaultProps",{name:"",value:"",disabled:!1,autoFocus:!1,labelPlacement:"right",align:"vertical",error:!1,required:!1,onChange:function(){},onMouseEnter:function(){},onMouseLeave:function(){},onFocus:function(){},onBlur:function(){},overrides:{}});const B=T;var D="vertical",V="horizontal";function z(e){return z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},z(e)}function A(){return A=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},A.apply(this,arguments)}function H(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var o,n,i=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(o=r.next()).done)&&(i.push(o.value),!t||i.length!==t);a=!0);}catch(l){s=!0,n=l}finally{try{a||null==r.return||r.return()}finally{if(s)throw n}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return _(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function U(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function N(e,t){return N=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},N(e,t)}function W(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,o=G(e);if(t){var n=G(this).constructor;r=Reflect.construct(o,arguments,n)}else r=o.apply(this,arguments);return function(e,t){if(t&&("object"===z(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return q(e)}(this,r)}}function q(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function G(e){return G=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},G(e)}function X(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Z=function(e){return e.stopPropagation()},K=function(e){!function(e,t){if("function"!==typeof t&&null!==t)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&&N(e,t)}(s,e);var t,r,n,a=W(s);function s(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return X(q(e=a.call.apply(a,[this].concat(r))),"state",{isActive:!1,isHovered:!1}),X(q(e),"onMouseEnter",(function(t){e.setState({isHovered:!0}),e.props.onMouseEnter&&e.props.onMouseEnter(t)})),X(q(e),"onMouseLeave",(function(t){e.setState({isHovered:!1}),e.props.onMouseLeave&&e.props.onMouseLeave(t)})),X(q(e),"onMouseDown",(function(t){e.setState({isActive:!0}),e.props.onMouseDown&&e.props.onMouseDown(t)})),X(q(e),"onMouseUp",(function(t){e.setState({isActive:!1}),e.props.onMouseUp&&e.props.onMouseUp(t)})),e}return t=s,(r=[{key:"componentDidMount",value:function(){var e;this.props.autoFocus&&null!==(e=this.props.inputRef)&&void 0!==e&&e.current&&this.props.inputRef.current.focus()}},{key:"render",value:function(){var e,t=this.props.overrides,r=void 0===t?{}:t,n=H((0,i.jb)(r.Root,g),2),a=n[0],s=n[1],l=H((0,i.jb)(r.Label,R),2),c=l[0],u=l[1],p=H((0,i.jb)(r.Input,O),2),d=p[0],f=p[1],h=H((0,i.jb)(r.Description,k),2),b=h[0],m=h[1],v=H((0,i.jb)(r.RadioMarkInner,y),2),j=v[0],F=v[1],$=H((0,i.jb)(r.RadioMarkOuter,w),2),M=$[0],P=$[1],S={$align:this.props.align,$checked:this.props.checked,$disabled:this.props.disabled,$hasDescription:!!this.props.description,$isActive:this.state.isActive,$error:this.props.error,$isFocused:this.props.isFocused,$isFocusVisible:this.props.isFocused&&this.props.isFocusVisible,$isHovered:this.state.isHovered,$labelPlacement:this.props.labelPlacement,$required:this.props.required,$value:this.props.value},x=o.createElement(c,A({},S,u),this.props.containsInteractiveElement?o.createElement("div",{onClick:function(e){return e.preventDefault()}},this.props.children):this.props.children);return o.createElement(o.Fragment,null,o.createElement(a,A({"data-baseweb":"radio",onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp},S,s),("top"===(e=this.props.labelPlacement)||"left"===e)&&x,o.createElement(M,A({},S,P),o.createElement(j,A({},S,F))),o.createElement(d,A({"aria-invalid":this.props.error||null,checked:this.props.checked,disabled:this.props.disabled,name:this.props.name,onBlur:this.props.onBlur,onFocus:this.props.onFocus,onClick:Z,onChange:this.props.onChange,ref:this.props.inputRef,required:this.props.required,tabIndex:this.props.tabIndex,type:"radio",value:this.props.value},S,f)),function(e){return"bottom"===e||"right"===e}(this.props.labelPlacement)&&x),!!this.props.description&&o.createElement(b,A({},S,m),this.props.description))}}])&&U(t.prototype,r),n&&U(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(o.Component);X(K,"defaultProps",{overrides:{},containsInteractiveElement:!1,checked:!1,disabled:!1,autoFocus:!1,inputRef:o.createRef(),align:"vertical",error:!1,onChange:function(){},onMouseEnter:function(){},onMouseLeave:function(){},onMouseDown:function(){},onMouseUp:function(){},onFocus:function(){},onBlur:function(){}});const J=K;var Q=r(38944),Y=r(93905),ee=r(21034),te=r(98790),re=r(9847),oe=r(96266);class ne extends o.PureComponent{constructor(){var e;super(...arguments),this.state={value:null!==(e=this.props.value)&&void 0!==e?e:null},this.onChange=e=>{const t=parseInt(e.target.value,10);this.setState({value:t},(()=>this.props.onChange(t)))}}componentDidUpdate(e){e.value!==this.props.value&&this.props.value!==this.state.value&&this.setState(((e,t)=>{var r;return{value:null!==(r=t.value)&&void 0!==r?r:null}}))}render(){const{theme:e,width:t,help:r,label:o,horizontal:n,labelVisibility:i}=this.props;let{disabled:a}=this.props;const{colors:s,radii:l}=e,c={width:t},u=[...this.props.options],p=[...this.props.captions],d=p.length>0;return 0===u.length&&(u.push("No options to select."),a=!0),(0,oe.jsxs)("div",{className:"stRadio","data-testid":"stRadio",style:c,children:[(0,oe.jsx)(Q.O,{label:o,disabled:a,labelVisibility:i,children:r&&(0,oe.jsx)(Y.Hp,{children:(0,oe.jsx)(ee.Z,{content:r,placement:te.u.TOP_RIGHT})})}),(0,oe.jsx)(B,{onChange:this.onChange,value:null!==this.state.value?this.state.value.toString():void 0,disabled:a,align:n?V:D,"aria-label":o,"data-testid":"stRadioGroup",overrides:{RadioGroupRoot:{style:{gap:d?e.spacing.sm:e.spacing.none,minHeight:e.sizes.minElementHeight}}},children:u.map(((t,r)=>{return(0,oe.jsxs)(J,{value:r.toString(),overrides:{Root:{style:t=>{let{$isFocusVisible:r}=t;return{marginBottom:e.spacing.none,marginTop:e.spacing.none,marginRight:d?e.spacing.sm:e.spacing.lg,paddingLeft:e.spacing.none,alignItems:"start",paddingRight:e.spacing.threeXS,backgroundColor:r?s.darkenedBgMix25:"",borderTopLeftRadius:l.md,borderTopRightRadius:l.md,borderBottomLeftRadius:l.md,borderBottomRightRadius:l.md}}},RadioMarkOuter:{style:t=>{let{$checked:r}=t;return{width:e.sizes.checkbox,height:e.sizes.checkbox,marginTop:"0.35rem",marginRight:e.spacing.none,marginLeft:e.spacing.none,backgroundColor:r&&!a?s.primary:s.fadedText40}}},RadioMarkInner:{style:t=>{let{$checked:r}=t;return{height:r?"6px":`calc(${e.sizes.checkbox} - ${e.spacing.threeXS})`,width:r?"6px":`calc(${e.sizes.checkbox} - ${e.spacing.threeXS})`}}},Label:{style:{color:a?s.fadedText40:s.bodyText,position:"relative",top:e.spacing.px}}},children:[(0,oe.jsx)(re.ZP,{source:t,allowHTML:!1,isLabel:!0,largerLabel:!0}),d&&(0,oe.jsx)(re.ZP,{source:(o=p[r],""==o&&n&&d?" ":o),allowHTML:!1,isCaption:!0,isLabel:!0})]},r);var o}))})]})}}const ie=(0,n.b)(ne);var ae=r(52955),se=r(50120);class le extends o.PureComponent{constructor(){super(...arguments),this.formClearHelper=new ae.K,this.state={value:this.initialValue},this.commitWidgetValue=e=>{const{widgetMgr:t,element:r,fragmentId:o}=this.props;t.setIntValue(r,this.state.value,e,o)},this.onFormCleared=()=>{this.setState(((e,t)=>{var r;return{value:null!==(r=t.element.default)&&void 0!==r?r:null}}),(()=>this.commitWidgetValue({fromUi:!0})))},this.onChange=e=>{this.setState({value:e},(()=>this.commitWidgetValue({fromUi:!0})))}}get initialValue(){var e;const t=this.props.widgetMgr.getIntValue(this.props.element);return null!==(e=null!==t&&void 0!==t?t:this.props.element.default)&&void 0!==e?e:null}componentDidMount(){this.props.element.setValue?this.updateFromProtobuf():this.commitWidgetValue({fromUi:!1})}componentDidUpdate(){this.maybeUpdateFromProtobuf()}componentWillUnmount(){this.formClearHelper.disconnect()}maybeUpdateFromProtobuf(){const{setValue:e}=this.props.element;e&&this.updateFromProtobuf()}updateFromProtobuf(){const{value:e}=this.props.element;this.props.element.setValue=!1,this.setState({value:null!==e&&void 0!==e?e:null},(()=>{this.commitWidgetValue({fromUi:!1})}))}render(){const{disabled:e,element:t,width:r,widgetMgr:o}=this.props,{horizontal:n,options:i,captions:a,label:s,labelVisibility:l,help:c}=t;return this.formClearHelper.manageFormClearListener(o,t.formId,this.onFormCleared),(0,oe.jsx)(ie,{label:s,onChange:this.onChange,options:i,captions:a,width:r,disabled:e,horizontal:n,labelVisibility:(0,se.iF)(null===l||void 0===l?void 0:l.value),value:this.state.value,help:c})}}const ce=le}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_stlite_desktop=self.webpackChunk_stlite_desktop||[]).push([[2664],{82664:(e,t,o)=>{o.r(t),o.d(t,{default:()=>P});var i=o(5057),n=o(47206),s=o(5361),a=o(7329),r=o(79220),l=o(50482),d=o.n(l),c=o(50120),h=o(70714),u=o(10266),g=o(64327),m=o(52955),p=o(55490);const f={DATAFRAME_INDEX:"(index)"},b=new Set([p.GI.DatetimeIndex,p.GI.Float64Index,p.GI.Int64Index,p.GI.RangeIndex,p.GI.UInt64Index]);function v(e){var t;if(0===(null===(t=e.datasets)||void 0===t?void 0:t.length))return null;const o={};return e.datasets.forEach((e=>{if(!e)return;const t=e.hasName?e.name:null;o[t]=e.data})),o}function w(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(e.isEmpty())return[];const o=[],{dataRows:i,dataColumns:n}=e.dimensions,s=p.fu.getTypeName(e.types.index[0]),a=b.has(s);for(let r=t;r<i;r++){const t={};if(a){const o=e.getIndexValue(r,0);t[f.DATAFRAME_INDEX]="bigint"===typeof o?Number(o):o}for(let o=0;o<n;o++){const i=e.getDataValue(r,o),n=e.types.data[o],s=p.fu.getTypeName(n);if("datetimetz"!==s&&(i instanceof Date||Number.isFinite(i))&&(s.startsWith("datetime")||"date"===s)){const n=60*new Date(i).getTimezoneOffset()*1e3;t[e.columns[0][o]]=i.valueOf()+n}else t[e.columns[0][o]]="bigint"===typeof i?Number(i):i}o.push(t)}return o}var y=o(40807),x=o.n(y),S=o(71486),F=o.n(S),C=o(17966);function z(e,t){const o={font:t.genericFonts.bodyFont,background:t.colors.bgColor,fieldTitle:"verbal",autosize:{type:"fit",contains:"padding"},title:{align:"left",anchor:"start",color:t.colors.headingColor,titleFontStyle:"normal",fontWeight:t.fontWeights.bold,fontSize:t.fontSizes.smPx+2,orient:"top",offset:26},header:{titleFontWeight:t.fontWeights.normal,titleFontSize:t.fontSizes.mdPx,titleColor:(0,C.Xy)(t),titleFontStyle:"normal",labelFontSize:t.fontSizes.twoSmPx,labelFontWeight:t.fontWeights.normal,labelColor:(0,C.Xy)(t),labelFontStyle:"normal"},axis:{labelFontSize:t.fontSizes.twoSmPx,labelFontWeight:t.fontWeights.normal,labelColor:(0,C.Xy)(t),labelFontStyle:"normal",titleFontWeight:t.fontWeights.normal,titleFontSize:t.fontSizes.smPx,titleColor:(0,C.Xy)(t),titleFontStyle:"normal",ticks:!1,gridColor:(0,C.ny)(t),domain:!1,domainWidth:1,domainColor:(0,C.ny)(t),labelFlush:!0,labelFlushOffset:1,labelBound:!1,labelLimit:100,titlePadding:t.spacing.lgPx,labelPadding:t.spacing.lgPx,labelSeparation:t.spacing.twoXSPx,labelOverlap:!0},legend:{labelFontSize:t.fontSizes.smPx,labelFontWeight:t.fontWeights.normal,labelColor:(0,C.Xy)(t),titleFontSize:t.fontSizes.smPx,titleFontWeight:t.fontWeights.normal,titleFontStyle:"normal",titleColor:(0,C.Xy)(t),titlePadding:5,labelPadding:t.spacing.lgPx,columnPadding:t.spacing.smPx,rowPadding:t.spacing.twoXSPx,padding:7,symbolStrokeWidth:4},range:{category:(0,C.iY)(t),diverging:(0,C.ru)(t),ramp:(0,C.Gy)(t),heatmap:(0,C.Gy)(t)},view:{columns:1,strokeWidth:0,stroke:"transparent",continuousHeight:350,continuousWidth:400},concat:{columns:1},facet:{columns:1},mark:{tooltip:!0,...(0,C.Iy)(t)?{color:"#0068C9"}:{color:"#83C9FF"}},bar:{binSpacing:t.spacing.twoXSPx,discreteBandSize:{band:.85}},axisDiscrete:{grid:!1},axisXPoint:{grid:!1},axisTemporal:{grid:!1},axisXBand:{grid:!1}};return e?F()({},o,e,((e,t)=>Array.isArray(t)?t:void 0)):o}const W=(0,o(82160).Z)("div",{target:"egd2k5h0"})((e=>{let{theme:t,useContainerWidth:o,isFullScreen:i}=e;return{width:o||i?"100%":"auto",height:i?"100%":"auto","&.vega-embed":{"&:hover summary, .vega-embed:focus summary":{background:"transparent"},"&.has-actions":{paddingRight:0},".vega-actions":{zIndex:t.zIndices.popupMenu,backgroundColor:t.colors.bgColor,boxShadow:"rgb(0 0 0 / 16%) 0px 4px 16px",border:`${t.sizes.borderWidth} solid ${t.colors.fadedText10}`,a:{fontFamily:t.genericFonts.bodyFont,fontWeight:t.fontWeights.normal,fontSize:t.fontSizes.md,margin:0,padding:`${t.spacing.twoXS} ${t.spacing.twoXL}`,color:t.colors.bodyText},"a:hover":{backgroundColor:t.colors.secondaryBg,color:t.colors.bodyText},":before":{content:"none"},":after":{content:"none"}},summary:{opacity:0,height:"auto",zIndex:t.zIndices.menuButton,border:"none",boxShadow:"none",borderRadius:t.radii.default,color:t.colors.fadedText10,backgroundColor:"transparent",transition:"opacity 300ms 150ms,transform 300ms 150ms","&:active, &:focus-visible, &:hover":{border:"none",boxShadow:"none",color:t.colors.bodyText,opacity:"1 !important",background:t.colors.darkenedBgMix25}}}}}),"");var V=o(96266);const I="source";class D extends i.PureComponent{constructor(){super(...arguments),this.vegaView=void 0,this.vegaFinalizer=void 0,this.defaultDataName=I,this.element=null,this.formClearHelper=new m.K,this.state={error:void 0},this.finalizeView=()=>{this.vegaFinalizer&&this.vegaFinalizer(),this.vegaFinalizer=void 0,this.vegaView=void 0},this.generateSpec=()=>{var e,t;const{element:o,theme:i,isFullScreen:n,width:s,height:a}=this.props,r=JSON.parse(o.spec),{useContainerWidth:l}=o;if("streamlit"===o.vegaLiteTheme?r.config=z(r.config,i):"streamlit"===(null===(e=r.usermeta)||void 0===e||null===(t=e.embedOptions)||void 0===t?void 0:t.theme)?(r.config=z(r.config,i),r.usermeta.embedOptions.theme=void 0):r.config=function(e,t){const{colors:o,fontSizes:i,genericFonts:n}=t,s={labelFont:n.bodyFont,titleFont:n.bodyFont,labelFontSize:i.twoSmPx,titleFontSize:i.twoSmPx},a={background:o.bgColor,axis:{labelColor:o.bodyText,titleColor:o.bodyText,gridColor:(0,C.ny)(t),...s},legend:{labelColor:o.bodyText,titleColor:o.bodyText,...s},title:{color:o.bodyText,subtitleColor:o.bodyText,...s},header:{labelColor:o.bodyText,titleColor:o.bodyText,...s},view:{stroke:(0,C.ny)(t),continuousHeight:350,continuousWidth:400},mark:{tooltip:!0}};return e?x()({},a,e):a}(r.config,i),n?(r.width=s,r.height=a,"vconcat"in r&&r.vconcat.forEach((e=>{e.width=s}))):l&&(r.width=s,"vconcat"in r&&r.vconcat.forEach((e=>{e.width=s}))),r.padding||(r.padding={}),(0,c.le)(r.padding.bottom)&&(r.padding.bottom=20),r.datasets)throw new Error("Datasets should not be passed as part of the spec");return o.selectionMode.length>0&&function(e){"params"in e&&"encoding"in e&&e.params.forEach((t=>{"select"in t&&(["interval","point"].includes(t.select)&&(t.select={type:t.select}),"type"in t.select&&"point"===t.select.type&&!("encodings"in t.select)&&(0,c.le)(t.select.encodings)&&(t.select.encodings=Object.keys(e.encoding)))}))}(r),r},this.maybeConfigureSelections=()=>{if(void 0===this.vegaView)return;const{widgetMgr:e,element:t}=this.props;if(null===t||void 0===t||!t.id||0===t.selectionMode.length)return;const o=e.getElementState(this.props.element.id,"viewState");if((0,c.bb)(o))try{this.vegaView=this.vegaView.setState(o)}catch(n){(0,h.KE)("Failed to restore view state",n)}t.selectionMode.forEach(((o,i)=>{var n;null===(n=this.vegaView)||void 0===n||n.addSignalListener(o,(0,c.Ds)(150,((o,i)=>{var n;const s=null===(n=this.vegaView)||void 0===n?void 0:n.getState({data:(e,o)=>t.selectionMode.some((t=>`${t}_store`===e)),recurse:!1});(0,c.bb)(s)&&e.setElementState(t.id,"viewState",s);let a=i;"vlPoint"in i&&"or"in i.vlPoint&&(a=i.vlPoint.or);const r=JSON.parse(e.getStringValue(t)||"{}"),l={selection:{...(null===r||void 0===r?void 0:r.selection)||{},[o]:a||{}}};d()(r,l)||e.setStringValue(t,JSON.stringify(l),{fromUi:!0},this.props.fragmentId)})))}));const i=()=>{const o={selection:{}};this.props.element.selectionMode.forEach((e=>{o.selection[e]={}}));const i=e.getStringValue(t),n=i?JSON.parse(i):o;var s;d()(n,o)||(null===(s=this.props.widgetMgr)||void 0===s||s.setStringValue(this.props.element,JSON.stringify(o),{fromUi:!0},this.props.fragmentId))};this.props.element.formId&&this.formClearHelper.manageFormClearListener(this.props.widgetMgr,this.props.element.formId,i)}}async componentDidMount(){try{await this.createView()}catch(e){const t=(0,g.b)(e);this.setState({error:t})}}componentWillUnmount(){this.finalizeView()}async componentDidUpdate(e){const{element:t,theme:o}=e,{element:i,theme:n}=this.props,s=t.spec,{spec:a}=i;if(!this.vegaView||s!==a||o!==n||e.width!==this.props.width||e.height!==this.props.height||e.element.vegaLiteTheme!==this.props.element.vegaLiteTheme||!d()(e.element.selectionMode,this.props.element.selectionMode)){(0,h.ji)("Vega spec changed.");try{await this.createView()}catch(m){const e=(0,g.b)(m);this.setState({error:e})}return}const r=t.data,{data:l}=i;(r||l)&&this.updateData(this.defaultDataName,r,l);const c=v(t)||{},u=v(i)||{};for(const[d,h]of Object.entries(u)){const e=d||this.defaultDataName,t=c[e];this.updateData(e,t,h)}for(const d of Object.keys(c))u.hasOwnProperty(d)||d===this.defaultDataName||this.updateData(d,null,null);this.vegaView.resize().runAsync()}updateData(e,t,o){if(!this.vegaView)throw new Error("Chart has not been drawn yet");if(!o||0===o.data.numRows)try{this.vegaView.remove(e,a.truthy)}finally{return}if(!t||0===t.data.numRows)return void this.vegaView.insert(e,w(o));const{dataRows:i,dataColumns:n}=t.dimensions,{dataRows:s,dataColumns:r}=o.dimensions;!function(e,t,o,i,n,s){if(o!==s)return!1;if(t>=n)return!1;if(0===t)return!1;const a=s-1,r=t-1;return e.getDataValue(0,a)===i.getDataValue(0,a)&&e.getDataValue(r,a)===i.getDataValue(r,a)}(t,i,n,o,s,r)?(this.vegaView.data(e,w(o)),(0,h.ji)(`Had to clear the ${e} dataset before inserting data through Vega view.`)):i<s&&this.vegaView.insert(e,w(o,i))}async createView(){if((0,h.ji)("Creating a new Vega view."),!this.element)throw Error("Element missing.");this.finalizeView();const{element:e}=this.props,t=this.generateSpec(),o={ast:!0,expr:r.N,tooltip:{disableDefaultStyle:!0},defaultStyle:!1,forceActionsMenu:!0},{vgSpec:i,view:n,finalize:a}=await(0,s.ZP)(this.element,t,o);this.vegaView=n,this.maybeConfigureSelections(),this.vegaFinalizer=a;const l=function(e){const t=v(e);if((0,c.le)(t))return null;const o={};for(const[i,n]of Object.entries(t))o[i]=w(n);return o}(e),d=l?Object.keys(l):[];if(1===d.length){const[e]=d;this.defaultDataName=e}else 0===d.length&&i.data&&(this.defaultDataName=I);const u=function(e){const t=e.data;return t&&0!==t.data.numRows?w(t):null}(e);if(u&&n.insert(this.defaultDataName,u),l)for(const[s,r]of Object.entries(l))n.insert(s,r);await n.runAsync(),this.vegaView.resize().runAsync()}render(){if(this.state.error)throw this.state.error;return(0,V.jsx)(W,{"data-testid":"stVegaLiteChart",className:"stVegaLiteChart",useContainerWidth:this.props.element.useContainerWidth,isFullScreen:this.props.isFullScreen,ref:e=>{this.element=e}})}}const P=(0,n.b)((0,u.Z)(D))},10266:(e,t,o)=>{o.d(t,{Z:()=>b});var i=o(5057),n=o(56129),s=o.n(n),a=o(47206),r=o(53136),l=o(88916),d=o(73401),c=o(31808),h=o(82160);const u=(0,h.Z)("button",{target:"e1vs0wn31"})((e=>{let{isExpanded:t,theme:o}=e;const i=t?{right:"0.4rem",top:"0.5rem",backgroundColor:"transparent"}:{right:"-3.0rem",top:"-0.375rem",opacity:0,transform:"scale(0)",backgroundColor:o.colors.lightenedBg05};return{position:"absolute",display:"flex",alignItems:"center",justifyContent:"center",zIndex:o.zIndices.sidebar+1,height:"2.5rem",width:"2.5rem",transition:"opacity 300ms 150ms, transform 300ms 150ms",border:"none",color:o.colors.fadedText60,borderRadius:"50%",...i,"&:focus":{outline:"none"},"&:active, &:focus-visible, &:hover":{opacity:1,outline:"none",transform:"scale(1)",color:o.colors.bodyText,transition:"none"}}}),""),g=(0,h.Z)("div",{target:"e1vs0wn30"})((e=>{let{theme:t,isExpanded:o}=e;return{"&:hover":{[u]:{opacity:1,transform:"scale(1)",transition:"none"}},...o?{position:"fixed",top:0,left:0,bottom:0,right:0,background:t.colors.bgColor,zIndex:t.zIndices.fullscreenWrapper,padding:t.spacing.md,paddingTop:t.sizes.fullScreenHeaderHeight,overflow:["auto","overlay"],display:"flex",alignItems:"center",justifyContent:"center"}:{}}}),"");var m=o(96266);class p extends i.PureComponent{constructor(e){super(e),this.context=void 0,this.controlKeys=e=>{const{expanded:t}=this.state;27===e.keyCode&&t&&this.zoomOut()},this.zoomIn=()=>{document.body.style.overflow="hidden",this.context.setFullScreen(!0),this.setState({expanded:!0})},this.zoomOut=()=>{document.body.style.overflow="unset",this.context.setFullScreen(!1),this.setState({expanded:!1})},this.convertScssRemValueToPixels=e=>parseFloat(e)*parseFloat(getComputedStyle(document.documentElement).fontSize),this.getWindowDimensions=()=>{const e=this.convertScssRemValueToPixels(this.props.theme.spacing.md),t=this.convertScssRemValueToPixels(this.props.theme.sizes.fullScreenHeaderHeight);return{fullWidth:window.innerWidth-2*e,fullHeight:window.innerHeight-(e+t)}},this.updateWindowDimensions=()=>{this.setState(this.getWindowDimensions())},this.state={expanded:!1,...this.getWindowDimensions()}}componentDidMount(){window.addEventListener("resize",this.updateWindowDimensions),document.addEventListener("keydown",this.controlKeys,!1)}componentWillUnmount(){window.removeEventListener("resize",this.updateWindowDimensions),document.removeEventListener("keydown",this.controlKeys,!1)}render(){const{expanded:e,fullWidth:t,fullHeight:o}=this.state,{children:i,width:n,height:s,disableFullscreenMode:a}=this.props;let c=r.d,h=this.zoomIn,p="View fullscreen";return e&&(c=l.m,h=this.zoomOut,p="Exit fullscreen"),(0,m.jsxs)(g,{isExpanded:e,"data-testid":"stFullScreenFrame",children:[!a&&(0,m.jsx)(u,{"data-testid":"StyledFullScreenButton",onClick:h,title:p,isExpanded:e,children:(0,m.jsx)(d.Z,{content:c})}),i(e?{width:t,height:o,expanded:e,expand:this.zoomIn,collapse:this.zoomOut}:{width:n,height:s,expanded:e,expand:this.zoomIn,collapse:this.zoomOut})]})}}p.contextType=c.E;const f=(0,a.b)(p);const b=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];class o extends i.PureComponent{constructor(){super(...arguments),this.render=()=>{const{width:o,height:i,disableFullscreenMode:n}=this.props;return(0,m.jsx)(f,{width:o,height:i,disableFullscreenMode:t||n,children:t=>{let{width:o,height:i,expanded:n,expand:s,collapse:a}=t;return(0,m.jsx)(e,{...this.props,width:o,height:i,isFullScreen:n,expand:s,collapse:a})}})}}}return o.displayName=`withFullScreenWrapper(${e.displayName||e.name})`,s()(o,e)}},52955:(e,t,o)=>{o.d(t,{K:()=>n});var i=o(50120);class n{constructor(){this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}manageFormClearListener(e,t,o){(0,i.bb)(this.formClearListener)&&this.lastWidgetMgr===e&&this.lastFormId===t||(this.disconnect(),(0,i.bM)(t)&&(this.formClearListener=e.addFormClearedListener(t,o),this.lastWidgetMgr=e,this.lastFormId=t))}disconnect(){var e;null===(e=this.formClearListener)||void 0===e||e.disconnect(),this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_stlite_desktop=self.webpackChunk_stlite_desktop||[]).push([[2940],{12940:(o,r,e)=>{e.r(r),e.d(r,{default:()=>p});e(5057);var i=e(44088),t=e(92649),l=e(9847),s=e(82160),a=e(59990);function d(o,r){switch(o){case i.V5.XSMALL:return{padding:`${r.spacing.twoXS} ${r.spacing.sm}`,fontSize:r.fontSizes.sm};case i.V5.SMALL:return{padding:`${r.spacing.twoXS} ${r.spacing.md}`};case i.V5.LARGE:return{padding:`${r.spacing.md} ${r.spacing.md}`};default:return{padding:`${r.spacing.xs} ${r.spacing.md}`}}}const n=(0,s.Z)("a",{target:"e16zdaao2"})((o=>{let{fluidWidth:r,size:e,theme:i}=o;const t="number"==typeof r?`${r}px`:"100%";return{display:"inline-flex",alignItems:"center",justifyContent:"center",fontWeight:i.fontWeights.normal,padding:`${i.spacing.xs} ${i.spacing.md}`,borderRadius:i.radii.default,minHeight:i.sizes.minElementHeight,margin:0,lineHeight:i.lineHeights.base,color:i.colors.primary,textDecoration:"none",width:r?t:"auto",userSelect:"none","&:visited":{color:i.colors.primary},"&:focus":{outline:"none"},"&:focus-visible":{boxShadow:`0 0 0 0.2rem ${(0,a.DZ)(i.colors.primary,.5)}`},"&:hover":{textDecoration:"none"},"&:active":{textDecoration:"none"},...d(e,i)}}),""),c=(0,s.Z)(n,{target:"e16zdaao1"})((o=>{let{theme:r}=o;return{backgroundColor:r.colors.primary,color:r.colors.white,border:`${r.sizes.borderWidth} solid ${r.colors.primary}`,"&:hover":{backgroundColor:(0,a._j)(r.colors.primary,.05),color:r.colors.white},"&:active":{backgroundColor:"transparent",color:r.colors.primary},"&:visited:not(:active)":{color:r.colors.white},"&[disabled], &[disabled]:hover, &[disabled]:active, &[disabled]:visited":{borderColor:r.colors.borderColor,backgroundColor:r.colors.transparent,color:r.colors.fadedText40,cursor:"not-allowed"}}}),""),u=(0,s.Z)(n,{target:"e16zdaao0"})((o=>{let{theme:r}=o;return{backgroundColor:r.colors.lightenedBg05,color:r.colors.bodyText,border:`${r.sizes.borderWidth} solid ${r.colors.borderColor}`,"&:visited":{color:r.colors.bodyText},"&:hover":{borderColor:r.colors.primary,color:r.colors.primary},"&:active":{color:r.colors.white,borderColor:r.colors.primary,backgroundColor:r.colors.primary},"&:focus:not(:active)":{borderColor:r.colors.primary,color:r.colors.primary},"&[disabled], &[disabled]:hover, &[disabled]:active":{borderColor:r.colors.borderColor,backgroundColor:r.colors.transparent,color:r.colors.fadedText40,cursor:"not-allowed"}}}),"");var b=e(96266);const h=function(o){let{kind:r,size:e,disabled:t,fluidWidth:l,children:s,autoFocus:a,href:d,rel:n,target:h,onClick:p}=o,g=c;return r===i.nW.SECONDARY&&(g=u),(0,b.jsx)(g,{kind:r,size:e||i.V5.MEDIUM,fluidWidth:l||!1,disabled:t||!1,autoFocus:a||!1,href:d,target:h,rel:n,onClick:p,tabIndex:t?-1:0,children:s})};const p=function(o){const{disabled:r,element:e,width:s}=o,a={width:s},d="primary"===e.type?i.nW.PRIMARY:i.nW.SECONDARY,n=!e.help||s;return(0,b.jsx)("div",{className:"stLinkButton","data-testid":"stLinkButton",style:a,children:(0,b.jsx)(t.t,{help:e.help,children:(0,b.jsx)(h,{kind:d,size:i.V5.SMALL,disabled:r,onClick:r=>{o.disabled&&r.preventDefault()},fluidWidth:!!e.useContainerWidth&&n,href:e.url,target:"_blank",rel:"noreferrer","aria-disabled":r,children:(0,b.jsx)(l.ZP,{source:e.label,allowHTML:!1,isLabel:!0,largerLabel:!0,disableLinks:!0})})})})}}}]);
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_stlite_desktop=self.webpackChunk_stlite_desktop||[]).push([[4482],{49441:(t,e,a)=>{a.d(e,{Z:()=>m});var n=a(5057),i=a(66904),r=a.n(i),o=a(7742),s=a.n(o);const c=(0,a(82160).Z)("div",{target:"ecnfqzf0"})((()=>({"@media print":{display:"none"}})),"");var d=a(96266);const l=t=>{let{className:e,scriptRunId:a,numParticles:n,numParticleTypes:i,ParticleComponent:o}=t;return(0,d.jsx)(c,{className:s()(e,"stHidden"),"data-testid":`${e}`,children:r()(n).map((t=>{const e=Math.floor(Math.random()*i);return(0,d.jsx)(o,{particleType:e},a+t)}))})},m=(0,n.memo)(l)},48833:(t,e,a)=>{a.r(e),a.d(e,{NUM_FLAKES:()=>u,default:()=>k});var n=a(5057);const i=a.p+"static/media/flake-0.beded754e8024c73d9d2.png",r=a.p+"static/media/flake-1.8077dc154e0bf900aa73.png",o=a.p+"static/media/flake-2.e3f07d06933dd0e84c24.png";var s=a(49441),c=a(82160),d=a(21371);const l=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Math.random()*(t-e)+e},m=(0,c.Z)("img",{target:"ekdfb790"})((t=>{let{theme:e}=t;return{position:"fixed",top:"-150px",marginLeft:"-75px",zIndex:e.zIndices.balloons,left:`${l(90,10)}vw`,animationDelay:`${l(4e3)}ms`,height:"150px",width:"150px",pointerEvents:"none",animationDuration:"3000ms",animationName:d.F4`
|
|
2
|
-
from {
|
|
3
|
-
transform:
|
|
4
|
-
translateY(0)
|
|
5
|
-
rotateX(${l(360)}deg)
|
|
6
|
-
rotateY(${l(360)}deg)
|
|
7
|
-
rotateZ(${l(360)}deg);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
to {
|
|
11
|
-
transform:
|
|
12
|
-
translateY(calc(100vh + ${150}px))
|
|
13
|
-
rotateX(0)
|
|
14
|
-
rotateY(0)
|
|
15
|
-
rotateZ(0);
|
|
16
|
-
}
|
|
17
|
-
`,animationTimingFunction:"ease-in",animationDirection:"normal",animationIterationCount:1,opacity:1}}),"");var p=a(96266);const u=100,f=[i,r,o],g=f.length,h=t=>{let{particleType:e}=t;return(0,p.jsx)(m,{src:f[e]})},x=function(t){let{scriptRunId:e}=t;return(0,p.jsx)(s.Z,{className:"stSnow","data-testid":"stSnow",scriptRunId:e,numParticleTypes:g,numParticles:u,ParticleComponent:h})},k=(0,n.memo)(x)}}]);
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_stlite_desktop=self.webpackChunk_stlite_desktop||[]).push([[4724],{94778:(e,t,r)=>{r.d(t,{Z:()=>c});r(5057);var n=r(50120),o=r(93905),i=r(82160);const a=r(21371).F4`
|
|
2
|
-
50% {
|
|
3
|
-
color: rgba(0, 0, 0, 0);
|
|
4
|
-
}
|
|
5
|
-
`,s=(0,i.Z)("span",{target:"edlqvik0"})((e=>{let{includeDot:t,shouldBlink:r,theme:n}=e;return{...t?{"&::before":{opacity:1,content:'"\u2022"',animation:"none",color:n.colors.gray,margin:"0 5px"}}:{},...r?{color:n.colors.red,animationName:`${a}`,animationDuration:"0.5s",animationIterationCount:5}:{}}}),"");var l=r(96266);const c=e=>{let{dirty:t,value:r,maxLength:i,className:a,type:c="single",inForm:u}=e;const d=[],p=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];d.push((0,l.jsx)(s,{includeDot:d.length>0,shouldBlink:t,children:e},d.length))};if(t){const e=u?"submit form":"apply";if("multiline"===c){p(`Press ${(0,n.Ge)()?"\u2318":"Ctrl"}+Enter to ${e}`)}else"single"===c&&p(`Press Enter to ${e}`)}return i&&("chat"!==c||t)&&p(`${r.length}/${i}`,t&&r.length>=i),(0,l.jsx)(o.X7,{"data-testid":"InputInstructions",className:a,children:d})}},44724:(e,t,r)=>{r.r(t),r.d(t,{default:()=>v});var n=r(5057),o=r(47206),i=r(7896),a=r(63947),s=n.forwardRef((function(e,t){return n.createElement(a.D,(0,i.Z)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),n.createElement("rect",{width:24,height:24,fill:"none"}),n.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"}))}));s.displayName="Send";var l=r(76866),c=r(73401),u=r(94778),d=r(17966),p=r(82160);const f=(0,p.Z)("div",{target:"e1d2x3se4"})((e=>{var t;let{theme:r,width:n}=e;return{borderRadius:r.radii.default,display:"flex",backgroundColor:null!==(t=r.colors.widgetBackgroundColor)&&void 0!==t?t:r.colors.secondaryBg,width:`${n}px`}}),""),h=(0,p.Z)("div",{target:"e1d2x3se3"})((e=>{let{theme:t}=e;return{backgroundColor:t.colors.transparent,position:"relative",flexGrow:1,borderRadius:t.radii.default,display:"flex",alignItems:"center"}}),""),y=(0,p.Z)("button",{target:"e1d2x3se2"})((e=>{let{theme:t,disabled:r,extended:n}=e;const o=(0,d.Iy)(t),[i,a]=o?[t.colors.gray60,t.colors.gray80]:[t.colors.gray80,t.colors.gray40];return{border:"none",backgroundColor:t.colors.transparent,borderTopRightRadius:n?t.radii.none:t.radii.default,borderTopLeftRadius:n?t.radii.default:t.radii.none,borderBottomRightRadius:t.radii.default,display:"inline-flex",alignItems:"center",justifyContent:"center",lineHeight:t.lineHeights.none,margin:t.spacing.none,padding:t.spacing.sm,color:r?i:a,pointerEvents:"auto","&:focus":{outline:"none"},":focus":{outline:"none"},"&:focus-visible":{backgroundColor:o?t.colors.gray10:t.colors.gray90},"&:hover":{backgroundColor:t.colors.primary,color:t.colors.white},"&:disabled, &:disabled:hover, &:disabled:active":{backgroundColor:t.colors.transparent,borderColor:t.colors.transparent,color:t.colors.gray}}}),""),g=(0,p.Z)("div",{target:"e1d2x3se1"})((()=>({display:"flex",alignItems:"flex-end",height:"100%",position:"absolute",right:"0px",pointerEvents:"none"})),""),b=(0,p.Z)("div",{target:"e1d2x3se0"})({name:"1lm6gnd",styles:"position:absolute;bottom:0px;right:3rem"});var m=r(96266);const v=function(e){let{width:t,element:r,widgetMgr:i,fragmentId:a}=e;const p=(0,o.u)(),[v,x]=(0,n.useState)(!1),[w,O]=(0,n.useState)(r.default),[j,C]=(0,n.useState)(0),S=(0,n.useRef)(null),k=(0,n.useRef)({minHeight:0,maxHeight:0}),P=()=>{S.current&&S.current.focus(),w&&(i.setStringTriggerValue(r,w,{fromUi:!0},a),x(!1),O(""),C(0))};(0,n.useEffect)((()=>{if(r.setValue){r.setValue=!1;const e=r.value||"";O(e),x(""!==e)}}),[r]),(0,n.useEffect)((()=>{if(S.current){const{offsetHeight:e}=S.current;k.current.minHeight=e,k.current.maxHeight=6.5*e}}),[S]);const{disabled:R,placeholder:$,maxChars:E}=r,I=(0,d.Iy)(p),{minHeight:z,maxHeight:B}=k.current,T=I?p.colors.gray70:p.colors.gray80,H=!!(j>0&&S.current)&&Math.abs(j-z)>1;return(0,m.jsx)(f,{className:"stChatInput","data-testid":"stChatInput",width:t,children:(0,m.jsxs)(h,{children:[(0,m.jsx)(l.Z,{inputRef:S,value:w,placeholder:$,onChange:e=>{const{value:t}=e.target,{maxChars:n}=r;0!==n&&t.length>n||(x(""!==t),O(t),C((()=>{let e=0;const{current:t}=S;if(t){const r=t.placeholder;t.placeholder="",t.style.height="auto",e=t.scrollHeight,t.placeholder=r,t.style.height=""}return e})()))},onKeyDown:e=>{const{metaKey:t,ctrlKey:r,shiftKey:n}=e;(e=>{var t;const{keyCode:r,key:n}=e;return("Enter"===n||13===r||10===r)&&!(!0===(null===(t=e.nativeEvent)||void 0===t?void 0:t.isComposing))})(e)&&!n&&!r&&!t&&(e.preventDefault(),P())},"aria-label":$,disabled:R,rows:1,overrides:{Root:{style:{minHeight:p.sizes.minElementHeight,outline:"none",backgroundColor:p.colors.transparent,borderLeftWidth:p.sizes.borderWidth,borderRightWidth:p.sizes.borderWidth,borderTopWidth:p.sizes.borderWidth,borderBottomWidth:p.sizes.borderWidth,width:`${t}px`}},InputContainer:{style:{backgroundColor:p.colors.transparent}},Input:{props:{"data-testid":"stChatInputTextArea"},style:{lineHeight:p.lineHeights.inputWidget,backgroundColor:p.colors.transparent,"::placeholder":{color:T},height:H?`${j+1}px`:"auto",maxHeight:B?`${B}px`:"none",paddingRight:"3rem",paddingLeft:p.spacing.sm,paddingBottom:p.spacing.sm,paddingTop:p.spacing.sm}}}}),t>p.breakpoints.hideWidgetDetails&&(0,m.jsx)(b,{children:(0,m.jsx)(u.Z,{dirty:v,value:w,maxLength:E,type:"chat",inForm:!1})}),(0,m.jsx)(g,{children:(0,m.jsx)(y,{onClick:P,disabled:!v||R,extended:H,"data-testid":"stChatInputSubmitButton",children:(0,m.jsx)(c.Z,{content:s,size:"xl",color:"inherit"})})})]})})}},76866:(e,t,r)=>{r.d(t,{Z:()=>k});var n=r(5057),o=r(80099),i=r(97135),a=r(18150),s=r(53381),l=r(4547);function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?c(Object(r),!0).forEach((function(t){d(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function d(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var p=(0,s.zo)("div",(function(e){return u(u({},(0,l.d5)(u(u({$positive:!1},e),{},{$hasIconTrailing:!1}))),{},{width:e.$resize?"fit-content":"100%"})}));p.displayName="StyledTextAreaRoot",p.displayName="StyledTextAreaRoot";var f=(0,s.zo)("div",(function(e){return(0,l.hB)(u({$positive:!1},e))}));f.displayName="StyledTextareaContainer",f.displayName="StyledTextareaContainer";var h=(0,s.zo)("textarea",(function(e){return u(u({},(0,l.Hx)(e)),{},{resize:e.$resize||"none"})}));function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}function g(){return g=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},g.apply(this,arguments)}function b(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(l){s=!0,o=l}finally{try{a||null==r.return||r.return()}finally{if(s)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return m(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return m(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function v(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 x(e,t){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},x(e,t)}function w(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=j(e);if(t){var o=j(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===y(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return O(e)}(this,r)}}function O(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function j(e){return j=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},j(e)}function C(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}h.displayName="StyledTextarea",h.displayName="StyledTextarea";var S=function(e){!function(e,t){if("function"!==typeof t&&null!==t)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&&x(e,t)}(c,e);var t,r,s,l=w(c);function c(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return C(O(e=l.call.apply(l,[this].concat(r))),"state",{isFocused:e.props.autoFocus||!1}),C(O(e),"onFocus",(function(t){e.setState({isFocused:!0}),e.props.onFocus(t)})),C(O(e),"onBlur",(function(t){e.setState({isFocused:!1}),e.props.onBlur(t)})),e}return t=c,(r=[{key:"render",value:function(){var e=this.props.overrides,t=void 0===e?{}:e,r=b((0,o.jb)(t.Root,p),2),s=r[0],l=r[1],c=(0,o.aO)({Input:{component:h},InputContainer:{component:f}},t);return n.createElement(s,g({"data-baseweb":"textarea",$isFocused:this.state.isFocused,$isReadOnly:this.props.readOnly,$disabled:this.props.disabled,$error:this.props.error,$positive:this.props.positive,$required:this.props.required,$resize:this.props.resize},l),n.createElement(i.Z,g({},this.props,{type:a.iB.textarea,overrides:c,onFocus:this.onFocus,onBlur:this.onBlur,resize:this.props.resize})))}}])&&v(t.prototype,r),s&&v(t,s),Object.defineProperty(t,"prototype",{writable:!1}),c}(n.Component);C(S,"defaultProps",{autoFocus:!1,disabled:!1,readOnly:!1,error:!1,name:"",onBlur:function(){},onChange:function(){},onKeyDown:function(){},onKeyPress:function(){},onKeyUp:function(){},onFocus:function(){},overrides:{},placeholder:"",required:!1,rows:3,size:a.NO.default});const k=S}}]);
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_stlite_desktop=self.webpackChunk_stlite_desktop||[]).push([[4831],{94778:(e,t,r)=>{r.d(t,{Z:()=>d});r(5057);var o=r(50120),l=r(93905),i=r(82160);const n=r(21371).F4`
|
|
2
|
-
50% {
|
|
3
|
-
color: rgba(0, 0, 0, 0);
|
|
4
|
-
}
|
|
5
|
-
`,a=(0,i.Z)("span",{target:"edlqvik0"})((e=>{let{includeDot:t,shouldBlink:r,theme:o}=e;return{...t?{"&::before":{opacity:1,content:'"\u2022"',animation:"none",color:o.colors.gray,margin:"0 5px"}}:{},...r?{color:o.colors.red,animationName:`${n}`,animationDuration:"0.5s",animationIterationCount:5}:{}}}),"");var s=r(96266);const d=e=>{let{dirty:t,value:r,maxLength:i,className:n,type:d="single",inForm:u}=e;const c=[],p=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];c.push((0,s.jsx)(a,{includeDot:c.length>0,shouldBlink:t,children:e},c.length))};if(t){const e=u?"submit form":"apply";if("multiline"===d){p(`Press ${(0,o.Ge)()?"\u2318":"Ctrl"}+Enter to ${e}`)}else"single"===d&&p(`Press Enter to ${e}`)}return i&&("chat"!==d||t)&&p(`${r.length}/${i}`,t&&r.length>=i),(0,s.jsx)(l.X7,{"data-testid":"InputInstructions",className:n,children:c})}},52955:(e,t,r)=>{r.d(t,{K:()=>l});var o=r(50120);class l{constructor(){this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}manageFormClearListener(e,t,r){(0,o.bb)(this.formClearListener)&&this.lastWidgetMgr===e&&this.lastFormId===t||(this.disconnect(),(0,o.bM)(t)&&(this.formClearListener=e.addFormClearedListener(t,r),this.lastWidgetMgr=e,this.lastFormId=t))}disconnect(){var e;null===(e=this.formClearListener)||void 0===e||e.disconnect(),this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}}},44831:(e,t,r)=>{r.r(t),r.d(t,{default:()=>j});var o=r(5057),l=r(52707),i=r(84332),n=r(47206),a=r(59500),s=r(30124),d=r(72581),u=r.n(d),c=r(50120),p=r(52955),m=r(70714),b=r(60913),g=r(21034),h=r(98790),f=r(73401),v=r(94778),y=r(38944),I=r(93905),k=r(82160);const x=(0,k.Z)("div",{target:"e116k4er3"})((e=>{let{theme:t}=e;return{display:"flex",flexDirection:"row",flexWrap:"nowrap",alignItems:"center",height:t.sizes.minElementHeight,borderWidth:t.sizes.borderWidth,borderStyle:"solid",borderColor:t.colors.widgetBorderColor||t.colors.widgetBackgroundColor||t.colors.bgColor,transitionDuration:"200ms",transitionProperty:"border",transitionTimingFunction:"cubic-bezier(0.2, 0.8, 0.4, 1)",borderRadius:t.radii.default,overflow:"hidden","&.focused":{borderColor:t.colors.primary},input:{MozAppearance:"textfield","&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{WebkitAppearance:"none",margin:t.spacing.none}}}}),""),C=(0,k.Z)("div",{target:"e116k4er2"})({name:"76z9jo",styles:"display:flex;flex-direction:row;align-self:stretch"}),w=(0,k.Z)("button",{target:"e116k4er1"})((e=>{let{theme:t}=e;return{margin:t.spacing.none,border:"none",height:t.sizes.full,display:"flex",alignItems:"center",width:"32px",justifyContent:"center",color:t.colors.bodyText,transition:"color 300ms, backgroundColor 300ms",backgroundColor:t.colors.widgetBackgroundColor||t.colors.secondaryBg,"&:hover:enabled, &:focus:enabled":{color:t.colors.white,backgroundColor:t.colors.primary,transition:"none",outline:"none"},"&:active":{outline:"none",border:"none"},"&:last-of-type":{borderTopRightRadius:t.radii.default,borderBottomRightRadius:t.radii.default},"&:disabled":{cursor:"not-allowed",color:t.colors.fadedText40}}}),""),T=(0,k.Z)("div",{target:"e116k4er0"})((e=>{let{theme:t,clearable:r}=e;return{position:"absolute",marginRight:t.spacing.twoXS,left:0,right:64+(r?12:0)+"px"}}),"");var R=r(96266);const D=e=>{let{step:t,dataType:r}=e;return t||(r===b.Y2.DataType.INT?1:.01)},F=e=>{let{value:t,format:r,step:o,dataType:l}=e;if((0,c.le)(t))return null;let i=function(e){return(0,c.le)(e)||""===e?void 0:e}(r);if((0,c.le)(i)&&(0,c.bb)(o)){const e=o.toString();if(l===b.Y2.DataType.FLOAT&&0!==o&&e.includes(".")){i=`%0.${e.split(".")[1].length}f`}}if((0,c.le)(i))return t.toString();try{return(0,a.sprintf)(i,t)}catch(n){return(0,m.KE)(`Error in sprintf(${i}, ${t}): ${n}`),String(t)}},j=(0,n.b)((e=>{var t;let{disabled:r,element:n,widgetMgr:a,width:d,theme:m,fragmentId:k}=e;const{dataType:j,id:N,formId:W,default:L,format:S}=n,B=n.hasMin?n.min:-1/0,M=n.hasMax?n.max:1/0,[$,Z]=o.useState(D(n)),E=(e=>{var t;const r=e.element.dataType===b.Y2.DataType.INT?e.widgetMgr.getIntValue(e.element):e.widgetMgr.getDoubleValue(e.element);return null!==(t=null!==r&&void 0!==r?r:e.element.default)&&void 0!==t?t:null})({element:n,widgetMgr:a}),[V,U]=o.useState(!1),[z,_]=o.useState(E),[A,Y]=o.useState(F({value:E,...n,step:$})),[K,O]=o.useState(!1),P=o.useRef(null),H=o.useRef(new p.K),G=o.useRef(u()("number_input_")),X=((e,t,r)=>!(0,c.le)(e)&&e-t>=r)(z,$,B),q=((e,t,r)=>!(0,c.le)(e)&&e+t<=r)(z,$,M);o.useEffect((()=>{Z(D({step:n.step,dataType:n.dataType}))}),[n.dataType,n.step]);const J=o.useCallback((e=>{let{value:t,source:r}=e;if((0,c.bb)(t)&&(B>t||t>M)){var o;null===(o=P.current)||void 0===o||o.reportValidity()}else{var l;const e=null!==(l=null!==t&&void 0!==t?t:L)&&void 0!==l?l:null;switch(j){case b.Y2.DataType.INT:a.setIntValue({id:N,formId:W},e,r,k);break;case b.Y2.DataType.FLOAT:a.setDoubleValue({id:N,formId:W},e,r,k);break;default:throw new Error("Invalid data type")}U(!1),_(e),Y(F({value:e,dataType:j,format:S,step:$}))}}),[B,M,P,a,k,$,j,N,W,L,S]),Q=()=>{const{value:e}=n;n.setValue=!1,_(null!==e&&void 0!==e?e:null),Y(F({value:null!==e&&void 0!==e?e:null,...n,step:$})),J({value:null!==e&&void 0!==e?e:null,source:{fromUi:!1}})};o.useEffect((()=>{const e=H.current;return n.setValue?Q():J({value:z,source:{fromUi:!1}}),()=>{e.disconnect()}}),[]),n.setValue&&Q();const ee=(0,c.le)(n.default)&&!r;H.current.manageFormClearListener(a,n.formId,(()=>{var e;_(null!==(e=n.default)&&void 0!==e?e:null),J({value:z,source:{fromUi:!0}})}));const te=o.useCallback((()=>{q&&(U(!0),J({value:(null!==z&&void 0!==z?z:B)+$,source:{fromUi:!0}}))}),[z,B,$,q]),re=o.useCallback((()=>{X&&(U(!0),J({value:(null!==z&&void 0!==z?z:M)-$,source:{fromUi:!0}}))}),[z,M,$,X]),oe=o.useCallback((e=>{const{key:t}=e;switch(t){case"ArrowUp":e.preventDefault(),te();break;case"ArrowDown":e.preventDefault(),re()}}),[te,re]),le=o.useCallback((e=>{"Enter"===e.key&&(V&&J({value:z,source:{fromUi:!0}}),(0,c.$b)({formId:W})&&a.submitForm(W,k))}),[V,z,J,a,W,k]);return(0,R.jsxs)("div",{className:"stNumberInput","data-testid":"stNumberInput",style:{width:d},children:[(0,R.jsx)(y.O,{label:n.label,disabled:r,labelVisibility:(0,c.iF)(null===(t=n.labelVisibility)||void 0===t?void 0:t.value),htmlFor:G.current,children:n.help&&(0,R.jsx)(I.dT,{children:(0,R.jsx)(g.Z,{content:n.help,placement:h.u.TOP_RIGHT})})}),(0,R.jsxs)(x,{className:K?"focused":"","data-testid":"stNumberInputContainer",children:[(0,R.jsx)(s.Z,{type:"number",inputRef:P,value:null!==A&&void 0!==A?A:"",placeholder:n.placeholder,onBlur:()=>(V&&J({value:z,source:{fromUi:!0}}),void O(!1)),onFocus:()=>{O(!0)},onChange:e=>(e=>{const{value:t}=e.target;if(""===t)U(!0),_(null),Y(null);else{let e;e=n.dataType===b.Y2.DataType.INT?parseInt(t,10):parseFloat(t),U(!0),_(e),Y(t)}})(e),onKeyPress:e=>le(e),onKeyDown:e=>oe(e),clearable:ee,clearOnEscape:ee,disabled:r,"aria-label":n.label,id:G.current,overrides:{ClearIcon:{props:{overrides:{Svg:{style:{color:m.colors.darkGray,transform:"scale(1.4)",width:m.spacing.twoXL,marginRight:"-1.25em",":hover":{fill:m.colors.bodyText}}}}}},Input:{props:{"data-testid":"stNumberInputField",step:$,min:B,max:M},style:{lineHeight:m.lineHeights.inputWidget,paddingRight:m.spacing.sm,paddingLeft:m.spacing.sm,paddingBottom:m.spacing.sm,paddingTop:m.spacing.sm}},InputContainer:{style:()=>({borderTopRightRadius:0,borderBottomRightRadius:0})},Root:{style:()=>({borderTopRightRadius:0,borderBottomRightRadius:0,borderLeftWidth:0,borderRightWidth:0,borderTopWidth:0,borderBottomWidth:0})}}}),d>m.breakpoints.hideNumberInputControls&&(0,R.jsxs)(C,{children:[(0,R.jsx)(w,{"data-testid":"stNumberInputStepDown",onClick:re,disabled:!X||r,tabIndex:-1,children:(0,R.jsx)(f.Z,{content:l.W,size:"xs",color:X?"inherit":"disabled"})}),(0,R.jsx)(w,{"data-testid":"stNumberInputStepUp",onClick:te,disabled:!q||r,tabIndex:-1,children:(0,R.jsx)(f.Z,{content:i.v,size:"xs",color:q?"inherit":"disabled"})})]})]}),d>m.breakpoints.hideWidgetDetails&&(0,R.jsx)(T,{clearable:ee,children:(0,R.jsx)(v.Z,{dirty:V,value:null!==A&&void 0!==A?A:"",inForm:(0,c.$b)({formId:n.formId})})})]})}))}}]);
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_stlite_desktop=self.webpackChunk_stlite_desktop||[]).push([[5299],{62817:(t,a,e)=>{e.r(a),e.d(a,{NUM_BALLOONS:()=>h,default:()=>k});var n=e(5057);const i=e.p+"static/media/balloon-0.0e6e96ece0ea0719d6b6.png",o=e.p+"static/media/balloon-1.a503c271109e9a0fdd2d.png",s=e.p+"static/media/balloon-2.872250f3bf3a8965d655.png",r=e.p+"static/media/balloon-3.e772fafd3bfc55fb439b.png",l=e.p+"static/media/balloon-4.1a74162473d81c9cb9ee.png",c=e.p+"static/media/balloon-5.edb75c74c54165b29856.png";var m=e(49441),p=e(82160),d=e(21371);const u=d.F4`
|
|
2
|
-
from {
|
|
3
|
-
transform: translateY(calc(100vh + ${300}px));
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
to {
|
|
7
|
-
transform: translateY(0);
|
|
8
|
-
}
|
|
9
|
-
`,f=(0,p.Z)("img",{target:"earwcwy0"})((t=>{let{theme:a}=t;return{position:"fixed",top:"-300px",marginLeft:"-60.5px",zIndex:a.zIndices.balloons,left:60*Math.random()+20+"vw",animationDelay:1e3*Math.random()+"ms",height:"300px",width:"121px",pointerEvents:"none",animationDuration:"750ms",animationName:u,animationTimingFunction:"ease-in",animationDirection:"normal",animationIterationCount:1,opacity:1}}),"");var b=e(96266);const h=30,g=[i,o,s,r,l,c],x=g.length,v=t=>{let{particleType:a}=t;return(0,b.jsx)(f,{src:g[a]})},y=t=>{let{scriptRunId:a}=t;return(0,b.jsx)(m.Z,{className:"stBalloons","data-testid":"stBalloons",scriptRunId:a,numParticleTypes:x,numParticles:h,ParticleComponent:v})},k=(0,n.memo)(y)},49441:(t,a,e)=>{e.d(a,{Z:()=>p});var n=e(5057),i=e(66904),o=e.n(i),s=e(7742),r=e.n(s);const l=(0,e(82160).Z)("div",{target:"ecnfqzf0"})((()=>({"@media print":{display:"none"}})),"");var c=e(96266);const m=t=>{let{className:a,scriptRunId:e,numParticles:n,numParticleTypes:i,ParticleComponent:s}=t;return(0,c.jsx)(l,{className:r()(a,"stHidden"),"data-testid":`${a}`,children:o()(n).map((t=>{const a=Math.floor(Math.random()*i);return(0,c.jsx)(s,{particleType:a},e+t)}))})},p=(0,n.memo)(m)}}]);
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 6463.d6201add.chunk.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_stlite_desktop=self.webpackChunk_stlite_desktop||[]).push([[6463],{76463:(e,t,n)=>{n.d(t,{Z:()=>ee});const{entries:o,setPrototypeOf:r,isFrozen:a,getPrototypeOf:i,getOwnPropertyDescriptor:l}=Object;let{freeze:c,seal:s,create:u}=Object,{apply:m,construct:p}="undefined"!==typeof Reflect&&Reflect;c||(c=function(e){return e}),s||(s=function(e){return e}),m||(m=function(e,t,n){return e.apply(t,n)}),p||(p=function(e,t){return new e(...t)});const f=w(Array.prototype.forEach),d=w(Array.prototype.pop),h=w(Array.prototype.push),g=w(String.prototype.toLowerCase),_=w(String.prototype.toString),T=w(String.prototype.match),y=w(String.prototype.replace),E=w(String.prototype.indexOf),A=w(String.prototype.trim),N=w(Object.prototype.hasOwnProperty),b=w(RegExp.prototype.test),S=(R=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return p(R,t)});var R;function w(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return m(e,t,o)}}function C(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:g;r&&r(e,null);let o=t.length;for(;o--;){let r=t[o];if("string"===typeof r){const e=n(r);e!==r&&(a(t)||(t[o]=e),r=e)}e[r]=!0}return e}function v(e){for(let t=0;t<e.length;t++){N(e,t)||(e[t]=null)}return e}function L(e){const t=u(null);for(const[n,r]of o(e)){N(e,n)&&(Array.isArray(r)?t[n]=v(r):r&&"object"===typeof r&&r.constructor===Object?t[n]=L(r):t[n]=r)}return t}function D(e,t){for(;null!==e;){const n=l(e,t);if(n){if(n.get)return w(n.get);if("function"===typeof n.value)return w(n.value)}e=i(e)}return function(){return null}}const k=c(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),O=c(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),x=c(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),I=c(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),M=c(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),U=c(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),P=c(["#text"]),F=c(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),H=c(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),z=c(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),B=c(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),W=s(/\{\{[\w\W]*|[\w\W]*\}\}/gm),G=s(/<%[\w\W]*|[\w\W]*%>/gm),Y=s(/\${[\w\W]*}/gm),j=s(/^data-[\-\w.\u00B7-\uFFFF]/),X=s(/^aria-[\-\w]+$/),q=s(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),$=s(/^(?:\w+script|data):/i),K=s(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),V=s(/^html$/i),Z=s(/^[a-z][.\w]*(-[.\w]+)+$/i);var J=Object.freeze({__proto__:null,MUSTACHE_EXPR:W,ERB_EXPR:G,TMPLIT_EXPR:Y,DATA_ATTR:j,ARIA_ATTR:X,IS_ALLOWED_URI:q,IS_SCRIPT_OR_DATA:$,ATTR_WHITESPACE:K,DOCTYPE_NAME:V,CUSTOM_ELEMENT:Z});const Q=function(){return"undefined"===typeof window?null:window};var ee=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Q();const n=t=>e(t);if(n.version="3.1.1",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;let{document:r}=t;const a=r,i=a.currentScript,{DocumentFragment:l,HTMLTemplateElement:s,Node:m,Element:p,NodeFilter:R,NamedNodeMap:w=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:v,DOMParser:W,trustedTypes:G}=t,Y=p.prototype,j=D(Y,"cloneNode"),X=D(Y,"nextSibling"),$=D(Y,"childNodes"),K=D(Y,"parentNode");if("function"===typeof s){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let Z,ee="";const{implementation:te,createNodeIterator:ne,createDocumentFragment:oe,getElementsByTagName:re}=r,{importNode:ae}=a;let ie={};n.isSupported="function"===typeof o&&"function"===typeof K&&te&&void 0!==te.createHTMLDocument;const{MUSTACHE_EXPR:le,ERB_EXPR:ce,TMPLIT_EXPR:se,DATA_ATTR:ue,ARIA_ATTR:me,IS_SCRIPT_OR_DATA:pe,ATTR_WHITESPACE:fe,CUSTOM_ELEMENT:de}=J;let{IS_ALLOWED_URI:he}=J,ge=null;const _e=C({},[...k,...O,...x,...M,...P]);let Te=null;const ye=C({},[...F,...H,...z,...B]);let Ee=Object.seal(u(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ae=null,Ne=null,be=!0,Se=!0,Re=!1,we=!0,Ce=!1,ve=!0,Le=!1,De=!1,ke=!1,Oe=!1,xe=!1,Ie=!1,Me=!0,Ue=!1,Pe=!0,Fe=!1,He={},ze=null;const Be=C({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let We=null;const Ge=C({},["audio","video","img","source","image","track"]);let Ye=null;const je=C({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Xe="http://www.w3.org/1998/Math/MathML",qe="http://www.w3.org/2000/svg",$e="http://www.w3.org/1999/xhtml";let Ke=$e,Ve=!1,Ze=null;const Je=C({},[Xe,qe,$e],_);let Qe=null;const et=["application/xhtml+xml","text/html"];let tt=null,nt=null;const ot=r.createElement("form"),rt=function(e){return e instanceof RegExp||e instanceof Function},at=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!nt||nt!==e){if(e&&"object"===typeof e||(e={}),e=L(e),Qe=-1===et.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,tt="application/xhtml+xml"===Qe?_:g,ge=N(e,"ALLOWED_TAGS")?C({},e.ALLOWED_TAGS,tt):_e,Te=N(e,"ALLOWED_ATTR")?C({},e.ALLOWED_ATTR,tt):ye,Ze=N(e,"ALLOWED_NAMESPACES")?C({},e.ALLOWED_NAMESPACES,_):Je,Ye=N(e,"ADD_URI_SAFE_ATTR")?C(L(je),e.ADD_URI_SAFE_ATTR,tt):je,We=N(e,"ADD_DATA_URI_TAGS")?C(L(Ge),e.ADD_DATA_URI_TAGS,tt):Ge,ze=N(e,"FORBID_CONTENTS")?C({},e.FORBID_CONTENTS,tt):Be,Ae=N(e,"FORBID_TAGS")?C({},e.FORBID_TAGS,tt):{},Ne=N(e,"FORBID_ATTR")?C({},e.FORBID_ATTR,tt):{},He=!!N(e,"USE_PROFILES")&&e.USE_PROFILES,be=!1!==e.ALLOW_ARIA_ATTR,Se=!1!==e.ALLOW_DATA_ATTR,Re=e.ALLOW_UNKNOWN_PROTOCOLS||!1,we=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Ce=e.SAFE_FOR_TEMPLATES||!1,ve=!1!==e.SAFE_FOR_XML,Le=e.WHOLE_DOCUMENT||!1,Oe=e.RETURN_DOM||!1,xe=e.RETURN_DOM_FRAGMENT||!1,Ie=e.RETURN_TRUSTED_TYPE||!1,ke=e.FORCE_BODY||!1,Me=!1!==e.SANITIZE_DOM,Ue=e.SANITIZE_NAMED_PROPS||!1,Pe=!1!==e.KEEP_CONTENT,Fe=e.IN_PLACE||!1,he=e.ALLOWED_URI_REGEXP||q,Ke=e.NAMESPACE||$e,Ee=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&rt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ee.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&rt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ee.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"===typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ee.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ce&&(Se=!1),xe&&(Oe=!0),He&&(ge=C({},P),Te=[],!0===He.html&&(C(ge,k),C(Te,F)),!0===He.svg&&(C(ge,O),C(Te,H),C(Te,B)),!0===He.svgFilters&&(C(ge,x),C(Te,H),C(Te,B)),!0===He.mathMl&&(C(ge,M),C(Te,z),C(Te,B))),e.ADD_TAGS&&(ge===_e&&(ge=L(ge)),C(ge,e.ADD_TAGS,tt)),e.ADD_ATTR&&(Te===ye&&(Te=L(Te)),C(Te,e.ADD_ATTR,tt)),e.ADD_URI_SAFE_ATTR&&C(Ye,e.ADD_URI_SAFE_ATTR,tt),e.FORBID_CONTENTS&&(ze===Be&&(ze=L(ze)),C(ze,e.FORBID_CONTENTS,tt)),Pe&&(ge["#text"]=!0),Le&&C(ge,["html","head","body"]),ge.table&&(C(ge,["tbody"]),delete Ae.tbody),e.TRUSTED_TYPES_POLICY){if("function"!==typeof e.TRUSTED_TYPES_POLICY.createHTML)throw S('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!==typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw S('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');Z=e.TRUSTED_TYPES_POLICY,ee=Z.createHTML("")}else void 0===Z&&(Z=function(e,t){if("object"!==typeof e||"function"!==typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(a){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(G,i)),null!==Z&&"string"===typeof ee&&(ee=Z.createHTML(""));c&&c(e),nt=e}},it=C({},["mi","mo","mn","ms","mtext"]),lt=C({},["foreignobject","desc","title","annotation-xml"]),ct=C({},["title","style","font","a","script"]),st=C({},[...O,...x,...I]),ut=C({},[...M,...U]),mt=function(e){h(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},pt=function(e,t){try{h(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(o){h(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!Te[e])if(Oe||xe)try{mt(t)}catch(o){}else try{t.setAttribute(e,"")}catch(o){}},ft=function(e){let t=null,n=null;if(ke)e="<remove></remove>"+e;else{const t=T(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Qe&&Ke===$e&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=Z?Z.createHTML(e):e;if(Ke===$e)try{t=(new W).parseFromString(o,Qe)}catch(i){}if(!t||!t.documentElement){t=te.createDocument(Ke,"template",null);try{t.documentElement.innerHTML=Ve?ee:o}catch(i){}}const a=t.body||t.documentElement;return e&&n&&a.insertBefore(r.createTextNode(n),a.childNodes[0]||null),Ke===$e?re.call(t,Le?"html":"body")[0]:Le?t.documentElement:a},dt=function(e){return ne.call(e.ownerDocument||e,e,R.SHOW_ELEMENT|R.SHOW_COMMENT|R.SHOW_TEXT|R.SHOW_PROCESSING_INSTRUCTION|R.SHOW_CDATA_SECTION,null)},ht=function(e){return"function"===typeof m&&e instanceof m},gt=function(e,t,o){ie[e]&&f(ie[e],(e=>{e.call(n,t,o,nt)}))},_t=function(e){let t=null;if(gt("beforeSanitizeElements",e,null),(o=e)instanceof v&&("undefined"!==typeof o.__depth&&"number"!==typeof o.__depth||"undefined"!==typeof o.__removalCount&&"number"!==typeof o.__removalCount||"string"!==typeof o.nodeName||"string"!==typeof o.textContent||"function"!==typeof o.removeChild||!(o.attributes instanceof w)||"function"!==typeof o.removeAttribute||"function"!==typeof o.setAttribute||"string"!==typeof o.namespaceURI||"function"!==typeof o.insertBefore||"function"!==typeof o.hasChildNodes))return mt(e),!0;var o;const r=tt(e.nodeName);if(gt("uponSanitizeElement",e,{tagName:r,allowedTags:ge}),e.hasChildNodes()&&!ht(e.firstElementChild)&&b(/<[/\w]/g,e.innerHTML)&&b(/<[/\w]/g,e.textContent))return mt(e),!0;if(7===e.nodeType)return mt(e),!0;if(ve&&8===e.nodeType&&b(/<[/\w]/g,e.data))return mt(e),!0;if(!ge[r]||Ae[r]){if(!Ae[r]&&yt(r)){if(Ee.tagNameCheck instanceof RegExp&&b(Ee.tagNameCheck,r))return!1;if(Ee.tagNameCheck instanceof Function&&Ee.tagNameCheck(r))return!1}if(Pe&&!ze[r]){const t=K(e)||e.parentNode,n=$(e)||e.childNodes;if(n&&t){for(let o=n.length-1;o>=0;--o){const r=j(n[o],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,X(e))}}}return mt(e),!0}return e instanceof p&&!function(e){let t=K(e);t&&t.tagName||(t={namespaceURI:Ke,tagName:"template"});const n=g(e.tagName),o=g(t.tagName);return!!Ze[e.namespaceURI]&&(e.namespaceURI===qe?t.namespaceURI===$e?"svg"===n:t.namespaceURI===Xe?"svg"===n&&("annotation-xml"===o||it[o]):Boolean(st[n]):e.namespaceURI===Xe?t.namespaceURI===$e?"math"===n:t.namespaceURI===qe?"math"===n&<[o]:Boolean(ut[n]):e.namespaceURI===$e?!(t.namespaceURI===qe&&!lt[o])&&!(t.namespaceURI===Xe&&!it[o])&&!ut[n]&&(ct[n]||!st[n]):!("application/xhtml+xml"!==Qe||!Ze[e.namespaceURI]))}(e)?(mt(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!b(/<\/no(script|embed|frames)/i,e.innerHTML)?(Ce&&3===e.nodeType&&(t=e.textContent,f([le,ce,se],(e=>{t=y(t,e," ")})),e.textContent!==t&&(h(n.removed,{element:e.cloneNode()}),e.textContent=t)),gt("afterSanitizeElements",e,null),!1):(mt(e),!0)},Tt=function(e,t,n){if(Me&&("id"===t||"name"===t)&&(n in r||n in ot))return!1;if(Se&&!Ne[t]&&b(ue,t));else if(be&&b(me,t));else if(!Te[t]||Ne[t]){if(!(yt(e)&&(Ee.tagNameCheck instanceof RegExp&&b(Ee.tagNameCheck,e)||Ee.tagNameCheck instanceof Function&&Ee.tagNameCheck(e))&&(Ee.attributeNameCheck instanceof RegExp&&b(Ee.attributeNameCheck,t)||Ee.attributeNameCheck instanceof Function&&Ee.attributeNameCheck(t))||"is"===t&&Ee.allowCustomizedBuiltInElements&&(Ee.tagNameCheck instanceof RegExp&&b(Ee.tagNameCheck,n)||Ee.tagNameCheck instanceof Function&&Ee.tagNameCheck(n))))return!1}else if(Ye[t]);else if(b(he,y(n,fe,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==E(n,"data:")||!We[e]){if(Re&&!b(pe,y(n,fe,"")));else if(n)return!1}else;return!0},yt=function(e){return"annotation-xml"!==e&&T(e,de)},Et=function(e){gt("beforeSanitizeAttributes",e,null);const{attributes:t}=e;if(!t)return;const o={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Te};let r=t.length;for(;r--;){const i=t[r],{name:l,namespaceURI:c,value:s}=i,u=tt(l);let m="value"===l?s:A(s);if(o.attrName=u,o.attrValue=m,o.keepAttr=!0,o.forceKeepAttr=void 0,gt("uponSanitizeAttribute",e,o),m=o.attrValue,o.forceKeepAttr)continue;if(pt(l,e),!o.keepAttr)continue;if(!we&&b(/\/>/i,m)){pt(l,e);continue}Ce&&f([le,ce,se],(e=>{m=y(m,e," ")}));const p=tt(e.nodeName);if(Tt(p,u,m)){if(!Ue||"id"!==u&&"name"!==u||(pt(l,e),m="user-content-"+m),Z&&"object"===typeof G&&"function"===typeof G.getAttributeType)if(c);else switch(G.getAttributeType(p,u)){case"TrustedHTML":m=Z.createHTML(m);break;case"TrustedScriptURL":m=Z.createScriptURL(m)}try{c?e.setAttributeNS(c,l,m):e.setAttribute(l,m),d(n.removed)}catch(a){}}}gt("afterSanitizeAttributes",e,null)},At=function e(t){let n=null;const o=dt(t);for(gt("beforeSanitizeShadowDOM",t,null);n=o.nextNode();)gt("uponSanitizeShadowNode",n,null),_t(n)||(1===n.nodeType&&(n.parentNode&&n.parentNode.__depth?n.__depth=(n.__removalCount||0)+n.parentNode.__depth+1:n.__depth=1),n.__depth>=255&&mt(n),n.content instanceof l&&(n.content.__depth=n.__depth,e(n.content)),Et(n));gt("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=null,r=null,i=null,c=null;if(Ve=!e,Ve&&(e="\x3c!--\x3e"),"string"!==typeof e&&!ht(e)){if("function"!==typeof e.toString)throw S("toString is not a function");if("string"!==typeof(e=e.toString()))throw S("dirty is not a string, aborting")}if(!n.isSupported)return e;if(De||at(t),n.removed=[],"string"===typeof e&&(Fe=!1),Fe){if(e.nodeName){const t=tt(e.nodeName);if(!ge[t]||Ae[t])throw S("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof m)o=ft("\x3c!----\x3e"),r=o.ownerDocument.importNode(e,!0),1===r.nodeType&&"BODY"===r.nodeName||"HTML"===r.nodeName?o=r:o.appendChild(r);else{if(!Oe&&!Ce&&!Le&&-1===e.indexOf("<"))return Z&&Ie?Z.createHTML(e):e;if(o=ft(e),!o)return Oe?null:Ie?ee:""}o&&ke&&mt(o.firstChild);const s=dt(Fe?e:o);for(;i=s.nextNode();)_t(i)||(1===i.nodeType&&(i.parentNode&&i.parentNode.__depth?i.__depth=(i.__removalCount||0)+i.parentNode.__depth+1:i.__depth=1),i.__depth>=255&&mt(i),i.content instanceof l&&(i.content.__depth=i.__depth,At(i.content)),Et(i));if(Fe)return e;if(Oe){if(xe)for(c=oe.call(o.ownerDocument);o.firstChild;)c.appendChild(o.firstChild);else c=o;return(Te.shadowroot||Te.shadowrootmode)&&(c=ae.call(a,c,!0)),c}let u=Le?o.outerHTML:o.innerHTML;return Le&&ge["!doctype"]&&o.ownerDocument&&o.ownerDocument.doctype&&o.ownerDocument.doctype.name&&b(V,o.ownerDocument.doctype.name)&&(u="<!DOCTYPE "+o.ownerDocument.doctype.name+">\n"+u),Ce&&f([le,ce,se],(e=>{u=y(u,e," ")})),Z&&Ie?Z.createHTML(u):u},n.setConfig=function(){at(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),De=!0},n.clearConfig=function(){nt=null,De=!1},n.isValidAttribute=function(e,t,n){nt||at({});const o=tt(e),r=tt(t);return Tt(o,r,n)},n.addHook=function(e,t){"function"===typeof t&&(ie[e]=ie[e]||[],h(ie[e],t))},n.removeHook=function(e){if(ie[e])return d(ie[e])},n.removeHooks=function(e){ie[e]&&(ie[e]=[])},n.removeAllHooks=function(){ie={}},n}()}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! @license DOMPurify 3.1.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.1/LICENSE */
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_stlite_desktop=self.webpackChunk_stlite_desktop||[]).push([[6944],{76944:(e,t,r)=>{r.r(t),r.d(t,{default:()=>M});var n=r(5057),o=r(47206),i=r(50482),c=r.n(i),a=Object.freeze({radio:"radio",checkbox:"checkbox"}),l=(Object.freeze({change:"change"}),"default"),u=r(80099),s=r(74338),f=(0,r(53381).zo)("div",(function(e){var t=e.$shape,r=e.$length,n=e.$theme,o=1===r?void 0:t!==l?"-".concat(n.sizing.scale100):"-0.5px";return{display:"flex",marginLeft:o,marginRight:o}}));function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function p(){return p=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},p.apply(this,arguments)}function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?h(Object(r),!0).forEach((function(t){C(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function b(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,o,i=[],c=!0,a=!1;try{for(r=r.call(e);!(c=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);c=!0);}catch(l){a=!0,o=l}finally{try{c||null==r.return||r.return()}finally{if(a)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return v(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return v(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function m(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 g(e,t){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},g(e,t)}function O(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=w(e);if(t){var o=w(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===d(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return E(e)}(this,r)}}function E(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}function C(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}f.displayName="StyledRoot",f.displayName="StyledRoot";var j=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g(e,t)}(c,e);var t,r,o,i=O(c);function c(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return C(E(e=i.call.apply(i,[this].concat(r))),"childRefs",{}),e}return t=c,r=[{key:"render",value:function(){var e=this,t=this.props,r=t.overrides,o=void 0===r?{}:r,i=t.mode,c=void 0===i?a.checkbox:i,d=t.children,h=t.selected,v=t.disabled,m=t.onClick,g=t.kind,O=t.shape,E=t.size,w=b((0,u.jb)(o.Root,f),2),C=w[0],j=w[1],S=this.props["aria-label"]||this.props.ariaLabel,k=c===a.radio,L=n.Children.count(d);return n.createElement(s.R.Consumer,null,(function(t){return n.createElement(C,p({"aria-label":S||t.buttongroup.ariaLabel,"data-baseweb":"button-group",role:k?"radiogroup":"group",$shape:O,$length:d.length},j),n.Children.map(d,(function(t,r){if(!n.isValidElement(t))return null;var o=t.props.isSelected?t.props.isSelected:function(e,t){return!(!Array.isArray(e)&&"number"!==typeof e)&&(Array.isArray(e)?e.includes(t):e===t)}(h,r);return k&&(e.childRefs[r]=n.createRef()),n.cloneElement(t,{disabled:v||t.props.disabled,isSelected:o,ref:k?e.childRefs[r]:void 0,tabIndex:!k||o||k&&(!h||-1===h)&&0===r?0:-1,onKeyDown:function(t){if(k){var r=Number(h)?Number(h):0;if("ArrowUp"===t.key||"ArrowLeft"===t.key){t.preventDefault&&t.preventDefault();var n=r-1<0?L-1:r-1;m&&m(t,n),e.childRefs[n].current&&e.childRefs[n].current.focus()}if("ArrowDown"===t.key||"ArrowRight"===t.key){t.preventDefault&&t.preventDefault();var o=r+1>L-1?0:r+1;m&&m(t,o),e.childRefs[o].current&&e.childRefs[o].current.focus()}}},kind:g,onClick:function(e){v||(t.props.onClick&&t.props.onClick(e),m&&m(e,r))},shape:O,size:E,overrides:y({BaseButton:{style:function(e){var t=e.$theme;return 1===d.length?{}:O!==l?{marginLeft:t.sizing.scale100,marginRight:t.sizing.scale100}:{marginLeft:"0.5px",marginRight:"0.5px"}},props:{"aria-checked":o,role:k?"radio":"checkbox"}}},t.props.overrides)})})))}))}}],r&&m(t.prototype,r),o&&m(t,o),Object.defineProperty(t,"prototype",{writable:!1}),c}(n.Component);C(j,"defaultProps",{disabled:!1,onClick:function(){},shape:l,size:"default",kind:"secondary"});var S=r(44088),k=r(38830),L=r(44005),R=r(60913),_=r(52955),I=r(96266);function P(e,t,r,n){let o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];r.setIntArrayValue(t,e,{fromUi:o},n)}function x(e){return(0,I.jsx)(L.p,{size:"lg",iconValue:e})}function A(e,t,r,o,i){var c;const a=function(e,t,r,n){return r.indexOf(n)>-1||t===R.hE.ClickMode.SINGLE_SELECT&&e===R.hE.SelectionVisualization.ALL_UP_TO_SELECTED&&r.length>0&&n<r[0]}(r,o,i,t),l=function(e,t,r){return e&&r?r:t}(a,null!==(c=e.content)&&void 0!==c?c:"",e.selectedContent),u=!a||e.selectedContent?S.nW.BORDERLESS_ICON:S.nW.BORDERLESS_ICON_ACTIVE;return(0,n.forwardRef)((function(e,t){return(0,I.jsx)(k.ZP,{...e,size:S.V5.XSMALL,kind:u,children:x(l)})}))}const M=function(e){const{disabled:t,element:r,fragmentId:i,widgetMgr:l}=e,{clickMode:u,default:s,options:f,value:d,selectionVisualization:p}=r,h=(0,o.u)(),[y,b]=(0,n.useState)(function(e,t){const r=e.getIntArrayValue(t);return null!==r&&void 0!==r?r:t.default}(l,r)||[]),v=n.useRef(r),m=n.useRef(void 0);(0,n.useEffect)((()=>{if(!r.formId)return;const e=new _.K;return e.manageFormClearListener(l,r.formId,(()=>{b(s)})),()=>{e.disconnect()}}),[r.formId,l,s]);const g=(0,n.useMemo)((()=>JSON.stringify(d)),[d]);let O;(0,n.useEffect)((()=>{const e=JSON.parse(g);if(v.current.setValue)b(e),P(y,v.current,l,i,!1),v.current.setValue=!1;else{if(c()(y,m.current))return;const e=void 0!==m.current;P(y,v.current,l,i,e)}m.current=y}),[y,l,i,g]),u===R.hE.ClickMode.SINGLE_SELECT?O=a.radio:u===R.hE.ClickMode.MULTI_SELECT&&(O=a.checkbox);const E=f.map(((e,t)=>{const r=A(e,t,p,u,y);return(0,I.jsx)(r,{},`${e.content}-${t}`)}));return(0,I.jsx)("div",{className:"stButtonGroup","data-testid":"stButtonGroup",children:(0,I.jsx)(j,{disabled:t,mode:O,onClick:(e,t)=>{const r=function(e,t,r){return e==R.hE.ClickMode.MULTI_SELECT?function(e,t){return t.includes(e)?t.filter((t=>t!==e)):[...t,e]}(t,null!==r&&void 0!==r?r:[]):[t]}(u,t,y);b(r)},selected:u===R.hE.ClickMode.MULTI_SELECT?y:(w=y,0===w.length?-1:w[0]),overrides:{Root:{style:{flexWrap:"wrap",gap:h.spacing.threeXS}}},children:E})});var w}},52955:(e,t,r)=>{r.d(t,{K:()=>o});var n=r(50120);class o{constructor(){this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}manageFormClearListener(e,t,r){(0,n.bb)(this.formClearListener)&&this.lastWidgetMgr===e&&this.lastFormId===t||(this.disconnect(),(0,n.bM)(t)&&(this.formClearListener=e.addFormClearedListener(t,r),this.lastWidgetMgr=e,this.lastFormId=t))}disconnect(){var e;null===(e=this.formClearListener)||void 0===e||e.disconnect(),this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_stlite_desktop=self.webpackChunk_stlite_desktop||[]).push([[7579],{97579:(e,t,r)=>{r.r(t),r.d(t,{default:()=>C});var o=r(5057),s=r(7742),n=r.n(s),i=r(17966),l=r(9847),a=r(31808),d=r(82160),c=r(69194),h=r(70765);const u=(0,d.Z)(h.Q,{shouldForwardProp:c.Z,target:"e1se5lgy2"})((e=>{let{theme:t,usingCustomTheme:r}=e;return{fontSize:t.fontSizes.sm,width:"1.375rem",height:"1.375rem",borderWidth:"3px",radius:"4px",justifyContents:"center",padding:t.spacing.none,margin:t.spacing.none,borderColor:t.colors.borderColor,borderTopColor:r?t.colors.primary:t.colors.blue70,flexGrow:0,flexShrink:0}}),""),g=(0,d.Z)("div",{target:"e1se5lgy1"})((e=>{let{theme:t,width:r,cache:o}=e;return{width:r,...o?{paddingBottom:"1rem",background:`linear-gradient(to bottom, ${t.colors.bgColor} 0%, ${t.colors.bgColor} 80%, transparent 100%)`}:null}}),""),p=(0,d.Z)("div",{target:"e1se5lgy0"})((e=>{let{theme:t}=e;return{display:"flex",gap:t.spacing.sm,alignItems:"center",width:"100%"}}),"");var m=r(96266);const C=function(e){let{width:t,element:r}=e;const{activeTheme:s}=o.useContext(a.E),d=!(0,i.MJ)(s),{cache:c}=r;return(0,m.jsx)(g,{className:n()({stSpinner:!0,stCacheSpinner:c}),"data-testid":"stSpinner",width:t,cache:c,children:(0,m.jsxs)(p,{children:[(0,m.jsx)(u,{usingCustomTheme:d}),(0,m.jsx)(l.ZP,{source:r.text,allowHTML:!1})]})})}}}]);
|