/*
Language: C++
Author: Ivan Sagalaev <maniac@softwaremaniacs.org>
Contributors: Evgeny Stepanischev <imbolk@gmail.com>, Zaven Muradyan <megalivoithos@gmail.com>
974970
function(hljs) {
  var CPP_KEYWORDS = {
    keyword: 'false int float while private char catch export virtual operator sizeof ' +
      'dynamic_cast|10 typedef const_cast|10 const struct for static_cast|10 union namespace ' +
      'unsigned long throw volatile static protected bool template mutable if public friend ' +
      'do return goto auto void enum else break new extern using true class asm case typeid ' +
      'short reinterpret_cast|10 default double register explicit signed typename try this ' +
      'switch continue wchar_t inline delete alignof char16_t char32_t constexpr decltype ' +
      'noexcept nullptr static_assert thread_local restrict _Bool complex _Complex _Imaginary',
    built_in: 'std string cin cout cerr clog stringstream istringstream ostringstream ' +
      'auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set ' +
      'unordered_map unordered_multiset unordered_multimap array shared_ptr abort abs acos ' +
      'asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp ' +
      'fscanf isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper ' +
      'isxdigit tolower toupper labs ldexp log10 log malloc memchr memcmp memcpy memset modf pow ' +
      'printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp ' +
      'strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan ' +
      'vfprintf vprintf vsprintf'
  };
  return {
    aliases: ['c', 'h', 'c++', 'h++'],
    keywords: CPP_KEYWORDS,
    illegal: '</',
    contains: [
      hljs.C_LINE_COMMENT_MODE,
      hljs.C_BLOCK_COMMENT_MODE,
      hljs.QUOTE_STRING_MODE,
      {
        className: 'string',
        begin: '\'\\\\?.', end: '\'',
        illegal: '.'
      },
      {
        className: 'number',
        begin: '\\b(\\d+(\\.\\d*)?|\\.\\d+)(u|U|l|L|ul|UL|f|F)'
      },
      hljs.C_NUMBER_MODE,
      {
        className: 'preprocessor',
        begin: '#', end: '$',
        keywords: 'if else elif endif define undef warning error line pragma',
        contains: [
          {
            begin: 'include\\s*[<"]', end: '[>"]',
            keywords: 'include',
            illegal: '\\n'
          },
          hljs.C_LINE_COMMENT_MODE
        ]
      },
      {
        className: 'stl_container',
        begin: '\\b(deque|list|queue|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\s*<', end: '>',
        keywords: CPP_KEYWORDS,
        contains: ['self']
      },
      {
        begin: hljs.IDENT_RE + '::'
      }
    ]
  };
}
558267
async function main({ isFragment, needsHelp, showVersion, useTabs }) {
  /* eslint-disable no-console */
  const stdin = await getStdin()

  if (showVersion) {
    return console.log(version)
  }

  if (needsHelp || !stdin) {
    return console.log(help)
  }

  const pug = html2pug(stdin, { isFragment, useTabs })
  return console.log(pug)

  /* eslint-enable no-console */
}
18622
function modify( &$tpl, &$operatorName, &$operatorParameters, &$rootNamespace, &$currentNamespace, &$operatorValue, &$namedParameters ) {
        switch ($operatorName)
        {
            case 'washxml':
                $operatorValue = str_replace( array( '&', '"', "'", '<', '>' ), array( '&amp;', '&quot;', '&apos;', '&lt;', '&gt;' ), $operatorValue );
                break;
            case 'washxmlcomment':
                // in xml comments the -- string is not permitted
                $operatorValue = str_replace( '--', '_-', $operatorValue );
                break;
            case 'washxmlcdata':
                /// @todo
                eZDebug::writeWarning( 'Template operator washxmlcdata not yet implemented, it should not be used!', __METHOD__ );
                break;
            case 'xsdtype':
                $operatorValue = ggWSDLParser::phpType2xsdType( $operatorValue, $namedParameters['targetprefix'], $namedParameters['xsdprefix'], $namedParameters['soapencprefix'] );
                break;
            case 'classInspect':
                $operatorValue = ggeZWebservices::classInspect( $operatorValue );
                break;
        }
    }
