text: // Generated by CoffeeScript 2.6.1
  var mutate;
  
  ({mutate} = require('mixme'));
  
  module.exports = {
    name: '@nikitajs/core/lib/plugins/metadata/raw',
    hooks: {
      'nikita:schema': function({schema}) {
        return mutate(schema.definitions.metadata.properties, {
          raw: {
            type: 'boolean',
            description: `Indicates the level number of the action in the Nikita session tree.`,
            default: false,
            readOnly: true
          },
          raw_input: {
            type: 'boolean',
            description: `Indicates the index of an action relative to its sibling actions in
  the Nikita session tree.`,
            readOnly: true
          },
          raw_output: {
            type: 'boolean',
            description: `Indicates the position of the action relative to its parent and
  sibling action. It is unique to each action.`,
            readOnly: true
          }
        });
      },
      'nikita:registry:normalize': {
        handler: function(action) {
          var base, base1, base2, wasDefinedAndValid;
          if (action.metadata == null) {
            action.metadata = {};
          }
          wasDefinedAndValid = action.metadata.raw !== void 0 && typeof action.metadata.raw === 'boolean';
          if ((base = action.metadata).raw == null) {
            base.raw = false;
          }
          if (wasDefinedAndValid) {
            if ((base1 = action.metadata).raw_input == null) {
              base1.raw_input = action.metadata.raw;
            }
          }
          if (wasDefinedAndValid) {
            return (base2 = action.metadata).raw_output != null ? base2.raw_output : base2.raw_output = action.metadata.raw;
          }
        }
      },
      'nikita:action': {
        // before: '@nikitajs/core/lib/plugins/metadata/schema'
        handler: function(action) {
          var base, base1, base2, wasDefinedAndValid;
          wasDefinedAndValid = action.metadata.raw !== void 0 && typeof action.metadata.raw === 'boolean';
          if ((base = action.metadata).raw == null) {
            base.raw = false;
          }
          if (wasDefinedAndValid) {
            if ((base1 = action.metadata).raw_input == null) {
              base1.raw_input = action.metadata.raw;
            }
          }
          if (wasDefinedAndValid) {
            return (base2 = action.metadata).raw_output != null ? base2.raw_output : base2.raw_output = action.metadata.raw;
          }
        }
      }
    }
  };
  