@steambrew/api
Version:
This sub-project is responsible for transpiling and assembling @steambrew/client and @steambrew/webkit into a bundle that is injectable into the Steam Client. `StartPreloader` is the main function that is called from the backend of Millennium in C++ with
1 lines • 85.6 kB
JavaScript
import"../millennium.js";import{findAllModules as e,CommonUIModule as t,findModuleExport as n,findModule as o,findModuleByExport as i,findModuleDetailsByExport as a,IconsModule as r,ReactRouter as s}from"./chunk-webpack.js";export{createModuleMapping,findModuleChild,modules}from"./chunk-webpack.js";import l from"./chunk-logger.js";const d=e(e=>{if("object"==typeof e&&!e.__esModule){const t=Object.keys(e);return(1!=t.length||!e.version)&&(!(t.length>1e3&&e.AboutSettings)&&(t.length>0&&t.every(t=>!Object.getOwnPropertyDescriptor(e,t)?.get&&"string"==typeof e[t])))}return!1}),c=Object.assign({},...d.map(e=>Object.fromEntries(Object.entries(e).map(([e,t])=>[e,t]))));function u(e){return d.find(t=>t?.[e])?.[e]}const p=new Proxy(u,{get:(e,t)=>{if("string"==typeof t)return e(t)}});function h(e){return d.find(t=>e(t))}function g(e){for(let t of d)for(let n of Object.keys(t))if(t[n]==e)return n}const m=Object.values(t).filter(e=>"object"==typeof e&&e?.render?.toString().includes('createElement("div",{...')||e?.render?.toString().includes('createElement("div",Object.assign({},')),S=new Map(Object.values(m).map(e=>{try{return[e.render({}).props.className.split(" ")[0],e]}catch(e){return console.error("[DFL:Dialog]: failed to render common dialog component",e),[null,null]}})),C=S.get("DialogHeader")||Object.values(t).find(e=>{const t=e?.render?.toString?.();return t?.includes('role:"heading"')&&t.includes(')("DialogHeader",')}),f=S.get("DialogSubHeader"),R=S.get("DialogFooter"),y=S.get("DialogLabel"),P=S.get("DialogBodyText"),_=S.get("DialogBody"),v=S.get("DialogControlsSection"),w=S.get("DialogControlsSectionHeader"),b=Object.values(t).find(e=>e?.render?.toString()?.includes('"DialogButton","_DialogLayout","Primary"')),T=Object.values(t).find(e=>e?.render?.toString()?.includes('"DialogButton","_DialogLayout","Secondary"')),A=T,F=A?.render({}).type;let D=Symbol("MILLENNIUM_CALL_ORIGINAL");function k(e,t,n,o={}){const i=e[t];e[t]=function(...e){n.call(this,e);const t=a.original.call(this,...e);return o.singleShot&&a.unpatch(),t};const a=I(e,t,n,e[t],i);return a}function L(e,t,n,o={}){const i=e[t];e[t]=function(...e){let t=a.original.call(this,...e);return t=n.call(this,e,t),o.singleShot&&a.unpatch(),t};const a=I(e,t,n,e[t],i);return a}function O(e,t,n,o={}){const i=e[t];e[t]=function(...e){const t=n.call(this,e);return t==D?a.original.call(this,...e):(o.singleShot&&a.unpatch(),t)};const a=I(e,t,n,e[t],i);return a}function I(e,t,n,o,i){Object.assign(e[t],i),e[t].toString=()=>i.toString(),Object.defineProperty(e[t],"__millenniumOrig",{get:()=>a.original,set:e=>a.original=e});const a={object:e,property:t,handler:n,patchedFunction:o,original:i,hasUnpatched:!1,unpatch:()=>function(e){const{object:t,property:n,handler:o,patchedFunction:i,original:a}=e;if(e.hasUnpatched)throw new Error("Function is already unpatched.");let r=n,s=t;console.debug("[Patcher] unpatching",{realObject:s,realProp:r,object:t,property:n,handler:o,patchedFunction:i,original:a,isEqual:s[r]===i});for(;s[r]&&s[r]!==i;)s=s[r].__millenniumPatch,r="original",console.debug("[Patcher] moved to next",{realObject:s,realProp:r,object:t,property:n,handler:o,patchedFunction:i,original:a,isEqual:s[r]===i});s[r]=s[r].__millenniumPatch.original,e.hasUnpatched=!0,console.debug("[Patcher] unpatched",{realObject:s,realProp:r,object:t,property:n,handler:o,patchedFunction:i,original:a,isEqual:s[r]===i})}(a)};return e[t].__millenniumPatch=a,a}function E(e,t=!0){let n=t?"const{":"";return e.forEach((t,o)=>{n+=`"?${t}"?:[a-zA-Z_$]{1,2}`,o<e.length-1&&(n+=",")}),new RegExp(n)}let M={};function N(){const e=window.SP_REACT;let t=e?.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED??e?.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;return t?.ReactCurrentDispatcher?.current?t.ReactCurrentDispatcher.current:Object.values(t).find(e=>e?.useEffect&&e?.useContext&&e?.useRef&&e?.useState)}function x(e={}){const t=N();return M={useContext:t.useContext,useCallback:t.useCallback,useLayoutEffect:t.useLayoutEffect,useEffect:t.useEffect,useMemo:t.useMemo,useRef:t.useRef,useState:t.useState},t.useCallback=e=>e,t.useContext=e=>e._currentValue,t.useLayoutEffect=e=>{},t.useMemo=(e,t)=>e,t.useEffect=e=>{},t.useRef=e=>({current:e||{}}),t.useState=e=>{let t=e;return[t,e=>t=e]},Object.assign(t,e),t}function U(){const e=N();Object.assign(e,M),M={}}function G(e,t){const n=e(x(t));return U(),n}function B(e,t="type"){return e[t]?.__MILLENNIUM_WRAPPED?e[t]:e[t]={...e[t],__MILLENNIUM_WRAPPED:!0}}function W(e,t="type"){var n;if(e[t]?.__MILLENNIUM_WRAPPED)return e[t];{const o=e[t],i=((n=class extends o{}).__MILLENNIUM_WRAPPED=!0,n);return e[t]=i}}function j(e){return e[Object.keys(e).find(e=>e.startsWith("__reactContainer$"))]||e._reactRootContainer?._internalRoot?.current}function K(e){return e[Object.keys(e).find(e=>e.startsWith("__reactFiber"))]||e[Object.keys(e).find(e=>e.startsWith("__reactInternalInstance"))]}const H=(e,t,n)=>{const{walkable:o=null,ignore:i=[]}=n??{};return e&&"object"==typeof e?t(e)?e:Array.isArray(e)?e.map(e=>H(e,t,n)).find(e=>e):(o||Object.keys(e)).map(o=>!i.includes(o)&&H(e[o],t,n)).find(e=>e):null},X=(e,t)=>H(e,t,{walkable:["props","children","child","sibling"]});function J(e){return e?.ownerDocument?.defaultView}function V(){const[e,t]=SP_REACT.useState(null);return[e=>t(J(e)),e]}let Y=!1;function q(e=!0){Y=e}let $=new l("FCTrampoline");function z(e,t){const n={component:function(...t){return Y&&$.debug("new component rendering with props",t),e.apply(this,t)}};e.prototype.render=function(...e){return Y&&$.debug("rendering trampoline",e,this),SP_REACT.createElement(n.component,this.props,this.props.children)},e.prototype.isReactComponent=!0;let o=!1,i=window.SP_REACT.createElement;const a=()=>{o||(Y&&$.debug("applied stubs"),o=!0,x(t),window.SP_REACT.createElement=()=>(Y&&$.debug("createElement hook called"),Y&&console.trace("createElement trace"),Object.create(e.prototype)))},r=()=>{o&&(Y&&$.debug("removed stubs"),o=!1,U(),window.SP_REACT.createElement=i)};let s=0;return window.SP_REACTDOM.version.startsWith("19.")?(Object.defineProperty(e,"contextType",{configurable:!0,get:function(){return Y&&$.debug("get contexttype",this,this._contextType,o,s),Y&&console.trace("contextType trace"),0==s&&(s=1),null==this._contextType&&(this._contextType={}),this._contextType.appliedCurrentValueHook||($.debug("applied currentvalue hook"),this._contextType.appliedCurrentValueHook=!0,Object.defineProperty(this._contextType,"_currentValue",{configurable:!0,get:function(){return Y&&$.debug("get currentValue",this,o,s),Y&&console.trace("currentValue trace"),1==s&&(s=2,a()),this.__currentValue},set:function(e){return this.__currentValue=e}})),this._contextType},set:function(e){this._contextType=e}}),Object.defineProperty(e.prototype,"updater",{configurable:!0,get:function(){return this._updater},set:function(e){return Y&&$.debug("set updater",this,e,o,s),Y&&console.trace("updater trace"),1!=s&&2!=s||(s=0,r()),this._updater=e}}),Object.defineProperty(e,"getDerivedStateFromProps",{configurable:!0,get:function(){return Y&&$.debug("get getDerivedStateFromProps",this,o,s),Y&&console.trace("getDerivedStateFromProps trace"),1!=s&&2!=s||(s=0,r()),this._getDerivedStateFromProps},set:function(e){this._getDerivedStateFromProps=e}})):window.SP_REACTDOM.version.startsWith("18.")&&(Object.defineProperty(e,"contextType",{configurable:!0,get:function(){return Y&&$.debug("get contexttype",this,o,s),Y&&console.trace("contextType trace"),0==s?s=1:3==s&&(s=4),this._contextType},set:function(e){this._contextType=e}}),Object.defineProperty(e,"contextTypes",{configurable:!0,get:function(){return Y&&$.debug("get contexttypes",this,o,s),Y&&console.trace("contextTypes trace"),1==s&&(s=2,a()),this._contextTypes},set:function(e){this._contextTypes=e}}),Object.defineProperty(e.prototype,"updater",{configurable:!0,get:function(){return this._updater},set:function(e){return Y&&$.debug("set updater",this,e,o,s),Y&&console.trace("updater trace"),2==s&&(s=0,r()),this._updater=e}}),Object.defineProperty(e,"getDerivedStateFromProps",{configurable:!0,get:function(){return Y&&$.debug("get getDerivedStateFromProps",this,o,s),Y&&console.trace("getDerivedStateFromProps trace"),2==s&&(s=0,r()),this._getDerivedStateFromProps},set:function(e){this._getDerivedStateFromProps=e}})),n}let Q=!1,Z=!1;function ee(e=!0){Q=e}function te(e=!0){Z=e}function ne(e,t,n,o,i,a,r="type"){switch(Q&&a.group("Patching node:",e),typeof e?.[r]){case"function":const s=L(e,r,n[o+1]?ie(t,n,o+1,i,a):t);Q&&a.debug("Patched a function component",s);break;case"object":if(e[r]?.prototype?.render){W(e);const s=L(e[r].prototype,"render",n[o+1]?ie(t,n,o+1,i,a):t);Q&&a.debug("Patched class component",s)}else Q&&a.debug("Patching forwardref/memo"),B(e,r),ne(e[r],t,n,o,i,a,e[r]?.render?"render":"type");break;default:a.error("Unhandled component type",e)}Q&&a.groupEnd()}function oe(e,t,n,o,i,a){const r=Q||Z?performance.now():0,s=n[o],l=i[o]||(i[o]=new Map);Q&&a.debug(`Patch step ${o} running`,{tree:e,stepHandler:s,step:o,caches:i});const d=s(e);if(!d||!d.type)return d?(Q&&a.error("Found node without type. Something is probably wrong.",d),e):(Q&&a.warn("Found no node. Depending on your usecase, this might be fine.",d),e);let c;if(Q&&a.debug("Found node",d),c=l.get(d.type))return Q&&a.debug("Found cached patched component",d),d.type=c,(Q||Z)&&a.debug(`Patch step ${o} took ${performance.now()-r}ms with cache`),e;const u=d.type;return ne(d,t,n,o,i,a),l.set(u,d.type),(Q||Z)&&a.debug(`Patch step ${o} took ${performance.now()-r}ms`),e}function ie(e,t,n,o,i){return Q&&i.debug(`Creating handler for step ${n}`),(a,r)=>oe(r,e,t,n,o,i)}function ae(e,t,n="ReactPatch"){const o=new l(`ReactTreePatcher -> ${n}`);return Q&&o.debug("Init with options:",e,n),ie(t,e,0,[],o)}const re=h(e=>e.Title&&e.QuickAccessMenu&&e.BatteryDetailsLabels),se=h(e=>e.ScrollPanel),le=h(e=>e.GamepadDialogContent&&!e.BindingButtons),de=h(e=>e.BatteryPercentageLabel&&e.PanelSection&&!e["vr-dashboard-bar-height"]&&!e.QuickAccessMenu&&!e.QuickAccess&&!e.PerfProfileInfo),ce=h(e=>e.OOBEUpdateStatusContainer),ue=h(e=>e.PlayBarDetailLabel),pe=h(e=>e.SliderControlPanelGroup),he=h(e=>e.TopCapsule),ge=h(e=>e.HeaderLoaded),me=h(e=>e.BasicUiRoot),Se=h(e=>e.GamepadTabbedPage),Ce=h(e=>e.BasicContextMenuModal),fe=h(e=>e.AchievementListItemBase&&!e.Page),Re=h(e=>e.AchievementListItemBase&&e.Page),ye=h(e=>e.AppRunningControls&&e.OverlayAchievements),Pe=h(e=>e.AppDetailsRoot),_e=h(e=>e.SpinnerLoaderContainer),ve=h(e=>e.QuickAccessFooter),we=h(e=>e.PlayButtonContainer),be=h(e=>e.LongTitles&&e.GreyBackground),Te=h(e=>e.GamepadLibrary),Ae=h(e=>e.FocusRingRoot),Fe=h(e=>e.SearchAndTitleContainer),De=h(e=>e.MainBrowserContainer),ke=re,Le=se,Oe=fe;function Ie(...e){return e.join(" ")}function Ee(e){return new Promise(t=>setTimeout(t,e))}function Me(){if("SP"==document.title)return window;const e=xe();return e?.find(e=>"root_1_"==e.m_ID).Root.Element.ownerDocument.defaultView}function Ne(){return window.GamepadNavTree?.m_context?.m_controller||window.FocusNavController}function xe(){const e=Ne(),t=e.m_ActiveContext||e.m_LastActiveContext;return t?.m_rgGamepadNavigationTrees}const Ue=E(["highlightOnFocus","childrenContainerWidth"],!1),Ge=Object.values(t).find(e=>e?.render?.toString&&Ue.test(e.render.toString())||e?.render?.toString?.().includes('childrenContainerWidth:"min"')),Be=n(e=>e.render?.toString().includes("setFocusedColumn:")),We=n(e=>e?.toString&&e.toString().includes("().ControlsListChild")&&e.toString().includes("().ControlsListOuterPanel")),je=Object.values(o(e=>{if("object"!=typeof e)return!1;for(const t in e)if(e[t]?.prototype?.GetPanelElementProps)return!0;return!1})).find(e=>e.contextType&&e.prototype?.render.toString().includes("fallback:")&&e?.prototype?.SetChecked&&e?.prototype?.Toggle&&e?.prototype?.GetPanelElementProps),Ke=Object.values(t).find(e=>e?.prototype?.SetSelectedOption&&e?.prototype?.BuildMenu),He=E(["dropDownControlRef","description"],!1),Xe=Object.values(t).find(e=>e?.toString&&He.test(e.toString())),Je=n(e=>e.InstallErrorReportingStore&&e?.prototype?.Reset&&e?.prototype?.componentDidCatch),Ve=n(e=>e?.render?.toString().includes('"shift-children-below"')),Ye=E(["flow-children","onActivate","onCancel","focusClassName","focusWithinClassName"]),qe=n(e=>"function"==typeof e&&e?.toString&&Ye.test(e.toString())||e?.render?.toString&&Ye.test(e.render.toString())),$e=n(e=>e?.toString()?.includes(".GetShowDebugFocusRing())"));var ze;!function(e){e[e.INVALID=0]="INVALID",e[e.OK=1]="OK",e[e.CANCEL=2]="CANCEL",e[e.SECONDARY=3]="SECONDARY",e[e.OPTIONS=4]="OPTIONS",e[e.BUMPER_LEFT=5]="BUMPER_LEFT",e[e.BUMPER_RIGHT=6]="BUMPER_RIGHT",e[e.TRIGGER_LEFT=7]="TRIGGER_LEFT",e[e.TRIGGER_RIGHT=8]="TRIGGER_RIGHT",e[e.DIR_UP=9]="DIR_UP",e[e.DIR_DOWN=10]="DIR_DOWN",e[e.DIR_LEFT=11]="DIR_LEFT",e[e.DIR_RIGHT=12]="DIR_RIGHT",e[e.SELECT=13]="SELECT",e[e.START=14]="START",e[e.LSTICK_CLICK=15]="LSTICK_CLICK",e[e.RSTICK_CLICK=16]="RSTICK_CLICK",e[e.LSTICK_TOUCH=17]="LSTICK_TOUCH",e[e.RSTICK_TOUCH=18]="RSTICK_TOUCH",e[e.LPAD_TOUCH=19]="LPAD_TOUCH",e[e.LPAD_CLICK=20]="LPAD_CLICK",e[e.RPAD_TOUCH=21]="RPAD_TOUCH",e[e.RPAD_CLICK=22]="RPAD_CLICK",e[e.REAR_LEFT_UPPER=23]="REAR_LEFT_UPPER",e[e.REAR_LEFT_LOWER=24]="REAR_LEFT_LOWER",e[e.REAR_RIGHT_UPPER=25]="REAR_RIGHT_UPPER",e[e.REAR_RIGHT_LOWER=26]="REAR_RIGHT_LOWER",e[e.STEAM_GUIDE=27]="STEAM_GUIDE",e[e.STEAM_QUICK_MENU=28]="STEAM_QUICK_MENU"}(ze||(ze={}));const Qe=n(e=>e?.toString&&e.toString().includes(".Marquee")&&e.toString().includes("--fade-length")),Ze=n(e=>"function"==typeof e&&e.toString().includes("GetContextMenuManagerFromWindow(")&&e.toString().includes(".CreateContextMenuInstance(")),et=a(e=>e?.render?.toString()?.includes("bPlayAudio:")||e?.prototype?.OnOKButton&&e?.prototype?.OnMouseEnter),tt=n(e=>e?.prototype?.HideIfSubmenu&&e?.prototype?.HideMenu)||Object.values(et?.[0]??{}).find(e=>e?.toString()?.includes?.("useId")&&e?.toString()?.includes?.("labelId")),nt=i(e=>e?.prototype?.Focus&&e?.prototype?.OnOKButton&&e?.prototype?.render?.toString().includes?.('"emphasis"==this.props.tone')),ot=nt&&Object.values(nt).find(e=>"function"==typeof e&&e?.toString?.()?.includes("bInGamepadUI:")),it=et?.[1],at=n(e=>"function"==typeof e&&/className:.+?\.ContextMenuSeparator/.test(e.toString())),rt=n(e=>"function"==typeof e&&e.toString().includes("props.bDisableBackgroundDismiss")&&!e?.prototype?.Cancel),st=(e,t,n={strTitle:"Millennium Dialog",bHideMainWindowForPopouts:!1})=>rt(e,t||Me()||window,n.strTitle,n,void 0,{bHideActions:n.bHideActionIcons}),lt=n(e=>e?.toString()?.includes("bUpdateDisabled")&&e?.toString()?.includes("closeModal")&&e?.toString()?.includes("onGamepadCancel")),dt=n(e=>"function"==typeof e&&e.toString().includes("Either closeModal or onCancel should be passed to GenericDialog. Classes: "))||Object.values(o(e=>{if("object"!=typeof e)return!1;for(let t in e)if(e[t]?.m_mapModalManager&&Object.values(e)?.find(e=>e?.type))return!0;return!1})||{})?.find(e=>e?.type?.toString?.()?.includes("((function(){")),[ct,ut]=a(e=>e?.toString().includes(".ModalPosition"),5),pt=(ct?Object.values(ct):[]).find(e=>{const t=e?.toString();return t?.includes(".ShowPortalModal()")&&t?.includes(".OnElementReadyCallbacks.Register(")}),ht=ut,[gt,mt]=a(e=>e.toString()?.includes(".PanelSection")),St=mt,Ct=Object.values(gt).filter(e=>!e?.toString()?.includes(".PanelSection"))[0],ft=n(e=>e?.toString()?.includes('.ProgressBar,"standard"==')),Rt=n(e=>e?.toString()?.includes(".ProgressBarFieldStatus},")),yt=E(["indeterminate","nTransitionSec","nProgress"]),Pt=n(e=>e?.toString&&yt.test(e.toString())),_t=E(["pages","fnSetNavigateToPage","disableRouteReporting"]),vt=n(e=>e?.toString&&_t.test(e.toString())),wt=Object.values(t).find(e=>e?.toString?.()?.includes("SliderField,fallback")||e?.toString?.()?.includes('SliderField",')),bt=Object.values(r)?.find(e=>e?.toString&&/Spinner\)}\)?,.\.createElement\(\"path\",{d:\"M18 /.test(e.toString())),Tt=n(e=>e?.toString?.()?.includes("Steam Spinner")&&e?.toString?.()?.includes("src"));let At;let Ft;try{const zo=i(e=>e.Unbleed);zo&&(Ft=Object.values(zo).find(e=>e?.type?.toString()?.includes("((function(){")))}catch(Qo){console.error("Error finding oldTabs:",Qo)}const Dt=Ft||(e=>{const t=At,[n,o]=SP_REACT.useState(t);return SP_REACT.useEffect(()=>{t||(async()=>{console.debug("[DFL:Tabs]: Finding component...");const e=await(async()=>{if(At)return At;for(;!window?.DeckyPluginLoader?.routerHook?.routes;)console.debug("[Millennium:Tabs]: Waiting for Millennium router..."),await Ee(500);return At=G(()=>X(X(window.DeckyPluginLoader.routerHook.routes.find(e=>"/library/app/:appid/achievements"==e.props.path).props.children.type(),e=>e?.props?.scrollTabsTop).type({appid:1}),e=>e?.props?.tabs).type,{useRef:()=>({current:{reaction:{track:()=>{}}}}),useContext:()=>({match:{params:{appid:1}}}),useMemo:()=>({data:{}})})})();console.debug("[DFL:Tabs]: Found!"),o(e)})()},[]),console.log("tc",n),n?SP_REACT.createElement(n,e):SP_JSX_FACTORY.jsx(Tt,{})}),kt=Object.values(t).find(e=>e?.validateUrl&&e?.validateEmail),Lt=Object.values(t).find(e=>e?.render?.toString()?.includes(".ToggleOff)")),Ot=Object.values(t).find(e=>e?.render?.toString()?.includes("ToggleField,fallback")),It=i(e=>e?.render?.toString?.().includes('{case"x":')),Et=(It?Object.values(It):[]).find(e=>e?.render?.toString?.().includes('{case"x":')),Mt=n(e=>e?.render?.toString().includes(".FocusVisibleChild()),[])")),Nt=e=>{const[t,n]=SP_REACT.useState(!0),[o,i]=SP_REACT.useState(!1);return SP_REACT.useEffect(()=>{n(!0),i(!1);const t=new Image;t.src=e.src||"",t.addEventListener("load",()=>{n(!1)}),t.addEventListener("error",()=>{i(!0)})},[e.src]),t?SP_JSX_FACTORY.jsx("div",{style:{width:e.suspenseWidth||e.style?.width,height:e.suspenseHeight||e.style?.height,background:"rgba(255, 255, 255, 0.2)",display:"flex",alignItems:"center",justifyContent:"center"},children:o?"Missing image":SP_JSX_FACTORY.jsx(bt,{style:{height:"48px"}})}):SP_JSX_FACTORY.jsx("img",{...e})},xt=({closeModal:e,onConfirm:t=()=>{},title:n="Color Picker",defaultH:o=0,defaultS:i=100,defaultL:a=50,defaultA:r=1})=>{const[s,l]=SP_REACT.useState(o),[d,c]=SP_REACT.useState(i),[u,p]=SP_REACT.useState(a),[h,g]=SP_REACT.useState(r),m={"--decky-color-picker-hvalue":`${s}`,"--decky-color-picker-svalue":`${d}%`,"--decky-color-picker-lvalue":`${u}%`,"--decky-color-picker-avalue":`${h}`};return SP_JSX_FACTORY.jsxs(lt,{bAllowFullSize:!0,onCancel:e,onOK:()=>{t(`hsla(${s}, ${d}%, ${u}%, ${h})`),e()},children:[SP_JSX_FACTORY.jsx("style",{children:`\n /* This removes the cyan track color that is behind the slider head */\n .ColorPicker_Container .${pe.SliderTrack} {\n --left-track-color: #0000;\n /* This is for compatibility with the "Colored Toggles" CSSLoader Theme*/\n --colored-toggles-main-color: #0000;\n }\n\n .ColorPicker_HSlider .${pe.SliderTrack} {\n background: linear-gradient(\n 270deg,\n hsla(360, var(--decky-color-picker-svalue), var(--decky-color-picker-lvalue), var(--decky-color-picker-avalue)),\n hsla(270, var(--decky-color-picker-svalue), var(--decky-color-picker-lvalue), var(--decky-color-picker-avalue)),\n hsla(180, var(--decky-color-picker-svalue), var(--decky-color-picker-lvalue), var(--decky-color-picker-avalue)),\n hsla(90, var(--decky-color-picker-svalue), var(--decky-color-picker-lvalue), var(--decky-color-picker-avalue)),\n hsla(0, var(--decky-color-picker-svalue), var(--decky-color-picker-lvalue), var(--decky-color-picker-avalue))\n );\n }\n\n .ColorPicker_SSlider .${pe.SliderTrack} {\n background: linear-gradient(\n 90deg,\n hsla(var(--decky-color-picker-hvalue), 0%, var(--decky-color-picker-lvalue), var(--decky-color-picker-avalue)),\n hsla(var(--decky-color-picker-hvalue), 100%, var(--decky-color-picker-lvalue), var(--decky-color-picker-avalue))\n );\n }\n\n .ColorPicker_LSlider .${pe.SliderTrack} {\n background: linear-gradient(\n 90deg,\n hsla(var(--decky-color-picker-hvalue), var(--decky-color-picker-svalue), 0%, var(--decky-color-picker-avalue)),\n hsla(var(--decky-color-picker-hvalue), var(--decky-color-picker-svalue), 50%, var(--decky-color-picker-avalue)),\n hsla(var(--decky-color-picker-hvalue), var(--decky-color-picker-svalue), 100%, var(--decky-color-picker-avalue))\n );\n }\n\n .ColorPicker_ASlider .${pe.SliderTrack} {\n background: linear-gradient(\n 90deg,\n hsla(var(--decky-color-picker-hvalue), var(--decky-color-picker-svalue), var(--decky-color-picker-lvalue), 0),\n hsla(var(--decky-color-picker-hvalue), var(--decky-color-picker-svalue), var(--decky-color-picker-lvalue), 1)\n );\n }\n `}),SP_JSX_FACTORY.jsxs("div",{className:"ColorPicker_ColorDisplayContainer",style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"1em",marginTop:"-2.5em"},children:[SP_JSX_FACTORY.jsx("div",{children:SP_JSX_FACTORY.jsx("span",{style:{fontSize:"1.5em"},children:SP_JSX_FACTORY.jsx("b",{children:n})})}),SP_JSX_FACTORY.jsx("div",{style:{backgroundColor:`hsla(${s}, ${d}%, ${u}%, ${h})`,width:"40px",height:"40px"}})]}),SP_JSX_FACTORY.jsxs("div",{className:"ColorPicker_Container",style:m,children:[SP_JSX_FACTORY.jsx("div",{className:"ColorPicker_HSlider",children:SP_JSX_FACTORY.jsx(wt,{showValue:!0,editableValue:!0,label:"Hue",value:s,min:0,max:360,onChange:l})}),SP_JSX_FACTORY.jsx("div",{className:"ColorPicker_SSlider",children:SP_JSX_FACTORY.jsx(wt,{showValue:!0,editableValue:!0,label:"Saturation",value:d,min:0,max:100,onChange:c})}),SP_JSX_FACTORY.jsx("div",{className:"ColorPicker_LSlider",children:SP_JSX_FACTORY.jsx(wt,{showValue:!0,editableValue:!0,label:"Lightness",value:u,min:0,max:100,onChange:p})}),SP_JSX_FACTORY.jsx("div",{className:"ColorPicker_ASlider",children:SP_JSX_FACTORY.jsx(wt,{showValue:!0,editableValue:!0,label:"Alpha",value:h,step:.1,min:0,max:1,onChange:g})})]})]})};function Ut(e){void 0===e.animate&&(e.animate=!0);const[t,n]=SP_REACT.useState([...e.entries].sort((e,t)=>e.position-t.position)),[o,i]=SP_REACT.useState(!1);function a(){let n=!o;i(n),n||e.onSave(t)}return SP_REACT.useEffect(()=>{n([...e.entries].sort((e,t)=>e.position-t.position))},[e.entries]),SP_JSX_FACTORY.jsx(SP_REACT.Fragment,{children:SP_JSX_FACTORY.jsx("div",{style:{width:"inherit",height:"inherit",flex:"1 1 1px",scrollPadding:"48px 0px",display:"flex",flexDirection:"column",justifyContent:"flex-start",alignContent:"stretch"},children:SP_JSX_FACTORY.jsx(qe,{onSecondaryButton:a,onSecondaryActionDescription:o?"Save Order":"Reorder",onClick:a,onButtonDown:function(n){n.detail.button==ze.CANCEL&&o&&(i(!o),e.onSave(t))},children:t.map(i=>SP_JSX_FACTORY.jsx(Gt,{animate:e.animate,listData:t,entryData:i,reorderEntryFunc:n,reorderEnabled:o,fieldProps:e.fieldProps,children:e.interactables?SP_JSX_FACTORY.jsx(e.interactables,{entry:i}):null}))})})})}function Gt(e){const[t,n]=SP_REACT.useState(!1),[o,i]=SP_REACT.useState(!1),a=e.listData;async function r(e){n(e);for(let e=0;e<3;e++)await new Promise(e=>requestAnimationFrame(e));i(e)}return SP_JSX_FACTORY.jsx("div",{style:e.animate?{transition:t||o?"":"transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.3s cubic-bezier(0.25, 1, 0.5, 1)",transform:!e.reorderEnabled||t?"scale(1)":"scale(0.9)",opacity:!e.reorderEnabled||t?1:.7}:{},children:SP_JSX_FACTORY.jsx(Ve,{label:e.entryData.label,...e.fieldProps,focusable:!e.children,onButtonDown:function(t){if(!e.reorderEnabled)return;const n=t,o=a.findIndex(t=>t===e.entryData),i=a[o];if(o<0)return;let r=-1;if(n.detail.button==ze.DIR_DOWN?r=i.position+1:n.detail.button==ze.DIR_UP&&(r=i.position-1),r>=a.length||r<0)return;let s=a.find(e=>e.position===r);if(!s)return;let l=i.position;i.position=s.position,s.position=l,e.reorderEntryFunc([...a].sort((e,t)=>e.position-t.position))},onGamepadBlur:()=>r(!1),onGamepadFocus:()=>r(!0),children:SP_JSX_FACTORY.jsx(qe,{style:{display:"flex",width:"100%",position:"relative"},children:e.children})})})}function Bt(){const e=xe();return e.find(e=>"QuickAccess-NA"===e?.id)?.m_Root?.m_element?.ownerDocument.defaultView??null}function Wt(){const[e,t]=SP_REACT.useState(Bt()?.document.hidden??!1);return SP_REACT.useEffect(()=>{const e=Bt();if(null===e)return void console.error("Could not get window of QuickAccess menu!");const n=()=>t(e.document.hidden);return e.addEventListener("visibilitychange",n),()=>{e.removeEventListener("visibilitychange",n)}},[]),!e}const jt=Object.values(s).find(e=>/return (\w)\?\1\.params:{}/.test(`${e}`));var Kt,Ht,Xt,Jt,Vt,Yt,qt,$t,zt,Qt,Zt,en,tn,nn,on,an,rn,sn,ln,dn,cn,un,pn,hn,gn,mn,Sn,Cn,fn,Rn,yn,Pn,_n,vn,wn,bn,Tn,An,Fn,Dn,kn,Ln,On,In,En,Mn,Nn,xn,Un,Gn,Bn,Wn,jn,Kn,Hn,Xn,Jn,Vn,Yn,qn,$n,zn,Qn,Zn,eo,to,no,oo,io,ao,ro,so,lo,co,uo,po,ho,go,mo,So,Co,fo,Ro;!function(e){e[e.Capsule=0]="Capsule",e[e.Hero=1]="Hero",e[e.Logo=2]="Logo",e[e.Header=3]="Header",e[e.Icon=4]="Icon",e[e.HeroBlur=5]="HeroBlur"}(Kt||(Kt={})),function(e){e[e.Unknown=0]="Unknown",e[e.Unavailable=1]="Unavailable",e[e.Prerelease=2]="Prerelease",e[e.PreloadOnly=3]="PreloadOnly",e[e.Released=4]="Released",e[e.Disabled=5]="Disabled"}(Ht||(Ht={})),function(e){e[e.None=0]="None",e[e.Default=1]="Default",e[e.SafeMode=2]="SafeMode",e[e.Multiplayer=3]="Multiplayer",e[e.Config=4]="Config",e[e.OpenVR=5]="OpenVR",e[e.Server=6]="Server",e[e.Editor=7]="Editor",e[e.Manual=8]="Manual",e[e.Benchmark=9]="Benchmark",e[e.Option1=10]="Option1",e[e.Option2=11]="Option2",e[e.Option3=12]="Option3",e[e.OculusVR=13]="OculusVR",e[e.OpenVROverlay=14]="OpenVROverlay",e[e.OSVR=15]="OSVR",e[e.OpenXR=16]="OpenXR",e[e.Dialog=1e3]="Dialog"}(Xt||(Xt={})),function(e){e[e.Invalid=-1]="Invalid",e[e.Community=0]="Community",e[e.Microtransaction=1]="Microtransaction",e[e.Collection=2]="Collection",e[e.Art=3]="Art",e[e.Video=4]="Video",e[e.Screenshot=5]="Screenshot",e[e.Game=6]="Game",e[e.Software=7]="Software",e[e.Concept=8]="Concept",e[e.WebGuide=9]="WebGuide",e[e.IntegratedGuide=10]="IntegratedGuide",e[e.Merch=11]="Merch",e[e.ControllerBinding=12]="ControllerBinding",e[e.SteamworksAccessInvite=13]="SteamworksAccessInvite",e[e.SteamVideo=14]="SteamVideo",e[e.GameManagedItem=15]="GameManagedItem",e[e.Max=16]="Max"}(Jt||(Jt={})),function(e){e[e.None=0]="None",e[e.Unspecified=1]="Unspecified",e[e.Paused=2]="Paused",e[e.Canceled=3]="Canceled",e[e.Suspended=4]="Suspended",e[e.NoSubscription=5]="NoSubscription",e[e.NoConnection=6]="NoConnection",e[e.Timeout=7]="Timeout",e[e.MissingKey=8]="MissingKey",e[e.MissingConfig=9]="MissingConfig",e[e.DiskReadFailure=10]="DiskReadFailure",e[e.DiskWriteFailure=11]="DiskWriteFailure",e[e.NotEnoughDiskSpace=12]="NotEnoughDiskSpace",e[e.CorruptGameFiles=13]="CorruptGameFiles",e[e.WaitingForNextDisk=14]="WaitingForNextDisk",e[e.InvalidInstallPath=15]="InvalidInstallPath",e[e.AppRunning=16]="AppRunning",e[e.DependencyFailure=17]="DependencyFailure",e[e.NotInstalled=18]="NotInstalled",e[e.UpdateRequired=19]="UpdateRequired",e[e.Busy=20]="Busy",e[e.NoDownloadSources=21]="NoDownloadSources",e[e.InvalidAppConfig=22]="InvalidAppConfig",e[e.InvalidDepotConfig=23]="InvalidDepotConfig",e[e.MissingManifest=24]="MissingManifest",e[e.NotReleased=25]="NotReleased",e[e.RegionRestricted=26]="RegionRestricted",e[e.CorruptDepotCache=27]="CorruptDepotCache",e[e.MissingExecutable=28]="MissingExecutable",e[e.InvalidPlatform=29]="InvalidPlatform",e[e.InvalidFileSystem=30]="InvalidFileSystem",e[e.CorruptUpdateFiles=31]="CorruptUpdateFiles",e[e.DownloadDisabled=32]="DownloadDisabled",e[e.SharedLibraryLocked=33]="SharedLibraryLocked",e[e.PendingLicense=34]="PendingLicense",e[e.OtherSessionPlaying=35]="OtherSessionPlaying",e[e.CorruptDownload=36]="CorruptDownload",e[e.CorruptDisk=37]="CorruptDisk",e[e.FilePermissions=38]="FilePermissions",e[e.FileLocked=39]="FileLocked",e[e.MissingContent=40]="MissingContent",e[e.Requires64BitOS=41]="Requires64BitOS",e[e.MissingUpdateFiles=42]="MissingUpdateFiles",e[e.NotEnoughDiskQuota=43]="NotEnoughDiskQuota",e[e.LockedSiteLicense=44]="LockedSiteLicense",e[e.ParentalControlBlocked=45]="ParentalControlBlocked",e[e.CreateProcessFailure=46]="CreateProcessFailure",e[e.SteamClientOutdated=47]="SteamClientOutdated",e[e.PlaytimeExceeded=48]="PlaytimeExceeded",e[e.CorruptFileSignature=49]="CorruptFileSignature",e[e.MissingInstalledFiles=50]="MissingInstalledFiles",e[e.CompatibilityToolFailure=51]="CompatibilityToolFailure",e[e.UnmountedUninstallPath=52]="UnmountedUninstallPath",e[e.InvalidBackupPath=53]="InvalidBackupPath",e[e.InvalidPasscode=54]="InvalidPasscode",e[e.ThirdPartyUpdater=55]="ThirdPartyUpdater",e[e.ParentalPlaytimeExceeded=56]="ParentalPlaytimeExceeded",e[e.Max=57]="Max"}(Vt||(Vt={})),function(e){e[e.PlayStation=1]="PlayStation",e[e.Xbox=2]="Xbox",e[e.Generic=4]="Generic",e[e.NintendoSwitch=8]="NintendoSwitch"}(Yt||(Yt={})),function(e){e[e.None=0]="None",e[e.Subscribed=1]="Subscribed",e[e.Free=2]="Free",e[e.RegionRestricted=4]="RegionRestricted",e[e.LowViolence=8]="LowViolence",e[e.InvalidPlatform=16]="InvalidPlatform",e[e.Borrowed=32]="Borrowed",e[e.FreeWeekend=64]="FreeWeekend",e[e.Retail=128]="Retail",e[e.Locked=256]="Locked",e[e.Pending=512]="Pending",e[e.Expired=1024]="Expired",e[e.Permanent=2048]="Permanent",e[e.Recurring=4096]="Recurring",e[e.Canceled=8192]="Canceled",e[e.AutoGrant=16384]="AutoGrant",e[e.PendingGift=32768]="PendingGift",e[e.RentalNotActivated=65536]="RentalNotActivated",e[e.Rental=131072]="Rental",e[e.SiteLicense=262144]="SiteLicense",e[e.LegacyFreeSub=524288]="LegacyFreeSub",e[e.InvalidOSType=1048576]="InvalidOSType",e[e.TimedTrial=2097152]="TimedTrial"}(qt||(qt={})),function(e){e[e.Always=0]="Always",e[e.Launch=1]="Launch",e[e.HighPriority=2]="HighPriority"}($t||($t={})),function(e){e[e.UseGlobal=0]="UseGlobal",e[e.AlwaysAllow=1]="AlwaysAllow",e[e.NeverAllow=2]="NeverAllow"}(zt||(zt={})),function(e){e[e.Invalid=0]="Invalid",e[e.Launching=1]="Launching",e[e.Uninstalling=2]="Uninstalling",e[e.Installing=3]="Installing",e[e.Running=4]="Running",e[e.Validating=5]="Validating",e[e.Updating=6]="Updating",e[e.Downloading=7]="Downloading",e[e.Synchronizing=8]="Synchronizing",e[e.ReadyToInstall=9]="ReadyToInstall",e[e.ReadyToPreload=10]="ReadyToPreload",e[e.ReadyToLaunch=11]="ReadyToLaunch",e[e.RegionRestricted=12]="RegionRestricted",e[e.PresaleOnly=13]="PresaleOnly",e[e.InvalidPlatform=14]="InvalidPlatform",e[e.PreloadComplete=16]="PreloadComplete",e[e.BorrowerLocked=17]="BorrowerLocked",e[e.UpdatePaused=18]="UpdatePaused",e[e.UpdateQueued=19]="UpdateQueued",e[e.UpdateRequired=20]="UpdateRequired",e[e.UpdateDisabled=21]="UpdateDisabled",e[e.DownloadPaused=22]="DownloadPaused",e[e.DownloadQueued=23]="DownloadQueued",e[e.DownloadRequired=24]="DownloadRequired",e[e.DownloadDisabled=25]="DownloadDisabled",e[e.LicensePending=26]="LicensePending",e[e.LicenseExpired=27]="LicenseExpired",e[e.AvailForFree=28]="AvailForFree",e[e.AvailToBorrow=29]="AvailToBorrow",e[e.AvailGuestPass=30]="AvailGuestPass",e[e.Purchase=31]="Purchase",e[e.Unavailable=32]="Unavailable",e[e.NotLaunchable=33]="NotLaunchable",e[e.CloudError=34]="CloudError",e[e.CloudOutOfDate=35]="CloudOutOfDate",e[e.Terminating=36]="Terminating",e[e.OwnerLocked=37]="OwnerLocked",e[e.DownloadFailed=38]="DownloadFailed",e[e.UpdateFailed=39]="UpdateFailed"}(Qt||(Qt={})),function(e){e[e.Invalid=0]="Invalid",e[e.NotApplicable=1]="NotApplicable",e[e.Pass=2]="Pass",e[e.Fail=3]="Fail",e[e.FailMinor=4]="FailMinor"}(Zt||(Zt={})),function(e){e[e.None=0]="None",e[e._2ftLibraryDetails=100]="_2ftLibraryDetails",e[e._2ftLibraryListView=101]="_2ftLibraryListView",e[e._2ftLibraryGrid=102]="_2ftLibraryGrid",e[e.InstallSubComplete=103]="InstallSubComplete",e[e.DownloadsPage=104]="DownloadsPage",e[e.RemoteClientStartStreaming=105]="RemoteClientStartStreaming",e[e._2ftMiniModeList=106]="_2ftMiniModeList",e[e._10ft=200]="_10ft",e[e.DashAppLaunchCmdLine=300]="DashAppLaunchCmdLine",e[e.DashGameIdLaunchCmdLine=301]="DashGameIdLaunchCmdLine",e[e.RunByGameDir=302]="RunByGameDir",e[e.SubCmdRunDashGame=303]="SubCmdRunDashGame",e[e.SteamURL_Launch=400]="SteamURL_Launch",e[e.SteamURL_Run=401]="SteamURL_Run",e[e.SteamURL_JoinLobby=402]="SteamURL_JoinLobby",e[e.SteamURL_RunGame=403]="SteamURL_RunGame",e[e.SteamURL_RunGameIdOrJumplist=404]="SteamURL_RunGameIdOrJumplist",e[e.SteamURL_RunSafe=405]="SteamURL_RunSafe",e[e.TrayIcon=500]="TrayIcon",e[e.LibraryLeftColumnContextMenu=600]="LibraryLeftColumnContextMenu",e[e.LibraryLeftColumnDoubleClick=601]="LibraryLeftColumnDoubleClick",e[e.Dota2Launcher=700]="Dota2Launcher",e[e.IRunGameEngine=800]="IRunGameEngine",e[e.DRMFailureResponse=801]="DRMFailureResponse",e[e.DRMDataRequest=802]="DRMDataRequest",e[e.CloudFilePanel=803]="CloudFilePanel",e[e.DiscoveredAlreadyRunning=804]="DiscoveredAlreadyRunning",e[e.GameActionJoinParty=900]="GameActionJoinParty",e[e.AppPortraitContextMenu=1e3]="AppPortraitContextMenu"}(en||(en={})),function(e){e[e.None=0]="None",e[e.AppSessionActive=1]="AppSessionActive",e[e.UploadInProgress=2]="UploadInProgress",e[e.UploadPending=3]="UploadPending",e[e.AppSessionSuspended=4]="AppSessionSuspended"}(tn||(tn={})),function(e){e[e.DepotOnly=-2147483648]="DepotOnly",e[e.Invalid=0]="Invalid",e[e.Game=1]="Game",e[e.Application=2]="Application",e[e.Tool=4]="Tool",e[e.Demo=8]="Demo",e[e.Deprecated=16]="Deprecated",e[e.DLC=32]="DLC",e[e.Guide=64]="Guide",e[e.Driver=128]="Driver",e[e.Config=256]="Config",e[e.Hardware=512]="Hardware",e[e.Franchise=1024]="Franchise",e[e.Video=2048]="Video",e[e.Plugin=4096]="Plugin",e[e.MusicAlbum=8192]="MusicAlbum",e[e.Series=16384]="Series",e[e.Comic=32768]="Comic",e[e.Beta=65536]="Beta",e[e.Shortcut=1073741824]="Shortcut"}(nn||(nn={})),function(e){e[e.Invalid=0]="Invalid",e[e.Publisher=1]="Publisher",e[e.Developer=2]="Developer",e[e.Franchise=3]="Franchise"}(on||(on={})),function(e){e[e.None=0]="None",e[e.Partial=1]="Partial",e[e.Full=2]="Full"}(an||(an={})),function(e){e[e.Unknown=0]="Unknown",e[e.Unsupported=1]="Unsupported",e[e.Playable=2]="Playable",e[e.Verified=3]="Verified"}(rn||(rn={})),function(e){e[e.Invalid=0]="Invalid",e[e.Disabled=1]="Disabled",e[e.Unknown=2]="Unknown",e[e.Synchronized=3]="Synchronized",e[e.Checking=4]="Checking",e[e.OutOfSync=5]="OutOfSync",e[e.Uploading=6]="Uploading",e[e.Downloading=7]="Downloading",e[e.SyncFailed=8]="SyncFailed",e[e.Conflict=9]="Conflict",e[e.PendingElsewhere=10]="PendingElsewhere"}(sn||(sn={})),function(e){e[e.NotRunning=1]="NotRunning",e[e.Success=2]="Success",e[e.Failure=3]="Failure"}(ln||(ln={})),function(e){e[e.Unknown=0]="Unknown",e[e.SteamClient=1]="SteamClient",e[e.WebBrowser=2]="WebBrowser",e[e.MobileApp=3]="MobileApp"}(dn||(dn={})),function(e){e[e.Unknown=0]="Unknown",e[e.StandardPC=1]="StandardPC",e[e.Console=256]="Console",e[e.PS3=272]="PS3",e[e.Steambox=288]="Steambox",e[e.Tesla=320]="Tesla",e[e.Handheld=512]="Handheld",e[e.Phone=528]="Phone",e[e.SteamDeck=544]="SteamDeck"}(cn||(cn={})),function(e){e[e.None=0]="None",e[e.Touch=1]="Touch",e[e.Tap=2]="Tap",e[e.DoubleTap=3]="DoubleTap",e[e.ShortPress=4]="ShortPress",e[e.LongPress=5]="LongPress",e[e.LongTap=6]="LongTap",e[e.TwoFingerTap=7]="TwoFingerTap",e[e.TapCancelled=8]="TapCancelled",e[e.PinchBegin=9]="PinchBegin",e[e.PinchUpdate=10]="PinchUpdate",e[e.PinchEnd=11]="PinchEnd",e[e.FlingStart=12]="FlingStart",e[e.FlingCancelled=13]="FlingCancelled"}(un||(un={})),function(e){e[e.None=0]="None",e[e.Page=1]="Page",e[e.Frame=2]="Frame",e[e.Link=4]="Link",e[e.Media=8]="Media",e[e.Selection=16]="Selection",e[e.Editable=32]="Editable"}(pn||(pn={})),function(e){e[e.None=0]="None",e[e.CanUndo=1]="CanUndo",e[e.CanRedo=2]="CanRedo",e[e.CanCut=4]="CanCut",e[e.CanCopy=8]="CanCopy",e[e.CanPaste=16]="CanPaste",e[e.CanDelete=32]="CanDelete",e[e.CanSelectAll=64]="CanSelectAll",e[e.CanTranslate=128]="CanTranslate"}(hn||(hn={})),function(e){e[e.Close=-1]="Close",e[e.OpenDevTools=26500]="OpenDevTools",e[e.CloseDevTools=26501]="CloseDevTools",e[e.InspectElement=26502]="InspectElement",e[e.OpenLinkInNewTab=26503]="OpenLinkInNewTab"}(gn||(gn={})),function(e){e[e.Bottom=0]="Bottom",e[e.Top=1]="Top"}(mn||(mn={})),function(e){e[e.GroupChatMessage=1]="GroupChatMessage",e[e.FriendChatMessage=2]="FriendChatMessage",e[e.FriendPersonaState=3]="FriendPersonaState"}(Sn||(Sn={})),function(e){e[e.Always=0]="Always",e[e.Minimized=1]="Minimized",e[e.Never=2]="Never"}(Cn||(Cn={})),function(e){e[e.Invalid=0]="Invalid",e[e.BeforeFirst=3]="BeforeFirst",e[e.A=4]="A",e[e.B=5]="B",e[e.C=6]="C",e[e.D=7]="D",e[e.E=8]="E",e[e.F=9]="F",e[e.G=10]="G",e[e.H=11]="H",e[e.I=12]="I",e[e.J=13]="J",e[e.K=14]="K",e[e.L=15]="L",e[e.M=16]="M",e[e.N=17]="N",e[e.O=18]="O",e[e.P=19]="P",e[e.Q=20]="Q",e[e.R=21]="R",e[e.S=22]="S",e[e.T=23]="T",e[e.U=24]="U",e[e.V=25]="V",e[e.W=26]="W",e[e.X=27]="X",e[e.Y=28]="Y",e[e.Z=29]="Z",e[e.Key_1=30]="Key_1",e[e.Key_2=31]="Key_2",e[e.Key_3=32]="Key_3",e[e.Key_4=33]="Key_4",e[e.Key_5=34]="Key_5",e[e.Key_6=35]="Key_6",e[e.Key_7=36]="Key_7",e[e.Key_8=37]="Key_8",e[e.Key_9=38]="Key_9",e[e.Key_0=39]="Key_0",e[e.Return=40]="Return",e[e.Escape=41]="Escape",e[e.Backspace=42]="Backspace",e[e.Tab=43]="Tab",e[e.Space=44]="Space",e[e.Dash=45]="Dash",e[e.Equals=46]="Equals",e[e.LeftBracket=47]="LeftBracket",e[e.RightBracket=48]="RightBracket",e[e.Backslash=49]="Backslash",e[e.Unused1=50]="Unused1",e[e.Semicolon=51]="Semicolon",e[e.SingleQuote=52]="SingleQuote",e[e.Backtick=53]="Backtick",e[e.Comma=54]="Comma",e[e.Period=55]="Period",e[e.ForwardSlash=56]="ForwardSlash",e[e.CapsLock=57]="CapsLock",e[e.F1=58]="F1",e[e.F2=59]="F2",e[e.F3=60]="F3",e[e.F4=61]="F4",e[e.F5=62]="F5",e[e.F6=63]="F6",e[e.F7=64]="F7",e[e.F8=65]="F8",e[e.F9=66]="F9",e[e.F10=67]="F10",e[e.F11=68]="F11",e[e.F12=69]="F12",e[e.PrintScreen=70]="PrintScreen",e[e.ScrollLock=71]="ScrollLock",e[e.Break=72]="Break",e[e.Insert=73]="Insert",e[e.Home=74]="Home",e[e.PageUp=75]="PageUp",e[e.Delete=76]="Delete",e[e.End=77]="End",e[e.PageDown=78]="PageDown",e[e.RightArrow=79]="RightArrow",e[e.LeftArrow=80]="LeftArrow",e[e.DownArrow=81]="DownArrow",e[e.UpArrow=82]="UpArrow",e[e.NumLock=83]="NumLock",e[e.KeypadForwardSlash=84]="KeypadForwardSlash",e[e.KeypadAsterisk=85]="KeypadAsterisk",e[e.KeypadDash=86]="KeypadDash",e[e.KeypadPlus=87]="KeypadPlus",e[e.KeypadEnter=88]="KeypadEnter",e[e.Keypad_1=89]="Keypad_1",e[e.Keypad_2=90]="Keypad_2",e[e.Keypad_3=91]="Keypad_3",e[e.Keypad_4=92]="Keypad_4",e[e.Keypad_5=93]="Keypad_5",e[e.Keypad_6=94]="Keypad_6",e[e.Keypad_7=95]="Keypad_7",e[e.Keypad_8=96]="Keypad_8",e[e.Keypad_9=97]="Keypad_9",e[e.Keypad_0=98]="Keypad_0",e[e.KeypadPeriod=99]="KeypadPeriod",e[e.LAlt=100]="LAlt",e[e.LShift=101]="LShift",e[e.LWin=102]="LWin",e[e.LControl=103]="LControl",e[e.RAlt=104]="RAlt",e[e.RShift=105]="RShift",e[e.RWin=106]="RWin",e[e.RControl=107]="RControl",e[e.VolUp=108]="VolUp",e[e.VolDown=109]="VolDown",e[e.Mute=110]="Mute",e[e.Play=111]="Play",e[e.Stop=112]="Stop",e[e.Next=113]="Next",e[e.Prev=114]="Prev",e[e.AfterLast=115]="AfterLast"}(fn||(fn={})),function(e){e[e.Unknown=0]="Unknown",e[e.PersonalLocal=1]="PersonalLocal",e[e.PersonalCloud=2]="PersonalCloud",e[e.Community=3]="Community",e[e.Template=4]="Template",e[e.Official=5]="Official",e[e.OfficialDefault=6]="OfficialDefault"}(Rn||(Rn={})),function(e){e[e.ControllerPreference=0]="ControllerPreference",e[e.Off=1]="Off",e[e.On=2]="On"}(yn||(yn={})),function(e){e[e.Off=0]="Off",e[e.DefaultSetting=1]="DefaultSetting",e[e.On=2]="On"}(Pn||(Pn={})),function(e){e[e.None=-1]="None",e[e.Unknown=0]="Unknown",e[e.UnknownSteamController=1]="UnknownSteamController",e[e.SteamController=2]="SteamController",e[e.SteamControllerV2=3]="SteamControllerV2",e[e.SteamControllerNeptune=4]="SteamControllerNeptune",e[e.FrontPanelBoard=20]="FrontPanelBoard",e[e.Generic=30]="Generic",e[e.XBox360Controller=31]="XBox360Controller",e[e.XBoxOneController=32]="XBoxOneController",e[e.PS3Controller=33]="PS3Controller",e[e.PS4Controller=34]="PS4Controller",e[e.WiiController=35]="WiiController",e[e.AppleController=36]="AppleController",e[e.AndroidController=37]="AndroidController",e[e.SwitchProController=38]="SwitchProController",e[e.SwitchJoyConLeft=39]="SwitchJoyConLeft",e[e.SwitchJoyConRight=40]="SwitchJoyConRight",e[e.SwitchJoyConPair=41]="SwitchJoyConPair",e[e.SwitchProGenericInputOnlyController=42]="SwitchProGenericInputOnlyController",e[e.MobileTouch=43]="MobileTouch",e[e.SwitchProXInputSwitchController=44]="SwitchProXInputSwitchController",e[e.PS5Controller=45]="PS5Controller",e[e.XboxEliteController=46]="XboxEliteController",e[e.LastController=47]="LastController",e[e.PS5EdgeController=48]="PS5EdgeController",e[e.GenericKeyboard=400]="GenericKeyboard",e[e.GenericMouse=800]="GenericMouse"}(_n||(_n={})),function(e){e[e.None=0]="None",e[e.Setup=1]="Setup",e[e.WaitLicense=2]="WaitLicense",e[e.FreeLicense=3]="FreeLicense",e[e.ShowCDKey=4]="ShowCDKey",e[e.WaitAppInfo=5]="WaitAppInfo",e[e.ShowPassword=6]="ShowPassword",e[e.ShowConfig=7]="ShowConfig",e[e.ShowEULAs=8]="ShowEULAs",e[e.CreateApps=9]="CreateApps",e[e.ReadFromMedia=10]="ReadFromMedia",e[e.ShowChangeMedia=11]="ShowChangeMedia",e[e.WaitLegacyCDKeys=12]="WaitLegacyCDKeys",e[e.ShowSignup=13]="ShowSignup",e[e.Complete=14]="Complete",e[e.Failed=15]="Failed",e[e.Canceled=16]="Canceled"}(vn||(vn={})),function(e){e[e.Undefined=0]="Undefined",e[e.Playing=1]="Playing",e[e.Paused=2]="Paused",e[e.Idle=3]="Idle"}(wn||(wn={})),function(e){e[e.None=0]="None",e[e.All=1]="All",e[e.Once=2]="Once",e[e.Max=3]="Max"}(bn||(bn={})),function(e){e[e.Invalid=0]="Invalid",e[e.DownloadComplete=1]="DownloadComplete",e[e.FriendInvite=2]="FriendInvite",e[e.FriendInGame=3]="FriendInGame",e[e.FriendOnline=4]="FriendOnline",e[e.Achievement=5]="Achievement",e[e.LowBattery=6]="LowBattery",e[e.SystemUpdate=7]="SystemUpdate",e[e.FriendMessage=8]="FriendMessage",e[e.GroupChatMessage=9]="GroupChatMessage",e[e.FriendInviteRollup=10]="FriendInviteRollup",e[e.FamilySharingDeviceAuthorizationChanged=11]="FamilySharingDeviceAuthorizationChanged",e[e.FamilySharingStopPlaying=12]="FamilySharingStopPlaying",e[e.FamilySharingLibraryAvailable=13]="FamilySharingLibraryAvailable",e[e.Screenshot=14]="Screenshot",e[e.CloudSyncFailure=15]="CloudSyncFailure",e[e.CloudSyncConflict=16]="CloudSyncConflict",e[e.IncomingVoiceChat=17]="IncomingVoiceChat",e[e.ClaimSteamDeckRewards=18]="ClaimSteamDeckRewards",e[e.GiftReceived=19]="GiftReceived",e[e.ItemAnnouncement=20]="ItemAnnouncement",e[e.HardwareSurvey=21]="HardwareSurvey",e[e.LowDiskSpace=22]="LowDiskSpace",e[e.BatteryTemperature=23]="BatteryTemperature",e[e.DockUnsupportedFirmware=24]="DockUnsupportedFirmware",e[e.PeerContentUpload=25]="PeerContentUpload",e[e.CannotReadControllerGuideButton=26]="CannotReadControllerGuideButton",e[e.Comment=27]="Comment",e[e.Wishlist=28]="Wishlist",e[e.TradeOffer=29]="TradeOffer",e[e.AsyncGame=30]="AsyncGame",e[e.General=31]="General",e[e.HelpRequest=32]="HelpRequest",e[e.OverlaySplashScreen=33]="OverlaySplashScreen",e[e.BroadcastAvailableToWatch=34]="BroadcastAvailableToWatch",e[e.TimedTrialRemaining=35]="TimedTrialRemaining",e[e.LoginRefresh=36]="LoginRefresh",e[e.MajorSale=37]="MajorSale",e[e.TimerExpired=38]="TimerExpired",e[e.ModeratorMsg=39]="ModeratorMsg",e[e.SteamInputActionSetChanged=40]="SteamInputActionSetChanged",e[e.RemoteClientConnection=41]="RemoteClientConnection",e[e.RemoteClientStartStream=42]="RemoteClientStartStream",e[e.StreamingClientConnection=43]="StreamingClientConnection",e[e.FamilyInvite=44]="FamilyInvite",e[e.PlaytimeWarning=45]="PlaytimeWarning",e[e.FamilyPurchaseRequest=46]="FamilyPurchaseRequest",e[e.FamilyPurchaseRequestResponse=47]="FamilyPurchaseRequestResponse",e[e.ParentalFeatureRequest=48]="ParentalFeatureRequest",e[e.ParentalPlaytimeRequest=49]="ParentalPlaytimeRequest",e[e.GameRecordingError=50]="GameRecordingError",e[e.ParentalFeatureResponse=51]="ParentalFeatureResponse",e[e.ParentalPlaytimeResponse=52]="ParentalPlaytimeResponse",e[e.RequestedGameAdded=53]="RequestedGameAdded",e[e.ClipDownloaded=54]="ClipDownloaded",e[e.GameRecordingStart=55]="GameRecordingStart",e[e.GameRecordingStop=56]="GameRecordingStop",e[e.GameRecordingUserMarkerAdded=57]="GameRecordingUserMarkerAdded",e[e.GameRecordingInstantClip=58]="GameRecordingInstantClip"}(Tn||(Tn={})),function(e){e[e.Invalid=0]="Invalid",e[e.Available=1]="Available",e[e.NeedsRestart=2]="NeedsRestart"}(An||(An={})),function(e){e[e.General=1]="General",e[e.LowDiskSpace=2]="LowDiskSpace"}(Fn||(Fn={})),function(e){e[e.Unknown=-1]="Unknown",e[e.Idle=0]="Idle",e[e.UserInteraction=1]="UserInteraction",e[e.UserInteraction_Timeout=2]="UserInteraction_Timeout",e[e.Standby=3]="Standby",e[e.Idle_Timeout=4]="Idle_Timeout"}(Dn||(Dn={})),function(e){e[e.Minimal=1]="Minimal",e[e.Modal=2]="Modal",e[e.ShowArrowKeys=4]="ShowArrowKeys",e[e.HideDoneKey=8]="HideDoneKey"}(kn||(kn={})),function(e){e[e.TopLeft=0]="TopLeft",e[e.TopRight=1]="TopRight",e[e.BottomLeft=2]="BottomLeft",e[e.BottomRight=3]="BottomRight"}(Ln||(Ln={})),function(e){e[e.Default=0]="Default",e[e.Modal=1]="Modal"}(On||(On={})),function(e){e[e.None=0]="None",e[e.AddToCart=1]="AddToCart",e[e.AddToCartAndShow=2]="AddToCartAndShow"}(In||(In={})),function(e){e[e.Invalid=0]="Invalid",e[e.Store=1]="Store",e[e.Community=2]="Community",e[e.Profile=3]="Profile",e[e.Friends=4]="Friends",e[e.News=5]="News",e[e.Trading=6]="Trading",e[e.Settings=7]="Settings",e[e.Console=8]="Console",e[e.Browser=9]="Browser",e[e.ParentalSetup=10]="ParentalSetup",e[e.Library=11]="Library",e[e.Test=12]="Test",e[e.SiteLicense=13]="SiteLicense",e[e.KioskMode=14]="KioskMode",e[e.Max=15]="Max"}(En||(En={})),function(e){e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e[e.Controller=2]="Controller",e[e.Max=3]="Max"}(Mn||(Mn={})),function(e){e[e.OK=1]="OK",e[e.Fail=2]="Fail",e[e.RequiresUI=3]="RequiresUI",e[e.RequiresLaunchOption=4]="RequiresLaunchOption",e[e.RequiresEULA=5]="RequiresEULA",e[e.Timeout=6]="Timeout",e[e.StreamTimeout=7]="StreamTimeout",e[e.StreamClientFail=8]="StreamClientFail",e[e.OtherGameRunning=9]="OtherGameRunning",e[e.DownloadStarted=10]="DownloadStarted",e[e.DownloadNoSpace=11]="DownloadNoSpace",e[e.DownloadFiltered=12]="DownloadFiltered",e[e.DownloadRequiresUI=13]="DownloadRequiresUI",e[e.AccessDenied=14]="AccessDenied",e[e.NetworkError=15]="NetworkError",e[e.Progress=16]="Progress",e[e.ParentalUnlockFailed=17]="ParentalUnlockFailed",e[e.ScreenLocked=18]="ScreenLocked",e[e.Unsupported=19]="Unsupported",e[e.DisabledLocal=20]="DisabledLocal",e[e.DisabledRemote=21]="DisabledRemote",e[e.Broadcasting=22]="Broadcasting",e[e.Busy=23]="Busy",e[e.DriversNotInstalled=24]="DriversNotInstalled",e[e.TransportUnavailable=25]="TransportUnavailable",e[e.Canceled=26]="Canceled",e[e.Invisible=27]="Invisible",e[e.RestrictedCountry=28]="RestrictedCountry",e[e.Unauthorized=29]="Unauthorized"}(Nn||(Nn={})),function(e){e[e.None=0]="None",e[e.Raw=1]="Raw",e[e.VP8=2]="VP8",e[e.VP9=3]="VP9",e[e.H264=4]="H264",e[e.HEVC=5]="HEVC",e[e.ORBX1=6]="ORBX1",e[e.ORBX2=7]="ORBX2",e[e.AV1=8]="AV1"}(xn||(xn={})),function(e){e[e.Default=0]="Default",e[e.Always=1]="Always"}(Un||(Un={})),function(e){e[e.Automatic=-1]="Automatic",e[e.Fast=1]="Fast",e[e.Balanced=2]="Balanced",e[e.Beautiful=3]="Beautiful"}(Gn||(Gn={})),function(e){e[e.Automatic=0]="Automatic",e[e.Disabled=1]="Disabled",e[e.OnlyMe=2]="OnlyMe",e[e.Friends=3]="Friends",e[e.Everyone=4]="Everyone"}(Bn||(Bn={})),function(e){e[e.All=0]="All",e[e.Secure=1]="Secure",e[e.NotSecure=2]="NotSecure"}(Wn||(Wn={})),function(e){e[e.All=0]="All",e[e.LessThan50=50]="LessThan50",e[e.LessThan100=100]="LessThan100",e[e.LessThan150=150]="LessThan150",e[e.LessThan250=250]="LessThan250"}(jn||(jn={})),function(e){e[e.PingFailed=-3]="PingFailed",e[e.Connecting=-2]="Connecting",e[e.Pinging=-1]="Pinging",e[e.None=0]="None",e[e.VACBanned=1]="VACBanned",e[e.ServerFull=2]="ServerFull",e[e.ModNotInstalled=3]="ModNotInstalled",e[e.AppNotFound=4]="AppNotFound",e[e.NotInitialized=5]="NotInitialized"}(Kn||(Kn={})),function(e){e[e.Invalid=-1]="Invalid",e[e.Private=2]="Private",e[e.FriendsOnly=4]="FriendsOnly",e[e.Public=8]="Public",e[e.Unlisted=16]="Unlisted"}(Hn||(Hn={})),function(e){e[e.EmailUnverified=0]="EmailUnverified",e[e.Protected=1]="Protected",e[e.Disabled=2]="Disabled",e[e.Offline=3]="Offline",e[e.NotEnabled=4]="NotEnabled"}(Xn||(Xn={})),function(e){e[e.None=-1]="None",e[e.English=0]="English",e[e.German=1]="German",e[e.French=2]="French",e[e.Italian=3]="Italian",e[e.Korean=4]="Korean",e[e.Spanish=5]="Spanish",e[e.SimplifiedChinese=6]="SimplifiedChinese",e[e.TraditionalChinese=7]="TraditionalChinese",e[e.Russian=8]="Russian",e[e.Thai=9]="Thai",e[e.Japanese=10]="Japanese",e[e.Portuguese=11]="Portuguese",e[e.Polish=12]="Polish",e[e.Danish=13]="Danish",e[e.Dutch=14]="Dutch",e[e.Finnish=15]="Finnish",e[e.Norwegian=16]="Norwegian",e[e.Swedish=17]="Swedish",e[e.Hungarian=18]="Hungarian",e[e.Czech=19]="Czech",e[e.Romanian=20]="Romanian",e[e.Turkish=21]="Turkish",e[e.Brazilian=22]="Brazilian",e[e.Bulgarian=23]="Bulgarian",e[e.Greek=24]="Greek",e[e.Arabic=25]="Arabic",e[e.Ukrainian=26]="Ukrainian",e[e.LatamSpanish=27]="LatamSpanish",e[e.Vietnamese=28]="Vietnamese",e[e.SteamChina_SChinese=29]="SteamChina_SChinese",e[e.Max=30]="Max"}(Jn||(Jn={})),function(e){e[e.None=0]="None",e[e.NoneChosen=1]="NoneChosen",e[e.NoneChosenNonAdmin=2]="NoneChosenNonAdmin",e[e.InBeta=3]="InBeta",e[e.InBetaNonAdmin=4]="InBetaNonAdmin"}(Vn||(Vn={})),function(e){e[e.BestQuality=0]="BestQuality",e[e.BestPerformance=1]="BestPerformance"}(Yn||(Yn={})),function(e){e[e.Disabled=0]="Disabled",e[e.FriendsApprove=1]="FriendsApprove",e[e.FriendsAllowed=2]="FriendsAllowed",e[e.Public=3]="Public",e[e.Subscribers=4]="Subscribers"}(qn||(qn={})),function(e){e[e.Default=0]="Default",e[e.H264=1]="H264",e[e.H265=2]="H265"}($n||($n={})),function(e){e[e.Game=0]="Game",e[e.System=1]="System",e[e.Select=2]="Select"}(zn||(zn={})),function(e){e[e.Native=0]="Nati