vendor: 10,742 bytes, line 1
1"use strict";(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[5625],{15625:(e,t,r)=>{r.r(t),r.d(t,{default:()=>B});var n=r(58878),o=r(8151),i=Object.freeze({radio:"radio",checkbox:"checkbox"}),l=(Object.freeze({change:"change"}),"default"),a=r(35331),c=r(65266),u=(0,r(57224).I4)("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 s(e){return s="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},s(e)}function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},f.apply(this,arguments)}function d(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 p(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach((function(t){O(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function g(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=[],l=!0,a=!1;try{for(r=r.call(e);!(l=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);l=!0);}catch(c){a=!0,o=c}finally{try{l||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 y(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 y(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 y(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 b(e,t){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},b(e,t)}function h(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=S(e);if(t){var o=S(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===s(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return v(e)}(this,r)}}function v(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function S(e){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},S(e)}function O(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}u.displayName="StyledRoot",u.displayName="StyledRoot";var C=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&&b(e,t)}(d,e);var t,r,o,s=h(d);function d(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return O(v(e=s.call.apply(s,[this].concat(r))),"childRefs",{}),e}return t=d,r=[{key:"render",value:function(){var e=this,t=this.props,r=t.overrides,o=void 0===r?{}:r,s=t.mode,d=void 0===s?i.checkbox:s,y=t.children,m=t.selected,b=t.disabled,h=t.onClick,v=t.kind,S=t.shape,O=t.size,C=g((0,a._O)(o.Root,u),2),w=C[0],L=C[1],j=this.props["aria-label"]||this.props.ariaLabel,E=d===i.radio,k=n.Children.count(y);return n.createElement(c.U.Consumer,null,(function(t){return n.createElement(w,f({"aria-label":j||t.buttongroup.ariaLabel,"data-baseweb":"button-group",role:E?"radiogroup":"group",$shape:S,$length:y.length},L),n.Children.map(y,(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)}(m,r);return E&&(e.childRefs[r]=n.createRef()),n.cloneElement(t,{disabled:b||t.props.disabled,isSelected:o,ref:E?e.childRefs[r]:void 0,tabIndex:!E||o||E&&(!m||-1===m)&&0===r?0:-1,onKeyDown:function(t){if(E){var r=Number(m)?Number(m):0;if("ArrowUp"===t.key||"ArrowLeft"===t.key){t.preventDefault&&t.preventDefault();var n=r-1<0?k-1:r-1;h&&h(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>k-1?0:r+1;h&&h(t,o),e.childRefs[o].current&&e.childRefs[o].current.focus()}}},kind:v,onClick:function(e){b||(t.props.onClick&&t.props.onClick(e),h&&h(e,r))},shape:S,size:O,overrides:p({BaseButton:{style:function(e){var t=e.$theme;return 1===y.length?{}:S!==l?{marginLeft:t.sizing.scale100,marginRight:t.sizing.scale100}:{marginLeft:"0.5px",marginRight:"0.5px"}},props:{"aria-checked":o,role:E?"radio":"checkbox"}}},t.props.overrides)})})))}))}}],r&&m(t.prototype,r),o&&m(t,o),Object.defineProperty(t,"prototype",{writable:!1}),d}(n.Component);O(C,"defaultProps",{disabled:!1,onClick:function(){},shape:l,size:"default",kind:"secondary"});var w=r(34914),L=r(84720),j=r(36459),E=r(94426),k=r(29669),M=r(70474),R=r(78286),I=r(93480),P=r(997),x=r(25571),_=r(3101),A=r(90782);function D(e,t,r,n){t.setIntArrayValue(e,r.value,{fromUi:r.fromUi},n)}function F(e,t,r,o,i,l){const a=function(e,t,r,n){return r.indexOf(n)>-1||t===k.e2.ClickMode.SINGLE_SELECT&&e===k.e2.SelectionVisualization.ALL_UP_TO_SELECTED&&r.length>0&&n<r[0]}(r,o,i,t);let c=e.content,u=e.contentIcon;return a&&(c=e.selectedContent?e.selectedContent:c,u=e.selectedContentIcon?e.selectedContentIcon:u),(0,n.forwardRef)((function(t,r){var n,o;const{element:i,kind:s,size:f}=function(e,t,r){const n=r===k.e2.Style.PILLS?L.KX.PILLS:r===k.e2.Style.BORDERLESS?L.KX.BORDERLESS_ICON:L.KX.SEGMENT,o=r===k.e2.Style.BORDERLESS?L.Pj.XSMALL:L.Pj.MEDIUM,i=r===k.e2.Style.BORDERLESS?"lg":"base";return{element:(0,A.jsxs)(A.Fragment,{children:[t&&(0,A.jsx)(E.$,{size:i,iconValue:t}),e&&(0,A.jsx)(w.Ay,{source:e,allowHTML:!1})]}),kind:n,size:o}}(null!==(n=c)&&void 0!==n?n:"",null!==(o=u)&&void 0!==o?o:void 0,l),d=function(e,t){return e&&(t=`${t}Active`),t}(!(!a||e.selectedContent||e.selectedContentIcon),s);return(0,A.jsx)(j.Ay,{...t,size:f,kind:d,children:i})}))}function T(e,t){return e.getIntArrayValue(t)}function z(e){var t;return null!==(t=e.default)&&void 0!==t?t:null}function U(e){var t;return null!==(t=e.value)&&void 0!==t?t:null}function W(e){var t;const{disabled:r,element:l,fragmentId:a,widgetMgr:c}=e,{clickMode:u,options:s,selectionVisualization:f,style:d,label:p,labelVisibility:g,help:y}=l,m=(0,o.u)(),[b,h]=(0,_.t)({getStateFromWidgetMgr:T,getDefaultStateFromProto:z,getCurrStateFromProto:U,updateWidgetMgrState:D,element:l,widgetMgr:c,fragmentId:a});let v;u===k.e2.ClickMode.SINGLE_SELECT?v=i.radio:u===k.e2.ClickMode.MULTI_SELECT&&(v=i.checkbox);const S=(0,n.useMemo)((()=>s.map(((e,t)=>{const r=F(e,t,f,u,b,d);return(0,A.jsx)(r,{},`${e.content}-${t}`)}))),[u,s,f,d,b]),O=d===k.e2.Style.BORDERLESS?m.spacing.threeXS:m.spacing.twoXS;return(0,A.jsxs)("div",{className:"stButtonGroup","data-testid":"stButtonGroup",children:[(0,A.jsx)(M.L,{label:p,disabled:r,labelVisibility:(0,x.yv)(null!==(t=null===g||void 0===g?void 0:g.value)&&void 0!==t?t:k.Qx.LabelVisibilityOptions.COLLAPSED),children:y&&(0,A.jsx)(R.Cl,{children:(0,A.jsx)(I.A,{content:y,placement:P.W.TOP})})}),(0,A.jsx)(C,{disabled:r,mode:v,onClick:(e,t)=>{const r=function(e,t,r){return e==k.e2.ClickMode.MULTI_SELECT?function(e,t){return t.includes(e)?t.filter((t=>t!==e)):[...t,e]}(t,null!==r&&void 0!==r?r:[]):null!==r&&void 0!==r&&r.includes(t)?[]:[t]}(u,t,b);h({value:r,fromUi:!0})},selected:u===k.e2.ClickMode.MULTI_SELECT?b:(w=b,0===w.length?-1:w[0]),overrides:{Root:{style:{flexWrap:"wrap",gap:O}}},children:S})]});var w}const B=(0,n.memo)(W)},34752:(e,t,r)=>{r.d(t,{X:()=>l,o:()=>i});var n=r(58878),o=r(25571);class i{constructor(){this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}manageFormClearListener(e,t,r){(0,o.se)(this.formClearListener)&&this.lastWidgetMgr===e&&this.lastFormId===t||(this.disconnect(),(0,o._L)(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}}function l(e){let{element:t,widgetMgr:r,onFormCleared:i}=e;(0,n.useEffect)((()=>{if(!(0,o._L)(t.formId))return;const e=r.addFormClearedListener(t.formId,i);return()=>{e.disconnect()}}),[t,r,i])}},3101:(e,t,r)=>{r.d(t,{_:()=>l,t:()=>a});var n=r(58878),o=r(34752),i=r(25571);function l(e){let{getStateFromWidgetMgr:t,getDefaultState:r,updateWidgetMgrState:l,element:a,widgetMgr:c,fragmentId:u}=e;const[s,f]=(0,n.useState)((()=>{var e;return null!==(e=t(c,a))&&void 0!==e?e:r(c,a)})),[d,p]=(0,n.useState)({value:s,fromUi:!1});(0,n.useEffect)((()=>{(0,i.hX)(d)||(p(null),f(d.value),l(a,c,d,u))}),[d,l,a,c,u]);const g=(0,n.useCallback)((()=>{p({value:r(c,a),fromUi:!0})}),[p,a,r,c]);return(0,o.X)({widgetMgr:c,element:a,onFormCleared:g}),[s,p]}function a(e){let{getStateFromWidgetMgr:t,getDefaultStateFromProto:r,getCurrStateFromProto:o,updateWidgetMgrState:i,element:a,widgetMgr:c,fragmentId:u}=e;const s=(0,n.useCallback)(((e,t)=>r(t)),[r]),[f,d]=l({getStateFromWidgetMgr:t,getDefaultState:s,updateWidgetMgrState:i,element:a,widgetMgr:c,fragmentId:u});return(0,n.useEffect)((()=>{a.setValue&&(a.setValue=!1,d({value:o(a),fromUi:!1}))}),[a,o,d]),[f,d]}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.