try{let e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`3c657883-6fe2-40ca-9a82-afe7a4dd7e54`,e._sentryDebugIdIdentifier=`sentry-dbid-3c657883-6fe2-40ca-9a82-afe7a4dd7e54`)}catch{}import{o as e}from"./rolldown-runtime-nx40z1zs.js";import{$m as t,Ag as n,Hm as r,am as i,im as a,jg as o,om as s}from"./entry.client-mpghtlrl.js";var c=e(o(),1),l=n(),u={XboxWirelessController:`controller_product_XboxWirelessController`,XboxEliteWirelessController2:`controller_product_XboxEliteWirelessController2`,XboxAdaptiveController:`controller_product_XboxAdaptiveController`,SCUFController:`controller_product_SCUFController`,DualSense:`controller_product_DualSense`,DualShock4:`controller_product_DualShock4`,StadiaController:`controller_product_StadiaController`,SwitchPro:`controller_product_SwitchPro`,LunaController:`controller_product_LunaController`,Xbox:`controller_xbox`,PlayStation:`controller_playstation`,Luna:`controller_luna`,Other:`controller_other`},d={[i.MSFT.Delphi]:u.XboxEliteWirelessController2,[i.MSFT.DelphiBluetoothClassic]:u.XboxEliteWirelessController2,[i.MSFT.DelphiBluetoothLE]:u.XboxEliteWirelessController2,[i.MSFT.Zephyrus]:u.XboxAdaptiveController,[i.MSFT.ZephyrusBluetoothClassic]:u.XboxAdaptiveController,[i.MSFT.ZephyrusBluetoothLE]:u.XboxAdaptiveController,[i.MSFT.Merlin]:u.XboxWirelessController,[i.MSFT.MerlinBT]:u.XboxWirelessController},f={[i.SCUF.SCUFMerlin]:u.SCUFController},p={[i.ThirdParty.DualSense]:u.DualSense,[i.ThirdParty.DualShock4v1]:u.DualShock4,[i.ThirdParty.DualShock4v2]:u.DualShock4},m={[s.Microsoft]:{products:d,fallback:u.Xbox},[s.SCUF]:{products:f,fallback:u.Other},[s.Sony]:{products:p,fallback:u.PlayStation},[s.Google]:{products:{[i.ThirdParty.Stadia]:u.StadiaController},fallback:u.Other},[s.Nintendo]:{products:{[i.ThirdParty.SwitchPro]:u.SwitchPro},fallback:u.Other},[s.Amazon]:{products:{[i.ThirdParty.Luna]:u.LunaController},fallback:u.Luna}},h=(e,t)=>{if(e==null)return u.Other;let n=m[e];return n?t!=null&&n.products?n.products[t]??n.fallback:n.fallback:u.Other},g=()=>{let{t:e}=t(`AccessoryDisplayName`);return(0,c.useMemo)(()=>({[u.XboxWirelessController]:e(`XBOX Wireless Controller`,{shortKey:`accessorydisplayname_controller_wireless_xbox_7e7f1c`}),[u.XboxEliteWirelessController2]:e(`XBOX Elite Wireless Controller Series 2`,{shortKey:`accessorydisplayname_controller_wireless_seri_5b60eb`}),[u.XboxAdaptiveController]:e(`XBOX Adaptive Controller`,{shortKey:`accessorydisplayname_controller_adaptive_xbox_722965`}),[u.SCUFController]:e(`SCUF Controller`,{shortKey:`accessorydisplayname_controller_scuf_3b55cf`}),[u.DualSense]:e(`DualSense Wireless Controller`,{shortKey:`accessorydisplayname_controller_dualsense_wir_5373b0`}),[u.DualShock4]:e(`DualShock 4 Wireless Controller`,{shortKey:`accessorydisplayname_controller_dualshock_wir_2adf41`}),[u.StadiaController]:e(`Stadia Controller`,{shortKey:`accessorydisplayname_controller_stadia_649a8c`}),[u.SwitchPro]:e(`Nintendo Switch Pro Controller`,{shortKey:`accessorydisplayname_controller_nintendo_swit_278582`}),[u.LunaController]:e(`Amazon Luna Controller`,{shortKey:`accessorydisplayname_controller_amazon_luna_15685c`}),[u.Xbox]:e(`XBOX Controller`,{shortKey:`controller_xbox`}),[u.PlayStation]:e(`PlayStation Controller`,{shortKey:`controller_playstation`}),[u.Luna]:e(`Amazon Luna Controller`,{shortKey:`controller_luna`}),[u.Other]:e(`Controller`,{shortKey:`controller_other`})}),[e])},_=(e,t,n)=>{let i=(0,l.c)(4),{locMouseAndKeyboard:o,locDevice:s}=r(),c=g();if(e===a.Category_KeyboardMouse||e===a.BrowserKeyboardMouse){let e;return i[0]===o?e=i[1]:(e=o(),i[0]=o,i[1]=e),e}if(e===a.Category_Gamepad||e===a.BrowserGamepad||e==null)return c[h(typeof t==`string`?parseInt(t,16):t,typeof n==`string`?parseInt(n,16):n)]??c.controller_other;let u;return i[2]===s?u=i[3]:(u=s(),i[2]=s,i[3]=u),u};export{_ as t};