628811
function _1CMethodDescription(parentModule) {

    // Идентификатор (имя) метода.
    this.Name = "";

    // Тип метода. Если истина - то это Процедура, иначе - это функция.
    this.IsProc = false;

    // Массив параметров метода.
    this.Params = new Array();

    // Массив явным образом объявленных переменных.
    this.DeclaredVars = new Array();

    // Массив автоматических локальных переменных (не объявленных явным образом).
    this.AutomaticVars = new Array();

    // Список вызовов: массив методов, вызываемых из данного метода.
    this.Calls = new Array();
    this._CallsUpper = new Array();
    this.CallsPosition = new Array();

    // Номер строки объявления метода.
    this.StartLine = 0;

    // Номер строки завершения объявления метода.
    this.EndLine = 0;

    // Ассоциативный массив Имя переменной -> Тип переменной (пока тип всегда null).
    this._varsTypes = {};

    // Контекст модуля, в котором объявлен данный метод (_1CModuleContextDescription).
    this.parentModule = parentModule;
    
    // Экспортная процедура или нет. 
    this.IsExport = false;
    
    this.description = "";
    
}
1151154
function __() {
    var us = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
    var store = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;

    store = typeof us === "boolean" ? us : store;
    us = typeof us === "boolean" ? [] : us;

    var seq = []; //seq is vanilla JS array + features
    seq.id = getID();
    seq.store = store;
    seq.us = us;
    seq.ds = [];
    seq.updatedTo = {};
    seq.us.map(function (u) {
      //  seq is a member of u.ds
      u.ds[u.ds.length] = seq;
      u.updatedTo[seq.id] = 0; // non-interference dependency
    });
    seq.IndexOnTimestamp = {};
    seq.TimestampOnIndex = {};
    seq.propagating = 0;
    seq.done = 0;
    seq.eqs = [];
    seq.addEq = function (eq) {
      return seq.eqs[seq.eqs.length] = eq;
    };
    seq.evalEqs = function (val) {
      var val0 = val;
      seq.eqs.map(function (eq) {
        return val = eq(val);
      });
      return seq.us.length === 0 ? val0 : val;
    };
    //api-----------------
    Object.keys(__.api).map(function (api) {
      seq[api] = __.api[api](__, seq, store);
    });
    //-----------------
    Object.defineProperties(seq, //detect t update on each seqs
    {
      t: {
        //foo.t
        get: function get() {
          return seq.valOnT;
        },
        set: function set(tval) {
          var sanityCheck = seq.propagating === 0 && seq.us.length !== 0 ? function () {
            throw new Error("Do not set a value of the sequence that depends on other sequences!");
          }() : function () {
            seq.propagating = 0;
            var core = seq.done === 0 ? function () {
              seq.valOnT = seq.evalEqs(tval); //self eqs eval
              seq.T = Date.now();
              var core1 = store ? function () {
                seq.IndexOnTimestamp[seq.T] = seq.length;
                seq.TimestampOnIndex[seq.length] = seq.T;
                seq[seq.length] = seq.valOnT; //after funcs
              }() : true;
              Object.keys(seq.updatedTo).map(function (key) {
                seq.updatedTo[key] = 1;
              });
              //clear updated us in non-interference way
              seq.us.map(function (u) {
                return u.updatedTo[seq.id] = 0;
              });
              seq.ds.map(function (d) {
                var usAllUpdated = d.us.map(function (u) {
                  return u.updatedTo[d.id];
                }).reduce(function (a, b) {
                  return a * b;
                });
                var core2 = usAllUpdated === 1 ? function () {
                  d.propagating = 1;
                  d.t = d.us.map(function (u) {
                    return u.t;
                  });
                }() : true;
              });
            }() : true;
          }();
        }
      }
    });
    return seq;
  }
1152136
static function processStaticOptimizations( $useComments, $php, $tpl, &$node, &$resourceData, &$newNode )
    {
        $nodeType = $node[0];
        if ( $nodeType == eZTemplate::NODE_ROOT )
        {
            $children = $node[1];
            $newNode[0] = $nodeType;
            $newNode[1] = false;
            if ( $children )
            {
                $newNode[1] = array();
                foreach ( $children as $child )
                {
                    $newChild = array();
                    eZTemplateCompiler::processStaticOptimizations( $useComments, $php, $tpl, $child, $resourceData, $newChild );
                    $newNode[1][] = $newChild;
                }
            }
        }
        else if ( $nodeType == eZTemplate::NODE_TEXT )
        {
            $text = $node[2];
            $placement = $node[3];

            $newNode[0] = $nodeType;
            $newNode[1] = false;
            $newNode[2] = $text;
            $newNode[3] = $placement;
        }
        else if ( $nodeType == eZTemplate::NODE_VARIABLE )
        {
            $variableCustom = $node[1];
            $variableData = $node[2];
            $variablePlacement = $node[3];
            $dataInspection = eZTemplateCompiler::inspectVariableData( $tpl,
                                                                       $variableData, $variablePlacement,
                                                                       $resourceData );
            if ( isset( $dataInspection['new-data'] ) )
            {
                $variableData = $dataInspection['new-data'];
            }
            $newNode = $node;
            $newNode[1] = $variableCustom;
            $newNode[2] = $variableData;
            unset( $dataInspection );
        }
        else if ( $nodeType == eZTemplate::NODE_FUNCTION )
        {
            $functionChildren = $node[1];
            $functionName = $node[2];
            $functionParameters = $node[3];
            $functionPlacement = $node[4];

            $newFunctionChildren = array();
            if ( is_array( $functionChildren ) )
            {
                foreach ( $functionChildren as $functionChild )
                {
                    $newChild = array();
                    eZTemplateCompiler::processStaticOptimizations( $useComments, $php, $tpl,
                                                                        $functionChild, $resourceData, $newChild );
                    $newFunctionChildren[] = $newChild;
                }
                $functionChildren = $newFunctionChildren;
            }

            $newFunctionParameters = array();
            if ( $functionParameters )
            {
                foreach ( $functionParameters as $functionParameterName => $functionParameterData )
                {
                    $dataInspection = eZTemplateCompiler::inspectVariableData( $tpl,
                                                                                   $functionParameterData, false,
                                                                                   $resourceData );
                    if ( isset( $dataInspection['new-data'] ) )
                    {
                        $functionParameterData = $dataInspection['new-data'];
                    }
                    $newFunctionParameters[$functionParameterName] = $functionParameterData;
                }
                $functionParameters = $newFunctionParameters;
            }

            $newNode[0] = $nodeType;
            $newNode[1] = $functionChildren;
            $newNode[2] = $functionName;
            $newNode[3] = $functionParameters;
            $newNode[4] = $functionPlacement;
            if ( isset( $node[5] ) )
                $newNode[5] = $node[5];
        }
        else
            $newNode = $node;
    }
1296947
function dev() {
		var mw = core.base();
		mw.error = function (str) {
			return '[error|' + str + ']';
		};
		mw.warning = function (str) {
			return '[warng|' + str + ']';
		};
		mw.success = function (str) {
			return '[succs|' + str + ']';
		};
		mw.accent = function (str) {
			return '[accnt|' + str + ']';
		};
		mw.signal = function (str) {
			return '[signl|' + str + ']';
		};
		mw.muted = function (str) {
			return '[muted|' + str + ']';
		};
		mw.plain = function (str) {
			return'[plain|' + str + ']';
		};
		mw.toString = function () {
			return '<ministyle-dev>';
		};
		return mw;
	}
