{
  "CarChoices": [],
  "UseStrictJSIsolation": true,
  "EmbeddedJavascript": "const wheel_model = \"XF1U_Rev\";\r\n\r\nlet root = {\r\n\tbtn: false,\r\n\tdebounce: 0,\r\n\toldstate: undefined,\r\n\tnewstate: undefined,\r\n\ttriggerTime: null\r\n};\r\n\r\nfunction changed_maxTime_true (maxDuration, propertyValue) {\r\n\troot.oldstate ??= propertyValue;\r\n\tif (propertyValue !== root.oldstate) {\r\n\t\troot.oldstate = null;\r\n\t\troot.triggerTime = propertyValue ? Date.now() : null;\r\n\t}\r\n\treturn root.triggerTime !== null && Date.now() - root.triggerTime <= maxDuration;\r\n};\r\n\r\nfunction changed_maxTime_false (maxDuration, propertyValue) {\r\n\troot.oldstate ??= propertyValue;\r\n\tif (propertyValue !== root.oldstate) {\r\n\t\troot.oldstate = null;\r\n\t\troot.triggerTime = propertyValue ? null : Date.now();\r\n\t}\r\n\treturn root.triggerTime !== null && Date.now() - root.triggerTime <= maxDuration;\r\n};\r\n\r\n\r\nfunction changed_minTime (minDuration, propertyValue) {\r\n\tif (propertyValue) {\r\n\t\troot.triggerTime = Date.now();\r\n\t}\r\n\treturn Date.now() - root.triggerTime < minDuration;\r\n};\r\n\r\n\r\nfunction changed_maxTime (maxDuration, propertyValue) {\r\n\troot.oldstate = root.oldstate == null ? propertyValue : root.newstate;\r\n\troot.newstate = propertyValue;\r\n\tif (root.newstate !== root.oldstate) root.triggerTime = Date.now();\r\n\treturn root.triggerTime !== null && Date.now() - root.triggerTime <= maxDuration;\r\n};\r\n\r\n\r\nfunction Effect(buttonNumber, buttonState, type) {\r\n\r\n\tif(type == 0) _type = \"_WheelCustomGameEffectButton\";\r\n\tif(type == 1) _type = \"_WheelCustomGameEffectRotary\";\r\n\t\r\n    switch ($prop(`LeoxzPlugin.${wheel_model}${_type}${buttonNumber}`)) {\r\n\r\n        // No effect (Buttonstate)\r\n        case null:\r\n        case 0:\r\n            if (($prop(`LeoxzPlugin.${wheel_model}_WheelInputEffects`) ?? true) && changed_maxTime(300, buttonState)) {\r\n                if ((Math.floor(Date.now() / 100) % 2)) {\r\n                    return [$prop(`LeoxzPlugin.${wheel_model}_InputColour`)];\r\n                } else {\r\n                    return [null];\r\n                }\r\n            } else {\r\n                return [null];\r\n            }\r\n\r\n        // Headlights\r\n        case 1:\r\n            if ($prop('LeoxzPlugin.Lights') ?? true) {\r\n                if ($prop('LeoxzPlugin.LightsHighbeam') ?? true) {\r\n                    return [$prop(`LeoxzPlugin.${wheel_model}_HeadlightsColour1`)];\r\n                } else {\r\n                    return [$prop(`LeoxzPlugin.${wheel_model}_HeadlightsColour2`)];\r\n                }\r\n            } else {\r\n                return [null];\r\n            }\r\n\r\n        // Flasher\r\n        case 2:\r\n            if ($prop('LeoxzPlugin.Flash') ?? true) {\r\n                if ((Math.floor(Date.now() / 125) % 2)) {\r\n                    return [$prop(`LeoxzPlugin.${wheel_model}_HeadlightsFlashingColour`)];\r\n                } else {\r\n                    return ['#FF000000'];\r\n                }\r\n            } else {\r\n                return [null];\r\n            }\r\n\r\n        // Headlights & flasher\r\n        case 3:\r\n            if ($prop('LeoxzPlugin.Flash') ?? true) {\r\n                if ((Math.floor(Date.now() / 125) % 2)) {\r\n                    return [$prop(`LeoxzPlugin.${wheel_model}_HeadlightsFlashingColour`)];\r\n                } else {\r\n                    return ['#FF000000'];\r\n                }\r\n            } \r\n            if ($prop('LeoxzPlugin.Lights') ?? true) {\r\n                if ($prop('LeoxzPlugin.LightsHighbeam') ?? true) {\r\n                    return [$prop(`LeoxzPlugin.${wheel_model}_HeadlightsColour1`)];\r\n                } else {\r\n                    return [$prop(`LeoxzPlugin.${wheel_model}_HeadlightsColour2`)];\r\n                }\r\n            } \r\n            return [null];\r\n\r\n        // Rain Light\r\n        case 4:\r\n            if ($prop('LeoxzPlugin.RainLights') ?? true) {\r\n                if ((Math.floor(Date.now() / 500) % 2)) {\r\n                    return [$prop(`LeoxzPlugin.${wheel_model}_RainLightColour`)];\r\n                } else {\r\n                    return [null];\r\n                }\r\n            } else {\r\n                return [null];\r\n            }\r\n\r\n        // Left Indicator\r\n        case 5:\r\n\t\t\tif ($prop('TurnIndicatorLeft') == 1) {\r\n\t\t\t\tif ((Date.now() % 650) < 250) {\r\n\t\t\t\t\treturn [$prop(`LeoxzPlugin.${wheel_model}_LeftIndicatorFlashingColour1`)];\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn [$prop(`LeoxzPlugin.${wheel_model}_LeftIndicatorFlashingColour2`)];\r\n\t\t\t\t}\r\n\t\t\t}\r\n            return [null];\r\n\r\n        // Right Indicator\r\n        case 6:\r\n\t\t\tif ($prop('TurnIndicatorRight') == 1) {\r\n\t\t\t\tif ((Date.now() % 650) < 250) {\r\n\t\t\t\t\treturn [$prop(`LeoxzPlugin.${wheel_model}_RightIndicatorFlashingColour1`)];\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn [$prop(`LeoxzPlugin.${wheel_model}_RightIndicatorFlashingColour2`)];\r\n\t\t\t\t}\r\n\t\t\t}\r\n            return [null];\r\n\r\n        // Wipers\r\n        case 7:\r\n            if ($prop('LeoxzPlugin.Wipers') ?? true) {\r\n                return [$prop(`LeoxzPlugin.${wheel_model}_WipersColour`)];\r\n            } else {\r\n                return [null];\r\n            }\r\n\r\n        // Ignition\r\n        case 8:\r\n            if ($prop('EngineIgnitionOn') == 1) {\r\n                return [$prop(`LeoxzPlugin.${wheel_model}_IgnitionOnColour`)];\r\n            } else {\r\n                return [null];\r\n            }\r\n\r\n        // Engine Start & Ignition/Engine Start Combined\r\n        case 9:\r\n        case 10:\r\n            if ($prop('EngineIgnitionOn') == 1 && $prop('EngineStarted') == 0) {\r\n                if ((Math.floor(Date.now() / 750) % 2)) {\r\n                    return [$prop(`LeoxzPlugin.${wheel_model}_EngineOffColour`)];\r\n                } else {\r\n                    return ['#FF000000'];\r\n                }\r\n            }\r\n            if ($prop('EngineStarted') == 1) {\r\n                return [$prop(`LeoxzPlugin.${wheel_model}_EngineOnColour`)];\r\n            }\r\n            return [null];\r\n\r\n        // DRS\r\n        case 11:\r\n            if ($prop('DRSEnabled') == 1) {\r\n                return [$prop(`LeoxzPlugin.${wheel_model}_DRSEnabledColour`)];\r\n            }\r\n            if ($prop('DRSAvailable') == 1) {\r\n                return [$prop(`LeoxzPlugin.${wheel_model}_DRSAvailableColour`)];\r\n            }\r\n\r\n            return [null];\r\n\r\n        // KERS / ERS Lap Deploy Limit\r\n        case 12:\r\n            const KERS = $prop('LeoxzPlugin.KERS');\r\n            if (KERS > 50) return [$prop(`LeoxzPlugin.${wheel_model}_KersColour4`)];\r\n            if (KERS > 25 && KERS <= 50) return [$prop(`LeoxzPlugin.${wheel_model}_KersColour3`)];\r\n            if (KERS > 10 && KERS <= 25) return [$prop(`LeoxzPlugin.${wheel_model}_KersColour2`)];\r\n            if (KERS > 0 && KERS <= 10) return [$prop(`LeoxzPlugin.${wheel_model}_KersColour1`)];\r\n            return [null];\r\n\r\n        // P2P\r\n        case 13:\r\n            if ($prop('PushToPassActive')) {\r\n                return [$prop(`LeoxzPlugin.${wheel_model}_P2PColour`)];\r\n            } else {\r\n                return [null];\r\n            }\r\n\r\n        // Pit Limiter\r\n        case 14:\r\n            // Pitlane Entry warning\r\n            if ($prop('IsInPitLane') == 1 && $prop('SpeedKmh') > 1 && $prop('PitLimiterOn') == 0) {\r\n                if ((Math.floor(Date.now() / 125) % 2)) {\r\n                    return [$prop(`LeoxzPlugin.${wheel_model}_PitlaneEntryColour`)];\r\n                } else {\r\n                    return ['#FF000000'];\r\n                }\r\n            }\r\n            // Pitlane Exit warning\r\n            if (changed_maxTime_false(10000, $prop('IsInPitLane')) &&\r\n                $prop('IsInPitLane') == 0 &&\r\n                $prop('PitLimiterOn') == 1) {\r\n                if ((Math.floor(Date.now() / 125) % 2)) {\r\n                    return [$prop(`LeoxzPlugin.${wheel_model}_PitlaneExitColour`)];\r\n                } else {\r\n                    return ['#FF000000'];\r\n                }\r\n            }\r\n            // Limiter On\r\n            if ($prop('PitLimiterOn') == 1) {\r\n                return [$prop(`LeoxzPlugin.${wheel_model}_LimiterOnColour`)]; \r\n            }\r\n            return [null];\r\n\r\n\t\t// Engine Map\r\n\t\tcase 15:\r\n\t\t\treturn [$prop(`LeoxzPlugin.${wheel_model}_EngineMapColour`)];\r\n\r\n\t\t// Brake Balance\r\n\t\tcase 16:\r\n\t\t\treturn [$prop(`LeoxzPlugin.${wheel_model}_BrakeBiasColour`)];\r\n\r\n\r\n        // Momentary Press\r\n        case 17:\r\n            if (changed_minTime($prop(`LeoxzPlugin.${wheel_model}_WheelCustomGameEffectButtonPressDelay${buttonNumber}`)+1, buttonState)) {\r\n                return [$prop(`LeoxzPlugin.${wheel_model}_WheelCustomGameEffectButtonPress${buttonNumber}`)];\r\n            } else {\r\n                return [null];\r\n            }\r\n\r\n        // Latching Toggle\r\n        case 18:\r\n            if (root.btn == null) root.btn = false;\r\n            if (root.debouncestate == null) root.debouncestate = true;\r\n\r\n            if (buttonState) {\r\n                if (!root.debouncestate) {\r\n                    root.btn = !root.btn;\r\n                    root.debouncestate = true;\r\n                }\r\n            } else {\r\n                root.debouncestate = false;\r\n            }\r\n\r\n            if (root.btn) {\r\n                return [$prop(`LeoxzPlugin.${wheel_model}_WheelCustomGameEffectButtonToggle${buttonNumber}`)];\r\n            } else {\r\n                return [$prop(`LeoxzPlugin.${wheel_model}_WheelCustomGameEffectButtonPress${buttonNumber}`)];\r\n            }\r\n\r\n\t\t//ERS Mode\r\n\t\tcase 19:\r\n\t\t\tswitch ($prop('LeoxzPlugin.ERS_Mode')) {\r\n\t\t\t\t//No Deploy\r\n\t\t\t\tcase 0:\r\n\t\t\t\t\treturn [null];\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\treturn [$prop(`LeoxzPlugin.${wheel_model}_ERSNoDeployColour`)];\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\treturn [$prop(`LeoxzPlugin.${wheel_model}_ERSQualifyColour`)];\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\treturn [$prop(`LeoxzPlugin.${wheel_model}_ERSAttackColour`)];\r\n\t\t\t\tcase 4:\r\n\t\t\t\t\treturn [$prop(`LeoxzPlugin.${wheel_model}_ERSBalancedColour`)];\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\treturn [$prop(`LeoxzPlugin.${wheel_model}_ERSBuildColour`)];\r\n\t\t\t\tdefault:\r\n\t\t\t\t\treturn [null];\r\n\t\t\t}\r\n\t\t\r\n        // TC Active\r\n        case 20:\r\n            if ($prop('TCActive') == 1) {\r\n                return [$prop(`LeoxzPlugin.${wheel_model}_TractionControlColour`)];\r\n            } else {\r\n                return [null];\r\n            }\r\n\r\n        // ABS Active\r\n        case 21:\r\n            if ($prop('LeoxzPlugin.ABSActive') ?? true) {\r\n                return [$prop(`LeoxzPlugin.${wheel_model}_ABSColour`)];\r\n            } else {\r\n                return [null];\r\n            }\r\n\r\n        default:\r\n            return [null];\r\n    }\r\n};\r\n\r\n\r\n\r\n\r\nfunction WheelButtonEffectprocedure(buttonNumber, buttonState) {\r\n    return Effect(buttonNumber, buttonState, 0);\r\n};\r\n\r\n\r\n\r\nfunction WheelRotaryEffectprocedure(buttonNumber, buttonState) {\r\n    return Effect(buttonNumber, buttonState, 1);\r\n};\r\n\r\n",
  "GlobalBrightness": 100.0,
  "GlobalBrightnessPreset": {
    "CurrentMode": 0,
    "Brightness": 100.0,
    "BrightnessSettings": {
      "Day": 100.0,
      "Night": 100.0
    }
  },
  "LedContainers": [
    {
      "LedContainers": [
        {
          "TriggerFormula": {
            "JSExt": 0,
            "Interpreter": 1,
            "Expression": "return $prop('LeoxzPlugin.XF1U_Rev_WheelMenu');"
          },
          "LedContainers": [
            {
              "TriggerFormula": {
                "JSExt": 0,
                "Interpreter": 1,
                "Expression": "return $prop('LeoxzPlugin.XF1U_Rev_WheelMenuAnimation') == 1"
              },
              "LedContainers": [
                {
                  "ContentFormula": {
                    "JSExt": 0,
                    "Interpreter": 1,
                    "Expression": "const index = $prop('LeoxzPlugin.XF1U_Rev_WheelMenuColour');\r\n\r\nreturn [\r\n  $prop('LeoxzPlugin.XF1U_Rev_WheelCustomMenuColourButton' + index + '_1'),\r\n  $prop('LeoxzPlugin.XF1U_Rev_WheelCustomMenuColourButton' + index + '_2'),\r\n  $prop('LeoxzPlugin.XF1U_Rev_WheelCustomMenuColourButton' + index + '_3'),\r\n  $prop('LeoxzPlugin.XF1U_Rev_WheelCustomMenuColourButton' + index + '_4'),\r\n  $prop('LeoxzPlugin.XF1U_Rev_WheelCustomMenuColourButton' + index + '_5'),\r\n  $prop('LeoxzPlugin.XF1U_Rev_WheelCustomMenuColourButton' + index + '_6'),\r\n  $prop('LeoxzPlugin.XF1U_Rev_WheelCustomMenuColourButton' + index + '_7'),\r\n  $prop('LeoxzPlugin.XF1U_Rev_WheelCustomMenuColourButton' + index + '_8'),\r\n  $prop('LeoxzPlugin.XF1U_Rev_WheelCustomMenuColourButton' + index + '_9'),\r\n  $prop('LeoxzPlugin.XF1U_Rev_WheelCustomMenuColourButton' + index + '_10'),\r\n  $prop('LeoxzPlugin.XF1U_Rev_WheelCustomMenuColourButton' + index + '_11'),\r\n  $prop('LeoxzPlugin.XF1U_Rev_WheelCustomMenuColourButton' + index + '_12'),\r\n  $prop('LeoxzPlugin.XF1U_Rev_WheelCustomMenuColourButton' + index + '_13'),\r\n  $prop('LeoxzPlugin.XF1U_Rev_WheelCustomMenuColourButton' + index + '_14'),\r\n  $prop('LeoxzPlugin.XF1U_Rev_WheelCustomMenuColourButton' + index + '_15'),\r\n];\r\n\r\n"
                  },
                  "LedCount": 15,
                  "StartPosition": 4,
                  "ContainerType": "ScriptedContent",
                  "Description": ""
                }
              ],
              "ContainerType": "Groups.CustomConditionalGroup",
              "Description": "Static Rpms Function"
            },
            {
              "TriggerFormula": {
                "JSExt": 0,
                "Interpreter": 1,
                "Expression": "return $prop('LeoxzPlugin.XF1U_Rev_WheelMenuAnimation') == 2;"
              },
              "LedContainers": [
                {
                  "BreathDuration": 1250,
                  "StartBreathDuration": 100,
                  "EndBreathDuration": 100,
                  "BreathStartBrightness": 10,
                  "BreathEndBrightness": 100,
                  "LedContainers": [
                    {
                      "ContentFormula": {
                        "JSExt": 0,
                        "Interpreter": 1,
                        "Expression": "const index = $prop('LeoxzPlugin.XF1U_Rev_WheelMenuColour');\r\n\r\nreturn [\r\n  $prop('LeoxzPlugin.XF1U_Rev_WheelCustomMenuColourButton' + index + '_1'),\r\n  $prop('LeoxzPlugin.XF1U_Rev_WheelCustomMenuColourButton' + index + '_2'),\r\n  $prop('LeoxzPlugin.XF1U_Rev_WheelCustomMenuColourButton' + index + '_3'),\r\n  $prop('LeoxzPlugin.XF1U_Rev_WheelCustomMenuColourButton' + index + '_4'),\r\n  $prop('LeoxzPlugin.XF1U_Rev_WheelCustomMenuColourButton' + index + '_5'),\r\n  $prop('LeoxzPlugin.XF1U_Rev_WheelCustomMenuColourButton' + index + '_6'),\r\n  $prop('LeoxzPlugin.XF1U_Rev_WheelCustomMenuColourButton' + index + '_7'),\r\n  $prop('LeoxzPlugin.XF1U_Rev_WheelCustomMenuColourButton' + index + '_8'),\r\n  $prop('LeoxzPlugin.XF1U_Rev_WheelCustomMenuColourButton' + index + '_9'),\r\n  $prop('LeoxzPlugin.XF1U_Rev_WheelCustomMenuColourButton' + index + '_10'),\r\n  $prop('LeoxzPlugin.XF1U_Rev_WheelCustomMenuColourButton' + index + '_11'),\r\n  $prop('LeoxzPlugin.XF1U_Rev_WheelCustomMenuColourButton' + index + '_12'),\r\n  $prop('LeoxzPlugin.XF1U_Rev_WheelCustomMenuColourButton' + index + '_13'),\r\n  $prop('LeoxzPlugin.XF1U_Rev_WheelCustomMenuColourButton' + index + '_14'),\r\n  $prop('LeoxzPlugin.XF1U_Rev_WheelCustomMenuColourButton' + index + '_15'),\r\n];\r\n\r\n"
                      },
                      "LedCount": 15,
                      "StartPosition": 4,
                      "ContainerType": "ScriptedContent",
                      "Description": ""
                    }
                  ],
                  "ContainerType": "Groups.BreathGroup"
                }
              ],
              "ContainerType": "Groups.CustomConditionalGroup",
              "Description": "Breathing Rpms Function"
            }
          ],
          "ContainerType": "Groups.CustomConditionalGroup",
          "Description": ""
        }
      ],
      "ContainerType": "Groups.GameNotRunningGroup",
      "Description": ""
    },
    {
      "LedContainers": [
        {
          "TriggerFormula": {
            "JSExt": 0,
            "Interpreter": 1,
            "Expression": "return $prop('EngineIgnitionOn') == 1"
          },
          "LedContainers": [
            {
              "ContentFormula": {
                "JSExt": 0,
                "Interpreter": 1,
                "Expression": "const index = $prop('LeoxzPlugin.XF1U_Rev_WheelGameColour');\r\nconst rpm = $prop('DataCorePlugin.GameData.CarSettings_CurrentDisplayedRPMPercent');\r\n\r\nconst totalLights = 15;\r\nconst offColor = null; //'#000000';\r\n\r\nconst minRPM = $prop('LeoxzPlugin.XF1U_Rev_WheelRpmMinRange');\r\nconst maxRPM = $prop('LeoxzPlugin.XF1U_Rev_WheelRpmMaxRange');\r\n\r\nconst center_flag = $prop('LeoxzPlugin.XF1U_Rev_WheelRpmsMode');\r\n\r\nlet percent = ((rpm - minRPM) / (maxRPM - minRPM)) * 100;\r\npercent = Math.max(0, Math.min(100, percent));\r\n\r\nconst litCount = Math.round((percent / 100) * totalLights);\r\n\r\nconst litSet = new Set();\r\n\r\nif (center_flag == 2) {\r\n  const totalPairs = Math.floor(totalLights / 2); // = 7\r\n  const centerIndex = Math.ceil(totalLights / 2);  // = 8\r\n\r\n  const pairsLit = Math.min(totalPairs, Math.floor(litCount / 2));\r\n  for (let p = 0; p < pairsLit; p++) {\r\n    litSet.add(p + 1);\r\n    litSet.add(totalLights - p);\r\n  }\r\n\r\n  if (litCount >= totalLights) {\r\n    litSet.add(centerIndex);\r\n  }\r\n} else {\r\n  for (let i = 1; i <= litCount; i++) litSet.add(i);\r\n}\r\n\r\n\r\nconst baseColors = [];\r\nfor (let i = 1; i <= totalLights; i++) {\r\n  if (litSet.has(i)) {\r\n    baseColors.push($prop('LeoxzPlugin.XF1U_Rev_WheelCustomGameColourButton' + index + '_' + i));\r\n  } else {\r\n    baseColors.push(offColor);\r\n  }\r\n}\r\n\r\n\r\nconst redlineFlash = $prop('LeoxzPlugin.XF1U_Rev_WheelRedlineFlash');\r\nconst redlineBehaviour = $prop('LeoxzPlugin.XF1U_Rev_WheelRedlineBehaviour');\r\nconst redlineReached = $prop('DataCorePlugin.GameData.CarSettings_RPMRedLineReached');\r\nconst flashColour = $prop('LeoxzPlugin.XF1U_Rev_WheelRedlineFlashColour');\r\n\r\nlet colors = baseColors;\r\n\r\nif($prop(`LeoxzPlugin.XF1U_Rev_WheelGameThemeEffects${$prop('LeoxzPlugin.XF1U_Rev_WheelGameColour')}`) == true)\r\n{\r\n\tif (redlineFlash === true && redlineReached === 1) {\r\n\t  const flashInterval = 60;\r\n\t  const blinkOn = Math.floor(Date.now() / flashInterval) % 2 === 0;\r\n\t\r\n\t  if (redlineBehaviour == 2) {\r\n\t    colors = colors.map(() => blinkOn ? flashColour : offColor);\r\n\t  } else if (redlineBehaviour == 1) {\r\n\t    colors = baseColors.map(c => blinkOn ? c : offColor);\r\n\t  }\r\n\t}\r\n}\r\n\r\n\r\nreturn colors;"
              },
              "LedCount": 15,
              "StartPosition": 4,
              "ContainerType": "ScriptedContent",
              "Description": "Rpms Function"
            },
            {
              "TriggerFormula": {
                "JSExt": 0,
                "Interpreter": 1,
                "Expression": "return $prop(`LeoxzPlugin.XF1U_Rev_WheelGameThemeEffects${$prop('LeoxzPlugin.XF1U_Rev_WheelGameColour')}`);"
              },
              "LedContainers": [
                {
                  "LedContainers": [
                    {
                      "TriggerFormula": {
                        "JSExt": 0,
                        "Interpreter": 1,
                        "Expression": "return isnull($prop('LeoxzPlugin.XF1U_Rev_WheelEngineStartupAnimation'));"
                      },
                      "LedContainers": [
                        {
                          "Duration": 2400,
                          "LedContainers": [
                            {
                              "ContentFormula": {
                                "JSExt": 0,
                                "Interpreter": 1,
                                "Expression": "const totalLights = 21;\r\nconst offColor = '#000000';\r\nconst litColor = $prop('LeoxzPlugin.XF1U_Rev_EngineStartupAnimationColour');\r\nconst centerIndex = 11;\r\nconst groupSize = 3;\r\n\r\n\r\nconst stepInterval = 100;\r\n\r\n\r\nconst maxStep = (centerIndex - 1 - Math.floor(groupSize / 2)) - groupSize; // = 6\r\nconst moveSteps = maxStep + 1;\r\n\r\n\r\nconst totalCycleSteps = moveSteps + 1;\r\n\r\nconst rawStep = Math.floor(Date.now() / stepInterval);\r\nconst cyclePos = rawStep % totalCycleSteps;\r\n\r\nconst litSet = new Set();\r\n\r\nif (cyclePos < moveSteps) {\r\n  const step = cyclePos;\r\n  const leftPositions = [];\r\n  for (let g = 0; g < groupSize; g++) {\r\n    leftPositions.push(1 + g + step);\r\n  }\r\n  const rightPositions = leftPositions.map(p => totalLights + 1 - p);\r\n  leftPositions.forEach(p => litSet.add(p));\r\n  rightPositions.forEach(p => litSet.add(p));\r\n} else {\r\n  const half = Math.floor(groupSize / 2);\r\n  for (let g = -half; g <= half; g++) {\r\n    litSet.add(centerIndex + g); // 10, 11, 12\r\n  }\r\n}\r\n\r\nconst colors = [];\r\nfor (let i = 1; i <= totalLights; i++) {\r\n  colors.push(litSet.has(i) ? litColor : offColor);\r\n}\r\n\r\nreturn colors;"
                              },
                              "LedCount": 21,
                              "ContainerType": "ScriptedContent",
                              "Description": "Engine Startup animation"
                            }
                          ],
                          "ContainerType": "Groups.GameCarStatedGroup"
                        }
                      ],
                      "ContainerType": "Groups.CustomConditionalGroup",
                      "Description": "Engine Startup animation"
                    },
                    {
                      "TriggerFormula": {
                        "JSExt": 0,
                        "Interpreter": 1,
                        "Expression": "return $prop('LeoxzPlugin.XF1U_Rev_WheelSpotters') == true;"
                      },
                      "LedContainers": [
                        {
                          "TriggerFormula": {
                            "JSExt": 0,
                            "Interpreter": 1,
                            "Expression": "return $prop('SpotterCarLeft') == 1;"
                          },
                          "LedContainers": [
                            {
                              "TriggerFormula": {
                                "JSExt": 0,
                                "Interpreter": 1,
                                "Expression": "return ($prop('SpotterCarLeftDistance') > 5) || ($prop('DataCorePlugin.CurrentGame') == 'IRacing');"
                              },
                              "LedContainers": [
                                {
                                  "ContentFormula": {
                                    "JSExt": 0,
                                    "Interpreter": 1,
                                    "Expression": "const flashColor = $prop('LeoxzPlugin.XF1U_Rev_ProximitySpottersColour');\r\nconst offColor = '#000000';\r\n\r\nconst flashInterval = 300;\r\n\r\nconst onColors = Array(3).fill(flashColor);\r\nconst offColors = Array(3).fill(offColor);\r\n\r\nconst blinkOn = Math.floor(Date.now() / flashInterval) % 2 === 0;\r\n\r\nreturn blinkOn ? onColors : offColors;"
                                  },
                                  "LedCount": 3,
                                  "ContainerType": "ScriptedContent",
                                  "Description": ""
                                }
                              ],
                              "ContainerType": "Groups.CustomConditionalGroup",
                              "Description": "Spotter Car Left (Far)"
                            },
                            {
                              "TriggerFormula": {
                                "JSExt": 0,
                                "Interpreter": 1,
                                "Expression": "return ($prop('SpotterCarLeftDistance') <= 5) &&! ($prop('DataCorePlugin.CurrentGame') == 'IRacing');"
                              },
                              "LedContainers": [
                                {
                                  "ContentFormula": {
                                    "JSExt": 0,
                                    "Interpreter": 1,
                                    "Expression": "const flashColor = $prop('LeoxzPlugin.XF1U_Rev_ProximitySpottersColour');\r\nconst offColor = '#000000';\r\n\r\nconst flashInterval = 100;\r\n\r\nconst onColors = Array(3).fill(flashColor);\r\nconst offColors = Array(3).fill(offColor);\r\n\r\nconst blinkOn = Math.floor(Date.now() / flashInterval) % 2 === 0;\r\n\r\nreturn blinkOn ? onColors : offColors;"
                                  },
                                  "LedCount": 3,
                                  "ContainerType": "ScriptedContent",
                                  "Description": ""
                                }
                              ],
                              "ContainerType": "Groups.CustomConditionalGroup",
                              "Description": "Spotter Car Left (Close)"
                            }
                          ],
                          "ContainerType": "Groups.CustomConditionalGroup",
                          "Description": "Spotter Left"
                        },
                        {
                          "TriggerFormula": {
                            "JSExt": 0,
                            "Interpreter": 1,
                            "Expression": "return $prop('SpotterCarRight') == 1;"
                          },
                          "LedContainers": [
                            {
                              "TriggerFormula": {
                                "JSExt": 0,
                                "Interpreter": 1,
                                "Expression": "return ($prop('SpotterCarRightDistance') > 5) || ($prop('DataCorePlugin.CurrentGame') == 'IRacing');"
                              },
                              "LedContainers": [
                                {
                                  "ContentFormula": {
                                    "JSExt": 0,
                                    "Interpreter": 1,
                                    "Expression": "const flashColor = $prop('LeoxzPlugin.XF1U_Rev_ProximitySpottersColour');\r\nconst offColor = '#000000';\r\n\r\nconst flashInterval = 300;\r\n\r\nconst onColors = Array(3).fill(flashColor);\r\nconst offColors = Array(3).fill(offColor);\r\n\r\nconst blinkOn = Math.floor(Date.now() / flashInterval) % 2 === 0;\r\n\r\nreturn blinkOn ? onColors : offColors;"
                                  },
                                  "LedCount": 3,
                                  "StartPosition": 19,
                                  "ContainerType": "ScriptedContent",
                                  "Description": ""
                                }
                              ],
                              "ContainerType": "Groups.CustomConditionalGroup",
                              "Description": "Spotter Car Right (Far)"
                            },
                            {
                              "TriggerFormula": {
                                "JSExt": 0,
                                "Interpreter": 1,
                                "Expression": "return ($prop('SpotterCarRightDistance') <= 5) &&! ($prop('DataCorePlugin.CurrentGame') == 'IRacing');"
                              },
                              "LedContainers": [
                                {
                                  "ContentFormula": {
                                    "JSExt": 0,
                                    "Interpreter": 1,
                                    "Expression": "const flashColor = $prop('LeoxzPlugin.XF1U_Rev_ProximitySpottersColour');\r\nconst offColor = '#000000';\r\n\r\nconst flashInterval = 100;\r\n\r\nconst onColors = Array(3).fill(flashColor);\r\nconst offColors = Array(3).fill(offColor);\r\n\r\nconst blinkOn = Math.floor(Date.now() / flashInterval) % 2 === 0;\r\n\r\nreturn blinkOn ? onColors : offColors;"
                                  },
                                  "LedCount": 3,
                                  "StartPosition": 19,
                                  "ContainerType": "ScriptedContent",
                                  "Description": ""
                                }
                              ],
                              "ContainerType": "Groups.CustomConditionalGroup",
                              "Description": "Spotter Car Right (Close)"
                            }
                          ],
                          "ContainerType": "Groups.CustomConditionalGroup",
                          "Description": "Spotter Right"
                        }
                      ],
                      "ContainerType": "Groups.CustomConditionalGroup",
                      "Description": "Proximity Spotter"
                    },
                    {
                      "TriggerFormula": {
                        "JSExt": 0,
                        "Interpreter": 1,
                        "Expression": "return $prop('LeoxzPlugin.XF1U_Rev_WheelPitLimiter') == true;"
                      },
                      "LedContainers": [
                        {
                          "TriggerFormula": {
                            "JSExt": 0,
                            "Interpreter": 1,
                            "Expression": "return $prop('DataCorePlugin.GameData.IsInPitLane') == 1;"
                          },
                          "LedContainers": [
                            {
                              "ContentFormula": {
                                "JSExt": 4,
                                "Interpreter": 1,
                                "Expression": "const PitLimiter_Hex1 = $prop('LeoxzPlugin.XF1U_Rev_PitLimiterColour1');\r\nconst PitLimiter_Hex2 = $prop('LeoxzPlugin.XF1U_Rev_PitLimiterColour2');\r\n\r\nconst totalLights = 15;\r\nconst centerIndex = 8;\r\nconst groupSize = 3;\r\n\r\n\r\nconst stepInterval = 60;\r\n\r\n\r\nconst maxStep = centerIndex - groupSize;\r\nconst moveSteps = maxStep + 1;\r\n\r\n\r\nconst totalCycleSteps = moveSteps * 2;\r\n\r\nconst rawStep = Math.floor(Date.now() / stepInterval);\r\nconst cyclePos = rawStep % totalCycleSteps;\r\n\r\n\r\nlet step;\r\nif (cyclePos < moveSteps) {\r\n  step = cyclePos; \r\n} else {\r\n  step = totalCycleSteps - cyclePos; \r\n}\r\n\r\n\r\nconst leftPositions = [];\r\nfor (let g = 0; g < groupSize; g++) {\r\n  leftPositions.push(1 + g + step);\r\n}\r\n\r\nconst rightPositions = leftPositions.map(p => totalLights + 1 - p);\r\n\r\nconst litSet = new Set([...leftPositions, ...rightPositions]);\r\n\r\nconst colors = [];\r\nfor (let i = 1; i <= totalLights; i++) {\r\n  colors.push(litSet.has(i) ? PitLimiter_Hex2 : PitLimiter_Hex1);\r\n}\r\n\r\nreturn colors;",
                                "PreExpression": "const animationCycleTime = 1000;\r\nconst ledCount = 8;"
                              },
                              "LedCount": 15,
                              "StartPosition": 4,
                              "ContainerType": "ScriptedContent",
                              "Description": ""
                            }
                          ],
                          "ContainerType": "Groups.CustomConditionalGroup",
                          "Description": "Pit Lane Effects"
                        }
                      ],
                      "ContainerType": "Groups.CustomConditionalGroup",
                      "Description": "Pit Lane Effects"
                    },
                    {
                      "TriggerFormula": {
                        "JSExt": 4,
                        "Interpreter": 1,
                        "Expression": "return $prop('LeoxzPlugin.XF1U_Rev_HeadlightsFlashingEnable') == true;"
                      },
                      "LedContainers": [
                        {
                          "TriggerFormula": {
                            "JSExt": 0,
                            "Interpreter": 1,
                            "Expression": "return $prop('LeoxzPlugin.Flash') == true;"
                          },
                          "LedContainers": [
                            {
                              "TotalWidth": 21,
                              "LedContainers": [
                                {
                                  "ContentFormula": {
                                    "JSExt": 0,
                                    "Interpreter": 1,
                                    "Expression": "const flashColor = $prop('LeoxzPlugin.XF1U_Rev_HeadlightsFlashingColour');\r\nconst offColor = '#000000';\r\n\r\nconst flashInterval = 100;\r\n\r\nconst onColors = Array(3).fill(flashColor);\r\nconst offColors = Array(3).fill(offColor);\r\n\r\nconst blinkOn = Math.floor(Date.now() / flashInterval) % 2 === 0;\r\n\r\nreturn blinkOn ? onColors : offColors;"
                                  },
                                  "LedCount": 3,
                                  "ContainerType": "ScriptedContent",
                                  "Description": ""
                                }
                              ],
                              "ContainerType": "Groups.MirrorGroup"
                            }
                          ],
                          "ContainerType": "Groups.CustomConditionalGroup"
                        }
                      ],
                      "ContainerType": "Groups.CustomConditionalGroup",
                      "Description": "Headlight Flashing"
                    },
                    {
                      "TriggerFormula": {
                        "JSExt": 0,
                        "Interpreter": 1,
                        "Expression": "return $prop('LeoxzPlugin.XF1U_Rev_IndicatorFlashingEnable') == true;"
                      },
                      "LedContainers": [
                        {
                          "TriggerFormula": {
                            "JSExt": 0,
                            "Interpreter": 1,
                            "Expression": "return $prop('DataCorePlugin.GameData.TurnIndicatorLeft') == 1;"
                          },
                          "LedContainers": [
                            {
                              "ContentFormula": {
                                "JSExt": 0,
                                "Interpreter": 1,
                                "Expression": "const flashColor = $prop('LeoxzPlugin.XF1U_Rev_LeftIndicatorFlashingColour1');\r\nconst offColor = $prop('LeoxzPlugin.XF1U_Rev_LeftIndicatorFlashingColour2');\r\n\r\nconst flashInterval = 300;\r\n\r\nconst onColors = Array(1).fill(flashColor);\r\nconst offColors = Array(1).fill(offColor);\r\n\r\nconst blinkOn = Math.floor(Date.now() / flashInterval) % 2 === 0;\r\n\r\nreturn blinkOn ? onColors : offColors;"
                              },
                              "LedCount": 1,
                              "StartPosition": 2,
                              "ContainerType": "ScriptedContent",
                              "Description": ""
                            }
                          ],
                          "ContainerType": "Groups.CustomConditionalGroup",
                          "Description": "Left Indicators Flashing"
                        },
                        {
                          "TriggerFormula": {
                            "JSExt": 0,
                            "Interpreter": 1,
                            "Expression": "return $prop('DataCorePlugin.GameData.TurnIndicatorRight') == 1;"
                          },
                          "LedContainers": [
                            {
                              "ContentFormula": {
                                "JSExt": 0,
                                "Interpreter": 1,
                                "Expression": "const flashColor = $prop('LeoxzPlugin.XF1U_Rev_LeftIndicatorFlashingColour1');\r\nconst offColor = $prop('LeoxzPlugin.XF1U_Rev_LeftIndicatorFlashingColour2');\r\n\r\nconst flashInterval = 300;\r\n\r\nconst onColors = Array(1).fill(flashColor);\r\nconst offColors = Array(1).fill(offColor);\r\n\r\nconst blinkOn = Math.floor(Date.now() / flashInterval) % 2 === 0;\r\n\r\nreturn blinkOn ? onColors : offColors;"
                              },
                              "LedCount": 1,
                              "StartPosition": 20,
                              "ContainerType": "ScriptedContent",
                              "Description": " "
                            }
                          ],
                          "ContainerType": "Groups.CustomConditionalGroup",
                          "Description": "Right Indicators Flashing"
                        }
                      ],
                      "ContainerType": "Groups.CustomConditionalGroup",
                      "Description": "Indicators Flashing"
                    },
                    {
                      "TriggerFormula": {
                        "JSExt": 0,
                        "Interpreter": 1,
                        "Expression": "return $prop('LeoxzPlugin.XF1U_Rev_LowFuelEnable') == true;"
                      },
                      "LedContainers": [
                        {
                          "TriggerFormula": {
                            "JSExt": 0,
                            "Interpreter": 1,
                            "Expression": "\r\nreturn $prop('DataCorePlugin.GameData.FuelPercent') < 20;"
                          },
                          "LedContainers": [
                            {
                              "TotalWidth": 21,
                              "LedContainers": [
                                {
                                  "ContentFormula": {
                                    "JSExt": 0,
                                    "Interpreter": 1,
                                    "Expression": "const LowFuelColour = $prop('LeoxzPlugin.XF1U_Rev_LowFuelColour');\r\nconst offColor = '#000000';\r\n\r\nconst totalLights = 3;\r\nconst stepInterval = 100;\r\n\r\nconst rawStep = Math.floor(Date.now() / stepInterval);\r\nconst activeIndex = rawStep % totalLights;\r\n\r\nconst colors = [];\r\nfor (let i = 0; i < totalLights; i++) {\r\n  colors.push(i === activeIndex ? LowFuelColour : offColor);\r\n}\r\n\r\nreturn colors;"
                                  },
                                  "LedCount": 3,
                                  "ContainerType": "ScriptedContent",
                                  "Description": ""
                                }
                              ],
                              "ContainerType": "Groups.MirrorGroup"
                            }
                          ],
                          "ContainerType": "Groups.CustomConditionalGroup"
                        }
                      ],
                      "ContainerType": "Groups.CustomConditionalGroup",
                      "Description": "Low Fuel"
                    },
                    {
                      "TriggerFormula": {
                        "JSExt": 0,
                        "Interpreter": 1,
                        "Expression": "return isnull($prop('LeoxzPlugin.XF1U_Rev_DRSEnable'));"
                      },
                      "LedContainers": [
                        {
                          "ContentFormula": {
                            "JSExt": 0,
                            "Interpreter": 1,
                            "Expression": "if ($prop('DataCorePlugin.GameData.DRSEnabled') == 1) {\r\n    return [$prop('LeoxzPlugin.XF1U_Rev_DRSEnabledColour')];\r\n}\r\nif ($prop('DataCorePlugin.GameData.DRSAvailable') == 1) {\r\n    return [$prop('LeoxzPlugin.XF1U_Rev_DRSAvailableColour')];\r\n}\r\nreturn [null];"
                          },
                          "LedCount": 1,
                          "StartPosition": 3,
                          "ContainerType": "ScriptedContent",
                          "Description": ""
                        }
                      ],
                      "ContainerType": "Groups.CustomConditionalGroup",
                      "Description": "DRS"
                    },
                    {
                      "TriggerFormula": {
                        "JSExt": 0,
                        "Interpreter": 1,
                        "Expression": "return isnull($prop('LeoxzPlugin.XF1U_Rev_LimiterOnEnable'));"
                      },
                      "LedContainers": [
                        {
                          "TriggerFormula": {
                            "JSExt": 0,
                            "Interpreter": 1,
                            "Expression": "return $prop('DataCorePlugin.GameData.PitLimiterOn') == 1;"
                          },
                          "LedContainers": [
                            {
                              "ContentFormula": {
                                "JSExt": 0,
                                "Interpreter": 1,
                                "Expression": "const LimiterOnColour = $prop('LeoxzPlugin.XF1U_Rev_LimiterOnColour');\r\nconst offColor = '#FFFFFF';\r\n\r\nconst totalLights = 15;\r\nconst stepInterval = 300; // 每一步间隔（毫秒），数值越小切换越快\r\n\r\nconst rawStep = Math.floor(Date.now() / stepInterval);\r\nconst isOddFrame = rawStep % 2 === 0; // 用来在两套图案间切换\r\n\r\nconst colors = [];\r\nfor (let i = 0; i < totalLights; i++) {\r\n  // isOddFrame为true时：0,2,4...(即第1,3,5...颗)亮\r\n  // isOddFrame为false时：1,3,5...(即第2,4,6...颗)亮\r\n  const isLit = isOddFrame ? (i % 2 === 0) : (i % 2 === 1);\r\n  colors.push(isLit ? LimiterOnColour : offColor);\r\n}\r\n\r\nreturn colors;"
                              },
                              "LedCount": 15,
                              "StartPosition": 4,
                              "ContainerType": "ScriptedContent",
                              "Description": ""
                            }
                          ],
                          "ContainerType": "Groups.CustomConditionalGroup",
                          "Description": "PitLimiter On"
                        }
                      ],
                      "ContainerType": "Groups.CustomConditionalGroup",
                      "Description": "Limiter On"
                    },
                    {
                      "TriggerFormula": {
                        "JSExt": 0,
                        "Interpreter": 1,
                        "Expression": "return isnull($prop('LeoxzPlugin.XF1U_Rev_TractionControlEnable'));"
                      },
                      "LedContainers": [
                        {
                          "TriggerFormula": {
                            "JSExt": 0,
                            "Interpreter": 1,
                            "Expression": "return $prop('DataCorePlugin.GameData.TCActive') == 1;"
                          },
                          "LedContainers": [
                            {
                              "TotalWidth": 21,
                              "LedContainers": [
                                {
                                  "ContentFormula": {
                                    "JSExt": 0,
                                    "Interpreter": 1,
                                    "Expression": "\r\nreturn [$prop('LeoxzPlugin.XF1U_Rev_TractionControlColour')];\r\n\r\n"
                                  },
                                  "LedCount": 1,
                                  "StartPosition": 2,
                                  "ContainerType": "ScriptedContent",
                                  "Description": "TC"
                                }
                              ],
                              "ContainerType": "Groups.MirrorGroup"
                            }
                          ],
                          "ContainerType": "Groups.CustomConditionalGroup",
                          "Description": "Enable content based on a custom formula copy"
                        }
                      ],
                      "ContainerType": "Groups.CustomConditionalGroup",
                      "Description": "TC Active"
                    },
                    {
                      "TriggerFormula": {
                        "JSExt": 0,
                        "Interpreter": 1,
                        "Expression": "return isnull($prop('LeoxzPlugin.XF1U_Rev_ABSEnable'));"
                      },
                      "LedContainers": [
                        {
                          "TriggerFormula": {
                            "JSExt": 0,
                            "Interpreter": 1,
                            "Expression": "return $prop('DataCorePlugin.GameData.ABSActive') == 1;"
                          },
                          "LedContainers": [
                            {
                              "TotalWidth": 21,
                              "LedContainers": [
                                {
                                  "ContentFormula": {
                                    "JSExt": 0,
                                    "Interpreter": 1,
                                    "Expression": "return [$prop('LeoxzPlugin.XF1U_Rev_ABSColour')];\r\n"
                                  },
                                  "LedCount": 1,
                                  "StartPosition": 2,
                                  "ContainerType": "ScriptedContent",
                                  "Description": "ABS"
                                }
                              ],
                              "ContainerType": "Groups.MirrorGroup"
                            }
                          ],
                          "ContainerType": "Groups.CustomConditionalGroup",
                          "Description": "Enable content based on a custom formula copy"
                        }
                      ],
                      "ContainerType": "Groups.CustomConditionalGroup",
                      "Description": "ABS Active"
                    }
                  ],
                  "ContainerType": "Base.Group",
                  "Description": "General Game effects"
                },
                {
                  "TriggerFormula": {
                    "JSExt": 0,
                    "Interpreter": 1,
                    "Expression": "return $prop('LeoxzPlugin.XF1U_Rev_WheelFlags') == true;"
                  },
                  "LedContainers": [
                    {
                      "TriggerFormula": {
                        "JSExt": 4,
                        "Interpreter": 1,
                        "Expression": "return changed_maxTime_true(1000, $prop('Flag_Checkered') == 1);\r\n"
                      },
                      "LedContainers": [
                        {
                          "TotalWidth": 21,
                          "LedContainers": [
                            {
                              "Animation": {
                                "Columns": 3,
                                "Rows": 1,
                                "Frames": [
                                  {
                                    "Colors": "0,0,White;0,1,#F0F8FF;0,2,#000000",
                                    "FrameDuration": 300
                                  },
                                  {
                                    "Colors": "0,0,Black;0,1,White;0,2,#F0F8FF",
                                    "FrameDuration": 300
                                  }
                                ],
                                "PenColor": "Black"
                              },
                              "ContainerType": "Animation"
                            }
                          ],
                          "ContainerType": "Groups.MirrorGroup"
                        }
                      ],
                      "ContainerType": "Groups.CustomConditionalGroup",
                      "Description": "Checkered Flag"
                    },
                    {
                      "TriggerFormula": {
                        "JSExt": 0,
                        "Interpreter": 1,
                        "Expression": "return $prop('Flag_Green') == 1;"
                      },
                      "LedContainers": [
                        {
                          "TotalWidth": 21,
                          "LedContainers": [
                            {
                              "Animation": {
                                "Columns": 3,
                                "Rows": 1,
                                "Frames": [
                                  {
                                    "Colors": "0,0,Lime;0,1,Lime;0,2,Lime",
                                    "FrameDuration": 300
                                  },
                                  {
                                    "Colors": "0,0,Black;0,1,Black;0,2,Black",
                                    "FrameDuration": 300
                                  }
                                ],
                                "PenColor": "Black"
                              },
                              "ContainerType": "Animation"
                            }
                          ],
                          "ContainerType": "Groups.MirrorGroup"
                        }
                      ],
                      "ContainerType": "Groups.CustomConditionalGroup",
                      "Description": "Green Flag"
                    },
                    {
                      "TriggerFormula": {
                        "JSExt": 0,
                        "Interpreter": 1,
                        "Expression": "return $prop('Flag_Blue') == 1 && $prop('SpotterCarLeft') == 0 && $prop('SpotterCarRight') == 0;"
                      },
                      "LedContainers": [
                        {
                          "TotalWidth": 21,
                          "LedContainers": [
                            {
                              "Animation": {
                                "Columns": 3,
                                "Rows": 1,
                                "Frames": [
                                  {
                                    "Colors": "0,0,Blue;0,1,Blue;0,2,Blue",
                                    "FrameDuration": 300
                                  },
                                  {
                                    "Colors": "0,0,Black;0,1,Black;0,2,Black",
                                    "FrameDuration": 300
                                  }
                                ],
                                "PenColor": "Blue"
                              },
                              "ContainerType": "Animation"
                            }
                          ],
                          "ContainerType": "Groups.MirrorGroup"
                        }
                      ],
                      "ContainerType": "Groups.CustomConditionalGroup",
                      "Description": "Blue Flag"
                    },
                    {
                      "TriggerFormula": {
                        "JSExt": 0,
                        "Interpreter": 1,
                        "Expression": "return $prop('Flag_Orange') == 1;"
                      },
                      "LedContainers": [
                        {
                          "TotalWidth": 21,
                          "LedContainers": [
                            {
                              "Animation": {
                                "Columns": 3,
                                "Rows": 1,
                                "Frames": [
                                  {
                                    "Colors": "0,0,DarkOrange;0,1,DarkOrange;0,2,DarkOrange",
                                    "FrameDuration": 300
                                  },
                                  {
                                    "Colors": "0,0,Black;0,1,Black;0,2,Black",
                                    "FrameDuration": 300
                                  }
                                ],
                                "PenColor": "DarkOrange"
                              },
                              "ContainerType": "Animation"
                            }
                          ],
                          "ContainerType": "Groups.MirrorGroup"
                        }
                      ],
                      "ContainerType": "Groups.CustomConditionalGroup",
                      "Description": "Orange Flag"
                    },
                    {
                      "TriggerFormula": {
                        "JSExt": 4,
                        "Interpreter": 1,
                        "Expression": "return $prop('Flag_White') == 1;"
                      },
                      "LedContainers": [
                        {
                          "TotalWidth": 21,
                          "LedContainers": [
                            {
                              "Animation": {
                                "Columns": 3,
                                "Rows": 1,
                                "Frames": [
                                  {
                                    "Colors": "0,0,White;0,1,White;0,2,White",
                                    "FrameDuration": 300
                                  },
                                  {
                                    "Colors": "0,0,Black;0,1,Black;0,2,Black",
                                    "FrameDuration": 300
                                  }
                                ],
                                "PenColor": "White"
                              },
                              "ContainerType": "Animation"
                            }
                          ],
                          "ContainerType": "Groups.MirrorGroup"
                        }
                      ],
                      "ContainerType": "Groups.CustomConditionalGroup",
                      "Description": "White Flag"
                    },
                    {
                      "TriggerFormula": {
                        "JSExt": 0,
                        "Interpreter": 1,
                        "Expression": "return $prop('Flag_Yellow') == 1;"
                      },
                      "LedContainers": [
                        {
                          "TotalWidth": 21,
                          "LedContainers": [
                            {
                              "Animation": {
                                "Columns": 3,
                                "Rows": 1,
                                "Frames": [
                                  {
                                    "Colors": "0,0,Yellow;0,1,Yellow;0,2,Yellow",
                                    "FrameDuration": 300
                                  },
                                  {
                                    "Colors": "0,0,Black;0,1,Black;0,2,Black",
                                    "FrameDuration": 300
                                  }
                                ],
                                "PenColor": "Black"
                              },
                              "ContainerType": "Animation"
                            }
                          ],
                          "ContainerType": "Groups.MirrorGroup"
                        }
                      ],
                      "ContainerType": "Groups.CustomConditionalGroup",
                      "Description": "Yellow Flag"
                    },
                    {
                      "TriggerFormula": {
                        "JSExt": 4,
                        "Interpreter": 1,
                        "Expression": "const f1Games = ['F12030', 'F12029', 'F12028', 'F12027', 'F12026', 'F12025', 'F12024', 'F12023', 'F12022', 'F12021'];\r\n\r\nlet game = $prop('DataCorePlugin.CurrentGame');\r\n\r\nreturn (\r\n    (f1Games.includes(game) && (($prop('DataCorePlugin.GameRawData.PacketSessionData.m_safetyCarStatus') ?? 0) != 0)) ||\r\n    (game == 'IRacing' && $prop('GameRawData.Telemetry.SessionFlagsDetails.IscautionWaving')) ||\r\n    (game == 'LMU' && (($prop('GameRawData.rules.mTrackRules.mSafetyCarActive') ?? 0) != 0))\r\n);\r\n"
                      },
                      "LedContainers": [
                        {
                          "TotalWidth": 21,
                          "LedContainers": [
                            {
                              "Animation": {
                                "Columns": 3,
                                "Rows": 1,
                                "Frames": [
                                  {
                                    "Colors": "0,0,Yellow;0,1,Black;0,2,Yellow",
                                    "FrameDuration": 300
                                  },
                                  {
                                    "Colors": "0,0,Black;0,1,Yellow;0,2,Black",
                                    "FrameDuration": 300
                                  }
                                ],
                                "PenColor": "Yellow"
                              },
                              "ContainerType": "Animation"
                            }
                          ],
                          "ContainerType": "Groups.MirrorGroup"
                        }
                      ],
                      "ContainerType": "Groups.CustomConditionalGroup",
                      "Description": "Virtual Safety Car & Safety Car"
                    },
                    {
                      "TriggerFormula": {
                        "JSExt": 0,
                        "Interpreter": 1,
                        "Expression": "return $prop('Flag_Black') == 1;"
                      },
                      "LedContainers": [
                        {
                          "TotalWidth": 21,
                          "LedContainers": [
                            {
                              "Animation": {
                                "Columns": 3,
                                "Rows": 1,
                                "Frames": [
                                  {
                                    "Colors": "0,0,Black;0,1,#FFFFFF;0,2,Black",
                                    "FrameDuration": 300
                                  },
                                  {
                                    "Colors": "0,0,#FFFFFF;0,1,Black;0,2,#FFFFFF",
                                    "FrameDuration": 300
                                  }
                                ],
                                "PenColor": "White"
                              },
                              "ContainerType": "Animation"
                            }
                          ],
                          "ContainerType": "Groups.MirrorGroup"
                        }
                      ],
                      "ContainerType": "Groups.CustomConditionalGroup",
                      "Description": "Black Flag"
                    },
                    {
                      "TriggerFormula": {
                        "JSExt": 4,
                        "Interpreter": 1,
                        "Expression": "const f1Games = ['F12030', 'F12029', 'F12028', 'F12027', 'F12026', 'F12025', 'F12024', 'F12023', 'F12022', 'F12021'];\r\n\r\nlet game = $prop('DataCorePlugin.CurrentGame');\r\n\r\nif (\r\n    (game == 'IRacing' && $prop('GameRawData.Telemetry.SessionFlagsDetails.Isred')) ||\r\n    (f1Games.includes(game) && $prop('DataCorePlugin.GameRawData.RedFlagShown')) ||\r\n    (game == 'Automobilista2' && $prop('DataCorePlugin.GameRawData.mHighestFlagColour') == 5)\r\n) {\r\n    return true;\r\n} else {\r\n    return false;\r\n}"
                      },
                      "LedContainers": [
                        {
                          "TotalWidth": 21,
                          "LedContainers": [
                            {
                              "Animation": {
                                "Columns": 3,
                                "Rows": 1,
                                "Frames": [
                                  {
                                    "Colors": "0,0,Red;0,1,Red;0,2,Red",
                                    "FrameDuration": 300
                                  },
                                  {
                                    "Colors": "0,0,Black;0,1,Black;0,2,Black",
                                    "FrameDuration": 300
                                  }
                                ],
                                "PenColor": "Black"
                              },
                              "ContainerType": "Animation"
                            }
                          ],
                          "ContainerType": "Groups.MirrorGroup"
                        }
                      ],
                      "ContainerType": "Groups.CustomConditionalGroup",
                      "Description": "Red Flag"
                    }
                  ],
                  "ContainerType": "Groups.CustomConditionalGroup",
                  "Description": "Flag Animation"
                }
              ],
              "ContainerType": "Groups.CustomConditionalGroup",
              "Description": "Game Led effects"
            }
          ],
          "ContainerType": "Groups.CustomConditionalGroup",
          "Description": "Ignition On"
        }
      ],
      "ContainerType": "Groups.GameRunningGroup",
      "Description": ""
    }
  ],
  "TestLedsGameData": {
    "CarModel": null,
    "CarId": null,
    "CarChoice": {
      "CarId": null,
      "CarModel": null,
      "GameCode": null,
      "IsSet": false
    },
    "GearEx": 0,
    "FuelMax": 100.0,
    "RPMSMax": 10000.0,
    "TurboMax": 3.5,
    "TurnIndicatorLeftEnabled": false,
    "TurnIndicatorRightEnabled": false,
    "SessionBestDeltaEx": 0.0,
    "AllTimeBestDeltaEx": 0.0,
    "DRSEnabled": false,
    "DRSAvailable": false,
    "MaxRpm": 10000.0,
    "GameRunning": true,
    "Brake": 0.0,
    "GameName": "AssettoCorsa",
    "Fuel": 0.0,
    "RPMPercent": 100.0,
    "RPMRedlineReached": false,
    "SpeedKmh": 0.0,
    "SpeedMph": 0.0,
    "Turbo": 0.0,
    "TurboPercent": 0.0,
    "Gear": "N",
    "IsInPitLane": false,
    "PitLimiterOn": true,
    "AbsEnabled": false,
    "AbsActive": false,
    "TCEnabled": false,
    "TCActive": false,
    "LowFuelAlert": false,
    "SpotterCarLeft": false,
    "SpotterCarRight": false,
    "BlackFlag": true,
    "YellowFlag": false,
    "WhiteFlag": false,
    "BlueFlag": false,
    "GreenFlag": false,
    "CarStartedTime": "0001-01-01T00:00:00",
    "SessionBestDelta": 0.0,
    "AllTimeBestDelta": 0.0
  },
  "UseProfileBrightness": false,
  "LastLoaded": "0001-01-01T00:00:00",
  "Description": "",
  "Name": "XF1 Ultimate Advanced Rev Light v0.9.2",
  "ProfileId": "11ae1839-800a-4b16-828c-7934d90308aa",
  "GameCode": null,
  "CarChoice": null
}