$._ext_V1={
    run : function() {
function SuperVolume() {
  // Select
  function step1(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step2(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.Layer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Low");
    desc1.putObject(PSKey.Using, PSClass.Layer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Move
  function step3(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Front);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Apply Image
  function step4(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Merged);
    desc2.putReference(PSKey.To, ref1);
    desc1.putObject(PSKey.With, PSClass.Calculation, desc2);
    executeAction(sTID('applyImageEvent'), desc1, dialogMode);
  };

  // Make
  function step5(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Med2");
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSString.linearLight);
    desc1.putObject(PSKey.New, PSClass.Layer, desc2);
    desc1.putEnumerated(PSKey.Using, PSType.AreaSelector, PSEnum.Selection);
    desc1.putBoolean(PSKey.Copy, true);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Make
  function step6(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Hight");
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSString.linearLight);
    desc1.putObject(PSKey.New, PSClass.Layer, desc2);
    desc1.putEnumerated(PSKey.Using, PSType.AreaSelector, PSEnum.Selection);
    desc1.putBoolean(PSKey.Copy, true);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // High Pass
  function step7(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putUnitDouble(PSKey.Radius, PSUnit.Pixels, 2.5);
    executeAction(sTID('highPass'), desc1, dialogMode);
  };

  // Brightness/Contrast
  function step8(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putInteger(PSKey.Brightness, 0);
    desc1.putInteger(PSKey.Contrast, -50);
    executeAction(sTID('brightnessEvent'), desc1, dialogMode);
  };

  // Select
  function step9(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Backward);
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Gaussian Blur
  function step10(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putUnitDouble(PSKey.Radius, PSUnit.Pixels, 2.5);
    executeAction(sTID('gaussianBlur'), desc1, dialogMode);
  };

  // High Pass
  function step11(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putUnitDouble(PSKey.Radius, PSUnit.Pixels, 8);
    executeAction(sTID('highPass'), desc1, dialogMode);
  };

  // Brightness/Contrast
  function step12(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putInteger(PSKey.Brightness, 0);
    desc1.putInteger(PSKey.Contrast, -50);
    executeAction(sTID('brightnessEvent'), desc1, dialogMode);
  };

  // Select
  function step13(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Backward);
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Gaussian Blur
  function step14(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putUnitDouble(PSKey.Radius, PSUnit.Pixels, 8);
    executeAction(sTID('gaussianBlur'), desc1, dialogMode);
  };

  // Color Range
  function step15(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putInteger(PSKey.Fuzziness, 50);
    desc1.putEnumerated(PSKey.Colors, PSKey.Colors, sTID("skinTone"));
    desc1.putInteger(sTID("colorModel"), 0);
    executeAction(sTID('colorRange'), desc1, dialogMode);
  };

  // Select
  function step16(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Med2");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step17(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putClass(PSKey.New, PSClass.Channel);
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSClass.Mask);
    desc1.putReference(PSKey.At, ref1);
    desc1.putEnumerated(PSKey.Using, PSType.UserMaskOptions, PSEnum.HideSelection);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Select
  function step18(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Hight");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Select
  function step19(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Backward);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelection);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Select
  function step20(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Backward);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelection);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step21(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSString.layerGroup);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSKey.From, ref2);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Soften Skin");
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 70);
    desc1.putObject(PSKey.Using, PSString.layerGroup, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Make
  function step22(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putClass(PSKey.New, PSClass.Channel);
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSClass.Mask);
    desc1.putReference(PSKey.At, ref1);
    desc1.putEnumerated(PSKey.Using, PSType.UserMaskOptions, PSEnum.RevealAll);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Select
  function step23(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Hide
  function step24(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Hide, desc1, dialogMode);
  };

  // Set
  function step25(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSKey.To, PSType.Ordinal, PSEnum.All);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Subtract
  function step26(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSKey.From, ref2);
    executeAction(PSEvent.Subtract, desc1, dialogMode);
  };

  // Make
  function step27(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Darks");
    desc2.putEnumerated(PSKey.ColorIndicates, PSType.MaskIndicator, PSEnum.MaskedAreas);
    var desc3 = new ActionDescriptor();
    desc3.putDouble(PSKey.Red, 255);
    desc3.putDouble(PSKey.Green, 0);
    desc3.putDouble(PSKey.Blue, 0);
    desc2.putObject(PSKey.Color, PSClass.RGBColor, desc3);
    desc2.putInteger(PSKey.Opacity, 50);
    desc1.putObject(PSKey.New, PSClass.Channel, desc2);
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSKey.Using, ref1);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step28(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSKey.To, PSType.Ordinal, PSEnum.None);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step29(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putName(PSClass.Channel, "Darks");
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Intersect
  function step30(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Channel, "Darks");
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSKey.With, ref2);
    executeAction(PSEvent.Intersect, desc1, dialogMode);
  };

  // Make
  function step31(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Darks-");
    desc2.putEnumerated(PSKey.ColorIndicates, PSType.MaskIndicator, PSEnum.MaskedAreas);
    var desc3 = new ActionDescriptor();
    desc3.putDouble(PSKey.Red, 255);
    desc3.putDouble(PSKey.Green, 0);
    desc3.putDouble(PSKey.Blue, 0);
    desc2.putObject(PSKey.Color, PSClass.RGBColor, desc3);
    desc2.putInteger(PSKey.Opacity, 50);
    desc1.putObject(PSKey.New, PSClass.Channel, desc2);
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSKey.Using, ref1);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step32(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSKey.To, PSType.Ordinal, PSEnum.None);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step33(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putName(PSClass.Channel, "Darks-");
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Intersect
  function step34(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Channel, "Darks-");
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSKey.With, ref2);
    executeAction(PSEvent.Intersect, desc1, dialogMode);
  };

  // Make
  function step35(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Darks--");
    desc2.putEnumerated(PSKey.ColorIndicates, PSType.MaskIndicator, PSEnum.MaskedAreas);
    var desc3 = new ActionDescriptor();
    desc3.putDouble(PSKey.Red, 255);
    desc3.putDouble(PSKey.Green, 0);
    desc3.putDouble(PSKey.Blue, 0);
    desc2.putObject(PSKey.Color, PSClass.RGBColor, desc3);
    desc2.putInteger(PSKey.Opacity, 50);
    desc1.putObject(PSKey.New, PSClass.Channel, desc2);
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSKey.Using, ref1);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step36(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSKey.To, PSType.Ordinal, PSEnum.None);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step37(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putName(PSClass.Channel, "Darks--");
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Intersect
  function step38(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Channel, "Darks--");
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSKey.With, ref2);
    executeAction(PSEvent.Intersect, desc1, dialogMode);
  };

  // Make
  function step39(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Darks---");
    desc2.putEnumerated(PSKey.ColorIndicates, PSType.MaskIndicator, PSEnum.MaskedAreas);
    var desc3 = new ActionDescriptor();
    desc3.putDouble(PSKey.Red, 255);
    desc3.putDouble(PSKey.Green, 0);
    desc3.putDouble(PSKey.Blue, 0);
    desc2.putObject(PSKey.Color, PSClass.RGBColor, desc3);
    desc2.putInteger(PSKey.Opacity, 50);
    desc1.putObject(PSKey.New, PSClass.Channel, desc2);
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSKey.Using, ref1);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step40(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSKey.To, PSType.Ordinal, PSEnum.None);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step41(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putName(PSClass.Channel, "Darks---");
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step42(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Dark Darks");
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 60);
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSEnum.Multiply);
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);
    desc2.putObject(PSKey.Type, PSClass.Curves, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step43(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putName(PSClass.Channel, "Darks--");
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step44(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Darks HDR");
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSEnum.Screen);
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);
    desc2.putObject(PSKey.Type, PSClass.Curves, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step45(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step46(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Lights");
    desc2.putEnumerated(PSKey.ColorIndicates, PSType.MaskIndicator, PSEnum.MaskedAreas);
    var desc3 = new ActionDescriptor();
    desc3.putDouble(PSKey.Red, 255);
    desc3.putDouble(PSKey.Green, 0);
    desc3.putDouble(PSKey.Blue, 0);
    desc2.putObject(PSKey.Color, PSClass.RGBColor, desc3);
    desc2.putInteger(PSKey.Opacity, 50);
    desc1.putObject(PSKey.New, PSClass.Channel, desc2);
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSKey.Using, ref1);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step47(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSKey.To, PSType.Ordinal, PSEnum.None);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step48(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putName(PSClass.Channel, "Lights");
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Intersect
  function step49(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Channel, "Lights");
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSKey.With, ref2);
    executeAction(PSEvent.Intersect, desc1, dialogMode);
  };

  // Make
  function step50(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Lights+");
    desc2.putEnumerated(PSKey.ColorIndicates, PSType.MaskIndicator, PSEnum.MaskedAreas);
    var desc3 = new ActionDescriptor();
    desc3.putDouble(PSKey.Red, 255);
    desc3.putDouble(PSKey.Green, 0);
    desc3.putDouble(PSKey.Blue, 0);
    desc2.putObject(PSKey.Color, PSClass.RGBColor, desc3);
    desc2.putInteger(PSKey.Opacity, 50);
    desc1.putObject(PSKey.New, PSClass.Channel, desc2);
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSKey.Using, ref1);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step51(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSKey.To, PSType.Ordinal, PSEnum.None);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step52(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putName(PSClass.Channel, "Lights+");
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Intersect
  function step53(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Channel, "Lights+");
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSKey.With, ref2);
    executeAction(PSEvent.Intersect, desc1, dialogMode);
  };

  // Make
  function step54(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Lights++");
    desc2.putEnumerated(PSKey.ColorIndicates, PSType.MaskIndicator, PSEnum.MaskedAreas);
    var desc3 = new ActionDescriptor();
    desc3.putDouble(PSKey.Red, 255);
    desc3.putDouble(PSKey.Green, 0);
    desc3.putDouble(PSKey.Blue, 0);
    desc2.putObject(PSKey.Color, PSClass.RGBColor, desc3);
    desc2.putInteger(PSKey.Opacity, 50);
    desc1.putObject(PSKey.New, PSClass.Channel, desc2);
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSKey.Using, ref1);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step55(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSKey.To, PSType.Ordinal, PSEnum.None);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step56(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putName(PSClass.Channel, "Lights++");
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step57(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Light Lights");
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 60);
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSEnum.Screen);
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);
    desc2.putObject(PSKey.Type, PSClass.Curves, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step58(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putName(PSClass.Channel, "Lights+");
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step59(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Lights HDR");
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSEnum.Multiply);
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);
    desc2.putObject(PSKey.Type, PSClass.Curves, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Select
  function step60(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Set
  function step61(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSKey.To, PSType.Ordinal, PSEnum.All);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Subtract
  function step62(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSKey.From, ref2);
    executeAction(PSEvent.Subtract, desc1, dialogMode);
  };

  // Subtract
  function step63(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Channel, "Darks");
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSKey.From, ref2);
    executeAction(PSEvent.Subtract, desc1, dialogMode);
  };

  // Make
  function step64(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);
    desc2.putObject(PSKey.Type, PSClass.Curves, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step65(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindCustom);
    var list1 = new ActionList();
    var desc3 = new ActionDescriptor();
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.Composite);
    desc3.putReference(PSClass.Channel, ref2);
    var list2 = new ActionList();
    var desc4 = new ActionDescriptor();
    desc4.putDouble(PSKey.Horizontal, 0);
    desc4.putDouble(PSKey.Vertical, 0);
    list2.putObject(PSClass.Point, desc4);
    var desc5 = new ActionDescriptor();
    desc5.putDouble(PSKey.Horizontal, 64);
    desc5.putDouble(PSKey.Vertical, 30);
    list2.putObject(PSClass.Point, desc5);
    var desc6 = new ActionDescriptor();
    desc6.putDouble(PSKey.Horizontal, 128);
    desc6.putDouble(PSKey.Vertical, 128);
    list2.putObject(PSClass.Point, desc6);
    var desc7 = new ActionDescriptor();
    desc7.putDouble(PSKey.Horizontal, 192);
    desc7.putDouble(PSKey.Vertical, 224);
    list2.putObject(PSClass.Point, desc7);
    var desc8 = new ActionDescriptor();
    desc8.putDouble(PSKey.Horizontal, 255);
    desc8.putDouble(PSKey.Vertical, 255);
    list2.putObject(PSClass.Point, desc8);
    desc3.putList(PSKey.Curve, list2);
    list1.putObject(PSClass.CurvesAdjustment, desc3);
    desc2.putList(PSKey.Adjustment, list1);
    desc1.putObject(PSKey.To, PSClass.Curves, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step66(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Contrast");
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step67(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Auto Contrast");
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);
    desc2.putObject(PSKey.Type, PSClass.Curves, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step68(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindCustom);
    var list1 = new ActionList();
    var desc3 = new ActionDescriptor();
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.Composite);
    desc3.putReference(PSClass.Channel, ref2);
    desc3.putBoolean(sTID("autoMachineLearning"), true);
    desc3.putBoolean(sTID("autoFaces"), true);
    list1.putObject(PSClass.CurvesAdjustment, desc3);
    desc2.putList(PSKey.Adjustment, list1);
    desc1.putObject(PSKey.To, PSClass.Curves, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step69(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 30);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Hide
  function step70(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Contrast");
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Hide, desc1, dialogMode);
  };

  // Hide
  function step71(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Dark Darks");
    ref1.putName(PSClass.Layer, "Darks HDR");
    ref1.putName(PSClass.Layer, "Light Lights");
    ref1.putName(PSClass.Layer, "Lights HDR");
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Hide, desc1, dialogMode);
  };

  // Hide
  function step72(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Hide, desc1, dialogMode);
  };

  // Select
  function step73(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step74(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.Layer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "map");
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 50);
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSString.linearLight);
    desc1.putObject(PSKey.Using, PSClass.Layer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Apply Image
  function step75(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Merged);
    desc2.putReference(PSKey.To, ref1);
    desc2.putBoolean(PSKey.Invert, true);
    desc1.putObject(PSKey.With, PSClass.Calculation, desc2);
    executeAction(sTID('applyImageEvent'), desc1, dialogMode);
  };

  // Surface Blur
  function step76(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putUnitDouble(PSKey.Radius, PSUnit.Pixels, 30);
    desc1.putInteger(PSKey.Threshold, 30);
    executeAction(sTID('surfaceBlur'), desc1, dialogMode);
  };

  // Make
  function step77(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.Layer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Large Contrast");
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSEnum.SoftLight);
    desc1.putObject(PSKey.Using, PSClass.Layer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Apply Image
  function step78(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Merged);
    desc2.putReference(PSKey.To, ref1);
    desc1.putObject(PSKey.With, PSClass.Calculation, desc2);
    executeAction(sTID('applyImageEvent'), desc1, dialogMode);
  };

  // Delete
  function step79(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "map");
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Delete, desc1, dialogMode);
  };

  // Reduce Noise
  function step80(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putUnitDouble(PSEnum.ColorNoise, PSUnit.Percent, 0);
    desc1.putUnitDouble(PSKey.Sharpness, PSUnit.Percent, 0);
    desc1.putBoolean(PSString.removeJPEGArtifact, false);
    var list1 = new ActionList();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.Composite);
    desc2.putReference(PSClass.Channel, ref1);
    desc2.putInteger(PSKey.Amount, 10);
    desc2.putInteger(PSKey.EdgeFidelity, 0);
    list1.putObject(PSString.channelDenoiseParams, desc2);
    var desc3 = new ActionDescriptor();
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Channel, PSClass.Channel, PSKey.Red);
    desc3.putReference(PSClass.Channel, ref2);
    desc3.putInteger(PSKey.Amount, 0);
    list1.putObject(PSString.channelDenoiseParams, desc3);
    var desc4 = new ActionDescriptor();
    var ref3 = new ActionReference();
    ref3.putEnumerated(PSClass.Channel, PSClass.Channel, PSKey.Green);
    desc4.putReference(PSClass.Channel, ref3);
    desc4.putInteger(PSKey.Amount, 0);
    list1.putObject(PSString.channelDenoiseParams, desc4);
    var desc5 = new ActionDescriptor();
    var ref4 = new ActionReference();
    ref4.putEnumerated(PSClass.Channel, PSClass.Channel, PSKey.Blue);
    desc5.putReference(PSClass.Channel, ref4);
    desc5.putInteger(PSKey.Amount, 0);
    list1.putObject(PSString.channelDenoiseParams, desc5);
    desc1.putList(PSString.channelDenoise, list1);
    desc1.putString(PSString.preset, "По умолчанию");
    executeAction(sTID('denoise'), desc1, dialogMode);
  };

  // Reduce Noise
  function step81(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putUnitDouble(PSEnum.ColorNoise, PSUnit.Percent, 0);
    desc1.putUnitDouble(PSKey.Sharpness, PSUnit.Percent, 0);
    desc1.putBoolean(PSString.removeJPEGArtifact, false);
    var list1 = new ActionList();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.Composite);
    desc2.putReference(PSClass.Channel, ref1);
    desc2.putInteger(PSKey.Amount, 10);
    desc2.putInteger(PSKey.EdgeFidelity, 0);
    list1.putObject(PSString.channelDenoiseParams, desc2);
    var desc3 = new ActionDescriptor();
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Channel, PSClass.Channel, PSKey.Red);
    desc3.putReference(PSClass.Channel, ref2);
    desc3.putInteger(PSKey.Amount, 0);
    list1.putObject(PSString.channelDenoiseParams, desc3);
    var desc4 = new ActionDescriptor();
    var ref3 = new ActionReference();
    ref3.putEnumerated(PSClass.Channel, PSClass.Channel, PSKey.Green);
    desc4.putReference(PSClass.Channel, ref3);
    desc4.putInteger(PSKey.Amount, 0);
    list1.putObject(PSString.channelDenoiseParams, desc4);
    var desc5 = new ActionDescriptor();
    var ref4 = new ActionReference();
    ref4.putEnumerated(PSClass.Channel, PSClass.Channel, PSKey.Blue);
    desc5.putReference(PSClass.Channel, ref4);
    desc5.putInteger(PSKey.Amount, 0);
    list1.putObject(PSString.channelDenoiseParams, desc5);
    desc1.putList(PSString.channelDenoise, list1);
    desc1.putString(PSString.preset, "По умолчанию");
    executeAction(sTID('denoise'), desc1, dialogMode);
  };

  // Hide
  function step82(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Large Contrast");
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Hide, desc1, dialogMode);
  };

  // Select
  function step83(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step84(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.Layer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "map");
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 50);
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSString.linearLight);
    desc1.putObject(PSKey.Using, PSClass.Layer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Apply Image
  function step85(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Merged);
    desc2.putReference(PSKey.To, ref1);
    desc2.putBoolean(PSKey.Invert, true);
    desc1.putObject(PSKey.With, PSClass.Calculation, desc2);
    executeAction(sTID('applyImageEvent'), desc1, dialogMode);
  };

  // Surface Blur
  function step86(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putUnitDouble(PSKey.Radius, PSUnit.Pixels, 20);
    desc1.putInteger(PSKey.Threshold, 20);
    executeAction(sTID('surfaceBlur'), desc1, dialogMode);
  };

  // Make
  function step87(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.Layer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Medium Contrast");
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSEnum.SoftLight);
    desc1.putObject(PSKey.Using, PSClass.Layer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Apply Image
  function step88(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Merged);
    desc2.putReference(PSKey.To, ref1);
    desc1.putObject(PSKey.With, PSClass.Calculation, desc2);
    executeAction(sTID('applyImageEvent'), desc1, dialogMode);
  };

  // Delete
  function step89(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "map");
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Delete, desc1, dialogMode);
  };

  // Reduce Noise
  function step90(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putUnitDouble(PSEnum.ColorNoise, PSUnit.Percent, 0);
    desc1.putUnitDouble(PSKey.Sharpness, PSUnit.Percent, 0);
    desc1.putBoolean(PSString.removeJPEGArtifact, false);
    var list1 = new ActionList();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.Composite);
    desc2.putReference(PSClass.Channel, ref1);
    desc2.putInteger(PSKey.Amount, 10);
    desc2.putInteger(PSKey.EdgeFidelity, 0);
    list1.putObject(PSString.channelDenoiseParams, desc2);
    var desc3 = new ActionDescriptor();
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Channel, PSClass.Channel, PSKey.Red);
    desc3.putReference(PSClass.Channel, ref2);
    desc3.putInteger(PSKey.Amount, 0);
    list1.putObject(PSString.channelDenoiseParams, desc3);
    var desc4 = new ActionDescriptor();
    var ref3 = new ActionReference();
    ref3.putEnumerated(PSClass.Channel, PSClass.Channel, PSKey.Green);
    desc4.putReference(PSClass.Channel, ref3);
    desc4.putInteger(PSKey.Amount, 0);
    list1.putObject(PSString.channelDenoiseParams, desc4);
    var desc5 = new ActionDescriptor();
    var ref4 = new ActionReference();
    ref4.putEnumerated(PSClass.Channel, PSClass.Channel, PSKey.Blue);
    desc5.putReference(PSClass.Channel, ref4);
    desc5.putInteger(PSKey.Amount, 0);
    list1.putObject(PSString.channelDenoiseParams, desc5);
    desc1.putList(PSString.channelDenoise, list1);
    desc1.putString(PSString.preset, "По умолчанию");
    executeAction(sTID('denoise'), desc1, dialogMode);
  };

  // Reduce Noise
  function step91(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putUnitDouble(PSEnum.ColorNoise, PSUnit.Percent, 0);
    desc1.putUnitDouble(PSKey.Sharpness, PSUnit.Percent, 0);
    desc1.putBoolean(PSString.removeJPEGArtifact, false);
    var list1 = new ActionList();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.Composite);
    desc2.putReference(PSClass.Channel, ref1);
    desc2.putInteger(PSKey.Amount, 10);
    desc2.putInteger(PSKey.EdgeFidelity, 0);
    list1.putObject(PSString.channelDenoiseParams, desc2);
    var desc3 = new ActionDescriptor();
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Channel, PSClass.Channel, PSKey.Red);
    desc3.putReference(PSClass.Channel, ref2);
    desc3.putInteger(PSKey.Amount, 0);
    list1.putObject(PSString.channelDenoiseParams, desc3);
    var desc4 = new ActionDescriptor();
    var ref3 = new ActionReference();
    ref3.putEnumerated(PSClass.Channel, PSClass.Channel, PSKey.Green);
    desc4.putReference(PSClass.Channel, ref3);
    desc4.putInteger(PSKey.Amount, 0);
    list1.putObject(PSString.channelDenoiseParams, desc4);
    var desc5 = new ActionDescriptor();
    var ref4 = new ActionReference();
    ref4.putEnumerated(PSClass.Channel, PSClass.Channel, PSKey.Blue);
    desc5.putReference(PSClass.Channel, ref4);
    desc5.putInteger(PSKey.Amount, 0);
    list1.putObject(PSString.channelDenoiseParams, desc5);
    desc1.putList(PSString.channelDenoise, list1);
    desc1.putString(PSString.preset, "По умолчанию");
    executeAction(sTID('denoise'), desc1, dialogMode);
  };

  // Hide
  function step92(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Medium Contrast");
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Hide, desc1, dialogMode);
  };

  // Select
  function step93(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step94(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.Layer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "map");
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 50);
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSString.linearLight);
    desc1.putObject(PSKey.Using, PSClass.Layer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Apply Image
  function step95(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Merged);
    desc2.putReference(PSKey.To, ref1);
    desc2.putBoolean(PSKey.Invert, true);
    desc1.putObject(PSKey.With, PSClass.Calculation, desc2);
    executeAction(sTID('applyImageEvent'), desc1, dialogMode);
  };

  // Surface Blur
  function step96(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putUnitDouble(PSKey.Radius, PSUnit.Pixels, 10);
    desc1.putInteger(PSKey.Threshold, 15);
    executeAction(sTID('surfaceBlur'), desc1, dialogMode);
  };

  // Make
  function step97(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.Layer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Small Contrast");
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSEnum.SoftLight);
    desc1.putObject(PSKey.Using, PSClass.Layer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Apply Image
  function step98(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Merged);
    desc2.putReference(PSKey.To, ref1);
    desc1.putObject(PSKey.With, PSClass.Calculation, desc2);
    executeAction(sTID('applyImageEvent'), desc1, dialogMode);
  };

  // Delete
  function step99(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "map");
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Delete, desc1, dialogMode);
  };

  // Reduce Noise
  function step100(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putUnitDouble(PSEnum.ColorNoise, PSUnit.Percent, 0);
    desc1.putUnitDouble(PSKey.Sharpness, PSUnit.Percent, 0);
    desc1.putBoolean(PSString.removeJPEGArtifact, false);
    var list1 = new ActionList();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.Composite);
    desc2.putReference(PSClass.Channel, ref1);
    desc2.putInteger(PSKey.Amount, 10);
    desc2.putInteger(PSKey.EdgeFidelity, 0);
    list1.putObject(PSString.channelDenoiseParams, desc2);
    var desc3 = new ActionDescriptor();
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Channel, PSClass.Channel, PSKey.Red);
    desc3.putReference(PSClass.Channel, ref2);
    desc3.putInteger(PSKey.Amount, 0);
    list1.putObject(PSString.channelDenoiseParams, desc3);
    var desc4 = new ActionDescriptor();
    var ref3 = new ActionReference();
    ref3.putEnumerated(PSClass.Channel, PSClass.Channel, PSKey.Green);
    desc4.putReference(PSClass.Channel, ref3);
    desc4.putInteger(PSKey.Amount, 0);
    list1.putObject(PSString.channelDenoiseParams, desc4);
    var desc5 = new ActionDescriptor();
    var ref4 = new ActionReference();
    ref4.putEnumerated(PSClass.Channel, PSClass.Channel, PSKey.Blue);
    desc5.putReference(PSClass.Channel, ref4);
    desc5.putInteger(PSKey.Amount, 0);
    list1.putObject(PSString.channelDenoiseParams, desc5);
    desc1.putList(PSString.channelDenoise, list1);
    desc1.putString(PSString.preset, "По умолчанию");
    executeAction(sTID('denoise'), desc1, dialogMode);
  };

  // Reduce Noise
  function step101(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putUnitDouble(PSEnum.ColorNoise, PSUnit.Percent, 0);
    desc1.putUnitDouble(PSKey.Sharpness, PSUnit.Percent, 0);
    desc1.putBoolean(PSString.removeJPEGArtifact, false);
    var list1 = new ActionList();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.Composite);
    desc2.putReference(PSClass.Channel, ref1);
    desc2.putInteger(PSKey.Amount, 10);
    desc2.putInteger(PSKey.EdgeFidelity, 0);
    list1.putObject(PSString.channelDenoiseParams, desc2);
    var desc3 = new ActionDescriptor();
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Channel, PSClass.Channel, PSKey.Red);
    desc3.putReference(PSClass.Channel, ref2);
    desc3.putInteger(PSKey.Amount, 0);
    list1.putObject(PSString.channelDenoiseParams, desc3);
    var desc4 = new ActionDescriptor();
    var ref3 = new ActionReference();
    ref3.putEnumerated(PSClass.Channel, PSClass.Channel, PSKey.Green);
    desc4.putReference(PSClass.Channel, ref3);
    desc4.putInteger(PSKey.Amount, 0);
    list1.putObject(PSString.channelDenoiseParams, desc4);
    var desc5 = new ActionDescriptor();
    var ref4 = new ActionReference();
    ref4.putEnumerated(PSClass.Channel, PSClass.Channel, PSKey.Blue);
    desc5.putReference(PSClass.Channel, ref4);
    desc5.putInteger(PSKey.Amount, 0);
    list1.putObject(PSString.channelDenoiseParams, desc5);
    desc1.putList(PSString.channelDenoise, list1);
    desc1.putString(PSString.preset, "По умолчанию");
    executeAction(sTID('denoise'), desc1, dialogMode);
  };

  // Show
  function step102(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Medium Contrast");
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Show, desc1, dialogMode);
  };

  // Show
  function step103(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Large Contrast");
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Show, desc1, dialogMode);
  };

  // Select
  function step104(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Large Contrast");
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelectionContinuous);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step105(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSString.layerGroup);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSKey.From, ref2);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Group Local Contrast");
    desc1.putObject(PSKey.Using, PSString.layerGroup, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Hide
  function step106(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Hide, desc1, dialogMode);
  };

  // Make
  function step107(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.Layer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "_Temp");
    desc1.putObject(PSKey.Using, PSClass.Layer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Move
  function step108(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Front);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Apply Image
  function step109(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Merged);
    desc2.putReference(PSKey.To, ref1);
    desc1.putObject(PSKey.With, PSClass.Calculation, desc2);
    executeAction(sTID('applyImageEvent'), desc1, dialogMode);
  };

  // Convert to Smart Object
  function step110(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    executeAction(sTID('newPlacedLayer'), undefined, dialogMode);
  };

  // Edit Contents
  function step111(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    executeAction(sTID('placedLayerEditContents'), desc1, dialogMode);
  };

  // Convert Mode
  function step112(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putClass(PSKey.To, PSClass.LabColorMode);
    executeAction(sTID('convertMode'), desc1, dialogMode);
  };

  // Select
  function step113(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.Lightness);
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Set
  function step114(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSKey.To, PSType.Ordinal, PSEnum.All);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Copy
  function step115(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    executeAction(PSEvent.Copy, undefined, dialogMode);
  };

  // Close
  function step116(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    desc2.putBoolean(PSString.maximizeCompatibility, false);
    desc1.putObject(PSKey.As, PSString.largeDocumentFormat, desc2);
    desc1.putPath(PSKey.In, new File("~/AppData/Local/Temp"));
    desc1.putInteger(PSKey.DocumentID, 414);
    desc1.putEnumerated(PSKey.Saving, PSType.YesNo, PSEnum.Yes);
    executeAction(PSEvent.Close, desc1, dialogMode);
  };

  // Update Smart Objects
  function step117(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    executeAction(sTID('updatePlacedLayer'), undefined, dialogMode);
  };

  // Set
  function step118(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "_Temp");
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step119(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.Layer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Black");
    desc1.putObject(PSKey.Using, PSClass.Layer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Paste
  function step120(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putEnumerated(PSKey.AntiAlias, PSType.AntiAlias, PSEnum.AntiAliasNone);
    executeAction(PSEvent.Paste, desc1, dialogMode);
  };

  // Make
  function step121(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Black Blur");
    desc1.putObject(PSKey.New, PSClass.Layer, desc2);
    desc1.putEnumerated(PSKey.Using, PSType.AreaSelector, PSEnum.Selection);
    desc1.putBoolean(PSKey.Copy, true);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Surface Blur
  function step122(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putUnitDouble(PSKey.Radius, PSUnit.Pixels, 30);
    desc1.putInteger(PSKey.Threshold, 60);
    executeAction(sTID('surfaceBlur'), desc1, dialogMode);
  };

  // Move
  function step123(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Previous);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Select
  function step124(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Black");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Apply Image
  function step125(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    ref1.putName(PSClass.Layer, "Black Blur");
    desc2.putReference(PSKey.To, ref1);
    desc2.putEnumerated(PSClass.Calculation, PSType.Calculation, PSEvent.Subtract);
    desc2.putDouble(PSKey.Scale, 2);
    desc2.putInteger(PSKey.Offset, 128);
    desc1.putObject(PSKey.With, PSClass.Calculation, desc2);
    executeAction(sTID('applyImageEvent'), desc1, dialogMode);
  };

  // Delete
  function step126(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Black Blur");
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Delete, desc1, dialogMode);
  };

  // Delete
  function step127(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "_Temp");
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Delete, desc1, dialogMode);
  };

  // Make
  function step128(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "ajust");
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);
    desc2.putObject(PSKey.Type, PSClass.Curves, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Create Clipping Mask
  function step129(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    executeAction(sTID('groupEvent'), desc1, dialogMode);
  };

  // Set
  function step130(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindCustom);
    var list1 = new ActionList();
    var desc3 = new ActionDescriptor();
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.Composite);
    desc3.putReference(PSClass.Channel, ref2);
    var list2 = new ActionList();
    var desc4 = new ActionDescriptor();
    desc4.putDouble(PSKey.Horizontal, 0);
    desc4.putDouble(PSKey.Vertical, 80);
    list2.putObject(PSClass.Point, desc4);
    var desc5 = new ActionDescriptor();
    desc5.putDouble(PSKey.Horizontal, 81);
    desc5.putDouble(PSKey.Vertical, 98);
    list2.putObject(PSClass.Point, desc5);
    var desc6 = new ActionDescriptor();
    desc6.putDouble(PSKey.Horizontal, 128);
    desc6.putDouble(PSKey.Vertical, 128);
    list2.putObject(PSClass.Point, desc6);
    var desc7 = new ActionDescriptor();
    desc7.putDouble(PSKey.Horizontal, 185);
    desc7.putDouble(PSKey.Vertical, 255);
    list2.putObject(PSClass.Point, desc7);
    desc3.putList(PSKey.Curve, list2);
    list1.putObject(PSClass.CurvesAdjustment, desc3);
    desc2.putList(PSKey.Adjustment, list1);
    desc1.putObject(PSKey.To, PSClass.Curves, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step131(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Black");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Set
  function step132(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSEnum.HardLight);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step133(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Forward);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelection);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step134(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSString.layerGroup);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSKey.From, ref2);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Clarity");
    desc1.putObject(PSKey.Using, PSString.layerGroup, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Hide
  function step135(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Hide, desc1, dialogMode);
  };

  // Select
  function step136(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step137(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.Layer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "map");
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 50);
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSString.linearLight);
    desc1.putObject(PSKey.Using, PSClass.Layer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Apply Image
  function step138(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Merged);
    desc2.putReference(PSKey.To, ref1);
    desc2.putBoolean(PSKey.Invert, true);
    desc1.putObject(PSKey.With, PSClass.Calculation, desc2);
    executeAction(sTID('applyImageEvent'), desc1, dialogMode);
  };

  // Surface Blur
  function step139(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putUnitDouble(PSKey.Radius, PSUnit.Pixels, 4);
    desc1.putInteger(PSKey.Threshold, 8);
    executeAction(sTID('surfaceBlur'), desc1, dialogMode);
  };

  // Make
  function step140(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.Layer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Large Sharp");
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSEnum.SoftLight);
    desc1.putObject(PSKey.Using, PSClass.Layer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Apply Image
  function step141(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Merged);
    desc2.putReference(PSKey.To, ref1);
    desc1.putObject(PSKey.With, PSClass.Calculation, desc2);
    executeAction(sTID('applyImageEvent'), desc1, dialogMode);
  };

  // Delete
  function step142(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "map");
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Delete, desc1, dialogMode);
  };

  // Hide
  function step143(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Hide, desc1, dialogMode);
  };

  // Select
  function step144(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step145(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.Layer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "map");
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 50);
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSString.linearLight);
    desc1.putObject(PSKey.Using, PSClass.Layer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Apply Image
  function step146(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Merged);
    desc2.putReference(PSKey.To, ref1);
    desc2.putBoolean(PSKey.Invert, true);
    desc1.putObject(PSKey.With, PSClass.Calculation, desc2);
    executeAction(sTID('applyImageEvent'), desc1, dialogMode);
  };

  // Surface Blur
  function step147(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putUnitDouble(PSKey.Radius, PSUnit.Pixels, 2);
    desc1.putInteger(PSKey.Threshold, 8);
    executeAction(sTID('surfaceBlur'), desc1, dialogMode);
  };

  // Make
  function step148(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.Layer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Medium Sharp");
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSEnum.Overlay);
    desc1.putObject(PSKey.Using, PSClass.Layer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Apply Image
  function step149(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Merged);
    desc2.putReference(PSKey.To, ref1);
    desc1.putObject(PSKey.With, PSClass.Calculation, desc2);
    executeAction(sTID('applyImageEvent'), desc1, dialogMode);
  };

  // Delete
  function step150(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "map");
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Delete, desc1, dialogMode);
  };

  // Hide
  function step151(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Hide, desc1, dialogMode);
  };

  // Select
  function step152(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step153(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.Layer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Small Sharp");
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSEnum.Overlay);
    desc1.putObject(PSKey.Using, PSClass.Layer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Apply Image
  function step154(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Merged);
    desc2.putReference(PSKey.To, ref1);
    desc1.putObject(PSKey.With, PSClass.Calculation, desc2);
    executeAction(sTID('applyImageEvent'), desc1, dialogMode);
  };

  // High Pass
  function step155(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putUnitDouble(PSKey.Radius, PSUnit.Pixels, 1);
    executeAction(sTID('highPass'), desc1, dialogMode);
  };

  // Hide
  function step156(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Hide, desc1, dialogMode);
  };

  // Select
  function step157(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step158(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.Layer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Super Small Sharp");
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSEnum.Overlay);
    desc1.putObject(PSKey.Using, PSClass.Layer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Apply Image
  function step159(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Merged);
    desc2.putReference(PSKey.To, ref1);
    desc1.putObject(PSKey.With, PSClass.Calculation, desc2);
    executeAction(sTID('applyImageEvent'), desc1, dialogMode);
  };

  // High Pass
  function step160(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putUnitDouble(PSKey.Radius, PSUnit.Pixels, 0.5);
    executeAction(sTID('highPass'), desc1, dialogMode);
  };

  // Show
  function step161(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Small Sharp");
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Show, desc1, dialogMode);
  };

  // Show
  function step162(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Medium Sharp");
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Show, desc1, dialogMode);
  };

  // Show
  function step163(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Large Sharp");
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Show, desc1, dialogMode);
  };

  // Select
  function step164(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Large Sharp");
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelectionContinuous);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step165(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSString.layerGroup);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSKey.From, ref2);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Group Sharp");
    desc1.putObject(PSKey.Using, PSString.layerGroup, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Show
  function step166(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Clarity");
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Show, desc1, dialogMode);
  };

  // Show
  function step167(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Group Local Contrast");
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Show, desc1, dialogMode);
  };

  // Show
  function step168(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Auto Contrast");
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Show, desc1, dialogMode);
  };

  // Show
  function step169(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Contrast");
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Show, desc1, dialogMode);
  };

  // Show
  function step170(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Dark Darks");
    ref1.putName(PSClass.Layer, "Darks HDR");
    ref1.putName(PSClass.Layer, "Light Lights");
    ref1.putName(PSClass.Layer, "Lights HDR");
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Show, desc1, dialogMode);
  };

  // Select
  function step171(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Contrast");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Move
  function step172(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Front);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Select
  function step173(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Auto Contrast");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Move
  function step174(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Front);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Select
  function step175(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Dark Darks");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Move
  function step176(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Front);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Set
  function step177(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Punch Darks");
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step178(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Light Lights");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Move
  function step179(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Front);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Set
  function step180(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Punch Lights");
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step181(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step182(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Dynamic Low Key");
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);
    desc2.putObject(PSKey.Type, PSClass.Curves, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step183(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSEnum.Multiply);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step184(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putUnitDouble(sTID("userMaskFeather"), PSUnit.Pixels, 20);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step185(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putName(PSClass.Channel, "Darks-");
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step186(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Punch Darks+");
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 50);
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);
    desc2.putObject(PSKey.Type, PSClass.Curves, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step187(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSString.linearBurn);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step188(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putName(PSClass.Channel, "Darks-");
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step189(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Fade Darks");
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);
    desc3.putDouble(PSKey.Exposure, 0);
    desc3.putDouble(PSKey.Offset, 0);
    desc3.putDouble(PSString.gammaCorrection, 1);
    desc2.putObject(PSKey.Type, PSKey.Exposure, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step190(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindCustom);
    desc2.putDouble(PSKey.Exposure, 0.10000000149012);
    desc2.putDouble(PSKey.Offset, 0.00999999977648);
    desc1.putObject(PSKey.To, PSKey.Exposure, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step191(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 25);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step192(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Select
  function step193(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Contrast");
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelectionContinuous);
    desc1.putBoolean(PSKey.MakeVisible, false);
    var list1 = new ActionList();
    list1.putInteger(15);
    list1.putInteger(sTID("skinTone"), 16);
    list1.putInteger(sTID("contentAware"), 6);
    list1.putInteger(PSString.shapeburst, 11);
    list1.putInteger(PSString.average, 44);
    list1.putInteger(PSString.subsample, 45);
    list1.putInteger(PSString.pdf13, 46);
    desc1.putList(PSKey.LayerID, list1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step194(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSString.layerGroup);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSKey.From, ref2);
    desc1.putInteger(PSString.layerGroupStart, 47);
    desc1.putInteger(PSString.layerGroupEnd, 48);
    desc1.putString(PSKey.Name, "Группа 1");
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step195(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Pro Contrast");
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step196(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Lights HDR");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    var list1 = new ActionList();
    list1.putInteger(93);
    desc1.putList(PSKey.LayerID, list1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Select
  function step197(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Darks HDR");
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelectionContinuous);
    desc1.putBoolean(PSKey.MakeVisible, false);
    var list1 = new ActionList();
    list1.putInteger(88);
    list1.putInteger(sTID("skinTone"), 93);
    desc1.putList(PSKey.LayerID, list1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step198(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSString.layerGroup);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSKey.From, ref2);
    desc1.putInteger(PSString.layerGroupStart, 127);
    desc1.putInteger(PSString.layerGroupEnd, 128);
    desc1.putString(PSKey.Name, "Группа 1");
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step199(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "HDR");
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step200(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Soften Skin");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    var list1 = new ActionList();
    list1.putInteger(81);
    desc1.putList(PSKey.LayerID, list1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Show
  function step201(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Show, desc1, dialogMode);
  };

  // Move
  function step202(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Next);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Move
  function step203(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Next);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Move
  function step204(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Next);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Set
  function step205(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 44);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step206(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step207(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "SelectiveColor");
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);
    desc2.putObject(PSKey.Type, PSClass.SelectiveColor, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Move
  function step208(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Front);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Set
  function step209(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindCustom);
    desc2.putEnumerated(PSKey.Method, PSType.CorrectionMethod, PSEnum.Absolute);
    var list1 = new ActionList();
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSKey.Colors, PSKey.Colors, PSKey.Radius);
    desc3.putUnitDouble(PSKey.Black, PSUnit.Percent, -100);
    list1.putObject(PSClass.ColorCorrection, desc3);
    var desc4 = new ActionDescriptor();
    desc4.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Yellows);
    desc4.putUnitDouble(PSKey.Black, PSUnit.Percent, -100);
    list1.putObject(PSClass.ColorCorrection, desc4);
    var desc5 = new ActionDescriptor();
    desc5.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Greens);
    desc5.putUnitDouble(PSKey.Black, PSUnit.Percent, -100);
    list1.putObject(PSClass.ColorCorrection, desc5);
    var desc6 = new ActionDescriptor();
    desc6.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Cyans);
    desc6.putUnitDouble(PSKey.Black, PSUnit.Percent, -100);
    list1.putObject(PSClass.ColorCorrection, desc6);
    var desc7 = new ActionDescriptor();
    desc7.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Blues);
    desc7.putUnitDouble(PSKey.Black, PSUnit.Percent, -100);
    list1.putObject(PSClass.ColorCorrection, desc7);
    var desc8 = new ActionDescriptor();
    desc8.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Magentas);
    desc8.putUnitDouble(PSKey.Black, PSUnit.Percent, -100);
    list1.putObject(PSClass.ColorCorrection, desc8);
    var desc9 = new ActionDescriptor();
    desc9.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Whites);
    desc9.putUnitDouble(PSKey.Black, PSUnit.Percent, 100);
    list1.putObject(PSClass.ColorCorrection, desc9);
    var desc10 = new ActionDescriptor();
    desc10.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Neutrals);
    desc10.putUnitDouble(PSKey.Black, PSUnit.Percent, 100);
    list1.putObject(PSClass.ColorCorrection, desc10);
    var desc11 = new ActionDescriptor();
    desc11.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Blocks);
    desc11.putUnitDouble(PSKey.Black, PSUnit.Percent, 100);
    list1.putObject(PSClass.ColorCorrection, desc11);
    desc2.putList(PSClass.ColorCorrection, list1);
    desc1.putObject(PSKey.To, PSClass.SelectiveColor, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step210(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "ContrastForMask");
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);
    desc2.putObject(PSKey.Type, PSClass.Curves, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step211(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    var list1 = new ActionList();
    var desc3 = new ActionDescriptor();
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.Composite);
    desc3.putReference(PSClass.Channel, ref2);
    var list2 = new ActionList();
    var desc4 = new ActionDescriptor();
    desc4.putDouble(PSKey.Horizontal, 0);
    desc4.putDouble(PSKey.Vertical, 0);
    list2.putObject(PSClass.Point, desc4);
    var desc5 = new ActionDescriptor();
    desc5.putDouble(PSKey.Horizontal, 128);
    desc5.putDouble(PSKey.Vertical, 255);
    list2.putObject(PSClass.Point, desc5);
    desc3.putList(PSKey.Curve, list2);
    list1.putObject(PSClass.CurvesAdjustment, desc3);
    desc2.putList(PSKey.Adjustment, list1);
    desc1.putObject(PSKey.To, PSClass.Curves, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step212(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.Layer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "MergedContrastMask");
    desc1.putObject(PSKey.Using, PSClass.Layer, desc2);
    desc1.putInteger(PSKey.LayerID, 358);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Apply Image
  function step213(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Merged);
    desc2.putReference(PSKey.To, ref1);
    desc1.putObject(PSKey.With, PSClass.Calculation, desc2);
    executeAction(sTID('applyImageEvent'), desc1, dialogMode);
  };

  // Select
  function step214(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Backward);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelection);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Select
  function step215(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Backward);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelection);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step216(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSString.layerGroup);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSKey.From, ref2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step217(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Saturation Mask");
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step218(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Duplicate
  function step219(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    desc1.putString(PSKey.Name, "SaturnMask");
    executeAction(PSEvent.Duplicate, desc1, dialogMode);
  };

  // Delete
  function step220(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Delete, desc1, dialogMode);
  };

  // Set
  function step221(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSKey.To, PSType.Ordinal, PSEnum.None);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step222(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Set
  function step223(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putName(PSClass.Channel, "SaturnMask");
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step224(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Desaturate heavily saturated");
    desc2.putClass(PSKey.Type, sTID("vibrance"));
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step225(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 40);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step226(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putInteger(PSKey.Start, -50);
    desc1.putObject(PSKey.To, sTID("vibrance"), desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step227(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Set
  function step228(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putName(PSClass.Channel, "Darks---");
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step229(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSString.contentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Make Shadows Cool");
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 15);
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSEnum.Lighten);
    var desc3 = new ActionDescriptor();
    var desc4 = new ActionDescriptor();
    desc4.putDouble(PSKey.Red, 0);
    desc4.putDouble(PSKey.Green, 49.9992370605469);
    desc4.putDouble(PSKey.Blue, 149.997711181641);
    desc3.putObject(PSKey.Color, PSClass.RGBColor, desc4);
    desc2.putObject(PSKey.Type, PSString.solidColorLayer, desc3);
    desc1.putObject(PSKey.Using, PSString.contentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Select
  function step230(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step231(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Color Grading");
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 25);
    var desc3 = new ActionDescriptor();
    var desc4 = new ActionDescriptor();
    desc4.putString(PSKey.Name, "От основного к фоновому");
    desc4.putEnumerated(PSType.GradientForm, PSType.GradientForm, PSEnum.CustomStops);
    desc4.putDouble(PSEvent.Intersect, 4096);
    var list1 = new ActionList();
    var desc5 = new ActionDescriptor();
    var desc6 = new ActionDescriptor();
    desc6.putDouble(PSKey.Red, 0);
    desc6.putDouble(PSKey.Green, 0);
    desc6.putDouble(PSKey.Blue, 0);
    desc5.putObject(PSKey.Color, PSClass.RGBColor, desc6);
    desc5.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc5.putInteger(PSKey.Location, 0);
    desc5.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc5);
    var desc7 = new ActionDescriptor();
    var desc8 = new ActionDescriptor();
    desc8.putDouble(PSKey.Red, 255);
    desc8.putDouble(PSKey.Green, 255);
    desc8.putDouble(PSKey.Blue, 255);
    desc7.putObject(PSKey.Color, PSClass.RGBColor, desc8);
    desc7.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc7.putInteger(PSKey.Location, 4096);
    desc7.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc7);
    desc4.putList(PSKey.Colors, list1);
    var list2 = new ActionList();
    var desc9 = new ActionDescriptor();
    desc9.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 100);
    desc9.putInteger(PSKey.Location, 0);
    desc9.putInteger(PSKey.Midpoint, 50);
    list2.putObject(PSClass.TransparencyStop, desc9);
    var desc10 = new ActionDescriptor();
    desc10.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 100);
    desc10.putInteger(PSKey.Location, 4096);
    desc10.putInteger(PSKey.Midpoint, 50);
    list2.putObject(PSClass.TransparencyStop, desc10);
    desc4.putList(PSKey.Transparency, list2);
    desc3.putObject(PSKey.Gradient, PSClass.Gradient, desc4);
    desc2.putObject(PSKey.Type, PSClass.GradientMap, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step232(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    var desc3 = new ActionDescriptor();
    desc3.putString(PSKey.Name, "Заказная");
    desc3.putEnumerated(PSType.GradientForm, PSType.GradientForm, PSEnum.CustomStops);
    desc3.putDouble(PSEvent.Intersect, 4096);
    var list1 = new ActionList();
    var desc4 = new ActionDescriptor();
    var desc5 = new ActionDescriptor();
    desc5.putDouble(PSKey.Red, 90.8468627929688);
    desc5.putDouble(PSKey.Green, 59.6722412109375);
    desc5.putDouble(PSKey.Blue, 33.0422973632813);
    desc4.putObject(PSKey.Color, PSClass.RGBColor, desc5);
    desc4.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc4.putInteger(PSKey.Location, 0);
    desc4.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc4);
    var desc6 = new ActionDescriptor();
    var desc7 = new ActionDescriptor();
    desc7.putDouble(PSKey.Red, 90.8468627929688);
    desc7.putDouble(PSKey.Green, 59.6722412109375);
    desc7.putDouble(PSKey.Blue, 33.0422973632813);
    desc6.putObject(PSKey.Color, PSClass.RGBColor, desc7);
    desc6.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc6.putInteger(PSKey.Location, 0);
    desc6.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc6);
    var desc8 = new ActionDescriptor();
    var desc9 = new ActionDescriptor();
    desc9.putDouble(PSKey.Red, 3.00384521484375);
    desc9.putDouble(PSKey.Green, 3.00384521484375);
    desc9.putDouble(PSKey.Blue, 3.00384521484375);
    desc8.putObject(PSKey.Color, PSClass.RGBColor, desc9);
    desc8.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc8.putInteger(PSKey.Location, 0);
    desc8.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc8);
    var desc10 = new ActionDescriptor();
    var desc11 = new ActionDescriptor();
    desc11.putDouble(PSKey.Red, 69.5787048339844);
    desc11.putDouble(PSKey.Green, 47.1510314941406);
    desc11.putDouble(PSKey.Blue, 31.4080810546875);
    desc10.putObject(PSKey.Color, PSClass.RGBColor, desc11);
    desc10.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc10.putInteger(PSKey.Location, 808);
    desc10.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc10);
    var desc12 = new ActionDescriptor();
    var desc13 = new ActionDescriptor();
    desc13.putDouble(PSKey.Red, 168.051910400391);
    desc13.putDouble(PSKey.Green, 130.713958740234);
    desc13.putDouble(PSKey.Blue, 71.2596130371094);
    desc12.putObject(PSKey.Color, PSClass.RGBColor, desc13);
    desc12.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc12.putInteger(PSKey.Location, 2063);
    desc12.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc12);
    var desc14 = new ActionDescriptor();
    var desc15 = new ActionDescriptor();
    desc15.putDouble(PSKey.Red, 217.413024902344);
    desc15.putDouble(PSKey.Green, 182.0361328125);
    desc15.putDouble(PSKey.Blue, 116.760864257813);
    desc14.putObject(PSKey.Color, PSClass.RGBColor, desc15);
    desc14.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc14.putInteger(PSKey.Location, 3090);
    desc14.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc14);
    var desc16 = new ActionDescriptor();
    var desc17 = new ActionDescriptor();
    desc17.putDouble(PSKey.Red, 251.972808837891);
    desc17.putDouble(PSKey.Green, 245.653839111328);
    desc17.putDouble(PSKey.Blue, 208.292541503906);
    desc16.putObject(PSKey.Color, PSClass.RGBColor, desc17);
    desc16.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc16.putInteger(PSKey.Location, 4024);
    desc16.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc16);
    var desc18 = new ActionDescriptor();
    var desc19 = new ActionDescriptor();
    desc19.putDouble(PSKey.Red, 255);
    desc19.putDouble(PSKey.Green, 255);
    desc19.putDouble(PSKey.Blue, 255);
    desc18.putObject(PSKey.Color, PSClass.RGBColor, desc19);
    desc18.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc18.putInteger(PSKey.Location, 4096);
    desc18.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc18);
    desc3.putList(PSKey.Colors, list1);
    var list2 = new ActionList();
    var desc20 = new ActionDescriptor();
    desc20.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 100);
    desc20.putInteger(PSKey.Location, 0);
    desc20.putInteger(PSKey.Midpoint, 50);
    list2.putObject(PSClass.TransparencyStop, desc20);
    var desc21 = new ActionDescriptor();
    desc21.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 100);
    desc21.putInteger(PSKey.Location, 4096);
    desc21.putInteger(PSKey.Midpoint, 50);
    list2.putObject(PSClass.TransparencyStop, desc21);
    desc3.putList(PSKey.Transparency, list2);
    desc2.putObject(PSKey.Gradient, PSClass.Gradient, desc3);
    desc1.putObject(PSKey.To, PSClass.GradientMap, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step233(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Desaturate heavily saturated");
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelectionContinuous);
    desc1.putBoolean(PSKey.MakeVisible, false);
    var list1 = new ActionList();
    list1.putInteger(127);
    list1.putInteger(sTID("skinTone"), 128);
    list1.putInteger(sTID("contentAware"), 129);
    desc1.putList(PSKey.LayerID, list1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step234(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSString.layerGroup);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSKey.From, ref2);
    desc1.putInteger(PSString.layerGroupStart, 151);
    desc1.putInteger(PSString.layerGroupEnd, 152);
    desc1.putString(PSKey.Name, "Группа 1");
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step235(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Color");
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Delete
  function step236(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Channel, "Darks");
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Delete, desc1, dialogMode);
  };

  // Delete
  function step237(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Channel, "Darks-");
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Delete, desc1, dialogMode);
  };

  // Delete
  function step238(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Channel, "Darks--");
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Delete, desc1, dialogMode);
  };

  // Delete
  function step239(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Channel, "Darks---");
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Delete, desc1, dialogMode);
  };

  // Delete
  function step240(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Channel, "Lights");
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Delete, desc1, dialogMode);
  };

  // Delete
  function step241(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Channel, "Lights+");
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Delete, desc1, dialogMode);
  };

  // Delete
  function step242(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Channel, "Lights++");
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Delete, desc1, dialogMode);
  };

  // Delete
  function step243(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Channel, "SaturnMask");
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Delete, desc1, dialogMode);
  };

  // Select
  function step244(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Color");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    var list1 = new ActionList();
    list1.putInteger(344);
    desc1.putList(PSKey.LayerID, list1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Set
  function step245(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSKey.Color, PSKey.Color, PSKey.Red);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step246(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Pro Contrast");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    var list1 = new ActionList();
    list1.putInteger(328);
    desc1.putList(PSKey.LayerID, list1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Set
  function step247(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSKey.Color, PSKey.Color, PSKey.Blue);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step248(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Group Sharp");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    var list1 = new ActionList();
    list1.putInteger(193);
    desc1.putList(PSKey.LayerID, list1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Set
  function step249(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSKey.Color, PSKey.Color, PSEnum.Orange);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step250(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Soften Skin");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    var list1 = new ActionList();
    list1.putInteger(156);
    desc1.putList(PSKey.LayerID, list1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Set
  function step251(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSKey.Color, PSKey.Color, PSEnum.YellowColor);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step252(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Clarity");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    var list1 = new ActionList();
    list1.putInteger(185);
    desc1.putList(PSKey.LayerID, list1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Set
  function step253(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSKey.Color, PSKey.Color, PSKey.Blue);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step254(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Group Local Contrast");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    var list1 = new ActionList();
    list1.putInteger(177);
    desc1.putList(PSKey.LayerID, list1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Set
  function step255(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSKey.Color, PSKey.Color, PSEnum.Violet);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step256(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "HDR");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    var list1 = new ActionList();
    list1.putInteger(200);
    desc1.putList(PSKey.LayerID, list1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Set
  function step257(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSKey.Color, PSKey.Color, PSKey.Blue);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step258(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Clarity");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    var list1 = new ActionList();
    list1.putInteger(185);
    desc1.putList(PSKey.LayerID, list1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Move
  function step259(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Next);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Move
  function step260(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Next);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Move
  function step261(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Next);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Select
  function step262(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Group Local Contrast");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    var list1 = new ActionList();
    list1.putInteger(41);
    desc1.putList(PSKey.LayerID, list1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Move
  function step263(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Next);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Move
  function step264(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Next);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Move
  function step265(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Next);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Move
  function step266(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Next);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Select
  function step267(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Group Sharp");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    var list1 = new ActionList();
    list1.putInteger(57);
    desc1.putList(PSKey.LayerID, list1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Move
  function step268(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Next);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Move
  function step269(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Next);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Move
  function step270(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Next);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Select
  function step271(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Clarity");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    var list1 = new ActionList();
    list1.putInteger(160);
    desc1.putList(PSKey.LayerID, list1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step272(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putClass(PSKey.New, PSClass.Channel);
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSClass.Mask);
    desc1.putReference(PSKey.At, ref1);
    desc1.putEnumerated(PSKey.Using, PSType.UserMaskOptions, PSEnum.HideAll);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  step1();      // Select
  step2();      // Make
  step3();      // Move
  step4();      // Apply Image
  step5();      // Make
  step6();      // Make
  step7();      // High Pass
  step8();      // Brightness/Contrast
  step9();      // Select
  step10();      // Gaussian Blur
  step11();      // High Pass
  step12();      // Brightness/Contrast
  step13();      // Select
  step14();      // Gaussian Blur
  step15();      // Color Range
  step16();      // Select
  step17();      // Make
  step18();      // Select
  step19();      // Select
  step20();      // Select
  step21();      // Make
  step22();      // Make
  step23();      // Select
  step24();      // Hide
  step25();      // Set
  step26();      // Subtract
  step27();      // Make
  step28();      // Set
  step29();      // Set
  step30();      // Intersect
  step31();      // Make
  step32();      // Set
  step33();      // Set
  step34();      // Intersect
  step35();      // Make
  step36();      // Set
  step37();      // Set
  step38();      // Intersect
  step39();      // Make
  step40();      // Set
  step41();      // Set
  step42();      // Make
  step43();      // Set
  step44();      // Make
  step45();      // Set
  step46();      // Make
  step47();      // Set
  step48();      // Set
  step49();      // Intersect
  step50();      // Make
  step51();      // Set
  step52();      // Set
  step53();      // Intersect
  step54();      // Make
  step55();      // Set
  step56();      // Set
  step57();      // Make
  step58();      // Set
  step59();      // Make
  step60();      // Select
  step61();      // Set
  step62();      // Subtract
  step63();      // Subtract
  step64();      // Make
  step65();      // Set
  step66();      // Set
  step67();      // Make
  step68();      // Set
  step69();      // Set
  step70();      // Hide
  step71();      // Hide
  step72();      // Hide
  step73();      // Select
  step74();      // Make
  step75();      // Apply Image
  step76();      // Surface Blur
  step77();      // Make
  step78();      // Apply Image
  step79();      // Delete
  step80();      // Reduce Noise
  step81();      // Reduce Noise
  step82();      // Hide
  step83();      // Select
  step84();      // Make
  step85();      // Apply Image
  step86();      // Surface Blur
  step87();      // Make
  step88();      // Apply Image
  step89();      // Delete
  step90();      // Reduce Noise
  step91();      // Reduce Noise
  step92();      // Hide
  step93();      // Select
  step94();      // Make
  step95();      // Apply Image
  step96();      // Surface Blur
  step97();      // Make
  step98();      // Apply Image
  step99();      // Delete
  step100();      // Reduce Noise
  step101();      // Reduce Noise
  step102();      // Show
  step103();      // Show
  step104();      // Select
  step105();      // Make
  step106();      // Hide
  step107();      // Make
  step108();      // Move
  step109();      // Apply Image
  step110();      // Convert to Smart Object
  step111();      // Edit Contents
  step112();      // Convert Mode
  step113();      // Select
  step114();      // Set
  step115();      // Copy
  step116();      // Close
  step117();      // Update Smart Objects
  step118();      // Set
  step119();      // Make
  step120();      // Paste
  step121();      // Make
  step122();      // Surface Blur
  step123();      // Move
  step124();      // Select
  step125();      // Apply Image
  step126();      // Delete
  step127();      // Delete
  step128();      // Make
  step129();      // Create Clipping Mask
  step130();      // Set
  step131();      // Select
  step132();      // Set
  step133();      // Select
  step134();      // Make
  step135();      // Hide
  step136();      // Select
  step137();      // Make
  step138();      // Apply Image
  step139();      // Surface Blur
  step140();      // Make
  step141();      // Apply Image
  step142();      // Delete
  step143();      // Hide
  step144();      // Select
  step145();      // Make
  step146();      // Apply Image
  step147();      // Surface Blur
  step148();      // Make
  step149();      // Apply Image
  step150();      // Delete
  step151();      // Hide
  step152();      // Select
  step153();      // Make
  step154();      // Apply Image
  step155();      // High Pass
  step156();      // Hide
  step157();      // Select
  step158();      // Make
  step159();      // Apply Image
  step160();      // High Pass
  step161();      // Show
  step162();      // Show
  step163();      // Show
  step164();      // Select
  step165();      // Make
  step166();      // Show
  step167();      // Show
  step168();      // Show
  step169();      // Show
  step170();      // Show
  step171();      // Select
  step172();      // Move
  step173();      // Select
  step174();      // Move
  step175();      // Select
  step176();      // Move
  step177();      // Set
  step178();      // Select
  step179();      // Move
  step180();      // Set
  step181();      // Set
  step182();      // Make
  step183();      // Set
  step184();      // Set
  step185();      // Set
  step186();      // Make
  step187();      // Set
  step188();      // Set
  step189();      // Make
  step190();      // Set
  step191();      // Set
  step192();      // Select
  step193();      // Select
  step194();      // Make
  step195();      // Set
  step196();      // Select
  step197();      // Select
  step198();      // Make
  step199();      // Set
  step200();      // Select
  step201();      // Show
  step202();      // Move
  step203();      // Move
  step204();      // Move
  step205();      // Set
  step206();      // Select
  step207();      // Make
  step208();      // Move
  step209();      // Set
  step210();      // Make
  step211();      // Set
  step212();      // Make
  step213();      // Apply Image
  step214();      // Select
  step215();      // Select
  step216();      // Make
  step217();      // Set
  step218();      // Set
  step219();      // Duplicate
  step220();      // Delete
  step221();      // Set
  step222();      // Select
  step223();      // Set
  step224();      // Make
  step225();      // Set
  step226();      // Set
  step227();      // Select
  step228();      // Set
  step229();      // Make
  step230();      // Select
  step231();      // Make
  step232();      // Set
  step233();      // Select
  step234();      // Make
  step235();      // Set
  step236();      // Delete
  step237();      // Delete
  step238();      // Delete
  step239();      // Delete
  step240();      // Delete
  step241();      // Delete
  step242();      // Delete
  step243();      // Delete
  step244();      // Select
  step245();      // Set
  step246();      // Select
  step247();      // Set
  step248();      // Select
  step249();      // Set
  step250();      // Select
  step251();      // Set
  step252();      // Select
  step253();      // Set
  step254();      // Select
  step255();      // Set
  step256();      // Select
  step257();      // Set
  step258();      // Select
  step259();      // Move
  step260();      // Move
  step261();      // Move
  step262();      // Select
  step263();      // Move
  step264();      // Move
  step265();      // Move
  step266();      // Move
  step267();      // Select
  step268();      // Move
  step269();      // Move
  step270();      // Move
  step271();      // Select
  step272();      // Make
};



cTID = function(s) { return app.charIDToTypeID(s); };
sTID = function(s) { return app.stringIDToTypeID(s); };

//
// SuperVolume.loadSymbols
//   Loading up the symbol definitions like this makes it possible
//   to include several of these generated files in one master file
//   provided a prefix is specified other than the default. It also
//   skips the definitions if PSConstants has already been loaded.
//
SuperVolume.loadSymbols = function() {
  var dbgLevel = $.level;
  $.level = 0;
  try {
    PSConstants;
    return; // only if PSConstants is defined
  } catch (e) {
  } finally {
    $.level = dbgLevel;
  }
  var needDefs = true;
  $.level = 0;
  try {
    PSClass;
    needDefs = false;
  } catch (e) {
  } finally {
    $.level = dbgLevel;
  }
  if (needDefs) {
    PSClass = function() {};
    PSEnum = function() {};
    PSEvent = function() {};
    PSForm = function() {};
    PSKey = function() {};
    PSType = function() {};
    PSUnit = function() {};
    PSString = function() {};
  }

  // We may still end up duplicating some of the following definitions
  // but at least we don't redefine PSClass, etc... and wipe out others
  PSClass.AdjustmentLayer = cTID('AdjL');
  PSClass.Calculation = cTID('Clcl');
  PSClass.Channel = cTID('Chnl');
  PSClass.ColorCorrection = cTID('ClrC');
  PSClass.ColorStop = cTID('Clrt');
  PSClass.Curves = cTID('Crvs');
  PSClass.CurvesAdjustment = cTID('CrvA');
  PSClass.Gradient = cTID('Grdn');
  PSClass.GradientMap = cTID('GdMp');
  PSClass.LabColorMode = cTID('LbCM');
  PSClass.Layer = cTID('Lyr ');
  PSClass.Mask = cTID('Msk ');
  PSClass.Point = cTID('Pnt ');
  PSClass.RGBColor = cTID('RGBC');
  PSClass.SelectiveColor = cTID('SlcC');
  PSClass.TransparencyStop = cTID('TrnS');
  PSEnum.Absolute = cTID('Absl');
  PSEnum.All = cTID('Al  ');
  PSEnum.AntiAliasNone = cTID('Anno');
  PSEnum.Backward = cTID('Bckw');
  PSEnum.Blocks = cTID('Blks');
  PSEnum.Blues = cTID('Bls ');
  PSEnum.ColorNoise = cTID('ClNs');
  PSEnum.Composite = cTID('Cmps');
  PSEnum.CustomStops = cTID('CstS');
  PSEnum.Cyans = cTID('Cyns');
  PSEnum.Forward = cTID('Frwr');
  PSEnum.Front = cTID('Frnt');
  PSEnum.Greens = cTID('Grns');
  PSEnum.HardLight = cTID('HrdL');
  PSEnum.HideAll = cTID('HdAl');
  PSEnum.HideSelection = cTID('HdSl');
  PSEnum.Lighten = cTID('Lghn');
  PSEnum.Lightness = cTID('Lght');
  PSEnum.Magentas = cTID('Mgnt');
  PSEnum.MaskedAreas = cTID('MskA');
  PSEnum.Merged = cTID('Mrgd');
  PSEnum.Multiply = cTID('Mltp');
  PSEnum.Neutrals = cTID('Ntrl');
  PSEnum.Next = cTID('Nxt ');
  PSEnum.None = cTID('None');
  PSEnum.Orange = cTID('Orng');
  PSEnum.Overlay = cTID('Ovrl');
  PSEnum.Previous = cTID('Prvs');
  PSEnum.RGB = cTID('RGB ');
  PSEnum.RevealAll = cTID('RvlA');
  PSEnum.Screen = cTID('Scrn');
  PSEnum.Selection = cTID('Slct');
  PSEnum.SoftLight = cTID('SftL');
  PSEnum.Target = cTID('Trgt');
  PSEnum.UserStop = cTID('UsrS');
  PSEnum.Violet = cTID('Vlt ');
  PSEnum.Whites = cTID('Whts');
  PSEnum.YellowColor = cTID('Ylw ');
  PSEnum.Yellows = cTID('Ylws');
  PSEnum.Yes = cTID('Ys  ');
  PSEvent.Close = cTID('Cls ');
  PSEvent.Copy = cTID('copy');
  PSEvent.Delete = cTID('Dlt ');
  PSEvent.Duplicate = cTID('Dplc');
  PSEvent.Hide = cTID('Hd  ');
  PSEvent.Intersect = cTID('Intr');
  PSEvent.Make = cTID('Mk  ');
  PSEvent.Move = cTID('move');
  PSEvent.Paste = cTID('past');
  PSEvent.Select = cTID('slct');
  PSEvent.Set = cTID('setd');
  PSEvent.Show = cTID('Shw ');
  PSEvent.Subtract = cTID('Sbtr');
  PSKey.Adjustment = cTID('Adjs');
  PSKey.Amount = cTID('Amnt');
  PSKey.AntiAlias = cTID('AntA');
  PSKey.As = cTID('As  ');
  PSKey.At = cTID('At  ');
  PSKey.Black = cTID('Blck');
  PSKey.Blue = cTID('Bl  ');
  PSKey.Brightness = cTID('Brgh');
  PSKey.Color = cTID('Clr ');
  PSKey.ColorIndicates = cTID('ClrI');
  PSKey.Colors = cTID('Clrs');
  PSKey.Contrast = cTID('Cntr');
  PSKey.Copy = cTID('Cpy ');
  PSKey.Curve = cTID('Crv ');
  PSKey.DocumentID = cTID('DocI');
  PSKey.EdgeFidelity = cTID('EdgF');
  PSKey.Exposure = cTID('Exps');
  PSKey.From = cTID('From');
  PSKey.Fuzziness = cTID('Fzns');
  PSKey.Gradient = cTID('Grad');
  PSKey.Green = cTID('Grn ');
  PSKey.Horizontal = cTID('Hrzn');
  PSKey.In = cTID('In  ');
  PSKey.Invert = cTID('Invr');
  PSKey.LayerID = cTID('LyrI');
  PSKey.Location = cTID('Lctn');
  PSKey.MakeVisible = cTID('MkVs');
  PSKey.Method = cTID('Mthd');
  PSKey.Midpoint = cTID('Mdpn');
  PSKey.Mode = cTID('Md  ');
  PSKey.Name = cTID('Nm  ');
  PSKey.New = cTID('Nw  ');
  PSKey.Offset = cTID('Ofst');
  PSKey.Opacity = cTID('Opct');
  PSKey.Radius = cTID('Rds ');
  PSKey.Red = cTID('Rd  ');
  PSKey.Saving = cTID('Svng');
  PSKey.Scale = cTID('Scl ');
  PSKey.Sharpness = cTID('Shrp');
  PSKey.Start = cTID('Strt');
  PSKey.Threshold = cTID('Thsh');
  PSKey.To = cTID('T   ');
  PSKey.Transparency = cTID('Trns');
  PSKey.Type = cTID('Type');
  PSKey.Using = cTID('Usng');
  PSKey.Vertical = cTID('Vrtc');
  PSKey.With = cTID('With');
  PSString.Null = sTID('null');
  PSString.addToSelection = sTID('addToSelection');
  PSString.addToSelectionContinuous = sTID('addToSelectionContinuous');
  PSString.average = sTID('average');
  PSString.channelDenoise = sTID('channelDenoise');
  PSString.channelDenoiseParams = sTID('channelDenoiseParams');
  PSString.contentLayer = sTID('contentLayer');
  PSString.gammaCorrection = sTID('gammaCorrection');
  PSString.largeDocumentFormat = sTID('largeDocumentFormat');
  PSString.layerGroup = sTID('layerSection');
  PSString.layerGroupEnd = sTID('layerSectionEnd');
  PSString.layerGroupStart = sTID('layerSectionStart');
  PSString.linearBurn = sTID('linearBurn');
  PSString.linearLight = sTID('linearLight');
  PSString.maximizeCompatibility = sTID('maximizeCompatibility');
  PSString.pdf13 = sTID('pdf13');
  PSString.preset = sTID('preset');
  PSString.presetKind = sTID('presetKind');
  PSString.presetKindCustom = sTID('presetKindCustom');
  PSString.presetKindDefault = sTID('presetKindDefault');
  PSString.presetKindType = sTID('presetKindType');
  PSString.removeJPEGArtifact = sTID('removeJPEGArtifact');
  PSString.selection = sTID('selection');
  PSString.selectionModifier = sTID('selectionModifier');
  PSString.selectionModifierType = sTID('selectionModifierType');
  PSString.shapeburst = sTID('shapeburst');
  PSString.solidColorLayer = sTID('solidColorLayer');
  PSString.subsample = sTID('subsample');
  PSType.AntiAlias = cTID('Annt');
  PSType.AreaSelector = cTID('ArSl');
  PSType.BlendMode = cTID('BlnM');
  PSType.Calculation = cTID('Clcn');
  PSType.ColorStopType = cTID('Clry');
  PSType.CorrectionMethod = cTID('CrcM');
  PSType.GradientForm = cTID('GrdF');
  PSType.MaskIndicator = cTID('MskI');
  PSType.Ordinal = cTID('Ordn');
  PSType.UserMaskOptions = cTID('UsrM');
  PSType.YesNo = cTID('YsN ');
  PSUnit.Percent = cTID('#Prc');
  PSUnit.Pixels = cTID('#Pxl');
};

SuperVolume.loadSymbols(); // load up our symbols



//=========================================
//                    SuperVolume.main
//=========================================
//

SuperVolume.main = function () {
  SuperVolume();
};

SuperVolume.main();
    },
};

$._ext_V2={
    run : function() {
function SuperVolumeX2() {
  // Select
  function step1(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step2(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.Layer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Low");
    desc1.putObject(PSKey.Using, PSClass.Layer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Move
  function step3(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Front);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Apply Image
  function step4(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Merged);
    desc2.putReference(PSKey.To, ref1);
    desc1.putObject(PSKey.With, PSClass.Calculation, desc2);
    executeAction(sTID('applyImageEvent'), desc1, dialogMode);
  };

  // Make
  function step5(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Med2");
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSString.linearLight);
    desc1.putObject(PSKey.New, PSClass.Layer, desc2);
    desc1.putEnumerated(PSKey.Using, PSType.AreaSelector, PSEnum.Selection);
    desc1.putBoolean(PSKey.Copy, true);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Make
  function step6(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Hight");
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSString.linearLight);
    desc1.putObject(PSKey.New, PSClass.Layer, desc2);
    desc1.putEnumerated(PSKey.Using, PSType.AreaSelector, PSEnum.Selection);
    desc1.putBoolean(PSKey.Copy, true);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // High Pass
  function step7(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putUnitDouble(PSKey.Radius, PSUnit.Pixels, 2.5);
    executeAction(sTID('highPass'), desc1, dialogMode);
  };

  // Brightness/Contrast
  function step8(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putInteger(PSKey.Brightness, 0);
    desc1.putInteger(PSKey.Contrast, -50);
    executeAction(sTID('brightnessEvent'), desc1, dialogMode);
  };

  // Select
  function step9(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Backward);
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Gaussian Blur
  function step10(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putUnitDouble(PSKey.Radius, PSUnit.Pixels, 2.5);
    executeAction(sTID('gaussianBlur'), desc1, dialogMode);
  };

  // High Pass
  function step11(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putUnitDouble(PSKey.Radius, PSUnit.Pixels, 8);
    executeAction(sTID('highPass'), desc1, dialogMode);
  };

  // Brightness/Contrast
  function step12(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putInteger(PSKey.Brightness, 0);
    desc1.putInteger(PSKey.Contrast, -50);
    executeAction(sTID('brightnessEvent'), desc1, dialogMode);
  };

  // Select
  function step13(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Backward);
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Gaussian Blur
  function step14(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putUnitDouble(PSKey.Radius, PSUnit.Pixels, 8);
    executeAction(sTID('gaussianBlur'), desc1, dialogMode);
  };

  // Color Range
  function step15(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putInteger(PSKey.Fuzziness, 50);
    desc1.putEnumerated(PSKey.Colors, PSKey.Colors, sTID("skinTone"));
    desc1.putInteger(sTID("colorModel"), 0);
    executeAction(sTID('colorRange'), desc1, dialogMode);
  };

  // Select
  function step16(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Med2");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step17(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putClass(PSKey.New, PSClass.Channel);
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSClass.Mask);
    desc1.putReference(PSKey.At, ref1);
    desc1.putEnumerated(PSKey.Using, PSType.UserMaskOptions, PSEnum.HideSelection);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Select
  function step18(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Hight");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Select
  function step19(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Backward);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelection);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Select
  function step20(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Backward);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelection);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step21(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSString.layerGroup);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSKey.From, ref2);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Soften Skin");
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 70);
    desc1.putObject(PSKey.Using, PSString.layerGroup, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Make
  function step22(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putClass(PSKey.New, PSClass.Channel);
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSClass.Mask);
    desc1.putReference(PSKey.At, ref1);
    desc1.putEnumerated(PSKey.Using, PSType.UserMaskOptions, PSEnum.RevealAll);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Select
  function step23(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Hide
  function step24(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Hide, desc1, dialogMode);
  };

  // Set
  function step25(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSKey.To, PSType.Ordinal, PSEnum.All);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Subtract
  function step26(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSKey.From, ref2);
    executeAction(PSEvent.Subtract, desc1, dialogMode);
  };

  // Make
  function step27(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Darks");
    desc2.putEnumerated(PSKey.ColorIndicates, PSType.MaskIndicator, PSEnum.MaskedAreas);
    var desc3 = new ActionDescriptor();
    desc3.putDouble(PSKey.Red, 255);
    desc3.putDouble(PSKey.Green, 0);
    desc3.putDouble(PSKey.Blue, 0);
    desc2.putObject(PSKey.Color, PSClass.RGBColor, desc3);
    desc2.putInteger(PSKey.Opacity, 50);
    desc1.putObject(PSKey.New, PSClass.Channel, desc2);
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSKey.Using, ref1);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step28(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSKey.To, PSType.Ordinal, PSEnum.None);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step29(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putName(PSClass.Channel, "Darks");
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Intersect
  function step30(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Channel, "Darks");
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSKey.With, ref2);
    executeAction(PSEvent.Intersect, desc1, dialogMode);
  };

  // Make
  function step31(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Darks-");
    desc2.putEnumerated(PSKey.ColorIndicates, PSType.MaskIndicator, PSEnum.MaskedAreas);
    var desc3 = new ActionDescriptor();
    desc3.putDouble(PSKey.Red, 255);
    desc3.putDouble(PSKey.Green, 0);
    desc3.putDouble(PSKey.Blue, 0);
    desc2.putObject(PSKey.Color, PSClass.RGBColor, desc3);
    desc2.putInteger(PSKey.Opacity, 50);
    desc1.putObject(PSKey.New, PSClass.Channel, desc2);
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSKey.Using, ref1);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step32(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSKey.To, PSType.Ordinal, PSEnum.None);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step33(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putName(PSClass.Channel, "Darks-");
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Intersect
  function step34(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Channel, "Darks-");
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSKey.With, ref2);
    executeAction(PSEvent.Intersect, desc1, dialogMode);
  };

  // Make
  function step35(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Darks--");
    desc2.putEnumerated(PSKey.ColorIndicates, PSType.MaskIndicator, PSEnum.MaskedAreas);
    var desc3 = new ActionDescriptor();
    desc3.putDouble(PSKey.Red, 255);
    desc3.putDouble(PSKey.Green, 0);
    desc3.putDouble(PSKey.Blue, 0);
    desc2.putObject(PSKey.Color, PSClass.RGBColor, desc3);
    desc2.putInteger(PSKey.Opacity, 50);
    desc1.putObject(PSKey.New, PSClass.Channel, desc2);
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSKey.Using, ref1);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step36(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSKey.To, PSType.Ordinal, PSEnum.None);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step37(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putName(PSClass.Channel, "Darks--");
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Intersect
  function step38(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Channel, "Darks--");
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSKey.With, ref2);
    executeAction(PSEvent.Intersect, desc1, dialogMode);
  };

  // Make
  function step39(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Darks---");
    desc2.putEnumerated(PSKey.ColorIndicates, PSType.MaskIndicator, PSEnum.MaskedAreas);
    var desc3 = new ActionDescriptor();
    desc3.putDouble(PSKey.Red, 255);
    desc3.putDouble(PSKey.Green, 0);
    desc3.putDouble(PSKey.Blue, 0);
    desc2.putObject(PSKey.Color, PSClass.RGBColor, desc3);
    desc2.putInteger(PSKey.Opacity, 50);
    desc1.putObject(PSKey.New, PSClass.Channel, desc2);
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSKey.Using, ref1);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step40(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSKey.To, PSType.Ordinal, PSEnum.None);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step41(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putName(PSClass.Channel, "Darks---");
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step42(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Dark Darks");
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 60);
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSEnum.Multiply);
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);
    desc2.putObject(PSKey.Type, PSClass.Curves, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step43(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putName(PSClass.Channel, "Darks--");
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step44(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Darks HDR");
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSEnum.Screen);
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);
    desc2.putObject(PSKey.Type, PSClass.Curves, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step45(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step46(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Lights");
    desc2.putEnumerated(PSKey.ColorIndicates, PSType.MaskIndicator, PSEnum.MaskedAreas);
    var desc3 = new ActionDescriptor();
    desc3.putDouble(PSKey.Red, 255);
    desc3.putDouble(PSKey.Green, 0);
    desc3.putDouble(PSKey.Blue, 0);
    desc2.putObject(PSKey.Color, PSClass.RGBColor, desc3);
    desc2.putInteger(PSKey.Opacity, 50);
    desc1.putObject(PSKey.New, PSClass.Channel, desc2);
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSKey.Using, ref1);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step47(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSKey.To, PSType.Ordinal, PSEnum.None);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step48(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putName(PSClass.Channel, "Lights");
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Intersect
  function step49(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Channel, "Lights");
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSKey.With, ref2);
    executeAction(PSEvent.Intersect, desc1, dialogMode);
  };

  // Make
  function step50(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Lights+");
    desc2.putEnumerated(PSKey.ColorIndicates, PSType.MaskIndicator, PSEnum.MaskedAreas);
    var desc3 = new ActionDescriptor();
    desc3.putDouble(PSKey.Red, 255);
    desc3.putDouble(PSKey.Green, 0);
    desc3.putDouble(PSKey.Blue, 0);
    desc2.putObject(PSKey.Color, PSClass.RGBColor, desc3);
    desc2.putInteger(PSKey.Opacity, 50);
    desc1.putObject(PSKey.New, PSClass.Channel, desc2);
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSKey.Using, ref1);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step51(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSKey.To, PSType.Ordinal, PSEnum.None);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step52(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putName(PSClass.Channel, "Lights+");
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Intersect
  function step53(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Channel, "Lights+");
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSKey.With, ref2);
    executeAction(PSEvent.Intersect, desc1, dialogMode);
  };

  // Make
  function step54(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Lights++");
    desc2.putEnumerated(PSKey.ColorIndicates, PSType.MaskIndicator, PSEnum.MaskedAreas);
    var desc3 = new ActionDescriptor();
    desc3.putDouble(PSKey.Red, 255);
    desc3.putDouble(PSKey.Green, 0);
    desc3.putDouble(PSKey.Blue, 0);
    desc2.putObject(PSKey.Color, PSClass.RGBColor, desc3);
    desc2.putInteger(PSKey.Opacity, 50);
    desc1.putObject(PSKey.New, PSClass.Channel, desc2);
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSKey.Using, ref1);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step55(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSKey.To, PSType.Ordinal, PSEnum.None);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step56(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putName(PSClass.Channel, "Lights++");
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step57(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Light Lights");
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 60);
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSEnum.Screen);
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);
    desc2.putObject(PSKey.Type, PSClass.Curves, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step58(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putName(PSClass.Channel, "Lights+");
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step59(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Lights HDR");
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSEnum.Multiply);
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);
    desc2.putObject(PSKey.Type, PSClass.Curves, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Select
  function step60(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Set
  function step61(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSKey.To, PSType.Ordinal, PSEnum.All);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Subtract
  function step62(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSKey.From, ref2);
    executeAction(PSEvent.Subtract, desc1, dialogMode);
  };

  // Subtract
  function step63(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Channel, "Darks");
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSKey.From, ref2);
    executeAction(PSEvent.Subtract, desc1, dialogMode);
  };

  // Make
  function step64(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);
    desc2.putObject(PSKey.Type, PSClass.Curves, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step65(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindCustom);
    var list1 = new ActionList();
    var desc3 = new ActionDescriptor();
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.Composite);
    desc3.putReference(PSClass.Channel, ref2);
    var list2 = new ActionList();
    var desc4 = new ActionDescriptor();
    desc4.putDouble(PSKey.Horizontal, 0);
    desc4.putDouble(PSKey.Vertical, 0);
    list2.putObject(PSClass.Point, desc4);
    var desc5 = new ActionDescriptor();
    desc5.putDouble(PSKey.Horizontal, 64);
    desc5.putDouble(PSKey.Vertical, 30);
    list2.putObject(PSClass.Point, desc5);
    var desc6 = new ActionDescriptor();
    desc6.putDouble(PSKey.Horizontal, 128);
    desc6.putDouble(PSKey.Vertical, 128);
    list2.putObject(PSClass.Point, desc6);
    var desc7 = new ActionDescriptor();
    desc7.putDouble(PSKey.Horizontal, 192);
    desc7.putDouble(PSKey.Vertical, 224);
    list2.putObject(PSClass.Point, desc7);
    var desc8 = new ActionDescriptor();
    desc8.putDouble(PSKey.Horizontal, 255);
    desc8.putDouble(PSKey.Vertical, 255);
    list2.putObject(PSClass.Point, desc8);
    desc3.putList(PSKey.Curve, list2);
    list1.putObject(PSClass.CurvesAdjustment, desc3);
    desc2.putList(PSKey.Adjustment, list1);
    desc1.putObject(PSKey.To, PSClass.Curves, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step66(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Contrast");
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step67(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Auto Contrast");
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);
    desc2.putObject(PSKey.Type, PSClass.Curves, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step68(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindCustom);
    var list1 = new ActionList();
    var desc3 = new ActionDescriptor();
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.Composite);
    desc3.putReference(PSClass.Channel, ref2);
    desc3.putBoolean(sTID("autoMachineLearning"), true);
    desc3.putBoolean(sTID("autoFaces"), true);
    list1.putObject(PSClass.CurvesAdjustment, desc3);
    desc2.putList(PSKey.Adjustment, list1);
    desc1.putObject(PSKey.To, PSClass.Curves, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step69(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSClass.Mask);
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Delete
  function step70(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Delete, desc1, dialogMode);
  };

  // Make
  function step71(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putClass(PSKey.New, PSClass.Channel);
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSClass.Mask);
    ref1.putName(PSClass.Layer, "Auto Contrast");
    desc1.putReference(PSKey.At, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Channel, PSClass.Channel, PSClass.Mask);
    ref2.putName(PSClass.Layer, "Contrast");
    desc1.putReference(PSKey.Using, ref2);
    desc1.putBoolean(PSEvent.Duplicate, true);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Hide
  function step72(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Contrast");
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Hide, desc1, dialogMode);
  };

  // Hide
  function step73(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Dark Darks");
    ref1.putName(PSClass.Layer, "Darks HDR");
    ref1.putName(PSClass.Layer, "Light Lights");
    ref1.putName(PSClass.Layer, "Lights HDR");
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Hide, desc1, dialogMode);
  };

  // Hide
  function step74(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Hide, desc1, dialogMode);
  };

  // Select
  function step75(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step76(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.Layer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "map");
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 50);
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSString.linearLight);
    desc1.putObject(PSKey.Using, PSClass.Layer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Apply Image
  function step77(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Merged);
    desc2.putReference(PSKey.To, ref1);
    desc2.putBoolean(PSKey.Invert, true);
    desc1.putObject(PSKey.With, PSClass.Calculation, desc2);
    executeAction(sTID('applyImageEvent'), desc1, dialogMode);
  };

  // Surface Blur
  function step78(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putUnitDouble(PSKey.Radius, PSUnit.Pixels, 30);
    desc1.putInteger(PSKey.Threshold, 30);
    executeAction(sTID('surfaceBlur'), desc1, dialogMode);
  };

  // Make
  function step79(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.Layer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Large Contrast");
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSEnum.Overlay);
    desc1.putObject(PSKey.Using, PSClass.Layer, desc2);
    desc1.putInteger(PSKey.LayerID, 299);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Apply Image
  function step80(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Merged);
    desc2.putReference(PSKey.To, ref1);
    desc1.putObject(PSKey.With, PSClass.Calculation, desc2);
    executeAction(sTID('applyImageEvent'), desc1, dialogMode);
  };

  // Delete
  function step81(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "map");
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Delete, desc1, dialogMode);
  };

  // Reduce Noise
  function step82(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putUnitDouble(PSEnum.ColorNoise, PSUnit.Percent, 0);
    desc1.putUnitDouble(PSKey.Sharpness, PSUnit.Percent, 0);
    desc1.putBoolean(PSString.removeJPEGArtifact, false);
    var list1 = new ActionList();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.Composite);
    desc2.putReference(PSClass.Channel, ref1);
    desc2.putInteger(PSKey.Amount, 10);
    desc2.putInteger(PSKey.EdgeFidelity, 0);
    list1.putObject(PSString.channelDenoiseParams, desc2);
    var desc3 = new ActionDescriptor();
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Channel, PSClass.Channel, PSKey.Red);
    desc3.putReference(PSClass.Channel, ref2);
    desc3.putInteger(PSKey.Amount, 0);
    list1.putObject(PSString.channelDenoiseParams, desc3);
    var desc4 = new ActionDescriptor();
    var ref3 = new ActionReference();
    ref3.putEnumerated(PSClass.Channel, PSClass.Channel, PSKey.Green);
    desc4.putReference(PSClass.Channel, ref3);
    desc4.putInteger(PSKey.Amount, 0);
    list1.putObject(PSString.channelDenoiseParams, desc4);
    var desc5 = new ActionDescriptor();
    var ref4 = new ActionReference();
    ref4.putEnumerated(PSClass.Channel, PSClass.Channel, PSKey.Blue);
    desc5.putReference(PSClass.Channel, ref4);
    desc5.putInteger(PSKey.Amount, 0);
    list1.putObject(PSString.channelDenoiseParams, desc5);
    desc1.putList(PSString.channelDenoise, list1);
    desc1.putString(PSString.preset, "По умолчанию");
    executeAction(sTID('denoise'), desc1, dialogMode);
  };

  // Reduce Noise
  function step83(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putUnitDouble(PSEnum.ColorNoise, PSUnit.Percent, 0);
    desc1.putUnitDouble(PSKey.Sharpness, PSUnit.Percent, 0);
    desc1.putBoolean(PSString.removeJPEGArtifact, false);
    var list1 = new ActionList();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.Composite);
    desc2.putReference(PSClass.Channel, ref1);
    desc2.putInteger(PSKey.Amount, 10);
    desc2.putInteger(PSKey.EdgeFidelity, 0);
    list1.putObject(PSString.channelDenoiseParams, desc2);
    var desc3 = new ActionDescriptor();
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Channel, PSClass.Channel, PSKey.Red);
    desc3.putReference(PSClass.Channel, ref2);
    desc3.putInteger(PSKey.Amount, 0);
    list1.putObject(PSString.channelDenoiseParams, desc3);
    var desc4 = new ActionDescriptor();
    var ref3 = new ActionReference();
    ref3.putEnumerated(PSClass.Channel, PSClass.Channel, PSKey.Green);
    desc4.putReference(PSClass.Channel, ref3);
    desc4.putInteger(PSKey.Amount, 0);
    list1.putObject(PSString.channelDenoiseParams, desc4);
    var desc5 = new ActionDescriptor();
    var ref4 = new ActionReference();
    ref4.putEnumerated(PSClass.Channel, PSClass.Channel, PSKey.Blue);
    desc5.putReference(PSClass.Channel, ref4);
    desc5.putInteger(PSKey.Amount, 0);
    list1.putObject(PSString.channelDenoiseParams, desc5);
    desc1.putList(PSString.channelDenoise, list1);
    desc1.putString(PSString.preset, "По умолчанию");
    executeAction(sTID('denoise'), desc1, dialogMode);
  };

  // Hide
  function step84(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Large Contrast");
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Hide, desc1, dialogMode);
  };

  // Select
  function step85(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step86(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.Layer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "map");
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 50);
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSString.linearLight);
    desc1.putObject(PSKey.Using, PSClass.Layer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Apply Image
  function step87(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Merged);
    desc2.putReference(PSKey.To, ref1);
    desc2.putBoolean(PSKey.Invert, true);
    desc1.putObject(PSKey.With, PSClass.Calculation, desc2);
    executeAction(sTID('applyImageEvent'), desc1, dialogMode);
  };

  // Surface Blur
  function step88(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putUnitDouble(PSKey.Radius, PSUnit.Pixels, 20);
    desc1.putInteger(PSKey.Threshold, 20);
    executeAction(sTID('surfaceBlur'), desc1, dialogMode);
  };

  // Make
  function step89(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.Layer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Medium Contrast");
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSEnum.Overlay);
    desc1.putObject(PSKey.Using, PSClass.Layer, desc2);
    desc1.putInteger(PSKey.LayerID, 301);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Apply Image
  function step90(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Merged);
    desc2.putReference(PSKey.To, ref1);
    desc1.putObject(PSKey.With, PSClass.Calculation, desc2);
    executeAction(sTID('applyImageEvent'), desc1, dialogMode);
  };

  // Delete
  function step91(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "map");
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Delete, desc1, dialogMode);
  };

  // Reduce Noise
  function step92(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putUnitDouble(PSEnum.ColorNoise, PSUnit.Percent, 0);
    desc1.putUnitDouble(PSKey.Sharpness, PSUnit.Percent, 0);
    desc1.putBoolean(PSString.removeJPEGArtifact, false);
    var list1 = new ActionList();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.Composite);
    desc2.putReference(PSClass.Channel, ref1);
    desc2.putInteger(PSKey.Amount, 10);
    desc2.putInteger(PSKey.EdgeFidelity, 0);
    list1.putObject(PSString.channelDenoiseParams, desc2);
    var desc3 = new ActionDescriptor();
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Channel, PSClass.Channel, PSKey.Red);
    desc3.putReference(PSClass.Channel, ref2);
    desc3.putInteger(PSKey.Amount, 0);
    list1.putObject(PSString.channelDenoiseParams, desc3);
    var desc4 = new ActionDescriptor();
    var ref3 = new ActionReference();
    ref3.putEnumerated(PSClass.Channel, PSClass.Channel, PSKey.Green);
    desc4.putReference(PSClass.Channel, ref3);
    desc4.putInteger(PSKey.Amount, 0);
    list1.putObject(PSString.channelDenoiseParams, desc4);
    var desc5 = new ActionDescriptor();
    var ref4 = new ActionReference();
    ref4.putEnumerated(PSClass.Channel, PSClass.Channel, PSKey.Blue);
    desc5.putReference(PSClass.Channel, ref4);
    desc5.putInteger(PSKey.Amount, 0);
    list1.putObject(PSString.channelDenoiseParams, desc5);
    desc1.putList(PSString.channelDenoise, list1);
    desc1.putString(PSString.preset, "По умолчанию");
    executeAction(sTID('denoise'), desc1, dialogMode);
  };

  // Reduce Noise
  function step93(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putUnitDouble(PSEnum.ColorNoise, PSUnit.Percent, 0);
    desc1.putUnitDouble(PSKey.Sharpness, PSUnit.Percent, 0);
    desc1.putBoolean(PSString.removeJPEGArtifact, false);
    var list1 = new ActionList();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.Composite);
    desc2.putReference(PSClass.Channel, ref1);
    desc2.putInteger(PSKey.Amount, 10);
    desc2.putInteger(PSKey.EdgeFidelity, 0);
    list1.putObject(PSString.channelDenoiseParams, desc2);
    var desc3 = new ActionDescriptor();
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Channel, PSClass.Channel, PSKey.Red);
    desc3.putReference(PSClass.Channel, ref2);
    desc3.putInteger(PSKey.Amount, 0);
    list1.putObject(PSString.channelDenoiseParams, desc3);
    var desc4 = new ActionDescriptor();
    var ref3 = new ActionReference();
    ref3.putEnumerated(PSClass.Channel, PSClass.Channel, PSKey.Green);
    desc4.putReference(PSClass.Channel, ref3);
    desc4.putInteger(PSKey.Amount, 0);
    list1.putObject(PSString.channelDenoiseParams, desc4);
    var desc5 = new ActionDescriptor();
    var ref4 = new ActionReference();
    ref4.putEnumerated(PSClass.Channel, PSClass.Channel, PSKey.Blue);
    desc5.putReference(PSClass.Channel, ref4);
    desc5.putInteger(PSKey.Amount, 0);
    list1.putObject(PSString.channelDenoiseParams, desc5);
    desc1.putList(PSString.channelDenoise, list1);
    desc1.putString(PSString.preset, "По умолчанию");
    executeAction(sTID('denoise'), desc1, dialogMode);
  };

  // Hide
  function step94(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Medium Contrast");
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Hide, desc1, dialogMode);
  };

  // Select
  function step95(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step96(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.Layer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "map");
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 50);
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSString.linearLight);
    desc1.putObject(PSKey.Using, PSClass.Layer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Apply Image
  function step97(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Merged);
    desc2.putReference(PSKey.To, ref1);
    desc2.putBoolean(PSKey.Invert, true);
    desc1.putObject(PSKey.With, PSClass.Calculation, desc2);
    executeAction(sTID('applyImageEvent'), desc1, dialogMode);
  };

  // Surface Blur
  function step98(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putUnitDouble(PSKey.Radius, PSUnit.Pixels, 10);
    desc1.putInteger(PSKey.Threshold, 15);
    executeAction(sTID('surfaceBlur'), desc1, dialogMode);
  };

  // Make
  function step99(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.Layer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Small Contrast");
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSEnum.Overlay);
    desc1.putObject(PSKey.Using, PSClass.Layer, desc2);
    desc1.putInteger(PSKey.LayerID, 303);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Apply Image
  function step100(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Merged);
    desc2.putReference(PSKey.To, ref1);
    desc1.putObject(PSKey.With, PSClass.Calculation, desc2);
    executeAction(sTID('applyImageEvent'), desc1, dialogMode);
  };

  // Delete
  function step101(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "map");
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Delete, desc1, dialogMode);
  };

  // Reduce Noise
  function step102(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putUnitDouble(PSEnum.ColorNoise, PSUnit.Percent, 0);
    desc1.putUnitDouble(PSKey.Sharpness, PSUnit.Percent, 0);
    desc1.putBoolean(PSString.removeJPEGArtifact, false);
    var list1 = new ActionList();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.Composite);
    desc2.putReference(PSClass.Channel, ref1);
    desc2.putInteger(PSKey.Amount, 10);
    desc2.putInteger(PSKey.EdgeFidelity, 0);
    list1.putObject(PSString.channelDenoiseParams, desc2);
    var desc3 = new ActionDescriptor();
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Channel, PSClass.Channel, PSKey.Red);
    desc3.putReference(PSClass.Channel, ref2);
    desc3.putInteger(PSKey.Amount, 0);
    list1.putObject(PSString.channelDenoiseParams, desc3);
    var desc4 = new ActionDescriptor();
    var ref3 = new ActionReference();
    ref3.putEnumerated(PSClass.Channel, PSClass.Channel, PSKey.Green);
    desc4.putReference(PSClass.Channel, ref3);
    desc4.putInteger(PSKey.Amount, 0);
    list1.putObject(PSString.channelDenoiseParams, desc4);
    var desc5 = new ActionDescriptor();
    var ref4 = new ActionReference();
    ref4.putEnumerated(PSClass.Channel, PSClass.Channel, PSKey.Blue);
    desc5.putReference(PSClass.Channel, ref4);
    desc5.putInteger(PSKey.Amount, 0);
    list1.putObject(PSString.channelDenoiseParams, desc5);
    desc1.putList(PSString.channelDenoise, list1);
    desc1.putString(PSString.preset, "По умолчанию");
    executeAction(sTID('denoise'), desc1, dialogMode);
  };

  // Reduce Noise
  function step103(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putUnitDouble(PSEnum.ColorNoise, PSUnit.Percent, 0);
    desc1.putUnitDouble(PSKey.Sharpness, PSUnit.Percent, 0);
    desc1.putBoolean(PSString.removeJPEGArtifact, false);
    var list1 = new ActionList();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.Composite);
    desc2.putReference(PSClass.Channel, ref1);
    desc2.putInteger(PSKey.Amount, 10);
    desc2.putInteger(PSKey.EdgeFidelity, 0);
    list1.putObject(PSString.channelDenoiseParams, desc2);
    var desc3 = new ActionDescriptor();
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Channel, PSClass.Channel, PSKey.Red);
    desc3.putReference(PSClass.Channel, ref2);
    desc3.putInteger(PSKey.Amount, 0);
    list1.putObject(PSString.channelDenoiseParams, desc3);
    var desc4 = new ActionDescriptor();
    var ref3 = new ActionReference();
    ref3.putEnumerated(PSClass.Channel, PSClass.Channel, PSKey.Green);
    desc4.putReference(PSClass.Channel, ref3);
    desc4.putInteger(PSKey.Amount, 0);
    list1.putObject(PSString.channelDenoiseParams, desc4);
    var desc5 = new ActionDescriptor();
    var ref4 = new ActionReference();
    ref4.putEnumerated(PSClass.Channel, PSClass.Channel, PSKey.Blue);
    desc5.putReference(PSClass.Channel, ref4);
    desc5.putInteger(PSKey.Amount, 0);
    list1.putObject(PSString.channelDenoiseParams, desc5);
    desc1.putList(PSString.channelDenoise, list1);
    desc1.putString(PSString.preset, "По умолчанию");
    executeAction(sTID('denoise'), desc1, dialogMode);
  };

  // Show
  function step104(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Medium Contrast");
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Show, desc1, dialogMode);
  };

  // Show
  function step105(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Large Contrast");
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Show, desc1, dialogMode);
  };

  // Select
  function step106(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Large Contrast");
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelectionContinuous);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step107(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSString.layerGroup);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSKey.From, ref2);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Group Local Contrast");
    desc1.putObject(PSKey.Using, PSString.layerGroup, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Hide
  function step108(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Hide, desc1, dialogMode);
  };

  // Make
  function step109(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.Layer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "_Temp");
    desc1.putObject(PSKey.Using, PSClass.Layer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Move
  function step110(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Front);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Apply Image
  function step111(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Merged);
    desc2.putReference(PSKey.To, ref1);
    desc1.putObject(PSKey.With, PSClass.Calculation, desc2);
    executeAction(sTID('applyImageEvent'), desc1, dialogMode);
  };

  // Convert to Smart Object
  function step112(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    executeAction(sTID('newPlacedLayer'), undefined, dialogMode);
  };

  // Edit Contents
  function step113(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    executeAction(sTID('placedLayerEditContents'), desc1, dialogMode);
  };

  // Convert Mode
  function step114(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putClass(PSKey.To, PSClass.LabColorMode);
    executeAction(sTID('convertMode'), desc1, dialogMode);
  };

  // Select
  function step115(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.Lightness);
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Set
  function step116(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSKey.To, PSType.Ordinal, PSEnum.All);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Copy
  function step117(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    executeAction(PSEvent.Copy, undefined, dialogMode);
  };

  // Close
  function step118(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    desc2.putBoolean(PSString.maximizeCompatibility, false);
    desc1.putObject(PSKey.As, PSString.largeDocumentFormat, desc2);
    desc1.putPath(PSKey.In, new File("~/AppData/Local/Temp"));
    desc1.putInteger(PSKey.DocumentID, 414);
    desc1.putEnumerated(PSKey.Saving, PSType.YesNo, PSEnum.Yes);
    executeAction(PSEvent.Close, desc1, dialogMode);
  };

  // Update Smart Objects
  function step119(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    executeAction(sTID('updatePlacedLayer'), undefined, dialogMode);
  };

  // Set
  function step120(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "_Temp");
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step121(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.Layer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Black");
    desc1.putObject(PSKey.Using, PSClass.Layer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Paste
  function step122(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putEnumerated(PSKey.AntiAlias, PSType.AntiAlias, PSEnum.AntiAliasNone);
    executeAction(PSEvent.Paste, desc1, dialogMode);
  };

  // Make
  function step123(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Black Blur");
    desc1.putObject(PSKey.New, PSClass.Layer, desc2);
    desc1.putEnumerated(PSKey.Using, PSType.AreaSelector, PSEnum.Selection);
    desc1.putBoolean(PSKey.Copy, true);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Surface Blur
  function step124(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putUnitDouble(PSKey.Radius, PSUnit.Pixels, 30);
    desc1.putInteger(PSKey.Threshold, 60);
    executeAction(sTID('surfaceBlur'), desc1, dialogMode);
  };

  // Move
  function step125(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Previous);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Select
  function step126(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Black");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Apply Image
  function step127(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    ref1.putName(PSClass.Layer, "Black Blur");
    desc2.putReference(PSKey.To, ref1);
    desc2.putEnumerated(PSClass.Calculation, PSType.Calculation, PSEvent.Subtract);
    desc2.putDouble(PSKey.Scale, 2);
    desc2.putInteger(PSKey.Offset, 128);
    desc1.putObject(PSKey.With, PSClass.Calculation, desc2);
    executeAction(sTID('applyImageEvent'), desc1, dialogMode);
  };

  // Delete
  function step128(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Black Blur");
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Delete, desc1, dialogMode);
  };

  // Delete
  function step129(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "_Temp");
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Delete, desc1, dialogMode);
  };

  // Make
  function step130(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "ajust");
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);
    desc2.putObject(PSKey.Type, PSClass.Curves, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Create Clipping Mask
  function step131(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    executeAction(sTID('groupEvent'), desc1, dialogMode);
  };

  // Set
  function step132(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindCustom);
    var list1 = new ActionList();
    var desc3 = new ActionDescriptor();
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.Composite);
    desc3.putReference(PSClass.Channel, ref2);
    var list2 = new ActionList();
    var desc4 = new ActionDescriptor();
    desc4.putDouble(PSKey.Horizontal, 0);
    desc4.putDouble(PSKey.Vertical, 80);
    list2.putObject(PSClass.Point, desc4);
    var desc5 = new ActionDescriptor();
    desc5.putDouble(PSKey.Horizontal, 81);
    desc5.putDouble(PSKey.Vertical, 98);
    list2.putObject(PSClass.Point, desc5);
    var desc6 = new ActionDescriptor();
    desc6.putDouble(PSKey.Horizontal, 128);
    desc6.putDouble(PSKey.Vertical, 128);
    list2.putObject(PSClass.Point, desc6);
    var desc7 = new ActionDescriptor();
    desc7.putDouble(PSKey.Horizontal, 185);
    desc7.putDouble(PSKey.Vertical, 255);
    list2.putObject(PSClass.Point, desc7);
    desc3.putList(PSKey.Curve, list2);
    list1.putObject(PSClass.CurvesAdjustment, desc3);
    desc2.putList(PSKey.Adjustment, list1);
    desc1.putObject(PSKey.To, PSClass.Curves, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step133(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Black");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Set
  function step134(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSEnum.HardLight);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step135(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Forward);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelection);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step136(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSString.layerGroup);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSKey.From, ref2);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Clarity");
    desc1.putObject(PSKey.Using, PSString.layerGroup, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Hide
  function step137(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Hide, desc1, dialogMode);
  };

  // Select
  function step138(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step139(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.Layer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "map");
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 50);
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSString.linearLight);
    desc1.putObject(PSKey.Using, PSClass.Layer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Apply Image
  function step140(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Merged);
    desc2.putReference(PSKey.To, ref1);
    desc2.putBoolean(PSKey.Invert, true);
    desc1.putObject(PSKey.With, PSClass.Calculation, desc2);
    executeAction(sTID('applyImageEvent'), desc1, dialogMode);
  };

  // Surface Blur
  function step141(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putUnitDouble(PSKey.Radius, PSUnit.Pixels, 4);
    desc1.putInteger(PSKey.Threshold, 8);
    executeAction(sTID('surfaceBlur'), desc1, dialogMode);
  };

  // Make
  function step142(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.Layer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Large Sharp");
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSEnum.SoftLight);
    desc1.putObject(PSKey.Using, PSClass.Layer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Apply Image
  function step143(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Merged);
    desc2.putReference(PSKey.To, ref1);
    desc1.putObject(PSKey.With, PSClass.Calculation, desc2);
    executeAction(sTID('applyImageEvent'), desc1, dialogMode);
  };

  // Delete
  function step144(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "map");
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Delete, desc1, dialogMode);
  };

  // Hide
  function step145(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Hide, desc1, dialogMode);
  };

  // Select
  function step146(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step147(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.Layer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "map");
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 50);
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSString.linearLight);
    desc1.putObject(PSKey.Using, PSClass.Layer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Apply Image
  function step148(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Merged);
    desc2.putReference(PSKey.To, ref1);
    desc2.putBoolean(PSKey.Invert, true);
    desc1.putObject(PSKey.With, PSClass.Calculation, desc2);
    executeAction(sTID('applyImageEvent'), desc1, dialogMode);
  };

  // Surface Blur
  function step149(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putUnitDouble(PSKey.Radius, PSUnit.Pixels, 2);
    desc1.putInteger(PSKey.Threshold, 8);
    executeAction(sTID('surfaceBlur'), desc1, dialogMode);
  };

  // Make
  function step150(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.Layer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Medium Sharp");
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSEnum.Overlay);
    desc1.putObject(PSKey.Using, PSClass.Layer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Apply Image
  function step151(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Merged);
    desc2.putReference(PSKey.To, ref1);
    desc1.putObject(PSKey.With, PSClass.Calculation, desc2);
    executeAction(sTID('applyImageEvent'), desc1, dialogMode);
  };

  // Delete
  function step152(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "map");
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Delete, desc1, dialogMode);
  };

  // Hide
  function step153(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Hide, desc1, dialogMode);
  };

  // Select
  function step154(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step155(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.Layer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Small Sharp");
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSEnum.Overlay);
    desc1.putObject(PSKey.Using, PSClass.Layer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Apply Image
  function step156(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Merged);
    desc2.putReference(PSKey.To, ref1);
    desc1.putObject(PSKey.With, PSClass.Calculation, desc2);
    executeAction(sTID('applyImageEvent'), desc1, dialogMode);
  };

  // High Pass
  function step157(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putUnitDouble(PSKey.Radius, PSUnit.Pixels, 1);
    executeAction(sTID('highPass'), desc1, dialogMode);
  };

  // Hide
  function step158(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Hide, desc1, dialogMode);
  };

  // Select
  function step159(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step160(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.Layer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Super Small Sharp");
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSEnum.Overlay);
    desc1.putObject(PSKey.Using, PSClass.Layer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Apply Image
  function step161(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Merged);
    desc2.putReference(PSKey.To, ref1);
    desc1.putObject(PSKey.With, PSClass.Calculation, desc2);
    executeAction(sTID('applyImageEvent'), desc1, dialogMode);
  };

  // High Pass
  function step162(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putUnitDouble(PSKey.Radius, PSUnit.Pixels, 0.5);
    executeAction(sTID('highPass'), desc1, dialogMode);
  };

  // Show
  function step163(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Small Sharp");
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Show, desc1, dialogMode);
  };

  // Show
  function step164(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Medium Sharp");
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Show, desc1, dialogMode);
  };

  // Show
  function step165(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Large Sharp");
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Show, desc1, dialogMode);
  };

  // Select
  function step166(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Large Sharp");
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelectionContinuous);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step167(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSString.layerGroup);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSKey.From, ref2);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Group Sharp");
    desc1.putObject(PSKey.Using, PSString.layerGroup, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Show
  function step168(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Clarity");
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Show, desc1, dialogMode);
  };

  // Show
  function step169(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Group Local Contrast");
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Show, desc1, dialogMode);
  };

  // Show
  function step170(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Auto Contrast");
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Show, desc1, dialogMode);
  };

  // Show
  function step171(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Contrast");
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Show, desc1, dialogMode);
  };

  // Show
  function step172(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Dark Darks");
    ref1.putName(PSClass.Layer, "Darks HDR");
    ref1.putName(PSClass.Layer, "Light Lights");
    ref1.putName(PSClass.Layer, "Lights HDR");
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Show, desc1, dialogMode);
  };

  // Select
  function step173(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Contrast");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Move
  function step174(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Front);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Select
  function step175(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Auto Contrast");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Move
  function step176(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Front);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Select
  function step177(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Dark Darks");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Move
  function step178(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Front);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Set
  function step179(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Punch Darks");
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step180(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Light Lights");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Move
  function step181(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Front);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Set
  function step182(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Punch Lights");
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step183(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step184(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Dynamic Low Key");
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);
    desc2.putObject(PSKey.Type, PSClass.Curves, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step185(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSEnum.Multiply);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step186(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putUnitDouble(sTID("userMaskFeather"), PSUnit.Pixels, 20);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step187(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putName(PSClass.Channel, "Darks-");
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step188(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Punch Darks+");
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 50);
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);
    desc2.putObject(PSKey.Type, PSClass.Curves, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step189(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSString.linearBurn);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step190(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putName(PSClass.Channel, "Darks-");
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step191(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Fade Darks");
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);
    desc3.putDouble(PSKey.Exposure, 0);
    desc3.putDouble(PSKey.Offset, 0);
    desc3.putDouble(PSString.gammaCorrection, 1);
    desc2.putObject(PSKey.Type, PSKey.Exposure, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step192(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindCustom);
    desc2.putDouble(PSKey.Exposure, 0.10000000149012);
    desc2.putDouble(PSKey.Offset, 0.00999999977648);
    desc1.putObject(PSKey.To, PSKey.Exposure, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step193(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 25);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step194(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Select
  function step195(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Contrast");
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelectionContinuous);
    desc1.putBoolean(PSKey.MakeVisible, false);
    var list1 = new ActionList();
    list1.putInteger(15);
    list1.putInteger(sTID("skinTone"), 16);
    list1.putInteger(sTID("contentAware"), 6);
    list1.putInteger(PSString.shapeburst, 11);
    list1.putInteger(PSString.average, 44);
    list1.putInteger(PSString.subsample, 45);
    list1.putInteger(PSString.pdf13, 46);
    desc1.putList(PSKey.LayerID, list1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step196(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSString.layerGroup);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSKey.From, ref2);
    desc1.putInteger(PSString.layerGroupStart, 47);
    desc1.putInteger(PSString.layerGroupEnd, 48);
    desc1.putString(PSKey.Name, "Группа 1");
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step197(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Pro Contrast");
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step198(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Lights HDR");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    var list1 = new ActionList();
    list1.putInteger(93);
    desc1.putList(PSKey.LayerID, list1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Select
  function step199(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Darks HDR");
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelectionContinuous);
    desc1.putBoolean(PSKey.MakeVisible, false);
    var list1 = new ActionList();
    list1.putInteger(88);
    list1.putInteger(sTID("skinTone"), 93);
    desc1.putList(PSKey.LayerID, list1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step200(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSString.layerGroup);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSKey.From, ref2);
    desc1.putInteger(PSString.layerGroupStart, 127);
    desc1.putInteger(PSString.layerGroupEnd, 128);
    desc1.putString(PSKey.Name, "Группа 1");
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step201(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "HDR");
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step202(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Soften Skin");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    var list1 = new ActionList();
    list1.putInteger(81);
    desc1.putList(PSKey.LayerID, list1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Show
  function step203(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Show, desc1, dialogMode);
  };

  // Move
  function step204(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Next);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Move
  function step205(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Next);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Move
  function step206(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Next);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Set
  function step207(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 44);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step208(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step209(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "SelectiveColor");
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);
    desc2.putObject(PSKey.Type, PSClass.SelectiveColor, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Move
  function step210(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Front);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Set
  function step211(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindCustom);
    desc2.putEnumerated(PSKey.Method, PSType.CorrectionMethod, PSEnum.Absolute);
    var list1 = new ActionList();
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSKey.Colors, PSKey.Colors, PSKey.Radius);
    desc3.putUnitDouble(PSKey.Black, PSUnit.Percent, -100);
    list1.putObject(PSClass.ColorCorrection, desc3);
    var desc4 = new ActionDescriptor();
    desc4.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Yellows);
    desc4.putUnitDouble(PSKey.Black, PSUnit.Percent, -100);
    list1.putObject(PSClass.ColorCorrection, desc4);
    var desc5 = new ActionDescriptor();
    desc5.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Greens);
    desc5.putUnitDouble(PSKey.Black, PSUnit.Percent, -100);
    list1.putObject(PSClass.ColorCorrection, desc5);
    var desc6 = new ActionDescriptor();
    desc6.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Cyans);
    desc6.putUnitDouble(PSKey.Black, PSUnit.Percent, -100);
    list1.putObject(PSClass.ColorCorrection, desc6);
    var desc7 = new ActionDescriptor();
    desc7.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Blues);
    desc7.putUnitDouble(PSKey.Black, PSUnit.Percent, -100);
    list1.putObject(PSClass.ColorCorrection, desc7);
    var desc8 = new ActionDescriptor();
    desc8.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Magentas);
    desc8.putUnitDouble(PSKey.Black, PSUnit.Percent, -100);
    list1.putObject(PSClass.ColorCorrection, desc8);
    var desc9 = new ActionDescriptor();
    desc9.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Whites);
    desc9.putUnitDouble(PSKey.Black, PSUnit.Percent, 100);
    list1.putObject(PSClass.ColorCorrection, desc9);
    var desc10 = new ActionDescriptor();
    desc10.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Neutrals);
    desc10.putUnitDouble(PSKey.Black, PSUnit.Percent, 100);
    list1.putObject(PSClass.ColorCorrection, desc10);
    var desc11 = new ActionDescriptor();
    desc11.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Blocks);
    desc11.putUnitDouble(PSKey.Black, PSUnit.Percent, 100);
    list1.putObject(PSClass.ColorCorrection, desc11);
    desc2.putList(PSClass.ColorCorrection, list1);
    desc1.putObject(PSKey.To, PSClass.SelectiveColor, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step212(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "ContrastForMask");
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);
    desc2.putObject(PSKey.Type, PSClass.Curves, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step213(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    var list1 = new ActionList();
    var desc3 = new ActionDescriptor();
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.Composite);
    desc3.putReference(PSClass.Channel, ref2);
    var list2 = new ActionList();
    var desc4 = new ActionDescriptor();
    desc4.putDouble(PSKey.Horizontal, 0);
    desc4.putDouble(PSKey.Vertical, 0);
    list2.putObject(PSClass.Point, desc4);
    var desc5 = new ActionDescriptor();
    desc5.putDouble(PSKey.Horizontal, 128);
    desc5.putDouble(PSKey.Vertical, 255);
    list2.putObject(PSClass.Point, desc5);
    desc3.putList(PSKey.Curve, list2);
    list1.putObject(PSClass.CurvesAdjustment, desc3);
    desc2.putList(PSKey.Adjustment, list1);
    desc1.putObject(PSKey.To, PSClass.Curves, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step214(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.Layer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "MergedContrastMask");
    desc1.putObject(PSKey.Using, PSClass.Layer, desc2);
    desc1.putInteger(PSKey.LayerID, 358);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Apply Image
  function step215(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Merged);
    desc2.putReference(PSKey.To, ref1);
    desc1.putObject(PSKey.With, PSClass.Calculation, desc2);
    executeAction(sTID('applyImageEvent'), desc1, dialogMode);
  };

  // Select
  function step216(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Backward);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelection);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Select
  function step217(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Backward);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelection);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step218(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSString.layerGroup);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSKey.From, ref2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step219(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Saturation Mask");
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step220(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Duplicate
  function step221(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    desc1.putString(PSKey.Name, "SaturnMask");
    executeAction(PSEvent.Duplicate, desc1, dialogMode);
  };

  // Delete
  function step222(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Delete, desc1, dialogMode);
  };

  // Set
  function step223(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSKey.To, PSType.Ordinal, PSEnum.None);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step224(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Set
  function step225(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putName(PSClass.Channel, "SaturnMask");
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step226(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Desaturate heavily saturated");
    desc2.putClass(PSKey.Type, sTID("vibrance"));
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step227(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 40);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step228(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putInteger(PSKey.Start, -50);
    desc1.putObject(PSKey.To, sTID("vibrance"), desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step229(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Set
  function step230(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putName(PSClass.Channel, "Darks---");
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step231(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSString.contentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Make Shadows Cool");
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 15);
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSEnum.Lighten);
    var desc3 = new ActionDescriptor();
    var desc4 = new ActionDescriptor();
    desc4.putDouble(PSKey.Red, 0);
    desc4.putDouble(PSKey.Green, 49.9992370605469);
    desc4.putDouble(PSKey.Blue, 149.997711181641);
    desc3.putObject(PSKey.Color, PSClass.RGBColor, desc4);
    desc2.putObject(PSKey.Type, PSString.solidColorLayer, desc3);
    desc1.putObject(PSKey.Using, PSString.contentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Select
  function step232(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step233(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Color Grading");
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 25);
    var desc3 = new ActionDescriptor();
    var desc4 = new ActionDescriptor();
    desc4.putString(PSKey.Name, "От основного к фоновому");
    desc4.putEnumerated(PSType.GradientForm, PSType.GradientForm, PSEnum.CustomStops);
    desc4.putDouble(PSEvent.Intersect, 4096);
    var list1 = new ActionList();
    var desc5 = new ActionDescriptor();
    var desc6 = new ActionDescriptor();
    desc6.putDouble(PSKey.Red, 0);
    desc6.putDouble(PSKey.Green, 0);
    desc6.putDouble(PSKey.Blue, 0);
    desc5.putObject(PSKey.Color, PSClass.RGBColor, desc6);
    desc5.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc5.putInteger(PSKey.Location, 0);
    desc5.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc5);
    var desc7 = new ActionDescriptor();
    var desc8 = new ActionDescriptor();
    desc8.putDouble(PSKey.Red, 255);
    desc8.putDouble(PSKey.Green, 255);
    desc8.putDouble(PSKey.Blue, 255);
    desc7.putObject(PSKey.Color, PSClass.RGBColor, desc8);
    desc7.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc7.putInteger(PSKey.Location, 4096);
    desc7.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc7);
    desc4.putList(PSKey.Colors, list1);
    var list2 = new ActionList();
    var desc9 = new ActionDescriptor();
    desc9.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 100);
    desc9.putInteger(PSKey.Location, 0);
    desc9.putInteger(PSKey.Midpoint, 50);
    list2.putObject(PSClass.TransparencyStop, desc9);
    var desc10 = new ActionDescriptor();
    desc10.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 100);
    desc10.putInteger(PSKey.Location, 4096);
    desc10.putInteger(PSKey.Midpoint, 50);
    list2.putObject(PSClass.TransparencyStop, desc10);
    desc4.putList(PSKey.Transparency, list2);
    desc3.putObject(PSKey.Gradient, PSClass.Gradient, desc4);
    desc2.putObject(PSKey.Type, PSClass.GradientMap, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step234(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    var desc3 = new ActionDescriptor();
    desc3.putString(PSKey.Name, "Заказная");
    desc3.putEnumerated(PSType.GradientForm, PSType.GradientForm, PSEnum.CustomStops);
    desc3.putDouble(PSEvent.Intersect, 4096);
    var list1 = new ActionList();
    var desc4 = new ActionDescriptor();
    var desc5 = new ActionDescriptor();
    desc5.putDouble(PSKey.Red, 90.8468627929688);
    desc5.putDouble(PSKey.Green, 59.6722412109375);
    desc5.putDouble(PSKey.Blue, 33.0422973632813);
    desc4.putObject(PSKey.Color, PSClass.RGBColor, desc5);
    desc4.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc4.putInteger(PSKey.Location, 0);
    desc4.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc4);
    var desc6 = new ActionDescriptor();
    var desc7 = new ActionDescriptor();
    desc7.putDouble(PSKey.Red, 90.8468627929688);
    desc7.putDouble(PSKey.Green, 59.6722412109375);
    desc7.putDouble(PSKey.Blue, 33.0422973632813);
    desc6.putObject(PSKey.Color, PSClass.RGBColor, desc7);
    desc6.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc6.putInteger(PSKey.Location, 0);
    desc6.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc6);
    var desc8 = new ActionDescriptor();
    var desc9 = new ActionDescriptor();
    desc9.putDouble(PSKey.Red, 3.00384521484375);
    desc9.putDouble(PSKey.Green, 3.00384521484375);
    desc9.putDouble(PSKey.Blue, 3.00384521484375);
    desc8.putObject(PSKey.Color, PSClass.RGBColor, desc9);
    desc8.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc8.putInteger(PSKey.Location, 0);
    desc8.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc8);
    var desc10 = new ActionDescriptor();
    var desc11 = new ActionDescriptor();
    desc11.putDouble(PSKey.Red, 69.5787048339844);
    desc11.putDouble(PSKey.Green, 47.1510314941406);
    desc11.putDouble(PSKey.Blue, 31.4080810546875);
    desc10.putObject(PSKey.Color, PSClass.RGBColor, desc11);
    desc10.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc10.putInteger(PSKey.Location, 808);
    desc10.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc10);
    var desc12 = new ActionDescriptor();
    var desc13 = new ActionDescriptor();
    desc13.putDouble(PSKey.Red, 168.051910400391);
    desc13.putDouble(PSKey.Green, 130.713958740234);
    desc13.putDouble(PSKey.Blue, 71.2596130371094);
    desc12.putObject(PSKey.Color, PSClass.RGBColor, desc13);
    desc12.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc12.putInteger(PSKey.Location, 2063);
    desc12.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc12);
    var desc14 = new ActionDescriptor();
    var desc15 = new ActionDescriptor();
    desc15.putDouble(PSKey.Red, 217.413024902344);
    desc15.putDouble(PSKey.Green, 182.0361328125);
    desc15.putDouble(PSKey.Blue, 116.760864257813);
    desc14.putObject(PSKey.Color, PSClass.RGBColor, desc15);
    desc14.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc14.putInteger(PSKey.Location, 3090);
    desc14.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc14);
    var desc16 = new ActionDescriptor();
    var desc17 = new ActionDescriptor();
    desc17.putDouble(PSKey.Red, 251.972808837891);
    desc17.putDouble(PSKey.Green, 245.653839111328);
    desc17.putDouble(PSKey.Blue, 208.292541503906);
    desc16.putObject(PSKey.Color, PSClass.RGBColor, desc17);
    desc16.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc16.putInteger(PSKey.Location, 4024);
    desc16.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc16);
    var desc18 = new ActionDescriptor();
    var desc19 = new ActionDescriptor();
    desc19.putDouble(PSKey.Red, 255);
    desc19.putDouble(PSKey.Green, 255);
    desc19.putDouble(PSKey.Blue, 255);
    desc18.putObject(PSKey.Color, PSClass.RGBColor, desc19);
    desc18.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc18.putInteger(PSKey.Location, 4096);
    desc18.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc18);
    desc3.putList(PSKey.Colors, list1);
    var list2 = new ActionList();
    var desc20 = new ActionDescriptor();
    desc20.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 100);
    desc20.putInteger(PSKey.Location, 0);
    desc20.putInteger(PSKey.Midpoint, 50);
    list2.putObject(PSClass.TransparencyStop, desc20);
    var desc21 = new ActionDescriptor();
    desc21.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 100);
    desc21.putInteger(PSKey.Location, 4096);
    desc21.putInteger(PSKey.Midpoint, 50);
    list2.putObject(PSClass.TransparencyStop, desc21);
    desc3.putList(PSKey.Transparency, list2);
    desc2.putObject(PSKey.Gradient, PSClass.Gradient, desc3);
    desc1.putObject(PSKey.To, PSClass.GradientMap, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step235(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Desaturate heavily saturated");
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelectionContinuous);
    desc1.putBoolean(PSKey.MakeVisible, false);
    var list1 = new ActionList();
    list1.putInteger(127);
    list1.putInteger(sTID("skinTone"), 128);
    list1.putInteger(sTID("contentAware"), 129);
    desc1.putList(PSKey.LayerID, list1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step236(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSString.layerGroup);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSKey.From, ref2);
    desc1.putInteger(PSString.layerGroupStart, 151);
    desc1.putInteger(PSString.layerGroupEnd, 152);
    desc1.putString(PSKey.Name, "Группа 1");
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step237(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Color");
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Delete
  function step238(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Channel, "Darks");
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Delete, desc1, dialogMode);
  };

  // Delete
  function step239(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Channel, "Darks-");
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Delete, desc1, dialogMode);
  };

  // Delete
  function step240(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Channel, "Darks--");
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Delete, desc1, dialogMode);
  };

  // Delete
  function step241(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Channel, "Darks---");
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Delete, desc1, dialogMode);
  };

  // Delete
  function step242(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Channel, "Lights");
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Delete, desc1, dialogMode);
  };

  // Delete
  function step243(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Channel, "Lights+");
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Delete, desc1, dialogMode);
  };

  // Delete
  function step244(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Channel, "Lights++");
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Delete, desc1, dialogMode);
  };

  // Delete
  function step245(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Channel, "SaturnMask");
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Delete, desc1, dialogMode);
  };

  // Select
  function step246(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Color");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    var list1 = new ActionList();
    list1.putInteger(344);
    desc1.putList(PSKey.LayerID, list1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Set
  function step247(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSKey.Color, PSKey.Color, PSKey.Red);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step248(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Pro Contrast");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    var list1 = new ActionList();
    list1.putInteger(328);
    desc1.putList(PSKey.LayerID, list1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Set
  function step249(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSKey.Color, PSKey.Color, PSKey.Blue);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step250(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Group Sharp");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    var list1 = new ActionList();
    list1.putInteger(193);
    desc1.putList(PSKey.LayerID, list1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Set
  function step251(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSKey.Color, PSKey.Color, PSEnum.Orange);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step252(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Soften Skin");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    var list1 = new ActionList();
    list1.putInteger(156);
    desc1.putList(PSKey.LayerID, list1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Set
  function step253(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSKey.Color, PSKey.Color, PSEnum.YellowColor);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step254(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Clarity");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    var list1 = new ActionList();
    list1.putInteger(185);
    desc1.putList(PSKey.LayerID, list1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Set
  function step255(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSKey.Color, PSKey.Color, PSKey.Blue);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step256(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Group Local Contrast");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    var list1 = new ActionList();
    list1.putInteger(177);
    desc1.putList(PSKey.LayerID, list1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Set
  function step257(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSKey.Color, PSKey.Color, PSEnum.Violet);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step258(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "HDR");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    var list1 = new ActionList();
    list1.putInteger(200);
    desc1.putList(PSKey.LayerID, list1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Set
  function step259(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSKey.Color, PSKey.Color, PSKey.Blue);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step260(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Clarity");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    var list1 = new ActionList();
    list1.putInteger(185);
    desc1.putList(PSKey.LayerID, list1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Move
  function step261(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Next);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Move
  function step262(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Next);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Move
  function step263(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Next);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Select
  function step264(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Group Local Contrast");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    var list1 = new ActionList();
    list1.putInteger(41);
    desc1.putList(PSKey.LayerID, list1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Move
  function step265(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Next);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Move
  function step266(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Next);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Move
  function step267(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Next);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Move
  function step268(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Next);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Select
  function step269(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Group Sharp");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    var list1 = new ActionList();
    list1.putInteger(57);
    desc1.putList(PSKey.LayerID, list1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Move
  function step270(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Next);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Move
  function step271(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Next);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Move
  function step272(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Next);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Select
  function step273(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Clarity");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    var list1 = new ActionList();
    list1.putInteger(160);
    desc1.putList(PSKey.LayerID, list1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step274(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putClass(PSKey.New, PSClass.Channel);
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSClass.Mask);
    desc1.putReference(PSKey.At, ref1);
    desc1.putEnumerated(PSKey.Using, PSType.UserMaskOptions, PSEnum.HideAll);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  step1();      // Select
  step2();      // Make
  step3();      // Move
  step4();      // Apply Image
  step5();      // Make
  step6();      // Make
  step7();      // High Pass
  step8();      // Brightness/Contrast
  step9();      // Select
  step10();      // Gaussian Blur
  step11();      // High Pass
  step12();      // Brightness/Contrast
  step13();      // Select
  step14();      // Gaussian Blur
  step15();      // Color Range
  step16();      // Select
  step17();      // Make
  step18();      // Select
  step19();      // Select
  step20();      // Select
  step21();      // Make
  step22();      // Make
  step23();      // Select
  step24();      // Hide
  step25();      // Set
  step26();      // Subtract
  step27();      // Make
  step28();      // Set
  step29();      // Set
  step30();      // Intersect
  step31();      // Make
  step32();      // Set
  step33();      // Set
  step34();      // Intersect
  step35();      // Make
  step36();      // Set
  step37();      // Set
  step38();      // Intersect
  step39();      // Make
  step40();      // Set
  step41();      // Set
  step42();      // Make
  step43();      // Set
  step44();      // Make
  step45();      // Set
  step46();      // Make
  step47();      // Set
  step48();      // Set
  step49();      // Intersect
  step50();      // Make
  step51();      // Set
  step52();      // Set
  step53();      // Intersect
  step54();      // Make
  step55();      // Set
  step56();      // Set
  step57();      // Make
  step58();      // Set
  step59();      // Make
  step60();      // Select
  step61();      // Set
  step62();      // Subtract
  step63();      // Subtract
  step64();      // Make
  step65();      // Set
  step66();      // Set
  step67();      // Make
  step68();      // Set
  step69();      // Select
  step70();      // Delete
  step71();      // Make
  step72();      // Hide
  step73();      // Hide
  step74();      // Hide
  step75();      // Select
  step76();      // Make
  step77();      // Apply Image
  step78();      // Surface Blur
  step79();      // Make
  step80();      // Apply Image
  step81();      // Delete
  step82();      // Reduce Noise
  step83();      // Reduce Noise
  step84();      // Hide
  step85();      // Select
  step86();      // Make
  step87();      // Apply Image
  step88();      // Surface Blur
  step89();      // Make
  step90();      // Apply Image
  step91();      // Delete
  step92();      // Reduce Noise
  step93();      // Reduce Noise
  step94();      // Hide
  step95();      // Select
  step96();      // Make
  step97();      // Apply Image
  step98();      // Surface Blur
  step99();      // Make
  step100();      // Apply Image
  step101();      // Delete
  step102();      // Reduce Noise
  step103();      // Reduce Noise
  step104();      // Show
  step105();      // Show
  step106();      // Select
  step107();      // Make
  step108();      // Hide
  step109();      // Make
  step110();      // Move
  step111();      // Apply Image
  step112();      // Convert to Smart Object
  step113();      // Edit Contents
  step114();      // Convert Mode
  step115();      // Select
  step116();      // Set
  step117();      // Copy
  step118();      // Close
  step119();      // Update Smart Objects
  step120();      // Set
  step121();      // Make
  step122();      // Paste
  step123();      // Make
  step124();      // Surface Blur
  step125();      // Move
  step126();      // Select
  step127();      // Apply Image
  step128();      // Delete
  step129();      // Delete
  step130();      // Make
  step131();      // Create Clipping Mask
  step132();      // Set
  step133();      // Select
  step134();      // Set
  step135();      // Select
  step136();      // Make
  step137();      // Hide
  step138();      // Select
  step139();      // Make
  step140();      // Apply Image
  step141();      // Surface Blur
  step142();      // Make
  step143();      // Apply Image
  step144();      // Delete
  step145();      // Hide
  step146();      // Select
  step147();      // Make
  step148();      // Apply Image
  step149();      // Surface Blur
  step150();      // Make
  step151();      // Apply Image
  step152();      // Delete
  step153();      // Hide
  step154();      // Select
  step155();      // Make
  step156();      // Apply Image
  step157();      // High Pass
  step158();      // Hide
  step159();      // Select
  step160();      // Make
  step161();      // Apply Image
  step162();      // High Pass
  step163();      // Show
  step164();      // Show
  step165();      // Show
  step166();      // Select
  step167();      // Make
  step168();      // Show
  step169();      // Show
  step170();      // Show
  step171();      // Show
  step172();      // Show
  step173();      // Select
  step174();      // Move
  step175();      // Select
  step176();      // Move
  step177();      // Select
  step178();      // Move
  step179();      // Set
  step180();      // Select
  step181();      // Move
  step182();      // Set
  step183();      // Set
  step184();      // Make
  step185();      // Set
  step186();      // Set
  step187();      // Set
  step188();      // Make
  step189();      // Set
  step190();      // Set
  step191();      // Make
  step192();      // Set
  step193();      // Set
  step194();      // Select
  step195();      // Select
  step196();      // Make
  step197();      // Set
  step198();      // Select
  step199();      // Select
  step200();      // Make
  step201();      // Set
  step202();      // Select
  step203();      // Show
  step204();      // Move
  step205();      // Move
  step206();      // Move
  step207();      // Set
  step208();      // Select
  step209();      // Make
  step210();      // Move
  step211();      // Set
  step212();      // Make
  step213();      // Set
  step214();      // Make
  step215();      // Apply Image
  step216();      // Select
  step217();      // Select
  step218();      // Make
  step219();      // Set
  step220();      // Set
  step221();      // Duplicate
  step222();      // Delete
  step223();      // Set
  step224();      // Select
  step225();      // Set
  step226();      // Make
  step227();      // Set
  step228();      // Set
  step229();      // Select
  step230();      // Set
  step231();      // Make
  step232();      // Select
  step233();      // Make
  step234();      // Set
  step235();      // Select
  step236();      // Make
  step237();      // Set
  step238();      // Delete
  step239();      // Delete
  step240();      // Delete
  step241();      // Delete
  step242();      // Delete
  step243();      // Delete
  step244();      // Delete
  step245();      // Delete
  step246();      // Select
  step247();      // Set
  step248();      // Select
  step249();      // Set
  step250();      // Select
  step251();      // Set
  step252();      // Select
  step253();      // Set
  step254();      // Select
  step255();      // Set
  step256();      // Select
  step257();      // Set
  step258();      // Select
  step259();      // Set
  step260();      // Select
  step261();      // Move
  step262();      // Move
  step263();      // Move
  step264();      // Select
  step265();      // Move
  step266();      // Move
  step267();      // Move
  step268();      // Move
  step269();      // Select
  step270();      // Move
  step271();      // Move
  step272();      // Move
  step273();      // Select
  step274();      // Make
};



cTID = function(s) { return app.charIDToTypeID(s); };
sTID = function(s) { return app.stringIDToTypeID(s); };

//
// SuperVolumeX2.loadSymbols
//   Loading up the symbol definitions like this makes it possible
//   to include several of these generated files in one master file
//   provided a prefix is specified other than the default. It also
//   skips the definitions if PSConstants has already been loaded.
//
SuperVolumeX2.loadSymbols = function() {
  var dbgLevel = $.level;
  $.level = 0;
  try {
    PSConstants;
    return; // only if PSConstants is defined
  } catch (e) {
  } finally {
    $.level = dbgLevel;
  }
  var needDefs = true;
  $.level = 0;
  try {
    PSClass;
    needDefs = false;
  } catch (e) {
  } finally {
    $.level = dbgLevel;
  }
  if (needDefs) {
    PSClass = function() {};
    PSEnum = function() {};
    PSEvent = function() {};
    PSForm = function() {};
    PSKey = function() {};
    PSType = function() {};
    PSUnit = function() {};
    PSString = function() {};
  }

  // We may still end up duplicating some of the following definitions
  // but at least we don't redefine PSClass, etc... and wipe out others
  PSClass.AdjustmentLayer = cTID('AdjL');
  PSClass.Calculation = cTID('Clcl');
  PSClass.Channel = cTID('Chnl');
  PSClass.ColorCorrection = cTID('ClrC');
  PSClass.ColorStop = cTID('Clrt');
  PSClass.Curves = cTID('Crvs');
  PSClass.CurvesAdjustment = cTID('CrvA');
  PSClass.Gradient = cTID('Grdn');
  PSClass.GradientMap = cTID('GdMp');
  PSClass.LabColorMode = cTID('LbCM');
  PSClass.Layer = cTID('Lyr ');
  PSClass.Mask = cTID('Msk ');
  PSClass.Point = cTID('Pnt ');
  PSClass.RGBColor = cTID('RGBC');
  PSClass.SelectiveColor = cTID('SlcC');
  PSClass.TransparencyStop = cTID('TrnS');
  PSEnum.Absolute = cTID('Absl');
  PSEnum.All = cTID('Al  ');
  PSEnum.AntiAliasNone = cTID('Anno');
  PSEnum.Backward = cTID('Bckw');
  PSEnum.Blocks = cTID('Blks');
  PSEnum.Blues = cTID('Bls ');
  PSEnum.ColorNoise = cTID('ClNs');
  PSEnum.Composite = cTID('Cmps');
  PSEnum.CustomStops = cTID('CstS');
  PSEnum.Cyans = cTID('Cyns');
  PSEnum.Forward = cTID('Frwr');
  PSEnum.Front = cTID('Frnt');
  PSEnum.Greens = cTID('Grns');
  PSEnum.HardLight = cTID('HrdL');
  PSEnum.HideAll = cTID('HdAl');
  PSEnum.HideSelection = cTID('HdSl');
  PSEnum.Lighten = cTID('Lghn');
  PSEnum.Lightness = cTID('Lght');
  PSEnum.Magentas = cTID('Mgnt');
  PSEnum.MaskedAreas = cTID('MskA');
  PSEnum.Merged = cTID('Mrgd');
  PSEnum.Multiply = cTID('Mltp');
  PSEnum.Neutrals = cTID('Ntrl');
  PSEnum.Next = cTID('Nxt ');
  PSEnum.None = cTID('None');
  PSEnum.Orange = cTID('Orng');
  PSEnum.Overlay = cTID('Ovrl');
  PSEnum.Previous = cTID('Prvs');
  PSEnum.RGB = cTID('RGB ');
  PSEnum.RevealAll = cTID('RvlA');
  PSEnum.Screen = cTID('Scrn');
  PSEnum.Selection = cTID('Slct');
  PSEnum.SoftLight = cTID('SftL');
  PSEnum.Target = cTID('Trgt');
  PSEnum.UserStop = cTID('UsrS');
  PSEnum.Violet = cTID('Vlt ');
  PSEnum.Whites = cTID('Whts');
  PSEnum.YellowColor = cTID('Ylw ');
  PSEnum.Yellows = cTID('Ylws');
  PSEnum.Yes = cTID('Ys  ');
  PSEvent.Close = cTID('Cls ');
  PSEvent.Copy = cTID('copy');
  PSEvent.Delete = cTID('Dlt ');
  PSEvent.Duplicate = cTID('Dplc');
  PSEvent.Hide = cTID('Hd  ');
  PSEvent.Intersect = cTID('Intr');
  PSEvent.Make = cTID('Mk  ');
  PSEvent.Move = cTID('move');
  PSEvent.Paste = cTID('past');
  PSEvent.Select = cTID('slct');
  PSEvent.Set = cTID('setd');
  PSEvent.Show = cTID('Shw ');
  PSEvent.Subtract = cTID('Sbtr');
  PSKey.Adjustment = cTID('Adjs');
  PSKey.Amount = cTID('Amnt');
  PSKey.AntiAlias = cTID('AntA');
  PSKey.As = cTID('As  ');
  PSKey.At = cTID('At  ');
  PSKey.Black = cTID('Blck');
  PSKey.Blue = cTID('Bl  ');
  PSKey.Brightness = cTID('Brgh');
  PSKey.Color = cTID('Clr ');
  PSKey.ColorIndicates = cTID('ClrI');
  PSKey.Colors = cTID('Clrs');
  PSKey.Contrast = cTID('Cntr');
  PSKey.Copy = cTID('Cpy ');
  PSKey.Curve = cTID('Crv ');
  PSKey.DocumentID = cTID('DocI');
  PSKey.EdgeFidelity = cTID('EdgF');
  PSKey.Exposure = cTID('Exps');
  PSKey.From = cTID('From');
  PSKey.Fuzziness = cTID('Fzns');
  PSKey.Gradient = cTID('Grad');
  PSKey.Green = cTID('Grn ');
  PSKey.Horizontal = cTID('Hrzn');
  PSKey.In = cTID('In  ');
  PSKey.Invert = cTID('Invr');
  PSKey.LayerID = cTID('LyrI');
  PSKey.Location = cTID('Lctn');
  PSKey.MakeVisible = cTID('MkVs');
  PSKey.Method = cTID('Mthd');
  PSKey.Midpoint = cTID('Mdpn');
  PSKey.Mode = cTID('Md  ');
  PSKey.Name = cTID('Nm  ');
  PSKey.New = cTID('Nw  ');
  PSKey.Offset = cTID('Ofst');
  PSKey.Opacity = cTID('Opct');
  PSKey.Radius = cTID('Rds ');
  PSKey.Red = cTID('Rd  ');
  PSKey.Saving = cTID('Svng');
  PSKey.Scale = cTID('Scl ');
  PSKey.Sharpness = cTID('Shrp');
  PSKey.Start = cTID('Strt');
  PSKey.Threshold = cTID('Thsh');
  PSKey.To = cTID('T   ');
  PSKey.Transparency = cTID('Trns');
  PSKey.Type = cTID('Type');
  PSKey.Using = cTID('Usng');
  PSKey.Vertical = cTID('Vrtc');
  PSKey.With = cTID('With');
  PSString.Null = sTID('null');
  PSString.addToSelection = sTID('addToSelection');
  PSString.addToSelectionContinuous = sTID('addToSelectionContinuous');
  PSString.average = sTID('average');
  PSString.channelDenoise = sTID('channelDenoise');
  PSString.channelDenoiseParams = sTID('channelDenoiseParams');
  PSString.contentLayer = sTID('contentLayer');
  PSString.gammaCorrection = sTID('gammaCorrection');
  PSString.largeDocumentFormat = sTID('largeDocumentFormat');
  PSString.layerGroup = sTID('layerSection');
  PSString.layerGroupEnd = sTID('layerSectionEnd');
  PSString.layerGroupStart = sTID('layerSectionStart');
  PSString.linearBurn = sTID('linearBurn');
  PSString.linearLight = sTID('linearLight');
  PSString.maximizeCompatibility = sTID('maximizeCompatibility');
  PSString.pdf13 = sTID('pdf13');
  PSString.preset = sTID('preset');
  PSString.presetKind = sTID('presetKind');
  PSString.presetKindCustom = sTID('presetKindCustom');
  PSString.presetKindDefault = sTID('presetKindDefault');
  PSString.presetKindType = sTID('presetKindType');
  PSString.removeJPEGArtifact = sTID('removeJPEGArtifact');
  PSString.selection = sTID('selection');
  PSString.selectionModifier = sTID('selectionModifier');
  PSString.selectionModifierType = sTID('selectionModifierType');
  PSString.shapeburst = sTID('shapeburst');
  PSString.solidColorLayer = sTID('solidColorLayer');
  PSString.subsample = sTID('subsample');
  PSType.AntiAlias = cTID('Annt');
  PSType.AreaSelector = cTID('ArSl');
  PSType.BlendMode = cTID('BlnM');
  PSType.Calculation = cTID('Clcn');
  PSType.ColorStopType = cTID('Clry');
  PSType.CorrectionMethod = cTID('CrcM');
  PSType.GradientForm = cTID('GrdF');
  PSType.MaskIndicator = cTID('MskI');
  PSType.Ordinal = cTID('Ordn');
  PSType.UserMaskOptions = cTID('UsrM');
  PSType.YesNo = cTID('YsN ');
  PSUnit.Percent = cTID('#Prc');
  PSUnit.Pixels = cTID('#Pxl');
};

SuperVolumeX2.loadSymbols(); // load up our symbols



//=========================================
//                    SuperVolumeX2.main
//=========================================
//

SuperVolumeX2.main = function () {
  SuperVolumeX2();
};

SuperVolumeX2.main();
   },
};

$._ext_V3={
    run : function() {
function SuperVolumeX3() {
  // Select
  function step1(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step2(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.Layer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Low");
    desc1.putObject(PSKey.Using, PSClass.Layer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Move
  function step3(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Front);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Apply Image
  function step4(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Merged);
    desc2.putReference(PSKey.To, ref1);
    desc1.putObject(PSKey.With, PSClass.Calculation, desc2);
    executeAction(sTID('applyImageEvent'), desc1, dialogMode);
  };

  // Make
  function step5(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Med2");
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSString.linearLight);
    desc1.putObject(PSKey.New, PSClass.Layer, desc2);
    desc1.putEnumerated(PSKey.Using, PSType.AreaSelector, PSEnum.Selection);
    desc1.putBoolean(PSKey.Copy, true);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Make
  function step6(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Hight");
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSString.linearLight);
    desc1.putObject(PSKey.New, PSClass.Layer, desc2);
    desc1.putEnumerated(PSKey.Using, PSType.AreaSelector, PSEnum.Selection);
    desc1.putBoolean(PSKey.Copy, true);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // High Pass
  function step7(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putUnitDouble(PSKey.Radius, PSUnit.Pixels, 2.5);
    executeAction(sTID('highPass'), desc1, dialogMode);
  };

  // Brightness/Contrast
  function step8(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putInteger(PSKey.Brightness, 0);
    desc1.putInteger(PSKey.Contrast, -50);
    executeAction(sTID('brightnessEvent'), desc1, dialogMode);
  };

  // Select
  function step9(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Backward);
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Gaussian Blur
  function step10(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putUnitDouble(PSKey.Radius, PSUnit.Pixels, 2.5);
    executeAction(sTID('gaussianBlur'), desc1, dialogMode);
  };

  // High Pass
  function step11(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putUnitDouble(PSKey.Radius, PSUnit.Pixels, 8);
    executeAction(sTID('highPass'), desc1, dialogMode);
  };

  // Brightness/Contrast
  function step12(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putInteger(PSKey.Brightness, 0);
    desc1.putInteger(PSKey.Contrast, -50);
    executeAction(sTID('brightnessEvent'), desc1, dialogMode);
  };

  // Select
  function step13(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Backward);
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Gaussian Blur
  function step14(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putUnitDouble(PSKey.Radius, PSUnit.Pixels, 8);
    executeAction(sTID('gaussianBlur'), desc1, dialogMode);
  };

  // Color Range
  function step15(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putInteger(PSKey.Fuzziness, 50);
    desc1.putEnumerated(PSKey.Colors, PSKey.Colors, sTID("skinTone"));
    desc1.putInteger(sTID("colorModel"), 0);
    executeAction(sTID('colorRange'), desc1, dialogMode);
  };

  // Select
  function step16(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Med2");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step17(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putClass(PSKey.New, PSClass.Channel);
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSClass.Mask);
    desc1.putReference(PSKey.At, ref1);
    desc1.putEnumerated(PSKey.Using, PSType.UserMaskOptions, PSEnum.HideSelection);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Select
  function step18(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Hight");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Select
  function step19(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Backward);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelection);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Select
  function step20(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Backward);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelection);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step21(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSString.layerGroup);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSKey.From, ref2);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Soften Skin");
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 70);
    desc1.putObject(PSKey.Using, PSString.layerGroup, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Make
  function step22(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putClass(PSKey.New, PSClass.Channel);
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSClass.Mask);
    desc1.putReference(PSKey.At, ref1);
    desc1.putEnumerated(PSKey.Using, PSType.UserMaskOptions, PSEnum.RevealAll);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Select
  function step23(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Hide
  function step24(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Hide, desc1, dialogMode);
  };

  // Set
  function step25(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSKey.To, PSType.Ordinal, PSEnum.All);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Subtract
  function step26(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSKey.From, ref2);
    executeAction(PSEvent.Subtract, desc1, dialogMode);
  };

  // Make
  function step27(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Darks");
    desc2.putEnumerated(PSKey.ColorIndicates, PSType.MaskIndicator, PSEnum.MaskedAreas);
    var desc3 = new ActionDescriptor();
    desc3.putDouble(PSKey.Red, 255);
    desc3.putDouble(PSKey.Green, 0);
    desc3.putDouble(PSKey.Blue, 0);
    desc2.putObject(PSKey.Color, PSClass.RGBColor, desc3);
    desc2.putInteger(PSKey.Opacity, 50);
    desc1.putObject(PSKey.New, PSClass.Channel, desc2);
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSKey.Using, ref1);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step28(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSKey.To, PSType.Ordinal, PSEnum.None);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step29(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putName(PSClass.Channel, "Darks");
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Intersect
  function step30(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Channel, "Darks");
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSKey.With, ref2);
    executeAction(PSEvent.Intersect, desc1, dialogMode);
  };

  // Make
  function step31(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Darks-");
    desc2.putEnumerated(PSKey.ColorIndicates, PSType.MaskIndicator, PSEnum.MaskedAreas);
    var desc3 = new ActionDescriptor();
    desc3.putDouble(PSKey.Red, 255);
    desc3.putDouble(PSKey.Green, 0);
    desc3.putDouble(PSKey.Blue, 0);
    desc2.putObject(PSKey.Color, PSClass.RGBColor, desc3);
    desc2.putInteger(PSKey.Opacity, 50);
    desc1.putObject(PSKey.New, PSClass.Channel, desc2);
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSKey.Using, ref1);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step32(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSKey.To, PSType.Ordinal, PSEnum.None);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step33(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putName(PSClass.Channel, "Darks-");
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Intersect
  function step34(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Channel, "Darks-");
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSKey.With, ref2);
    executeAction(PSEvent.Intersect, desc1, dialogMode);
  };

  // Make
  function step35(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Darks--");
    desc2.putEnumerated(PSKey.ColorIndicates, PSType.MaskIndicator, PSEnum.MaskedAreas);
    var desc3 = new ActionDescriptor();
    desc3.putDouble(PSKey.Red, 255);
    desc3.putDouble(PSKey.Green, 0);
    desc3.putDouble(PSKey.Blue, 0);
    desc2.putObject(PSKey.Color, PSClass.RGBColor, desc3);
    desc2.putInteger(PSKey.Opacity, 50);
    desc1.putObject(PSKey.New, PSClass.Channel, desc2);
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSKey.Using, ref1);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step36(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSKey.To, PSType.Ordinal, PSEnum.None);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step37(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putName(PSClass.Channel, "Darks--");
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Intersect
  function step38(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Channel, "Darks--");
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSKey.With, ref2);
    executeAction(PSEvent.Intersect, desc1, dialogMode);
  };

  // Make
  function step39(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Darks---");
    desc2.putEnumerated(PSKey.ColorIndicates, PSType.MaskIndicator, PSEnum.MaskedAreas);
    var desc3 = new ActionDescriptor();
    desc3.putDouble(PSKey.Red, 255);
    desc3.putDouble(PSKey.Green, 0);
    desc3.putDouble(PSKey.Blue, 0);
    desc2.putObject(PSKey.Color, PSClass.RGBColor, desc3);
    desc2.putInteger(PSKey.Opacity, 50);
    desc1.putObject(PSKey.New, PSClass.Channel, desc2);
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSKey.Using, ref1);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step40(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSKey.To, PSType.Ordinal, PSEnum.None);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step41(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putName(PSClass.Channel, "Darks---");
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step42(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Dark Darks");
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 60);
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSEnum.Multiply);
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);
    desc2.putObject(PSKey.Type, PSClass.Curves, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step43(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putName(PSClass.Channel, "Darks--");
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step44(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Darks HDR");
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSEnum.Screen);
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);
    desc2.putObject(PSKey.Type, PSClass.Curves, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step45(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step46(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Lights");
    desc2.putEnumerated(PSKey.ColorIndicates, PSType.MaskIndicator, PSEnum.MaskedAreas);
    var desc3 = new ActionDescriptor();
    desc3.putDouble(PSKey.Red, 255);
    desc3.putDouble(PSKey.Green, 0);
    desc3.putDouble(PSKey.Blue, 0);
    desc2.putObject(PSKey.Color, PSClass.RGBColor, desc3);
    desc2.putInteger(PSKey.Opacity, 50);
    desc1.putObject(PSKey.New, PSClass.Channel, desc2);
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSKey.Using, ref1);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step47(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSKey.To, PSType.Ordinal, PSEnum.None);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step48(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putName(PSClass.Channel, "Lights");
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Intersect
  function step49(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Channel, "Lights");
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSKey.With, ref2);
    executeAction(PSEvent.Intersect, desc1, dialogMode);
  };

  // Make
  function step50(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Lights+");
    desc2.putEnumerated(PSKey.ColorIndicates, PSType.MaskIndicator, PSEnum.MaskedAreas);
    var desc3 = new ActionDescriptor();
    desc3.putDouble(PSKey.Red, 255);
    desc3.putDouble(PSKey.Green, 0);
    desc3.putDouble(PSKey.Blue, 0);
    desc2.putObject(PSKey.Color, PSClass.RGBColor, desc3);
    desc2.putInteger(PSKey.Opacity, 50);
    desc1.putObject(PSKey.New, PSClass.Channel, desc2);
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSKey.Using, ref1);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step51(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSKey.To, PSType.Ordinal, PSEnum.None);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step52(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putName(PSClass.Channel, "Lights+");
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Intersect
  function step53(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Channel, "Lights+");
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSKey.With, ref2);
    executeAction(PSEvent.Intersect, desc1, dialogMode);
  };

  // Make
  function step54(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Lights++");
    desc2.putEnumerated(PSKey.ColorIndicates, PSType.MaskIndicator, PSEnum.MaskedAreas);
    var desc3 = new ActionDescriptor();
    desc3.putDouble(PSKey.Red, 255);
    desc3.putDouble(PSKey.Green, 0);
    desc3.putDouble(PSKey.Blue, 0);
    desc2.putObject(PSKey.Color, PSClass.RGBColor, desc3);
    desc2.putInteger(PSKey.Opacity, 50);
    desc1.putObject(PSKey.New, PSClass.Channel, desc2);
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSKey.Using, ref1);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step55(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSKey.To, PSType.Ordinal, PSEnum.None);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step56(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putName(PSClass.Channel, "Lights++");
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step57(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Light Lights");
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 60);
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSEnum.Screen);
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);
    desc2.putObject(PSKey.Type, PSClass.Curves, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step58(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putName(PSClass.Channel, "Lights+");
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step59(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Lights HDR");
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSEnum.Multiply);
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);
    desc2.putObject(PSKey.Type, PSClass.Curves, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Select
  function step60(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Set
  function step61(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSKey.To, PSType.Ordinal, PSEnum.All);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Subtract
  function step62(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSKey.From, ref2);
    executeAction(PSEvent.Subtract, desc1, dialogMode);
  };

  // Subtract
  function step63(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Channel, "Darks");
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSKey.From, ref2);
    executeAction(PSEvent.Subtract, desc1, dialogMode);
  };

  // Make
  function step64(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);
    desc2.putObject(PSKey.Type, PSClass.Curves, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step65(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindCustom);
    var list1 = new ActionList();
    var desc3 = new ActionDescriptor();
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.Composite);
    desc3.putReference(PSClass.Channel, ref2);
    var list2 = new ActionList();
    var desc4 = new ActionDescriptor();
    desc4.putDouble(PSKey.Horizontal, 0);
    desc4.putDouble(PSKey.Vertical, 0);
    list2.putObject(PSClass.Point, desc4);
    var desc5 = new ActionDescriptor();
    desc5.putDouble(PSKey.Horizontal, 64);
    desc5.putDouble(PSKey.Vertical, 30);
    list2.putObject(PSClass.Point, desc5);
    var desc6 = new ActionDescriptor();
    desc6.putDouble(PSKey.Horizontal, 128);
    desc6.putDouble(PSKey.Vertical, 128);
    list2.putObject(PSClass.Point, desc6);
    var desc7 = new ActionDescriptor();
    desc7.putDouble(PSKey.Horizontal, 192);
    desc7.putDouble(PSKey.Vertical, 224);
    list2.putObject(PSClass.Point, desc7);
    var desc8 = new ActionDescriptor();
    desc8.putDouble(PSKey.Horizontal, 255);
    desc8.putDouble(PSKey.Vertical, 255);
    list2.putObject(PSClass.Point, desc8);
    desc3.putList(PSKey.Curve, list2);
    list1.putObject(PSClass.CurvesAdjustment, desc3);
    desc2.putList(PSKey.Adjustment, list1);
    desc1.putObject(PSKey.To, PSClass.Curves, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step66(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Contrast");
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step67(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Auto Contrast");
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);
    desc2.putObject(PSKey.Type, PSClass.Curves, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step68(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindCustom);
    var list1 = new ActionList();
    var desc3 = new ActionDescriptor();
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.Composite);
    desc3.putReference(PSClass.Channel, ref2);
    desc3.putBoolean(sTID("autoMachineLearning"), true);
    desc3.putBoolean(sTID("autoFaces"), true);
    list1.putObject(PSClass.CurvesAdjustment, desc3);
    desc2.putList(PSKey.Adjustment, list1);
    desc1.putObject(PSKey.To, PSClass.Curves, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step69(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSClass.Mask);
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Delete
  function step70(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Delete, desc1, dialogMode);
  };

  // Make
  function step71(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putClass(PSKey.New, PSClass.Channel);
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSClass.Mask);
    ref1.putName(PSClass.Layer, "Auto Contrast");
    desc1.putReference(PSKey.At, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Channel, PSClass.Channel, PSClass.Mask);
    ref2.putName(PSClass.Layer, "Contrast");
    desc1.putReference(PSKey.Using, ref2);
    desc1.putBoolean(PSEvent.Duplicate, true);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Hide
  function step72(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Contrast");
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Hide, desc1, dialogMode);
  };

  // Hide
  function step73(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Dark Darks");
    ref1.putName(PSClass.Layer, "Darks HDR");
    ref1.putName(PSClass.Layer, "Light Lights");
    ref1.putName(PSClass.Layer, "Lights HDR");
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Hide, desc1, dialogMode);
  };

  // Hide
  function step74(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Hide, desc1, dialogMode);
  };

  // Select
  function step75(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step76(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.Layer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "map");
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 50);
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSString.linearLight);
    desc1.putObject(PSKey.Using, PSClass.Layer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Apply Image
  function step77(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Merged);
    desc2.putReference(PSKey.To, ref1);
    desc2.putBoolean(PSKey.Invert, true);
    desc1.putObject(PSKey.With, PSClass.Calculation, desc2);
    executeAction(sTID('applyImageEvent'), desc1, dialogMode);
  };

  // Surface Blur
  function step78(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putUnitDouble(PSKey.Radius, PSUnit.Pixels, 30);
    desc1.putInteger(PSKey.Threshold, 30);
    executeAction(sTID('surfaceBlur'), desc1, dialogMode);
  };

  // Make
  function step79(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.Layer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Large Contrast");
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSEnum.Overlay);
    desc1.putObject(PSKey.Using, PSClass.Layer, desc2);
    desc1.putInteger(PSKey.LayerID, 299);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Apply Image
  function step80(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Merged);
    desc2.putReference(PSKey.To, ref1);
    desc1.putObject(PSKey.With, PSClass.Calculation, desc2);
    executeAction(sTID('applyImageEvent'), desc1, dialogMode);
  };

  // Delete
  function step81(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "map");
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Delete, desc1, dialogMode);
  };

  // Reduce Noise
  function step82(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putUnitDouble(PSEnum.ColorNoise, PSUnit.Percent, 0);
    desc1.putUnitDouble(PSKey.Sharpness, PSUnit.Percent, 0);
    desc1.putBoolean(PSString.removeJPEGArtifact, false);
    var list1 = new ActionList();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.Composite);
    desc2.putReference(PSClass.Channel, ref1);
    desc2.putInteger(PSKey.Amount, 10);
    desc2.putInteger(PSKey.EdgeFidelity, 0);
    list1.putObject(PSString.channelDenoiseParams, desc2);
    var desc3 = new ActionDescriptor();
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Channel, PSClass.Channel, PSKey.Red);
    desc3.putReference(PSClass.Channel, ref2);
    desc3.putInteger(PSKey.Amount, 0);
    list1.putObject(PSString.channelDenoiseParams, desc3);
    var desc4 = new ActionDescriptor();
    var ref3 = new ActionReference();
    ref3.putEnumerated(PSClass.Channel, PSClass.Channel, PSKey.Green);
    desc4.putReference(PSClass.Channel, ref3);
    desc4.putInteger(PSKey.Amount, 0);
    list1.putObject(PSString.channelDenoiseParams, desc4);
    var desc5 = new ActionDescriptor();
    var ref4 = new ActionReference();
    ref4.putEnumerated(PSClass.Channel, PSClass.Channel, PSKey.Blue);
    desc5.putReference(PSClass.Channel, ref4);
    desc5.putInteger(PSKey.Amount, 0);
    list1.putObject(PSString.channelDenoiseParams, desc5);
    desc1.putList(PSString.channelDenoise, list1);
    desc1.putString(PSString.preset, "По умолчанию");
    executeAction(sTID('denoise'), desc1, dialogMode);
  };

  // Reduce Noise
  function step83(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putUnitDouble(PSEnum.ColorNoise, PSUnit.Percent, 0);
    desc1.putUnitDouble(PSKey.Sharpness, PSUnit.Percent, 0);
    desc1.putBoolean(PSString.removeJPEGArtifact, false);
    var list1 = new ActionList();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.Composite);
    desc2.putReference(PSClass.Channel, ref1);
    desc2.putInteger(PSKey.Amount, 10);
    desc2.putInteger(PSKey.EdgeFidelity, 0);
    list1.putObject(PSString.channelDenoiseParams, desc2);
    var desc3 = new ActionDescriptor();
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Channel, PSClass.Channel, PSKey.Red);
    desc3.putReference(PSClass.Channel, ref2);
    desc3.putInteger(PSKey.Amount, 0);
    list1.putObject(PSString.channelDenoiseParams, desc3);
    var desc4 = new ActionDescriptor();
    var ref3 = new ActionReference();
    ref3.putEnumerated(PSClass.Channel, PSClass.Channel, PSKey.Green);
    desc4.putReference(PSClass.Channel, ref3);
    desc4.putInteger(PSKey.Amount, 0);
    list1.putObject(PSString.channelDenoiseParams, desc4);
    var desc5 = new ActionDescriptor();
    var ref4 = new ActionReference();
    ref4.putEnumerated(PSClass.Channel, PSClass.Channel, PSKey.Blue);
    desc5.putReference(PSClass.Channel, ref4);
    desc5.putInteger(PSKey.Amount, 0);
    list1.putObject(PSString.channelDenoiseParams, desc5);
    desc1.putList(PSString.channelDenoise, list1);
    desc1.putString(PSString.preset, "По умолчанию");
    executeAction(sTID('denoise'), desc1, dialogMode);
  };

  // Hide
  function step84(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Large Contrast");
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Hide, desc1, dialogMode);
  };

  // Select
  function step85(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step86(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.Layer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "map");
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 50);
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSString.linearLight);
    desc1.putObject(PSKey.Using, PSClass.Layer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Apply Image
  function step87(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Merged);
    desc2.putReference(PSKey.To, ref1);
    desc2.putBoolean(PSKey.Invert, true);
    desc1.putObject(PSKey.With, PSClass.Calculation, desc2);
    executeAction(sTID('applyImageEvent'), desc1, dialogMode);
  };

  // Surface Blur
  function step88(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putUnitDouble(PSKey.Radius, PSUnit.Pixels, 20);
    desc1.putInteger(PSKey.Threshold, 20);
    executeAction(sTID('surfaceBlur'), desc1, dialogMode);
  };

  // Make
  function step89(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.Layer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Medium Contrast");
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSEnum.Overlay);
    desc1.putObject(PSKey.Using, PSClass.Layer, desc2);
    desc1.putInteger(PSKey.LayerID, 301);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Apply Image
  function step90(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Merged);
    desc2.putReference(PSKey.To, ref1);
    desc1.putObject(PSKey.With, PSClass.Calculation, desc2);
    executeAction(sTID('applyImageEvent'), desc1, dialogMode);
  };

  // Delete
  function step91(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "map");
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Delete, desc1, dialogMode);
  };

  // Reduce Noise
  function step92(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putUnitDouble(PSEnum.ColorNoise, PSUnit.Percent, 0);
    desc1.putUnitDouble(PSKey.Sharpness, PSUnit.Percent, 0);
    desc1.putBoolean(PSString.removeJPEGArtifact, false);
    var list1 = new ActionList();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.Composite);
    desc2.putReference(PSClass.Channel, ref1);
    desc2.putInteger(PSKey.Amount, 10);
    desc2.putInteger(PSKey.EdgeFidelity, 0);
    list1.putObject(PSString.channelDenoiseParams, desc2);
    var desc3 = new ActionDescriptor();
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Channel, PSClass.Channel, PSKey.Red);
    desc3.putReference(PSClass.Channel, ref2);
    desc3.putInteger(PSKey.Amount, 0);
    list1.putObject(PSString.channelDenoiseParams, desc3);
    var desc4 = new ActionDescriptor();
    var ref3 = new ActionReference();
    ref3.putEnumerated(PSClass.Channel, PSClass.Channel, PSKey.Green);
    desc4.putReference(PSClass.Channel, ref3);
    desc4.putInteger(PSKey.Amount, 0);
    list1.putObject(PSString.channelDenoiseParams, desc4);
    var desc5 = new ActionDescriptor();
    var ref4 = new ActionReference();
    ref4.putEnumerated(PSClass.Channel, PSClass.Channel, PSKey.Blue);
    desc5.putReference(PSClass.Channel, ref4);
    desc5.putInteger(PSKey.Amount, 0);
    list1.putObject(PSString.channelDenoiseParams, desc5);
    desc1.putList(PSString.channelDenoise, list1);
    desc1.putString(PSString.preset, "По умолчанию");
    executeAction(sTID('denoise'), desc1, dialogMode);
  };

  // Reduce Noise
  function step93(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putUnitDouble(PSEnum.ColorNoise, PSUnit.Percent, 0);
    desc1.putUnitDouble(PSKey.Sharpness, PSUnit.Percent, 0);
    desc1.putBoolean(PSString.removeJPEGArtifact, false);
    var list1 = new ActionList();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.Composite);
    desc2.putReference(PSClass.Channel, ref1);
    desc2.putInteger(PSKey.Amount, 10);
    desc2.putInteger(PSKey.EdgeFidelity, 0);
    list1.putObject(PSString.channelDenoiseParams, desc2);
    var desc3 = new ActionDescriptor();
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Channel, PSClass.Channel, PSKey.Red);
    desc3.putReference(PSClass.Channel, ref2);
    desc3.putInteger(PSKey.Amount, 0);
    list1.putObject(PSString.channelDenoiseParams, desc3);
    var desc4 = new ActionDescriptor();
    var ref3 = new ActionReference();
    ref3.putEnumerated(PSClass.Channel, PSClass.Channel, PSKey.Green);
    desc4.putReference(PSClass.Channel, ref3);
    desc4.putInteger(PSKey.Amount, 0);
    list1.putObject(PSString.channelDenoiseParams, desc4);
    var desc5 = new ActionDescriptor();
    var ref4 = new ActionReference();
    ref4.putEnumerated(PSClass.Channel, PSClass.Channel, PSKey.Blue);
    desc5.putReference(PSClass.Channel, ref4);
    desc5.putInteger(PSKey.Amount, 0);
    list1.putObject(PSString.channelDenoiseParams, desc5);
    desc1.putList(PSString.channelDenoise, list1);
    desc1.putString(PSString.preset, "По умолчанию");
    executeAction(sTID('denoise'), desc1, dialogMode);
  };

  // Hide
  function step94(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Medium Contrast");
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Hide, desc1, dialogMode);
  };

  // Select
  function step95(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step96(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.Layer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "map");
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 50);
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSString.linearLight);
    desc1.putObject(PSKey.Using, PSClass.Layer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Apply Image
  function step97(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Merged);
    desc2.putReference(PSKey.To, ref1);
    desc2.putBoolean(PSKey.Invert, true);
    desc1.putObject(PSKey.With, PSClass.Calculation, desc2);
    executeAction(sTID('applyImageEvent'), desc1, dialogMode);
  };

  // Surface Blur
  function step98(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putUnitDouble(PSKey.Radius, PSUnit.Pixels, 10);
    desc1.putInteger(PSKey.Threshold, 15);
    executeAction(sTID('surfaceBlur'), desc1, dialogMode);
  };

  // Make
  function step99(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.Layer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Small Contrast");
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSEnum.Overlay);
    desc1.putObject(PSKey.Using, PSClass.Layer, desc2);
    desc1.putInteger(PSKey.LayerID, 303);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Apply Image
  function step100(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Merged);
    desc2.putReference(PSKey.To, ref1);
    desc1.putObject(PSKey.With, PSClass.Calculation, desc2);
    executeAction(sTID('applyImageEvent'), desc1, dialogMode);
  };

  // Delete
  function step101(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "map");
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Delete, desc1, dialogMode);
  };

  // Reduce Noise
  function step102(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putUnitDouble(PSEnum.ColorNoise, PSUnit.Percent, 0);
    desc1.putUnitDouble(PSKey.Sharpness, PSUnit.Percent, 0);
    desc1.putBoolean(PSString.removeJPEGArtifact, false);
    var list1 = new ActionList();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.Composite);
    desc2.putReference(PSClass.Channel, ref1);
    desc2.putInteger(PSKey.Amount, 10);
    desc2.putInteger(PSKey.EdgeFidelity, 0);
    list1.putObject(PSString.channelDenoiseParams, desc2);
    var desc3 = new ActionDescriptor();
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Channel, PSClass.Channel, PSKey.Red);
    desc3.putReference(PSClass.Channel, ref2);
    desc3.putInteger(PSKey.Amount, 0);
    list1.putObject(PSString.channelDenoiseParams, desc3);
    var desc4 = new ActionDescriptor();
    var ref3 = new ActionReference();
    ref3.putEnumerated(PSClass.Channel, PSClass.Channel, PSKey.Green);
    desc4.putReference(PSClass.Channel, ref3);
    desc4.putInteger(PSKey.Amount, 0);
    list1.putObject(PSString.channelDenoiseParams, desc4);
    var desc5 = new ActionDescriptor();
    var ref4 = new ActionReference();
    ref4.putEnumerated(PSClass.Channel, PSClass.Channel, PSKey.Blue);
    desc5.putReference(PSClass.Channel, ref4);
    desc5.putInteger(PSKey.Amount, 0);
    list1.putObject(PSString.channelDenoiseParams, desc5);
    desc1.putList(PSString.channelDenoise, list1);
    desc1.putString(PSString.preset, "По умолчанию");
    executeAction(sTID('denoise'), desc1, dialogMode);
  };

  // Reduce Noise
  function step103(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putUnitDouble(PSEnum.ColorNoise, PSUnit.Percent, 0);
    desc1.putUnitDouble(PSKey.Sharpness, PSUnit.Percent, 0);
    desc1.putBoolean(PSString.removeJPEGArtifact, false);
    var list1 = new ActionList();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.Composite);
    desc2.putReference(PSClass.Channel, ref1);
    desc2.putInteger(PSKey.Amount, 10);
    desc2.putInteger(PSKey.EdgeFidelity, 0);
    list1.putObject(PSString.channelDenoiseParams, desc2);
    var desc3 = new ActionDescriptor();
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Channel, PSClass.Channel, PSKey.Red);
    desc3.putReference(PSClass.Channel, ref2);
    desc3.putInteger(PSKey.Amount, 0);
    list1.putObject(PSString.channelDenoiseParams, desc3);
    var desc4 = new ActionDescriptor();
    var ref3 = new ActionReference();
    ref3.putEnumerated(PSClass.Channel, PSClass.Channel, PSKey.Green);
    desc4.putReference(PSClass.Channel, ref3);
    desc4.putInteger(PSKey.Amount, 0);
    list1.putObject(PSString.channelDenoiseParams, desc4);
    var desc5 = new ActionDescriptor();
    var ref4 = new ActionReference();
    ref4.putEnumerated(PSClass.Channel, PSClass.Channel, PSKey.Blue);
    desc5.putReference(PSClass.Channel, ref4);
    desc5.putInteger(PSKey.Amount, 0);
    list1.putObject(PSString.channelDenoiseParams, desc5);
    desc1.putList(PSString.channelDenoise, list1);
    desc1.putString(PSString.preset, "По умолчанию");
    executeAction(sTID('denoise'), desc1, dialogMode);
  };

  // Show
  function step104(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Medium Contrast");
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Show, desc1, dialogMode);
  };

  // Show
  function step105(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Large Contrast");
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Show, desc1, dialogMode);
  };

  // Select
  function step106(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Large Contrast");
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelectionContinuous);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step107(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSString.layerGroup);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSKey.From, ref2);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Group Local Contrast");
    desc1.putObject(PSKey.Using, PSString.layerGroup, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Hide
  function step108(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Hide, desc1, dialogMode);
  };

  // Make
  function step109(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.Layer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "_Temp");
    desc1.putObject(PSKey.Using, PSClass.Layer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Move
  function step110(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Front);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Apply Image
  function step111(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Merged);
    desc2.putReference(PSKey.To, ref1);
    desc1.putObject(PSKey.With, PSClass.Calculation, desc2);
    executeAction(sTID('applyImageEvent'), desc1, dialogMode);
  };

  // Convert to Smart Object
  function step112(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    executeAction(sTID('newPlacedLayer'), undefined, dialogMode);
  };

  // Edit Contents
  function step113(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    executeAction(sTID('placedLayerEditContents'), desc1, dialogMode);
  };

  // Convert Mode
  function step114(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putClass(PSKey.To, PSClass.LabColorMode);
    executeAction(sTID('convertMode'), desc1, dialogMode);
  };

  // Select
  function step115(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.Lightness);
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Set
  function step116(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSKey.To, PSType.Ordinal, PSEnum.All);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Copy
  function step117(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    executeAction(PSEvent.Copy, undefined, dialogMode);
  };

  // Close
  function step118(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    desc2.putBoolean(PSString.maximizeCompatibility, false);
    desc1.putObject(PSKey.As, PSString.largeDocumentFormat, desc2);
    desc1.putPath(PSKey.In, new File("~/AppData/Local/Temp"));
    desc1.putInteger(PSKey.DocumentID, 414);
    desc1.putEnumerated(PSKey.Saving, PSType.YesNo, PSEnum.Yes);
    executeAction(PSEvent.Close, desc1, dialogMode);
  };

  // Update Smart Objects
  function step119(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    executeAction(sTID('updatePlacedLayer'), undefined, dialogMode);
  };

  // Set
  function step120(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "_Temp");
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step121(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.Layer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Black");
    desc1.putObject(PSKey.Using, PSClass.Layer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Paste
  function step122(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putEnumerated(PSKey.AntiAlias, PSType.AntiAlias, PSEnum.AntiAliasNone);
    executeAction(PSEvent.Paste, desc1, dialogMode);
  };

  // Make
  function step123(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Black Blur");
    desc1.putObject(PSKey.New, PSClass.Layer, desc2);
    desc1.putEnumerated(PSKey.Using, PSType.AreaSelector, PSEnum.Selection);
    desc1.putBoolean(PSKey.Copy, true);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Surface Blur
  function step124(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putUnitDouble(PSKey.Radius, PSUnit.Pixels, 30);
    desc1.putInteger(PSKey.Threshold, 60);
    executeAction(sTID('surfaceBlur'), desc1, dialogMode);
  };

  // Move
  function step125(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Previous);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Select
  function step126(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Black");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Apply Image
  function step127(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    ref1.putName(PSClass.Layer, "Black Blur");
    desc2.putReference(PSKey.To, ref1);
    desc2.putEnumerated(PSClass.Calculation, PSType.Calculation, PSEvent.Subtract);
    desc2.putDouble(PSKey.Scale, 2);
    desc2.putInteger(PSKey.Offset, 128);
    desc1.putObject(PSKey.With, PSClass.Calculation, desc2);
    executeAction(sTID('applyImageEvent'), desc1, dialogMode);
  };

  // Delete
  function step128(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Black Blur");
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Delete, desc1, dialogMode);
  };

  // Delete
  function step129(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "_Temp");
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Delete, desc1, dialogMode);
  };

  // Make
  function step130(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "ajust");
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);
    desc2.putObject(PSKey.Type, PSClass.Curves, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Create Clipping Mask
  function step131(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    executeAction(sTID('groupEvent'), desc1, dialogMode);
  };

  // Set
  function step132(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindCustom);
    var list1 = new ActionList();
    var desc3 = new ActionDescriptor();
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.Composite);
    desc3.putReference(PSClass.Channel, ref2);
    var list2 = new ActionList();
    var desc4 = new ActionDescriptor();
    desc4.putDouble(PSKey.Horizontal, 0);
    desc4.putDouble(PSKey.Vertical, 80);
    list2.putObject(PSClass.Point, desc4);
    var desc5 = new ActionDescriptor();
    desc5.putDouble(PSKey.Horizontal, 81);
    desc5.putDouble(PSKey.Vertical, 98);
    list2.putObject(PSClass.Point, desc5);
    var desc6 = new ActionDescriptor();
    desc6.putDouble(PSKey.Horizontal, 128);
    desc6.putDouble(PSKey.Vertical, 128);
    list2.putObject(PSClass.Point, desc6);
    var desc7 = new ActionDescriptor();
    desc7.putDouble(PSKey.Horizontal, 185);
    desc7.putDouble(PSKey.Vertical, 255);
    list2.putObject(PSClass.Point, desc7);
    desc3.putList(PSKey.Curve, list2);
    list1.putObject(PSClass.CurvesAdjustment, desc3);
    desc2.putList(PSKey.Adjustment, list1);
    desc1.putObject(PSKey.To, PSClass.Curves, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step133(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Black");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Set
  function step134(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSEnum.HardLight);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step135(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Forward);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelection);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step136(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSString.layerGroup);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSKey.From, ref2);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Clarity");
    desc1.putObject(PSKey.Using, PSString.layerGroup, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Hide
  function step137(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Hide, desc1, dialogMode);
  };

  // Select
  function step138(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step139(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.Layer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "map");
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 50);
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSString.linearLight);
    desc1.putObject(PSKey.Using, PSClass.Layer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Apply Image
  function step140(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Merged);
    desc2.putReference(PSKey.To, ref1);
    desc2.putBoolean(PSKey.Invert, true);
    desc1.putObject(PSKey.With, PSClass.Calculation, desc2);
    executeAction(sTID('applyImageEvent'), desc1, dialogMode);
  };

  // Surface Blur
  function step141(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putUnitDouble(PSKey.Radius, PSUnit.Pixels, 4);
    desc1.putInteger(PSKey.Threshold, 8);
    executeAction(sTID('surfaceBlur'), desc1, dialogMode);
  };

  // Make
  function step142(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.Layer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Large Sharp");
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSEnum.SoftLight);
    desc1.putObject(PSKey.Using, PSClass.Layer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Apply Image
  function step143(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Merged);
    desc2.putReference(PSKey.To, ref1);
    desc1.putObject(PSKey.With, PSClass.Calculation, desc2);
    executeAction(sTID('applyImageEvent'), desc1, dialogMode);
  };

  // Delete
  function step144(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "map");
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Delete, desc1, dialogMode);
  };

  // Hide
  function step145(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Hide, desc1, dialogMode);
  };

  // Select
  function step146(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step147(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.Layer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "map");
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 50);
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSString.linearLight);
    desc1.putObject(PSKey.Using, PSClass.Layer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Apply Image
  function step148(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Merged);
    desc2.putReference(PSKey.To, ref1);
    desc2.putBoolean(PSKey.Invert, true);
    desc1.putObject(PSKey.With, PSClass.Calculation, desc2);
    executeAction(sTID('applyImageEvent'), desc1, dialogMode);
  };

  // Surface Blur
  function step149(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putUnitDouble(PSKey.Radius, PSUnit.Pixels, 2);
    desc1.putInteger(PSKey.Threshold, 8);
    executeAction(sTID('surfaceBlur'), desc1, dialogMode);
  };

  // Make
  function step150(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.Layer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Medium Sharp");
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSEnum.Overlay);
    desc1.putObject(PSKey.Using, PSClass.Layer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Apply Image
  function step151(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Merged);
    desc2.putReference(PSKey.To, ref1);
    desc1.putObject(PSKey.With, PSClass.Calculation, desc2);
    executeAction(sTID('applyImageEvent'), desc1, dialogMode);
  };

  // Delete
  function step152(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "map");
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Delete, desc1, dialogMode);
  };

  // Hide
  function step153(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Hide, desc1, dialogMode);
  };

  // Select
  function step154(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step155(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.Layer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Small Sharp");
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSEnum.Overlay);
    desc1.putObject(PSKey.Using, PSClass.Layer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Apply Image
  function step156(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Merged);
    desc2.putReference(PSKey.To, ref1);
    desc1.putObject(PSKey.With, PSClass.Calculation, desc2);
    executeAction(sTID('applyImageEvent'), desc1, dialogMode);
  };

  // High Pass
  function step157(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putUnitDouble(PSKey.Radius, PSUnit.Pixels, 1);
    executeAction(sTID('highPass'), desc1, dialogMode);
  };

  // Hide
  function step158(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Hide, desc1, dialogMode);
  };

  // Select
  function step159(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step160(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.Layer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Super Small Sharp");
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSEnum.Overlay);
    desc1.putObject(PSKey.Using, PSClass.Layer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Apply Image
  function step161(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Merged);
    desc2.putReference(PSKey.To, ref1);
    desc1.putObject(PSKey.With, PSClass.Calculation, desc2);
    executeAction(sTID('applyImageEvent'), desc1, dialogMode);
  };

  // High Pass
  function step162(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putUnitDouble(PSKey.Radius, PSUnit.Pixels, 0.5);
    executeAction(sTID('highPass'), desc1, dialogMode);
  };

  // Show
  function step163(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Small Sharp");
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Show, desc1, dialogMode);
  };

  // Show
  function step164(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Medium Sharp");
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Show, desc1, dialogMode);
  };

  // Show
  function step165(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Large Sharp");
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Show, desc1, dialogMode);
  };

  // Select
  function step166(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Large Sharp");
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelectionContinuous);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step167(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSString.layerGroup);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSKey.From, ref2);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Group Sharp");
    desc1.putObject(PSKey.Using, PSString.layerGroup, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Show
  function step168(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Clarity");
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Show, desc1, dialogMode);
  };

  // Show
  function step169(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Group Local Contrast");
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Show, desc1, dialogMode);
  };

  // Show
  function step170(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Auto Contrast");
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Show, desc1, dialogMode);
  };

  // Show
  function step171(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Contrast");
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Show, desc1, dialogMode);
  };

  // Show
  function step172(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Dark Darks");
    ref1.putName(PSClass.Layer, "Darks HDR");
    ref1.putName(PSClass.Layer, "Light Lights");
    ref1.putName(PSClass.Layer, "Lights HDR");
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Show, desc1, dialogMode);
  };

  // Select
  function step173(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Contrast");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Move
  function step174(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Front);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Select
  function step175(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Auto Contrast");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Move
  function step176(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Front);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Select
  function step177(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Dark Darks");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Move
  function step178(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Front);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Set
  function step179(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Punch Darks");
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step180(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Light Lights");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Move
  function step181(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Front);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Set
  function step182(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Punch Lights");
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step183(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step184(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Dynamic Low Key");
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);
    desc2.putObject(PSKey.Type, PSClass.Curves, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step185(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSEnum.Multiply);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step186(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putUnitDouble(sTID("userMaskFeather"), PSUnit.Pixels, 20);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step187(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putName(PSClass.Channel, "Darks-");
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step188(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Punch Darks+");
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 50);
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);
    desc2.putObject(PSKey.Type, PSClass.Curves, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step189(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSString.linearBurn);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step190(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putName(PSClass.Channel, "Darks-");
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step191(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Fade Darks");
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);
    desc3.putDouble(PSKey.Exposure, 0);
    desc3.putDouble(PSKey.Offset, 0);
    desc3.putDouble(PSString.gammaCorrection, 1);
    desc2.putObject(PSKey.Type, PSKey.Exposure, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step192(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindCustom);
    desc2.putDouble(PSKey.Exposure, 0.10000000149012);
    desc2.putDouble(PSKey.Offset, 0.00999999977648);
    desc1.putObject(PSKey.To, PSKey.Exposure, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step193(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 25);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step194(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Select
  function step195(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Contrast");
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelectionContinuous);
    desc1.putBoolean(PSKey.MakeVisible, false);
    var list1 = new ActionList();
    list1.putInteger(15);
    list1.putInteger(sTID("skinTone"), 16);
    list1.putInteger(sTID("contentAware"), 6);
    list1.putInteger(PSString.shapeburst, 11);
    list1.putInteger(PSString.average, 44);
    list1.putInteger(PSString.subsample, 45);
    list1.putInteger(PSString.pdf13, 46);
    desc1.putList(PSKey.LayerID, list1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step196(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSString.layerGroup);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSKey.From, ref2);
    desc1.putInteger(PSString.layerGroupStart, 47);
    desc1.putInteger(PSString.layerGroupEnd, 48);
    desc1.putString(PSKey.Name, "Группа 1");
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step197(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Pro Contrast");
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step198(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Lights HDR");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    var list1 = new ActionList();
    list1.putInteger(93);
    desc1.putList(PSKey.LayerID, list1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Select
  function step199(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Darks HDR");
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelectionContinuous);
    desc1.putBoolean(PSKey.MakeVisible, false);
    var list1 = new ActionList();
    list1.putInteger(88);
    list1.putInteger(sTID("skinTone"), 93);
    desc1.putList(PSKey.LayerID, list1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step200(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSString.layerGroup);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSKey.From, ref2);
    desc1.putInteger(PSString.layerGroupStart, 127);
    desc1.putInteger(PSString.layerGroupEnd, 128);
    desc1.putString(PSKey.Name, "Группа 1");
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step201(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "HDR");
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step202(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Soften Skin");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    var list1 = new ActionList();
    list1.putInteger(81);
    desc1.putList(PSKey.LayerID, list1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Show
  function step203(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var list1 = new ActionList();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    list1.putReference(ref1);
    desc1.putList(PSString.Null, list1);
    executeAction(PSEvent.Show, desc1, dialogMode);
  };

  // Move
  function step204(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Next);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Move
  function step205(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Next);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Move
  function step206(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Next);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Set
  function step207(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 44);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step208(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step209(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "SelectiveColor");
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);
    desc2.putObject(PSKey.Type, PSClass.SelectiveColor, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Move
  function step210(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Front);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Set
  function step211(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindCustom);
    desc2.putEnumerated(PSKey.Method, PSType.CorrectionMethod, PSEnum.Absolute);
    var list1 = new ActionList();
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSKey.Colors, PSKey.Colors, PSKey.Radius);
    desc3.putUnitDouble(PSKey.Black, PSUnit.Percent, -100);
    list1.putObject(PSClass.ColorCorrection, desc3);
    var desc4 = new ActionDescriptor();
    desc4.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Yellows);
    desc4.putUnitDouble(PSKey.Black, PSUnit.Percent, -100);
    list1.putObject(PSClass.ColorCorrection, desc4);
    var desc5 = new ActionDescriptor();
    desc5.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Greens);
    desc5.putUnitDouble(PSKey.Black, PSUnit.Percent, -100);
    list1.putObject(PSClass.ColorCorrection, desc5);
    var desc6 = new ActionDescriptor();
    desc6.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Cyans);
    desc6.putUnitDouble(PSKey.Black, PSUnit.Percent, -100);
    list1.putObject(PSClass.ColorCorrection, desc6);
    var desc7 = new ActionDescriptor();
    desc7.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Blues);
    desc7.putUnitDouble(PSKey.Black, PSUnit.Percent, -100);
    list1.putObject(PSClass.ColorCorrection, desc7);
    var desc8 = new ActionDescriptor();
    desc8.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Magentas);
    desc8.putUnitDouble(PSKey.Black, PSUnit.Percent, -100);
    list1.putObject(PSClass.ColorCorrection, desc8);
    var desc9 = new ActionDescriptor();
    desc9.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Whites);
    desc9.putUnitDouble(PSKey.Black, PSUnit.Percent, 100);
    list1.putObject(PSClass.ColorCorrection, desc9);
    var desc10 = new ActionDescriptor();
    desc10.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Neutrals);
    desc10.putUnitDouble(PSKey.Black, PSUnit.Percent, 100);
    list1.putObject(PSClass.ColorCorrection, desc10);
    var desc11 = new ActionDescriptor();
    desc11.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Blocks);
    desc11.putUnitDouble(PSKey.Black, PSUnit.Percent, 100);
    list1.putObject(PSClass.ColorCorrection, desc11);
    desc2.putList(PSClass.ColorCorrection, list1);
    desc1.putObject(PSKey.To, PSClass.SelectiveColor, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step212(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "ContrastForMask");
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);
    desc2.putObject(PSKey.Type, PSClass.Curves, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step213(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    var list1 = new ActionList();
    var desc3 = new ActionDescriptor();
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.Composite);
    desc3.putReference(PSClass.Channel, ref2);
    var list2 = new ActionList();
    var desc4 = new ActionDescriptor();
    desc4.putDouble(PSKey.Horizontal, 0);
    desc4.putDouble(PSKey.Vertical, 0);
    list2.putObject(PSClass.Point, desc4);
    var desc5 = new ActionDescriptor();
    desc5.putDouble(PSKey.Horizontal, 128);
    desc5.putDouble(PSKey.Vertical, 255);
    list2.putObject(PSClass.Point, desc5);
    desc3.putList(PSKey.Curve, list2);
    list1.putObject(PSClass.CurvesAdjustment, desc3);
    desc2.putList(PSKey.Adjustment, list1);
    desc1.putObject(PSKey.To, PSClass.Curves, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step214(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.Layer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "MergedContrastMask");
    desc1.putObject(PSKey.Using, PSClass.Layer, desc2);
    desc1.putInteger(PSKey.LayerID, 358);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Apply Image
  function step215(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Merged);
    desc2.putReference(PSKey.To, ref1);
    desc1.putObject(PSKey.With, PSClass.Calculation, desc2);
    executeAction(sTID('applyImageEvent'), desc1, dialogMode);
  };

  // Select
  function step216(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Backward);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelection);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Select
  function step217(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Backward);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelection);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step218(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSString.layerGroup);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSKey.From, ref2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step219(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Saturation Mask");
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step220(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Duplicate
  function step221(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    desc1.putString(PSKey.Name, "SaturnMask");
    executeAction(PSEvent.Duplicate, desc1, dialogMode);
  };

  // Delete
  function step222(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Delete, desc1, dialogMode);
  };

  // Set
  function step223(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSKey.To, PSType.Ordinal, PSEnum.None);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step224(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Set
  function step225(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putName(PSClass.Channel, "SaturnMask");
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step226(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Desaturate heavily saturated");
    desc2.putClass(PSKey.Type, sTID("vibrance"));
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step227(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 40);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step228(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putInteger(PSKey.Start, -50);
    desc1.putObject(PSKey.To, sTID("vibrance"), desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step229(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Set
  function step230(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putName(PSClass.Channel, "Darks---");
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step231(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSString.contentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Make Shadows Cool");
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 15);
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSEnum.Lighten);
    var desc3 = new ActionDescriptor();
    var desc4 = new ActionDescriptor();
    desc4.putDouble(PSKey.Red, 0);
    desc4.putDouble(PSKey.Green, 49.9992370605469);
    desc4.putDouble(PSKey.Blue, 149.997711181641);
    desc3.putObject(PSKey.Color, PSClass.RGBColor, desc4);
    desc2.putObject(PSKey.Type, PSString.solidColorLayer, desc3);
    desc1.putObject(PSKey.Using, PSString.contentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Select
  function step232(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step233(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Color Grading");
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 25);
    var desc3 = new ActionDescriptor();
    var desc4 = new ActionDescriptor();
    desc4.putString(PSKey.Name, "От основного к фоновому");
    desc4.putEnumerated(PSType.GradientForm, PSType.GradientForm, PSEnum.CustomStops);
    desc4.putDouble(PSEvent.Intersect, 4096);
    var list1 = new ActionList();
    var desc5 = new ActionDescriptor();
    var desc6 = new ActionDescriptor();
    desc6.putDouble(PSKey.Red, 0);
    desc6.putDouble(PSKey.Green, 0);
    desc6.putDouble(PSKey.Blue, 0);
    desc5.putObject(PSKey.Color, PSClass.RGBColor, desc6);
    desc5.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc5.putInteger(PSKey.Location, 0);
    desc5.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc5);
    var desc7 = new ActionDescriptor();
    var desc8 = new ActionDescriptor();
    desc8.putDouble(PSKey.Red, 255);
    desc8.putDouble(PSKey.Green, 255);
    desc8.putDouble(PSKey.Blue, 255);
    desc7.putObject(PSKey.Color, PSClass.RGBColor, desc8);
    desc7.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc7.putInteger(PSKey.Location, 4096);
    desc7.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc7);
    desc4.putList(PSKey.Colors, list1);
    var list2 = new ActionList();
    var desc9 = new ActionDescriptor();
    desc9.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 100);
    desc9.putInteger(PSKey.Location, 0);
    desc9.putInteger(PSKey.Midpoint, 50);
    list2.putObject(PSClass.TransparencyStop, desc9);
    var desc10 = new ActionDescriptor();
    desc10.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 100);
    desc10.putInteger(PSKey.Location, 4096);
    desc10.putInteger(PSKey.Midpoint, 50);
    list2.putObject(PSClass.TransparencyStop, desc10);
    desc4.putList(PSKey.Transparency, list2);
    desc3.putObject(PSKey.Gradient, PSClass.Gradient, desc4);
    desc2.putObject(PSKey.Type, PSClass.GradientMap, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step234(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    var desc3 = new ActionDescriptor();
    desc3.putString(PSKey.Name, "Заказная");
    desc3.putEnumerated(PSType.GradientForm, PSType.GradientForm, PSEnum.CustomStops);
    desc3.putDouble(PSEvent.Intersect, 4096);
    var list1 = new ActionList();
    var desc4 = new ActionDescriptor();
    var desc5 = new ActionDescriptor();
    desc5.putDouble(PSKey.Red, 90.8468627929688);
    desc5.putDouble(PSKey.Green, 59.6722412109375);
    desc5.putDouble(PSKey.Blue, 33.0422973632813);
    desc4.putObject(PSKey.Color, PSClass.RGBColor, desc5);
    desc4.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc4.putInteger(PSKey.Location, 0);
    desc4.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc4);
    var desc6 = new ActionDescriptor();
    var desc7 = new ActionDescriptor();
    desc7.putDouble(PSKey.Red, 90.8468627929688);
    desc7.putDouble(PSKey.Green, 59.6722412109375);
    desc7.putDouble(PSKey.Blue, 33.0422973632813);
    desc6.putObject(PSKey.Color, PSClass.RGBColor, desc7);
    desc6.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc6.putInteger(PSKey.Location, 0);
    desc6.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc6);
    var desc8 = new ActionDescriptor();
    var desc9 = new ActionDescriptor();
    desc9.putDouble(PSKey.Red, 3.00384521484375);
    desc9.putDouble(PSKey.Green, 3.00384521484375);
    desc9.putDouble(PSKey.Blue, 3.00384521484375);
    desc8.putObject(PSKey.Color, PSClass.RGBColor, desc9);
    desc8.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc8.putInteger(PSKey.Location, 0);
    desc8.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc8);
    var desc10 = new ActionDescriptor();
    var desc11 = new ActionDescriptor();
    desc11.putDouble(PSKey.Red, 69.5787048339844);
    desc11.putDouble(PSKey.Green, 47.1510314941406);
    desc11.putDouble(PSKey.Blue, 31.4080810546875);
    desc10.putObject(PSKey.Color, PSClass.RGBColor, desc11);
    desc10.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc10.putInteger(PSKey.Location, 808);
    desc10.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc10);
    var desc12 = new ActionDescriptor();
    var desc13 = new ActionDescriptor();
    desc13.putDouble(PSKey.Red, 168.051910400391);
    desc13.putDouble(PSKey.Green, 130.713958740234);
    desc13.putDouble(PSKey.Blue, 71.2596130371094);
    desc12.putObject(PSKey.Color, PSClass.RGBColor, desc13);
    desc12.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc12.putInteger(PSKey.Location, 2063);
    desc12.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc12);
    var desc14 = new ActionDescriptor();
    var desc15 = new ActionDescriptor();
    desc15.putDouble(PSKey.Red, 217.413024902344);
    desc15.putDouble(PSKey.Green, 182.0361328125);
    desc15.putDouble(PSKey.Blue, 116.760864257813);
    desc14.putObject(PSKey.Color, PSClass.RGBColor, desc15);
    desc14.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc14.putInteger(PSKey.Location, 3090);
    desc14.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc14);
    var desc16 = new ActionDescriptor();
    var desc17 = new ActionDescriptor();
    desc17.putDouble(PSKey.Red, 251.972808837891);
    desc17.putDouble(PSKey.Green, 245.653839111328);
    desc17.putDouble(PSKey.Blue, 208.292541503906);
    desc16.putObject(PSKey.Color, PSClass.RGBColor, desc17);
    desc16.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc16.putInteger(PSKey.Location, 4024);
    desc16.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc16);
    var desc18 = new ActionDescriptor();
    var desc19 = new ActionDescriptor();
    desc19.putDouble(PSKey.Red, 255);
    desc19.putDouble(PSKey.Green, 255);
    desc19.putDouble(PSKey.Blue, 255);
    desc18.putObject(PSKey.Color, PSClass.RGBColor, desc19);
    desc18.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc18.putInteger(PSKey.Location, 4096);
    desc18.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc18);
    desc3.putList(PSKey.Colors, list1);
    var list2 = new ActionList();
    var desc20 = new ActionDescriptor();
    desc20.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 100);
    desc20.putInteger(PSKey.Location, 0);
    desc20.putInteger(PSKey.Midpoint, 50);
    list2.putObject(PSClass.TransparencyStop, desc20);
    var desc21 = new ActionDescriptor();
    desc21.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 100);
    desc21.putInteger(PSKey.Location, 4096);
    desc21.putInteger(PSKey.Midpoint, 50);
    list2.putObject(PSClass.TransparencyStop, desc21);
    desc3.putList(PSKey.Transparency, list2);
    desc2.putObject(PSKey.Gradient, PSClass.Gradient, desc3);
    desc1.putObject(PSKey.To, PSClass.GradientMap, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step235(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Desaturate heavily saturated");
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelectionContinuous);
    desc1.putBoolean(PSKey.MakeVisible, false);
    var list1 = new ActionList();
    list1.putInteger(127);
    list1.putInteger(sTID("skinTone"), 128);
    list1.putInteger(sTID("contentAware"), 129);
    desc1.putList(PSKey.LayerID, list1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step236(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSString.layerGroup);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSKey.From, ref2);
    desc1.putInteger(PSString.layerGroupStart, 151);
    desc1.putInteger(PSString.layerGroupEnd, 152);
    desc1.putString(PSKey.Name, "Группа 1");
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step237(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Color");
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Delete
  function step238(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Channel, "Darks");
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Delete, desc1, dialogMode);
  };

  // Delete
  function step239(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Channel, "Darks-");
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Delete, desc1, dialogMode);
  };

  // Delete
  function step240(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Channel, "Darks--");
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Delete, desc1, dialogMode);
  };

  // Delete
  function step241(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Channel, "Darks---");
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Delete, desc1, dialogMode);
  };

  // Delete
  function step242(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Channel, "Lights");
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Delete, desc1, dialogMode);
  };

  // Delete
  function step243(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Channel, "Lights+");
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Delete, desc1, dialogMode);
  };

  // Delete
  function step244(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Channel, "Lights++");
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Delete, desc1, dialogMode);
  };

  // Delete
  function step245(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Channel, "SaturnMask");
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Delete, desc1, dialogMode);
  };

  // Select
  function step246(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Color");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    var list1 = new ActionList();
    list1.putInteger(344);
    desc1.putList(PSKey.LayerID, list1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Set
  function step247(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSKey.Color, PSKey.Color, PSKey.Red);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step248(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Pro Contrast");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    var list1 = new ActionList();
    list1.putInteger(328);
    desc1.putList(PSKey.LayerID, list1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Set
  function step249(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSKey.Color, PSKey.Color, PSKey.Blue);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step250(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Group Sharp");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    var list1 = new ActionList();
    list1.putInteger(193);
    desc1.putList(PSKey.LayerID, list1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Set
  function step251(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSKey.Color, PSKey.Color, PSEnum.Orange);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step252(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Soften Skin");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    var list1 = new ActionList();
    list1.putInteger(156);
    desc1.putList(PSKey.LayerID, list1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Set
  function step253(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSKey.Color, PSKey.Color, PSEnum.YellowColor);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step254(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Clarity");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    var list1 = new ActionList();
    list1.putInteger(185);
    desc1.putList(PSKey.LayerID, list1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Set
  function step255(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSKey.Color, PSKey.Color, PSKey.Blue);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step256(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Group Local Contrast");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    var list1 = new ActionList();
    list1.putInteger(177);
    desc1.putList(PSKey.LayerID, list1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Set
  function step257(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSKey.Color, PSKey.Color, PSEnum.Violet);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step258(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "HDR");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    var list1 = new ActionList();
    list1.putInteger(200);
    desc1.putList(PSKey.LayerID, list1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Set
  function step259(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSKey.Color, PSKey.Color, PSKey.Blue);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step260(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Clarity");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    var list1 = new ActionList();
    list1.putInteger(185);
    desc1.putList(PSKey.LayerID, list1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Move
  function step261(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Next);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Move
  function step262(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Next);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Move
  function step263(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Next);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Select
  function step264(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Group Local Contrast");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    var list1 = new ActionList();
    list1.putInteger(41);
    desc1.putList(PSKey.LayerID, list1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Move
  function step265(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Next);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Move
  function step266(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Next);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Move
  function step267(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Next);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Move
  function step268(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Next);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Select
  function step269(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Group Sharp");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    var list1 = new ActionList();
    list1.putInteger(57);
    desc1.putList(PSKey.LayerID, list1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Move
  function step270(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Next);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Move
  function step271(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Next);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Move
  function step272(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Next);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  step1();      // Select
  step2();      // Make
  step3();      // Move
  step4();      // Apply Image
  step5();      // Make
  step6();      // Make
  step7();      // High Pass
  step8();      // Brightness/Contrast
  step9();      // Select
  step10();      // Gaussian Blur
  step11();      // High Pass
  step12();      // Brightness/Contrast
  step13();      // Select
  step14();      // Gaussian Blur
  step15();      // Color Range
  step16();      // Select
  step17();      // Make
  step18();      // Select
  step19();      // Select
  step20();      // Select
  step21();      // Make
  step22();      // Make
  step23();      // Select
  step24();      // Hide
  step25();      // Set
  step26();      // Subtract
  step27();      // Make
  step28();      // Set
  step29();      // Set
  step30();      // Intersect
  step31();      // Make
  step32();      // Set
  step33();      // Set
  step34();      // Intersect
  step35();      // Make
  step36();      // Set
  step37();      // Set
  step38();      // Intersect
  step39();      // Make
  step40();      // Set
  step41();      // Set
  step42();      // Make
  step43();      // Set
  step44();      // Make
  step45();      // Set
  step46();      // Make
  step47();      // Set
  step48();      // Set
  step49();      // Intersect
  step50();      // Make
  step51();      // Set
  step52();      // Set
  step53();      // Intersect
  step54();      // Make
  step55();      // Set
  step56();      // Set
  step57();      // Make
  step58();      // Set
  step59();      // Make
  step60();      // Select
  step61();      // Set
  step62();      // Subtract
  step63();      // Subtract
  step64();      // Make
  step65();      // Set
  step66();      // Set
  step67();      // Make
  step68();      // Set
  step69();      // Select
  step70();      // Delete
  step71();      // Make
  step72();      // Hide
  step73();      // Hide
  step74();      // Hide
  step75();      // Select
  step76();      // Make
  step77();      // Apply Image
  step78();      // Surface Blur
  step79();      // Make
  step80();      // Apply Image
  step81();      // Delete
  step82();      // Reduce Noise
  step83();      // Reduce Noise
  step84();      // Hide
  step85();      // Select
  step86();      // Make
  step87();      // Apply Image
  step88();      // Surface Blur
  step89();      // Make
  step90();      // Apply Image
  step91();      // Delete
  step92();      // Reduce Noise
  step93();      // Reduce Noise
  step94();      // Hide
  step95();      // Select
  step96();      // Make
  step97();      // Apply Image
  step98();      // Surface Blur
  step99();      // Make
  step100();      // Apply Image
  step101();      // Delete
  step102();      // Reduce Noise
  step103();      // Reduce Noise
  step104();      // Show
  step105();      // Show
  step106();      // Select
  step107();      // Make
  step108();      // Hide
  step109();      // Make
  step110();      // Move
  step111();      // Apply Image
  step112();      // Convert to Smart Object
  step113();      // Edit Contents
  step114();      // Convert Mode
  step115();      // Select
  step116();      // Set
  step117();      // Copy
  step118();      // Close
  step119();      // Update Smart Objects
  step120();      // Set
  step121();      // Make
  step122();      // Paste
  step123();      // Make
  step124();      // Surface Blur
  step125();      // Move
  step126();      // Select
  step127();      // Apply Image
  step128();      // Delete
  step129();      // Delete
  step130();      // Make
  step131();      // Create Clipping Mask
  step132();      // Set
  step133();      // Select
  step134();      // Set
  step135();      // Select
  step136();      // Make
  step137();      // Hide
  step138();      // Select
  step139();      // Make
  step140();      // Apply Image
  step141();      // Surface Blur
  step142();      // Make
  step143();      // Apply Image
  step144();      // Delete
  step145();      // Hide
  step146();      // Select
  step147();      // Make
  step148();      // Apply Image
  step149();      // Surface Blur
  step150();      // Make
  step151();      // Apply Image
  step152();      // Delete
  step153();      // Hide
  step154();      // Select
  step155();      // Make
  step156();      // Apply Image
  step157();      // High Pass
  step158();      // Hide
  step159();      // Select
  step160();      // Make
  step161();      // Apply Image
  step162();      // High Pass
  step163();      // Show
  step164();      // Show
  step165();      // Show
  step166();      // Select
  step167();      // Make
  step168();      // Show
  step169();      // Show
  step170();      // Show
  step171();      // Show
  step172();      // Show
  step173();      // Select
  step174();      // Move
  step175();      // Select
  step176();      // Move
  step177();      // Select
  step178();      // Move
  step179();      // Set
  step180();      // Select
  step181();      // Move
  step182();      // Set
  step183();      // Set
  step184();      // Make
  step185();      // Set
  step186();      // Set
  step187();      // Set
  step188();      // Make
  step189();      // Set
  step190();      // Set
  step191();      // Make
  step192();      // Set
  step193();      // Set
  step194();      // Select
  step195();      // Select
  step196();      // Make
  step197();      // Set
  step198();      // Select
  step199();      // Select
  step200();      // Make
  step201();      // Set
  step202();      // Select
  step203();      // Show
  step204();      // Move
  step205();      // Move
  step206();      // Move
  step207();      // Set
  step208();      // Select
  step209();      // Make
  step210();      // Move
  step211();      // Set
  step212();      // Make
  step213();      // Set
  step214();      // Make
  step215();      // Apply Image
  step216();      // Select
  step217();      // Select
  step218();      // Make
  step219();      // Set
  step220();      // Set
  step221();      // Duplicate
  step222();      // Delete
  step223();      // Set
  step224();      // Select
  step225();      // Set
  step226();      // Make
  step227();      // Set
  step228();      // Set
  step229();      // Select
  step230();      // Set
  step231();      // Make
  step232();      // Select
  step233();      // Make
  step234();      // Set
  step235();      // Select
  step236();      // Make
  step237();      // Set
  step238();      // Delete
  step239();      // Delete
  step240();      // Delete
  step241();      // Delete
  step242();      // Delete
  step243();      // Delete
  step244();      // Delete
  step245();      // Delete
  step246();      // Select
  step247();      // Set
  step248();      // Select
  step249();      // Set
  step250();      // Select
  step251();      // Set
  step252();      // Select
  step253();      // Set
  step254();      // Select
  step255();      // Set
  step256();      // Select
  step257();      // Set
  step258();      // Select
  step259();      // Set
  step260();      // Select
  step261();      // Move
  step262();      // Move
  step263();      // Move
  step264();      // Select
  step265();      // Move
  step266();      // Move
  step267();      // Move
  step268();      // Move
  step269();      // Select
  step270();      // Move
  step271();      // Move
  step272();      // Move
};



cTID = function(s) { return app.charIDToTypeID(s); };
sTID = function(s) { return app.stringIDToTypeID(s); };

//
// SuperVolumeX3.loadSymbols
//   Loading up the symbol definitions like this makes it possible
//   to include several of these generated files in one master file
//   provided a prefix is specified other than the default. It also
//   skips the definitions if PSConstants has already been loaded.
//
SuperVolumeX3.loadSymbols = function() {
  var dbgLevel = $.level;
  $.level = 0;
  try {
    PSConstants;
    return; // only if PSConstants is defined
  } catch (e) {
  } finally {
    $.level = dbgLevel;
  }
  var needDefs = true;
  $.level = 0;
  try {
    PSClass;
    needDefs = false;
  } catch (e) {
  } finally {
    $.level = dbgLevel;
  }
  if (needDefs) {
    PSClass = function() {};
    PSEnum = function() {};
    PSEvent = function() {};
    PSForm = function() {};
    PSKey = function() {};
    PSType = function() {};
    PSUnit = function() {};
    PSString = function() {};
  }

  // We may still end up duplicating some of the following definitions
  // but at least we don't redefine PSClass, etc... and wipe out others
  PSClass.AdjustmentLayer = cTID('AdjL');
  PSClass.Calculation = cTID('Clcl');
  PSClass.Channel = cTID('Chnl');
  PSClass.ColorCorrection = cTID('ClrC');
  PSClass.ColorStop = cTID('Clrt');
  PSClass.Curves = cTID('Crvs');
  PSClass.CurvesAdjustment = cTID('CrvA');
  PSClass.Gradient = cTID('Grdn');
  PSClass.GradientMap = cTID('GdMp');
  PSClass.LabColorMode = cTID('LbCM');
  PSClass.Layer = cTID('Lyr ');
  PSClass.Mask = cTID('Msk ');
  PSClass.Point = cTID('Pnt ');
  PSClass.RGBColor = cTID('RGBC');
  PSClass.SelectiveColor = cTID('SlcC');
  PSClass.TransparencyStop = cTID('TrnS');
  PSEnum.Absolute = cTID('Absl');
  PSEnum.All = cTID('Al  ');
  PSEnum.AntiAliasNone = cTID('Anno');
  PSEnum.Backward = cTID('Bckw');
  PSEnum.Blocks = cTID('Blks');
  PSEnum.Blues = cTID('Bls ');
  PSEnum.ColorNoise = cTID('ClNs');
  PSEnum.Composite = cTID('Cmps');
  PSEnum.CustomStops = cTID('CstS');
  PSEnum.Cyans = cTID('Cyns');
  PSEnum.Forward = cTID('Frwr');
  PSEnum.Front = cTID('Frnt');
  PSEnum.Greens = cTID('Grns');
  PSEnum.HardLight = cTID('HrdL');
  PSEnum.HideAll = cTID('HdAl');
  PSEnum.HideSelection = cTID('HdSl');
  PSEnum.Lighten = cTID('Lghn');
  PSEnum.Lightness = cTID('Lght');
  PSEnum.Magentas = cTID('Mgnt');
  PSEnum.MaskedAreas = cTID('MskA');
  PSEnum.Merged = cTID('Mrgd');
  PSEnum.Multiply = cTID('Mltp');
  PSEnum.Neutrals = cTID('Ntrl');
  PSEnum.Next = cTID('Nxt ');
  PSEnum.None = cTID('None');
  PSEnum.Orange = cTID('Orng');
  PSEnum.Overlay = cTID('Ovrl');
  PSEnum.Previous = cTID('Prvs');
  PSEnum.RGB = cTID('RGB ');
  PSEnum.RevealAll = cTID('RvlA');
  PSEnum.Screen = cTID('Scrn');
  PSEnum.Selection = cTID('Slct');
  PSEnum.SoftLight = cTID('SftL');
  PSEnum.Target = cTID('Trgt');
  PSEnum.UserStop = cTID('UsrS');
  PSEnum.Violet = cTID('Vlt ');
  PSEnum.Whites = cTID('Whts');
  PSEnum.YellowColor = cTID('Ylw ');
  PSEnum.Yellows = cTID('Ylws');
  PSEnum.Yes = cTID('Ys  ');
  PSEvent.Close = cTID('Cls ');
  PSEvent.Copy = cTID('copy');
  PSEvent.Delete = cTID('Dlt ');
  PSEvent.Duplicate = cTID('Dplc');
  PSEvent.Hide = cTID('Hd  ');
  PSEvent.Intersect = cTID('Intr');
  PSEvent.Make = cTID('Mk  ');
  PSEvent.Move = cTID('move');
  PSEvent.Paste = cTID('past');
  PSEvent.Select = cTID('slct');
  PSEvent.Set = cTID('setd');
  PSEvent.Show = cTID('Shw ');
  PSEvent.Subtract = cTID('Sbtr');
  PSKey.Adjustment = cTID('Adjs');
  PSKey.Amount = cTID('Amnt');
  PSKey.AntiAlias = cTID('AntA');
  PSKey.As = cTID('As  ');
  PSKey.At = cTID('At  ');
  PSKey.Black = cTID('Blck');
  PSKey.Blue = cTID('Bl  ');
  PSKey.Brightness = cTID('Brgh');
  PSKey.Color = cTID('Clr ');
  PSKey.ColorIndicates = cTID('ClrI');
  PSKey.Colors = cTID('Clrs');
  PSKey.Contrast = cTID('Cntr');
  PSKey.Copy = cTID('Cpy ');
  PSKey.Curve = cTID('Crv ');
  PSKey.DocumentID = cTID('DocI');
  PSKey.EdgeFidelity = cTID('EdgF');
  PSKey.Exposure = cTID('Exps');
  PSKey.From = cTID('From');
  PSKey.Fuzziness = cTID('Fzns');
  PSKey.Gradient = cTID('Grad');
  PSKey.Green = cTID('Grn ');
  PSKey.Horizontal = cTID('Hrzn');
  PSKey.In = cTID('In  ');
  PSKey.Invert = cTID('Invr');
  PSKey.LayerID = cTID('LyrI');
  PSKey.Location = cTID('Lctn');
  PSKey.MakeVisible = cTID('MkVs');
  PSKey.Method = cTID('Mthd');
  PSKey.Midpoint = cTID('Mdpn');
  PSKey.Mode = cTID('Md  ');
  PSKey.Name = cTID('Nm  ');
  PSKey.New = cTID('Nw  ');
  PSKey.Offset = cTID('Ofst');
  PSKey.Opacity = cTID('Opct');
  PSKey.Radius = cTID('Rds ');
  PSKey.Red = cTID('Rd  ');
  PSKey.Saving = cTID('Svng');
  PSKey.Scale = cTID('Scl ');
  PSKey.Sharpness = cTID('Shrp');
  PSKey.Start = cTID('Strt');
  PSKey.Threshold = cTID('Thsh');
  PSKey.To = cTID('T   ');
  PSKey.Transparency = cTID('Trns');
  PSKey.Type = cTID('Type');
  PSKey.Using = cTID('Usng');
  PSKey.Vertical = cTID('Vrtc');
  PSKey.With = cTID('With');
  PSString.Null = sTID('null');
  PSString.addToSelection = sTID('addToSelection');
  PSString.addToSelectionContinuous = sTID('addToSelectionContinuous');
  PSString.average = sTID('average');
  PSString.channelDenoise = sTID('channelDenoise');
  PSString.channelDenoiseParams = sTID('channelDenoiseParams');
  PSString.contentLayer = sTID('contentLayer');
  PSString.gammaCorrection = sTID('gammaCorrection');
  PSString.largeDocumentFormat = sTID('largeDocumentFormat');
  PSString.layerGroup = sTID('layerSection');
  PSString.layerGroupEnd = sTID('layerSectionEnd');
  PSString.layerGroupStart = sTID('layerSectionStart');
  PSString.linearBurn = sTID('linearBurn');
  PSString.linearLight = sTID('linearLight');
  PSString.maximizeCompatibility = sTID('maximizeCompatibility');
  PSString.pdf13 = sTID('pdf13');
  PSString.preset = sTID('preset');
  PSString.presetKind = sTID('presetKind');
  PSString.presetKindCustom = sTID('presetKindCustom');
  PSString.presetKindDefault = sTID('presetKindDefault');
  PSString.presetKindType = sTID('presetKindType');
  PSString.removeJPEGArtifact = sTID('removeJPEGArtifact');
  PSString.selection = sTID('selection');
  PSString.selectionModifier = sTID('selectionModifier');
  PSString.selectionModifierType = sTID('selectionModifierType');
  PSString.shapeburst = sTID('shapeburst');
  PSString.solidColorLayer = sTID('solidColorLayer');
  PSString.subsample = sTID('subsample');
  PSType.AntiAlias = cTID('Annt');
  PSType.AreaSelector = cTID('ArSl');
  PSType.BlendMode = cTID('BlnM');
  PSType.Calculation = cTID('Clcn');
  PSType.ColorStopType = cTID('Clry');
  PSType.CorrectionMethod = cTID('CrcM');
  PSType.GradientForm = cTID('GrdF');
  PSType.MaskIndicator = cTID('MskI');
  PSType.Ordinal = cTID('Ordn');
  PSType.UserMaskOptions = cTID('UsrM');
  PSType.YesNo = cTID('YsN ');
  PSUnit.Percent = cTID('#Prc');
  PSUnit.Pixels = cTID('#Pxl');
};

SuperVolumeX3.loadSymbols(); // load up our symbols



//=========================================
//                    SuperVolumeX3.main
//=========================================
//

SuperVolumeX3.main = function () {
  SuperVolumeX3();
};

SuperVolumeX3.main();
    },
};

$._ext_C1={
    run : function() {
//
// Generated Thu Aug 20 2015 16:05:45 GMT+0400
//

//
//==================== C1 ==============
//
function C1() {
  // Make
  function step1(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Colorize White W1");
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);
    desc2.putObject(PSKey.Type, PSClass.SelectiveColor, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step2(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindCustom);
    desc2.putEnumerated(PSKey.Method, PSType.CorrectionMethod, PSEnum.Relative);
    var list1 = new ActionList();
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Whites);
    desc3.putUnitDouble(PSKey.Cyan, PSUnit.Percent, -20);
    desc3.putUnitDouble(PSKey.Yellow, PSUnit.Percent, 80);
    desc3.putUnitDouble(PSKey.Black, PSUnit.Percent, 10);
    list1.putObject(PSClass.ColorCorrection, desc3);
    desc2.putList(PSClass.ColorCorrection, list1);
    desc1.putObject(PSKey.To, PSClass.SelectiveColor, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step3(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Colorize All W1");
    var desc3 = new ActionDescriptor();
    var list1 = new ActionList();
    list1.putInteger(0);
    list1.putInteger(sTID("skinTone"), 0);
    list1.putInteger(sTID("contentAware"), 0);
    desc3.putList(PSKey.ShadowLevels, list1);
    var list2 = new ActionList();
    list2.putInteger(0);
    list2.putInteger(sTID("skinTone"), 0);
    list2.putInteger(sTID("contentAware"), 0);
    desc3.putList(PSKey.MidtoneLevels, list2);
    var list3 = new ActionList();
    list3.putInteger(0);
    list3.putInteger(sTID("skinTone"), 0);
    list3.putInteger(sTID("contentAware"), 0);
    desc3.putList(PSKey.HighlightLevels, list3);
    desc3.putBoolean(PSKey.PreserveLuminosity, true);
    desc2.putObject(PSKey.Type, PSClass.ColorBalance, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step4(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    var list1 = new ActionList();
    list1.putInteger(0);
    list1.putInteger(sTID("skinTone"), 0);
    list1.putInteger(sTID("contentAware"), 0);
    desc2.putList(PSKey.ShadowLevels, list1);
    var list2 = new ActionList();
    list2.putInteger(0);
    list2.putInteger(sTID("skinTone"), 0);
    list2.putInteger(sTID("contentAware"), 0);
    desc2.putList(PSKey.MidtoneLevels, list2);
    desc1.putObject(PSKey.To, PSClass.ColorBalance, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step5(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSClass.Color);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step6(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Grading Map W3");
    var desc3 = new ActionDescriptor();
    var desc4 = new ActionDescriptor();
    desc4.putString(PSKey.Name, "Foreground to Background");
    desc4.putEnumerated(PSType.GradientForm, PSType.GradientForm, PSEnum.CustomStops);
    desc4.putDouble(PSKey.Interpolation, 4096);
    var list1 = new ActionList();
    var desc5 = new ActionDescriptor();
    var desc6 = new ActionDescriptor();
    desc6.putDouble(PSKey.Red, 19.9996948242188);
    desc6.putDouble(PSKey.Green, 11.9998168945313);
    desc6.putDouble(PSKey.Blue, 9.00375366210938);
    desc5.putObject(PSClass.Color, PSClass.RGBColor, desc6);
    desc5.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc5.putInteger(PSKey.Location, 0);
    desc5.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc5);
    var desc7 = new ActionDescriptor();
    var desc8 = new ActionDescriptor();
    desc8.putDouble(PSKey.Red, 0);
    desc8.putDouble(PSKey.Green, 0);
    desc8.putDouble(PSKey.Blue, 0);
    desc7.putObject(PSClass.Color, PSClass.RGBColor, desc8);
    desc7.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc7.putInteger(PSKey.Location, 4096);
    desc7.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc7);
    desc4.putList(PSKey.Colors, list1);
    var list2 = new ActionList();
    var desc9 = new ActionDescriptor();
    desc9.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 100);
    desc9.putInteger(PSKey.Location, 0);
    desc9.putInteger(PSKey.Midpoint, 50);
    list2.putObject(PSClass.TransparencyStop, desc9);
    var desc10 = new ActionDescriptor();
    desc10.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 100);
    desc10.putInteger(PSKey.Location, 4096);
    desc10.putInteger(PSKey.Midpoint, 50);
    list2.putObject(PSClass.TransparencyStop, desc10);
    desc4.putList(PSKey.Transparency, list2);
    desc3.putObject(PSKey.Gradient, PSClass.Gradient, desc4);
    desc2.putObject(PSKey.Type, PSClass.GradientMap, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step7(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    var desc3 = new ActionDescriptor();
    desc3.putString(PSKey.Name, "Custom");
    desc3.putEnumerated(PSType.GradientForm, PSType.GradientForm, PSEnum.CustomStops);
    desc3.putDouble(PSKey.Interpolation, 4096);
    var list1 = new ActionList();
    var desc4 = new ActionDescriptor();
    var desc5 = new ActionDescriptor();
    desc5.putDouble(PSKey.Red, 41.0038923472166);
    desc5.putDouble(PSKey.Green, 10.0000003539026);
    desc5.putDouble(PSKey.Blue, 89.0038932859898);
    desc4.putObject(PSClass.Color, PSClass.RGBColor, desc5);
    desc4.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc4.putInteger(PSKey.Location, 0);
    desc4.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc4);
    var desc6 = new ActionDescriptor();
    var desc7 = new ActionDescriptor();
    desc7.putDouble(PSKey.Red, 255);
    desc7.putDouble(PSKey.Green, 124.000000208616);
    desc7.putDouble(PSKey.Blue, 0);
    desc6.putObject(PSClass.Color, PSClass.RGBColor, desc7);
    desc6.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc6.putInteger(PSKey.Location, 4096);
    desc6.putInteger(PSKey.Midpoint, 23);
    list1.putObject(PSClass.ColorStop, desc6);
    desc3.putList(PSKey.Colors, list1);
    var list2 = new ActionList();
    var desc8 = new ActionDescriptor();
    desc8.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 100);
    desc8.putInteger(PSKey.Location, 0);
    desc8.putInteger(PSKey.Midpoint, 50);
    list2.putObject(PSClass.TransparencyStop, desc8);
    var desc9 = new ActionDescriptor();
    desc9.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 100);
    desc9.putInteger(PSKey.Location, 4096);
    desc9.putInteger(PSKey.Midpoint, 50);
    list2.putObject(PSClass.TransparencyStop, desc9);
    desc3.putList(PSKey.Transparency, list2);
    desc2.putObject(PSKey.Gradient, PSClass.Gradient, desc3);
    desc1.putObject(PSKey.To, PSClass.GradientMap, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step8(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSClass.Color);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step9(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 50);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step10(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Grading Map W3");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Select
  function step11(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Colorize White W1");
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelectionContinuous);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step12(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSString.layerGroup);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSKey.From, ref2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step13(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "C1");
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  step1();      // Make
  step2();      // Set
  step3();      // Make
  step4();      // Set
  step5();      // Set
  step6();      // Make
  step7();      // Set
  step8();      // Set
  step9();      // Set
  step10();      // Select
  step11();      // Select
  step12();      // Make
  step13();      // Set
};



cTID = function(s) { return app.charIDToTypeID(s); };
sTID = function(s) { return app.stringIDToTypeID(s); };

//
// C1.loadSymbols
//   Loading up the symbol definitions like this makes it possible
//   to include several of these generated files in one master file
//   provided a prefix is specified other than the default. It also
//   skips the definitions if PSConstants has already been loaded.
//
C1.loadSymbols = function() {
  var dbgLevel = $.level;
  $.level = 0;
  try {
    PSConstants;
    return; // only if PSConstants is defined
  } catch (e) {
  } finally {
    $.level = dbgLevel;
  }
  var needDefs = true;
  $.level = 0;
  try {
    PSClass;
    needDefs = false;
  } catch (e) {
  } finally {
    $.level = dbgLevel;
  }
  if (needDefs) {
    PSClass = function() {};
    PSEnum = function() {};
    PSEvent = function() {};
    PSForm = function() {};
    PSKey = function() {};
    PSType = function() {};
    PSUnit = function() {};
    PSString = function() {};
  }

  // We may still end up duplicating some of the following definitions
  // but at least we don't redefine PSClass, etc... and wipe out others
  PSClass.AdjustmentLayer = cTID('AdjL');
  PSClass.Color = cTID('Clr ');
  PSClass.ColorBalance = cTID('ClrB');
  PSClass.ColorCorrection = cTID('ClrC');
  PSClass.ColorStop = cTID('Clrt');
  PSClass.Gradient = cTID('Grdn');
  PSClass.GradientMap = cTID('GdMp');
  PSClass.Layer = cTID('Lyr ');
  PSClass.RGBColor = cTID('RGBC');
  PSClass.SelectiveColor = cTID('SlcC');
  PSClass.TransparencyStop = cTID('TrnS');
  PSEnum.CustomStops = cTID('CstS');
  PSEnum.Relative = cTID('Rltv');
  PSEnum.SoftLight = cTID('SftL');
  PSEnum.Target = cTID('Trgt');
  PSEnum.UserStop = cTID('UsrS');
  PSEnum.Whites = cTID('Whts');
  PSEvent.Make = cTID('Mk  ');
  PSEvent.Select = cTID('slct');
  PSEvent.Set = cTID('setd');
  PSKey.Black = cTID('Blck');
  PSKey.Blue = cTID('Bl  ');
  PSKey.Colors = cTID('Clrs');
  PSKey.Cyan = cTID('Cyn ');
  PSKey.From = cTID('From');
  PSKey.Gradient = cTID('Grad');
  PSKey.Green = cTID('Grn ');
  PSKey.HighlightLevels = cTID('HghL');
  PSKey.Interpolation = cTID('Intr');
  PSKey.Location = cTID('Lctn');
  PSKey.MakeVisible = cTID('MkVs');
  PSKey.Method = cTID('Mthd');
  PSKey.Midpoint = cTID('Mdpn');
  PSKey.MidtoneLevels = cTID('MdtL');
  PSKey.Mode = cTID('Md  ');
  PSKey.Name = cTID('Nm  ');
  PSKey.Opacity = cTID('Opct');
  PSKey.PreserveLuminosity = cTID('PrsL');
  PSKey.Red = cTID('Rd  ');
  PSKey.ShadowLevels = cTID('ShdL');
  PSKey.To = cTID('T   ');
  PSKey.Transparency = cTID('Trns');
  PSKey.Type = cTID('Type');
  PSKey.Using = cTID('Usng');
  PSKey.Yellow = cTID('Ylw ');
  PSString.Null = sTID('null');
  PSString.addToSelectionContinuous = sTID('addToSelectionContinuous');
  PSString.contentLayer = sTID('contentLayer');
  PSString.layerGroup = sTID('layerSection');
  PSString.presetKind = sTID('presetKind');
  PSString.presetKindCustom = sTID('presetKindCustom');
  PSString.presetKindDefault = sTID('presetKindDefault');
  PSString.presetKindType = sTID('presetKindType');
  PSString.selectionModifier = sTID('selectionModifier');
  PSString.selectionModifierType = sTID('selectionModifierType');
  PSString.solidColorLayer = sTID('solidColorLayer');
  PSType.BlendMode = cTID('BlnM');
  PSType.ColorStopType = cTID('Clry');
  PSType.CorrectionMethod = cTID('CrcM');
  PSType.GradientForm = cTID('GrdF');
  PSType.Ordinal = cTID('Ordn');
  PSUnit.Percent = cTID('#Prc');
};

C1.loadSymbols(); // load up our symbols



//=========================================
//                    C1.main
//=========================================
//

C1.main = function () {
  C1();
};

C1.main();

// EOF

    },
};

$._ext_C2={
    run : function() {
//
// Generated Thu Aug 20 2015 16:05:45 GMT+0400
//

//
//==================== C2  ==============
//
function C2() {
  // Make
  function step1(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Colorize White W2");
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);
    desc2.putObject(PSKey.Type, PSClass.SelectiveColor, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step2(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    var list1 = new ActionList();
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Whites);
    desc3.putUnitDouble(PSKey.Yellow, PSUnit.Percent, 50);
    list1.putObject(PSClass.ColorCorrection, desc3);
    desc2.putList(PSClass.ColorCorrection, list1);
    desc1.putObject(PSKey.To, PSClass.SelectiveColor, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step3(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Colorize All W2");
    var desc3 = new ActionDescriptor();
    var list1 = new ActionList();
    list1.putInteger(0);
    list1.putInteger(sTID("skinTone"), 0);
    list1.putInteger(sTID("contentAware"), 0);
    desc3.putList(PSKey.ShadowLevels, list1);
    var list2 = new ActionList();
    list2.putInteger(0);
    list2.putInteger(sTID("skinTone"), 0);
    list2.putInteger(sTID("contentAware"), 0);
    desc3.putList(PSKey.MidtoneLevels, list2);
    var list3 = new ActionList();
    list3.putInteger(0);
    list3.putInteger(sTID("skinTone"), 0);
    list3.putInteger(sTID("contentAware"), 0);
    desc3.putList(PSKey.HighlightLevels, list3);
    desc3.putBoolean(PSKey.PreserveLuminosity, true);
    desc2.putObject(PSKey.Type, PSClass.ColorBalance, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step4(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    var list1 = new ActionList();
    list1.putInteger(5);
    list1.putInteger(sTID("skinTone"), 0);
    list1.putInteger(sTID("contentAware"), 5);
    desc2.putList(PSKey.ShadowLevels, list1);
    var list2 = new ActionList();
    list2.putInteger(5);
    list2.putInteger(sTID("skinTone"), 0);
    list2.putInteger(sTID("contentAware"), -10);
    desc2.putList(PSKey.MidtoneLevels, list2);
    var list3 = new ActionList();
    list3.putInteger(5);
    list3.putInteger(sTID("skinTone"), 0);
    list3.putInteger(sTID("contentAware"), -10);
    desc2.putList(PSKey.HighlightLevels, list3);
    desc1.putObject(PSKey.To, PSClass.ColorBalance, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step5(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSClass.Color);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step6(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Grading Map W2");
    var desc3 = new ActionDescriptor();
    var desc4 = new ActionDescriptor();
    desc4.putString(PSKey.Name, "Foreground to Background");
    desc4.putEnumerated(PSType.GradientForm, PSType.GradientForm, PSEnum.CustomStops);
    desc4.putDouble(PSKey.Interpolation, 4096);
    var list1 = new ActionList();
    var desc5 = new ActionDescriptor();
    var desc6 = new ActionDescriptor();
    desc6.putDouble(PSKey.Red, 19.9996948242188);
    desc6.putDouble(PSKey.Green, 11.9998168945313);
    desc6.putDouble(PSKey.Blue, 9.00375366210938);
    desc5.putObject(PSClass.Color, PSClass.RGBColor, desc6);
    desc5.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc5.putInteger(PSKey.Location, 0);
    desc5.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc5);
    var desc7 = new ActionDescriptor();
    var desc8 = new ActionDescriptor();
    desc8.putDouble(PSKey.Red, 0);
    desc8.putDouble(PSKey.Green, 0);
    desc8.putDouble(PSKey.Blue, 0);
    desc7.putObject(PSClass.Color, PSClass.RGBColor, desc8);
    desc7.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc7.putInteger(PSKey.Location, 4096);
    desc7.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc7);
    desc4.putList(PSKey.Colors, list1);
    var list2 = new ActionList();
    var desc9 = new ActionDescriptor();
    desc9.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 100);
    desc9.putInteger(PSKey.Location, 0);
    desc9.putInteger(PSKey.Midpoint, 50);
    list2.putObject(PSClass.TransparencyStop, desc9);
    var desc10 = new ActionDescriptor();
    desc10.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 100);
    desc10.putInteger(PSKey.Location, 4096);
    desc10.putInteger(PSKey.Midpoint, 50);
    list2.putObject(PSClass.TransparencyStop, desc10);
    desc4.putList(PSKey.Transparency, list2);
    desc3.putObject(PSKey.Gradient, PSClass.Gradient, desc4);
    desc2.putObject(PSKey.Type, PSClass.GradientMap, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step7(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    var desc3 = new ActionDescriptor();
    desc3.putString(PSKey.Name, "$$$/Presets/Gradients/ColorHarmonies1_grd/OrangeBlue=Orange, Blue");
    desc3.putEnumerated(PSType.GradientForm, PSType.GradientForm, PSEnum.CustomStops);
    desc3.putDouble(PSKey.Interpolation, 4096);
    var list1 = new ActionList();
    var desc4 = new ActionDescriptor();
    var desc5 = new ActionDescriptor();
    desc5.putDouble(PSKey.Red, 253.000000119209);
    desc5.putDouble(PSKey.Green, 124.000000208616);
    desc5.putDouble(PSKey.Blue, 0);
    desc4.putObject(PSClass.Color, PSClass.RGBColor, desc5);
    desc4.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc4.putInteger(PSKey.Location, 0);
    desc4.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc4);
    var desc6 = new ActionDescriptor();
    var desc7 = new ActionDescriptor();
    desc7.putDouble(PSKey.Red, 0);
    desc7.putDouble(PSKey.Green, 40.0000014156103);
    desc7.putDouble(PSKey.Blue, 116.000000685453);
    desc6.putObject(PSClass.Color, PSClass.RGBColor, desc7);
    desc6.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc6.putInteger(PSKey.Location, 4096);
    desc6.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc6);
    desc3.putList(PSKey.Colors, list1);
    var list2 = new ActionList();
    var desc8 = new ActionDescriptor();
    desc8.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 100);
    desc8.putInteger(PSKey.Location, 0);
    desc8.putInteger(PSKey.Midpoint, 50);
    list2.putObject(PSClass.TransparencyStop, desc8);
    var desc9 = new ActionDescriptor();
    desc9.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 100);
    desc9.putInteger(PSKey.Location, 4096);
    desc9.putInteger(PSKey.Midpoint, 50);
    list2.putObject(PSClass.TransparencyStop, desc9);
    desc3.putList(PSKey.Transparency, list2);
    desc2.putObject(PSKey.Gradient, PSClass.Gradient, desc3);
    desc1.putObject(PSKey.To, PSClass.GradientMap, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step8(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putBoolean(PSKey.Reverse, true);
    desc1.putObject(PSKey.To, PSClass.GradientMap, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step9(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Colorize All W2");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Select
  function step10(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Select
  function step11(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Grading Map W2");
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Set
  function step12(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    var desc3 = new ActionDescriptor();
    desc3.putString(PSKey.Name, "Custom");
    desc3.putEnumerated(PSType.GradientForm, PSType.GradientForm, PSEnum.CustomStops);
    desc3.putDouble(PSKey.Interpolation, 4096);
    var list1 = new ActionList();
    var desc4 = new ActionDescriptor();
    var desc5 = new ActionDescriptor();
    desc5.putDouble(PSKey.Red, 253.000000119209);
    desc5.putDouble(PSKey.Green, 124.000000208616);
    desc5.putDouble(PSKey.Blue, 0);
    desc4.putObject(PSClass.Color, PSClass.RGBColor, desc5);
    desc4.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc4.putInteger(PSKey.Location, 0);
    desc4.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc4);
    var desc6 = new ActionDescriptor();
    var desc7 = new ActionDescriptor();
    desc7.putDouble(PSKey.Red, 0);
    desc7.putDouble(PSKey.Green, 40.0000014156103);
    desc7.putDouble(PSKey.Blue, 116.000000685453);
    desc6.putObject(PSClass.Color, PSClass.RGBColor, desc7);
    desc6.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc6.putInteger(PSKey.Location, 4096);
    desc6.putInteger(PSKey.Midpoint, 67);
    list1.putObject(PSClass.ColorStop, desc6);
    desc3.putList(PSKey.Colors, list1);
    var list2 = new ActionList();
    var desc8 = new ActionDescriptor();
    desc8.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 100);
    desc8.putInteger(PSKey.Location, 0);
    desc8.putInteger(PSKey.Midpoint, 50);
    list2.putObject(PSClass.TransparencyStop, desc8);
    var desc9 = new ActionDescriptor();
    desc9.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 100);
    desc9.putInteger(PSKey.Location, 4096);
    desc9.putInteger(PSKey.Midpoint, 50);
    list2.putObject(PSClass.TransparencyStop, desc9);
    desc3.putList(PSKey.Transparency, list2);
    desc2.putObject(PSKey.Gradient, PSClass.Gradient, desc3);
    desc1.putObject(PSKey.To, PSClass.GradientMap, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Move
  function step13(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Previous);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Move
  function step14(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Previous);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Set
  function step15(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 75);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step16(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSClass.Color);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step17(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Colorize All W2");
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelectionContinuous);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step18(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSString.layerGroup);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSKey.From, ref2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step19(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "C2");
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  step1();      // Make
  step2();      // Set
  step3();      // Make
  step4();      // Set
  step5();      // Set
  step6();      // Make
  step7();      // Set
  step8();      // Set
  step9();      // Select
  step10();      // Select
  step11();      // Select
  step12();      // Set
  step13();      // Move
  step14();      // Move
  step15();      // Set
  step16();      // Set
  step17();      // Select
  step18();      // Make
  step19();      // Set
};



cTID = function(s) { return app.charIDToTypeID(s); };
sTID = function(s) { return app.stringIDToTypeID(s); };

//
// C2.loadSymbols
//   Loading up the symbol definitions like this makes it possible
//   to include several of these generated files in one master file
//   provided a prefix is specified other than the default. It also
//   skips the definitions if PSConstants has already been loaded.
//
C2.loadSymbols = function() {
  var dbgLevel = $.level;
  $.level = 0;
  try {
    PSConstants;
    return; // only if PSConstants is defined
  } catch (e) {
  } finally {
    $.level = dbgLevel;
  }
  var needDefs = true;
  $.level = 0;
  try {
    PSClass;
    needDefs = false;
  } catch (e) {
  } finally {
    $.level = dbgLevel;
  }
  if (needDefs) {
    PSClass = function() {};
    PSEnum = function() {};
    PSEvent = function() {};
    PSForm = function() {};
    PSKey = function() {};
    PSType = function() {};
    PSUnit = function() {};
    PSString = function() {};
  }

  // We may still end up duplicating some of the following definitions
  // but at least we don't redefine PSClass, etc... and wipe out others
  PSClass.AdjustmentLayer = cTID('AdjL');
  PSClass.Channel = cTID('Chnl');
  PSClass.Color = cTID('Clr ');
  PSClass.ColorBalance = cTID('ClrB');
  PSClass.ColorCorrection = cTID('ClrC');
  PSClass.ColorStop = cTID('Clrt');
  PSClass.Gradient = cTID('Grdn');
  PSClass.GradientMap = cTID('GdMp');
  PSClass.Layer = cTID('Lyr ');
  PSClass.RGBColor = cTID('RGBC');
  PSClass.SelectiveColor = cTID('SlcC');
  PSClass.TransparencyStop = cTID('TrnS');
  PSEnum.CustomStops = cTID('CstS');
  PSEnum.Previous = cTID('Prvs');
  PSEnum.RGB = cTID('RGB ');
  PSEnum.Relative = cTID('Rltv');
  PSEnum.SoftLight = cTID('SftL');
  PSEnum.Target = cTID('Trgt');
  PSEnum.UserStop = cTID('UsrS');
  PSEnum.Whites = cTID('Whts');
  PSEvent.Make = cTID('Mk  ');
  PSEvent.Move = cTID('move');
  PSEvent.Select = cTID('slct');
  PSEvent.Set = cTID('setd');
  PSKey.Black = cTID('Blck');
  PSKey.Blue = cTID('Bl  ');
  PSKey.Colors = cTID('Clrs');
  PSKey.Cyan = cTID('Cyn ');
  PSKey.From = cTID('From');
  PSKey.Gradient = cTID('Grad');
  PSKey.Green = cTID('Grn ');
  PSKey.HighlightLevels = cTID('HghL');
  PSKey.Interpolation = cTID('Intr');
  PSKey.Location = cTID('Lctn');
  PSKey.MakeVisible = cTID('MkVs');
  PSKey.Method = cTID('Mthd');
  PSKey.Midpoint = cTID('Mdpn');
  PSKey.MidtoneLevels = cTID('MdtL');
  PSKey.Mode = cTID('Md  ');
  PSKey.Name = cTID('Nm  ');
  PSKey.Opacity = cTID('Opct');
  PSKey.PreserveLuminosity = cTID('PrsL');
  PSKey.Red = cTID('Rd  ');
  PSKey.Reverse = cTID('Rvrs');
  PSKey.ShadowLevels = cTID('ShdL');
  PSKey.To = cTID('T   ');
  PSKey.Transparency = cTID('Trns');
  PSKey.Type = cTID('Type');
  PSKey.Using = cTID('Usng');
  PSKey.Yellow = cTID('Ylw ');
  PSString.Null = sTID('null');
  PSString.addToSelectionContinuous = sTID('addToSelectionContinuous');
  PSString.contentLayer = sTID('contentLayer');
  PSString.layerGroup = sTID('layerSection');
  PSString.presetKind = sTID('presetKind');
  PSString.presetKindCustom = sTID('presetKindCustom');
  PSString.presetKindDefault = sTID('presetKindDefault');
  PSString.presetKindType = sTID('presetKindType');
  PSString.selectionModifier = sTID('selectionModifier');
  PSString.selectionModifierType = sTID('selectionModifierType');
  PSString.solidColorLayer = sTID('solidColorLayer');
  PSType.BlendMode = cTID('BlnM');
  PSType.ColorStopType = cTID('Clry');
  PSType.CorrectionMethod = cTID('CrcM');
  PSType.GradientForm = cTID('GrdF');
  PSType.Ordinal = cTID('Ordn');
  PSUnit.Percent = cTID('#Prc');
};

C2.loadSymbols(); // load up our symbols



//=========================================
//                    C2.main
//=========================================
//

C2.main = function () {
  C2();
};

C2.main();

// EOF

    },
};

$._ext_C3={
    run : function() {
//
// Generated Thu Aug 20 2015 16:05:45 GMT+0400
//

//
//==================== C3 ==============
//
function C3() {
  // Make
  function step1(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Colorize White W3");
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);
    desc2.putObject(PSKey.Type, PSClass.SelectiveColor, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step2(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    var list1 = new ActionList();
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Whites);
    desc3.putUnitDouble(PSKey.Yellow, PSUnit.Percent, 50);
    list1.putObject(PSClass.ColorCorrection, desc3);
    desc2.putList(PSClass.ColorCorrection, list1);
    desc1.putObject(PSKey.To, PSClass.SelectiveColor, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step3(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Colorize All W3");
    var desc3 = new ActionDescriptor();
    var list1 = new ActionList();
    list1.putInteger(0);
    list1.putInteger(sTID("skinTone"), 0);
    list1.putInteger(sTID("contentAware"), 0);
    desc3.putList(PSKey.ShadowLevels, list1);
    var list2 = new ActionList();
    list2.putInteger(0);
    list2.putInteger(sTID("skinTone"), 0);
    list2.putInteger(sTID("contentAware"), 0);
    desc3.putList(PSKey.MidtoneLevels, list2);
    var list3 = new ActionList();
    list3.putInteger(0);
    list3.putInteger(sTID("skinTone"), 0);
    list3.putInteger(sTID("contentAware"), 0);
    desc3.putList(PSKey.HighlightLevels, list3);
    desc3.putBoolean(PSKey.PreserveLuminosity, true);
    desc2.putObject(PSKey.Type, PSClass.ColorBalance, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step4(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    var list1 = new ActionList();
    list1.putInteger(5);
    list1.putInteger(sTID("skinTone"), 0);
    list1.putInteger(sTID("contentAware"), 5);
    desc2.putList(PSKey.ShadowLevels, list1);
    var list2 = new ActionList();
    list2.putInteger(5);
    list2.putInteger(sTID("skinTone"), 0);
    list2.putInteger(sTID("contentAware"), -10);
    desc2.putList(PSKey.MidtoneLevels, list2);
    var list3 = new ActionList();
    list3.putInteger(5);
    list3.putInteger(sTID("skinTone"), 0);
    list3.putInteger(sTID("contentAware"), -10);
    desc2.putList(PSKey.HighlightLevels, list3);
    desc1.putObject(PSKey.To, PSClass.ColorBalance, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step5(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSClass.Color);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step6(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Grading Map W3");
    var desc3 = new ActionDescriptor();
    var desc4 = new ActionDescriptor();
    desc4.putString(PSKey.Name, "Foreground to Background");
    desc4.putEnumerated(PSType.GradientForm, PSType.GradientForm, PSEnum.CustomStops);
    desc4.putDouble(PSKey.Interpolation, 4096);
    var list1 = new ActionList();
    var desc5 = new ActionDescriptor();
    var desc6 = new ActionDescriptor();
    desc6.putDouble(PSKey.Red, 19.9996948242188);
    desc6.putDouble(PSKey.Green, 11.9998168945313);
    desc6.putDouble(PSKey.Blue, 9.00375366210938);
    desc5.putObject(PSClass.Color, PSClass.RGBColor, desc6);
    desc5.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc5.putInteger(PSKey.Location, 0);
    desc5.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc5);
    var desc7 = new ActionDescriptor();
    var desc8 = new ActionDescriptor();
    desc8.putDouble(PSKey.Red, 0);
    desc8.putDouble(PSKey.Green, 0);
    desc8.putDouble(PSKey.Blue, 0);
    desc7.putObject(PSClass.Color, PSClass.RGBColor, desc8);
    desc7.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc7.putInteger(PSKey.Location, 4096);
    desc7.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc7);
    desc4.putList(PSKey.Colors, list1);
    var list2 = new ActionList();
    var desc9 = new ActionDescriptor();
    desc9.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 100);
    desc9.putInteger(PSKey.Location, 0);
    desc9.putInteger(PSKey.Midpoint, 50);
    list2.putObject(PSClass.TransparencyStop, desc9);
    var desc10 = new ActionDescriptor();
    desc10.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 100);
    desc10.putInteger(PSKey.Location, 4096);
    desc10.putInteger(PSKey.Midpoint, 50);
    list2.putObject(PSClass.TransparencyStop, desc10);
    desc4.putList(PSKey.Transparency, list2);
    desc3.putObject(PSKey.Gradient, PSClass.Gradient, desc4);
    desc2.putObject(PSKey.Type, PSClass.GradientMap, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step7(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    var desc3 = new ActionDescriptor();
    desc3.putString(PSKey.Name, "$$$/Presets/Gradients/ColorHarmonies1_grd/YellowViolet=Yellow, Violet");
    desc3.putEnumerated(PSType.GradientForm, PSType.GradientForm, PSEnum.CustomStops);
    desc3.putDouble(PSKey.Interpolation, 4096);
    var list1 = new ActionList();
    var desc4 = new ActionDescriptor();
    var desc5 = new ActionDescriptor();
    desc5.putDouble(PSKey.Red, 249.000000357628);
    desc5.putDouble(PSKey.Green, 229.996110498905);
    desc5.putDouble(PSKey.Blue, 0);
    desc4.putObject(PSClass.Color, PSClass.RGBColor, desc5);
    desc4.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc4.putInteger(PSKey.Location, 0);
    desc4.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc4);
    var desc6 = new ActionDescriptor();
    var desc7 = new ActionDescriptor();
    desc7.putDouble(PSKey.Red, 111.003891974688);
    desc7.putDouble(PSKey.Green, 21.0038916394114);
    desc7.putDouble(PSKey.Blue, 108.000001162291);
    desc6.putObject(PSClass.Color, PSClass.RGBColor, desc7);
    desc6.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc6.putInteger(PSKey.Location, 4096);
    desc6.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc6);
    desc3.putList(PSKey.Colors, list1);
    var list2 = new ActionList();
    var desc8 = new ActionDescriptor();
    desc8.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 100);
    desc8.putInteger(PSKey.Location, 0);
    desc8.putInteger(PSKey.Midpoint, 50);
    list2.putObject(PSClass.TransparencyStop, desc8);
    var desc9 = new ActionDescriptor();
    desc9.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 100);
    desc9.putInteger(PSKey.Location, 4096);
    desc9.putInteger(PSKey.Midpoint, 50);
    list2.putObject(PSClass.TransparencyStop, desc9);
    desc3.putList(PSKey.Transparency, list2);
    desc2.putObject(PSKey.Gradient, PSClass.Gradient, desc3);
    desc1.putObject(PSKey.To, PSClass.GradientMap, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step8(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putBoolean(PSKey.Reverse, true);
    desc1.putObject(PSKey.To, PSClass.GradientMap, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Move
  function step9(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Previous);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Move
  function step10(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Previous);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Set
  function step11(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 50);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step12(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSClass.Color);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step13(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Colorize All W3");
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelectionContinuous);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step14(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSString.layerGroup);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSKey.From, ref2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step15(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "C3");
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  step1();      // Make
  step2();      // Set
  step3();      // Make
  step4();      // Set
  step5();      // Set
  step6();      // Make
  step7();      // Set
  step8();      // Set
  step9();      // Move
  step10();      // Move
  step11();      // Set
  step12();      // Set
  step13();      // Select
  step14();      // Make
  step15();      // Set
};



cTID = function(s) { return app.charIDToTypeID(s); };
sTID = function(s) { return app.stringIDToTypeID(s); };

//
// C3.loadSymbols
//   Loading up the symbol definitions like this makes it possible
//   to include several of these generated files in one master file
//   provided a prefix is specified other than the default. It also
//   skips the definitions if PSConstants has already been loaded.
//
C3.loadSymbols = function() {
  var dbgLevel = $.level;
  $.level = 0;
  try {
    PSConstants;
    return; // only if PSConstants is defined
  } catch (e) {
  } finally {
    $.level = dbgLevel;
  }
  var needDefs = true;
  $.level = 0;
  try {
    PSClass;
    needDefs = false;
  } catch (e) {
  } finally {
    $.level = dbgLevel;
  }
  if (needDefs) {
    PSClass = function() {};
    PSEnum = function() {};
    PSEvent = function() {};
    PSForm = function() {};
    PSKey = function() {};
    PSType = function() {};
    PSUnit = function() {};
    PSString = function() {};
  }

  // We may still end up duplicating some of the following definitions
  // but at least we don't redefine PSClass, etc... and wipe out others
  PSClass.AdjustmentLayer = cTID('AdjL');
  PSClass.Channel = cTID('Chnl');
  PSClass.Color = cTID('Clr ');
  PSClass.ColorBalance = cTID('ClrB');
  PSClass.ColorCorrection = cTID('ClrC');
  PSClass.ColorStop = cTID('Clrt');
  PSClass.Gradient = cTID('Grdn');
  PSClass.GradientMap = cTID('GdMp');
  PSClass.Layer = cTID('Lyr ');
  PSClass.RGBColor = cTID('RGBC');
  PSClass.SelectiveColor = cTID('SlcC');
  PSClass.TransparencyStop = cTID('TrnS');
  PSEnum.CustomStops = cTID('CstS');
  PSEnum.Previous = cTID('Prvs');
  PSEnum.RGB = cTID('RGB ');
  PSEnum.Relative = cTID('Rltv');
  PSEnum.SoftLight = cTID('SftL');
  PSEnum.Target = cTID('Trgt');
  PSEnum.UserStop = cTID('UsrS');
  PSEnum.Whites = cTID('Whts');
  PSEvent.Make = cTID('Mk  ');
  PSEvent.Move = cTID('move');
  PSEvent.Select = cTID('slct');
  PSEvent.Set = cTID('setd');
  PSKey.Black = cTID('Blck');
  PSKey.Blue = cTID('Bl  ');
  PSKey.Colors = cTID('Clrs');
  PSKey.Cyan = cTID('Cyn ');
  PSKey.From = cTID('From');
  PSKey.Gradient = cTID('Grad');
  PSKey.Green = cTID('Grn ');
  PSKey.HighlightLevels = cTID('HghL');
  PSKey.Interpolation = cTID('Intr');
  PSKey.Location = cTID('Lctn');
  PSKey.MakeVisible = cTID('MkVs');
  PSKey.Method = cTID('Mthd');
  PSKey.Midpoint = cTID('Mdpn');
  PSKey.MidtoneLevels = cTID('MdtL');
  PSKey.Mode = cTID('Md  ');
  PSKey.Name = cTID('Nm  ');
  PSKey.Opacity = cTID('Opct');
  PSKey.PreserveLuminosity = cTID('PrsL');
  PSKey.Red = cTID('Rd  ');
  PSKey.Reverse = cTID('Rvrs');
  PSKey.ShadowLevels = cTID('ShdL');
  PSKey.To = cTID('T   ');
  PSKey.Transparency = cTID('Trns');
  PSKey.Type = cTID('Type');
  PSKey.Using = cTID('Usng');
  PSKey.Yellow = cTID('Ylw ');
  PSString.Null = sTID('null');
  PSString.addToSelectionContinuous = sTID('addToSelectionContinuous');
  PSString.contentLayer = sTID('contentLayer');
  PSString.layerGroup = sTID('layerSection');
  PSString.presetKind = sTID('presetKind');
  PSString.presetKindCustom = sTID('presetKindCustom');
  PSString.presetKindDefault = sTID('presetKindDefault');
  PSString.presetKindType = sTID('presetKindType');
  PSString.selectionModifier = sTID('selectionModifier');
  PSString.selectionModifierType = sTID('selectionModifierType');
  PSString.solidColorLayer = sTID('solidColorLayer');
  PSType.BlendMode = cTID('BlnM');
  PSType.ColorStopType = cTID('Clry');
  PSType.CorrectionMethod = cTID('CrcM');
  PSType.GradientForm = cTID('GrdF');
  PSType.Ordinal = cTID('Ordn');
  PSUnit.Percent = cTID('#Prc');
};

C3.loadSymbols(); // load up our symbols



//=========================================
//                    C3.main
//=========================================
//

C3.main = function () {
  C3();
};

C3.main();

// EOF

    },
};

$._ext_G1={
    run : function() {
//
// Generated Thu Aug 20 2015 16:05:45 GMT+0400
//

//
//==================== G1  ==============
//
function G1() {
  // Make
  function step1(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Colorize White G1");
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);
    desc2.putObject(PSKey.Type, PSClass.SelectiveColor, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step2(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindCustom);
    desc2.putEnumerated(PSKey.Method, PSType.CorrectionMethod, PSEnum.Relative);
    var list1 = new ActionList();
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Whites);
    desc3.putUnitDouble(PSKey.Cyan, PSUnit.Percent, -20);
    desc3.putUnitDouble(PSKey.Yellow, PSUnit.Percent, 80);
    desc3.putUnitDouble(PSKey.Black, PSUnit.Percent, 10);
    list1.putObject(PSClass.ColorCorrection, desc3);
    desc2.putList(PSClass.ColorCorrection, list1);
    desc1.putObject(PSKey.To, PSClass.SelectiveColor, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step3(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Colorize All G1");
    var desc3 = new ActionDescriptor();
    var list1 = new ActionList();
    list1.putInteger(0);
    list1.putInteger(sTID("skinTone"), 0);
    list1.putInteger(sTID("contentAware"), 0);
    desc3.putList(PSKey.ShadowLevels, list1);
    var list2 = new ActionList();
    list2.putInteger(0);
    list2.putInteger(sTID("skinTone"), 0);
    list2.putInteger(sTID("contentAware"), 0);
    desc3.putList(PSKey.MidtoneLevels, list2);
    var list3 = new ActionList();
    list3.putInteger(0);
    list3.putInteger(sTID("skinTone"), 0);
    list3.putInteger(sTID("contentAware"), 0);
    desc3.putList(PSKey.HighlightLevels, list3);
    desc3.putBoolean(PSKey.PreserveLuminosity, true);
    desc2.putObject(PSKey.Type, PSClass.ColorBalance, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step4(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    var list1 = new ActionList();
    list1.putInteger(0);
    list1.putInteger(sTID("skinTone"), 0);
    list1.putInteger(sTID("contentAware"), 5);
    desc2.putList(PSKey.ShadowLevels, list1);
    var list2 = new ActionList();
    list2.putInteger(15);
    list2.putInteger(sTID("skinTone"), 0);
    list2.putInteger(sTID("contentAware"), 8);
    desc2.putList(PSKey.MidtoneLevels, list2);
    var list3 = new ActionList();
    list3.putInteger(10);
    list3.putInteger(sTID("skinTone"), 0);
    list3.putInteger(sTID("contentAware"), -20);
    desc2.putList(PSKey.HighlightLevels, list3);
    desc1.putObject(PSKey.To, PSClass.ColorBalance, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step5(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    var list1 = new ActionList();
    list1.putInteger(15);
    list1.putInteger(sTID("skinTone"), 0);
    list1.putInteger(sTID("contentAware"), -10);
    desc2.putList(PSKey.MidtoneLevels, list1);
    desc1.putObject(PSKey.To, PSClass.ColorBalance, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step6(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSClass.Color);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step7(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSString.contentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Soft Light Grading G1");
    var desc3 = new ActionDescriptor();
    var desc4 = new ActionDescriptor();
    desc4.putDouble(PSKey.Red, 229.501939415932);
    desc4.putDouble(PSKey.Green, 143.447470664978);
    desc4.putDouble(PSKey.Blue, 22.949415743351);
    desc3.putObject(PSClass.Color, PSClass.RGBColor, desc4);
    desc2.putObject(PSKey.Type, PSString.solidColorLayer, desc3);
    desc1.putObject(PSKey.Using, PSString.contentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step8(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 20);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step9(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSEnum.SoftLight);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step10(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Colorize White G1");
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelectionContinuous);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step11(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSString.layerGroup);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSKey.From, ref2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step12(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "G1");
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  step1();      // Make
  step2();      // Set
  step3();      // Make
  step4();      // Set
  step5();      // Set
  step6();      // Set
  step7();      // Make
  step8();      // Set
  step9();      // Set
  step10();      // Select
  step11();      // Make
  step12();      // Set
};



cTID = function(s) { return app.charIDToTypeID(s); };
sTID = function(s) { return app.stringIDToTypeID(s); };

//
// G1.loadSymbols
//   Loading up the symbol definitions like this makes it possible
//   to include several of these generated files in one master file
//   provided a prefix is specified other than the default. It also
//   skips the definitions if PSConstants has already been loaded.
//
G1.loadSymbols = function() {
  var dbgLevel = $.level;
  $.level = 0;
  try {
    PSConstants;
    return; // only if PSConstants is defined
  } catch (e) {
  } finally {
    $.level = dbgLevel;
  }
  var needDefs = true;
  $.level = 0;
  try {
    PSClass;
    needDefs = false;
  } catch (e) {
  } finally {
    $.level = dbgLevel;
  }
  if (needDefs) {
    PSClass = function() {};
    PSEnum = function() {};
    PSEvent = function() {};
    PSForm = function() {};
    PSKey = function() {};
    PSType = function() {};
    PSUnit = function() {};
    PSString = function() {};
  }

  // We may still end up duplicating some of the following definitions
  // but at least we don't redefine PSClass, etc... and wipe out others
  PSClass.AdjustmentLayer = cTID('AdjL');
  PSClass.Color = cTID('Clr ');
  PSClass.ColorBalance = cTID('ClrB');
  PSClass.ColorCorrection = cTID('ClrC');
  PSClass.Layer = cTID('Lyr ');
  PSClass.RGBColor = cTID('RGBC');
  PSClass.SelectiveColor = cTID('SlcC');
  PSEnum.Relative = cTID('Rltv');
  PSEnum.SoftLight = cTID('SftL');
  PSEnum.Target = cTID('Trgt');
  PSEnum.Whites = cTID('Whts');
  PSEvent.Make = cTID('Mk  ');
  PSEvent.Select = cTID('slct');
  PSEvent.Set = cTID('setd');
  PSKey.Black = cTID('Blck');
  PSKey.Blue = cTID('Bl  ');
  PSKey.Colors = cTID('Clrs');
  PSKey.Cyan = cTID('Cyn ');
  PSKey.From = cTID('From');
  PSKey.Green = cTID('Grn ');
  PSKey.HighlightLevels = cTID('HghL');
  PSKey.MakeVisible = cTID('MkVs');
  PSKey.Method = cTID('Mthd');
  PSKey.MidtoneLevels = cTID('MdtL');
  PSKey.Mode = cTID('Md  ');
  PSKey.Name = cTID('Nm  ');
  PSKey.Opacity = cTID('Opct');
  PSKey.PreserveLuminosity = cTID('PrsL');
  PSKey.Red = cTID('Rd  ');
  PSKey.ShadowLevels = cTID('ShdL');
  PSKey.To = cTID('T   ');
  PSKey.Type = cTID('Type');
  PSKey.Using = cTID('Usng');
  PSKey.Yellow = cTID('Ylw ');
  PSString.Null = sTID('null');
  PSString.addToSelectionContinuous = sTID('addToSelectionContinuous');
  PSString.contentLayer = sTID('contentLayer');
  PSString.layerGroup = sTID('layerSection');
  PSString.presetKind = sTID('presetKind');
  PSString.presetKindCustom = sTID('presetKindCustom');
  PSString.presetKindDefault = sTID('presetKindDefault');
  PSString.presetKindType = sTID('presetKindType');
  PSString.selectionModifier = sTID('selectionModifier');
  PSString.selectionModifierType = sTID('selectionModifierType');
  PSString.solidColorLayer = sTID('solidColorLayer');
  PSType.BlendMode = cTID('BlnM');
  PSType.CorrectionMethod = cTID('CrcM');
  PSType.Ordinal = cTID('Ordn');
  PSUnit.Percent = cTID('#Prc');
};

G1.loadSymbols(); // load up our symbols



//=========================================
//                    G1.main
//=========================================
//

G1.main = function () {
  G1();
};

G1.main();

// EOF

    },
};

$._ext_G2={
    run : function() {
//
// Generated Thu Aug 20 2015 16:05:45 GMT+0400
//

//
//==================== G2 ==============
//
function G2() {
  // Make
  function step1(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Colorize White G2");
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);
    desc2.putObject(PSKey.Type, PSClass.SelectiveColor, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step2(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    var list1 = new ActionList();
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Whites);
    desc3.putUnitDouble(PSKey.Yellow, PSUnit.Percent, 50);
    list1.putObject(PSClass.ColorCorrection, desc3);
    desc2.putList(PSClass.ColorCorrection, list1);
    desc1.putObject(PSKey.To, PSClass.SelectiveColor, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step3(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Colorize All G2");
    var desc3 = new ActionDescriptor();
    var list1 = new ActionList();
    list1.putInteger(0);
    list1.putInteger(sTID("skinTone"), 0);
    list1.putInteger(sTID("contentAware"), 0);
    desc3.putList(PSKey.ShadowLevels, list1);
    var list2 = new ActionList();
    list2.putInteger(0);
    list2.putInteger(sTID("skinTone"), 0);
    list2.putInteger(sTID("contentAware"), 0);
    desc3.putList(PSKey.MidtoneLevels, list2);
    var list3 = new ActionList();
    list3.putInteger(0);
    list3.putInteger(sTID("skinTone"), 0);
    list3.putInteger(sTID("contentAware"), 0);
    desc3.putList(PSKey.HighlightLevels, list3);
    desc3.putBoolean(PSKey.PreserveLuminosity, true);
    desc2.putObject(PSKey.Type, PSClass.ColorBalance, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step4(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    var list1 = new ActionList();
    list1.putInteger(5);
    list1.putInteger(sTID("skinTone"), 0);
    list1.putInteger(sTID("contentAware"), 5);
    desc2.putList(PSKey.ShadowLevels, list1);
    var list2 = new ActionList();
    list2.putInteger(5);
    list2.putInteger(sTID("skinTone"), 0);
    list2.putInteger(sTID("contentAware"), -10);
    desc2.putList(PSKey.MidtoneLevels, list2);
    var list3 = new ActionList();
    list3.putInteger(5);
    list3.putInteger(sTID("skinTone"), 0);
    list3.putInteger(sTID("contentAware"), -10);
    desc2.putList(PSKey.HighlightLevels, list3);
    desc1.putObject(PSKey.To, PSClass.ColorBalance, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step5(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSClass.Color);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step6(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Grading Map G2");
    var desc3 = new ActionDescriptor();
    var desc4 = new ActionDescriptor();
    desc4.putString(PSKey.Name, "Foreground to Background");
    desc4.putEnumerated(PSType.GradientForm, PSType.GradientForm, PSEnum.CustomStops);
    desc4.putDouble(PSKey.Interpolation, 4096);
    var list1 = new ActionList();
    var desc5 = new ActionDescriptor();
    var desc6 = new ActionDescriptor();
    desc6.putDouble(PSKey.Red, 19.9996948242188);
    desc6.putDouble(PSKey.Green, 11.9998168945313);
    desc6.putDouble(PSKey.Blue, 9.00375366210938);
    desc5.putObject(PSClass.Color, PSClass.RGBColor, desc6);
    desc5.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc5.putInteger(PSKey.Location, 0);
    desc5.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc5);
    var desc7 = new ActionDescriptor();
    var desc8 = new ActionDescriptor();
    desc8.putDouble(PSKey.Red, 0);
    desc8.putDouble(PSKey.Green, 0);
    desc8.putDouble(PSKey.Blue, 0);
    desc7.putObject(PSClass.Color, PSClass.RGBColor, desc8);
    desc7.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc7.putInteger(PSKey.Location, 4096);
    desc7.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc7);
    desc4.putList(PSKey.Colors, list1);
    var list2 = new ActionList();
    var desc9 = new ActionDescriptor();
    desc9.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 100);
    desc9.putInteger(PSKey.Location, 0);
    desc9.putInteger(PSKey.Midpoint, 50);
    list2.putObject(PSClass.TransparencyStop, desc9);
    var desc10 = new ActionDescriptor();
    desc10.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 100);
    desc10.putInteger(PSKey.Location, 4096);
    desc10.putInteger(PSKey.Midpoint, 50);
    list2.putObject(PSClass.TransparencyStop, desc10);
    desc4.putList(PSKey.Transparency, list2);
    desc3.putObject(PSKey.Gradient, PSClass.Gradient, desc4);
    desc2.putObject(PSKey.Type, PSClass.GradientMap, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step7(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    var desc3 = new ActionDescriptor();
    desc3.putString(PSKey.Name, "Custom");
    desc3.putEnumerated(PSType.GradientForm, PSType.GradientForm, PSEnum.CustomStops);
    desc3.putDouble(PSKey.Interpolation, 4096);
    var list1 = new ActionList();
    var desc4 = new ActionDescriptor();
    var desc5 = new ActionDescriptor();
    desc5.putDouble(PSKey.Red, 3.00384521484375);
    desc5.putDouble(PSKey.Green, 3.00384521484375);
    desc5.putDouble(PSKey.Blue, 3.00384521484375);
    desc4.putObject(PSClass.Color, PSClass.RGBColor, desc5);
    desc4.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc4.putInteger(PSKey.Location, 0);
    desc4.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc4);
    var desc6 = new ActionDescriptor();
    var desc7 = new ActionDescriptor();
    desc7.putDouble(PSKey.Red, 19.4705200195313);
    desc7.putDouble(PSKey.Green, 24.4976806640625);
    desc7.putDouble(PSKey.Blue, 24.093017578125);
    desc6.putObject(PSClass.Color, PSClass.RGBColor, desc7);
    desc6.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc6.putInteger(PSKey.Location, 62);
    desc6.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc6);
    var desc8 = new ActionDescriptor();
    var desc9 = new ActionDescriptor();
    desc9.putDouble(PSKey.Red, 45.5868530273438);
    desc9.putDouble(PSKey.Green, 89.4227600097656);
    desc9.putDouble(PSKey.Blue, 122.651824951172);
    desc8.putObject(PSClass.Color, PSClass.RGBColor, desc9);
    desc8.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc8.putInteger(PSKey.Location, 645);
    desc8.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc8);
    var desc10 = new ActionDescriptor();
    var desc11 = new ActionDescriptor();
    desc11.putDouble(PSKey.Red, 127.998046875);
    desc11.putDouble(PSKey.Green, 127.998046875);
    desc11.putDouble(PSKey.Blue, 127.998046875);
    desc10.putObject(PSClass.Color, PSClass.RGBColor, desc11);
    desc10.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc10.putInteger(PSKey.Location, 1131);
    desc10.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc10);
    var desc12 = new ActionDescriptor();
    var desc13 = new ActionDescriptor();
    desc13.putDouble(PSKey.Red, 216.580352783203);
    desc13.putDouble(PSKey.Green, 189.358978271484);
    desc13.putDouble(PSKey.Blue, 128.542785644531);
    desc12.putObject(PSClass.Color, PSClass.RGBColor, desc13);
    desc12.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc12.putInteger(PSKey.Location, 3090);
    desc12.putInteger(PSKey.Midpoint, 38);
    list1.putObject(PSClass.ColorStop, desc12);
    var desc14 = new ActionDescriptor();
    var desc15 = new ActionDescriptor();
    desc15.putDouble(PSKey.Red, 242.517700195313);
    desc15.putDouble(PSKey.Green, 236.517791748047);
    desc15.putDouble(PSKey.Blue, 200.518341064453);
    desc14.putObject(PSClass.Color, PSClass.RGBColor, desc15);
    desc14.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc14.putInteger(PSKey.Location, 4024);
    desc14.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc14);
    var desc16 = new ActionDescriptor();
    var desc17 = new ActionDescriptor();
    desc17.putDouble(PSKey.Red, 255);
    desc17.putDouble(PSKey.Green, 255);
    desc17.putDouble(PSKey.Blue, 255);
    desc16.putObject(PSClass.Color, PSClass.RGBColor, desc17);
    desc16.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc16.putInteger(PSKey.Location, 4096);
    desc16.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc16);
    desc3.putList(PSKey.Colors, list1);
    var list2 = new ActionList();
    var desc18 = new ActionDescriptor();
    desc18.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 100);
    desc18.putInteger(PSKey.Location, 0);
    desc18.putInteger(PSKey.Midpoint, 50);
    list2.putObject(PSClass.TransparencyStop, desc18);
    var desc19 = new ActionDescriptor();
    desc19.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 100);
    desc19.putInteger(PSKey.Location, 4096);
    desc19.putInteger(PSKey.Midpoint, 50);
    list2.putObject(PSClass.TransparencyStop, desc19);
    desc3.putList(PSKey.Transparency, list2);
    desc2.putObject(PSKey.Gradient, PSClass.Gradient, desc3);
    desc1.putObject(PSKey.To, PSClass.GradientMap, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step8(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSClass.Color);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step9(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 50);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step10(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Colorize White G2");
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelectionContinuous);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step11(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSString.layerGroup);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSKey.From, ref2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step12(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "G2");
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  step1();      // Make
  step2();      // Set
  step3();      // Make
  step4();      // Set
  step5();      // Set
  step6();      // Make
  step7();      // Set
  step8();      // Set
  step9();      // Set
  step10();      // Select
  step11();      // Make
  step12();      // Set
};



cTID = function(s) { return app.charIDToTypeID(s); };
sTID = function(s) { return app.stringIDToTypeID(s); };

//
// G2.loadSymbols
//   Loading up the symbol definitions like this makes it possible
//   to include several of these generated files in one master file
//   provided a prefix is specified other than the default. It also
//   skips the definitions if PSConstants has already been loaded.
//
G2.loadSymbols = function() {
  var dbgLevel = $.level;
  $.level = 0;
  try {
    PSConstants;
    return; // only if PSConstants is defined
  } catch (e) {
  } finally {
    $.level = dbgLevel;
  }
  var needDefs = true;
  $.level = 0;
  try {
    PSClass;
    needDefs = false;
  } catch (e) {
  } finally {
    $.level = dbgLevel;
  }
  if (needDefs) {
    PSClass = function() {};
    PSEnum = function() {};
    PSEvent = function() {};
    PSForm = function() {};
    PSKey = function() {};
    PSType = function() {};
    PSUnit = function() {};
    PSString = function() {};
  }

  // We may still end up duplicating some of the following definitions
  // but at least we don't redefine PSClass, etc... and wipe out others
  PSClass.AdjustmentLayer = cTID('AdjL');
  PSClass.Color = cTID('Clr ');
  PSClass.ColorBalance = cTID('ClrB');
  PSClass.ColorCorrection = cTID('ClrC');
  PSClass.ColorStop = cTID('Clrt');
  PSClass.Gradient = cTID('Grdn');
  PSClass.GradientMap = cTID('GdMp');
  PSClass.Layer = cTID('Lyr ');
  PSClass.RGBColor = cTID('RGBC');
  PSClass.SelectiveColor = cTID('SlcC');
  PSClass.TransparencyStop = cTID('TrnS');
  PSEnum.CustomStops = cTID('CstS');
  PSEnum.Relative = cTID('Rltv');
  PSEnum.SoftLight = cTID('SftL');
  PSEnum.Target = cTID('Trgt');
  PSEnum.UserStop = cTID('UsrS');
  PSEnum.Whites = cTID('Whts');
  PSEvent.Make = cTID('Mk  ');
  PSEvent.Select = cTID('slct');
  PSEvent.Set = cTID('setd');
  PSKey.Black = cTID('Blck');
  PSKey.Blue = cTID('Bl  ');
  PSKey.Colors = cTID('Clrs');
  PSKey.Cyan = cTID('Cyn ');
  PSKey.From = cTID('From');
  PSKey.Gradient = cTID('Grad');
  PSKey.Green = cTID('Grn ');
  PSKey.HighlightLevels = cTID('HghL');
  PSKey.Interpolation = cTID('Intr');
  PSKey.Location = cTID('Lctn');
  PSKey.MakeVisible = cTID('MkVs');
  PSKey.Method = cTID('Mthd');
  PSKey.Midpoint = cTID('Mdpn');
  PSKey.MidtoneLevels = cTID('MdtL');
  PSKey.Mode = cTID('Md  ');
  PSKey.Name = cTID('Nm  ');
  PSKey.Opacity = cTID('Opct');
  PSKey.PreserveLuminosity = cTID('PrsL');
  PSKey.Red = cTID('Rd  ');
  PSKey.ShadowLevels = cTID('ShdL');
  PSKey.To = cTID('T   ');
  PSKey.Transparency = cTID('Trns');
  PSKey.Type = cTID('Type');
  PSKey.Using = cTID('Usng');
  PSKey.Yellow = cTID('Ylw ');
  PSString.Null = sTID('null');
  PSString.addToSelectionContinuous = sTID('addToSelectionContinuous');
  PSString.contentLayer = sTID('contentLayer');
  PSString.layerGroup = sTID('layerSection');
  PSString.presetKind = sTID('presetKind');
  PSString.presetKindCustom = sTID('presetKindCustom');
  PSString.presetKindDefault = sTID('presetKindDefault');
  PSString.presetKindType = sTID('presetKindType');
  PSString.selectionModifier = sTID('selectionModifier');
  PSString.selectionModifierType = sTID('selectionModifierType');
  PSString.solidColorLayer = sTID('solidColorLayer');
  PSType.BlendMode = cTID('BlnM');
  PSType.ColorStopType = cTID('Clry');
  PSType.CorrectionMethod = cTID('CrcM');
  PSType.GradientForm = cTID('GrdF');
  PSType.Ordinal = cTID('Ordn');
  PSUnit.Percent = cTID('#Prc');
};

G2.loadSymbols(); // load up our symbols



//=========================================
//                    G2.main
//=========================================
//

G2.main = function () {
  G2();
};

G2.main();

// EOF

    },
};

$._ext_G3={
    run : function() {
//
// Generated Thu Aug 20 2015 16:28:57 GMT+0400
//

//
//==================== G3 ==============
//
function G3() {
  // Ñäåëàòü
  function step1(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Colorize White G3");
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);
    desc2.putObject(PSKey.Type, PSClass.SelectiveColor, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(sTID('make'), desc1, dialogMode);
  };

  // Çàäàòü
  function step2(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    var list1 = new ActionList();
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Whites);
    desc3.putUnitDouble(PSKey.Yellow, PSUnit.Percent, 50);
    list1.putObject(PSClass.ColorCorrection, desc3);
    desc2.putList(PSClass.ColorCorrection, list1);
    desc1.putObject(PSKey.To, PSClass.SelectiveColor, desc2);
    executeAction(sTID('set'), desc1, dialogMode);
  };

  // Ñäåëàòü
  function step3(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Colorize All G3");
    var desc3 = new ActionDescriptor();
    var list1 = new ActionList();
    list1.putInteger(0);
    list1.putInteger(sTID("skinTone"), 0);
    list1.putInteger(sTID("contentAware"), 0);
    desc3.putList(PSKey.ShadowLevels, list1);
    var list2 = new ActionList();
    list2.putInteger(0);
    list2.putInteger(sTID("skinTone"), 0);
    list2.putInteger(sTID("contentAware"), 0);
    desc3.putList(PSKey.MidtoneLevels, list2);
    var list3 = new ActionList();
    list3.putInteger(0);
    list3.putInteger(sTID("skinTone"), 0);
    list3.putInteger(sTID("contentAware"), 0);
    desc3.putList(PSKey.HighlightLevels, list3);
    desc3.putBoolean(PSKey.PreserveLuminosity, true);
    desc2.putObject(PSKey.Type, PSClass.ColorBalance, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(sTID('make'), desc1, dialogMode);
  };

  // Çàäàòü
  function step4(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    var list1 = new ActionList();
    list1.putInteger(5);
    list1.putInteger(sTID("skinTone"), 0);
    list1.putInteger(sTID("contentAware"), 5);
    desc2.putList(PSKey.ShadowLevels, list1);
    var list2 = new ActionList();
    list2.putInteger(5);
    list2.putInteger(sTID("skinTone"), 0);
    list2.putInteger(sTID("contentAware"), -10);
    desc2.putList(PSKey.MidtoneLevels, list2);
    var list3 = new ActionList();
    list3.putInteger(5);
    list3.putInteger(sTID("skinTone"), 0);
    list3.putInteger(sTID("contentAware"), -10);
    desc2.putList(PSKey.HighlightLevels, list3);
    desc1.putObject(PSKey.To, PSClass.ColorBalance, desc2);
    executeAction(sTID('set'), desc1, dialogMode);
  };

  // Çàäàòü
  function step5(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSClass.Color);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(sTID('set'), desc1, dialogMode);
  };

  // Ñäåëàòü
  function step6(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Grading Map G3");
    var desc3 = new ActionDescriptor();
    var desc4 = new ActionDescriptor();
    desc4.putString(PSKey.Name, "Foreground to Background");
    desc4.putEnumerated(PSType.GradientForm, PSType.GradientForm, PSEnum.CustomStops);
    desc4.putDouble(PSKey.Interpolation, 4096);
    var list1 = new ActionList();
    var desc5 = new ActionDescriptor();
    var desc6 = new ActionDescriptor();
    desc6.putDouble(PSKey.Red, 19.9996948242188);
    desc6.putDouble(PSKey.Green, 11.9998168945313);
    desc6.putDouble(PSKey.Blue, 9.00375366210938);
    desc5.putObject(PSClass.Color, PSClass.RGBColor, desc6);
    desc5.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc5.putInteger(PSKey.Location, 0);
    desc5.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc5);
    var desc7 = new ActionDescriptor();
    var desc8 = new ActionDescriptor();
    desc8.putDouble(PSKey.Red, 0);
    desc8.putDouble(PSKey.Green, 0);
    desc8.putDouble(PSKey.Blue, 0);
    desc7.putObject(PSClass.Color, PSClass.RGBColor, desc8);
    desc7.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc7.putInteger(PSKey.Location, 4096);
    desc7.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc7);
    desc4.putList(PSKey.Colors, list1);
    var list2 = new ActionList();
    var desc9 = new ActionDescriptor();
    desc9.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 100);
    desc9.putInteger(PSKey.Location, 0);
    desc9.putInteger(PSKey.Midpoint, 50);
    list2.putObject(PSClass.TransparencyStop, desc9);
    var desc10 = new ActionDescriptor();
    desc10.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 100);
    desc10.putInteger(PSKey.Location, 4096);
    desc10.putInteger(PSKey.Midpoint, 50);
    list2.putObject(PSClass.TransparencyStop, desc10);
    desc4.putList(PSKey.Transparency, list2);
    desc3.putObject(PSKey.Gradient, PSClass.Gradient, desc4);
    desc2.putObject(PSKey.Type, PSClass.GradientMap, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(sTID('make'), desc1, dialogMode);
  };

  // Çàäàòü
  function step7(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    var desc3 = new ActionDescriptor();
    desc3.putString(PSKey.Name, "$$$/Presets/Gradients/Toning/Gold1=Gold 1");
    desc3.putEnumerated(PSType.GradientForm, PSType.GradientForm, PSEnum.CustomStops);
    desc3.putDouble(PSKey.Interpolation, 4096);
    var list1 = new ActionList();
    var desc4 = new ActionDescriptor();
    var desc5 = new ActionDescriptor();
    desc5.putDouble(PSKey.Red, 3.00384521484375);
    desc5.putDouble(PSKey.Green, 3.00384521484375);
    desc5.putDouble(PSKey.Blue, 3.00384521484375);
    desc4.putObject(PSClass.Color, PSClass.RGBColor, desc5);
    desc4.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc4.putInteger(PSKey.Location, 0);
    desc4.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc4);
    var desc6 = new ActionDescriptor();
    var desc7 = new ActionDescriptor();
    desc7.putDouble(PSKey.Red, 69.5787048339844);
    desc7.putDouble(PSKey.Green, 47.1510314941406);
    desc7.putDouble(PSKey.Blue, 31.4080810546875);
    desc6.putObject(PSClass.Color, PSClass.RGBColor, desc7);
    desc6.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc6.putInteger(PSKey.Location, 62);
    desc6.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc6);
    var desc8 = new ActionDescriptor();
    var desc9 = new ActionDescriptor();
    desc9.putDouble(PSKey.Red, 90.8468627929688);
    desc9.putDouble(PSKey.Green, 59.6722412109375);
    desc9.putDouble(PSKey.Blue, 33.0422973632813);
    desc8.putObject(PSClass.Color, PSClass.RGBColor, desc9);
    desc8.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc8.putInteger(PSKey.Location, 1037);
    desc8.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc8);
    var desc10 = new ActionDescriptor();
    var desc11 = new ActionDescriptor();
    desc11.putDouble(PSKey.Red, 168.051910400391);
    desc11.putDouble(PSKey.Green, 130.713958740234);
    desc11.putDouble(PSKey.Blue, 71.2596130371094);
    desc10.putObject(PSClass.Color, PSClass.RGBColor, desc11);
    desc10.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc10.putInteger(PSKey.Location, 2063);
    desc10.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc10);
    var desc12 = new ActionDescriptor();
    var desc13 = new ActionDescriptor();
    desc13.putDouble(PSKey.Red, 217.413024902344);
    desc13.putDouble(PSKey.Green, 182.0361328125);
    desc13.putDouble(PSKey.Blue, 116.760864257813);
    desc12.putObject(PSClass.Color, PSClass.RGBColor, desc13);
    desc12.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc12.putInteger(PSKey.Location, 3090);
    desc12.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc12);
    var desc14 = new ActionDescriptor();
    var desc15 = new ActionDescriptor();
    desc15.putDouble(PSKey.Red, 251.972808837891);
    desc15.putDouble(PSKey.Green, 245.653839111328);
    desc15.putDouble(PSKey.Blue, 208.292541503906);
    desc14.putObject(PSClass.Color, PSClass.RGBColor, desc15);
    desc14.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc14.putInteger(PSKey.Location, 4024);
    desc14.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc14);
    var desc16 = new ActionDescriptor();
    var desc17 = new ActionDescriptor();
    desc17.putDouble(PSKey.Red, 255);
    desc17.putDouble(PSKey.Green, 255);
    desc17.putDouble(PSKey.Blue, 255);
    desc16.putObject(PSClass.Color, PSClass.RGBColor, desc17);
    desc16.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc16.putInteger(PSKey.Location, 4096);
    desc16.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc16);
    desc3.putList(PSKey.Colors, list1);
    var list2 = new ActionList();
    var desc18 = new ActionDescriptor();
    desc18.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 100);
    desc18.putInteger(PSKey.Location, 0);
    desc18.putInteger(PSKey.Midpoint, 50);
    list2.putObject(PSClass.TransparencyStop, desc18);
    var desc19 = new ActionDescriptor();
    desc19.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 100);
    desc19.putInteger(PSKey.Location, 4096);
    desc19.putInteger(PSKey.Midpoint, 50);
    list2.putObject(PSClass.TransparencyStop, desc19);
    desc3.putList(PSKey.Transparency, list2);
    desc2.putObject(PSKey.Gradient, PSClass.Gradient, desc3);
    desc1.putObject(PSKey.To, PSClass.GradientMap, desc2);
    executeAction(sTID('set'), desc1, dialogMode);
  };

  // Çàäàòü
  function step8(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSClass.Color);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(sTID('set'), desc1, dialogMode);
  };

  // Çàäàòü
  function step9(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 50);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(sTID('set'), desc1, dialogMode);
  };

  // Âûäåëåíèå
  function step10(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Layer, "Colorize White G3");
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelectionContinuous);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(sTID('select'), desc1, dialogMode);
  };

  // Ñäåëàòü
  function step11(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSString.layerGroup);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSKey.From, ref2);
    executeAction(sTID('make'), desc1, dialogMode);
  };

  // Çàäàòü
  function step12(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "G3");
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(sTID('set'), desc1, dialogMode);
  };

  step1();      // Ñäåëàòü
  step2();      // Çàäàòü
  step3();      // Ñäåëàòü
  step4();      // Çàäàòü
  step5();      // Çàäàòü
  step6();      // Ñäåëàòü
  step7();      // Çàäàòü
  step8();      // Çàäàòü
  step9();      // Çàäàòü
  step10();      // Âûäåëåíèå
  step11();      // Ñäåëàòü
  step12();      // Çàäàòü
};



cTID = function(s) { return app.charIDToTypeID(s); };
sTID = function(s) { return app.stringIDToTypeID(s); };

//
// G3.loadSymbols
//   Loading up the symbol definitions like this makes it possible
//   to include several of these generated files in one master file
//   provided a prefix is specified other than the default. It also
//   skips the definitions if PSConstants has already been loaded.
//
G3.loadSymbols = function() {
  var dbgLevel = $.level;
  $.level = 0;
  try {
    PSConstants;
    return; // only if PSConstants is defined
  } catch (e) {
  } finally {
    $.level = dbgLevel;
  }
  var needDefs = true;
  $.level = 0;
  try {
    PSClass;
    needDefs = false;
  } catch (e) {
  } finally {
    $.level = dbgLevel;
  }
  if (needDefs) {
    PSClass = function() {};
    PSEnum = function() {};
    PSEvent = function() {};
    PSForm = function() {};
    PSKey = function() {};
    PSType = function() {};
    PSUnit = function() {};
    PSString = function() {};
  }

  // We may still end up duplicating some of the following definitions
  // but at least we don't redefine PSClass, etc... and wipe out others
  PSClass.AdjustmentLayer = cTID('AdjL');
  PSClass.Color = cTID('Clr ');
  PSClass.ColorBalance = cTID('ClrB');
  PSClass.ColorCorrection = cTID('ClrC');
  PSClass.ColorStop = cTID('Clrt');
  PSClass.Gradient = cTID('Grdn');
  PSClass.GradientMap = cTID('GdMp');
  PSClass.Layer = cTID('Lyr ');
  PSClass.RGBColor = cTID('RGBC');
  PSClass.SelectiveColor = cTID('SlcC');
  PSClass.TransparencyStop = cTID('TrnS');
  PSEnum.CustomStops = cTID('CstS');
  PSEnum.Relative = cTID('Rltv');
  PSEnum.SoftLight = cTID('SftL');
  PSEnum.Target = cTID('Trgt');
  PSEnum.UserStop = cTID('UsrS');
  PSEnum.Whites = cTID('Whts');
  PSKey.Black = cTID('Blck');
  PSKey.Blue = cTID('Bl  ');
  PSKey.Colors = cTID('Clrs');
  PSKey.Cyan = cTID('Cyn ');
  PSKey.From = cTID('From');
  PSKey.Gradient = cTID('Grad');
  PSKey.Green = cTID('Grn ');
  PSKey.HighlightLevels = cTID('HghL');
  PSKey.Interpolation = cTID('Intr');
  PSKey.Location = cTID('Lctn');
  PSKey.MakeVisible = cTID('MkVs');
  PSKey.Method = cTID('Mthd');
  PSKey.Midpoint = cTID('Mdpn');
  PSKey.MidtoneLevels = cTID('MdtL');
  PSKey.Mode = cTID('Md  ');
  PSKey.Name = cTID('Nm  ');
  PSKey.Opacity = cTID('Opct');
  PSKey.PreserveLuminosity = cTID('PrsL');
  PSKey.Red = cTID('Rd  ');
  PSKey.ShadowLevels = cTID('ShdL');
  PSKey.To = cTID('T   ');
  PSKey.Transparency = cTID('Trns');
  PSKey.Type = cTID('Type');
  PSKey.Using = cTID('Usng');
  PSKey.Yellow = cTID('Ylw ');
  PSString.Null = sTID('null');
  PSString.addToSelectionContinuous = sTID('addToSelectionContinuous');
  PSString.contentLayer = sTID('contentLayer');
  PSString.layerGroup = sTID('layerSection');
  PSString.presetKind = sTID('presetKind');
  PSString.presetKindCustom = sTID('presetKindCustom');
  PSString.presetKindDefault = sTID('presetKindDefault');
  PSString.presetKindType = sTID('presetKindType');
  PSString.selectionModifier = sTID('selectionModifier');
  PSString.selectionModifierType = sTID('selectionModifierType');
  PSString.solidColorLayer = sTID('solidColorLayer');
  PSType.BlendMode = cTID('BlnM');
  PSType.ColorStopType = cTID('Clry');
  PSType.CorrectionMethod = cTID('CrcM');
  PSType.GradientForm = cTID('GrdF');
  PSType.Ordinal = cTID('Ordn');
  PSUnit.Percent = cTID('#Prc');
};

G3.loadSymbols(); // load up our symbols



//=========================================
//                    G3.main
//=========================================
//

G3.main = function () {
  G3();
};

G3.main();

// EOF

    },
};

$._ext_J1={
    run : function() {
//
// Generated Thu Aug 20 2015 16:39:28 GMT+0400
//

//
//==================== J1 ==============
//
function J1() {
  // Ñäåëàòü
  function step1(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "SelectiveColor");
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);
    desc2.putObject(PSKey.Type, PSClass.SelectiveColor, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(sTID('make'), desc1, dialogMode);
  };

  // Ïåðåìåùåíèå
  function step2(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Front);
    desc1.putReference(PSKey.To, ref2);
    executeAction(sTID('move'), desc1, dialogMode);
  };

  // Çàäàòü
  function step3(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindCustom);
    desc2.putEnumerated(PSKey.Method, PSType.CorrectionMethod, PSEnum.Absolute);
    var list1 = new ActionList();
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Reds);
    desc3.putUnitDouble(PSKey.Black, PSUnit.Percent, -100);
    list1.putObject(PSClass.ColorCorrection, desc3);
    var desc4 = new ActionDescriptor();
    desc4.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Yellows);
    desc4.putUnitDouble(PSKey.Black, PSUnit.Percent, -100);
    list1.putObject(PSClass.ColorCorrection, desc4);
    var desc5 = new ActionDescriptor();
    desc5.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Greens);
    desc5.putUnitDouble(PSKey.Black, PSUnit.Percent, -100);
    list1.putObject(PSClass.ColorCorrection, desc5);
    var desc6 = new ActionDescriptor();
    desc6.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Cyans);
    desc6.putUnitDouble(PSKey.Black, PSUnit.Percent, -100);
    list1.putObject(PSClass.ColorCorrection, desc6);
    var desc7 = new ActionDescriptor();
    desc7.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Blues);
    desc7.putUnitDouble(PSKey.Black, PSUnit.Percent, -100);
    list1.putObject(PSClass.ColorCorrection, desc7);
    var desc8 = new ActionDescriptor();
    desc8.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Magentas);
    desc8.putUnitDouble(PSKey.Black, PSUnit.Percent, -100);
    list1.putObject(PSClass.ColorCorrection, desc8);
    var desc9 = new ActionDescriptor();
    desc9.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Whites);
    desc9.putUnitDouble(PSKey.Black, PSUnit.Percent, 100);
    list1.putObject(PSClass.ColorCorrection, desc9);
    var desc10 = new ActionDescriptor();
    desc10.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Neutrals);
    desc10.putUnitDouble(PSKey.Black, PSUnit.Percent, 100);
    list1.putObject(PSClass.ColorCorrection, desc10);
    var desc11 = new ActionDescriptor();
    desc11.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Blocks);
    desc11.putUnitDouble(PSKey.Black, PSUnit.Percent, 100);
    list1.putObject(PSClass.ColorCorrection, desc11);
    desc2.putList(PSClass.ColorCorrection, list1);
    desc1.putObject(PSKey.To, PSClass.SelectiveColor, desc2);
    executeAction(sTID('set'), desc1, dialogMode);
  };

  // Ñäåëàòü
  function step4(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "ContrastForMask");
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);
    desc2.putObject(PSKey.Type, PSClass.Curves, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(sTID('make'), desc1, dialogMode);
  };

  // Çàäàòü
  function step5(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    var list1 = new ActionList();
    var desc3 = new ActionDescriptor();
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.Composite);
    desc3.putReference(PSClass.Channel, ref2);
    var list2 = new ActionList();
    var desc4 = new ActionDescriptor();
    desc4.putDouble(PSKey.Horizontal, 0);
    desc4.putDouble(PSKey.Vertical, 0);
    list2.putObject(PSClass.Point, desc4);
    var desc5 = new ActionDescriptor();
    desc5.putDouble(PSKey.Horizontal, 128);
    desc5.putDouble(PSKey.Vertical, 255);
    list2.putObject(PSClass.Point, desc5);
    desc3.putList(PSKey.Curve, list2);
    list1.putObject(PSClass.CurvesAdjustment, desc3);
    desc2.putList(PSKey.Adjustment, list1);
    desc1.putObject(PSKey.To, PSClass.Curves, desc2);
    executeAction(sTID('set'), desc1, dialogMode);
  };

  // Ñäåëàòü
  function step6(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.Layer);
    desc1.putReference(PSString.Null, ref1);
    executeAction(sTID('make'), desc1, dialogMode);
  };

  // Çàäàòü
  function step7(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Merged");
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(sTID('set'), desc1, dialogMode);
  };

  // Âíåøíèé êàíàë
  function step8(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Merged);
    desc2.putReference(PSKey.To, ref1);
    desc2.putEnumerated(PSKey.Calculation, PSType.Calculation, PSEnum.Multiply);
    desc1.putObject(PSKey.With, PSKey.Calculation, desc2);
    executeAction(sTID('applyImageEvent'), desc1, dialogMode);
  };

  // Âûäåëåíèå
  function step9(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Backward);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelection);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(sTID('select'), desc1, dialogMode);
  };

  // Âûäåëåíèå
  function step10(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Backward);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelection);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(sTID('select'), desc1, dialogMode);
  };

  // Ñäåëàòü
  function step11(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSString.layerGroup);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSKey.From, ref2);
    executeAction(sTID('make'), desc1, dialogMode);
  };

  // Çàäàòü
  function step12(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Saturation Mask");
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(sTID('set'), desc1, dialogMode);
  };

  // Çàäàòü
  function step13(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSKey.To, ref2);
    executeAction(sTID('set'), desc1, dialogMode);
  };

  // Ñîçäàòü äóáëèêàò
  function step14(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    desc1.putString(PSKey.Name, "SaturnMask");
    executeAction(sTID('duplicate'), desc1, dialogMode);
  };

  // Óäàëèòü
  function step15(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    executeAction(sTID('delete'), desc1, dialogMode);
  };

  // Çàäàòü
  function step16(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSKey.To, PSType.Ordinal, PSEnum.None);
    executeAction(sTID('set'), desc1, dialogMode);
  };

  // Âûäåëåíèå
  function step17(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    executeAction(sTID('select'), desc1, dialogMode);
  };

  // Çàäàòü
  function step18(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putName(PSClass.Channel, "SaturnMask");
    desc1.putReference(PSKey.To, ref2);
    executeAction(sTID('set'), desc1, dialogMode);
  };

  // Ñäåëàòü
  function step19(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Desaturate heavily saturated");
    desc2.putClass(PSKey.Type, sTID("vibrance"));
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(sTID('make'), desc1, dialogMode);
  };

  // Çàäàòü
  function step20(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 50);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(sTID('set'), desc1, dialogMode);
  };

  // Çàäàòü
  function step21(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putInteger(PSKey.Start, -50);
    desc1.putObject(PSKey.To, sTID("vibrance"), desc2);
    executeAction(sTID('set'), desc1, dialogMode);
  };

  // Óäàëèòü
  function step22(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Channel, "SaturnMask");
    desc1.putReference(PSString.Null, ref1);
    executeAction(sTID('delete'), desc1, dialogMode);
  };

  // Çàäàòü
  function step23(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Desaturate heavily saturated C1");
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(sTID('set'), desc1, dialogMode);
  };

  // Ñäåëàòü
  function step24(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSString.contentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Exclusion grading");
    var desc3 = new ActionDescriptor();
    var desc4 = new ActionDescriptor();
    desc4.putDouble(PSKey.Red, 12.7159530669451);
    desc4.putDouble(PSKey.Green, 88.1867699325085);
    desc4.putDouble(PSKey.Blue, 141.00000679493);
    desc3.putObject(PSKey.Color, PSClass.RGBColor, desc4);
    desc2.putObject(PSKey.Type, PSString.solidColorLayer, desc3);
    desc1.putObject(PSKey.Using, PSString.contentLayer, desc2);
    executeAction(sTID('make'), desc1, dialogMode);
  };

  // Çàäàòü
  function step25(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSEnum.Exclusion);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(sTID('set'), desc1, dialogMode);
  };

  // Çàäàòü
  function step26(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 20);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(sTID('set'), desc1, dialogMode);
  };

  // Ïåðåìåùåíèå
  function step27(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Front);
    desc1.putReference(PSKey.To, ref2);
    executeAction(sTID('move'), desc1, dialogMode);
  };

  // Çàäàòü
  function step28(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Exclusion grading C1");
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(sTID('set'), desc1, dialogMode);
  };

  // Ñäåëàòü
  function step29(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSString.contentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Desaturation C1");
    var desc3 = new ActionDescriptor();
    var desc4 = new ActionDescriptor();
    desc4.putDouble(PSKey.Red, 127.501945495605);
    desc4.putDouble(PSKey.Green, 127.501945495605);
    desc4.putDouble(PSKey.Blue, 127.501945495605);
    desc3.putObject(PSKey.Color, PSClass.RGBColor, desc4);
    desc2.putObject(PSKey.Type, PSString.solidColorLayer, desc3);
    desc1.putObject(PSKey.Using, PSString.contentLayer, desc2);
    executeAction(sTID('make'), desc1, dialogMode);
  };

  // Çàäàòü
  function step30(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSKey.Color);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(sTID('set'), desc1, dialogMode);
  };

  // Çàäàòü
  function step31(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 15);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(sTID('set'), desc1, dialogMode);
  };

  // Ïåðåìåùåíèå
  function step32(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Previous);
    desc1.putReference(PSKey.To, ref2);
    executeAction(sTID('move'), desc1, dialogMode);
  };

  // Âûäåëåíèå
  function step33(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Forward);
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(sTID('select'), desc1, dialogMode);
  };

  // Âûäåëåíèå
  function step34(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Backward);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelection);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(sTID('select'), desc1, dialogMode);
  };

  // Âûäåëåíèå
  function step35(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Backward);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelection);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(sTID('select'), desc1, dialogMode);
  };

  // Ñäåëàòü
  function step36(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSString.layerGroup);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSKey.From, ref2);
    executeAction(sTID('make'), desc1, dialogMode);
  };

  // Çàäàòü
  function step37(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "J1");
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(sTID('set'), desc1, dialogMode);
  };

  step1();      // Ñäåëàòü
  step2();      // Ïåðåìåùåíèå
  step3();      // Çàäàòü
  step4();      // Ñäåëàòü
  step5();      // Çàäàòü
  step6();      // Ñäåëàòü
  step7();      // Çàäàòü
  step8();      // Âíåøíèé êàíàë
  step9();      // Âûäåëåíèå
  step10();      // Âûäåëåíèå
  step11();      // Ñäåëàòü
  step12();      // Çàäàòü
  step13();      // Çàäàòü
  step14();      // Ñîçäàòü äóáëèêàò
  step15();      // Óäàëèòü
  step16();      // Çàäàòü
  step17();      // Âûäåëåíèå
  step18();      // Çàäàòü
  step19();      // Ñäåëàòü
  step20();      // Çàäàòü
  step21();      // Çàäàòü
  step22();      // Óäàëèòü
  step23();      // Çàäàòü
  step24();      // Ñäåëàòü
  step25();      // Çàäàòü
  step26();      // Çàäàòü
  step27();      // Ïåðåìåùåíèå
  step28();      // Çàäàòü
  step29();      // Ñäåëàòü
  step30();      // Çàäàòü
  step31();      // Çàäàòü
  step32();      // Ïåðåìåùåíèå
  step33();      // Âûäåëåíèå
  step34();      // Âûäåëåíèå
  step35();      // Âûäåëåíèå
  step36();      // Ñäåëàòü
  step37();      // Çàäàòü
};



cTID = function(s) { return app.charIDToTypeID(s); };
sTID = function(s) { return app.stringIDToTypeID(s); };

//
// J1.loadSymbols
//   Loading up the symbol definitions like this makes it possible
//   to include several of these generated files in one master file
//   provided a prefix is specified other than the default. It also
//   skips the definitions if PSConstants has already been loaded.
//
J1.loadSymbols = function() {
  var dbgLevel = $.level;
  $.level = 0;
  try {
    PSConstants;
    return; // only if PSConstants is defined
  } catch (e) {
  } finally {
    $.level = dbgLevel;
  }
  var needDefs = true;
  $.level = 0;
  try {
    PSClass;
    needDefs = false;
  } catch (e) {
  } finally {
    $.level = dbgLevel;
  }
  if (needDefs) {
    PSClass = function() {};
    PSEnum = function() {};
    PSEvent = function() {};
    PSForm = function() {};
    PSKey = function() {};
    PSType = function() {};
    PSUnit = function() {};
    PSString = function() {};
  }

  // We may still end up duplicating some of the following definitions
  // but at least we don't redefine PSClass, etc... and wipe out others
  PSClass.AdjustmentLayer = cTID('AdjL');
  PSClass.Channel = cTID('Chnl');
  PSClass.ColorCorrection = cTID('ClrC');
  PSClass.Curves = cTID('Crvs');
  PSClass.CurvesAdjustment = cTID('CrvA');
  PSClass.Layer = cTID('Lyr ');
  PSClass.Point = cTID('Pnt ');
  PSClass.RGBColor = cTID('RGBC');
  PSClass.SelectiveColor = cTID('SlcC');
  PSEnum.Absolute = cTID('Absl');
  PSEnum.Backward = cTID('Bckw');
  PSEnum.Blocks = cTID('Blks');
  PSEnum.Blues = cTID('Bls ');
  PSEnum.Composite = cTID('Cmps');
  PSEnum.Cyans = cTID('Cyns');
  PSEnum.Exclusion = cTID('Xclu');
  PSEnum.Forward = cTID('Frwr');
  PSEnum.Front = cTID('Frnt');
  PSEnum.Greens = cTID('Grns');
  PSEnum.Magentas = cTID('Mgnt');
  PSEnum.Merged = cTID('Mrgd');
  PSEnum.Multiply = cTID('Mltp');
  PSEnum.Neutrals = cTID('Ntrl');
  PSEnum.None = cTID('None');
  PSEnum.Previous = cTID('Prvs');
  PSEnum.RGB = cTID('RGB ');
  PSEnum.Reds = cTID('Rds ');
  PSEnum.Target = cTID('Trgt');
  PSEnum.Whites = cTID('Whts');
  PSEnum.Yellows = cTID('Ylws');
  PSKey.Adjustment = cTID('Adjs');
  PSKey.Black = cTID('Blck');
  PSKey.Blue = cTID('Bl  ');
  PSKey.Calculation = cTID('Clcl');
  PSKey.Color = cTID('Clr ');
  PSKey.Colors = cTID('Clrs');
  PSKey.Curve = cTID('Crv ');
  PSKey.From = cTID('From');
  PSKey.Green = cTID('Grn ');
  PSKey.Horizontal = cTID('Hrzn');
  PSKey.MakeVisible = cTID('MkVs');
  PSKey.Method = cTID('Mthd');
  PSKey.Mode = cTID('Md  ');
  PSKey.Name = cTID('Nm  ');
  PSKey.Opacity = cTID('Opct');
  PSKey.Red = cTID('Rd  ');
  PSKey.Start = cTID('Strt');
  PSKey.To = cTID('T   ');
  PSKey.Type = cTID('Type');
  PSKey.Using = cTID('Usng');
  PSKey.Vertical = cTID('Vrtc');
  PSKey.With = cTID('With');
  PSString.Null = sTID('null');
  PSString.addToSelection = sTID('addToSelection');
  PSString.contentLayer = sTID('contentLayer');
  PSString.layerGroup = sTID('layerSection');
  PSString.presetKind = sTID('presetKind');
  PSString.presetKindCustom = sTID('presetKindCustom');
  PSString.presetKindDefault = sTID('presetKindDefault');
  PSString.presetKindType = sTID('presetKindType');
  PSString.selection = sTID('selection');
  PSString.selectionModifier = sTID('selectionModifier');
  PSString.selectionModifierType = sTID('selectionModifierType');
  PSString.solidColorLayer = sTID('solidColorLayer');
  PSType.BlendMode = cTID('BlnM');
  PSType.Calculation = cTID('Clcn');
  PSType.CorrectionMethod = cTID('CrcM');
  PSType.Ordinal = cTID('Ordn');
  PSUnit.Percent = cTID('#Prc');
};

J1.loadSymbols(); // load up our symbols



//=========================================
//                    J1.main
//=========================================
//

J1.main = function () {
  J1();
};

J1.main();

// EOF

    },
};

$._ext_J2={
    run : function() {
//
// Generated Thu Aug 20 2015 16:28:44 GMT+0400
//

//
//==================== J2 ==============
//
function J2() {
  // Ñäåëàòü
  function step1(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "SelectiveColor");
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);
    desc2.putObject(PSKey.Type, PSClass.SelectiveColor, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(sTID('make'), desc1, dialogMode);
  };

  // Ïåðåìåùåíèå
  function step2(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Front);
    desc1.putReference(PSKey.To, ref2);
    executeAction(sTID('move'), desc1, dialogMode);
  };

  // Çàäàòü
  function step3(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindCustom);
    desc2.putEnumerated(PSKey.Method, PSType.CorrectionMethod, PSEnum.Absolute);
    var list1 = new ActionList();
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Reds);
    desc3.putUnitDouble(PSKey.Black, PSUnit.Percent, -100);
    list1.putObject(PSClass.ColorCorrection, desc3);
    var desc4 = new ActionDescriptor();
    desc4.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Yellows);
    desc4.putUnitDouble(PSKey.Black, PSUnit.Percent, -100);
    list1.putObject(PSClass.ColorCorrection, desc4);
    var desc5 = new ActionDescriptor();
    desc5.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Greens);
    desc5.putUnitDouble(PSKey.Black, PSUnit.Percent, -100);
    list1.putObject(PSClass.ColorCorrection, desc5);
    var desc6 = new ActionDescriptor();
    desc6.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Cyans);
    desc6.putUnitDouble(PSKey.Black, PSUnit.Percent, -100);
    list1.putObject(PSClass.ColorCorrection, desc6);
    var desc7 = new ActionDescriptor();
    desc7.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Blues);
    desc7.putUnitDouble(PSKey.Black, PSUnit.Percent, -100);
    list1.putObject(PSClass.ColorCorrection, desc7);
    var desc8 = new ActionDescriptor();
    desc8.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Magentas);
    desc8.putUnitDouble(PSKey.Black, PSUnit.Percent, -100);
    list1.putObject(PSClass.ColorCorrection, desc8);
    var desc9 = new ActionDescriptor();
    desc9.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Whites);
    desc9.putUnitDouble(PSKey.Black, PSUnit.Percent, 100);
    list1.putObject(PSClass.ColorCorrection, desc9);
    var desc10 = new ActionDescriptor();
    desc10.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Neutrals);
    desc10.putUnitDouble(PSKey.Black, PSUnit.Percent, 100);
    list1.putObject(PSClass.ColorCorrection, desc10);
    var desc11 = new ActionDescriptor();
    desc11.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Blocks);
    desc11.putUnitDouble(PSKey.Black, PSUnit.Percent, 100);
    list1.putObject(PSClass.ColorCorrection, desc11);
    desc2.putList(PSClass.ColorCorrection, list1);
    desc1.putObject(PSKey.To, PSClass.SelectiveColor, desc2);
    executeAction(sTID('set'), desc1, dialogMode);
  };

  // Ñäåëàòü
  function step4(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "ContrastForMask");
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);
    desc2.putObject(PSKey.Type, PSClass.Curves, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(sTID('make'), desc1, dialogMode);
  };

  // Çàäàòü
  function step5(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    var list1 = new ActionList();
    var desc3 = new ActionDescriptor();
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.Composite);
    desc3.putReference(PSClass.Channel, ref2);
    var list2 = new ActionList();
    var desc4 = new ActionDescriptor();
    desc4.putDouble(PSKey.Horizontal, 0);
    desc4.putDouble(PSKey.Vertical, 0);
    list2.putObject(PSClass.Point, desc4);
    var desc5 = new ActionDescriptor();
    desc5.putDouble(PSKey.Horizontal, 128);
    desc5.putDouble(PSKey.Vertical, 255);
    list2.putObject(PSClass.Point, desc5);
    desc3.putList(PSKey.Curve, list2);
    list1.putObject(PSClass.CurvesAdjustment, desc3);
    desc2.putList(PSKey.Adjustment, list1);
    desc1.putObject(PSKey.To, PSClass.Curves, desc2);
    executeAction(sTID('set'), desc1, dialogMode);
  };

  // Ñäåëàòü
  function step6(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.Layer);
    desc1.putReference(PSString.Null, ref1);
    executeAction(sTID('make'), desc1, dialogMode);
  };

  // Çàäàòü
  function step7(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Merged");
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(sTID('set'), desc1, dialogMode);
  };

  // Âíåøíèé êàíàë
  function step8(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Merged);
    desc2.putReference(PSKey.To, ref1);
    desc2.putEnumerated(PSKey.Calculation, PSType.Calculation, PSEnum.Multiply);
    desc1.putObject(PSKey.With, PSKey.Calculation, desc2);
    executeAction(sTID('applyImageEvent'), desc1, dialogMode);
  };

  // Âûäåëåíèå
  function step9(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Backward);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelection);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(sTID('select'), desc1, dialogMode);
  };

  // Âûäåëåíèå
  function step10(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Backward);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelection);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(sTID('select'), desc1, dialogMode);
  };

  // Ñäåëàòü
  function step11(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSString.layerGroup);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSKey.From, ref2);
    executeAction(sTID('make'), desc1, dialogMode);
  };

  // Çàäàòü
  function step12(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Saturation Mask");
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(sTID('set'), desc1, dialogMode);
  };

  // Çàäàòü
  function step13(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSKey.To, ref2);
    executeAction(sTID('set'), desc1, dialogMode);
  };

  // Ñîçäàòü äóáëèêàò
  function step14(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    desc1.putString(PSKey.Name, "SaturnMask");
    executeAction(sTID('duplicate'), desc1, dialogMode);
  };

  // Óäàëèòü
  function step15(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    executeAction(sTID('delete'), desc1, dialogMode);
  };

  // Çàäàòü
  function step16(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSKey.To, PSType.Ordinal, PSEnum.None);
    executeAction(sTID('set'), desc1, dialogMode);
  };

  // Âûäåëåíèå
  function step17(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    executeAction(sTID('select'), desc1, dialogMode);
  };

  // Çàäàòü
  function step18(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putName(PSClass.Channel, "SaturnMask");
    desc1.putReference(PSKey.To, ref2);
    executeAction(sTID('set'), desc1, dialogMode);
  };

  // Ñäåëàòü
  function step19(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Desaturate heavily saturated");
    desc2.putClass(PSKey.Type, sTID("vibrance"));
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(sTID('make'), desc1, dialogMode);
  };

  // Çàäàòü
  function step20(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 50);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(sTID('set'), desc1, dialogMode);
  };

  // Çàäàòü
  function step21(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putInteger(PSKey.Start, -50);
    desc1.putObject(PSKey.To, sTID("vibrance"), desc2);
    executeAction(sTID('set'), desc1, dialogMode);
  };

  // Óäàëèòü
  function step22(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Channel, "SaturnMask");
    desc1.putReference(PSString.Null, ref1);
    executeAction(sTID('delete'), desc1, dialogMode);
  };

  // Çàäàòü
  function step23(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Desaturate heavily saturated C2");
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(sTID('set'), desc1, dialogMode);
  };

  // Çàäàòü
  function step24(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Desaturate heavily saturated C2");
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(sTID('set'), desc1, dialogMode);
  };

  // Ñäåëàòü
  function step25(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Grading C2");
    var desc3 = new ActionDescriptor();
    var desc4 = new ActionDescriptor();
    desc4.putString(PSKey.Name, "Foreground to Background");
    desc4.putEnumerated(PSType.GradientForm, PSType.GradientForm, PSEnum.CustomStops);
    desc4.putDouble(PSKey.Interpolation, 4096);
    var list1 = new ActionList();
    var desc5 = new ActionDescriptor();
    var desc6 = new ActionDescriptor();
    desc6.putDouble(PSKey.Red, 177.000004649162);
    desc6.putDouble(PSKey.Green, 187.9961130023);
    desc6.putDouble(PSKey.Blue, 187.9961130023);
    desc5.putObject(PSKey.Color, PSClass.RGBColor, desc6);
    desc5.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc5.putInteger(PSKey.Location, 0);
    desc5.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc5);
    var desc7 = new ActionDescriptor();
    var desc8 = new ActionDescriptor();
    desc8.putDouble(PSKey.Red, 0);
    desc8.putDouble(PSKey.Green, 0);
    desc8.putDouble(PSKey.Blue, 0);
    desc7.putObject(PSKey.Color, PSClass.RGBColor, desc8);
    desc7.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc7.putInteger(PSKey.Location, 4096);
    desc7.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc7);
    desc4.putList(PSKey.Colors, list1);
    var list2 = new ActionList();
    var desc9 = new ActionDescriptor();
    desc9.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 100);
    desc9.putInteger(PSKey.Location, 0);
    desc9.putInteger(PSKey.Midpoint, 50);
    list2.putObject(PSClass.TransparencyStop, desc9);
    var desc10 = new ActionDescriptor();
    desc10.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 100);
    desc10.putInteger(PSKey.Location, 4096);
    desc10.putInteger(PSKey.Midpoint, 50);
    list2.putObject(PSClass.TransparencyStop, desc10);
    desc4.putList(PSKey.Transparency, list2);
    desc3.putObject(PSKey.Gradient, PSClass.Gradient, desc4);
    desc2.putObject(PSKey.Type, PSClass.GradientMap, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(sTID('make'), desc1, dialogMode);
  };

  // Çàäàòü
  function step26(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    var desc3 = new ActionDescriptor();
    desc3.putString(PSKey.Name, "Custom");
    desc3.putEnumerated(PSType.GradientForm, PSType.GradientForm, PSEnum.CustomStops);
    desc3.putDouble(PSKey.Interpolation, 4096);
    var list1 = new ActionList();
    var desc4 = new ActionDescriptor();
    var desc5 = new ActionDescriptor();
    desc5.putDouble(PSKey.Red, 42.9143956303597);
    desc5.putDouble(PSKey.Green, 9.81712091714144);
    desc5.putDouble(PSKey.Blue, 89.2490257322788);
    desc4.putObject(PSKey.Color, PSClass.RGBColor, desc5);
    desc4.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc4.putInteger(PSKey.Location, 0);
    desc4.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc4);
    var desc6 = new ActionDescriptor();
    var desc7 = new ActionDescriptor();
    desc7.putDouble(PSKey.Red, 255);
    desc7.putDouble(PSKey.Green, 127.494163513184);
    desc7.putDouble(PSKey.Blue, 0);
    desc6.putObject(PSKey.Color, PSClass.RGBColor, desc7);
    desc6.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc6.putInteger(PSKey.Location, 4096);
    desc6.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc6);
    desc3.putList(PSKey.Colors, list1);
    var list2 = new ActionList();
    var desc8 = new ActionDescriptor();
    desc8.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 100);
    desc8.putInteger(PSKey.Location, 0);
    desc8.putInteger(PSKey.Midpoint, 50);
    list2.putObject(PSClass.TransparencyStop, desc8);
    var desc9 = new ActionDescriptor();
    desc9.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 100);
    desc9.putInteger(PSKey.Location, 4096);
    desc9.putInteger(PSKey.Midpoint, 50);
    list2.putObject(PSClass.TransparencyStop, desc9);
    desc3.putList(PSKey.Transparency, list2);
    desc2.putObject(PSKey.Gradient, PSClass.Gradient, desc3);
    desc1.putObject(PSKey.To, PSClass.GradientMap, desc2);
    executeAction(sTID('set'), desc1, dialogMode);
  };

  // Çàäàòü
  function step27(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 20);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(sTID('set'), desc1, dialogMode);
  };

  // Ïåðåìåùåíèå
  function step28(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Front);
    desc1.putReference(PSKey.To, ref2);
    executeAction(sTID('move'), desc1, dialogMode);
  };

  // Ñäåëàòü
  function step29(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSString.contentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Desaturation C2");
    var desc3 = new ActionDescriptor();
    var desc4 = new ActionDescriptor();
    desc4.putDouble(PSKey.Red, 127.501945495605);
    desc4.putDouble(PSKey.Green, 127.501945495605);
    desc4.putDouble(PSKey.Blue, 127.501945495605);
    desc3.putObject(PSKey.Color, PSClass.RGBColor, desc4);
    desc2.putObject(PSKey.Type, PSString.solidColorLayer, desc3);
    desc1.putObject(PSKey.Using, PSString.contentLayer, desc2);
    executeAction(sTID('make'), desc1, dialogMode);
  };

  // Çàäàòü
  function step30(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSKey.Color);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(sTID('set'), desc1, dialogMode);
  };

  // Çàäàòü
  function step31(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 15);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(sTID('set'), desc1, dialogMode);
  };

  // Ïåðåìåùåíèå
  function step32(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Previous);
    desc1.putReference(PSKey.To, ref2);
    executeAction(sTID('move'), desc1, dialogMode);
  };

  // Âûäåëåíèå
  function step33(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Forward);
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(sTID('select'), desc1, dialogMode);
  };

  // Âûäåëåíèå
  function step34(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Backward);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelection);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(sTID('select'), desc1, dialogMode);
  };

  // Âûäåëåíèå
  function step35(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Backward);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelection);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(sTID('select'), desc1, dialogMode);
  };

  // Ñäåëàòü
  function step36(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSString.layerGroup);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSKey.From, ref2);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "J2");
    desc1.putObject(PSKey.Using, PSString.layerGroup, desc2);
    executeAction(sTID('make'), desc1, dialogMode);
  };

  step1();      // Ñäåëàòü
  step2();      // Ïåðåìåùåíèå
  step3();      // Çàäàòü
  step4();      // Ñäåëàòü
  step5();      // Çàäàòü
  step6();      // Ñäåëàòü
  step7();      // Çàäàòü
  step8();      // Âíåøíèé êàíàë
  step9();      // Âûäåëåíèå
  step10();      // Âûäåëåíèå
  step11();      // Ñäåëàòü
  step12();      // Çàäàòü
  step13();      // Çàäàòü
  step14();      // Ñîçäàòü äóáëèêàò
  step15();      // Óäàëèòü
  step16();      // Çàäàòü
  step17();      // Âûäåëåíèå
  step18();      // Çàäàòü
  step19();      // Ñäåëàòü
  step20();      // Çàäàòü
  step21();      // Çàäàòü
  step22();      // Óäàëèòü
  step23();      // Çàäàòü
  step24();      // Çàäàòü
  step25();      // Ñäåëàòü
  step26();      // Çàäàòü
  step27();      // Çàäàòü
  step28();      // Ïåðåìåùåíèå
  step29();      // Ñäåëàòü
  step30();      // Çàäàòü
  step31();      // Çàäàòü
  step32();      // Ïåðåìåùåíèå
  step33();      // Âûäåëåíèå
  step34();      // Âûäåëåíèå
  step35();      // Âûäåëåíèå
  step36();      // Ñäåëàòü
};



cTID = function(s) { return app.charIDToTypeID(s); };
sTID = function(s) { return app.stringIDToTypeID(s); };

//
// J2.loadSymbols
//   Loading up the symbol definitions like this makes it possible
//   to include several of these generated files in one master file
//   provided a prefix is specified other than the default. It also
//   skips the definitions if PSConstants has already been loaded.
//
J2.loadSymbols = function() {
  var dbgLevel = $.level;
  $.level = 0;
  try {
    PSConstants;
    return; // only if PSConstants is defined
  } catch (e) {
  } finally {
    $.level = dbgLevel;
  }
  var needDefs = true;
  $.level = 0;
  try {
    PSClass;
    needDefs = false;
  } catch (e) {
  } finally {
    $.level = dbgLevel;
  }
  if (needDefs) {
    PSClass = function() {};
    PSEnum = function() {};
    PSEvent = function() {};
    PSForm = function() {};
    PSKey = function() {};
    PSType = function() {};
    PSUnit = function() {};
    PSString = function() {};
  }

  // We may still end up duplicating some of the following definitions
  // but at least we don't redefine PSClass, etc... and wipe out others
  PSClass.AdjustmentLayer = cTID('AdjL');
  PSClass.Channel = cTID('Chnl');
  PSClass.ColorCorrection = cTID('ClrC');
  PSClass.ColorStop = cTID('Clrt');
  PSClass.Curves = cTID('Crvs');
  PSClass.CurvesAdjustment = cTID('CrvA');
  PSClass.Gradient = cTID('Grdn');
  PSClass.GradientMap = cTID('GdMp');
  PSClass.Layer = cTID('Lyr ');
  PSClass.Point = cTID('Pnt ');
  PSClass.RGBColor = cTID('RGBC');
  PSClass.SelectiveColor = cTID('SlcC');
  PSClass.TransparencyStop = cTID('TrnS');
  PSEnum.Absolute = cTID('Absl');
  PSEnum.Backward = cTID('Bckw');
  PSEnum.Blocks = cTID('Blks');
  PSEnum.Blues = cTID('Bls ');
  PSEnum.Composite = cTID('Cmps');
  PSEnum.CustomStops = cTID('CstS');
  PSEnum.Cyans = cTID('Cyns');
  PSEnum.Exclusion = cTID('Xclu');
  PSEnum.Forward = cTID('Frwr');
  PSEnum.Front = cTID('Frnt');
  PSEnum.Greens = cTID('Grns');
  PSEnum.Magentas = cTID('Mgnt');
  PSEnum.Merged = cTID('Mrgd');
  PSEnum.Multiply = cTID('Mltp');
  PSEnum.Neutrals = cTID('Ntrl');
  PSEnum.None = cTID('None');
  PSEnum.Previous = cTID('Prvs');
  PSEnum.RGB = cTID('RGB ');
  PSEnum.Reds = cTID('Rds ');
  PSEnum.Target = cTID('Trgt');
  PSEnum.UserStop = cTID('UsrS');
  PSEnum.Whites = cTID('Whts');
  PSEnum.Yellows = cTID('Ylws');
  PSKey.Adjustment = cTID('Adjs');
  PSKey.Black = cTID('Blck');
  PSKey.Blue = cTID('Bl  ');
  PSKey.Calculation = cTID('Clcl');
  PSKey.Color = cTID('Clr ');
  PSKey.Colors = cTID('Clrs');
  PSKey.Curve = cTID('Crv ');
  PSKey.From = cTID('From');
  PSKey.Gradient = cTID('Grad');
  PSKey.Green = cTID('Grn ');
  PSKey.Horizontal = cTID('Hrzn');
  PSKey.Interpolation = cTID('Intr');
  PSKey.Location = cTID('Lctn');
  PSKey.MakeVisible = cTID('MkVs');
  PSKey.Method = cTID('Mthd');
  PSKey.Midpoint = cTID('Mdpn');
  PSKey.Mode = cTID('Md  ');
  PSKey.Name = cTID('Nm  ');
  PSKey.Opacity = cTID('Opct');
  PSKey.Red = cTID('Rd  ');
  PSKey.Start = cTID('Strt');
  PSKey.To = cTID('T   ');
  PSKey.Transparency = cTID('Trns');
  PSKey.Type = cTID('Type');
  PSKey.Using = cTID('Usng');
  PSKey.Vertical = cTID('Vrtc');
  PSKey.With = cTID('With');
  PSString.Null = sTID('null');
  PSString.addToSelection = sTID('addToSelection');
  PSString.contentLayer = sTID('contentLayer');
  PSString.layerGroup = sTID('layerSection');
  PSString.presetKind = sTID('presetKind');
  PSString.presetKindCustom = sTID('presetKindCustom');
  PSString.presetKindDefault = sTID('presetKindDefault');
  PSString.presetKindType = sTID('presetKindType');
  PSString.selection = sTID('selection');
  PSString.selectionModifier = sTID('selectionModifier');
  PSString.selectionModifierType = sTID('selectionModifierType');
  PSString.solidColorLayer = sTID('solidColorLayer');
  PSType.BlendMode = cTID('BlnM');
  PSType.Calculation = cTID('Clcn');
  PSType.ColorStopType = cTID('Clry');
  PSType.CorrectionMethod = cTID('CrcM');
  PSType.GradientForm = cTID('GrdF');
  PSType.Ordinal = cTID('Ordn');
  PSUnit.Percent = cTID('#Prc');
};

J2.loadSymbols(); // load up our symbols



//=========================================
//                    J2.main
//=========================================
//

J2.main = function () {
  J2();
};

J2.main();

// EOF

    },
};

$._ext_J3={
    run : function() {
//
// Generated Thu Aug 20 2015 16:28:44 GMT+0400
//

//
//==================== J3 ==============
//
function J3() {
  // Ñäåëàòü
  function step1(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "SelectiveColor");
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);
    desc2.putObject(PSKey.Type, PSClass.SelectiveColor, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(sTID('make'), desc1, dialogMode);
  };

  // Ïåðåìåùåíèå
  function step2(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Front);
    desc1.putReference(PSKey.To, ref2);
    executeAction(sTID('move'), desc1, dialogMode);
  };

  // Çàäàòü
  function step3(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindCustom);
    desc2.putEnumerated(PSKey.Method, PSType.CorrectionMethod, PSEnum.Absolute);
    var list1 = new ActionList();
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Reds);
    desc3.putUnitDouble(PSKey.Black, PSUnit.Percent, -100);
    list1.putObject(PSClass.ColorCorrection, desc3);
    var desc4 = new ActionDescriptor();
    desc4.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Yellows);
    desc4.putUnitDouble(PSKey.Black, PSUnit.Percent, -100);
    list1.putObject(PSClass.ColorCorrection, desc4);
    var desc5 = new ActionDescriptor();
    desc5.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Greens);
    desc5.putUnitDouble(PSKey.Black, PSUnit.Percent, -100);
    list1.putObject(PSClass.ColorCorrection, desc5);
    var desc6 = new ActionDescriptor();
    desc6.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Cyans);
    desc6.putUnitDouble(PSKey.Black, PSUnit.Percent, -100);
    list1.putObject(PSClass.ColorCorrection, desc6);
    var desc7 = new ActionDescriptor();
    desc7.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Blues);
    desc7.putUnitDouble(PSKey.Black, PSUnit.Percent, -100);
    list1.putObject(PSClass.ColorCorrection, desc7);
    var desc8 = new ActionDescriptor();
    desc8.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Magentas);
    desc8.putUnitDouble(PSKey.Black, PSUnit.Percent, -100);
    list1.putObject(PSClass.ColorCorrection, desc8);
    var desc9 = new ActionDescriptor();
    desc9.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Whites);
    desc9.putUnitDouble(PSKey.Black, PSUnit.Percent, 100);
    list1.putObject(PSClass.ColorCorrection, desc9);
    var desc10 = new ActionDescriptor();
    desc10.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Neutrals);
    desc10.putUnitDouble(PSKey.Black, PSUnit.Percent, 100);
    list1.putObject(PSClass.ColorCorrection, desc10);
    var desc11 = new ActionDescriptor();
    desc11.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Blocks);
    desc11.putUnitDouble(PSKey.Black, PSUnit.Percent, 100);
    list1.putObject(PSClass.ColorCorrection, desc11);
    desc2.putList(PSClass.ColorCorrection, list1);
    desc1.putObject(PSKey.To, PSClass.SelectiveColor, desc2);
    executeAction(sTID('set'), desc1, dialogMode);
  };

  // Ñäåëàòü
  function step4(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "ContrastForMask");
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);
    desc2.putObject(PSKey.Type, PSClass.Curves, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(sTID('make'), desc1, dialogMode);
  };

  // Çàäàòü
  function step5(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    var list1 = new ActionList();
    var desc3 = new ActionDescriptor();
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.Composite);
    desc3.putReference(PSClass.Channel, ref2);
    var list2 = new ActionList();
    var desc4 = new ActionDescriptor();
    desc4.putDouble(PSKey.Horizontal, 0);
    desc4.putDouble(PSKey.Vertical, 0);
    list2.putObject(PSClass.Point, desc4);
    var desc5 = new ActionDescriptor();
    desc5.putDouble(PSKey.Horizontal, 128);
    desc5.putDouble(PSKey.Vertical, 255);
    list2.putObject(PSClass.Point, desc5);
    desc3.putList(PSKey.Curve, list2);
    list1.putObject(PSClass.CurvesAdjustment, desc3);
    desc2.putList(PSKey.Adjustment, list1);
    desc1.putObject(PSKey.To, PSClass.Curves, desc2);
    executeAction(sTID('set'), desc1, dialogMode);
  };

  // Ñäåëàòü
  function step6(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.Layer);
    desc1.putReference(PSString.Null, ref1);
    executeAction(sTID('make'), desc1, dialogMode);
  };

  // Çàäàòü
  function step7(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Merged");
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(sTID('set'), desc1, dialogMode);
  };

  // Âíåøíèé êàíàë
  function step8(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Merged);
    desc2.putReference(PSKey.To, ref1);
    desc2.putEnumerated(PSKey.Calculation, PSType.Calculation, PSEnum.Multiply);
    desc1.putObject(PSKey.With, PSKey.Calculation, desc2);
    executeAction(sTID('applyImageEvent'), desc1, dialogMode);
  };

  // Âûäåëåíèå
  function step9(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Backward);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelection);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(sTID('select'), desc1, dialogMode);
  };

  // Âûäåëåíèå
  function step10(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Backward);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelection);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(sTID('select'), desc1, dialogMode);
  };

  // Ñäåëàòü
  function step11(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSString.layerGroup);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSKey.From, ref2);
    executeAction(sTID('make'), desc1, dialogMode);
  };

  // Çàäàòü
  function step12(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Saturation Mask");
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(sTID('set'), desc1, dialogMode);
  };

  // Çàäàòü
  function step13(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSKey.To, ref2);
    executeAction(sTID('set'), desc1, dialogMode);
  };

  // Ñîçäàòü äóáëèêàò
  function step14(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    desc1.putString(PSKey.Name, "SaturnMask");
    executeAction(sTID('duplicate'), desc1, dialogMode);
  };

  // Óäàëèòü
  function step15(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    executeAction(sTID('delete'), desc1, dialogMode);
  };

  // Çàäàòü
  function step16(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSKey.To, PSType.Ordinal, PSEnum.None);
    executeAction(sTID('set'), desc1, dialogMode);
  };

  // Âûäåëåíèå
  function step17(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    executeAction(sTID('select'), desc1, dialogMode);
  };

  // Çàäàòü
  function step18(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putName(PSClass.Channel, "SaturnMask");
    desc1.putReference(PSKey.To, ref2);
    executeAction(sTID('set'), desc1, dialogMode);
  };

  // Ñäåëàòü
  function step19(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Desaturate heavily saturated");
    desc2.putClass(PSKey.Type, sTID("vibrance"));
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(sTID('make'), desc1, dialogMode);
  };

  // Çàäàòü
  function step20(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 50);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(sTID('set'), desc1, dialogMode);
  };

  // Çàäàòü
  function step21(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putInteger(PSKey.Start, -50);
    desc1.putObject(PSKey.To, sTID("vibrance"), desc2);
    executeAction(sTID('set'), desc1, dialogMode);
  };

  // Óäàëèòü
  function step22(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Channel, "SaturnMask");
    desc1.putReference(PSString.Null, ref1);
    executeAction(sTID('delete'), desc1, dialogMode);
  };

  // Çàäàòü
  function step23(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Desaturate heavily saturated C3");
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(sTID('set'), desc1, dialogMode);
  };

  // Çàäàòü
  function step24(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSKey.To, ref2);
    executeAction(sTID('set'), desc1, dialogMode);
  };

  // Ñäåëàòü
  function step25(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "C3 Lights");
    var desc3 = new ActionDescriptor();
    var list1 = new ActionList();
    list1.putInteger(0);
    list1.putInteger(sTID("skinTone"), 0);
    list1.putInteger(sTID("contentAware"), 0);
    desc3.putList(PSKey.ShadowLevels, list1);
    var list2 = new ActionList();
    list2.putInteger(0);
    list2.putInteger(sTID("skinTone"), 0);
    list2.putInteger(sTID("contentAware"), 0);
    desc3.putList(PSKey.MidtoneLevels, list2);
    var list3 = new ActionList();
    list3.putInteger(0);
    list3.putInteger(sTID("skinTone"), 0);
    list3.putInteger(sTID("contentAware"), 0);
    desc3.putList(PSKey.HighlightLevels, list3);
    desc3.putBoolean(PSKey.PreserveLuminosity, true);
    desc2.putObject(PSKey.Type, PSClass.ColorBalance, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(sTID('make'), desc1, dialogMode);
  };

  // Çàäàòü
  function step26(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    var list1 = new ActionList();
    list1.putInteger(15);
    list1.putInteger(sTID("skinTone"), 0);
    list1.putInteger(sTID("contentAware"), -30);
    desc2.putList(PSKey.MidtoneLevels, list1);
    var list2 = new ActionList();
    list2.putInteger(10);
    list2.putInteger(sTID("skinTone"), 0);
    list2.putInteger(sTID("contentAware"), -25);
    desc2.putList(PSKey.HighlightLevels, list2);
    desc1.putObject(PSKey.To, PSClass.ColorBalance, desc2);
    executeAction(sTID('set'), desc1, dialogMode);
  };

  // Çàäàòü
  function step27(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSKey.To, PSType.Ordinal, PSEnum.All);
    executeAction(sTID('set'), desc1, dialogMode);
  };

  // Âû÷èòàíèå
  function step28(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSKey.From, ref2);
    executeAction(sTID('subtract'), desc1, dialogMode);
  };

  // Ñäåëàòü
  function step29(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "C3 Shadows");
    var desc3 = new ActionDescriptor();
    var list1 = new ActionList();
    list1.putInteger(0);
    list1.putInteger(sTID("skinTone"), 0);
    list1.putInteger(sTID("contentAware"), 0);
    desc3.putList(PSKey.ShadowLevels, list1);
    var list2 = new ActionList();
    list2.putInteger(0);
    list2.putInteger(sTID("skinTone"), 0);
    list2.putInteger(sTID("contentAware"), 0);
    desc3.putList(PSKey.MidtoneLevels, list2);
    var list3 = new ActionList();
    list3.putInteger(0);
    list3.putInteger(sTID("skinTone"), 0);
    list3.putInteger(sTID("contentAware"), 0);
    desc3.putList(PSKey.HighlightLevels, list3);
    desc3.putBoolean(PSKey.PreserveLuminosity, true);
    desc2.putObject(PSKey.Type, PSClass.ColorBalance, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(sTID('make'), desc1, dialogMode);
  };

  // Çàäàòü
  function step30(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    var list1 = new ActionList();
    list1.putInteger(-10);
    list1.putInteger(sTID("skinTone"), 7);
    list1.putInteger(sTID("contentAware"), 15);
    desc2.putList(PSKey.ShadowLevels, list1);
    var list2 = new ActionList();
    list2.putInteger(15);
    list2.putInteger(sTID("skinTone"), 10);
    list2.putInteger(sTID("contentAware"), 30);
    desc2.putList(PSKey.MidtoneLevels, list2);
    desc1.putObject(PSKey.To, PSClass.ColorBalance, desc2);
    executeAction(sTID('set'), desc1, dialogMode);
  };

  // Ïåðåìåùåíèå
  function step31(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Previous);
    desc1.putReference(PSKey.To, ref2);
    executeAction(sTID('move'), desc1, dialogMode);
  };

  // Ñäåëàòü
  function step32(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSString.contentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Desaturation C3");
    var desc3 = new ActionDescriptor();
    var desc4 = new ActionDescriptor();
    desc4.putDouble(PSKey.Red, 127.501945495605);
    desc4.putDouble(PSKey.Green, 127.501945495605);
    desc4.putDouble(PSKey.Blue, 127.501945495605);
    desc3.putObject(PSKey.Color, PSClass.RGBColor, desc4);
    desc2.putObject(PSKey.Type, PSString.solidColorLayer, desc3);
    desc1.putObject(PSKey.Using, PSString.contentLayer, desc2);
    executeAction(sTID('make'), desc1, dialogMode);
  };

  // Çàäàòü
  function step33(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSKey.Color);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(sTID('set'), desc1, dialogMode);
  };

  // Çàäàòü
  function step34(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 15);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(sTID('set'), desc1, dialogMode);
  };

  // Ïåðåìåùåíèå
  function step35(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Previous);
    desc1.putReference(PSKey.To, ref2);
    executeAction(sTID('move'), desc1, dialogMode);
  };

  // Âûäåëåíèå
  function step36(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Forward);
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(sTID('select'), desc1, dialogMode);
  };

  // Âûäåëåíèå
  function step37(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Forward);
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(sTID('select'), desc1, dialogMode);
  };

  // Âûäåëåíèå
  function step38(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Backward);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelection);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(sTID('select'), desc1, dialogMode);
  };

  // Âûäåëåíèå
  function step39(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Backward);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelection);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(sTID('select'), desc1, dialogMode);
  };

  // Âûäåëåíèå
  function step40(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Backward);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelection);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(sTID('select'), desc1, dialogMode);
  };

  // Ñäåëàòü
  function step41(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSString.layerGroup);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSKey.From, ref2);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "J3");
    desc1.putObject(PSKey.Using, PSString.layerGroup, desc2);
    executeAction(sTID('make'), desc1, dialogMode);
  };

  step1();      // Ñäåëàòü
  step2();      // Ïåðåìåùåíèå
  step3();      // Çàäàòü
  step4();      // Ñäåëàòü
  step5();      // Çàäàòü
  step6();      // Ñäåëàòü
  step7();      // Çàäàòü
  step8();      // Âíåøíèé êàíàë
  step9();      // Âûäåëåíèå
  step10();      // Âûäåëåíèå
  step11();      // Ñäåëàòü
  step12();      // Çàäàòü
  step13();      // Çàäàòü
  step14();      // Ñîçäàòü äóáëèêàò
  step15();      // Óäàëèòü
  step16();      // Çàäàòü
  step17();      // Âûäåëåíèå
  step18();      // Çàäàòü
  step19();      // Ñäåëàòü
  step20();      // Çàäàòü
  step21();      // Çàäàòü
  step22();      // Óäàëèòü
  step23();      // Çàäàòü
  step24();      // Çàäàòü
  step25();      // Ñäåëàòü
  step26();      // Çàäàòü
  step27();      // Çàäàòü
  step28();      // Âû÷èòàíèå
  step29();      // Ñäåëàòü
  step30();      // Çàäàòü
  step31();      // Ïåðåìåùåíèå
  step32();      // Ñäåëàòü
  step33();      // Çàäàòü
  step34();      // Çàäàòü
  step35();      // Ïåðåìåùåíèå
  step36();      // Âûäåëåíèå
  step37();      // Âûäåëåíèå
  step38();      // Âûäåëåíèå
  step39();      // Âûäåëåíèå
  step40();      // Âûäåëåíèå
  step41();      // Ñäåëàòü
};



cTID = function(s) { return app.charIDToTypeID(s); };
sTID = function(s) { return app.stringIDToTypeID(s); };

//
// J3.loadSymbols
//   Loading up the symbol definitions like this makes it possible
//   to include several of these generated files in one master file
//   provided a prefix is specified other than the default. It also
//   skips the definitions if PSConstants has already been loaded.
//
J3.loadSymbols = function() {
  var dbgLevel = $.level;
  $.level = 0;
  try {
    PSConstants;
    return; // only if PSConstants is defined
  } catch (e) {
  } finally {
    $.level = dbgLevel;
  }
  var needDefs = true;
  $.level = 0;
  try {
    PSClass;
    needDefs = false;
  } catch (e) {
  } finally {
    $.level = dbgLevel;
  }
  if (needDefs) {
    PSClass = function() {};
    PSEnum = function() {};
    PSEvent = function() {};
    PSForm = function() {};
    PSKey = function() {};
    PSType = function() {};
    PSUnit = function() {};
    PSString = function() {};
  }

  // We may still end up duplicating some of the following definitions
  // but at least we don't redefine PSClass, etc... and wipe out others
  PSClass.AdjustmentLayer = cTID('AdjL');
  PSClass.Channel = cTID('Chnl');
  PSClass.ColorBalance = cTID('ClrB');
  PSClass.ColorCorrection = cTID('ClrC');
  PSClass.ColorStop = cTID('Clrt');
  PSClass.Curves = cTID('Crvs');
  PSClass.CurvesAdjustment = cTID('CrvA');
  PSClass.Gradient = cTID('Grdn');
  PSClass.GradientMap = cTID('GdMp');
  PSClass.Layer = cTID('Lyr ');
  PSClass.Point = cTID('Pnt ');
  PSClass.RGBColor = cTID('RGBC');
  PSClass.SelectiveColor = cTID('SlcC');
  PSClass.TransparencyStop = cTID('TrnS');
  PSEnum.Absolute = cTID('Absl');
  PSEnum.All = cTID('Al  ');
  PSEnum.Backward = cTID('Bckw');
  PSEnum.Blocks = cTID('Blks');
  PSEnum.Blues = cTID('Bls ');
  PSEnum.Composite = cTID('Cmps');
  PSEnum.CustomStops = cTID('CstS');
  PSEnum.Cyans = cTID('Cyns');
  PSEnum.Exclusion = cTID('Xclu');
  PSEnum.Forward = cTID('Frwr');
  PSEnum.Front = cTID('Frnt');
  PSEnum.Greens = cTID('Grns');
  PSEnum.Magentas = cTID('Mgnt');
  PSEnum.Merged = cTID('Mrgd');
  PSEnum.Multiply = cTID('Mltp');
  PSEnum.Neutrals = cTID('Ntrl');
  PSEnum.None = cTID('None');
  PSEnum.Previous = cTID('Prvs');
  PSEnum.RGB = cTID('RGB ');
  PSEnum.Reds = cTID('Rds ');
  PSEnum.Target = cTID('Trgt');
  PSEnum.UserStop = cTID('UsrS');
  PSEnum.Whites = cTID('Whts');
  PSEnum.Yellows = cTID('Ylws');
  PSKey.Adjustment = cTID('Adjs');
  PSKey.Black = cTID('Blck');
  PSKey.Blue = cTID('Bl  ');
  PSKey.Calculation = cTID('Clcl');
  PSKey.Color = cTID('Clr ');
  PSKey.Colors = cTID('Clrs');
  PSKey.Curve = cTID('Crv ');
  PSKey.From = cTID('From');
  PSKey.Gradient = cTID('Grad');
  PSKey.Green = cTID('Grn ');
  PSKey.HighlightLevels = cTID('HghL');
  PSKey.Horizontal = cTID('Hrzn');
  PSKey.Interpolation = cTID('Intr');
  PSKey.Location = cTID('Lctn');
  PSKey.MakeVisible = cTID('MkVs');
  PSKey.Method = cTID('Mthd');
  PSKey.Midpoint = cTID('Mdpn');
  PSKey.MidtoneLevels = cTID('MdtL');
  PSKey.Mode = cTID('Md  ');
  PSKey.Name = cTID('Nm  ');
  PSKey.Opacity = cTID('Opct');
  PSKey.PreserveLuminosity = cTID('PrsL');
  PSKey.Red = cTID('Rd  ');
  PSKey.ShadowLevels = cTID('ShdL');
  PSKey.Start = cTID('Strt');
  PSKey.To = cTID('T   ');
  PSKey.Transparency = cTID('Trns');
  PSKey.Type = cTID('Type');
  PSKey.Using = cTID('Usng');
  PSKey.Vertical = cTID('Vrtc');
  PSKey.With = cTID('With');
  PSString.Null = sTID('null');
  PSString.addToSelection = sTID('addToSelection');
  PSString.contentLayer = sTID('contentLayer');
  PSString.layerGroup = sTID('layerSection');
  PSString.presetKind = sTID('presetKind');
  PSString.presetKindCustom = sTID('presetKindCustom');
  PSString.presetKindDefault = sTID('presetKindDefault');
  PSString.presetKindType = sTID('presetKindType');
  PSString.selection = sTID('selection');
  PSString.selectionModifier = sTID('selectionModifier');
  PSString.selectionModifierType = sTID('selectionModifierType');
  PSString.solidColorLayer = sTID('solidColorLayer');
  PSType.BlendMode = cTID('BlnM');
  PSType.Calculation = cTID('Clcn');
  PSType.ColorStopType = cTID('Clry');
  PSType.CorrectionMethod = cTID('CrcM');
  PSType.GradientForm = cTID('GrdF');
  PSType.Ordinal = cTID('Ordn');
  PSUnit.Percent = cTID('#Prc');
};

J3.loadSymbols(); // load up our symbols



//=========================================
//                    J3.main
//=========================================
//

J3.main = function () {
  J3();
};

J3.main();

// EOF

    },
};

$._ext_S1={
    run : function() {
//
// Generated Thu Aug 20 2015 16:05:15 GMT+0400
//

//
//==================== S1 ==============
//
function S1() {
  // Make
  function step1(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "SelectiveColor");
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);
    desc2.putObject(PSKey.Type, PSClass.SelectiveColor, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Move
  function step2(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Front);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Set
  function step3(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindCustom);
    desc2.putEnumerated(PSKey.Method, PSType.CorrectionMethod, PSEnum.Absolute);
    var list1 = new ActionList();
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Reds);
    desc3.putUnitDouble(PSKey.Black, PSUnit.Percent, -100);
    list1.putObject(PSClass.ColorCorrection, desc3);
    var desc4 = new ActionDescriptor();
    desc4.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Yellows);
    desc4.putUnitDouble(PSKey.Black, PSUnit.Percent, -100);
    list1.putObject(PSClass.ColorCorrection, desc4);
    var desc5 = new ActionDescriptor();
    desc5.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Greens);
    desc5.putUnitDouble(PSKey.Black, PSUnit.Percent, -100);
    list1.putObject(PSClass.ColorCorrection, desc5);
    var desc6 = new ActionDescriptor();
    desc6.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Cyans);
    desc6.putUnitDouble(PSKey.Black, PSUnit.Percent, -100);
    list1.putObject(PSClass.ColorCorrection, desc6);
    var desc7 = new ActionDescriptor();
    desc7.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Blues);
    desc7.putUnitDouble(PSKey.Black, PSUnit.Percent, -100);
    list1.putObject(PSClass.ColorCorrection, desc7);
    var desc8 = new ActionDescriptor();
    desc8.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Magentas);
    desc8.putUnitDouble(PSKey.Black, PSUnit.Percent, -100);
    list1.putObject(PSClass.ColorCorrection, desc8);
    var desc9 = new ActionDescriptor();
    desc9.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Whites);
    desc9.putUnitDouble(PSKey.Black, PSUnit.Percent, 100);
    list1.putObject(PSClass.ColorCorrection, desc9);
    var desc10 = new ActionDescriptor();
    desc10.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Neutrals);
    desc10.putUnitDouble(PSKey.Black, PSUnit.Percent, 100);
    list1.putObject(PSClass.ColorCorrection, desc10);
    var desc11 = new ActionDescriptor();
    desc11.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Blocks);
    desc11.putUnitDouble(PSKey.Black, PSUnit.Percent, 100);
    list1.putObject(PSClass.ColorCorrection, desc11);
    desc2.putList(PSClass.ColorCorrection, list1);
    desc1.putObject(PSKey.To, PSClass.SelectiveColor, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step4(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "ContrastForMask");
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);
    desc2.putObject(PSKey.Type, PSClass.Curves, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step5(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    var list1 = new ActionList();
    var desc3 = new ActionDescriptor();
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.Composite);
    desc3.putReference(PSClass.Channel, ref2);
    var list2 = new ActionList();
    var desc4 = new ActionDescriptor();
    desc4.putDouble(PSKey.Horizontal, 0);
    desc4.putDouble(PSKey.Vertical, 0);
    list2.putObject(PSClass.Point, desc4);
    var desc5 = new ActionDescriptor();
    desc5.putDouble(PSKey.Horizontal, 128);
    desc5.putDouble(PSKey.Vertical, 255);
    list2.putObject(PSClass.Point, desc5);
    desc3.putList(PSKey.Curve, list2);
    list1.putObject(PSClass.CurvesAdjustment, desc3);
    desc2.putList(PSKey.Adjustment, list1);
    desc1.putObject(PSKey.To, PSClass.Curves, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step6(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.Layer);
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step7(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Merged");
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Apply Image
  function step8(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Merged);
    desc2.putReference(PSKey.To, ref1);
    desc2.putEnumerated(PSKey.Calculation, PSType.Calculation, PSEnum.Multiply);
    desc1.putObject(PSKey.With, PSKey.Calculation, desc2);
    executeAction(sTID('applyImageEvent'), desc1, dialogMode);
  };

  // Select
  function step9(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Backward);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelection);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Select
  function step10(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Backward);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelection);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step11(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSString.layerGroup);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSKey.From, ref2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step12(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Saturation Mask");
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step13(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Duplicate
  function step14(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    desc1.putString(PSKey.Name, "SaturnMask");
    executeAction(PSEvent.Duplicate, desc1, dialogMode);
  };

  // Delete
  function step15(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Delete, desc1, dialogMode);
  };

  // Set
  function step16(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSKey.To, PSType.Ordinal, PSEnum.None);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step17(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Set
  function step18(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putName(PSClass.Channel, "SaturnMask");
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step19(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Desaturate heavily saturated");
    desc2.putClass(PSKey.Type, sTID("vibrance"));
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step20(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 50);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step21(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putInteger(PSKey.Start, -50);
    desc1.putObject(PSKey.To, sTID("vibrance"), desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Delete
  function step22(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Channel, "SaturnMask");
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Delete, desc1, dialogMode);
  };

  // Set
  function step23(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Desaturate heavily saturated A1");
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step24(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSString.contentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    var desc3 = new ActionDescriptor();
    var desc4 = new ActionDescriptor();
    desc4.putDouble(PSKey.Red, 51.0031127929688);
    desc4.putDouble(PSKey.Green, 25.9996032714844);
    desc4.putDouble(PSKey.Blue, 11.9998168945313);
    desc3.putObject(PSKey.Color, PSClass.RGBColor, desc4);
    desc2.putObject(PSKey.Type, PSString.solidColorLayer, desc3);
    desc1.putObject(PSKey.Using, PSString.contentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step25(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSEnum.Exclusion);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step26(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 20);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Move
  function step27(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Front);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Set
  function step28(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Exclusion grading A1");
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step29(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSString.contentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Desaturation A1");
    var desc3 = new ActionDescriptor();
    var desc4 = new ActionDescriptor();
    desc4.putDouble(PSKey.Red, 127.501945495605);
    desc4.putDouble(PSKey.Green, 127.501945495605);
    desc4.putDouble(PSKey.Blue, 127.501945495605);
    desc3.putObject(PSKey.Color, PSClass.RGBColor, desc4);
    desc2.putObject(PSKey.Type, PSString.solidColorLayer, desc3);
    desc1.putObject(PSKey.Using, PSString.contentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step30(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSKey.Color);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step31(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 15);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Move
  function step32(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Previous);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Select
  function step33(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Forward);
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Select
  function step34(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Backward);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelection);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Select
  function step35(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Backward);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelection);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step36(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSString.layerGroup);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSKey.From, ref2);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "S1");
    desc1.putObject(PSKey.Using, PSString.layerGroup, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  step1();      // Make
  step2();      // Move
  step3();      // Set
  step4();      // Make
  step5();      // Set
  step6();      // Make
  step7();      // Set
  step8();      // Apply Image
  step9();      // Select
  step10();      // Select
  step11();      // Make
  step12();      // Set
  step13();      // Set
  step14();      // Duplicate
  step15();      // Delete
  step16();      // Set
  step17();      // Select
  step18();      // Set
  step19();      // Make
  step20();      // Set
  step21();      // Set
  step22();      // Delete
  step23();      // Set
  step24();      // Make
  step25();      // Set
  step26();      // Set
  step27();      // Move
  step28();      // Set
  step29();      // Make
  step30();      // Set
  step31();      // Set
  step32();      // Move
  step33();      // Select
  step34();      // Select
  step35();      // Select
  step36();      // Make
};



cTID = function(s) { return app.charIDToTypeID(s); };
sTID = function(s) { return app.stringIDToTypeID(s); };

//
// S1.loadSymbols
//   Loading up the symbol definitions like this makes it possible
//   to include several of these generated files in one master file
//   provided a prefix is specified other than the default. It also
//   skips the definitions if PSConstants has already been loaded.
//
S1.loadSymbols = function() {
  var dbgLevel = $.level;
  $.level = 0;
  try {
    PSConstants;
    return; // only if PSConstants is defined
  } catch (e) {
  } finally {
    $.level = dbgLevel;
  }
  var needDefs = true;
  $.level = 0;
  try {
    PSClass;
    needDefs = false;
  } catch (e) {
  } finally {
    $.level = dbgLevel;
  }
  if (needDefs) {
    PSClass = function() {};
    PSEnum = function() {};
    PSEvent = function() {};
    PSForm = function() {};
    PSKey = function() {};
    PSType = function() {};
    PSUnit = function() {};
    PSString = function() {};
  }

  // We may still end up duplicating some of the following definitions
  // but at least we don't redefine PSClass, etc... and wipe out others
  PSClass.AdjustmentLayer = cTID('AdjL');
  PSClass.Channel = cTID('Chnl');
  PSClass.ColorBalance = cTID('ClrB');
  PSClass.ColorCorrection = cTID('ClrC');
  PSClass.ColorStop = cTID('Clrt');
  PSClass.Curves = cTID('Crvs');
  PSClass.CurvesAdjustment = cTID('CrvA');
  PSClass.Gradient = cTID('Grdn');
  PSClass.GradientMap = cTID('GdMp');
  PSClass.Layer = cTID('Lyr ');
  PSClass.Point = cTID('Pnt ');
  PSClass.RGBColor = cTID('RGBC');
  PSClass.SelectiveColor = cTID('SlcC');
  PSClass.TransparencyStop = cTID('TrnS');
  PSEnum.Absolute = cTID('Absl');
  PSEnum.All = cTID('Al  ');
  PSEnum.Backward = cTID('Bckw');
  PSEnum.Blocks = cTID('Blks');
  PSEnum.Blues = cTID('Bls ');
  PSEnum.Composite = cTID('Cmps');
  PSEnum.CustomStops = cTID('CstS');
  PSEnum.Cyans = cTID('Cyns');
  PSEnum.Exclusion = cTID('Xclu');
  PSEnum.Forward = cTID('Frwr');
  PSEnum.Front = cTID('Frnt');
  PSEnum.Greens = cTID('Grns');
  PSEnum.Magentas = cTID('Mgnt');
  PSEnum.Merged = cTID('Mrgd');
  PSEnum.Multiply = cTID('Mltp');
  PSEnum.Neutrals = cTID('Ntrl');
  PSEnum.None = cTID('None');
  PSEnum.Previous = cTID('Prvs');
  PSEnum.RGB = cTID('RGB ');
  PSEnum.Reds = cTID('Rds ');
  PSEnum.Target = cTID('Trgt');
  PSEnum.UserStop = cTID('UsrS');
  PSEnum.Whites = cTID('Whts');
  PSEnum.Yellows = cTID('Ylws');
  PSEvent.Delete = cTID('Dlt ');
  PSEvent.Duplicate = cTID('Dplc');
  PSEvent.Make = cTID('Mk  ');
  PSEvent.Move = cTID('move');
  PSEvent.Select = cTID('slct');
  PSEvent.Set = cTID('setd');
  PSEvent.Subtract = cTID('Sbtr');
  PSKey.Adjustment = cTID('Adjs');
  PSKey.Black = cTID('Blck');
  PSKey.Blue = cTID('Bl  ');
  PSKey.Calculation = cTID('Clcl');
  PSKey.Color = cTID('Clr ');
  PSKey.Colors = cTID('Clrs');
  PSKey.Curve = cTID('Crv ');
  PSKey.From = cTID('From');
  PSKey.Gradient = cTID('Grad');
  PSKey.Green = cTID('Grn ');
  PSKey.HighlightLevels = cTID('HghL');
  PSKey.Horizontal = cTID('Hrzn');
  PSKey.Interpolation = cTID('Intr');
  PSKey.Location = cTID('Lctn');
  PSKey.MakeVisible = cTID('MkVs');
  PSKey.Method = cTID('Mthd');
  PSKey.Midpoint = cTID('Mdpn');
  PSKey.MidtoneLevels = cTID('MdtL');
  PSKey.Mode = cTID('Md  ');
  PSKey.Name = cTID('Nm  ');
  PSKey.Opacity = cTID('Opct');
  PSKey.PreserveLuminosity = cTID('PrsL');
  PSKey.Red = cTID('Rd  ');
  PSKey.ShadowLevels = cTID('ShdL');
  PSKey.Start = cTID('Strt');
  PSKey.To = cTID('T   ');
  PSKey.Transparency = cTID('Trns');
  PSKey.Type = cTID('Type');
  PSKey.Using = cTID('Usng');
  PSKey.Vertical = cTID('Vrtc');
  PSKey.With = cTID('With');
  PSString.Null = sTID('null');
  PSString.addToSelection = sTID('addToSelection');
  PSString.contentLayer = sTID('contentLayer');
  PSString.layerGroup = sTID('layerSection');
  PSString.presetKind = sTID('presetKind');
  PSString.presetKindCustom = sTID('presetKindCustom');
  PSString.presetKindDefault = sTID('presetKindDefault');
  PSString.presetKindType = sTID('presetKindType');
  PSString.selection = sTID('selection');
  PSString.selectionModifier = sTID('selectionModifier');
  PSString.selectionModifierType = sTID('selectionModifierType');
  PSString.solidColorLayer = sTID('solidColorLayer');
  PSType.BlendMode = cTID('BlnM');
  PSType.Calculation = cTID('Clcn');
  PSType.ColorStopType = cTID('Clry');
  PSType.CorrectionMethod = cTID('CrcM');
  PSType.GradientForm = cTID('GrdF');
  PSType.Ordinal = cTID('Ordn');
  PSUnit.Percent = cTID('#Prc');
};

S1.loadSymbols(); // load up our symbols



//=========================================
//                    S1.main
//=========================================
//

S1.main = function () {
  S1();
};

S1.main();

// EOF

    },
};

$._ext_S2={
    run : function() {
//
// Generated Thu Aug 20 2015 16:05:15 GMT+0400
//

//
//==================== S2 ==============
//
function S2() {
  // Make
  function step1(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "SelectiveColor");
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);
    desc2.putObject(PSKey.Type, PSClass.SelectiveColor, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Move
  function step2(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Front);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Set
  function step3(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindCustom);
    desc2.putEnumerated(PSKey.Method, PSType.CorrectionMethod, PSEnum.Absolute);
    var list1 = new ActionList();
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Reds);
    desc3.putUnitDouble(PSKey.Black, PSUnit.Percent, -100);
    list1.putObject(PSClass.ColorCorrection, desc3);
    var desc4 = new ActionDescriptor();
    desc4.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Yellows);
    desc4.putUnitDouble(PSKey.Black, PSUnit.Percent, -100);
    list1.putObject(PSClass.ColorCorrection, desc4);
    var desc5 = new ActionDescriptor();
    desc5.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Greens);
    desc5.putUnitDouble(PSKey.Black, PSUnit.Percent, -100);
    list1.putObject(PSClass.ColorCorrection, desc5);
    var desc6 = new ActionDescriptor();
    desc6.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Cyans);
    desc6.putUnitDouble(PSKey.Black, PSUnit.Percent, -100);
    list1.putObject(PSClass.ColorCorrection, desc6);
    var desc7 = new ActionDescriptor();
    desc7.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Blues);
    desc7.putUnitDouble(PSKey.Black, PSUnit.Percent, -100);
    list1.putObject(PSClass.ColorCorrection, desc7);
    var desc8 = new ActionDescriptor();
    desc8.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Magentas);
    desc8.putUnitDouble(PSKey.Black, PSUnit.Percent, -100);
    list1.putObject(PSClass.ColorCorrection, desc8);
    var desc9 = new ActionDescriptor();
    desc9.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Whites);
    desc9.putUnitDouble(PSKey.Black, PSUnit.Percent, 100);
    list1.putObject(PSClass.ColorCorrection, desc9);
    var desc10 = new ActionDescriptor();
    desc10.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Neutrals);
    desc10.putUnitDouble(PSKey.Black, PSUnit.Percent, 100);
    list1.putObject(PSClass.ColorCorrection, desc10);
    var desc11 = new ActionDescriptor();
    desc11.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Blocks);
    desc11.putUnitDouble(PSKey.Black, PSUnit.Percent, 100);
    list1.putObject(PSClass.ColorCorrection, desc11);
    desc2.putList(PSClass.ColorCorrection, list1);
    desc1.putObject(PSKey.To, PSClass.SelectiveColor, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step4(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "ContrastForMask");
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);
    desc2.putObject(PSKey.Type, PSClass.Curves, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step5(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    var list1 = new ActionList();
    var desc3 = new ActionDescriptor();
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.Composite);
    desc3.putReference(PSClass.Channel, ref2);
    var list2 = new ActionList();
    var desc4 = new ActionDescriptor();
    desc4.putDouble(PSKey.Horizontal, 0);
    desc4.putDouble(PSKey.Vertical, 0);
    list2.putObject(PSClass.Point, desc4);
    var desc5 = new ActionDescriptor();
    desc5.putDouble(PSKey.Horizontal, 128);
    desc5.putDouble(PSKey.Vertical, 255);
    list2.putObject(PSClass.Point, desc5);
    desc3.putList(PSKey.Curve, list2);
    list1.putObject(PSClass.CurvesAdjustment, desc3);
    desc2.putList(PSKey.Adjustment, list1);
    desc1.putObject(PSKey.To, PSClass.Curves, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step6(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.Layer);
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step7(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Merged");
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Apply Image
  function step8(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Merged);
    desc2.putReference(PSKey.To, ref1);
    desc2.putEnumerated(PSKey.Calculation, PSType.Calculation, PSEnum.Multiply);
    desc1.putObject(PSKey.With, PSKey.Calculation, desc2);
    executeAction(sTID('applyImageEvent'), desc1, dialogMode);
  };

  // Select
  function step9(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Backward);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelection);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Select
  function step10(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Backward);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelection);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step11(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSString.layerGroup);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSKey.From, ref2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step12(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Saturation Mask");
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step13(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Duplicate
  function step14(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    desc1.putString(PSKey.Name, "SaturnMask");
    executeAction(PSEvent.Duplicate, desc1, dialogMode);
  };

  // Delete
  function step15(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Delete, desc1, dialogMode);
  };

  // Set
  function step16(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSKey.To, PSType.Ordinal, PSEnum.None);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step17(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Set
  function step18(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putName(PSClass.Channel, "SaturnMask");
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step19(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Desaturate heavily saturated");
    desc2.putClass(PSKey.Type, sTID("vibrance"));
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step20(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 50);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step21(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putInteger(PSKey.Start, -50);
    desc1.putObject(PSKey.To, sTID("vibrance"), desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Delete
  function step22(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Channel, "SaturnMask");
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Delete, desc1, dialogMode);
  };

  // Set
  function step23(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Desaturate heavily saturated A2");
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step24(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Grading A2");
    var desc3 = new ActionDescriptor();
    var desc4 = new ActionDescriptor();
    desc4.putString(PSKey.Name, "Foreground to Background");
    desc4.putEnumerated(PSType.GradientForm, PSType.GradientForm, PSEnum.CustomStops);
    desc4.putDouble(PSKey.Interpolation, 4096);
    var list1 = new ActionList();
    var desc5 = new ActionDescriptor();
    var desc6 = new ActionDescriptor();
    desc6.putDouble(PSKey.Red, 177.000004649162);
    desc6.putDouble(PSKey.Green, 187.9961130023);
    desc6.putDouble(PSKey.Blue, 187.9961130023);
    desc5.putObject(PSKey.Color, PSClass.RGBColor, desc6);
    desc5.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc5.putInteger(PSKey.Location, 0);
    desc5.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc5);
    var desc7 = new ActionDescriptor();
    var desc8 = new ActionDescriptor();
    desc8.putDouble(PSKey.Red, 0);
    desc8.putDouble(PSKey.Green, 0);
    desc8.putDouble(PSKey.Blue, 0);
    desc7.putObject(PSKey.Color, PSClass.RGBColor, desc8);
    desc7.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc7.putInteger(PSKey.Location, 4096);
    desc7.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc7);
    desc4.putList(PSKey.Colors, list1);
    var list2 = new ActionList();
    var desc9 = new ActionDescriptor();
    desc9.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 100);
    desc9.putInteger(PSKey.Location, 0);
    desc9.putInteger(PSKey.Midpoint, 50);
    list2.putObject(PSClass.TransparencyStop, desc9);
    var desc10 = new ActionDescriptor();
    desc10.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 100);
    desc10.putInteger(PSKey.Location, 4096);
    desc10.putInteger(PSKey.Midpoint, 50);
    list2.putObject(PSClass.TransparencyStop, desc10);
    desc4.putList(PSKey.Transparency, list2);
    desc3.putObject(PSKey.Gradient, PSClass.Gradient, desc4);
    desc2.putObject(PSKey.Type, PSClass.GradientMap, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Select
  function step25(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Set
  function step26(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    var desc3 = new ActionDescriptor();
    desc3.putString(PSKey.Name, "Custom");
    desc3.putEnumerated(PSType.GradientForm, PSType.GradientForm, PSEnum.CustomStops);
    desc3.putDouble(PSKey.Interpolation, 4096);
    var list1 = new ActionList();
    var desc4 = new ActionDescriptor();
    var desc5 = new ActionDescriptor();
    desc5.putDouble(PSKey.Red, 63.7509727478027);
    desc5.putDouble(PSKey.Green, 29.7509728744626);
    desc5.putDouble(PSKey.Blue, 12.7509729377925);
    desc4.putObject(PSKey.Color, PSClass.RGBColor, desc5);
    desc4.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc4.putInteger(PSKey.Location, 0);
    desc4.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc4);
    var desc6 = new ActionDescriptor();
    var desc7 = new ActionDescriptor();
    desc7.putDouble(PSKey.Red, 121.587547659874);
    desc7.putDouble(PSKey.Green, 187.229572534561);
    desc7.putDouble(PSKey.Blue, 195.000003576279);
    desc6.putObject(PSKey.Color, PSClass.RGBColor, desc7);
    desc6.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc6.putInteger(PSKey.Location, 3352);
    desc6.putInteger(PSKey.Midpoint, 66);
    list1.putObject(PSClass.ColorStop, desc6);
    var desc8 = new ActionDescriptor();
    var desc9 = new ActionDescriptor();
    desc9.putDouble(PSKey.Red, 127.988319396973);
    desc9.putDouble(PSKey.Green, 239.778214395046);
    desc9.putDouble(PSKey.Blue, 253.000000119209);
    desc8.putObject(PSKey.Color, PSClass.RGBColor, desc9);
    desc8.putEnumerated(PSKey.Type, PSType.ColorStopType, PSEnum.UserStop);
    desc8.putInteger(PSKey.Location, 4096);
    desc8.putInteger(PSKey.Midpoint, 50);
    list1.putObject(PSClass.ColorStop, desc8);
    desc3.putList(PSKey.Colors, list1);
    var list2 = new ActionList();
    var desc10 = new ActionDescriptor();
    desc10.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 100);
    desc10.putInteger(PSKey.Location, 0);
    desc10.putInteger(PSKey.Midpoint, 50);
    list2.putObject(PSClass.TransparencyStop, desc10);
    var desc11 = new ActionDescriptor();
    desc11.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 100);
    desc11.putInteger(PSKey.Location, 4096);
    desc11.putInteger(PSKey.Midpoint, 50);
    list2.putObject(PSClass.TransparencyStop, desc11);
    desc3.putList(PSKey.Transparency, list2);
    desc2.putObject(PSKey.Gradient, PSClass.Gradient, desc3);
    desc1.putObject(PSKey.To, PSClass.GradientMap, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step27(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 20);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Move
  function step28(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Front);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Make
  function step29(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSString.contentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Desaturation A2");
    var desc3 = new ActionDescriptor();
    var desc4 = new ActionDescriptor();
    desc4.putDouble(PSKey.Red, 127.501945495605);
    desc4.putDouble(PSKey.Green, 127.501945495605);
    desc4.putDouble(PSKey.Blue, 127.501945495605);
    desc3.putObject(PSKey.Color, PSClass.RGBColor, desc4);
    desc2.putObject(PSKey.Type, PSString.solidColorLayer, desc3);
    desc1.putObject(PSKey.Using, PSString.contentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step30(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSKey.Color);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step31(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 15);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Move
  function step32(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Previous);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Set
  function step33(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Deselect
  function step34(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Deselect, desc1, dialogMode);
  };

  // Deselect
  function step35(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Deselect, desc1, dialogMode);
  };

  // Make
  function step36(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Photo Filter A2");
    var desc3 = new ActionDescriptor();
    var desc4 = new ActionDescriptor();
    desc4.putDouble(PSKey.Luminance, 67.06);
    desc4.putDouble(PSString.a, 32);
    desc4.putDouble(PSString.b, 120);
    desc3.putObject(PSKey.Color, PSClass.LabColor, desc4);
    desc3.putInteger(PSKey.Density, 25);
    desc3.putBoolean(PSKey.PreserveLuminosity, false);
    desc2.putObject(PSKey.Type, PSString.photoFilter, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Invert
  function step37(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    executeAction(PSEvent.Invert, undefined, dialogMode);
  };

  // Select
  function step38(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Set
  function step39(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    var desc3 = new ActionDescriptor();
    desc3.putUnitDouble(PSKey.Hue, PSUnit.Angle, 35.00244140625);
    desc3.putDouble(PSKey.Start, 100);
    desc3.putDouble(PSKey.Brightness, 91.9996948195621);
    desc2.putObject(PSKey.Color, PSClass.HSBColor, desc3);
    desc1.putObject(PSKey.To, PSString.photoFilter, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step40(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Forward);
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Select
  function step41(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Backward);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelection);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Select
  function step42(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Backward);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelection);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Select
  function step43(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Backward);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelection);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step44(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSString.layerGroup);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSKey.From, ref2);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "S2");
    desc1.putObject(PSKey.Using, PSString.layerGroup, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  step1();      // Make
  step2();      // Move
  step3();      // Set
  step4();      // Make
  step5();      // Set
  step6();      // Make
  step7();      // Set
  step8();      // Apply Image
  step9();      // Select
  step10();      // Select
  step11();      // Make
  step12();      // Set
  step13();      // Set
  step14();      // Duplicate
  step15();      // Delete
  step16();      // Set
  step17();      // Select
  step18();      // Set
  step19();      // Make
  step20();      // Set
  step21();      // Set
  step22();      // Delete
  step23();      // Set
  step24();      // Make
  step25();      // Select
  step26();      // Set
  step27();      // Set
  step28();      // Move
  step29();      // Make
  step30();      // Set
  step31();      // Set
  step32();      // Move
  step33();      // Set
  step34();      // Deselect
  step35();      // Deselect
  step36();      // Make
  step37();      // Invert
  step38();      // Select
  step39();      // Set
  step40();      // Select
  step41();      // Select
  step42();      // Select
  step43();      // Select
  step44();      // Make
};



cTID = function(s) { return app.charIDToTypeID(s); };
sTID = function(s) { return app.stringIDToTypeID(s); };

//
// S2.loadSymbols
//   Loading up the symbol definitions like this makes it possible
//   to include several of these generated files in one master file
//   provided a prefix is specified other than the default. It also
//   skips the definitions if PSConstants has already been loaded.
//
S2.loadSymbols = function() {
  var dbgLevel = $.level;
  $.level = 0;
  try {
    PSConstants;
    return; // only if PSConstants is defined
  } catch (e) {
  } finally {
    $.level = dbgLevel;
  }
  var needDefs = true;
  $.level = 0;
  try {
    PSClass;
    needDefs = false;
  } catch (e) {
  } finally {
    $.level = dbgLevel;
  }
  if (needDefs) {
    PSClass = function() {};
    PSEnum = function() {};
    PSEvent = function() {};
    PSForm = function() {};
    PSKey = function() {};
    PSType = function() {};
    PSUnit = function() {};
    PSString = function() {};
  }

  // We may still end up duplicating some of the following definitions
  // but at least we don't redefine PSClass, etc... and wipe out others
  PSClass.AdjustmentLayer = cTID('AdjL');
  PSClass.Channel = cTID('Chnl');
  PSClass.ColorBalance = cTID('ClrB');
  PSClass.ColorCorrection = cTID('ClrC');
  PSClass.ColorStop = cTID('Clrt');
  PSClass.Curves = cTID('Crvs');
  PSClass.CurvesAdjustment = cTID('CrvA');
  PSClass.Gradient = cTID('Grdn');
  PSClass.GradientMap = cTID('GdMp');
  PSClass.HSBColor = cTID('HSBC');
  PSClass.LabColor = cTID('LbCl');
  PSClass.Layer = cTID('Lyr ');
  PSClass.Point = cTID('Pnt ');
  PSClass.RGBColor = cTID('RGBC');
  PSClass.SelectiveColor = cTID('SlcC');
  PSClass.TransparencyStop = cTID('TrnS');
  PSEnum.Absolute = cTID('Absl');
  PSEnum.All = cTID('Al  ');
  PSEnum.Backward = cTID('Bckw');
  PSEnum.Blocks = cTID('Blks');
  PSEnum.Blues = cTID('Bls ');
  PSEnum.Composite = cTID('Cmps');
  PSEnum.CustomStops = cTID('CstS');
  PSEnum.Cyans = cTID('Cyns');
  PSEnum.Exclusion = cTID('Xclu');
  PSEnum.Forward = cTID('Frwr');
  PSEnum.Front = cTID('Frnt');
  PSEnum.Greens = cTID('Grns');
  PSEnum.Magentas = cTID('Mgnt');
  PSEnum.Merged = cTID('Mrgd');
  PSEnum.Multiply = cTID('Mltp');
  PSEnum.Neutrals = cTID('Ntrl');
  PSEnum.None = cTID('None');
  PSEnum.Previous = cTID('Prvs');
  PSEnum.RGB = cTID('RGB ');
  PSEnum.Reds = cTID('Rds ');
  PSEnum.Target = cTID('Trgt');
  PSEnum.UserStop = cTID('UsrS');
  PSEnum.Whites = cTID('Whts');
  PSEnum.Yellows = cTID('Ylws');
  PSEvent.Delete = cTID('Dlt ');
  PSEvent.Deselect = cTID('Dslc');
  PSEvent.Duplicate = cTID('Dplc');
  PSEvent.Invert = cTID('Invr');
  PSEvent.Make = cTID('Mk  ');
  PSEvent.Move = cTID('move');
  PSEvent.Select = cTID('slct');
  PSEvent.Set = cTID('setd');
  PSEvent.Subtract = cTID('Sbtr');
  PSKey.Adjustment = cTID('Adjs');
  PSKey.Black = cTID('Blck');
  PSKey.Blue = cTID('Bl  ');
  PSKey.Brightness = cTID('Brgh');
  PSKey.Calculation = cTID('Clcl');
  PSKey.Color = cTID('Clr ');
  PSKey.Colors = cTID('Clrs');
  PSKey.Curve = cTID('Crv ');
  PSKey.Density = cTID('Dnst');
  PSKey.From = cTID('From');
  PSKey.Gradient = cTID('Grad');
  PSKey.Green = cTID('Grn ');
  PSKey.HighlightLevels = cTID('HghL');
  PSKey.Horizontal = cTID('Hrzn');
  PSKey.Hue = cTID('H   ');
  PSKey.Interpolation = cTID('Intr');
  PSKey.Location = cTID('Lctn');
  PSKey.Luminance = cTID('Lmnc');
  PSKey.MakeVisible = cTID('MkVs');
  PSKey.Method = cTID('Mthd');
  PSKey.Midpoint = cTID('Mdpn');
  PSKey.MidtoneLevels = cTID('MdtL');
  PSKey.Mode = cTID('Md  ');
  PSKey.Name = cTID('Nm  ');
  PSKey.Opacity = cTID('Opct');
  PSKey.PreserveLuminosity = cTID('PrsL');
  PSKey.Red = cTID('Rd  ');
  PSKey.ShadowLevels = cTID('ShdL');
  PSKey.Start = cTID('Strt');
  PSKey.To = cTID('T   ');
  PSKey.Transparency = cTID('Trns');
  PSKey.Type = cTID('Type');
  PSKey.Using = cTID('Usng');
  PSKey.Vertical = cTID('Vrtc');
  PSKey.With = cTID('With');
  PSString.Null = sTID('null');
  PSString.a = sTID('a');
  PSString.addToSelection = sTID('addToSelection');
  PSString.b = sTID('b');
  PSString.contentLayer = sTID('contentLayer');
  PSString.layerGroup = sTID('layerSection');
  PSString.photoFilter = sTID('photoFilter');
  PSString.presetKind = sTID('presetKind');
  PSString.presetKindCustom = sTID('presetKindCustom');
  PSString.presetKindDefault = sTID('presetKindDefault');
  PSString.presetKindType = sTID('presetKindType');
  PSString.selection = sTID('selection');
  PSString.selectionModifier = sTID('selectionModifier');
  PSString.selectionModifierType = sTID('selectionModifierType');
  PSString.solidColorLayer = sTID('solidColorLayer');
  PSType.BlendMode = cTID('BlnM');
  PSType.Calculation = cTID('Clcn');
  PSType.ColorStopType = cTID('Clry');
  PSType.CorrectionMethod = cTID('CrcM');
  PSType.GradientForm = cTID('GrdF');
  PSType.Ordinal = cTID('Ordn');
  PSUnit.Angle = cTID('#Ang');
  PSUnit.Percent = cTID('#Prc');
};

S2.loadSymbols(); // load up our symbols



//=========================================
//                    S2.main
//=========================================
//

S2.main = function () {
  S2();
};

S2.main();

// EOF

    },
};

$._ext_S3={
    run : function() {
//
// Generated Thu Aug 20 2015 16:05:15 GMT+0400
//

//
//==================== S3 ==============
//
function S3() {
  // Make
  function step1(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "SelectiveColor");
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);
    desc2.putObject(PSKey.Type, PSClass.SelectiveColor, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Move
  function step2(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Front);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Set
  function step3(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindCustom);
    desc2.putEnumerated(PSKey.Method, PSType.CorrectionMethod, PSEnum.Absolute);
    var list1 = new ActionList();
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Reds);
    desc3.putUnitDouble(PSKey.Black, PSUnit.Percent, -100);
    list1.putObject(PSClass.ColorCorrection, desc3);
    var desc4 = new ActionDescriptor();
    desc4.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Yellows);
    desc4.putUnitDouble(PSKey.Black, PSUnit.Percent, -100);
    list1.putObject(PSClass.ColorCorrection, desc4);
    var desc5 = new ActionDescriptor();
    desc5.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Greens);
    desc5.putUnitDouble(PSKey.Black, PSUnit.Percent, -100);
    list1.putObject(PSClass.ColorCorrection, desc5);
    var desc6 = new ActionDescriptor();
    desc6.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Cyans);
    desc6.putUnitDouble(PSKey.Black, PSUnit.Percent, -100);
    list1.putObject(PSClass.ColorCorrection, desc6);
    var desc7 = new ActionDescriptor();
    desc7.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Blues);
    desc7.putUnitDouble(PSKey.Black, PSUnit.Percent, -100);
    list1.putObject(PSClass.ColorCorrection, desc7);
    var desc8 = new ActionDescriptor();
    desc8.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Magentas);
    desc8.putUnitDouble(PSKey.Black, PSUnit.Percent, -100);
    list1.putObject(PSClass.ColorCorrection, desc8);
    var desc9 = new ActionDescriptor();
    desc9.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Whites);
    desc9.putUnitDouble(PSKey.Black, PSUnit.Percent, 100);
    list1.putObject(PSClass.ColorCorrection, desc9);
    var desc10 = new ActionDescriptor();
    desc10.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Neutrals);
    desc10.putUnitDouble(PSKey.Black, PSUnit.Percent, 100);
    list1.putObject(PSClass.ColorCorrection, desc10);
    var desc11 = new ActionDescriptor();
    desc11.putEnumerated(PSKey.Colors, PSKey.Colors, PSEnum.Blocks);
    desc11.putUnitDouble(PSKey.Black, PSUnit.Percent, 100);
    list1.putObject(PSClass.ColorCorrection, desc11);
    desc2.putList(PSClass.ColorCorrection, list1);
    desc1.putObject(PSKey.To, PSClass.SelectiveColor, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step4(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "ContrastForMask");
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);
    desc2.putObject(PSKey.Type, PSClass.Curves, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step5(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    var list1 = new ActionList();
    var desc3 = new ActionDescriptor();
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.Composite);
    desc3.putReference(PSClass.Channel, ref2);
    var list2 = new ActionList();
    var desc4 = new ActionDescriptor();
    desc4.putDouble(PSKey.Horizontal, 0);
    desc4.putDouble(PSKey.Vertical, 0);
    list2.putObject(PSClass.Point, desc4);
    var desc5 = new ActionDescriptor();
    desc5.putDouble(PSKey.Horizontal, 128);
    desc5.putDouble(PSKey.Vertical, 255);
    list2.putObject(PSClass.Point, desc5);
    desc3.putList(PSKey.Curve, list2);
    list1.putObject(PSClass.CurvesAdjustment, desc3);
    desc2.putList(PSKey.Adjustment, list1);
    desc1.putObject(PSKey.To, PSClass.Curves, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step6(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.Layer);
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step7(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Merged");
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Apply Image
  function step8(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var desc2 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Merged);
    desc2.putReference(PSKey.To, ref1);
    desc2.putEnumerated(PSKey.Calculation, PSType.Calculation, PSEnum.Multiply);
    desc1.putObject(PSKey.With, PSKey.Calculation, desc2);
    executeAction(sTID('applyImageEvent'), desc1, dialogMode);
  };

  // Select
  function step9(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Backward);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelection);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Select
  function step10(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Backward);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelection);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step11(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSString.layerGroup);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSKey.From, ref2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step12(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Saturation Mask");
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step13(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Duplicate
  function step14(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    desc1.putString(PSKey.Name, "SaturnMask");
    executeAction(PSEvent.Duplicate, desc1, dialogMode);
  };

  // Delete
  function step15(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Delete, desc1, dialogMode);
  };

  // Set
  function step16(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSKey.To, PSType.Ordinal, PSEnum.None);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Select
  function step17(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Set
  function step18(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putName(PSClass.Channel, "SaturnMask");
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Make
  function step19(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Desaturate heavily saturated");
    desc2.putClass(PSKey.Type, sTID("vibrance"));
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step20(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 50);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step21(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putInteger(PSKey.Start, -50);
    desc1.putObject(PSKey.To, sTID("vibrance"), desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Delete
  function step22(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putName(PSClass.Channel, "SaturnMask");
    desc1.putReference(PSString.Null, ref1);
    executeAction(PSEvent.Delete, desc1, dialogMode);
  };

  // Set
  function step23(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Desaturate heavily saturated A3");
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step24(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Intersect
  function step25(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSKey.With, ref2);
    executeAction(PSEvent.Intersect, desc1, dialogMode);
  };

  // Make
  function step26(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "A3 Lights");
    var desc3 = new ActionDescriptor();
    var list1 = new ActionList();
    list1.putInteger(0);
    list1.putInteger(sTID("skinTone"), 0);
    list1.putInteger(sTID("contentAware"), 0);
    desc3.putList(PSKey.ShadowLevels, list1);
    var list2 = new ActionList();
    list2.putInteger(0);
    list2.putInteger(sTID("skinTone"), 0);
    list2.putInteger(sTID("contentAware"), 0);
    desc3.putList(PSKey.MidtoneLevels, list2);
    var list3 = new ActionList();
    list3.putInteger(0);
    list3.putInteger(sTID("skinTone"), 0);
    list3.putInteger(sTID("contentAware"), 0);
    desc3.putList(PSKey.HighlightLevels, list3);
    desc3.putBoolean(PSKey.PreserveLuminosity, true);
    desc2.putObject(PSKey.Type, PSClass.ColorBalance, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step27(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    var list1 = new ActionList();
    list1.putInteger(-10);
    list1.putInteger(sTID("skinTone"), 10);
    list1.putInteger(sTID("contentAware"), 10);
    desc2.putList(PSKey.MidtoneLevels, list1);
    var list2 = new ActionList();
    list2.putInteger(-10);
    list2.putInteger(sTID("skinTone"), 0);
    list2.putInteger(sTID("contentAware"), 25);
    desc2.putList(PSKey.HighlightLevels, list2);
    desc1.putObject(PSKey.To, PSClass.ColorBalance, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step28(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSKey.Color);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step29(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSKey.To, PSType.Ordinal, PSEnum.All);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Subtract
  function step30(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putProperty(PSClass.Channel, PSString.selection);
    desc1.putReference(PSKey.From, ref2);
    executeAction(PSEvent.Subtract, desc1, dialogMode);
  };

  // Make
  function step31(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSClass.AdjustmentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "A3 Shadows");
    var desc3 = new ActionDescriptor();
    var list1 = new ActionList();
    list1.putInteger(0);
    list1.putInteger(sTID("skinTone"), 0);
    list1.putInteger(sTID("contentAware"), 0);
    desc3.putList(PSKey.ShadowLevels, list1);
    var list2 = new ActionList();
    list2.putInteger(0);
    list2.putInteger(sTID("skinTone"), 0);
    list2.putInteger(sTID("contentAware"), 0);
    desc3.putList(PSKey.MidtoneLevels, list2);
    var list3 = new ActionList();
    list3.putInteger(0);
    list3.putInteger(sTID("skinTone"), 0);
    list3.putInteger(sTID("contentAware"), 0);
    desc3.putList(PSKey.HighlightLevels, list3);
    desc3.putBoolean(PSKey.PreserveLuminosity, true);
    desc2.putObject(PSKey.Type, PSClass.ColorBalance, desc3);
    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step32(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    var list1 = new ActionList();
    list1.putInteger(15);
    list1.putInteger(sTID("skinTone"), 0);
    list1.putInteger(sTID("contentAware"), -5);
    desc2.putList(PSKey.ShadowLevels, list1);
    var list2 = new ActionList();
    list2.putInteger(15);
    list2.putInteger(sTID("skinTone"), 0);
    list2.putInteger(sTID("contentAware"), 0);
    desc2.putList(PSKey.MidtoneLevels, list2);
    desc1.putObject(PSKey.To, PSClass.ColorBalance, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step33(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSKey.Color);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Move
  function step34(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Previous);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Make
  function step35(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSString.contentLayer);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "Desaturation A3");
    var desc3 = new ActionDescriptor();
    var desc4 = new ActionDescriptor();
    desc4.putDouble(PSKey.Red, 127.501945495605);
    desc4.putDouble(PSKey.Green, 127.501945495605);
    desc4.putDouble(PSKey.Blue, 127.501945495605);
    desc3.putObject(PSKey.Color, PSClass.RGBColor, desc4);
    desc2.putObject(PSKey.Type, PSString.solidColorLayer, desc3);
    desc1.putObject(PSKey.Using, PSString.contentLayer, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  // Set
  function step36(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSKey.Color);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Set
  function step37(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var desc2 = new ActionDescriptor();
    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 15);
    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
    executeAction(PSEvent.Set, desc1, dialogMode);
  };

  // Move
  function step38(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Previous);
    desc1.putReference(PSKey.To, ref2);
    executeAction(PSEvent.Move, desc1, dialogMode);
  };

  // Select
  function step39(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Forward);
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Select
  function step40(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Forward);
    desc1.putReference(PSString.Null, ref1);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Select
  function step41(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Backward);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelection);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Select
  function step42(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Backward);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelection);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Select
  function step43(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Backward);
    desc1.putReference(PSString.Null, ref1);
    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelection);
    desc1.putBoolean(PSKey.MakeVisible, false);
    executeAction(PSEvent.Select, desc1, dialogMode);
  };

  // Make
  function step44(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putClass(PSString.layerGroup);
    desc1.putReference(PSString.Null, ref1);
    var ref2 = new ActionReference();
    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
    desc1.putReference(PSKey.From, ref2);
    var desc2 = new ActionDescriptor();
    desc2.putString(PSKey.Name, "S3");
    desc1.putObject(PSKey.Using, PSString.layerGroup, desc2);
    executeAction(PSEvent.Make, desc1, dialogMode);
  };

  step1();      // Make
  step2();      // Move
  step3();      // Set
  step4();      // Make
  step5();      // Set
  step6();      // Make
  step7();      // Set
  step8();      // Apply Image
  step9();      // Select
  step10();      // Select
  step11();      // Make
  step12();      // Set
  step13();      // Set
  step14();      // Duplicate
  step15();      // Delete
  step16();      // Set
  step17();      // Select
  step18();      // Set
  step19();      // Make
  step20();      // Set
  step21();      // Set
  step22();      // Delete
  step23();      // Set
  step24();      // Set
  step25();      // Intersect
  step26();      // Make
  step27();      // Set
  step28();      // Set
  step29();      // Set
  step30();      // Subtract
  step31();      // Make
  step32();      // Set
  step33();      // Set
  step34();      // Move
  step35();      // Make
  step36();      // Set
  step37();      // Set
  step38();      // Move
  step39();      // Select
  step40();      // Select
  step41();      // Select
  step42();      // Select
  step43();      // Select
  step44();      // Make
};



cTID = function(s) { return app.charIDToTypeID(s); };
sTID = function(s) { return app.stringIDToTypeID(s); };

//
// S3.loadSymbols
//   Loading up the symbol definitions like this makes it possible
//   to include several of these generated files in one master file
//   provided a prefix is specified other than the default. It also
//   skips the definitions if PSConstants has already been loaded.
//
S3.loadSymbols = function() {
  var dbgLevel = $.level;
  $.level = 0;
  try {
    PSConstants;
    return; // only if PSConstants is defined
  } catch (e) {
  } finally {
    $.level = dbgLevel;
  }
  var needDefs = true;
  $.level = 0;
  try {
    PSClass;
    needDefs = false;
  } catch (e) {
  } finally {
    $.level = dbgLevel;
  }
  if (needDefs) {
    PSClass = function() {};
    PSEnum = function() {};
    PSEvent = function() {};
    PSForm = function() {};
    PSKey = function() {};
    PSType = function() {};
    PSUnit = function() {};
    PSString = function() {};
  }

  // We may still end up duplicating some of the following definitions
  // but at least we don't redefine PSClass, etc... and wipe out others
  PSClass.AdjustmentLayer = cTID('AdjL');
  PSClass.Channel = cTID('Chnl');
  PSClass.ColorBalance = cTID('ClrB');
  PSClass.ColorCorrection = cTID('ClrC');
  PSClass.ColorStop = cTID('Clrt');
  PSClass.Curves = cTID('Crvs');
  PSClass.CurvesAdjustment = cTID('CrvA');
  PSClass.Gradient = cTID('Grdn');
  PSClass.GradientMap = cTID('GdMp');
  PSClass.HSBColor = cTID('HSBC');
  PSClass.LabColor = cTID('LbCl');
  PSClass.Layer = cTID('Lyr ');
  PSClass.Point = cTID('Pnt ');
  PSClass.RGBColor = cTID('RGBC');
  PSClass.SelectiveColor = cTID('SlcC');
  PSClass.TransparencyStop = cTID('TrnS');
  PSEnum.Absolute = cTID('Absl');
  PSEnum.All = cTID('Al  ');
  PSEnum.Backward = cTID('Bckw');
  PSEnum.Blocks = cTID('Blks');
  PSEnum.Blues = cTID('Bls ');
  PSEnum.Composite = cTID('Cmps');
  PSEnum.CustomStops = cTID('CstS');
  PSEnum.Cyans = cTID('Cyns');
  PSEnum.Exclusion = cTID('Xclu');
  PSEnum.Forward = cTID('Frwr');
  PSEnum.Front = cTID('Frnt');
  PSEnum.Greens = cTID('Grns');
  PSEnum.Magentas = cTID('Mgnt');
  PSEnum.Merged = cTID('Mrgd');
  PSEnum.Multiply = cTID('Mltp');
  PSEnum.Neutrals = cTID('Ntrl');
  PSEnum.None = cTID('None');
  PSEnum.Previous = cTID('Prvs');
  PSEnum.RGB = cTID('RGB ');
  PSEnum.Reds = cTID('Rds ');
  PSEnum.Target = cTID('Trgt');
  PSEnum.UserStop = cTID('UsrS');
  PSEnum.Whites = cTID('Whts');
  PSEnum.Yellows = cTID('Ylws');
  PSEvent.Delete = cTID('Dlt ');
  PSEvent.Deselect = cTID('Dslc');
  PSEvent.Duplicate = cTID('Dplc');
  PSEvent.Intersect = cTID('Intr');
  PSEvent.Invert = cTID('Invr');
  PSEvent.Make = cTID('Mk  ');
  PSEvent.Move = cTID('move');
  PSEvent.Select = cTID('slct');
  PSEvent.Set = cTID('setd');
  PSEvent.Subtract = cTID('Sbtr');
  PSKey.Adjustment = cTID('Adjs');
  PSKey.Black = cTID('Blck');
  PSKey.Blue = cTID('Bl  ');
  PSKey.Brightness = cTID('Brgh');
  PSKey.Calculation = cTID('Clcl');
  PSKey.Color = cTID('Clr ');
  PSKey.Colors = cTID('Clrs');
  PSKey.Curve = cTID('Crv ');
  PSKey.Density = cTID('Dnst');
  PSKey.From = cTID('From');
  PSKey.Gradient = cTID('Grad');
  PSKey.Green = cTID('Grn ');
  PSKey.HighlightLevels = cTID('HghL');
  PSKey.Horizontal = cTID('Hrzn');
  PSKey.Hue = cTID('H   ');
  PSKey.Location = cTID('Lctn');
  PSKey.Luminance = cTID('Lmnc');
  PSKey.MakeVisible = cTID('MkVs');
  PSKey.Method = cTID('Mthd');
  PSKey.Midpoint = cTID('Mdpn');
  PSKey.MidtoneLevels = cTID('MdtL');
  PSKey.Mode = cTID('Md  ');
  PSKey.Name = cTID('Nm  ');
  PSKey.Opacity = cTID('Opct');
  PSKey.PreserveLuminosity = cTID('PrsL');
  PSKey.Red = cTID('Rd  ');
  PSKey.ShadowLevels = cTID('ShdL');
  PSKey.Start = cTID('Strt');
  PSKey.To = cTID('T   ');
  PSKey.Transparency = cTID('Trns');
  PSKey.Type = cTID('Type');
  PSKey.Using = cTID('Usng');
  PSKey.Vertical = cTID('Vrtc');
  PSKey.With = cTID('With');
  PSString.Null = sTID('null');
  PSString.a = sTID('a');
  PSString.addToSelection = sTID('addToSelection');
  PSString.b = sTID('b');
  PSString.contentLayer = sTID('contentLayer');
  PSString.layerGroup = sTID('layerSection');
  PSString.photoFilter = sTID('photoFilter');
  PSString.presetKind = sTID('presetKind');
  PSString.presetKindCustom = sTID('presetKindCustom');
  PSString.presetKindDefault = sTID('presetKindDefault');
  PSString.presetKindType = sTID('presetKindType');
  PSString.selection = sTID('selection');
  PSString.selectionModifier = sTID('selectionModifier');
  PSString.selectionModifierType = sTID('selectionModifierType');
  PSString.solidColorLayer = sTID('solidColorLayer');
  PSType.BlendMode = cTID('BlnM');
  PSType.Calculation = cTID('Clcn');
  PSType.ColorStopType = cTID('Clry');
  PSType.CorrectionMethod = cTID('CrcM');
  PSType.GradientForm = cTID('GrdF');
  PSType.Ordinal = cTID('Ordn');
  PSUnit.Angle = cTID('#Ang');
  PSUnit.Percent = cTID('#Prc');
};

S3.loadSymbols(); // load up our symbols



//=========================================
//                    S3.main
//=========================================
//

S3.main = function () {
  S3();
};

S3.main();

// EOF

    },
};