475470
function modify( $tpl, $operatorName, $operatorParameters, $rootNamespace, $currentNamespace, &$operatorValue, $namedParameters,
                     $placement )
    {
        if ( $operatorName == $this->LocaleFetchName )
        {
            if ( $operatorValue !== null )
            {
                $localeString = $operatorValue;
            }
            else
            {
                if ( count( $operatorParameters ) < 1 )
                {
                    $tpl->missingParameter( $operatorName, 'localestring' );
                    return;
                }
                $localeString = $tpl->elementValue( $operatorParameters[0], $rootNamespace, $currentNamespace, $placement, true );
            }
            $locale = eZLocale::instance( $localeString );
            $operatorValue = $locale;
            return;
        }
        $locale = eZLocale::instance();
        if ( $operatorName == $this->GetTimeName )
        {
            $timestamp = $operatorValue;
            if ( $timestamp === null )
                $timestamp = $namedParameters['timestamp'];

            if ( !$timestamp )
                $timestamp = time();

            $info = getdate( $timestamp );
            $week = date( 'W', $timestamp );
            if ( $info['wday'] == 0 )
                ++$week;
            $operatorValue = array( 'seconds' => $info['seconds'],
                                    'minutes' => $info['minutes'],
                                    'hours' => $info['hours'],
                                    'day' => $info['mday'],
                                    'month' => $info['mon'],
                                    'year' => $info['year'],
                                    'weeknumber' => $week,
                                    'weekday' => $info['wday'],
                                    'yearday' => $info['yday'],
                                    'epoch' => $info[0] );
        }
        else if ( $operatorName == $this->MakeTimeName )
        {
            $parameters = array();
            if ( $namedParameters['hour'] !== false )
                $parameters[] = $namedParameters['hour'];
            if ( $namedParameters['minute'] !== false )
                $parameters[] = $namedParameters['minute'];
            if ( $namedParameters['second'] !== false )
                $parameters[] = $namedParameters['second'];
            if ( $namedParameters['month'] !== false )
                $parameters[] = $namedParameters['month'];
            {
                if ( $namedParameters['day'] !== false )
                    $parameters[] = $namedParameters['day'];
                {
                    if ( $namedParameters['year'] !== false )
                        $parameters[] = $namedParameters['year'];
                    {
                        if ( $namedParameters['dst'] !== false )
                            $parameters[] = $namedParameters['dst'];
                    }
                }
            }

            $operatorValue = count( $parameters ) == 0 ? time() : call_user_func_array( 'mktime', $parameters );
        }
        else if ( $operatorName == $this->MakeDateName )
        {
            $parameters = array( 0, 0, 0 );
            if ( $namedParameters['month'] !== false )
                $parameters[] = $namedParameters['month'];
            {
                if ( $namedParameters['day'] !== false )
                    $parameters[] = $namedParameters['day'];
                {
                    if ( $namedParameters['year'] !== false )
                        $parameters[] = $namedParameters['year'];
                    {
                        if ( $namedParameters['dst'] !== false )
                            $parameters[] = $namedParameters['dst'];
                    }
                }
            }
            $operatorValue = call_user_func_array( 'mktime', $parameters );
        }
        else if ( $operatorName == $this->CurrentDateName )
        {
            $operatorValue = time();
        }
        else if ( $operatorName == $this->DateTimeName )
        {
            $class = $namedParameters['class'];
            if ( $class === null )
                return;
            if ( $class == 'custom' )
            {
                $operatorValue = $locale->formatDateTimeType( $namedParameters['data'], $operatorValue );
            }
            else
            {
                $dtINI = eZINI::instance( 'datetime.ini' );
                $formats = $dtINI->variable( 'ClassSettings', 'Formats' );
                if ( array_key_exists( $class, $formats ) )
                {
                    $classFormat = $formats[$class];
                    $operatorValue = $locale->formatDateTimeType( $classFormat, $operatorValue );
                }
                else
                    $tpl->error( $operatorName, "DateTime class '$class' is not defined", $placement );
            }
        }
        else if ( $operatorName == $this->LocaleName )
        {
            $type = $namedParameters['type'];
            if ( $type === null )
                return;

            $localeString = $namedParameters['locale'];
            $param = $namedParameters['param'];

            // change locale if need
            if ( $localeString )
                $locale = eZLocale::instance( $localeString );

            $method = $locale->getFormattingFunction( $type );
            if ( $method )
            {
                switch ( $type )
                {
                    case 'currency':
                        {
                            if ( $param === false )
                                $param = $locale->attribute( 'currency_symbol' );

                            $operatorValue = $locale->$method( $operatorValue, $param );
                        } break;

                    default:
                        {
                            $operatorValue = $locale->$method( $operatorValue );
                        } break;
                }
            }
            else
            {
                $tpl->error( $operatorName, "Unknown locale type: '$type'", $placement );
            }
        }
    }
