PageSourceSearch

https://barunsaha-slide-deck-ai.hf.space/static/js/index.C1Y0t3IF.js

js barunsaha-slide-deck-ai.hf.space collected 2026-10-03 10:20:14 UTC 4,208 bytes, 1 lines download raw bytes

1import{r,o as O,ag as D,ah as H,h as L,j as b,O as E,ai as M,aj as U,e as C,q as K}from"./index.RuhrnD1v.js";import{u as j,V as q}from"./useSelectCommon.CZJ9OUIq.js";import{W as F}from"./WidgetLabel.CgwydhVR.js";import{W as k}from"./WidgetLabelHelpIcon.BKLcvqEy.js";import{C as N,a as X}from"./select.C3diGM4n.js";import{u as G}from"./useBasicWidgetState.CI9LlGGe.js";import"./styled-components.BjCveN31.js";import"./_baseMap.BQYfXAcQ.js";import"./styled-components.CXqQ-NdV.js";import"./constants.BZvTtNRL.js";import"./FormClearHelper.DFo50Lfo.js";const _=({disabled:o,value:t,onChange:l,options:d,label:c,labelVisibility:f,help:p,placeholder:v,clearable:g,acceptNewOptions:h})=>{const e=O(),y=r.useContext(D),[u,s]=r.useState(t),i=r.useRef(u);H(()=>{s(t),i.current=null},[t]);const S=r.useCallback(n=>{if(n.type==="remove"){i.current=n.option?.value,s(null);return}if(i.current=null,n.type==="clear"){s(null),l(null);return}const[a]=n.value;s(a.value),l(a.value)},[l]),W=r.useCallback(()=>{i.current!==null&&s(i.current)},[]),w=d,{placeholder:T,disabled:V,selectOptions:z,inputReadOnly:B,valueToUiSingle:I,createFilterOptions:x}=j({options:w,isMulti:!1,acceptNewOptions:h,placeholderInput:v}),m=o||V,P=r.useMemo(()=>x(),[x]),R=I(u);return L("div",{className:"stSelectbox","data-testid":"stSelectbox",children:[b(F,{label:c,labelVisibility:f,disabled:m,children:p&&b(k,{content:p,label:c})}),b(X,{creatable:h,disabled:m,labelKey:"label","aria-label":c||"",onChange:S,onBlur:W,options:z,filterOptions:P,clearable:g||!1,escapeClearsValue:g||!1,value:R,valueKey:"value",placeholder:T,ignoreCase:!1,overrides:{Root:{style:()=>({lineHeight:e.lineHeights.inputWidget,fontWeight:e.fontWeights.normal})},Dropdown:{component:q,style:{boxShadow:"none",overflow:"hidden"}},ClearIcon:{props:{overrides:{Svg:{style:{color:e.colors.grayTextColor,padding:e.spacing.threeXS,height:e.sizes.clearIconSize,width:e.sizes.clearIconSize,":hover":{fill:e.colors.bodyText}}}}}},ControlContainer:{style:({$isFocused:n})=>{const a=U(e.colors,n);return{height:e.sizes.minElementHeight,borderLeftWidth:e.sizes.borderWidth,borderRightWidth:e.sizes.borderWidth,borderTopWidth:e.sizes.borderWidth,borderBottomWidth:e.sizes.borderWidth,borderTopColor:a,borderRightColor:a,borderBottomColor:a,borderLeftColor:a}}},IconsContainer:{style:()=>({paddingRight:e.spacing.sm})},ValueContainer:{style:()=>({flexGrow:1,paddingRight:e.spacing.sm,paddingLeft:e.spacing.sm,paddingBottom:e.spacing.sm,paddingTop:e.spacing.sm,marginLeft:e.sizes.tagMarginInsideBorder})},Placeholder:{style:()=>({color:m?e.colors.fadedText40:e.colors.fadedText60,position:"absolute",pointerEvents:"none"})},InputContainer:{style:()=>({marginLeft:e.spacing.none,position:"relative",minWidth:e.spacing.threeXS,flexGrow:0})},Input:{props:{readOnly:B},style:()=>({lineHeight:e.lineHeights.inputWidget,color:e.colors.bodyText,caretColor:e.colors.bodyText})},DropdownContainer:{style:()=>({...M(e),maxHeight:`min(${e.sizes.maxDropdownHeight}, 70vh)`,overflow:"hidden"})},Popover:{props:{ignoreBoundary:y,popoverMargin:E(e.spacing.twoXS),overrides:{Body:{style:()=>({overflow:"hidden"})}}}},SingleValue:{style:()=>({marginLeft:e.spacing.none})},SelectArrow:{component:N,props:{style:{...m&&{cursor:"not-allowed"}},overrides:{Svg:{style:()=>({width:e.iconSizes.xl,height:e.iconSizes.xl})}}}}}})]})},$=r.memo(_),A=(o,t)=>o.getStringValue(t),J=o=>o.options.length===0||C(o.default)?null:o.options[o.default],Q=o=>o.rawValue??null,Y=(o,t,l,d)=>{t.setStringValue(o,l.value,{fromUi:l.fromUi},d)},Z=({disabled:o,element:t,widgetMgr:l,fragmentId:d})=>{const{options:c,help:f,label:p,labelVisibility:v,placeholder:g,acceptNewOptions:h}=t,e=t.queryParamKey?{paramKey:t.queryParamKey,valueType:"string_value",clearable:C(t.default)}:void 0,[y,u]=G({getStateFromWidgetMgr:A,getDefaultStateFromProto:J,getCurrStateFromProto:Q,updateWidgetMgrState:Y,element:t,widgetMgr:l,fragmentId:d,formClearBehavior:"resetValueOnly",queryParamBinding:e}),s=r.useCallback(S=>{u({value:S,fromUi:!0})},[u]),i=C(t.default)&&!o;return b($,{label:p,labelVisibility:K(v?.value),options:c,disabled:o,onChange:s,value:y,help:f,placeholder:g,clearable:i,acceptNewOptions:h??!1})},ue=r.memo(Z);export{ue as default};

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.