\FF\D8\FF\E0\00JFIF\00\00\00d\00d\00\00\FF\FE\00\border bs:0 bc:#000000 ps:0 pc:#ffffff es:0 ec:#000000 ck:feee6c715d26fd9f38b0ca4278c05026\FF\DB\00C\00P7<F<2PFAFZUP_xxnnx\F5\AF\B9\91\C8\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\DB\00CUZZxix‚\EB\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\C0\00\00b\00d\00\FF\C4\00\00\00\00\00\00\00\00\00\00\00\00\00\00\FF\C4\00\00\00\00\00\00\00\00\00\00\001A!Q\FF\C4\00\00\00\00\00\00\00\00\00\00\00\00\00\FF\C4\00\00\00\00\00\00\00\00\00\00!1AQ\FF\DA\00\00\00?\00\F6\00\00\00\00\00\00\00\00\00\00\A0\00\00\C5\CF\F8\E7Ó\FCjD~\B9^\AD\%\B3]\D8cs-\BBs,-\A0\00"\80\00%\B83rÏ^K~F\A4ea\00E\00\C6\EE=u\B1\9B\D1\00@\00r\BE8\F9:\FE5#.M\00\E7\CB\C9q\CBq\D6\F2\BE\B7\C7>\C9n5×\D6?\BDê\9Ds\EBp\9F[`8m\B7)o\B5\E8\E6I\99\FE3]]A2\BA\8Cw\D6E\93\\DEv\C8\009\F2\F1NI?uc\\F5\EA\96k\xN<~buv\EA\C8\D7	\8B\84\CEcxI\BBg\AE\9E=\D6+n\EC\80\C8A\8C\AE\EB\CF\D5\DA\E9"2\A4\B9j5\EB\F3W\B63\96\B30Yu\DA\FC8\ED\DF\E7Ms\FB\F1\8E\B3\FA\EA\E8\E6(\883zs\F2_\8DFk\8Bh
\00\8C\DCw\D3R\B5+6X\BA\B2\C4j\AB0\B4\FCMw\C2I\8E\9B\E3\A9~9u\FA\D3l\80\C8%p\EE\FDn2€
\00$\FEj\C4e\A9\DB\~\95\A7\A5\80EK\BB\8DDsP\00@@AD'k\CF\E8\DB\D2(\80\9AK\D3\85\D6lb\F2\BA\8C*\80\00)\95
59\A3R:\F3\CE"\B6\80\88\00\00i1u4ê\E9\F2á\A6\A2\FACM\93WMb*\E0*\00\00\00\00\00(\A8\80\00\00\80\00\00\00\00\00\00\00\00\00\FF\D9<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>C///</title>
</head>
module Inspec
  # Provides simple terminal UI interaction primitives for CLI commands and plugins.
  class UI
    ANSI_CODES = {
      reset: "\e[0m",
      bold: "\e[1m",
      color: {
        red: "\e[38;5;9m", # 256-color light red
        green: "\e[38;5;41m",  # 256-color light green
        yellow: "\e[33m",
        cyan: "\e[36m",
        white: "\e[37m",
        grey: "\e[38;5;247m",  # 256-color medium grey
      },
    }.freeze

    GLYPHS = {
      bullet: "â€¢", # BULLET, Unicode: U+2022, UTF-8: E2 80 A2
      check: "âœ”", #  HEAVY CHECK MARK, Unicode: U+2714, UTF-8: E2 9C 94
      swirl: "â†º", # ANTICLOCKWISE OPEN CIRCLE ARROW, Unicode U+21BA, UTF-8: E2 86 BA
      script_x: "Ã—", # MULTIPLICATION SIGN, Unicode: U+00D7, UTF-8: C3 97
      question: "?", # normal ASCII question mark
      em_dash: "â”€", # BOX DRAWINGS LIGHT HORIZONTAL Unicode: U+2500, UTF-8: E2 94 80
      heavy_dash: "â‰–", # RING IN EQUAL TO, Unicode: U+2256, UTF-8: E2 89 96
      vertical_dash: "â”‚", # BOX DRAWINGS LIGHT VERTICAL, Unicode: U+2502, UTF-8: E2 94 82
      table_corner: "â¨€", # N-ARY CIRCLED DOT OPERATOR, Unicode: U+2A00, UTF-8: E2 A8 80
    }.freeze

    EXIT_NORMAL = 0
    EXIT_USAGE_ERROR = 1
    EXIT_PLUGIN_ERROR = 2
    EXIT_FATAL_DEPRECATION = 3
    EXIT_LICENSE_NOT_ACCEPTED = 172
    EXIT_FAILED_TESTS = 100
    EXIT_SKIPPED_TESTS = 101

    attr_reader :io

    def initialize(opts = {})
      @color = opts[:color].nil? ? true : opts[:color]
      @interactive = opts[:interactive].nil? ? $stdout.isatty : opts[:interactive]
      @io = opts[:io] || $stdout
    end

    def color?
      @color
    end

    def print_or_return(str, print_flag)
      io.print(str) if print_flag
      str
    end

    #=========================================================================#
    #                   Low-level formatting methods
    #=========================================================================#

    def plain(str, opts = { print: true })
      print_or_return(str.to_s, opts[:print])
    end

    def plain_line(str = "", opts = { print: true })
      print_or_return(str.to_s + "\n", opts[:print])
    end

    def bold(str, opts = { print: true })
      result = color? ? io.print(ANSI_CODES[:bold] + str.to_s + ANSI_CODES[:reset]) : str.to_s
      print_or_return(result, opts[:print])
    end

    ANSI_CODES[:color].keys.each do |color|
      define_method(color) do |str, opts = { print: true }|
        result = color? ? (ANSI_CODES[:color][color] + str.to_s + ANSI_CODES[:reset]) : str.to_s
        print_or_return(result, opts[:print])
      end
    end

    #=========================================================================#
    #                   High-Level formatting methods
    #=========================================================================#

    def emphasis(str, opts = { print: false })
      cyan(str, opts)
    end

    def headline(str, opts = { print: true })
      str = str.dup.to_s
      if str.length < 76
        dash_length = 80 - str.length - 4 # 4 spaces
        dash_length /= 2
      else
        dash_length = 0
      end

      result = "\n"
      result += " " + (color? ? GLYPHS[:em_dash] : "-") * dash_length + " "
      result += color? ? ANSI_CODES[:bold] + ANSI_CODES[:color][:white] : ""
      result += str
      result += color? ? ANSI_CODES[:reset] : ""
      result += " " + (color? ? GLYPHS[:em_dash] : "-") * dash_length + " "
      result += "\n\n"

      print_or_return(result, opts[:print])
    end

    # Issues a one-line message, with 'ERROR: ' prepended in bold red.
    def error(str, opts = { print: true })
      str = str.dup.to_s
      result = ""
      result += color? ? ANSI_CODES[:bold] + ANSI_CODES[:color][:red] : ""
      result += "ERROR:"
      result += color? ? ANSI_CODES[:reset] : ""
      result += " "
      result += str
      result += "\n"
      print_or_return(result, opts[:print])
    end

    # Issues a one-line message, with 'WARNING: ' prepended in bold yellow.
    def warning(str, opts = { print: true })
      str = str.dup.to_s
      result = ""
      result += color? ? ANSI_CODES[:bold] + ANSI_CODES[:color][:yellow] : ""
      result += "WARNING:"
      result += color? ? ANSI_CODES[:reset] : ""
      result += " "
      result += str
      result += "\n"
      print_or_return(result, opts[:print])
    end

    # Draws a horizontal line.
    def line(opts = { print: true })
      if color?
        result = ANSI_CODES[:bold] + GLYPHS[:heavy_dash] * 80 + ANSI_CODES[:reset] + "\n"
      else
        result = "-" * 80 + "\n"
      end
      print_or_return(result, opts[:print])
    end

    # Makes a bullet point.
    def list_item(str, opts = { print: true })
      bullet = color? ? ANSI_CODES[:bold] + ANSI_CODES[:color][:white] + GLYPHS[:bullet] + ANSI_CODES[:reset] : "*"
      result = " " + bullet + " " + str.to_s + "\n"
      print_or_return(result, opts[:print])
    end

    # Makes a table.  Call with a block; block arg will be a TTY::Table object,
    # with an extension for setting the header.
    # Typical use:
    # ui.table do |t|
    #   t.header = ['Name', 'Rank', 'Cereal Number']
    #   t << ['Crunch', 'Captain', 1]
    #   t << ['', '', 1]
    #  end
    def table(opts = { print: true })
      require "inspec/ui_table_helper"

      the_table = TableHelper.