1110857
function s2r(t, u = false) {
  // TODO check btoa alternative
  const b64 = u ? b64u : b64s;
  let a;
  let c;

  let l = 0;
  let s = 0;

  return stream.transform(t, value => {
    const r = [];
    const tl = value.length;
    for (let n = 0; n < tl; n++) {
      if (l && (l % 60) === 0 && !u) {
        r.push("\r\n");
      }
      c = value[n];
      if (s === 0) {
        r.push(b64.charAt((c >> 2) & 63));
        a = (c & 3) << 4;
      } else if (s === 1) {
        r.push(b64.charAt(a | ((c >> 4) & 15)));
        a = (c & 15) << 2;
      } else if (s === 2) {
        r.push(b64.charAt(a | ((c >> 6) & 3)));
        l += 1;
        if ((l % 60) === 0 && !u) {
          r.push("\r\n");
        }
        r.push(b64.charAt(c & 63));
      }
      l += 1;
      s += 1;
      if (s === 3) {
        s = 0;
      }
    }
    return r.join('');
  }, () => {
    const r = [];
    if (s > 0) {
      r.push(b64.charAt(a));
      l += 1;
      if ((l % 60) === 0 && !u) {
        r.push("\r\n");
      }
      if (!u) {
        r.push('=');
        l += 1;
      }
    }
    if (s === 1 && !u) {
      if ((l % 60) === 0 && !u) {
        r.push("\r\n");
      }
      r.push('=');
    }
    return r.join('');
  });
}
1299274
function _bitmap_decompress_15($output,$output_width,$output_height,$input_width,$input_height,$input,$size){
 var label=0;
 var sp=STACKTOP; (assert((STACKTOP|0) < (STACK_MAX|0))|0);
 label = 1; 
 while(1)switch(label){
 case 1: 
 var $1;
 var $2;
 var $3;
 var $4;
 var $5;
 var $6;
 var $7;
 var $temp;
 var $rv;
 var $y;
 var $x;
 var $a;
 var $r;
 var $g;
 var $b;
 $1=$output;
 $2=$output_width;
 $3=$output_height;
 $4=$input_width;
 $5=$input_height;
 $6=$input;
 $7=$size;
 var $8=$4;
 var $9=$5;
 var $10=(Math_imul($8,$9)|0);
 var $11=($10<<1);
 var $12=_malloc($11);
 $temp=$12;
 var $13=$temp;
 var $14=$4;
 var $15=$5;
 var $16=$6;
 var $17=$7;
 var $18=_bitmap_decompress2($13,$14,$15,$16,$17);
 $rv=$18;
 $y=0;
 label=2;break;
 case 2: 
 var $20=$y;
 var $21=$3;
 var $22=($20|0)<($21|0);
 if($22){label=3;break;}else{label=9;break;}
 case 3: 
 $x=0;
 label=4;break;
 case 4: 
 var $25=$x;
 var $26=$2;
 var $27=($25|0)<($26|0);
 if($27){label=5;break;}else{label=7;break;}
 case 5: 
 var $29=$y;
 var $30=$4;
 var $31=(Math_imul($29,$30)|0);
 var $32=$x;
 var $33=((($31)+($32))|0);
 var $34=$temp;
 var $35=$34;
 var $36=(($35+($33<<1))|0);
 var $37=HEAP16[(($36)>>1)];
 $a=$37;
 var $38=$a;
 var $39=($38&65535);
 var $40=$39&31744;
 var $41=$40>>10;
 var $42=(($41)&255);
 $r=$42;
 var $43=$a;
 var $44=($43&65535);
 var $45=$44&992;
 var $46=$45>>5;
 var $47=(($46)&255);
 $g=$47;
 var $48=$a;
 var $49=($48&65535);
 var $50=$49&31;
 var $51=(($50)&255);
 $b=$51;
 var $52=$r;
 var $53=($52&255);
 var $54=((($53)*(255))&-1);
 var $55=(((($54|0))/(31))&-1);
 var $56=(($55)&255);
 $r=$56;
 var $57=$g;
 var $58=($57&255);
 var $59=((($58)*(255))&-1);
 var $60=(((($59|0))/(31))&-1);
 var $61=(($60)&255);
 $g=$61;
 var $62=$b;
 var $63=($62&255);
 var $64=((($63)*(255))&-1);
 var $65=(((($64|0))/(31))&-1);
 var $66=(($65)&255);
 $b=$66;
 var $67=$b;
 var $68=($67&255);
 var $69=$68<<16;
 var $70=-16777216|$69;
 var $71=$g;
 var $72=($71&255);
 var $73=$72<<8;
 var $74=$70|$73;
 var $75=$r;
 var $76=($75&255);
 var $77=$74|$76;
 var $78=$y;
 var $79=$2;
 var $80=(Math_imul($78,$79)|0);
 var $81=$x;
 var $82=((($80)+($81))|0);
 var $83=$1;
 var $84=$83;
 var $85=(($84+($82<<2))|0);
 HEAP32[(($85)>>2)]=$77;
 label=6;break;
 case 6: 
 var $87=$x;
 var $88=((($87)+(1))|0);
 $x=$88;
 label=4;break;
 case 7: 
 label=8;break;
 case 8: 
 var $91=$y;
 var $92=((($91)+(1))|0);
 $y=$92;
 label=2;break;
 case 9: 
 var $94=$temp;
 _free($94);
 var $95=$rv;
 STACKTOP=sp;return $95;
  default: assert(0, "bad label: " + label);
 }

}
1077392
function modify( $tpl, $operatorName, $operatorParameters, $rootNamespace, $currentNamespace, &$operatorValue, $namedParameters,
                     $placement )
    {
        switch ( $operatorName )
        {
            case $this->RomanName:
            {
                if ( $namedParameters['value'] !== false )
                    $value = $namedParameters['value'];
                else
                    $value = $operatorValue;

                $operatorValue = $this->buildRoman( $value );
            } break;
            case $this->CountName:
            {
                if ( count( $operatorParameters ) == 0 )
                    $mixedValue =& $operatorValue;
                else
                    $mixedValue = $tpl->elementValue( $operatorParameters[0], $rootNamespace, $currentNamespace, $placement );
                if ( count( $operatorParameters ) > 1 )
                    $tpl->extraParameters( $operatorName, count( $operatorParameters ), 1 );
                if ( is_array( $mixedValue ) )
                    $operatorValue = count( $mixedValue );
                else if ( is_object( $mixedValue ) and
                          method_exists( $mixedValue, 'attributes' ) )
                    $operatorValue = count( $mixedValue->attributes() );
                else if ( is_string( $mixedValue ) )
                    $operatorValue = strlen( $mixedValue );
                else
                    $operatorValue = 0;
            } break;
            case $this->SumName:
            {
                $value = 0;
                if ( $operatorValue !== null )
                    $value = $operatorValue;
                for ( $i = 0; $i < count( $operatorParameters ); ++$i )
                {
                    $tmpValue = $tpl->elementValue( $operatorParameters[$i], $rootNamespace, $currentNamespace, $placement );
                    $value += $tmpValue;
                }
                $operatorValue = $value;
            } break;
            case $this->SubName:
            {
                $values = array();
                if ( $operatorValue !== null )
                    $values[] = $operatorValue;
                for ( $i = 0; $i < count( $operatorParameters ); ++$i )
                {
                    $values[] = $tpl->elementValue( $operatorParameters[$i], $rootNamespace, $currentNamespace, $placement );
                }
                $value = 0;
                if ( count( $values ) > 0 )
                {
                    $value = $values[0];
                    for ( $i = 1; $i < count( $values ); ++$i )
                    {
                        $value -= $values[$i];
                    }
                }
                $operatorValue = $value;
            } break;
            case $this->IncName:
            case $this->DecName:
            {
                if ( $operatorValue !== null )
                    $value = $operatorValue;
                else
                    $value = $namedParameters['value'];
                if ( $operatorName == $this->DecName )
                    --$value;
                else
                    ++$value;
                $operatorValue = $value;
            } break;
            case $this->DivName:
            {
                if ( count( $operatorParameters ) < 1 )
                {
                    $tpl->warning( $operatorName, 'Requires at least 1 parameter value', $placement );
                    return;
                }
                $i = 0;
                if ( $operatorValue !== null )
                    $value = $operatorValue;
                else
                    $value = $tpl->elementValue( $operatorParameters[$i++], $rootNamespace, $currentNamespace, $placement );
                for ( ; $i < count( $operatorParameters ); ++$i )
                {
                    $tmpValue = $tpl->elementValue( $operatorParameters[$i], $rootNamespace, $currentNamespace, $placement );
                    @$value /= $tmpValue;
                }
                $operatorValue = $value;
            } break;
            case $this->ModName:
            {
                if ( count( $operatorParameters ) < 1 )
                {
                    $tpl->warning( $operatorName, 'Missing dividend and divisor', $placement );
                    return;
                }
                if ( count( $operatorParameters ) == 1 )
                {
                    $dividend = $operatorValue;
                    $divisor = $tpl->elementValue( $operatorParameters[0], $rootNamespace, $currentNamespace, $placement );
                }
                else
                {
                    $dividend = $tpl->elementValue( $operatorParameters[0], $rootNamespace, $currentNamespace, $placement );
                    $divisor = $tpl->elementValue( $operatorParameters[1], $rootNamespace, $currentNamespace, $placement );
                }
                $operatorValue = $dividend % $divisor;
            } break;
            case $this->MulName:
            {
                if ( count( $operatorParameters ) < 1 )
                {
                    $tpl->warning( $operatorName, 'Requires at least 1 parameter value', $placement );
                    return;
                }
                $i = 0;
                if ( $operatorValue !== null )
                    $value = $operatorValue;
                else
                    $value = $tpl->elementValue( $operatorParameters[$i++], $rootNamespace, $currentNamespace, $placement );
                for ( ; $i < count( $operatorParameters ); ++$i )
                {
                    $tmpValue = $tpl->elementValue( $operatorParameters[$i], $rootNamespace, $currentNamespace, $placement );
                    $value *= $tmpValue;
                }
                $operatorValue = $value;
            } break;
            case $this->MaxName:
            {
                if ( count( $operatorParameters ) < 1 )
                {
                    $tpl->warning( $operatorName, 'Requires at least 1 parameter value', $placement );
                    return;
                }
                $i = 0;
                if ( $operatorValue !== null )
                {
                    $value = $operatorValue;
                }
                else
                {
                    $value = $tpl->elementValue( $operatorParameters[0], $rootNamespace, $currentNamespace, $placement );
                    ++$i;
                }
                for ( ; $i < count( $operatorParameters ); ++$i )
                {
                    $tmpValue = $tpl->elementValue( $operatorParameters[$i], $rootNamespace, $currentNamespace, $placement );
                    if ( $tmpValue > $value )
                        $value = $tmpValue;
                }
                $operatorValue = $value;
            } break;
            case $this->MinName:
            {
                if ( count( $operatorParameters ) < 1 )
                {
                    $tpl->warning( $operatorName, 'Requires at least 1 parameter value', $placement );
                    return;
                }
                $value = $tpl->elementValue( $operatorParameters[0], $rootNamespace, $currentNamespace, $placement );
                for ( $i = 1; $i < count( $operatorParameters ); ++$i )
                {
                    $tmpValue = $tpl->elementValue( $operatorParameters[$i], $rootNamespace, $currentNamespace, $placement );
                    if ( $tmpValue < $value )
                        $value = $tmpValue;
                }
                $operatorValue = $value;
            } break;
            case $this->AbsName:
            case $this->CeilName:
            case $this->FloorName:
            case $this->RoundName:
            {
                if ( count( $operatorParameters ) < 1 )
                    $value = $operatorValue;
                else
                    $value = $tpl->elementValue( $operatorParameters[0], $rootNamespace, $currentNamespace, $placement );
                switch ( $operatorName )
                {
                    case $this->AbsName:
                    {
                        $operatorValue = abs( $value );
                    } break;
                    case $this->CeilName:
                    {
                        $operatorValue = ceil( $value );
                    } break;
                    case $this->FloorName:
                    {
                        $operatorValue = floor( $value );
                    } break;
                    case $this->RoundName:
                    {
                        $operatorValue = round( $value );
                    } break;
                }
            } break;
            case $this->IntName:
            {
                if ( count( $operatorParameters ) > 0 )
                    $value = $tpl->elementValue( $operatorParameters[0], $rootNamespace, $currentNamespace, $placement );
                else
                    $value = $operatorValue;
                $operatorValue = (int)$value;
            } break;
            case $this->FloatName:
            {
                if ( count( $operatorParameters ) > 0 )
                    $value = $tpl->elementValue( $operatorParameters[0], $rootNamespace, $currentNamespace, $placement );
                else
                    $value = $operatorValue;
                $operatorValue = (float)$value;
            } break;
            case $this->RandName:
            {
                if ( count( $operatorParameters ) == 2 )
                {
                    $operatorValue = mt_rand( $tpl->elementValue( $operatorParameters[0], $rootNamespace, $currentNamespace, $placement ),
                                              $tpl->elementValue( $operatorParameters[1], $rootNamespace, $currentNamespace, $placement ) );
                }
                else
                {
                    $operatorValue = mt_rand();
                }
            } break;
        }
    }
1004369
function parse(c) {

  let ret = [];

  // replace windows line breaks with linux line breaks
  let c1 = c.replace(new RegExp('[\r][\n]', 'g'), '\n');

  // split string to line array
  let c2 = c1.split('\n');

  for (let i = 0; i < c2.length; i++) {

    //line object
    let lo = {};

    // line
    let l = c2[i];

    // trim line
    let l1 = l.trim();

    // set line number
    lo.num = i + 1;

    // set original line
    lo.content = l1;

    // check empty line
    if (l1 === '') {
      lo.isEmpty = true;
    } else {
      lo.isEmpty = false;

      // check line comment
      if (l1.startsWith('#')) {
        lo.isComment = true;
        lo.comment = lo.content.substring(1,lo.content.length).trim();
      } else {
        lo.isComment = false;

        // Check included comments
        lo = Object.assign(lo, checkComment(l1));

        // check key value
        lo = Object.assign(lo, checkKeyValue(lo.contentWithoutComment));

        // check block key
        lo = Object.assign(lo, checkBlockKey(lo));
        
    
      }
    }

    //console.log(lo);

    ret.push(lo);
  }

  checkBlockEndSum(ret);
  determineDepth(ret);

  return ret;
}
152802
function Compiler(options) {
  options = options || {};
  Base.call(this, options);
  this.indentation = options.indent;
}
163893
function compileSourcePreCode() {
    var $version = '##version##';

    var componentRenderers = {};

    function extend(target, source) {
        if (source) {
            Object.keys(source).forEach(function (key) {
                var value = source[key];
                if (typeof value !== 'undefined') {
                    target[key] = value;
                }
            });
        }

        return target;
    }

    function each(array, iterator) {
        if (array && array.length > 0) {
            for (var i = 0, l = array.length; i < l; i++) {
                if (iterator(array[i], i) === false) {
                    break;
                }
            }
        }
    }

    function contains(array, value) {
        var result;
        each(array, function (item) {
            result = item === value;
            return !result;
        });

        return result;
    }

    var HTML_ENTITY = {
        /* jshint ignore:start */
        '&': '&amp;',
        '<': '&lt;',
        '>': '&gt;',
        '"': '&quot;',
        /* eslint-disable quotes */
        "'": '&#39;'
        /* eslint-enable quotes */
        /* jshint ignore:end */
    };

    function htmlFilterReplacer(c) {
        return HTML_ENTITY[c];
    }

    function escapeHTML(source) {
        if (source == null) {
            return '';
        }

        if (typeof source === 'string') {
            return source ? source.replace(/[&<>"']/g, htmlFilterReplacer) : '';
        }

        return '' + source;
    }

    function _classFilter(source) {
        if (source instanceof Array) {
            return source.join(' ');
        }

        return source;
    }

    function _styleFilter(source) {
        if (typeof source === 'object') {
            var result = '';
            if (source) {
                Object.keys(source).forEach(function (key) {
                    result += key + ':' + source[key] + ';';
                });
            }

            return result;
        }

        return source;
    }

    function _xclassFilter(source) {
        if (source instanceof Array) {
            source = source.join(' ');
        }

        return source ? ' ' + source : '';
    }

    function _xstyleFilter(source) {
        var result;
        if (typeof source === 'object') {
            result = '';
            if (source) {
                Object.keys(source).forEach(function (key) {
                    result += key + ':' + source[key] + ';';
                });
            }
        }
        else {
            result = source;
        }

        return result ? ';' + result : '';
    }

    function attrFilter(name, value) {
        if (value) {
            return ' ' + name + '="' + value + '"';
        }

        return '';
    }

    function boolAttrFilter(name, value) {
        if (value && value !== 'false' && value !== '0') {
            return ' ' + name;
        }

        return '';
    }

    function callFilter(ctx, name, args) {
        var filter = ctx.proto.filters[name];
        if (typeof filter === 'function') {
            return filter.apply(ctx, args);
        }
    }
}
105032
function main() {
	var snippet;
	var header;
	var fpath;
	var keys;
	var lang;
	var conf;
	var len;
	var i;

	keys = objectKeys( LANGS );
	len = keys.length;

	debug( 'Generating %d license header snippets...', len );
	for ( i = 0; i < len; i++ ) {
		lang = keys[ i ];

		debug( 'Generating license header for `%s`...', lang );
		if ( lang === 'default' ) {
			header = licenseHeader( SPDX, DEFAULT_HEADER_LANG, OPTS );
		} else {
			header = licenseHeader( SPDX, lang, OPTS );
		}
		if ( header === null ) {
			debug( 'Failed to generate a license header for `%s`.', lang );
			continue;
		}
		conf = LANGS[ lang ];

		debug( 'Generating license header snippet...' );
		snippet = createSnippet( header, conf );

		debug( 'Writing license header snippet to file...' );
		if ( lang === 'default' ) {
			fpath = join( OUT_DIR, 'stdlib-license.sublime-snippet' );
		} else {
			fpath = join( OUT_DIR, 'stdlib-license-'+lang+'.sublime-snippet' );
		}
		writeFileSync( fpath, snippet, FOPTS );

		debug( 'Successfully generated license header snippet.' );
	}
	debug( 'Finished generating snippets.' );
}
615787
function(preScripture){

      this.stdin.resume();
      this.stdin.setEncoding('utf8');
      this.stdin.on('data', this.checkInput.bind(this));

      var _fillStrBlue = '................................................................................';
      var _lengthOfSprite = _fillStrBlue.length;
      var _fillerStrLengthForConsoleWidth = Math.floor(_lengthOfSprite / 2);

      var _fillerStrForConsolePadding = '';

      for(var oo = 0; oo < _fillerStrLengthForConsoleWidth; oo++){
        _fillerStrForConsolePadding += '.';
      }

      util.puts("Loading PatsyJS...".bold);
      util.print('\n'+
      _fillerStrForConsolePadding.inverse.blue + '................................................................................'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '................................................................................'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '................................................................................'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '................................................................................'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '......................................................'.inverse.blue + ',:::::::,,,,'.inverse.yellow + '..............'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '................................................'.inverse.blue + ',,::'.inverse.yellow + '~~~~~~======'.inverse.white + '+=,'.inverse.yellow + '.............'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '.........................,'.inverse.blue + '$$~I+'.inverse.yellow + '..............'.inverse.blue + ',::'.inverse.yellow + '~~'.inverse.white + '::::::::::::::'.white + '~'.inverse.white + '+=,'.inverse.yellow + '............'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '...................'.inverse.blue + '++Z7$7=~~~+?7ZOZZO?'.inverse.yellow + '.....'.inverse.blue + ',:'.inverse.yellow + '~~'.inverse.white + '::::::::::~~~~::'.white + '::'.inverse.white + '+?:'.inverse.yellow + '............'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '................'.inverse.blue + 'OZ$~?~'.inverse.yellow + ':::,,:,,,,,,'.inverse.white + '::~IZZ8Z:'.inverse.yellow + '~:'.inverse.white + ':::::::::~:~~~~~:'.white + '::'.inverse.white + '~II:,'.inverse.yellow + '...........'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '..............'.inverse.blue + 'ZZZ~'.inverse.yellow + '::,:,,,,,.,.....,,,,'.inverse.white + '::=78~~'.inverse.yellow + '::::::::::::~~~:'.white + '::'.inverse.white + '~IZI:,'.inverse.yellow + '...........'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '...........'.inverse.blue + 'I:IZO~'.inverse.yellow + ':,,,.,,,,,'.inverse.white + '::~:'.white + ',,,,...,,,'.inverse.white + '::78,'.inverse.yellow + ':::::::::::::'.white + ':::'.inverse.white + '=7ZZI:,'.inverse.yellow + '...........'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '...........'.inverse.blue + '=IZO~'.inverse.yellow + ':,,,.,'.inverse.white + '~~~~~~==~=~~~~'.white + ':,,...,'.inverse.white + ':~DO,'.inverse.yellow + ',,'.inverse.white + '::::::'.white + ':::~'.inverse.white + '=IZZZZ?:'.inverse.yellow + '............'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '...........'.inverse.blue + '~Z7$'.inverse.yellow + ':,,,,,'.inverse.white + '=~~=~========~=~~~~'.white + '...,,'.inverse.white + ':IO~'.inverse.yellow + '~~~~~~='.inverse.white + '?I$OOZZZZ$=,'.inverse.yellow + '............'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '..........'.inverse.blue + 'Z$O$O~'.inverse.yellow + ':,,,'.inverse.white + '~=~~~==============~~'.white + ',,,,'.inverse.white + '::$O$ZZZOOOOOOOOZZZZ?:'.inverse.yellow + '.............'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '..........'.inverse.blue + 'ZO$$Z~'.inverse.yellow + ':,,,'.inverse.white + '=~~~~~~==============~'.white + ':,,'.inverse.white + '::~OOZOOZZOOOOOOOOZ$~'.inverse.yellow + ','.inverse.grey + '.............'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '.........'.inverse.blue + '~ZOZOO7'.inverse.yellow + ':,,,'.inverse.white + '=~~~~~~~~=============~'.white + ':,,,'.inverse.white + ':~OZZZOOOOOOOOOOO+'.inverse.yellow + ','.inverse.grey + '..............'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '.........'.inverse.blue + 'O8OOOZZ'.inverse.yellow + '::,,:'.inverse.white + '~~~~~~~~~====~~=======~'.white + ',,,,'.inverse.white + '~IZOOOOOOOOOZOZ?:'.inverse.yellow + ',,'.inverse.grey + '.............'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '.........'.inverse.blue + 'NZ$788ZI'.inverse.yellow + ':,,,'.inverse.white + '~~~~~~~~~~=~~~~~======~'.white + ',.,,'.inverse.white + ':~OIO8888888Z7+'.inverse.yellow + '~~:::,,,,'.inverse.grey + '........'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '........'.inverse.blue + '=Z$Z8OZ$$7'.inverse.yellow + ':,,,'.inverse.white + '~~~~~~~~=~~~~~~~====~~'.white + ',,,,'.inverse.white + '::ZODDDDD8Z7+='.inverse.yellow + '~~~~::::::,,,'.inverse.grey + '.....'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '........'.inverse.blue + ':$8$OZZOZO7'.inverse.yellow + ':,,,,'.inverse.white + '~~~~~~~~~~~~~~===~~~'.white + ',.,,'.inverse.white + ':~ZO?IIIII?+='.inverse.yellow + '~~~::::::,,,,'.inverse.grey + '......'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '.......'.inverse.blue + '+?Z$O$OZZZOOO'.inverse.yellow + ':,,,,:'.inverse.white + '~~~~~~~~~~~~=~~~~'.white + ',.,,,'.inverse.white + ':~ZI'.inverse.yellow + '::::::::::,,,,,,'.inverse.grey + '............'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '.........'.inverse.blue + 'Z78ZO88OZ7$$='.inverse.yellow + ':,,,,'.inverse.white + '~~~~~~~~=~~~~~'.white + '::.,,,,'.inverse.white + ':7Z='.inverse.yellow + ',,,,,,,,,,,,,,,'.inverse.grey + '.............'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '.........'.inverse.blue + ':OZ8ZZ8ZZ$?$$$'.inverse.yellow + ':,,,,.,,,'.inverse.white + ':::=::'.white + '...,..,,'.inverse.white + '::~ZI'.inverse.yellow + ',,,,,,,,,,,,,,,'.inverse.grey + '..............'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '.........'.inverse.blue + '.7ZZO88OZ8ZOOZOO'.inverse.yellow + ':,,,,,.....,,,,,,,,,'.inverse.white + '::=ZI'.inverse.yellow + '......'.inverse.blue + ',.,,,,,'.inverse.grey + '.................'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '...........'.inverse.blue + 'IZ$88OOOOZZ88Z7OZ~'.inverse.yellow + ':,,,,,,,,,,,'.inverse.white + '::::$OZZ:'.inverse.yellow + '..............................'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '............'.inverse.blue + 'ZZZZO$Z$OOOZOO$77OZI77+'.inverse.yellow + ':::ZOOOZZZZ$8'.inverse.yellow + '................................'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '............'.inverse.blue + '+878$$ZZDZZOOZZZOO$ZOOZO7Z7$$Z$OO7?'.inverse.yellow + '.................................'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '.....'.inverse.blue + ',,,,,,,,,'.inverse.grey + 'Z$OZOZ8ZOOO$O$O7Z$OO$$$8OOOOZZZ7'.inverse.yellow + '..................................'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '..'.inverse.blue + ',,,,,,,,,,,,,,'.inverse.grey + 'OOO8Z88OZD8OOO$8Z8$8OZZO7Z7O'.inverse.yellow + '....................................'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '..'.inverse.blue + ',,,,,,,,,,,,:~+?'.inverse.grey + 'OD8D$O888OOOOZ$88OZ$Z8O~~'.inverse.yellow + '~::,,'.inverse.grey + '................................'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '...'.inverse.blue + ',,,,,,,,,~=+++???'.inverse.grey + '8D8DD8NDDDO88NOD8?7==='.inverse.yellow + '~~~:::::,,,'.inverse.grey + '...........................'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '.......'.inverse.blue + ',,,::=++??IZ78O'.inverse.grey + '8NNDDNMNM8MZZ$7I?+'.inverse.yellow + '==~~~::::,,,,,,,,'.inverse.grey + '.......................'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '............'.inverse.blue + ',:=+??I7$$$'.inverse.grey + 'ZZZOOO8OOOZ$7I?+'.inverse.yellow + '=~~::::,,,,,,,,,'.inverse.grey + '.........................'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '...............'.inverse.blue + ',,:~~==============~~~~:::::,,,,,,'.inverse.grey + '...............................'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue);


      if ((Array.isArray(preScripture)) && (preScripture.length > 0)) {
        for (var i = 0; i < preScripture.length; i++) {
          this.scripture.print(preScripture[i]);
        }
      }

      this.scripture.print('[King Arthur]'.magenta + ': Come Patsy, my trusty servant!!');
      this.scripture.print('[Patsy]'.yellow + ': <banging two half coconuts together> ');

      try{
        var patsy = this;
        /**
         * Require project from the library
         *
         * @var     Object
         * @source  patsy
         */
        var project = require('./project')(opts);
        project.check(patsy);
      } catch(e){
        console.log('>> PatsyStartException'.red + ':', e);
      }
    }
1265011
function Input(server) {
  // Konstruktorin sisältöä ei dokumentoida
  /**#nocode+*/

  var self = this
    , rli = readline.createInterface(process.stdin, process.stdout, function (partial) {
      return [server.commands.suggest(partial), partial];
    });

  process.stdin.resume();
  process.stdin.setEncoding('utf8');

  if (process.platform !== "win32") {
    process.on('SIGINT', function processSIGINT() {
      log.notice('Received ' + 'SIGINT'.red);
      // Lakataan kuuntelemasta stdin-syötettä.
      // Node sulkeutuu jahka kaikki eventit on kutsuttu, eikä uusia ole lisätty event-luuppiin.
      process.stdin.destroy();
      server.close();
    });
  }

  rli.on('close', function rliClose() {
    process.stdin.destroy();
    server.close();
  });

  rli.on('line', function rliLine(input){
    var msg = input.trim();
    if (!msg) { return; }
    // Käsitellään serverikomennot
    server.commands.call(msg.split(' ')[0], splitString(msg).splice(1));
  });

  // Tästä eteenpäin dokumentoidaan taas jos on jotain dokumentoitavaa
  /**#nocode-*/
}