ronald 11 kuukautta sitten
commit
713940b89d
100 muutettua tiedostoa jossa 12093 lisäystä ja 0 poistoa
  1. 5 0
      composer.json
  2. 125 0
      composer.lock
  3. 150 0
      factura_electronica.php
  4. 25 0
      vendor/autoload.php
  5. 579 0
      vendor/composer/ClassLoader.php
  6. 359 0
      vendor/composer/InstalledVersions.php
  7. 21 0
      vendor/composer/LICENSE
  8. 10 0
      vendor/composer/autoload_classmap.php
  9. 9 0
      vendor/composer/autoload_namespaces.php
  10. 10 0
      vendor/composer/autoload_psr4.php
  11. 38 0
      vendor/composer/autoload_real.php
  12. 37 0
      vendor/composer/autoload_static.php
  13. 118 0
      vendor/composer/installed.json
  14. 41 0
      vendor/composer/installed.php
  15. 26 0
      vendor/composer/platform_check.php
  16. 4 0
      vendor/mike42/escpos-php/.coveralls.yml
  17. 16 0
      vendor/mike42/escpos-php/.gitignore
  18. 40 0
      vendor/mike42/escpos-php/.travis.yml
  19. 65 0
      vendor/mike42/escpos-php/CONTRIBUTING.md
  20. 25 0
      vendor/mike42/escpos-php/CONTRIBUTORS.md
  21. 22 0
      vendor/mike42/escpos-php/LICENSE.md
  22. 575 0
      vendor/mike42/escpos-php/README.md
  23. 44 0
      vendor/mike42/escpos-php/composer.json
  24. 2216 0
      vendor/mike42/escpos-php/composer.lock
  25. 142 0
      vendor/mike42/escpos-php/doc/FAQ.md
  26. 20 0
      vendor/mike42/escpos-php/doc/Makefile
  27. 2352 0
      vendor/mike42/escpos-php/doc/escpos.doxyfile
  28. 26 0
      vendor/mike42/escpos-php/example/README.md
  29. 207 0
      vendor/mike42/escpos-php/example/barcode.php
  30. 36 0
      vendor/mike42/escpos-php/example/bit-image.php
  31. 63 0
      vendor/mike42/escpos-php/example/character-encodings-with-images.php
  32. 60 0
      vendor/mike42/escpos-php/example/character-encodings.php
  33. 75 0
      vendor/mike42/escpos-php/example/character-tables.php
  34. 51 0
      vendor/mike42/escpos-php/example/customer-display.php
  35. 171 0
      vendor/mike42/escpos-php/example/demo.php
  36. 36 0
      vendor/mike42/escpos-php/example/graphics.php
  37. 8 0
      vendor/mike42/escpos-php/example/interface/README.md
  38. 19 0
      vendor/mike42/escpos-php/example/interface/cups.php
  39. 22 0
      vendor/mike42/escpos-php/example/interface/ethernet.php
  40. 33 0
      vendor/mike42/escpos-php/example/interface/linux-usb.php
  41. 52 0
      vendor/mike42/escpos-php/example/interface/smb.php
  42. 31 0
      vendor/mike42/escpos-php/example/interface/windows-lpt.php
  43. 34 0
      vendor/mike42/escpos-php/example/interface/windows-usb.php
  44. 48 0
      vendor/mike42/escpos-php/example/margins-and-spacing.php
  45. 95 0
      vendor/mike42/escpos-php/example/pdf417-code.php
  46. 86 0
      vendor/mike42/escpos-php/example/print-from-html.php
  47. 78 0
      vendor/mike42/escpos-php/example/print-from-pdf.php
  48. 86 0
      vendor/mike42/escpos-php/example/qr-code.php
  49. 76 0
      vendor/mike42/escpos-php/example/rawbt-receipt.html
  50. 145 0
      vendor/mike42/escpos-php/example/rawbt-receipt.php
  51. 104 0
      vendor/mike42/escpos-php/example/receipt-with-logo.php
  52. 35 0
      vendor/mike42/escpos-php/example/resources/character-encoding-test-strings.inc
  53. 21 0
      vendor/mike42/escpos-php/example/resources/document.html
  54. BIN
      vendor/mike42/escpos-php/example/resources/document.odt
  55. BIN
      vendor/mike42/escpos-php/example/resources/document.pdf
  56. BIN
      vendor/mike42/escpos-php/example/resources/document.z
  57. BIN
      vendor/mike42/escpos-php/example/resources/escpos-php-small.png
  58. BIN
      vendor/mike42/escpos-php/example/resources/escpos-php.png
  59. BIN
      vendor/mike42/escpos-php/example/resources/rawbtlogo.png
  60. BIN
      vendor/mike42/escpos-php/example/resources/tulips.png
  61. BIN
      vendor/mike42/escpos-php/example/resources/tux.png
  62. 21 0
      vendor/mike42/escpos-php/example/specific/123-code128-barcode.php
  63. 54 0
      vendor/mike42/escpos-php/example/specific/141-custom-command.php
  64. 35 0
      vendor/mike42/escpos-php/example/specific/148-data-uri.php
  65. 28 0
      vendor/mike42/escpos-php/example/specific/235-get-data.php
  66. 25 0
      vendor/mike42/escpos-php/example/specific/29-latvian-star-tup592.php
  67. 39 0
      vendor/mike42/escpos-php/example/specific/32-german-tm-t20-ii-custom-command.php
  68. 19 0
      vendor/mike42/escpos-php/example/specific/33-spanish-seypos-prp-300.php
  69. 24 0
      vendor/mike42/escpos-php/example/specific/37-chinese.php
  70. 77 0
      vendor/mike42/escpos-php/example/specific/39-currency-symbols.php
  71. 35 0
      vendor/mike42/escpos-php/example/specific/44-pound-symbol-star-tsp650.php
  72. 19 0
      vendor/mike42/escpos-php/example/specific/50-P-822D-greek.php
  73. 64 0
      vendor/mike42/escpos-php/example/specific/54-gfx-sidebyside.php
  74. 74 0
      vendor/mike42/escpos-php/example/specific/6-arabic-epos-tep-220m.php
  75. 15 0
      vendor/mike42/escpos-php/example/specific/62-greek-symbol-swap.php
  76. 21 0
      vendor/mike42/escpos-php/example/specific/68-redblack.php
  77. 28 0
      vendor/mike42/escpos-php/example/specific/97-dithering.php
  78. 7 0
      vendor/mike42/escpos-php/example/specific/README.md
  79. 65 0
      vendor/mike42/escpos-php/example/text-size.php
  80. 22 0
      vendor/mike42/escpos-php/example/unifont-print-buffer.php
  81. 16 0
      vendor/mike42/escpos-php/example/upside-down.php
  82. 21 0
      vendor/mike42/escpos-php/phpunit.xml
  83. 350 0
      vendor/mike42/escpos-php/src/Mike42/Escpos/CapabilityProfile.php
  84. 198 0
      vendor/mike42/escpos-php/src/Mike42/Escpos/CodePage.php
  85. 152 0
      vendor/mike42/escpos-php/src/Mike42/Escpos/Devices/AuresCustomerDisplay.php
  86. 466 0
      vendor/mike42/escpos-php/src/Mike42/Escpos/EscposImage.php
  87. 38 0
      vendor/mike42/escpos-php/src/Mike42/Escpos/Experimental/Unifont/ColumnFormatGlyph.php
  88. 21 0
      vendor/mike42/escpos-php/src/Mike42/Escpos/Experimental/Unifont/ColumnFormatGlyphFactory.php
  89. 129 0
      vendor/mike42/escpos-php/src/Mike42/Escpos/Experimental/Unifont/FontMap.php
  90. 246 0
      vendor/mike42/escpos-php/src/Mike42/Escpos/Experimental/Unifont/UnifontGlyphFactory.php
  91. 104 0
      vendor/mike42/escpos-php/src/Mike42/Escpos/Experimental/Unifont/UnifontPrintBuffer.php
  92. 88 0
      vendor/mike42/escpos-php/src/Mike42/Escpos/GdEscposImage.php
  93. 272 0
      vendor/mike42/escpos-php/src/Mike42/Escpos/ImagickEscposImage.php
  94. 40 0
      vendor/mike42/escpos-php/src/Mike42/Escpos/NativeEscposImage.php
  95. 304 0
      vendor/mike42/escpos-php/src/Mike42/Escpos/PrintBuffers/EscposPrintBuffer.php
  96. 138 0
      vendor/mike42/escpos-php/src/Mike42/Escpos/PrintBuffers/ImagePrintBuffer.php
  97. 66 0
      vendor/mike42/escpos-php/src/Mike42/Escpos/PrintBuffers/PrintBuffer.php
  98. BIN
      vendor/mike42/escpos-php/src/Mike42/Escpos/PrintBuffers/cache/Characters-OCD-300.ser.z
  99. BIN
      vendor/mike42/escpos-php/src/Mike42/Escpos/PrintBuffers/cache/Characters-default.ser.z
  100. BIN
      vendor/mike42/escpos-php/src/Mike42/Escpos/PrintBuffers/cache/Characters-simple.ser.z

+ 5 - 0
composer.json

@@ -0,0 +1,5 @@
+{
+    "require": {
+        "mike42/escpos-php": "^4.0"
+    }
+}

+ 125 - 0
composer.lock

@@ -0,0 +1,125 @@
+{
+    "_readme": [
+        "This file locks the dependencies of your project to a known state",
+        "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
+        "This file is @generated automatically"
+    ],
+    "content-hash": "74cf4d9bad2c19cbdbd3a1767bd9ea10",
+    "packages": [
+        {
+            "name": "mike42/escpos-php",
+            "version": "v4.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/mike42/escpos-php.git",
+                "reference": "74fd89a3384135c90a8c6dc4b724e03df7c0e4f9"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/mike42/escpos-php/zipball/74fd89a3384135c90a8c6dc4b724e03df7c0e4f9",
+                "reference": "74fd89a3384135c90a8c6dc4b724e03df7c0e4f9",
+                "shasum": ""
+            },
+            "require": {
+                "ext-intl": "*",
+                "ext-json": "*",
+                "ext-zlib": "*",
+                "mike42/gfx-php": "^0.6",
+                "php": ">=7.3.0"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^9",
+                "squizlabs/php_codesniffer": "^3.3"
+            },
+            "suggest": {
+                "ext-gd": "Used for image printing if present.",
+                "ext-imagick": "Will be used for image printing if present. Required for PDF printing or use of custom fonts."
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "Mike42\\": "src/Mike42"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Michael Billington",
+                    "email": "michael.billington@gmail.com"
+                }
+            ],
+            "description": "PHP receipt printer library for use with ESC/POS-compatible thermal and impact printers",
+            "homepage": "https://github.com/mike42/escpos-php",
+            "keywords": [
+                "Epson",
+                "barcode",
+                "escpos",
+                "printer",
+                "receipt-printer"
+            ],
+            "support": {
+                "issues": "https://github.com/mike42/escpos-php/issues",
+                "source": "https://github.com/mike42/escpos-php/tree/v4.0"
+            },
+            "time": "2022-05-23T11:05:09+00:00"
+        },
+        {
+            "name": "mike42/gfx-php",
+            "version": "v0.6",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/mike42/gfx-php.git",
+                "reference": "ed9ded2a9298e4084a9c557ab74a89b71e43dbdb"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/mike42/gfx-php/zipball/ed9ded2a9298e4084a9c557ab74a89b71e43dbdb",
+                "reference": "ed9ded2a9298e4084a9c557ab74a89b71e43dbdb",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.0.0"
+            },
+            "require-dev": {
+                "phpbench/phpbench": "@dev",
+                "phpunit/phpunit": "^6.5",
+                "squizlabs/php_codesniffer": "^3.3.1"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "Mike42\\": "src/Mike42"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "LGPL-2.1-or-later"
+            ],
+            "authors": [
+                {
+                    "name": "Michael Billington",
+                    "email": "michael.billington@gmail.com"
+                }
+            ],
+            "description": "The pure PHP graphics library",
+            "homepage": "https://github.com/mike42/gfx-php",
+            "support": {
+                "issues": "https://github.com/mike42/gfx-php/issues",
+                "source": "https://github.com/mike42/gfx-php/tree/v0.6"
+            },
+            "time": "2019-10-05T02:44:33+00:00"
+        }
+    ],
+    "packages-dev": [],
+    "aliases": [],
+    "minimum-stability": "stable",
+    "stability-flags": [],
+    "prefer-stable": false,
+    "prefer-lowest": false,
+    "platform": [],
+    "platform-dev": [],
+    "plugin-api-version": "2.6.0"
+}

+ 150 - 0
factura_electronica.php

@@ -0,0 +1,150 @@
+<?php
+header("Access-Control-Allow-Origin: *");
+
+require __DIR__ . '/vendor/autoload.php';
+use Mike42\Escpos\Printer;
+use Mike42\Escpos\PrintConnectors\WindowsPrintConnector;
+use Mike42\Escpos\EscposImage;
+use Mike42\Escpos\PrintConnectors\FilePrintConnector;
+
+//Printer Name
+const PRINTER_NAME = 'POS-80C';
+
+$dataPrint = json_decode($_POST["dataPrint"]);
+
+if($dataPrint){
+    //CONFIGURACIONES
+    $maxDescripcion = 25; //Maximo de caracteres por linea para la descripcion del producto
+    $hashEmpresa = "d1ac201a29655ce75bd01772528a6595dd41f9f7";
+    //DATOS
+    $nombreEmpresa = $dataPrint->nombre_empresa;
+    $razonSocial = $dataPrint->rsocial_empresa;
+    $giro = $dataPrint->giro_empresa;
+    $documentoDueno = "NRC: ".$dataPrint->nrc_empresa." | NIT: ".$dataPrint->nit_empresa;
+    $direccion = $dataPrint->direcion_empresa;
+
+    $fecha = $dataPrint->fecha;
+    $caja = $dataPrint->caja;
+
+    $clienteNombre = $dataPrint->cliente;
+
+    $productos = $dataPrint->productos_normal;
+
+    $totalGravado = $dataPrint->totalGrabadas;
+    $totalExento = $dataPrint->totalExento;
+    $totalNoSujeto = $dataPrint->totalNS;
+    $totalFinal = $dataPrint->totales->totalTotal;
+
+    $dteNControl = $dataPrint->dte_numero_control;
+    $dteCodGen = $dataPrint->dte_codigo_generacion;
+
+    $disclaimer = "Este comprobante no es un documento fiscal. Su DTE será enviado al correo electrónico proporcionado.";
+    $qrMessage = "También puedes escanear el código QR para ver y descargar tu factura electrónica en línea.";
+
+    $mensaje = "¡Gracias por su compra!";
+    $urlQR = "https://consultadte.factuexpress.com.sv?h=$hashEmpresa&dte=.$dteNControl";
+
+    $numeroReferencia = $dataPrint->referencia;
+
+
+    try {
+        $connector = new WindowsPrintConnector(PRINTER_NAME);
+        $printer = new Printer($connector);
+        // ENCABEZADO
+        $printer->setJustification(Printer::JUSTIFY_CENTER);
+        $printer->setTextSize(2, 2);
+        $printer->text("$nombreEmpresa\n");
+        $printer->setTextSize(1, 1);
+        $printer->text("$razonSocial\n");
+        $printer->text("$giro\n");
+        $printer->text("$documentoDueno\n");
+        $printer->text("$direccion\n");
+        $printer->text(str_repeat("-", 45) . "\n");
+        //CLIENTE
+        $printer->setJustification(Printer::JUSTIFY_LEFT);
+        $printer->setEmphasis(true);
+        $printer->text("Fecha: ");
+        $printer->setEmphasis(false);
+        $printer->text("$fecha");
+        $printer->setEmphasis(true);
+        $printer->text("  Caja: ");
+        $printer->setEmphasis(false);
+        $printer->text("$caja\n");
+
+        $printer->setEmphasis(true);
+        $printer->text("Cliente:\n");
+        $printer->setEmphasis(false);
+        $printer->text("$clienteNombre\n");
+
+        //PRODUCTOS
+        $printer->setEmphasis(true);
+        $printer->text("Cant  Descripcion                 Precio  Total\n");
+        $printer->text(str_repeat("-", 45) . "\n");
+        $printer->setEmphasis(false);
+    
+        foreach ($productos as $producto) {
+            $totalUnitario = $producto->cant * $producto->costo;
+            $cantidad = str_pad(number_format($producto->cant, 2), 4, " ", STR_PAD_RIGHT);
+            $precio = str_pad(number_format($producto->costo, 2), 7, " ", STR_PAD_LEFT);
+            $total = str_pad(number_format($totalUnitario, 2), 7, " ", STR_PAD_LEFT);
+
+            // Dividir la descripción en líneas
+            $descripcion = wordwrap($producto->sku.' '.$producto->desc, $maxDescripcion, "\n", true);
+            $lineasDescripcion = explode("\n", $descripcion);
+
+            // Imprimir primera línea con cantidad, precio y total
+            $printer->text("$cantidad " . str_pad($lineasDescripcion[0], $maxDescripcion, " ") . " $precio $total\n");
+
+            // Imprimir líneas adicionales de la descripción (si hay más)
+            for ($i = 1; $i < count($lineasDescripcion); $i++) {
+                $printer->text("     " . str_pad($lineasDescripcion[$i], $maxDescripcion) . "\n");
+            }
+        }
+        
+        $printer->text(str_repeat("-", 45) . "\n");
+        
+        // TOTALES
+        $printer->setJustification(Printer::JUSTIFY_RIGHT);
+        $printer->setEmphasis(true);
+        $printer->setTextSize(2, 1);
+        $printer->text("TOTAL $" . number_format($totalFinal, 2) . "\n");
+        $printer->setTextSize(1, 1);
+        $printer->setEmphasis(false);
+
+        $printer->text(str_repeat("_", 45) . "\n");
+
+        //DTE
+        $printer->setJustification(Printer::JUSTIFY_LEFT);
+        $printer->text("NUMERO DE CONTROL: \n$dteNControl\n");
+        $printer->text("CÓDIGO DE GENERACION: \n$dteCodGen\n\n");
+
+        $printer->setJustification(Printer::JUSTIFY_CENTER);
+        // DISCLAIMER
+        $lineasDisclaimer = wordwrap($disclaimer, 45, "\n", true);
+        foreach (explode("\n", $lineasDisclaimer) as $linea) {
+            $printer->text($linea . "\n");
+        }
+        
+        // CÓDIGO QR
+        //$printer->text("$qrMessage\n");
+        //$printer->qrCode($urlQR, Printer::QR_ECLEVEL_L, 6);
+
+        $printer->text("\n$mensaje\n");
+
+        // REFERENCIA
+        $printer->text("\nRef: $numeroReferencia\n");
+        $printer->setBarcodeHeight(40);
+        $printer->setBarcodeWidth(4); 
+        $printer->barcode($numeroReferencia, Printer::BARCODE_CODE39);
+
+        // CORTAR PAPEL Y CERRAR IMPRESORA
+        $printer->feed(2);
+        $printer->cut();
+        $printer->close();
+
+        echo "Ticket impreso correctamente.";
+
+    } catch (Exception $e) {
+        echo "Error al imprimir: " . $e->getMessage();
+    }
+}

+ 25 - 0
vendor/autoload.php

@@ -0,0 +1,25 @@
+<?php
+
+// autoload.php @generated by Composer
+
+if (PHP_VERSION_ID < 50600) {
+    if (!headers_sent()) {
+        header('HTTP/1.1 500 Internal Server Error');
+    }
+    $err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
+    if (!ini_get('display_errors')) {
+        if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
+            fwrite(STDERR, $err);
+        } elseif (!headers_sent()) {
+            echo $err;
+        }
+    }
+    trigger_error(
+        $err,
+        E_USER_ERROR
+    );
+}
+
+require_once __DIR__ . '/composer/autoload_real.php';
+
+return ComposerAutoloaderInit870e9b9214bb0fa110f654f69146fd90::getLoader();

+ 579 - 0
vendor/composer/ClassLoader.php

@@ -0,0 +1,579 @@
+<?php
+
+/*
+ * This file is part of Composer.
+ *
+ * (c) Nils Adermann <naderman@naderman.de>
+ *     Jordi Boggiano <j.boggiano@seld.be>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Composer\Autoload;
+
+/**
+ * ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
+ *
+ *     $loader = new \Composer\Autoload\ClassLoader();
+ *
+ *     // register classes with namespaces
+ *     $loader->add('Symfony\Component', __DIR__.'/component');
+ *     $loader->add('Symfony',           __DIR__.'/framework');
+ *
+ *     // activate the autoloader
+ *     $loader->register();
+ *
+ *     // to enable searching the include path (eg. for PEAR packages)
+ *     $loader->setUseIncludePath(true);
+ *
+ * In this example, if you try to use a class in the Symfony\Component
+ * namespace or one of its children (Symfony\Component\Console for instance),
+ * the autoloader will first look for the class under the component/
+ * directory, and it will then fallback to the framework/ directory if not
+ * found before giving up.
+ *
+ * This class is loosely based on the Symfony UniversalClassLoader.
+ *
+ * @author Fabien Potencier <fabien@symfony.com>
+ * @author Jordi Boggiano <j.boggiano@seld.be>
+ * @see    https://www.php-fig.org/psr/psr-0/
+ * @see    https://www.php-fig.org/psr/psr-4/
+ */
+class ClassLoader
+{
+    /** @var \Closure(string):void */
+    private static $includeFile;
+
+    /** @var string|null */
+    private $vendorDir;
+
+    // PSR-4
+    /**
+     * @var array<string, array<string, int>>
+     */
+    private $prefixLengthsPsr4 = array();
+    /**
+     * @var array<string, list<string>>
+     */
+    private $prefixDirsPsr4 = array();
+    /**
+     * @var list<string>
+     */
+    private $fallbackDirsPsr4 = array();
+
+    // PSR-0
+    /**
+     * List of PSR-0 prefixes
+     *
+     * Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2')))
+     *
+     * @var array<string, array<string, list<string>>>
+     */
+    private $prefixesPsr0 = array();
+    /**
+     * @var list<string>
+     */
+    private $fallbackDirsPsr0 = array();
+
+    /** @var bool */
+    private $useIncludePath = false;
+
+    /**
+     * @var array<string, string>
+     */
+    private $classMap = array();
+
+    /** @var bool */
+    private $classMapAuthoritative = false;
+
+    /**
+     * @var array<string, bool>
+     */
+    private $missingClasses = array();
+
+    /** @var string|null */
+    private $apcuPrefix;
+
+    /**
+     * @var array<string, self>
+     */
+    private static $registeredLoaders = array();
+
+    /**
+     * @param string|null $vendorDir
+     */
+    public function __construct($vendorDir = null)
+    {
+        $this->vendorDir = $vendorDir;
+        self::initializeIncludeClosure();
+    }
+
+    /**
+     * @return array<string, list<string>>
+     */
+    public function getPrefixes()
+    {
+        if (!empty($this->prefixesPsr0)) {
+            return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
+        }
+
+        return array();
+    }
+
+    /**
+     * @return array<string, list<string>>
+     */
+    public function getPrefixesPsr4()
+    {
+        return $this->prefixDirsPsr4;
+    }
+
+    /**
+     * @return list<string>
+     */
+    public function getFallbackDirs()
+    {
+        return $this->fallbackDirsPsr0;
+    }
+
+    /**
+     * @return list<string>
+     */
+    public function getFallbackDirsPsr4()
+    {
+        return $this->fallbackDirsPsr4;
+    }
+
+    /**
+     * @return array<string, string> Array of classname => path
+     */
+    public function getClassMap()
+    {
+        return $this->classMap;
+    }
+
+    /**
+     * @param array<string, string> $classMap Class to filename map
+     *
+     * @return void
+     */
+    public function addClassMap(array $classMap)
+    {
+        if ($this->classMap) {
+            $this->classMap = array_merge($this->classMap, $classMap);
+        } else {
+            $this->classMap = $classMap;
+        }
+    }
+
+    /**
+     * Registers a set of PSR-0 directories for a given prefix, either
+     * appending or prepending to the ones previously set for this prefix.
+     *
+     * @param string              $prefix  The prefix
+     * @param list<string>|string $paths   The PSR-0 root directories
+     * @param bool                $prepend Whether to prepend the directories
+     *
+     * @return void
+     */
+    public function add($prefix, $paths, $prepend = false)
+    {
+        $paths = (array) $paths;
+        if (!$prefix) {
+            if ($prepend) {
+                $this->fallbackDirsPsr0 = array_merge(
+                    $paths,
+                    $this->fallbackDirsPsr0
+                );
+            } else {
+                $this->fallbackDirsPsr0 = array_merge(
+                    $this->fallbackDirsPsr0,
+                    $paths
+                );
+            }
+
+            return;
+        }
+
+        $first = $prefix[0];
+        if (!isset($this->prefixesPsr0[$first][$prefix])) {
+            $this->prefixesPsr0[$first][$prefix] = $paths;
+
+            return;
+        }
+        if ($prepend) {
+            $this->prefixesPsr0[$first][$prefix] = array_merge(
+                $paths,
+                $this->prefixesPsr0[$first][$prefix]
+            );
+        } else {
+            $this->prefixesPsr0[$first][$prefix] = array_merge(
+                $this->prefixesPsr0[$first][$prefix],
+                $paths
+            );
+        }
+    }
+
+    /**
+     * Registers a set of PSR-4 directories for a given namespace, either
+     * appending or prepending to the ones previously set for this namespace.
+     *
+     * @param string              $prefix  The prefix/namespace, with trailing '\\'
+     * @param list<string>|string $paths   The PSR-4 base directories
+     * @param bool                $prepend Whether to prepend the directories
+     *
+     * @throws \InvalidArgumentException
+     *
+     * @return void
+     */
+    public function addPsr4($prefix, $paths, $prepend = false)
+    {
+        $paths = (array) $paths;
+        if (!$prefix) {
+            // Register directories for the root namespace.
+            if ($prepend) {
+                $this->fallbackDirsPsr4 = array_merge(
+                    $paths,
+                    $this->fallbackDirsPsr4
+                );
+            } else {
+                $this->fallbackDirsPsr4 = array_merge(
+                    $this->fallbackDirsPsr4,
+                    $paths
+                );
+            }
+        } elseif (!isset($this->prefixDirsPsr4[$prefix])) {
+            // Register directories for a new namespace.
+            $length = strlen($prefix);
+            if ('\\' !== $prefix[$length - 1]) {
+                throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
+            }
+            $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
+            $this->prefixDirsPsr4[$prefix] = $paths;
+        } elseif ($prepend) {
+            // Prepend directories for an already registered namespace.
+            $this->prefixDirsPsr4[$prefix] = array_merge(
+                $paths,
+                $this->prefixDirsPsr4[$prefix]
+            );
+        } else {
+            // Append directories for an already registered namespace.
+            $this->prefixDirsPsr4[$prefix] = array_merge(
+                $this->prefixDirsPsr4[$prefix],
+                $paths
+            );
+        }
+    }
+
+    /**
+     * Registers a set of PSR-0 directories for a given prefix,
+     * replacing any others previously set for this prefix.
+     *
+     * @param string              $prefix The prefix
+     * @param list<string>|string $paths  The PSR-0 base directories
+     *
+     * @return void
+     */
+    public function set($prefix, $paths)
+    {
+        if (!$prefix) {
+            $this->fallbackDirsPsr0 = (array) $paths;
+        } else {
+            $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
+        }
+    }
+
+    /**
+     * Registers a set of PSR-4 directories for a given namespace,
+     * replacing any others previously set for this namespace.
+     *
+     * @param string              $prefix The prefix/namespace, with trailing '\\'
+     * @param list<string>|string $paths  The PSR-4 base directories
+     *
+     * @throws \InvalidArgumentException
+     *
+     * @return void
+     */
+    public function setPsr4($prefix, $paths)
+    {
+        if (!$prefix) {
+            $this->fallbackDirsPsr4 = (array) $paths;
+        } else {
+            $length = strlen($prefix);
+            if ('\\' !== $prefix[$length - 1]) {
+                throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
+            }
+            $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
+            $this->prefixDirsPsr4[$prefix] = (array) $paths;
+        }
+    }
+
+    /**
+     * Turns on searching the include path for class files.
+     *
+     * @param bool $useIncludePath
+     *
+     * @return void
+     */
+    public function setUseIncludePath($useIncludePath)
+    {
+        $this->useIncludePath = $useIncludePath;
+    }
+
+    /**
+     * Can be used to check if the autoloader uses the include path to check
+     * for classes.
+     *
+     * @return bool
+     */
+    public function getUseIncludePath()
+    {
+        return $this->useIncludePath;
+    }
+
+    /**
+     * Turns off searching the prefix and fallback directories for classes
+     * that have not been registered with the class map.
+     *
+     * @param bool $classMapAuthoritative
+     *
+     * @return void
+     */
+    public function setClassMapAuthoritative($classMapAuthoritative)
+    {
+        $this->classMapAuthoritative = $classMapAuthoritative;
+    }
+
+    /**
+     * Should class lookup fail if not found in the current class map?
+     *
+     * @return bool
+     */
+    public function isClassMapAuthoritative()
+    {
+        return $this->classMapAuthoritative;
+    }
+
+    /**
+     * APCu prefix to use to cache found/not-found classes, if the extension is enabled.
+     *
+     * @param string|null $apcuPrefix
+     *
+     * @return void
+     */
+    public function setApcuPrefix($apcuPrefix)
+    {
+        $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
+    }
+
+    /**
+     * The APCu prefix in use, or null if APCu caching is not enabled.
+     *
+     * @return string|null
+     */
+    public function getApcuPrefix()
+    {
+        return $this->apcuPrefix;
+    }
+
+    /**
+     * Registers this instance as an autoloader.
+     *
+     * @param bool $prepend Whether to prepend the autoloader or not
+     *
+     * @return void
+     */
+    public function register($prepend = false)
+    {
+        spl_autoload_register(array($this, 'loadClass'), true, $prepend);
+
+        if (null === $this->vendorDir) {
+            return;
+        }
+
+        if ($prepend) {
+            self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
+        } else {
+            unset(self::$registeredLoaders[$this->vendorDir]);
+            self::$registeredLoaders[$this->vendorDir] = $this;
+        }
+    }
+
+    /**
+     * Unregisters this instance as an autoloader.
+     *
+     * @return void
+     */
+    public function unregister()
+    {
+        spl_autoload_unregister(array($this, 'loadClass'));
+
+        if (null !== $this->vendorDir) {
+            unset(self::$registeredLoaders[$this->vendorDir]);
+        }
+    }
+
+    /**
+     * Loads the given class or interface.
+     *
+     * @param  string    $class The name of the class
+     * @return true|null True if loaded, null otherwise
+     */
+    public function loadClass($class)
+    {
+        if ($file = $this->findFile($class)) {
+            $includeFile = self::$includeFile;
+            $includeFile($file);
+
+            return true;
+        }
+
+        return null;
+    }
+
+    /**
+     * Finds the path to the file where the class is defined.
+     *
+     * @param string $class The name of the class
+     *
+     * @return string|false The path if found, false otherwise
+     */
+    public function findFile($class)
+    {
+        // class map lookup
+        if (isset($this->classMap[$class])) {
+            return $this->classMap[$class];
+        }
+        if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
+            return false;
+        }
+        if (null !== $this->apcuPrefix) {
+            $file = apcu_fetch($this->apcuPrefix.$class, $hit);
+            if ($hit) {
+                return $file;
+            }
+        }
+
+        $file = $this->findFileWithExtension($class, '.php');
+
+        // Search for Hack files if we are running on HHVM
+        if (false === $file && defined('HHVM_VERSION')) {
+            $file = $this->findFileWithExtension($class, '.hh');
+        }
+
+        if (null !== $this->apcuPrefix) {
+            apcu_add($this->apcuPrefix.$class, $file);
+        }
+
+        if (false === $file) {
+            // Remember that this class does not exist.
+            $this->missingClasses[$class] = true;
+        }
+
+        return $file;
+    }
+
+    /**
+     * Returns the currently registered loaders keyed by their corresponding vendor directories.
+     *
+     * @return array<string, self>
+     */
+    public static function getRegisteredLoaders()
+    {
+        return self::$registeredLoaders;
+    }
+
+    /**
+     * @param  string       $class
+     * @param  string       $ext
+     * @return string|false
+     */
+    private function findFileWithExtension($class, $ext)
+    {
+        // PSR-4 lookup
+        $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
+
+        $first = $class[0];
+        if (isset($this->prefixLengthsPsr4[$first])) {
+            $subPath = $class;
+            while (false !== $lastPos = strrpos($subPath, '\\')) {
+                $subPath = substr($subPath, 0, $lastPos);
+                $search = $subPath . '\\';
+                if (isset($this->prefixDirsPsr4[$search])) {
+                    $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
+                    foreach ($this->prefixDirsPsr4[$search] as $dir) {
+                        if (file_exists($file = $dir . $pathEnd)) {
+                            return $file;
+                        }
+                    }
+                }
+            }
+        }
+
+        // PSR-4 fallback dirs
+        foreach ($this->fallbackDirsPsr4 as $dir) {
+            if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
+                return $file;
+            }
+        }
+
+        // PSR-0 lookup
+        if (false !== $pos = strrpos($class, '\\')) {
+            // namespaced class name
+            $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
+                . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
+        } else {
+            // PEAR-like class name
+            $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
+        }
+
+        if (isset($this->prefixesPsr0[$first])) {
+            foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
+                if (0 === strpos($class, $prefix)) {
+                    foreach ($dirs as $dir) {
+                        if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
+                            return $file;
+                        }
+                    }
+                }
+            }
+        }
+
+        // PSR-0 fallback dirs
+        foreach ($this->fallbackDirsPsr0 as $dir) {
+            if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
+                return $file;
+            }
+        }
+
+        // PSR-0 include paths.
+        if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
+            return $file;
+        }
+
+        return false;
+    }
+
+    /**
+     * @return void
+     */
+    private static function initializeIncludeClosure()
+    {
+        if (self::$includeFile !== null) {
+            return;
+        }
+
+        /**
+         * Scope isolated include.
+         *
+         * Prevents access to $this/self from included files.
+         *
+         * @param  string $file
+         * @return void
+         */
+        self::$includeFile = \Closure::bind(static function($file) {
+            include $file;
+        }, null, null);
+    }
+}

+ 359 - 0
vendor/composer/InstalledVersions.php

@@ -0,0 +1,359 @@
+<?php
+
+/*
+ * This file is part of Composer.
+ *
+ * (c) Nils Adermann <naderman@naderman.de>
+ *     Jordi Boggiano <j.boggiano@seld.be>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Composer;
+
+use Composer\Autoload\ClassLoader;
+use Composer\Semver\VersionParser;
+
+/**
+ * This class is copied in every Composer installed project and available to all
+ *
+ * See also https://getcomposer.org/doc/07-runtime.md#installed-versions
+ *
+ * To require its presence, you can require `composer-runtime-api ^2.0`
+ *
+ * @final
+ */
+class InstalledVersions
+{
+    /**
+     * @var mixed[]|null
+     * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null
+     */
+    private static $installed;
+
+    /**
+     * @var bool|null
+     */
+    private static $canGetVendors;
+
+    /**
+     * @var array[]
+     * @psalm-var array<string, array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
+     */
+    private static $installedByVendor = array();
+
+    /**
+     * Returns a list of all package names which are present, either by being installed, replaced or provided
+     *
+     * @return string[]
+     * @psalm-return list<string>
+     */
+    public static function getInstalledPackages()
+    {
+        $packages = array();
+        foreach (self::getInstalled() as $installed) {
+            $packages[] = array_keys($installed['versions']);
+        }
+
+        if (1 === \count($packages)) {
+            return $packages[0];
+        }
+
+        return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
+    }
+
+    /**
+     * Returns a list of all package names with a specific type e.g. 'library'
+     *
+     * @param  string   $type
+     * @return string[]
+     * @psalm-return list<string>
+     */
+    public static function getInstalledPackagesByType($type)
+    {
+        $packagesByType = array();
+
+        foreach (self::getInstalled() as $installed) {
+            foreach ($installed['versions'] as $name => $package) {
+                if (isset($package['type']) && $package['type'] === $type) {
+                    $packagesByType[] = $name;
+                }
+            }
+        }
+
+        return $packagesByType;
+    }
+
+    /**
+     * Checks whether the given package is installed
+     *
+     * This also returns true if the package name is provided or replaced by another package
+     *
+     * @param  string $packageName
+     * @param  bool   $includeDevRequirements
+     * @return bool
+     */
+    public static function isInstalled($packageName, $includeDevRequirements = true)
+    {
+        foreach (self::getInstalled() as $installed) {
+            if (isset($installed['versions'][$packageName])) {
+                return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false;
+            }
+        }
+
+        return false;
+    }
+
+    /**
+     * Checks whether the given package satisfies a version constraint
+     *
+     * e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call:
+     *
+     *   Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3')
+     *
+     * @param  VersionParser $parser      Install composer/semver to have access to this class and functionality
+     * @param  string        $packageName
+     * @param  string|null   $constraint  A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package
+     * @return bool
+     */
+    public static function satisfies(VersionParser $parser, $packageName, $constraint)
+    {
+        $constraint = $parser->parseConstraints((string) $constraint);
+        $provided = $parser->parseConstraints(self::getVersionRanges($packageName));
+
+        return $provided->matches($constraint);
+    }
+
+    /**
+     * Returns a version constraint representing all the range(s) which are installed for a given package
+     *
+     * It is easier to use this via isInstalled() with the $constraint argument if you need to check
+     * whether a given version of a package is installed, and not just whether it exists
+     *
+     * @param  string $packageName
+     * @return string Version constraint usable with composer/semver
+     */
+    public static function getVersionRanges($packageName)
+    {
+        foreach (self::getInstalled() as $installed) {
+            if (!isset($installed['versions'][$packageName])) {
+                continue;
+            }
+
+            $ranges = array();
+            if (isset($installed['versions'][$packageName]['pretty_version'])) {
+                $ranges[] = $installed['versions'][$packageName]['pretty_version'];
+            }
+            if (array_key_exists('aliases', $installed['versions'][$packageName])) {
+                $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
+            }
+            if (array_key_exists('replaced', $installed['versions'][$packageName])) {
+                $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
+            }
+            if (array_key_exists('provided', $installed['versions'][$packageName])) {
+                $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
+            }
+
+            return implode(' || ', $ranges);
+        }
+
+        throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
+    }
+
+    /**
+     * @param  string      $packageName
+     * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
+     */
+    public static function getVersion($packageName)
+    {
+        foreach (self::getInstalled() as $installed) {
+            if (!isset($installed['versions'][$packageName])) {
+                continue;
+            }
+
+            if (!isset($installed['versions'][$packageName]['version'])) {
+                return null;
+            }
+
+            return $installed['versions'][$packageName]['version'];
+        }
+
+        throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
+    }
+
+    /**
+     * @param  string      $packageName
+     * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
+     */
+    public static function getPrettyVersion($packageName)
+    {
+        foreach (self::getInstalled() as $installed) {
+            if (!isset($installed['versions'][$packageName])) {
+                continue;
+            }
+
+            if (!isset($installed['versions'][$packageName]['pretty_version'])) {
+                return null;
+            }
+
+            return $installed['versions'][$packageName]['pretty_version'];
+        }
+
+        throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
+    }
+
+    /**
+     * @param  string      $packageName
+     * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference
+     */
+    public static function getReference($packageName)
+    {
+        foreach (self::getInstalled() as $installed) {
+            if (!isset($installed['versions'][$packageName])) {
+                continue;
+            }
+
+            if (!isset($installed['versions'][$packageName]['reference'])) {
+                return null;
+            }
+
+            return $installed['versions'][$packageName]['reference'];
+        }
+
+        throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
+    }
+
+    /**
+     * @param  string      $packageName
+     * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path.
+     */
+    public static function getInstallPath($packageName)
+    {
+        foreach (self::getInstalled() as $installed) {
+            if (!isset($installed['versions'][$packageName])) {
+                continue;
+            }
+
+            return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null;
+        }
+
+        throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
+    }
+
+    /**
+     * @return array
+     * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}
+     */
+    public static function getRootPackage()
+    {
+        $installed = self::getInstalled();
+
+        return $installed[0]['root'];
+    }
+
+    /**
+     * Returns the raw installed.php data for custom implementations
+     *
+     * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
+     * @return array[]
+     * @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}
+     */
+    public static function getRawData()
+    {
+        @trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED);
+
+        if (null === self::$installed) {
+            // only require the installed.php file if this file is loaded from its dumped location,
+            // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
+            if (substr(__DIR__, -8, 1) !== 'C') {
+                self::$installed = include __DIR__ . '/installed.php';
+            } else {
+                self::$installed = array();
+            }
+        }
+
+        return self::$installed;
+    }
+
+    /**
+     * Returns the raw data of all installed.php which are currently loaded for custom implementations
+     *
+     * @return array[]
+     * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
+     */
+    public static function getAllRawData()
+    {
+        return self::getInstalled();
+    }
+
+    /**
+     * Lets you reload the static array from another file
+     *
+     * This is only useful for complex integrations in which a project needs to use
+     * this class but then also needs to execute another project's autoloader in process,
+     * and wants to ensure both projects have access to their version of installed.php.
+     *
+     * A typical case would be PHPUnit, where it would need to make sure it reads all
+     * the data it needs from this class, then call reload() with
+     * `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure
+     * the project in which it runs can then also use this class safely, without
+     * interference between PHPUnit's dependencies and the project's dependencies.
+     *
+     * @param  array[] $data A vendor/composer/installed.php data set
+     * @return void
+     *
+     * @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $data
+     */
+    public static function reload($data)
+    {
+        self::$installed = $data;
+        self::$installedByVendor = array();
+    }
+
+    /**
+     * @return array[]
+     * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
+     */
+    private static function getInstalled()
+    {
+        if (null === self::$canGetVendors) {
+            self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
+        }
+
+        $installed = array();
+
+        if (self::$canGetVendors) {
+            foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
+                if (isset(self::$installedByVendor[$vendorDir])) {
+                    $installed[] = self::$installedByVendor[$vendorDir];
+                } elseif (is_file($vendorDir.'/composer/installed.php')) {
+                    /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
+                    $required = require $vendorDir.'/composer/installed.php';
+                    $installed[] = self::$installedByVendor[$vendorDir] = $required;
+                    if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
+                        self::$installed = $installed[count($installed) - 1];
+                    }
+                }
+            }
+        }
+
+        if (null === self::$installed) {
+            // only require the installed.php file if this file is loaded from its dumped location,
+            // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
+            if (substr(__DIR__, -8, 1) !== 'C') {
+                /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
+                $required = require __DIR__ . '/installed.php';
+                self::$installed = $required;
+            } else {
+                self::$installed = array();
+            }
+        }
+
+        if (self::$installed !== array()) {
+            $installed[] = self::$installed;
+        }
+
+        return $installed;
+    }
+}

+ 21 - 0
vendor/composer/LICENSE

@@ -0,0 +1,21 @@
+
+Copyright (c) Nils Adermann, Jordi Boggiano
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is furnished
+to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+

+ 10 - 0
vendor/composer/autoload_classmap.php

@@ -0,0 +1,10 @@
+<?php
+
+// autoload_classmap.php @generated by Composer
+
+$vendorDir = dirname(__DIR__);
+$baseDir = dirname($vendorDir);
+
+return array(
+    'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
+);

+ 9 - 0
vendor/composer/autoload_namespaces.php

@@ -0,0 +1,9 @@
+<?php
+
+// autoload_namespaces.php @generated by Composer
+
+$vendorDir = dirname(__DIR__);
+$baseDir = dirname($vendorDir);
+
+return array(
+);

+ 10 - 0
vendor/composer/autoload_psr4.php

@@ -0,0 +1,10 @@
+<?php
+
+// autoload_psr4.php @generated by Composer
+
+$vendorDir = dirname(__DIR__);
+$baseDir = dirname($vendorDir);
+
+return array(
+    'Mike42\\' => array($vendorDir . '/mike42/gfx-php/src/Mike42', $vendorDir . '/mike42/escpos-php/src/Mike42'),
+);

+ 38 - 0
vendor/composer/autoload_real.php

@@ -0,0 +1,38 @@
+<?php
+
+// autoload_real.php @generated by Composer
+
+class ComposerAutoloaderInit870e9b9214bb0fa110f654f69146fd90
+{
+    private static $loader;
+
+    public static function loadClassLoader($class)
+    {
+        if ('Composer\Autoload\ClassLoader' === $class) {
+            require __DIR__ . '/ClassLoader.php';
+        }
+    }
+
+    /**
+     * @return \Composer\Autoload\ClassLoader
+     */
+    public static function getLoader()
+    {
+        if (null !== self::$loader) {
+            return self::$loader;
+        }
+
+        require __DIR__ . '/platform_check.php';
+
+        spl_autoload_register(array('ComposerAutoloaderInit870e9b9214bb0fa110f654f69146fd90', 'loadClassLoader'), true, true);
+        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
+        spl_autoload_unregister(array('ComposerAutoloaderInit870e9b9214bb0fa110f654f69146fd90', 'loadClassLoader'));
+
+        require __DIR__ . '/autoload_static.php';
+        call_user_func(\Composer\Autoload\ComposerStaticInit870e9b9214bb0fa110f654f69146fd90::getInitializer($loader));
+
+        $loader->register(true);
+
+        return $loader;
+    }
+}

+ 37 - 0
vendor/composer/autoload_static.php

@@ -0,0 +1,37 @@
+<?php
+
+// autoload_static.php @generated by Composer
+
+namespace Composer\Autoload;
+
+class ComposerStaticInit870e9b9214bb0fa110f654f69146fd90
+{
+    public static $prefixLengthsPsr4 = array (
+        'M' => 
+        array (
+            'Mike42\\' => 7,
+        ),
+    );
+
+    public static $prefixDirsPsr4 = array (
+        'Mike42\\' => 
+        array (
+            0 => __DIR__ . '/..' . '/mike42/gfx-php/src/Mike42',
+            1 => __DIR__ . '/..' . '/mike42/escpos-php/src/Mike42',
+        ),
+    );
+
+    public static $classMap = array (
+        'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
+    );
+
+    public static function getInitializer(ClassLoader $loader)
+    {
+        return \Closure::bind(function () use ($loader) {
+            $loader->prefixLengthsPsr4 = ComposerStaticInit870e9b9214bb0fa110f654f69146fd90::$prefixLengthsPsr4;
+            $loader->prefixDirsPsr4 = ComposerStaticInit870e9b9214bb0fa110f654f69146fd90::$prefixDirsPsr4;
+            $loader->classMap = ComposerStaticInit870e9b9214bb0fa110f654f69146fd90::$classMap;
+
+        }, null, ClassLoader::class);
+    }
+}

+ 118 - 0
vendor/composer/installed.json

@@ -0,0 +1,118 @@
+{
+    "packages": [
+        {
+            "name": "mike42/escpos-php",
+            "version": "v4.0",
+            "version_normalized": "4.0.0.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/mike42/escpos-php.git",
+                "reference": "74fd89a3384135c90a8c6dc4b724e03df7c0e4f9"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/mike42/escpos-php/zipball/74fd89a3384135c90a8c6dc4b724e03df7c0e4f9",
+                "reference": "74fd89a3384135c90a8c6dc4b724e03df7c0e4f9",
+                "shasum": ""
+            },
+            "require": {
+                "ext-intl": "*",
+                "ext-json": "*",
+                "ext-zlib": "*",
+                "mike42/gfx-php": "^0.6",
+                "php": ">=7.3.0"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^9",
+                "squizlabs/php_codesniffer": "^3.3"
+            },
+            "suggest": {
+                "ext-gd": "Used for image printing if present.",
+                "ext-imagick": "Will be used for image printing if present. Required for PDF printing or use of custom fonts."
+            },
+            "time": "2022-05-23T11:05:09+00:00",
+            "type": "library",
+            "installation-source": "dist",
+            "autoload": {
+                "psr-4": {
+                    "Mike42\\": "src/Mike42"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Michael Billington",
+                    "email": "michael.billington@gmail.com"
+                }
+            ],
+            "description": "PHP receipt printer library for use with ESC/POS-compatible thermal and impact printers",
+            "homepage": "https://github.com/mike42/escpos-php",
+            "keywords": [
+                "Epson",
+                "barcode",
+                "escpos",
+                "printer",
+                "receipt-printer"
+            ],
+            "support": {
+                "issues": "https://github.com/mike42/escpos-php/issues",
+                "source": "https://github.com/mike42/escpos-php/tree/v4.0"
+            },
+            "install-path": "../mike42/escpos-php"
+        },
+        {
+            "name": "mike42/gfx-php",
+            "version": "v0.6",
+            "version_normalized": "0.6.0.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/mike42/gfx-php.git",
+                "reference": "ed9ded2a9298e4084a9c557ab74a89b71e43dbdb"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/mike42/gfx-php/zipball/ed9ded2a9298e4084a9c557ab74a89b71e43dbdb",
+                "reference": "ed9ded2a9298e4084a9c557ab74a89b71e43dbdb",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.0.0"
+            },
+            "require-dev": {
+                "phpbench/phpbench": "@dev",
+                "phpunit/phpunit": "^6.5",
+                "squizlabs/php_codesniffer": "^3.3.1"
+            },
+            "time": "2019-10-05T02:44:33+00:00",
+            "type": "library",
+            "installation-source": "dist",
+            "autoload": {
+                "psr-4": {
+                    "Mike42\\": "src/Mike42"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "LGPL-2.1-or-later"
+            ],
+            "authors": [
+                {
+                    "name": "Michael Billington",
+                    "email": "michael.billington@gmail.com"
+                }
+            ],
+            "description": "The pure PHP graphics library",
+            "homepage": "https://github.com/mike42/gfx-php",
+            "support": {
+                "issues": "https://github.com/mike42/gfx-php/issues",
+                "source": "https://github.com/mike42/gfx-php/tree/v0.6"
+            },
+            "install-path": "../mike42/gfx-php"
+        }
+    ],
+    "dev": true,
+    "dev-package-names": []
+}

+ 41 - 0
vendor/composer/installed.php

@@ -0,0 +1,41 @@
+<?php return array(
+    'root' => array(
+        'name' => '__root__',
+        'pretty_version' => '1.0.0+no-version-set',
+        'version' => '1.0.0.0',
+        'reference' => null,
+        'type' => 'library',
+        'install_path' => __DIR__ . '/../../',
+        'aliases' => array(),
+        'dev' => true,
+    ),
+    'versions' => array(
+        '__root__' => array(
+            'pretty_version' => '1.0.0+no-version-set',
+            'version' => '1.0.0.0',
+            'reference' => null,
+            'type' => 'library',
+            'install_path' => __DIR__ . '/../../',
+            'aliases' => array(),
+            'dev_requirement' => false,
+        ),
+        'mike42/escpos-php' => array(
+            'pretty_version' => 'v4.0',
+            'version' => '4.0.0.0',
+            'reference' => '74fd89a3384135c90a8c6dc4b724e03df7c0e4f9',
+            'type' => 'library',
+            'install_path' => __DIR__ . '/../mike42/escpos-php',
+            'aliases' => array(),
+            'dev_requirement' => false,
+        ),
+        'mike42/gfx-php' => array(
+            'pretty_version' => 'v0.6',
+            'version' => '0.6.0.0',
+            'reference' => 'ed9ded2a9298e4084a9c557ab74a89b71e43dbdb',
+            'type' => 'library',
+            'install_path' => __DIR__ . '/../mike42/gfx-php',
+            'aliases' => array(),
+            'dev_requirement' => false,
+        ),
+    ),
+);

+ 26 - 0
vendor/composer/platform_check.php

@@ -0,0 +1,26 @@
+<?php
+
+// platform_check.php @generated by Composer
+
+$issues = array();
+
+if (!(PHP_VERSION_ID >= 70300)) {
+    $issues[] = 'Your Composer dependencies require a PHP version ">= 7.3.0". You are running ' . PHP_VERSION . '.';
+}
+
+if ($issues) {
+    if (!headers_sent()) {
+        header('HTTP/1.1 500 Internal Server Error');
+    }
+    if (!ini_get('display_errors')) {
+        if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
+            fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL);
+        } elseif (!headers_sent()) {
+            echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL;
+        }
+    }
+    trigger_error(
+        'Composer detected issues in your platform: ' . implode(' ', $issues),
+        E_USER_ERROR
+    );
+}

+ 4 - 0
vendor/mike42/escpos-php/.coveralls.yml

@@ -0,0 +1,4 @@
+service_name: travis-ci
+coverage_clover: build/logs/clover.xml
+json_path: build/logs/coveralls-upload.json
+

+ 16 - 0
vendor/mike42/escpos-php/.gitignore

@@ -0,0 +1,16 @@
+# Eclipse files
+.settings/*
+.project
+.buildpath
+
+# doxygen files
+doc/html
+doc/latex
+doc/doxygen_sqlite3.db
+
+# composer files
+vendor/
+
+# other build files
+build/*
+*.phar

+ 40 - 0
vendor/mike42/escpos-php/.travis.yml

@@ -0,0 +1,40 @@
+---
+dist: xenial
+sudo: required
+
+language: php
+
+php:
+  - '7.3'
+  - '7.4'
+  - '8.0'
+  - nightly
+
+matrix:
+  allow_failures:
+    - php: nightly
+
+before_install:
+  - sudo apt-get -qq update
+  - sudo apt-get install -y imagemagick ghostscript unifont
+
+install:
+  - composer install
+
+before_script:
+  # Install 'imagick' plugin
+  - bash -c 'if [[ $TRAVIS_PHP_VERSION != 8* ]] && [[ $TRAVIS_PHP_VERSION != "nightly" ]] ; then printf "\n" | pecl install imagick; fi'
+  # Directory for coverage report
+  - mkdir -p build/logs/
+
+script:
+  # Check code style
+  - php vendor/bin/phpcs --standard=psr2 src/ -n
+  # Run tests
+  - php vendor/bin/phpunit --coverage-clover build/logs/clover.xml
+
+after_success:
+  # Upload coverage statistics to coveralls service after test
+  - wget -c -nc https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar
+  - php coveralls.phar -v
+...

+ 65 - 0
vendor/mike42/escpos-php/CONTRIBUTING.md

@@ -0,0 +1,65 @@
+# How to contribute
+
+This project is open to many different types of contribution. You can help with improving the documentation and examples, sharing your insights on the issue tracker, adding fixes to the code, providing test cases, or just [writing about your hardware setup that you use](https://github.com/mike42/escpos-php/issues/new).
+
+## Issue tracker
+
+Open issues of all sorts are tracked on the [issue tracker](https://github.com/mike42/escpos-php/issues). Please check [the FAQ](https://github.com/mike42/escpos-php/blob/development/doc/FAQ.md) before you post, and practice good [bug tracker etiquette](https://bugzilla.mozilla.org/page.cgi?id=etiquette.html) to keep it running smoothly.
+
+Issues are [loosely categorised](https://github.com/mike42/escpos-php/labels), and will stay open while there is still something that can be resolved.
+
+Anybody may add to the discussion on the bug tracker. Just be sure to add new questions as separate issues, and to avoid commenting on closed issues.
+
+## Submitting changes
+
+Code changes may be submitted as a "[pull request](https://help.github.com/articles/about-pull-requests/)" at [mike42/escpos-php](https://github.com/mike42/escpos-php). The description should include some information about how the change improves the library.
+
+The project is MIT-licensed (see [LICENSE.md](https://github.com/mike42/escpos-php/blob/development/LICENSE.md) for details). You are not required to assign copyright in order to submit changes, but you do need to agree for your code to be distributed under this license in order for it to be accepted.
+
+### Documentation changes
+
+The official documentaton is also located in the main repository, under the [doc/](https://github.com/mike42/escpos-php/tree/development/doc) folder.
+
+You are welcome to post any suggested improvements as pull requests.
+
+### Release process
+
+Once a pull request is accepted, it usually appears in a release a few days later.
+
+Branches:
+
+- "development" is the most recent code, possibly containing unreleased fixes
+- "master" contains the most recently released code (old versions are not maintained).
+
+The release process for your changes is:
+
+- Changes are submitted via pull request to the shared "development" branch.
+- A new release is staged on the "master" branch via another pull request, and then tagged.
+
+## Code style
+
+This project uses the [PSR-2 standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md) for all PHP source code.
+
+## Testing and CI
+
+The tests are executed on [Travis CI](https://travis-ci.org/mike42/escpos-php) over PHP 5.4, 5.5, 5.6, 7.0, 7.1 and 7.2, plus the latest LTS version of HHVM, 3.21. Older versions of PHP are not supported in current releases.
+
+For development, it's suggested that you load `imagick`, `gd` and `Xdebug` PHP exensions, and install `composer`.
+
+Fetch a copy of this code and load dependencies with composer:
+
+    git clone https://github.com/mike42/escpos-php
+    cd escpos-php/
+    composer install
+
+Execute unit tests via `phpunit`:
+
+    php vendor/bin/phpunit --coverage-text
+
+Code style can be checked via [PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer):
+
+    php vendor/bin/phpcs --standard=psr2 src/ -n
+
+The developer docs are built with [doxygen](https://github.com/doxygen/doxygen). Re-build them to check for documentation warnings:
+
+    make -C doc clean && make -C doc

+ 25 - 0
vendor/mike42/escpos-php/CONTRIBUTORS.md

@@ -0,0 +1,25 @@
+# escpos-php contributors
+
+This file contains a list of people who have made contributions of 
+code which appear in the public repository of escpos-php.
+
+Main repository: [mike42/escpos-php](https://github.com/mike42/escpos-php) ([online contributor list](https://github.com/mike42/escpos-php/graphs/contributors))
+
+- [Michael Billington](https://github.com/mike42)
+- [Alif Maulana El Fattah Nataly](https://github.com/alif25r)
+- [Mareks Sudniks](https://github.com/marech)
+- [matiasgaston](https://github.com/matiasgaston)
+- [Mike Stivala](https://github.com/brndwgn)
+- [Nicholas Long](https://github.com/longsview)
+- [Evandro Araújo](https://github.com/evsar3)
+
+Via fork: [wdoyle/EpsonESCPOS-PHP](https://github.com/wdoyle/EpsonESCPOS-PHP):
+
+- [Warren Doyle](https://github.com/wdoyle)
+
+Via fork: [ronisaha/php-esc-pos](https://github.com/ronisaha/php-esc-pos):
+
+- [Roni Saha](https://github.com/ronisaha)
+- [Gergely Radics](https://github.com/Gerifield)
+- [vharo](https://github.com/vharo)
+

+ 22 - 0
vendor/mike42/escpos-php/LICENSE.md

@@ -0,0 +1,22 @@
+MIT License
+
+Copyright (c) 2014-2016 Michael Billington, incorporating modifications by others.
+See CONTRIBUTORS.md for a full list.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.

+ 575 - 0
vendor/mike42/escpos-php/README.md

@@ -0,0 +1,575 @@
+# ESC/POS Print Driver for PHP
+[![Build Status](https://travis-ci.org/mike42/escpos-php.svg?branch=master)](https://travis-ci.org/mike42/escpos-php) [![Latest Stable Version](https://poser.pugx.org/mike42/escpos-php/v/stable)](https://packagist.org/packages/mike42/escpos-php)
+[![Total Downloads](https://poser.pugx.org/mike42/escpos-php/downloads)](https://packagist.org/packages/mike42/escpos-php)
+[![License](https://poser.pugx.org/mike42/escpos-php/license)](https://packagist.org/packages/mike42/escpos-php)
+[![Coverage Status](https://coveralls.io/repos/github/mike42/escpos-php/badge.svg?branch=development)](https://coveralls.io/github/mike42/escpos-php?branch=development)
+
+This project implements a subset of Epson's ESC/POS protocol for thermal receipt printers. It allows you to generate and print receipts with basic formatting, cutting, and barcodes on a compatible printer.
+
+The library was developed to add drop-in support for receipt printing to any PHP app, including web-based point-of-sale (POS) applications.
+
+## Compatibility
+
+### Interfaces and operating systems
+This driver is known to work with the following OS/interface combinations:
+
+<table>
+<tr>
+<th>&nbsp;</th>
+<th>Linux</th>
+<th>Mac</th>
+<th>Windows</th>
+</tr>
+<tr>
+<th>Ethernet</th>
+<td><a href="https://github.com/mike42/escpos-php/tree/master/example/interface/ethernet.php">Yes</a></td>
+<td><a href="https://github.com/mike42/escpos-php/tree/master/example/interface/ethernet.php">Yes</a></td>
+<td><a href="https://github.com/mike42/escpos-php/tree/master/example/interface/ethernet.php">Yes</a></td>
+</tr>
+<tr>
+<th>USB</th>
+<td><a href="https://github.com/mike42/escpos-php/tree/master/example/interface/linux-usb.php">Yes</a></td>
+<td>Not tested</td>
+<td><a href="https://github.com/mike42/escpos-php/tree/master/example/interface/windows-usb.php">Yes</a></td>
+</tr>
+<tr>
+<th>USB-serial</th>
+<td>Yes</td>
+<td>Yes</td>
+<td>Yes</td>
+</tr>
+<tr>
+<th>Serial</th>
+<td>Yes</td>
+<td>Yes</td>
+<td>Yes</td>
+</tr>
+<tr>
+<th>Parallel</th>
+<td><a href="https://github.com/mike42/escpos-php/tree/master/example/interface/windows-lpt.php">Yes</a></td>
+<td>Not tested</td>
+<td>Yes</td>
+</tr>
+<tr>
+<th>SMB shared</th>
+<td><a href="https://github.com/mike42/escpos-php/tree/master/example/interface/smb.php">Yes</a></td>
+<td>No</td>
+<td><a href="https://github.com/mike42/escpos-php/tree/master/example/interface/smb.php">Yes</a></td>
+</tr>
+<tr>
+<th>CUPS hosted</th>
+<td><a href="https://github.com/mike42/escpos-php/tree/master/example/interface/cups.php">Yes</a></td>
+<td><a href="https://github.com/mike42/escpos-php/tree/master/example/interface/cups.php">Yes</a></td>
+<td>No</td>
+</tr>
+</table>
+
+### Printers
+Many thermal receipt printers support ESC/POS to some degree. This driver has been known to work with:
+
+- 3nStar RPT-008
+- Approx APPPOS80AM
+- AURES ODP-333
+- AURES ODP-500
+- Bematech-4200-TH
+- Bematech LR2000E
+- Birch PRP-085III
+- Bixolon SRP-350III
+- Bixolon SRP-350Plus
+- Black Copper BC-85AC
+- CHD TH-305N
+- Citizen CBM1000-II
+- Citizen CT-S310II
+- Dapper-Geyi Q583P 
+- Daruma DR800
+- DR-MP200 (manufacturer unknown)
+- EPOS TEP 220M
+- Elgin i9
+- Epson EU-T332C
+- Epson FX-890 (requires `feedForm()` to release paper).
+- Epson TM-T20
+- Epson TM-T20II
+- Epson TM-T70
+- Epson TM-T70II
+- Epson TM-T81
+- Epson TM-T82II
+- Epson TM-T88II
+- Epson TM-T88III
+- Epson TM-T88IV
+- Epson TM-T88V
+- Epson TM-U220
+- Epson TM-U295 (requires `release()` to release slip).
+- Epson TM-U590 and TM-U590P
+- Equal (EQ-IT-001) POS-58
+- Everycom EC-58
+- Excelvan HOP-E200 
+- Excelvan HOP-E58
+- Excelvan HOP-E801
+- Gainscha GP-2120TF
+- Gainscha GP-5890x (Also marketed as EC Line 5890x)
+- Gainscha GP-U80300I (Also marketed as gprinter GP-U80300I)
+- gprinter GP-U80160I
+- HOIN HOP-H58
+- Ithaca iTherm 28
+- Hasar HTP 250
+- Metapace T-1
+- Metapace T-25
+- Nexa PX700
+- Nyear NP100
+- OKI RT322
+- OKI 80 Plus III
+- Orient BTP-R580
+- P-822D
+- P85A-401 (make unknown)
+- Partner Tech RP320
+- POSLIGNE ODP200H-III-G
+- QPOS Q58M
+- Rongta RP326US
+- Rongta RP58-U
+- Rongta RP80USE
+- SAM4S GIANT-100DB
+- Senor TP-100
+- Sewoo SLK-TS400
+- SEYPOS PRP-96
+- SEYPOS PRP-300 (Also marketed as TYSSO PRP-300)
+- SNBC BTP-R880NPIII
+- Solux SX-TP-88300
+- Sicar POS-80
+- Silicon SP-201 / RP80USE
+- SPRT SP-POS88V
+- Star BSC10
+- Star TSP100 ECO
+- Star TSP100III FuturePRNT
+- Star TSP-650
+- Star TUP-592
+- TVS RP45 Shoppe
+- Venus V248T
+- Xeumior SM-8330
+- Xprinter F-900
+- Xprinter XP-365B
+- Xprinter XP-58 Series
+- Xprinter XP-80C
+- Xprinter XP-90
+- XPrinter XP-Q20011
+- Xprinter XP-Q800
+- Zjiang NT-58H
+- Zjiang ZJ-5870
+- Zjiang ZJ-5890 (Also sold as POS-5890 by many vendors; ZJ-5890K, ZJ-5890T also work).
+- Zjiang ZJ-8220 (Also marketed as Excelvan ZJ-8220)
+- Zjiang ZJ-8250
+
+If you use any other printer with this code, please [let us know](https://github.com/mike42/escpos-php/issues/new) so that it can be added to the list.
+
+## Basic usage
+
+### Include the library
+
+#### Composer
+
+This library is designed for use with the `composer` PHP dependency manager. Simply add the `mike42/escpos-php` package to get started:
+
+```bash
+composer require mike42/escpos-php
+```
+
+If you haven't used `composer` before, you can read about it at [getcomposer.org](https://getcomposer.org/).
+
+#### Requirements
+
+This project has few hard dependencies:
+
+- PHP 7.3 or newer.
+- `json` extension, used to load bundled printer definitions (see [documentation](https://www.php.net/manual/en/book.json.php))
+- `intl` extension, used for character encoding (see [documentation](https://www.php.net/manual/en/book.intl.php))
+- `zlib` extension, used for de-compressing bundled resources (see [documentation](https://www.php.net/manual/en/book.zlib.php)).
+
+It is also suggested that you install either `imagick` or `gd`, as these can be used to speed up image processing.
+
+A number of optional extensions can be added to enable more specific features. These
+are described in the "suggest" section of [composer.json](https://github.com/mike42/escpos-php/tree/master/composer.json).
+
+### The 'Hello World' receipt
+
+To make use of this driver, your server (where PHP is installed) must be able to communicate with your printer. Start by generating a simple receipt and sending it to your printer using the command-line.
+
+```php
+<?php
+/* Call this file 'hello-world.php' */
+require __DIR__ . '/vendor/autoload.php';
+use Mike42\Escpos\PrintConnectors\FilePrintConnector;
+use Mike42\Escpos\Printer;
+$connector = new FilePrintConnector("php://stdout");
+$printer = new Printer($connector);
+$printer -> text("Hello World!\n");
+$printer -> cut();
+$printer -> close();
+```
+
+Some examples are below for common interfaces.
+
+Communicate with a printer with an Ethernet interface using `netcat`:
+
+```bash
+php hello-world.php | nc 10.x.x.x. 9100
+```
+
+A USB local printer connected with `usblp` on Linux has a device file (Includes USB-parallel interfaces):
+
+```bash
+php hello-world.php > /dev/usb/lp0
+```
+
+A computer installed into the local `cups` server is accessed through `lp` or `lpr`:
+
+```bash
+php hello-world.php > foo.txt
+lpr -o raw -H localhost -P printer foo.txt
+```
+
+A local or networked printer on a Windows computer is mapped in to a file, and generally requires you to share the printer first:
+
+```
+php hello-world.php > foo.txt
+net use LPT1 \\server\printer
+copy foo.txt LPT1
+del foo.txt
+```
+
+If you have troubles at this point, then you should consult your OS and printer system documentation to try to find a working print command.
+
+### Using a PrintConnector
+
+To print receipts from PHP, use the most applicable [PrintConnector](https://github.com/mike42/escpos-php/tree/master/src/Mike42/Escpos/PrintConnectors) for your setup. The connector simply provides the plumbing to get data to the printer.
+
+For example, a `NetworkPrintConnector` accepts an IP address and port:
+
+```php
+use Mike42\Escpos\PrintConnectors\NetworkPrintConnector;
+use Mike42\Escpos\Printer;
+$connector = new NetworkPrintConnector("10.x.x.x", 9100);
+$printer = new Printer($connector);
+try {
+    // ... Print stuff
+} finally {
+    $printer -> close();
+}
+```
+
+While a serial printer might use:
+
+```php
+use Mike42\Escpos\PrintConnectors\FilePrintConnector;
+use Mike42\Escpos\Printer;
+$connector = new FilePrintConnector("/dev/ttyS0");
+$printer = new Printer($connector);
+```
+
+For each OS/interface combination that's supported, there are examples in the compatibility section of how a `PrintConnector` would be constructed. If you can't get a `PrintConnector` to work, then be sure to include the working print command in your issue.
+
+### Using a CapabilityProfile
+
+Support for commands and code pages varies between printer vendors and models. By default, the driver will accept UTF-8, and output commands that are suitable for Epson TM-series printers.
+
+When trying out a new brand of printer, it's a good idea to use the "simple" `CapabilityProfile`, which instructs the driver to avoid the use of advanced features (generally simpler image handling, ASCII-only text).
+
+```php
+use Mike42\Escpos\PrintConnectors\WindowsPrintConnector;
+use Mike42\Escpos\CapabilityProfile;
+$profile = CapabilityProfile::load("simple");
+$connector = new WindowsPrintConnector("smb://computer/printer");
+$printer = new Printer($connector, $profile);
+```
+
+As another example, Star-branded printers use different commands:
+
+```php
+use Mike42\Escpos\PrintConnectors\WindowsPrintConnector;
+use Mike42\Escpos\CapabilityProfile;
+$profile = CapabilityProfile::load("SP2000")
+$connector = new WindowsPrintConnector("smb://computer/printer");
+$printer = new Printer($connector, $profile);
+```
+
+For a list of available profiles, or to have support for your printer improved, please see the upstream [receipt-print-hq/escpos-printer-db](https://github.com/receipt-print-hq/escpos-printer-db) project.
+
+### Tips & examples
+
+On Linux, your printer device file will be somewhere like `/dev/lp0` (parallel), `/dev/usb/lp1` (USB), `/dev/ttyUSB0` (USB-Serial), `/dev/ttyS0` (serial).
+
+On Windows, the device files will be along the lines of `LPT1` (parallel) or `COM1` (serial). Use the `WindowsPrintConnector` to tap into system printing on Windows (eg. [Windows USB](https://github.com/mike42/escpos-php/tree/master/example/interface/windows-usb.php), [SMB](https://github.com/mike42/escpos-php/tree/master/example/interface/smb.php) or [Windows LPT](https://github.com/mike42/escpos-php/tree/master/example/interface/windows-lpt.php)) - this submits print jobs via a queue rather than communicating directly with the printer.
+
+A complete real-world receipt can be found in the code of [Auth](https://github.com/mike42/Auth) in [ReceiptPrinter.php](https://github.com/mike42/Auth/blob/master/lib/misc/ReceiptPrinter.php). It includes justification, boldness, and a barcode.
+
+Other examples are located in the [example/](https://github.com/mike42/escpos-php/blob/master/example/) directory.
+
+## Available methods
+
+### __construct(PrintConnector $connector, CapabilityProfile $profile)
+Construct new print object.
+
+Parameters:
+- `PrintConnector $connector`: The PrintConnector to send data to.
+- `CapabilityProfile $profile` Supported features of this printer. If not set, the "default" CapabilityProfile will be used, which is suitable for Epson printers.
+
+See [example/interface/](https://github.com/mike42/escpos-php/tree/master/example/interface/) for ways to open connections for different platforms and interfaces.
+
+### barcode($content, $type)
+Print a barcode.
+
+Parameters:
+
+- `string $content`: The information to encode.
+- `int $type`: The barcode standard to output. If not specified, `Printer::BARCODE_CODE39` will be used.
+
+Currently supported barcode standards are (depending on your printer):
+
+- `BARCODE_UPCA`
+- `BARCODE_UPCE`
+- `BARCODE_JAN13`
+- `BARCODE_JAN8`
+- `BARCODE_CODE39`
+- `BARCODE_ITF`
+- `BARCODE_CODABAR`
+
+Note that some barcode standards can only encode numbers, so attempting to print non-numeric codes with them may result in strange behaviour.
+
+### bitImage(EscposImage $image, $size)
+See [graphics()](#graphicsescposimage-image-size) below.
+
+### cut($mode, $lines)
+Cut the paper.
+
+Parameters:
+
+- `int $mode`: Cut mode, either `Printer::CUT_FULL` or `Printer::CUT_PARTIAL`. If not specified, `Printer::CUT_FULL` will be used.
+- `int $lines`: Number of lines to feed before cutting. If not specified, 3 will be used.
+
+### feed($lines)
+Print and feed line / Print and feed n lines.
+
+Parameters:
+
+- `int $lines`: Number of lines to feed
+
+### feedForm()
+Some printers require a form feed to release the paper. On most printers, this command is only useful in page mode, which is not implemented in this driver.
+
+### feedReverse($lines)
+Print and reverse feed n lines.
+
+Parameters:
+
+- `int $lines`: number of lines to feed. If not specified, 1 line will be fed.
+
+### graphics(EscposImage $image, $size)
+Print an image to the printer.
+
+Parameters:
+
+- `EscposImage $img`: The image to print.
+- `int $size`: Output size modifier for the image.
+
+Size modifiers are:
+
+- `IMG_DEFAULT` (leave image at original size)
+- `IMG_DOUBLE_WIDTH`
+- `IMG_DOUBLE_HEIGHT`
+
+A minimal example:
+
+```php
+<?php
+$img = EscposImage::load("logo.png");
+$printer -> graphics($img);
+```
+
+See the [example/](https://github.com/mike42/escpos-php/blob/master/example/) folder for detailed examples.
+
+The function [bitImage()](#bitimageescposimage-image-size) takes the same parameters, and can be used if your printer doesn't support the newer graphics commands. As an additional fallback, the `bitImageColumnFormat()` function is also provided.
+
+### initialize()
+Initialize printer. This resets formatting back to the defaults.
+
+### pdf417Code($content, $width, $heightMultiplier, $dataColumnCount, $ec, $options)
+Print a two-dimensional data code using the PDF417 standard.
+
+Parameters:
+
+- `string $content`: Text or numbers to store in the code
+- `number $width`: Width of a module (pixel) in the printed code. Default is 3 dots.
+- `number $heightMultiplier`: Multiplier for height of a module. Default is 3 times the width.
+- `number $dataColumnCount`: Number of data columns to use. 0 (default) is to auto-calculate. Smaller numbers will result in a narrower code, making larger pixel sizes possible. Larger numbers require smaller pixel sizes.
+- `real $ec`: Error correction ratio, from 0.01 to 4.00. Default is 0.10 (10%).
+- `number $options`: Standard code `Printer::PDF417_STANDARD` with start/end bars, or truncated code `Printer::PDF417_TRUNCATED` with start bars only.
+
+### pulse($pin, $on_ms, $off_ms)
+Generate a pulse, for opening a cash drawer if one is connected. The default settings (0, 120, 240) should open an Epson drawer.
+
+Parameters:
+
+- `int $pin`: 0 or 1, for pin 2 or pin 5 kick-out connector respectively.
+- `int $on_ms`: pulse ON time, in milliseconds.
+- `int $off_ms`: pulse OFF time, in milliseconds.
+
+### qrCode($content, $ec, $size, $model)
+Print the given data as a QR code on the printer.
+
+- `string $content`: The content of the code. Numeric data will be more efficiently compacted.
+- `int $ec` Error-correction level to use. One of `Printer::QR_ECLEVEL_L` (default), `Printer::QR_ECLEVEL_M`, `Printer::QR_ECLEVEL_Q` or `Printer::QR_ECLEVEL_H`. Higher error correction results in a less compact code.
+- `int $size`: Pixel size to use. Must be 1-16 (default 3)
+- `int $model`: QR code model to use. Must be one of `Printer::QR_MODEL_1`, `Printer::QR_MODEL_2` (default) or `Printer::QR_MICRO` (not supported by all printers).
+
+### selectPrintMode($mode)
+Select print mode(s).
+
+Parameters:
+
+- `int $mode`: The mode to use. Default is `Printer::MODE_FONT_A`, with no special formatting. This has a similar effect to running `initialize()`.
+
+Several MODE_* constants can be OR'd together passed to this function's `$mode` argument. The valid modes are:
+
+- `MODE_FONT_A`
+- `MODE_FONT_B`
+- `MODE_EMPHASIZED`
+- `MODE_DOUBLE_HEIGHT`
+- `MODE_DOUBLE_WIDTH`
+- `MODE_UNDERLINE`
+
+### setBarcodeHeight($height)
+Set barcode height.
+
+Parameters:
+
+- `int $height`: Height in dots. If not specified, 8 will be used.
+
+### setBarcodeWidth($width)
+Set barcode bar width.
+
+Parameters:
+
+- `int $width`: Bar width in dots. If not specified, 3 will be used. Values above 6 appear to have no effect.
+
+### setColor($color)
+Select print color - on printers that support multiple colors.
+
+Parameters:
+
+- `int $color`: Color to use. Must be either `Printer::COLOR_1` (default), or `Printer::COLOR_2`
+
+### setDoubleStrike($on)
+Turn double-strike mode on/off.
+
+Parameters:
+
+- `boolean $on`: true for double strike, false for no double strike.
+
+### setEmphasis($on)
+Turn emphasized mode on/off.
+
+Parameters:
+
+- `boolean $on`: true for emphasis, false for no emphasis.
+
+### setFont($font)
+Select font. Most printers have two fonts (Fonts A and B), and some have a third (Font C).
+
+Parameters:
+
+- `int $font`: The font to use. Must be either `Printer::FONT_A`, `Printer::FONT_B`, or `Printer::FONT_C`.
+
+### setJustification($justification)
+Select justification.
+
+Parameters:
+
+- `int $justification`: One of `Printer::JUSTIFY_LEFT`, `Printer::JUSTIFY_CENTER`, or `Printer::JUSTIFY_RIGHT`.
+
+### setLineSpacing($height)
+
+Set the height of the line.
+
+Some printers will allow you to overlap lines with a smaller line feed.
+
+Parameters:
+
+- `int	$height`:	The height of each line, in dots. If not set, the printer will reset to its default line spacing.
+
+### setPrintLeftMargin($margin)
+
+Set print area left margin. Reset to default with `Printer::initialize()`.
+
+Parameters:
+
+- `int $margin`: The left margin to set on to the print area, in dots.
+
+### setPrintWidth($width)
+
+Set print area width. This can be used to add a right margin to the print area. Reset to default with `Printer::initialize()`.
+
+Parameters:
+
+- `int $width`: The width of the page print area, in dots.
+
+### setReverseColors($on)
+Set black/white reverse mode on or off. In this mode, text is printed white on a black background.
+
+Parameters:
+
+- `boolean $on`: True to enable, false to disable.
+
+### setTextSize($widthMultiplier, $heightMultiplier)
+Set the size of text, as a multiple of the normal size.
+
+Parameters:
+
+- `int $widthMultiplier`: Multiple of the regular height to use (range 1 - 8).
+- `int $heightMultiplier`: Multiple of the regular height to use (range 1 - 8).
+
+### setUnderline($underline)
+Set underline for printed text.
+
+Parameters:
+
+- `int $underline`: Either `true`/`false`, or one of `Printer::UNDERLINE_NONE`, `Printer::UNDERLINE_SINGLE` or `Printer::UNDERLINE_DOUBLE`. Defaults to `Printer::UNDERLINE_SINGLE`.
+
+### text($str)
+Add text to the buffer. Text should either be followed by a line-break, or `feed()` should be called after this.
+
+Parameters:
+
+- `string $str`: The string to print.
+
+# Further notes
+Posts I've written up for people who are learning how to use receipt printers:
+
+* [What is ESC/POS, and how do I use it?](https://mike42.me/blog/what-is-escpos-and-how-do-i-use-it), which documents the output of `example/demo.php`.
+* [Setting up an Epson receipt printer](https://mike42.me/blog/2014-20-26-setting-up-an-epson-receipt-printer)
+* [Getting a USB receipt printer working on Linux](https://mike42.me/blog/2015-03-getting-a-usb-receipt-printer-working-on-linux)
+
+# Development
+
+This code is MIT licensed, and you are encouraged to contribute any modifications back to the project.
+
+For development, it's suggested that you load `imagick`, `gd` and `Xdebug` PHP extensions.
+
+The tests are executed on [Travis CI](https://travis-ci.org/mike42/escpos-php) over PHP 7.3, 7.4 and 8.0. Older versions of PHP are not supported in the current release, nor is HHVM.
+
+Fetch a copy of this code and load dependencies with composer:
+
+    git clone https://github.com/mike42/escpos-php
+    cd escpos-php/
+    composer install
+
+Execute unit tests via `phpunit`:
+
+    php vendor/bin/phpunit --coverage-text
+
+This project uses the PSR-2 standard, which can be checked via [PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer):
+
+    php vendor/bin/phpcs --standard=psr2 src/ -n
+
+The developer docs are build with [doxygen](https://github.com/doxygen/doxygen). Re-build them to check for documentation warnings:
+
+    make -C doc clean && make -C doc
+
+Pull requests and bug reports welcome.

+ 44 - 0
vendor/mike42/escpos-php/composer.json

@@ -0,0 +1,44 @@
+{
+	"name" : "mike42/escpos-php",
+	"type" : "library",
+	"description" : "PHP receipt printer library for use with ESC/POS-compatible thermal and impact printers",
+	"homepage" : "https://github.com/mike42/escpos-php",
+	"keywords" : [
+		"barcode",
+		"epson",
+		"receipt-printer",
+		"printer",
+		"escpos"
+	],
+	"license" : "MIT",
+	"authors" : [{
+			"name" : "Michael Billington",
+			"email" : "michael.billington@gmail.com"
+		}
+	],
+	"config": {
+		"platform": {
+			"php": "7.3.0"
+		}
+	},
+	"require" : {
+		"php" : ">=7.3.0",
+		"ext-json": "*",
+		"ext-intl": "*",
+		"ext-zlib": "*",
+		"mike42/gfx-php" : "^0.6"
+	},
+	"suggest" : {
+		"ext-imagick" : "Will be used for image printing if present. Required for PDF printing or use of custom fonts.",
+		"ext-gd" : "Used for image printing if present."
+	},
+	"require-dev" : {
+		"phpunit/phpunit" : "^9",
+		"squizlabs/php_codesniffer" : "^3.3"
+	},
+	"autoload" : {
+		"psr-4" : {
+			"Mike42\\" : "src/Mike42"
+		}
+	}
+}

+ 2216 - 0
vendor/mike42/escpos-php/composer.lock

@@ -0,0 +1,2216 @@
+{
+    "_readme": [
+        "This file locks the dependencies of your project to a known state",
+        "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
+        "This file is @generated automatically"
+    ],
+    "content-hash": "6adc3efd75fd38461b47c0058bd057b4",
+    "packages": [
+        {
+            "name": "mike42/gfx-php",
+            "version": "v0.6",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/mike42/gfx-php.git",
+                "reference": "ed9ded2a9298e4084a9c557ab74a89b71e43dbdb"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/mike42/gfx-php/zipball/ed9ded2a9298e4084a9c557ab74a89b71e43dbdb",
+                "reference": "ed9ded2a9298e4084a9c557ab74a89b71e43dbdb",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.0.0"
+            },
+            "require-dev": {
+                "phpbench/phpbench": "@dev",
+                "phpunit/phpunit": "^6.5",
+                "squizlabs/php_codesniffer": "^3.3.1"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "Mike42\\": "src/Mike42"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "LGPL-2.1-or-later"
+            ],
+            "authors": [
+                {
+                    "name": "Michael Billington",
+                    "email": "michael.billington@gmail.com"
+                }
+            ],
+            "description": "The pure PHP graphics library",
+            "homepage": "https://github.com/mike42/gfx-php",
+            "support": {
+                "issues": "https://github.com/mike42/gfx-php/issues",
+                "source": "https://github.com/mike42/gfx-php/tree/v0.6"
+            },
+            "time": "2019-10-05T02:44:33+00:00"
+        }
+    ],
+    "packages-dev": [
+        {
+            "name": "doctrine/instantiator",
+            "version": "1.4.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/doctrine/instantiator.git",
+                "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b",
+                "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^7.1 || ^8.0"
+            },
+            "require-dev": {
+                "doctrine/coding-standard": "^8.0",
+                "ext-pdo": "*",
+                "ext-phar": "*",
+                "phpbench/phpbench": "^0.13 || 1.0.0-alpha2",
+                "phpstan/phpstan": "^0.12",
+                "phpstan/phpstan-phpunit": "^0.12",
+                "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Marco Pivetta",
+                    "email": "ocramius@gmail.com",
+                    "homepage": "https://ocramius.github.io/"
+                }
+            ],
+            "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
+            "homepage": "https://www.doctrine-project.org/projects/instantiator.html",
+            "keywords": [
+                "constructor",
+                "instantiate"
+            ],
+            "support": {
+                "issues": "https://github.com/doctrine/instantiator/issues",
+                "source": "https://github.com/doctrine/instantiator/tree/1.4.0"
+            },
+            "funding": [
+                {
+                    "url": "https://www.doctrine-project.org/sponsorship.html",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://www.patreon.com/phpdoctrine",
+                    "type": "patreon"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator",
+                    "type": "tidelift"
+                }
+            ],
+            "time": "2020-11-10T18:47:58+00:00"
+        },
+        {
+            "name": "myclabs/deep-copy",
+            "version": "1.10.2",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/myclabs/DeepCopy.git",
+                "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220",
+                "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^7.1 || ^8.0"
+            },
+            "replace": {
+                "myclabs/deep-copy": "self.version"
+            },
+            "require-dev": {
+                "doctrine/collections": "^1.0",
+                "doctrine/common": "^2.6",
+                "phpunit/phpunit": "^7.1"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "DeepCopy\\": "src/DeepCopy/"
+                },
+                "files": [
+                    "src/DeepCopy/deep_copy.php"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "description": "Create deep copies (clones) of your objects",
+            "keywords": [
+                "clone",
+                "copy",
+                "duplicate",
+                "object",
+                "object graph"
+            ],
+            "support": {
+                "issues": "https://github.com/myclabs/DeepCopy/issues",
+                "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2"
+            },
+            "funding": [
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy",
+                    "type": "tidelift"
+                }
+            ],
+            "time": "2020-11-13T09:40:50+00:00"
+        },
+        {
+            "name": "nikic/php-parser",
+            "version": "v4.10.4",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/nikic/PHP-Parser.git",
+                "reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/c6d052fc58cb876152f89f532b95a8d7907e7f0e",
+                "reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e",
+                "shasum": ""
+            },
+            "require": {
+                "ext-tokenizer": "*",
+                "php": ">=7.0"
+            },
+            "require-dev": {
+                "ircmaxell/php-yacc": "^0.0.7",
+                "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0"
+            },
+            "bin": [
+                "bin/php-parse"
+            ],
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "4.9-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "PhpParser\\": "lib/PhpParser"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Nikita Popov"
+                }
+            ],
+            "description": "A PHP parser written in PHP",
+            "keywords": [
+                "parser",
+                "php"
+            ],
+            "support": {
+                "issues": "https://github.com/nikic/PHP-Parser/issues",
+                "source": "https://github.com/nikic/PHP-Parser/tree/v4.10.4"
+            },
+            "time": "2020-12-20T10:01:03+00:00"
+        },
+        {
+            "name": "phar-io/manifest",
+            "version": "2.0.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/phar-io/manifest.git",
+                "reference": "85265efd3af7ba3ca4b2a2c34dbfc5788dd29133"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/phar-io/manifest/zipball/85265efd3af7ba3ca4b2a2c34dbfc5788dd29133",
+                "reference": "85265efd3af7ba3ca4b2a2c34dbfc5788dd29133",
+                "shasum": ""
+            },
+            "require": {
+                "ext-dom": "*",
+                "ext-phar": "*",
+                "ext-xmlwriter": "*",
+                "phar-io/version": "^3.0.1",
+                "php": "^7.2 || ^8.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.0.x-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Arne Blankerts",
+                    "email": "arne@blankerts.de",
+                    "role": "Developer"
+                },
+                {
+                    "name": "Sebastian Heuer",
+                    "email": "sebastian@phpeople.de",
+                    "role": "Developer"
+                },
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de",
+                    "role": "Developer"
+                }
+            ],
+            "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)",
+            "support": {
+                "issues": "https://github.com/phar-io/manifest/issues",
+                "source": "https://github.com/phar-io/manifest/tree/master"
+            },
+            "time": "2020-06-27T14:33:11+00:00"
+        },
+        {
+            "name": "phar-io/version",
+            "version": "3.1.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/phar-io/version.git",
+                "reference": "bae7c545bef187884426f042434e561ab1ddb182"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/phar-io/version/zipball/bae7c545bef187884426f042434e561ab1ddb182",
+                "reference": "bae7c545bef187884426f042434e561ab1ddb182",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^7.2 || ^8.0"
+            },
+            "type": "library",
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Arne Blankerts",
+                    "email": "arne@blankerts.de",
+                    "role": "Developer"
+                },
+                {
+                    "name": "Sebastian Heuer",
+                    "email": "sebastian@phpeople.de",
+                    "role": "Developer"
+                },
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de",
+                    "role": "Developer"
+                }
+            ],
+            "description": "Library for handling version information and constraints",
+            "support": {
+                "issues": "https://github.com/phar-io/version/issues",
+                "source": "https://github.com/phar-io/version/tree/3.1.0"
+            },
+            "time": "2021-02-23T14:00:09+00:00"
+        },
+        {
+            "name": "phpdocumentor/reflection-common",
+            "version": "2.2.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/phpDocumentor/ReflectionCommon.git",
+                "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b",
+                "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^7.2 || ^8.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-2.x": "2.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "phpDocumentor\\Reflection\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Jaap van Otterdijk",
+                    "email": "opensource@ijaap.nl"
+                }
+            ],
+            "description": "Common reflection classes used by phpdocumentor to reflect the code structure",
+            "homepage": "http://www.phpdoc.org",
+            "keywords": [
+                "FQSEN",
+                "phpDocumentor",
+                "phpdoc",
+                "reflection",
+                "static analysis"
+            ],
+            "support": {
+                "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues",
+                "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x"
+            },
+            "time": "2020-06-27T09:03:43+00:00"
+        },
+        {
+            "name": "phpdocumentor/reflection-docblock",
+            "version": "5.2.2",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
+                "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556",
+                "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556",
+                "shasum": ""
+            },
+            "require": {
+                "ext-filter": "*",
+                "php": "^7.2 || ^8.0",
+                "phpdocumentor/reflection-common": "^2.2",
+                "phpdocumentor/type-resolver": "^1.3",
+                "webmozart/assert": "^1.9.1"
+            },
+            "require-dev": {
+                "mockery/mockery": "~1.3.2"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "5.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "phpDocumentor\\Reflection\\": "src"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Mike van Riel",
+                    "email": "me@mikevanriel.com"
+                },
+                {
+                    "name": "Jaap van Otterdijk",
+                    "email": "account@ijaap.nl"
+                }
+            ],
+            "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
+            "support": {
+                "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues",
+                "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master"
+            },
+            "time": "2020-09-03T19:13:55+00:00"
+        },
+        {
+            "name": "phpdocumentor/type-resolver",
+            "version": "1.4.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/phpDocumentor/TypeResolver.git",
+                "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0",
+                "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^7.2 || ^8.0",
+                "phpdocumentor/reflection-common": "^2.0"
+            },
+            "require-dev": {
+                "ext-tokenizer": "*"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-1.x": "1.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "phpDocumentor\\Reflection\\": "src"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Mike van Riel",
+                    "email": "me@mikevanriel.com"
+                }
+            ],
+            "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
+            "support": {
+                "issues": "https://github.com/phpDocumentor/TypeResolver/issues",
+                "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.4.0"
+            },
+            "time": "2020-09-17T18:55:26+00:00"
+        },
+        {
+            "name": "phpspec/prophecy",
+            "version": "1.12.2",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/phpspec/prophecy.git",
+                "reference": "245710e971a030f42e08f4912863805570f23d39"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/phpspec/prophecy/zipball/245710e971a030f42e08f4912863805570f23d39",
+                "reference": "245710e971a030f42e08f4912863805570f23d39",
+                "shasum": ""
+            },
+            "require": {
+                "doctrine/instantiator": "^1.2",
+                "php": "^7.2 || ~8.0, <8.1",
+                "phpdocumentor/reflection-docblock": "^5.2",
+                "sebastian/comparator": "^3.0 || ^4.0",
+                "sebastian/recursion-context": "^3.0 || ^4.0"
+            },
+            "require-dev": {
+                "phpspec/phpspec": "^6.0",
+                "phpunit/phpunit": "^8.0 || ^9.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.11.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Prophecy\\": "src/Prophecy"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Konstantin Kudryashov",
+                    "email": "ever.zet@gmail.com",
+                    "homepage": "http://everzet.com"
+                },
+                {
+                    "name": "Marcello Duarte",
+                    "email": "marcello.duarte@gmail.com"
+                }
+            ],
+            "description": "Highly opinionated mocking framework for PHP 5.3+",
+            "homepage": "https://github.com/phpspec/prophecy",
+            "keywords": [
+                "Double",
+                "Dummy",
+                "fake",
+                "mock",
+                "spy",
+                "stub"
+            ],
+            "support": {
+                "issues": "https://github.com/phpspec/prophecy/issues",
+                "source": "https://github.com/phpspec/prophecy/tree/1.12.2"
+            },
+            "time": "2020-12-19T10:15:11+00:00"
+        },
+        {
+            "name": "phpunit/php-code-coverage",
+            "version": "9.2.5",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
+                "reference": "f3e026641cc91909d421802dd3ac7827ebfd97e1"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f3e026641cc91909d421802dd3ac7827ebfd97e1",
+                "reference": "f3e026641cc91909d421802dd3ac7827ebfd97e1",
+                "shasum": ""
+            },
+            "require": {
+                "ext-dom": "*",
+                "ext-libxml": "*",
+                "ext-xmlwriter": "*",
+                "nikic/php-parser": "^4.10.2",
+                "php": ">=7.3",
+                "phpunit/php-file-iterator": "^3.0.3",
+                "phpunit/php-text-template": "^2.0.2",
+                "sebastian/code-unit-reverse-lookup": "^2.0.2",
+                "sebastian/complexity": "^2.0",
+                "sebastian/environment": "^5.1.2",
+                "sebastian/lines-of-code": "^1.0.3",
+                "sebastian/version": "^3.0.1",
+                "theseer/tokenizer": "^1.2.0"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^9.3"
+            },
+            "suggest": {
+                "ext-pcov": "*",
+                "ext-xdebug": "*"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "9.2-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de",
+                    "role": "lead"
+                }
+            ],
+            "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.",
+            "homepage": "https://github.com/sebastianbergmann/php-code-coverage",
+            "keywords": [
+                "coverage",
+                "testing",
+                "xunit"
+            ],
+            "support": {
+                "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
+                "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.5"
+            },
+            "funding": [
+                {
+                    "url": "https://github.com/sebastianbergmann",
+                    "type": "github"
+                }
+            ],
+            "time": "2020-11-28T06:44:49+00:00"
+        },
+        {
+            "name": "phpunit/php-file-iterator",
+            "version": "3.0.5",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/php-file-iterator.git",
+                "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/aa4be8575f26070b100fccb67faabb28f21f66f8",
+                "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.3"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^9.3"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "3.0-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de",
+                    "role": "lead"
+                }
+            ],
+            "description": "FilterIterator implementation that filters files based on a list of suffixes.",
+            "homepage": "https://github.com/sebastianbergmann/php-file-iterator/",
+            "keywords": [
+                "filesystem",
+                "iterator"
+            ],
+            "support": {
+                "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues",
+                "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.5"
+            },
+            "funding": [
+                {
+                    "url": "https://github.com/sebastianbergmann",
+                    "type": "github"
+                }
+            ],
+            "time": "2020-09-28T05:57:25+00:00"
+        },
+        {
+            "name": "phpunit/php-invoker",
+            "version": "3.1.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/php-invoker.git",
+                "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67",
+                "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.3"
+            },
+            "require-dev": {
+                "ext-pcntl": "*",
+                "phpunit/phpunit": "^9.3"
+            },
+            "suggest": {
+                "ext-pcntl": "*"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "3.1-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de",
+                    "role": "lead"
+                }
+            ],
+            "description": "Invoke callables with a timeout",
+            "homepage": "https://github.com/sebastianbergmann/php-invoker/",
+            "keywords": [
+                "process"
+            ],
+            "support": {
+                "issues": "https://github.com/sebastianbergmann/php-invoker/issues",
+                "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1"
+            },
+            "funding": [
+                {
+                    "url": "https://github.com/sebastianbergmann",
+                    "type": "github"
+                }
+            ],
+            "time": "2020-09-28T05:58:55+00:00"
+        },
+        {
+            "name": "phpunit/php-text-template",
+            "version": "2.0.4",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/php-text-template.git",
+                "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28",
+                "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.3"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^9.3"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.0-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de",
+                    "role": "lead"
+                }
+            ],
+            "description": "Simple template engine.",
+            "homepage": "https://github.com/sebastianbergmann/php-text-template/",
+            "keywords": [
+                "template"
+            ],
+            "support": {
+                "issues": "https://github.com/sebastianbergmann/php-text-template/issues",
+                "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4"
+            },
+            "funding": [
+                {
+                    "url": "https://github.com/sebastianbergmann",
+                    "type": "github"
+                }
+            ],
+            "time": "2020-10-26T05:33:50+00:00"
+        },
+        {
+            "name": "phpunit/php-timer",
+            "version": "5.0.3",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/php-timer.git",
+                "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2",
+                "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.3"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^9.3"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "5.0-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de",
+                    "role": "lead"
+                }
+            ],
+            "description": "Utility class for timing",
+            "homepage": "https://github.com/sebastianbergmann/php-timer/",
+            "keywords": [
+                "timer"
+            ],
+            "support": {
+                "issues": "https://github.com/sebastianbergmann/php-timer/issues",
+                "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3"
+            },
+            "funding": [
+                {
+                    "url": "https://github.com/sebastianbergmann",
+                    "type": "github"
+                }
+            ],
+            "time": "2020-10-26T13:16:10+00:00"
+        },
+        {
+            "name": "phpunit/phpunit",
+            "version": "9.5.2",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/phpunit.git",
+                "reference": "f661659747f2f87f9e72095bb207bceb0f151cb4"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f661659747f2f87f9e72095bb207bceb0f151cb4",
+                "reference": "f661659747f2f87f9e72095bb207bceb0f151cb4",
+                "shasum": ""
+            },
+            "require": {
+                "doctrine/instantiator": "^1.3.1",
+                "ext-dom": "*",
+                "ext-json": "*",
+                "ext-libxml": "*",
+                "ext-mbstring": "*",
+                "ext-xml": "*",
+                "ext-xmlwriter": "*",
+                "myclabs/deep-copy": "^1.10.1",
+                "phar-io/manifest": "^2.0.1",
+                "phar-io/version": "^3.0.2",
+                "php": ">=7.3",
+                "phpspec/prophecy": "^1.12.1",
+                "phpunit/php-code-coverage": "^9.2.3",
+                "phpunit/php-file-iterator": "^3.0.5",
+                "phpunit/php-invoker": "^3.1.1",
+                "phpunit/php-text-template": "^2.0.3",
+                "phpunit/php-timer": "^5.0.2",
+                "sebastian/cli-parser": "^1.0.1",
+                "sebastian/code-unit": "^1.0.6",
+                "sebastian/comparator": "^4.0.5",
+                "sebastian/diff": "^4.0.3",
+                "sebastian/environment": "^5.1.3",
+                "sebastian/exporter": "^4.0.3",
+                "sebastian/global-state": "^5.0.1",
+                "sebastian/object-enumerator": "^4.0.3",
+                "sebastian/resource-operations": "^3.0.3",
+                "sebastian/type": "^2.3",
+                "sebastian/version": "^3.0.2"
+            },
+            "require-dev": {
+                "ext-pdo": "*",
+                "phpspec/prophecy-phpunit": "^2.0.1"
+            },
+            "suggest": {
+                "ext-soap": "*",
+                "ext-xdebug": "*"
+            },
+            "bin": [
+                "phpunit"
+            ],
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "9.5-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ],
+                "files": [
+                    "src/Framework/Assert/Functions.php"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de",
+                    "role": "lead"
+                }
+            ],
+            "description": "The PHP Unit Testing framework.",
+            "homepage": "https://phpunit.de/",
+            "keywords": [
+                "phpunit",
+                "testing",
+                "xunit"
+            ],
+            "support": {
+                "issues": "https://github.com/sebastianbergmann/phpunit/issues",
+                "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.2"
+            },
+            "funding": [
+                {
+                    "url": "https://phpunit.de/donate.html",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/sebastianbergmann",
+                    "type": "github"
+                }
+            ],
+            "time": "2021-02-02T14:45:58+00:00"
+        },
+        {
+            "name": "sebastian/cli-parser",
+            "version": "1.0.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/cli-parser.git",
+                "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2",
+                "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.3"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^9.3"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.0-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de",
+                    "role": "lead"
+                }
+            ],
+            "description": "Library for parsing CLI options",
+            "homepage": "https://github.com/sebastianbergmann/cli-parser",
+            "support": {
+                "issues": "https://github.com/sebastianbergmann/cli-parser/issues",
+                "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1"
+            },
+            "funding": [
+                {
+                    "url": "https://github.com/sebastianbergmann",
+                    "type": "github"
+                }
+            ],
+            "time": "2020-09-28T06:08:49+00:00"
+        },
+        {
+            "name": "sebastian/code-unit",
+            "version": "1.0.8",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/code-unit.git",
+                "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120",
+                "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.3"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^9.3"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.0-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de",
+                    "role": "lead"
+                }
+            ],
+            "description": "Collection of value objects that represent the PHP code units",
+            "homepage": "https://github.com/sebastianbergmann/code-unit",
+            "support": {
+                "issues": "https://github.com/sebastianbergmann/code-unit/issues",
+                "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8"
+            },
+            "funding": [
+                {
+                    "url": "https://github.com/sebastianbergmann",
+                    "type": "github"
+                }
+            ],
+            "time": "2020-10-26T13:08:54+00:00"
+        },
+        {
+            "name": "sebastian/code-unit-reverse-lookup",
+            "version": "2.0.3",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git",
+                "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5",
+                "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.3"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^9.3"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.0-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de"
+                }
+            ],
+            "description": "Looks up which function or method a line of code belongs to",
+            "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/",
+            "support": {
+                "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues",
+                "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3"
+            },
+            "funding": [
+                {
+                    "url": "https://github.com/sebastianbergmann",
+                    "type": "github"
+                }
+            ],
+            "time": "2020-09-28T05:30:19+00:00"
+        },
+        {
+            "name": "sebastian/comparator",
+            "version": "4.0.6",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/comparator.git",
+                "reference": "55f4261989e546dc112258c7a75935a81a7ce382"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382",
+                "reference": "55f4261989e546dc112258c7a75935a81a7ce382",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.3",
+                "sebastian/diff": "^4.0",
+                "sebastian/exporter": "^4.0"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^9.3"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "4.0-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de"
+                },
+                {
+                    "name": "Jeff Welch",
+                    "email": "whatthejeff@gmail.com"
+                },
+                {
+                    "name": "Volker Dusch",
+                    "email": "github@wallbash.com"
+                },
+                {
+                    "name": "Bernhard Schussek",
+                    "email": "bschussek@2bepublished.at"
+                }
+            ],
+            "description": "Provides the functionality to compare PHP values for equality",
+            "homepage": "https://github.com/sebastianbergmann/comparator",
+            "keywords": [
+                "comparator",
+                "compare",
+                "equality"
+            ],
+            "support": {
+                "issues": "https://github.com/sebastianbergmann/comparator/issues",
+                "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6"
+            },
+            "funding": [
+                {
+                    "url": "https://github.com/sebastianbergmann",
+                    "type": "github"
+                }
+            ],
+            "time": "2020-10-26T15:49:45+00:00"
+        },
+        {
+            "name": "sebastian/complexity",
+            "version": "2.0.2",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/complexity.git",
+                "reference": "739b35e53379900cc9ac327b2147867b8b6efd88"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88",
+                "reference": "739b35e53379900cc9ac327b2147867b8b6efd88",
+                "shasum": ""
+            },
+            "require": {
+                "nikic/php-parser": "^4.7",
+                "php": ">=7.3"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^9.3"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.0-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de",
+                    "role": "lead"
+                }
+            ],
+            "description": "Library for calculating the complexity of PHP code units",
+            "homepage": "https://github.com/sebastianbergmann/complexity",
+            "support": {
+                "issues": "https://github.com/sebastianbergmann/complexity/issues",
+                "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2"
+            },
+            "funding": [
+                {
+                    "url": "https://github.com/sebastianbergmann",
+                    "type": "github"
+                }
+            ],
+            "time": "2020-10-26T15:52:27+00:00"
+        },
+        {
+            "name": "sebastian/diff",
+            "version": "4.0.4",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/diff.git",
+                "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d",
+                "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.3"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^9.3",
+                "symfony/process": "^4.2 || ^5"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "4.0-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de"
+                },
+                {
+                    "name": "Kore Nordmann",
+                    "email": "mail@kore-nordmann.de"
+                }
+            ],
+            "description": "Diff implementation",
+            "homepage": "https://github.com/sebastianbergmann/diff",
+            "keywords": [
+                "diff",
+                "udiff",
+                "unidiff",
+                "unified diff"
+            ],
+            "support": {
+                "issues": "https://github.com/sebastianbergmann/diff/issues",
+                "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4"
+            },
+            "funding": [
+                {
+                    "url": "https://github.com/sebastianbergmann",
+                    "type": "github"
+                }
+            ],
+            "time": "2020-10-26T13:10:38+00:00"
+        },
+        {
+            "name": "sebastian/environment",
+            "version": "5.1.3",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/environment.git",
+                "reference": "388b6ced16caa751030f6a69e588299fa09200ac"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/388b6ced16caa751030f6a69e588299fa09200ac",
+                "reference": "388b6ced16caa751030f6a69e588299fa09200ac",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.3"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^9.3"
+            },
+            "suggest": {
+                "ext-posix": "*"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "5.1-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de"
+                }
+            ],
+            "description": "Provides functionality to handle HHVM/PHP environments",
+            "homepage": "http://www.github.com/sebastianbergmann/environment",
+            "keywords": [
+                "Xdebug",
+                "environment",
+                "hhvm"
+            ],
+            "support": {
+                "issues": "https://github.com/sebastianbergmann/environment/issues",
+                "source": "https://github.com/sebastianbergmann/environment/tree/5.1.3"
+            },
+            "funding": [
+                {
+                    "url": "https://github.com/sebastianbergmann",
+                    "type": "github"
+                }
+            ],
+            "time": "2020-09-28T05:52:38+00:00"
+        },
+        {
+            "name": "sebastian/exporter",
+            "version": "4.0.3",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/exporter.git",
+                "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/d89cc98761b8cb5a1a235a6b703ae50d34080e65",
+                "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.3",
+                "sebastian/recursion-context": "^4.0"
+            },
+            "require-dev": {
+                "ext-mbstring": "*",
+                "phpunit/phpunit": "^9.3"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "4.0-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de"
+                },
+                {
+                    "name": "Jeff Welch",
+                    "email": "whatthejeff@gmail.com"
+                },
+                {
+                    "name": "Volker Dusch",
+                    "email": "github@wallbash.com"
+                },
+                {
+                    "name": "Adam Harvey",
+                    "email": "aharvey@php.net"
+                },
+                {
+                    "name": "Bernhard Schussek",
+                    "email": "bschussek@gmail.com"
+                }
+            ],
+            "description": "Provides the functionality to export PHP variables for visualization",
+            "homepage": "http://www.github.com/sebastianbergmann/exporter",
+            "keywords": [
+                "export",
+                "exporter"
+            ],
+            "support": {
+                "issues": "https://github.com/sebastianbergmann/exporter/issues",
+                "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.3"
+            },
+            "funding": [
+                {
+                    "url": "https://github.com/sebastianbergmann",
+                    "type": "github"
+                }
+            ],
+            "time": "2020-09-28T05:24:23+00:00"
+        },
+        {
+            "name": "sebastian/global-state",
+            "version": "5.0.2",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/global-state.git",
+                "reference": "a90ccbddffa067b51f574dea6eb25d5680839455"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/a90ccbddffa067b51f574dea6eb25d5680839455",
+                "reference": "a90ccbddffa067b51f574dea6eb25d5680839455",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.3",
+                "sebastian/object-reflector": "^2.0",
+                "sebastian/recursion-context": "^4.0"
+            },
+            "require-dev": {
+                "ext-dom": "*",
+                "phpunit/phpunit": "^9.3"
+            },
+            "suggest": {
+                "ext-uopz": "*"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "5.0-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de"
+                }
+            ],
+            "description": "Snapshotting of global state",
+            "homepage": "http://www.github.com/sebastianbergmann/global-state",
+            "keywords": [
+                "global state"
+            ],
+            "support": {
+                "issues": "https://github.com/sebastianbergmann/global-state/issues",
+                "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.2"
+            },
+            "funding": [
+                {
+                    "url": "https://github.com/sebastianbergmann",
+                    "type": "github"
+                }
+            ],
+            "time": "2020-10-26T15:55:19+00:00"
+        },
+        {
+            "name": "sebastian/lines-of-code",
+            "version": "1.0.3",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/lines-of-code.git",
+                "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc",
+                "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc",
+                "shasum": ""
+            },
+            "require": {
+                "nikic/php-parser": "^4.6",
+                "php": ">=7.3"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^9.3"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.0-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de",
+                    "role": "lead"
+                }
+            ],
+            "description": "Library for counting the lines of code in PHP source code",
+            "homepage": "https://github.com/sebastianbergmann/lines-of-code",
+            "support": {
+                "issues": "https://github.com/sebastianbergmann/lines-of-code/issues",
+                "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3"
+            },
+            "funding": [
+                {
+                    "url": "https://github.com/sebastianbergmann",
+                    "type": "github"
+                }
+            ],
+            "time": "2020-11-28T06:42:11+00:00"
+        },
+        {
+            "name": "sebastian/object-enumerator",
+            "version": "4.0.4",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/object-enumerator.git",
+                "reference": "5c9eeac41b290a3712d88851518825ad78f45c71"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71",
+                "reference": "5c9eeac41b290a3712d88851518825ad78f45c71",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.3",
+                "sebastian/object-reflector": "^2.0",
+                "sebastian/recursion-context": "^4.0"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^9.3"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "4.0-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de"
+                }
+            ],
+            "description": "Traverses array structures and object graphs to enumerate all referenced objects",
+            "homepage": "https://github.com/sebastianbergmann/object-enumerator/",
+            "support": {
+                "issues": "https://github.com/sebastianbergmann/object-enumerator/issues",
+                "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4"
+            },
+            "funding": [
+                {
+                    "url": "https://github.com/sebastianbergmann",
+                    "type": "github"
+                }
+            ],
+            "time": "2020-10-26T13:12:34+00:00"
+        },
+        {
+            "name": "sebastian/object-reflector",
+            "version": "2.0.4",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/object-reflector.git",
+                "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7",
+                "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.3"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^9.3"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.0-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de"
+                }
+            ],
+            "description": "Allows reflection of object attributes, including inherited and non-public ones",
+            "homepage": "https://github.com/sebastianbergmann/object-reflector/",
+            "support": {
+                "issues": "https://github.com/sebastianbergmann/object-reflector/issues",
+                "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4"
+            },
+            "funding": [
+                {
+                    "url": "https://github.com/sebastianbergmann",
+                    "type": "github"
+                }
+            ],
+            "time": "2020-10-26T13:14:26+00:00"
+        },
+        {
+            "name": "sebastian/recursion-context",
+            "version": "4.0.4",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/recursion-context.git",
+                "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172",
+                "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.3"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^9.3"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "4.0-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de"
+                },
+                {
+                    "name": "Jeff Welch",
+                    "email": "whatthejeff@gmail.com"
+                },
+                {
+                    "name": "Adam Harvey",
+                    "email": "aharvey@php.net"
+                }
+            ],
+            "description": "Provides functionality to recursively process PHP variables",
+            "homepage": "http://www.github.com/sebastianbergmann/recursion-context",
+            "support": {
+                "issues": "https://github.com/sebastianbergmann/recursion-context/issues",
+                "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4"
+            },
+            "funding": [
+                {
+                    "url": "https://github.com/sebastianbergmann",
+                    "type": "github"
+                }
+            ],
+            "time": "2020-10-26T13:17:30+00:00"
+        },
+        {
+            "name": "sebastian/resource-operations",
+            "version": "3.0.3",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/resource-operations.git",
+                "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8",
+                "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.3"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^9.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "3.0-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de"
+                }
+            ],
+            "description": "Provides a list of PHP built-in functions that operate on resources",
+            "homepage": "https://www.github.com/sebastianbergmann/resource-operations",
+            "support": {
+                "issues": "https://github.com/sebastianbergmann/resource-operations/issues",
+                "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3"
+            },
+            "funding": [
+                {
+                    "url": "https://github.com/sebastianbergmann",
+                    "type": "github"
+                }
+            ],
+            "time": "2020-09-28T06:45:17+00:00"
+        },
+        {
+            "name": "sebastian/type",
+            "version": "2.3.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/type.git",
+                "reference": "81cd61ab7bbf2de744aba0ea61fae32f721df3d2"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/81cd61ab7bbf2de744aba0ea61fae32f721df3d2",
+                "reference": "81cd61ab7bbf2de744aba0ea61fae32f721df3d2",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.3"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^9.3"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.3-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de",
+                    "role": "lead"
+                }
+            ],
+            "description": "Collection of value objects that represent the types of the PHP type system",
+            "homepage": "https://github.com/sebastianbergmann/type",
+            "support": {
+                "issues": "https://github.com/sebastianbergmann/type/issues",
+                "source": "https://github.com/sebastianbergmann/type/tree/2.3.1"
+            },
+            "funding": [
+                {
+                    "url": "https://github.com/sebastianbergmann",
+                    "type": "github"
+                }
+            ],
+            "time": "2020-10-26T13:18:59+00:00"
+        },
+        {
+            "name": "sebastian/version",
+            "version": "3.0.2",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/version.git",
+                "reference": "c6c1022351a901512170118436c764e473f6de8c"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c",
+                "reference": "c6c1022351a901512170118436c764e473f6de8c",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.3"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "3.0-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de",
+                    "role": "lead"
+                }
+            ],
+            "description": "Library that helps with managing the version number of Git-hosted PHP projects",
+            "homepage": "https://github.com/sebastianbergmann/version",
+            "support": {
+                "issues": "https://github.com/sebastianbergmann/version/issues",
+                "source": "https://github.com/sebastianbergmann/version/tree/3.0.2"
+            },
+            "funding": [
+                {
+                    "url": "https://github.com/sebastianbergmann",
+                    "type": "github"
+                }
+            ],
+            "time": "2020-09-28T06:39:44+00:00"
+        },
+        {
+            "name": "squizlabs/php_codesniffer",
+            "version": "3.5.8",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
+                "reference": "9d583721a7157ee997f235f327de038e7ea6dac4"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/9d583721a7157ee997f235f327de038e7ea6dac4",
+                "reference": "9d583721a7157ee997f235f327de038e7ea6dac4",
+                "shasum": ""
+            },
+            "require": {
+                "ext-simplexml": "*",
+                "ext-tokenizer": "*",
+                "ext-xmlwriter": "*",
+                "php": ">=5.4.0"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0"
+            },
+            "bin": [
+                "bin/phpcs",
+                "bin/phpcbf"
+            ],
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "3.x-dev"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Greg Sherwood",
+                    "role": "lead"
+                }
+            ],
+            "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.",
+            "homepage": "https://github.com/squizlabs/PHP_CodeSniffer",
+            "keywords": [
+                "phpcs",
+                "standards"
+            ],
+            "support": {
+                "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues",
+                "source": "https://github.com/squizlabs/PHP_CodeSniffer",
+                "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki"
+            },
+            "time": "2020-10-23T02:01:07+00:00"
+        },
+        {
+            "name": "symfony/polyfill-ctype",
+            "version": "v1.22.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/polyfill-ctype.git",
+                "reference": "c6c942b1ac76c82448322025e084cadc56048b4e"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/c6c942b1ac76c82448322025e084cadc56048b4e",
+                "reference": "c6c942b1ac76c82448322025e084cadc56048b4e",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.1"
+            },
+            "suggest": {
+                "ext-ctype": "For best performance"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-main": "1.22-dev"
+                },
+                "thanks": {
+                    "name": "symfony/polyfill",
+                    "url": "https://github.com/symfony/polyfill"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Symfony\\Polyfill\\Ctype\\": ""
+                },
+                "files": [
+                    "bootstrap.php"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Gert de Pagter",
+                    "email": "BackEndTea@gmail.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony polyfill for ctype functions",
+            "homepage": "https://symfony.com",
+            "keywords": [
+                "compatibility",
+                "ctype",
+                "polyfill",
+                "portable"
+            ],
+            "support": {
+                "source": "https://github.com/symfony/polyfill-ctype/tree/v1.22.1"
+            },
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
+            "time": "2021-01-07T16:49:33+00:00"
+        },
+        {
+            "name": "theseer/tokenizer",
+            "version": "1.2.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/theseer/tokenizer.git",
+                "reference": "75a63c33a8577608444246075ea0af0d052e452a"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/theseer/tokenizer/zipball/75a63c33a8577608444246075ea0af0d052e452a",
+                "reference": "75a63c33a8577608444246075ea0af0d052e452a",
+                "shasum": ""
+            },
+            "require": {
+                "ext-dom": "*",
+                "ext-tokenizer": "*",
+                "ext-xmlwriter": "*",
+                "php": "^7.2 || ^8.0"
+            },
+            "type": "library",
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Arne Blankerts",
+                    "email": "arne@blankerts.de",
+                    "role": "Developer"
+                }
+            ],
+            "description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
+            "support": {
+                "issues": "https://github.com/theseer/tokenizer/issues",
+                "source": "https://github.com/theseer/tokenizer/tree/master"
+            },
+            "funding": [
+                {
+                    "url": "https://github.com/theseer",
+                    "type": "github"
+                }
+            ],
+            "time": "2020-07-12T23:59:07+00:00"
+        },
+        {
+            "name": "webmozart/assert",
+            "version": "1.9.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/webmozarts/assert.git",
+                "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/webmozarts/assert/zipball/bafc69caeb4d49c39fd0779086c03a3738cbb389",
+                "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^5.3.3 || ^7.0 || ^8.0",
+                "symfony/polyfill-ctype": "^1.8"
+            },
+            "conflict": {
+                "phpstan/phpstan": "<0.12.20",
+                "vimeo/psalm": "<3.9.1"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^4.8.36 || ^7.5.13"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "Webmozart\\Assert\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Bernhard Schussek",
+                    "email": "bschussek@gmail.com"
+                }
+            ],
+            "description": "Assertions to validate method input/output with nice error messages.",
+            "keywords": [
+                "assert",
+                "check",
+                "validate"
+            ],
+            "support": {
+                "issues": "https://github.com/webmozarts/assert/issues",
+                "source": "https://github.com/webmozarts/assert/tree/1.9.1"
+            },
+            "time": "2020-07-08T17:02:28+00:00"
+        }
+    ],
+    "aliases": [],
+    "minimum-stability": "stable",
+    "stability-flags": [],
+    "prefer-stable": false,
+    "prefer-lowest": false,
+    "platform": {
+        "php": ">=7.3.0",
+        "ext-json": "*",
+        "ext-intl": "*",
+        "ext-zlib": "*"
+    },
+    "platform-dev": [],
+    "platform-overrides": {
+        "php": "7.3.0"
+    },
+    "plugin-api-version": "2.0.0"
+}

+ 142 - 0
vendor/mike42/escpos-php/doc/FAQ.md

@@ -0,0 +1,142 @@
+# Frequently Asked Questions (FAQ)
+
+## Can I print to File Format X with this?
+
+If you are trying to generate XPS, PDF or DOCX or HTML files from PHP, then you are most likely in the wrong place.
+
+The purpose of this driver it to generate binary ESC/POS code, which is understood by many embedded thermal receipt and impact printers.
+
+## I have Printer X. Can I use this driver?
+
+If the printer understands ESC/POS, and you know how to get raw binary data to it, then yes. Otherwise, no.
+
+The [list of printers that are known to work](https://github.com/mike42/escpos-php/blob/development/README.md#printers) is crowd-sourced. We appreciate it when developers try out the driver, then [file information on the bug tracker](https://github.com/mike42/escpos-php/issues/new) with some information about which features worked on their model of printer.
+
+To see how well your printer works, first check that it supports ESC/POS, then begin by attempting to send the text "Hello World" to your printer on the command-line, from the computer that will run PHP.
+
+Once you solve this, [try to do the same from PHP](https://github.com/mike42/escpos-php/blob/development/README.md#basic-usage) using the default profile. Further details are in the [README](https://github.com/mike42/escpos-php/blob/development/README.md) file.
+
+## Can you add support for Printer X?
+
+Features vary between printers, so we collaborate on an ESC/POS printer compatibility database to collect known differences: [receipt-print-hq/escpos-printer-db](https://github.com/receipt-print-hq/escpos-printer-db).
+
+If you encounter garbage output when you try to print images or special characters, then please submit a test page and a link to vendor documentation to the `escpos-printer-db` project, so that support can be improved for future versions.
+
+## I have a printer that does not understand ESC/POS. Can I use this driver?
+
+No. The purpose of this driver it to generate binary ESC/POS code. If your printer doesn't understand that, then this code wont be much use to you.
+
+Some printers do have an emulation mode for ESC/POS. The vendor docs will tell if this is the case, and how to enable it.
+
+## Why do I get this error when I try to print?
+
+Start by testing that you can send text to your printer outside of escpos-php. The examples linked to in the README are commented with some commands to get you started.
+
+Generally, initial setup problems seem to have one of these causes:
+
+1. You are writing to the wrong place. Writing to `LPT1` does not output to parallel port on Linux, and `/dev/ttyS0` is not a serial printer on Windows.
+2. The printer has not been set up to accept printing the way you expect. This means permissions on Linux, network printers being configured, and shared printers having user accounts and firewalls set up correctly on the print server.
+3. Your printer actually doesn't work (rare but possible).
+
+To be clear, these are not escpos-php issues: No amount of PHP code can set up your printer for you. Instead, the driver relies on developers determining how their setup is going to work before using a connector to transport data to their printer.
+
+Once you have a working command to send text to your printer (from the PHP server), you are ready to use escpos-php. You can try to use a PrintConnector now, based on your operating system and printer interface. A table is located in the README to help you select the right one.
+
+The connectors are-
+
+- `FilePrintConnector` and `NetworkPrintConnector` directly use files or network sockets.
+- `WindowsPrintConnector` and `CupsPrintConnector` tie in with Windows and Unix system printing.
+- `DummyPrintConnector` does not connect to a real printer, and can be used to save ESC/POS receipts to a database, for example.
+
+At this point, you might find that the way you would like to print is not supported by escpos-php. You can post your printing command as a feature request on the issue tracker.
+
+Lastly, you may run in to the final common trap:
+
+4. Your PHP is not running with the same sort of permissions as your login account. Again, no amount of PHP code can fix this. For example, on LAMP, your `www-data` user needs to be in the `lp` group, while on WAMP, `Local Service` account may run in to problems. SELinux and firewalls are also worth a look.
+
+When printing fails, you can expect a PHP Exception that explains what went wrong. They are all clues:
+
+- `Warning: copy(\\pc\printer): failed to open stream: Permission denied`
+- `/dev/usb/lp0: Permission denied`
+- `User name or password is incorrect`
+
+Ensure that while you are developing, you configure PHP to show error messages, so that you can see these problems.
+
+Please file a bug if you think that there is a specific situation which escpos-php could provide better error messages for.
+
+## Can I print over the network?
+
+Certainly, as long as your printer is available over the network.
+
+- `NetworkPrintConnector` will speak directly to an Ethernet-connected printer on port 9100.
+
+For USB or Serial printers, you need to install the printer on a computer and then share it, so that it becomes network-accessible.
+
+- `WindowsPrintConnector` will connect to Windows shared printers from Windows or Linux (Linux users will need Samba).
+- `CupsPrintConnector` will connect to CUPS-shared printers from Linux or Mac.
+
+Always start by testing your shared printer setup outside of escpos-php. The examples linked to in the README are commented with some example commands to get you started. Typically, networks, firewalls and permissions need to be set up.
+
+Once you have a working command to send text to your printer (from the PHP server), you are ready to use escpos-php.
+
+If you have any issues at this stage, please ask on the issue tracker, and include the commands that you used to verify your setup.
+
+## Can I print from my server on the Internet?
+
+Since PHP is a server-side language, escpos-php is a server-side print library. The driver is able to transport data between a server and a printer in a few different ways, all of them server-side. For example, you may print to a USB printer *connected to the server running PHP*, or an Ethernet printer *on a network accessible to the server*.
+
+Many developers dream of having an application that is hosted on the public Internet, with POS terminals accessing it, and printing via a web browser. Because the webserver cannot see the printer in this sort of setup, a server-side print driver is not much use.
+
+Because of this, there are no cut-and-paste recipes available, but here are two top-level approaches you could take:
+
+1. Architect your application so that the server can see your printer
+2. Use an application which runs client-side to deliver print data instead
+
+### Option 1: Allow the server to print
+
+Server-side printing is viable if the server can get to the printer. Here are some ways it could work:
+
+- Run your server on the LAN instead, and read the section above about printing over the network
+- Set up a VPN so that your cloud-hosted server can also access the LAN
+- Expose the printer via some other secure tunnel to the server, via SSH or TLS
+
+Please do your own research to determine how these may apply to your setup- the escpos-php issue tracker is not a place where you should be requesting network support.
+
+### Option 2: Use client software to print
+
+If you aren't able to set up some network infrastructure to implement the above, then you cannot use a server-side print driver.
+
+Here are some browser-based printing tools which you may like to consider instead.
+
+- Use system printing with a vendor driver, and some good `@media print` CSS
+- [Chrome Raw Print](https://github.com/receipt-print-hq/chrome-raw-print) app
+- [qz](https://qz.io/)
+- [ePOS-Device SDK for JavaScript](https://reference.epson-biz.com/modules/ref_epos_device_js_en/index.php?content_id=139). Requires network interface card that supports ePOS (UB-E04/R04)
+
+Please direct queries about client-side printing products to the appropriate project.
+
+## Why is image printing slow?
+
+Three things tend to slow down the image processing:
+
+1. Slow PHP code
+2. Data link
+3. The printer itself
+
+First, ensure you have the Imagick plugin loaded. The driver will avoid a slower image processing implementation once you've got it.
+
+Next, connect over a faster interface. Serial printers have a low bit-rate, and the printer spends a lot of time waiting for data. If you have USB or Ethernet, then use it (note: storing graphics to the printer memory is not currently implemented).
+
+Lastly, the printer will go faster if you use less pixels. Since images are two-dimensional, scaling down by 50% removes 75% of the pixels. The driver can then print at a half the density, so that your lower resolution image appears the same size when printed.
+
+## How can I get the status of the printer?
+
+This feature is not implemented, but a solution for some Epson printers is planned.
+
+Only `FilePrintConnector` or `NetworkPrintConnector` will support reading from the printer, ensure that you migrate to those if you would like these features.
+
+## How do I produce this complex layout?
+
+ESC/POS "page mode" is not currently supported, which would allow some printers to render some more complex layouts natively
+
+Since the output is raster anyway, it is suggested that you render your output to an image and print that instead. The driver supports PDF printing via Imagick, and an example that uses `wkhtmltoimage` is available in the repository.

+ 20 - 0
vendor/mike42/escpos-php/doc/Makefile

@@ -0,0 +1,20 @@
+html: escpos.doxyfile
+	# Compile
+	doxygen escpos.doxyfile
+	# Filter out warnings on README.md- doxygen cannot handle image links that
+	# are used there: [![Caption](https://example.com/target)](https://example.com/image)
+	sed -i '/README.md\:/d' warnings.log
+	# Show warnings log
+	cat warnings.log
+	# Return failure if there were any doc warnings
+	[ ! -s warnings.log ]
+
+latex: html
+	# Do nothing
+
+xml: html
+	xsltproc xml/combine.xslt xml/index.xml > all.xml
+
+clean:
+	rm --preserve-root -Rf html latex xml doxygen_sqlite3.db all.xml warnings.log
+

+ 2352 - 0
vendor/mike42/escpos-php/doc/escpos.doxyfile

@@ -0,0 +1,2352 @@
+# Doxyfile 1.8.8
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project.
+#
+# All text after a double hash (##) is considered a comment and is placed in
+# front of the TAG it is preceding.
+#
+# All text after a single hash (#) is considered a comment and will be ignored.
+# The format is:
+# TAG = value [value, ...]
+# For lists, items can also be appended using:
+# TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (\" \").
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the config file
+# that follow. The default is UTF-8 which is also the encoding used for all text
+# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv
+# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv
+# for the list of possible encodings.
+# The default value is: UTF-8.
+
+DOXYFILE_ENCODING      = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by
+# double-quotes, unless you are using Doxywizard) that should identify the
+# project for which the documentation is generated. This name is used in the
+# title of most generated pages and in a few other places.
+# The default value is: My Project.
+
+PROJECT_NAME           = "escpos-php"
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
+# could be handy for archiving the generated documentation or if some version
+# control system is used.
+
+PROJECT_NUMBER         =
+
+# Using the PROJECT_BRIEF tag one can provide an optional one line description
+# for a project that appears at the top of each page and should give viewer a
+# quick idea about the purpose of the project. Keep the description short.
+
+PROJECT_BRIEF          =
+
+# With the PROJECT_LOGO tag one can specify an logo or icon that is included in
+# the documentation. The maximum height of the logo should not exceed 55 pixels
+# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo
+# to the output directory.
+
+PROJECT_LOGO           = ../example/resources/escpos-php-small.png
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
+# into which the generated documentation will be written. If a relative path is
+# entered, it will be relative to the location where doxygen was started. If
+# left blank the current directory will be used.
+
+OUTPUT_DIRECTORY       =
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub-
+# directories (in 2 levels) under the output directory of each output format and
+# will distribute the generated files over these directories. Enabling this
+# option can be useful when feeding doxygen a huge amount of source files, where
+# putting all generated files in the same directory would otherwise causes
+# performance problems for the file system.
+# The default value is: NO.
+
+CREATE_SUBDIRS         = NO
+
+# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII
+# characters to appear in the names of generated files. If set to NO, non-ASCII
+# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode
+# U+3044.
+# The default value is: NO.
+
+ALLOW_UNICODE_NAMES    = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese,
+# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States),
+# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian,
+# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages),
+# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian,
+# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian,
+# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish,
+# Ukrainian and Vietnamese.
+# The default value is: English.
+
+OUTPUT_LANGUAGE        = English
+
+# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member
+# descriptions after the members that are listed in the file and class
+# documentation (similar to Javadoc). Set to NO to disable this.
+# The default value is: YES.
+
+BRIEF_MEMBER_DESC      = YES
+
+# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief
+# description of a member or function before the detailed description
+#
+# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# brief descriptions will be completely suppressed.
+# The default value is: YES.
+
+REPEAT_BRIEF           = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator that is
+# used to form the text in various listings. Each string in this list, if found
+# as the leading text of the brief description, will be stripped from the text
+# and the result, after processing the whole list, is used as the annotated
+# text. Otherwise, the brief description is used as-is. If left blank, the
+# following values are used ($name is automatically replaced with the name of
+# the entity):The $name class, The $name widget, The $name file, is, provides,
+# specifies, contains, represents, a, an and the.
+
+ABBREVIATE_BRIEF       =
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# doxygen will generate a detailed section even if there is only a brief
+# description.
+# The default value is: NO.
+
+ALWAYS_DETAILED_SEC    = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
+# inherited members of a class in the documentation of that class as if those
+# members were ordinary class members. Constructors, destructors and assignment
+# operators of the base classes will not be shown.
+# The default value is: NO.
+
+INLINE_INHERITED_MEMB  = NO
+
+# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path
+# before files name in the file list and in the header files. If set to NO the
+# shortest path that makes the file name unique will be used
+# The default value is: YES.
+
+FULL_PATH_NAMES        = YES
+
+# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.
+# Stripping is only done if one of the specified strings matches the left-hand
+# part of the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the path to
+# strip.
+#
+# Note that you can specify absolute paths here, but also relative paths, which
+# will be relative from the directory where doxygen is started.
+# This tag requires that the tag FULL_PATH_NAMES is set to YES.
+
+STRIP_FROM_PATH        =
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
+# path mentioned in the documentation of a class, which tells the reader which
+# header file to include in order to use a class. If left blank only the name of
+# the header file containing the class definition is used. Otherwise one should
+# specify the list of include paths that are normally passed to the compiler
+# using the -I flag.
+
+STRIP_FROM_INC_PATH    =
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
+# less readable) file names. This can be useful is your file systems doesn't
+# support long names like on DOS, Mac, or CD-ROM.
+# The default value is: NO.
+
+SHORT_NAMES            = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the
+# first line (until the first dot) of a Javadoc-style comment as the brief
+# description. If set to NO, the Javadoc-style will behave just like regular Qt-
+# style comments (thus requiring an explicit @brief command for a brief
+# description.)
+# The default value is: NO.
+
+JAVADOC_AUTOBRIEF      = NO
+
+# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first
+# line (until the first dot) of a Qt-style comment as the brief description. If
+# set to NO, the Qt-style will behave just like regular Qt-style comments (thus
+# requiring an explicit \brief command for a brief description.)
+# The default value is: NO.
+
+QT_AUTOBRIEF           = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a
+# multi-line C++ special comment block (i.e. a block of //! or /// comments) as
+# a brief description. This used to be the default behavior. The new default is
+# to treat a multi-line C++ comment block as a detailed description. Set this
+# tag to YES if you prefer the old behavior instead.
+#
+# Note that setting this tag to YES also means that rational rose comments are
+# not recognized any more.
+# The default value is: NO.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the
+# documentation from any documented member that it re-implements.
+# The default value is: YES.
+
+INHERIT_DOCS           = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a
+# new page for each member. If set to NO, the documentation of a member will be
+# part of the file/class/namespace that contains it.
+# The default value is: NO.
+
+SEPARATE_MEMBER_PAGES  = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen
+# uses this value to replace tabs by spaces in code fragments.
+# Minimum value: 1, maximum value: 16, default value: 4.
+
+TAB_SIZE               = 4
+
+# This tag can be used to specify a number of aliases that act as commands in
+# the documentation. An alias has the form:
+# name=value
+# For example adding
+# "sideeffect=@par Side Effects:\n"
+# will allow you to put the command \sideeffect (or @sideeffect) in the
+# documentation, which will result in a user-defined paragraph with heading
+# "Side Effects:". You can put \n's in the value part of an alias to insert
+# newlines.
+
+ALIASES                =
+
+# This tag can be used to specify a number of word-keyword mappings (TCL only).
+# A mapping has the form "name=value". For example adding "class=itcl::class"
+# will allow you to use the command class in the itcl::class meaning.
+
+TCL_SUBST              =
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
+# only. Doxygen will then generate output that is more tailored for C. For
+# instance, some of the names that are used will be different. The list of all
+# members will be omitted, etc.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_FOR_C  = NO
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or
+# Python sources only. Doxygen will then generate output that is more tailored
+# for that language. For instance, namespaces will be presented as packages,
+# qualified scopes will look different, etc.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_JAVA   = NO
+
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
+# sources. Doxygen will then generate output that is tailored for Fortran.
+# The default value is: NO.
+
+OPTIMIZE_FOR_FORTRAN   = NO
+
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
+# sources. Doxygen will then generate output that is tailored for VHDL.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_VHDL   = NO
+
+# Doxygen selects the parser to use depending on the extension of the files it
+# parses. With this tag you can assign which parser to use for a given
+# extension. Doxygen has a built-in mapping, but you can override or extend it
+# using this tag. The format is ext=language, where ext is a file extension, and
+# language is one of the parsers supported by doxygen: IDL, Java, Javascript,
+# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran:
+# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran:
+# Fortran. In the later case the parser tries to guess whether the code is fixed
+# or free formatted code, this is the default for Fortran type files), VHDL. For
+# instance to make doxygen treat .inc files as Fortran files (default is PHP),
+# and .f files as C (default is Fortran), use: inc=Fortran f=C.
+#
+# Note For files without extension you can use no_extension as a placeholder.
+#
+# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
+# the files are not read by doxygen.
+
+EXTENSION_MAPPING      =
+
+# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
+# according to the Markdown format, which allows for more readable
+# documentation. See http://daringfireball.net/projects/markdown/ for details.
+# The output of markdown processing is further processed by doxygen, so you can
+# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
+# case of backward compatibilities issues.
+# The default value is: YES.
+
+MARKDOWN_SUPPORT       = YES
+
+# When enabled doxygen tries to link words that correspond to documented
+# classes, or namespaces to their corresponding documentation. Such a link can
+# be prevented in individual cases by by putting a % sign in front of the word
+# or globally by setting AUTOLINK_SUPPORT to NO.
+# The default value is: YES.
+
+AUTOLINK_SUPPORT       = YES
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
+# to include (a tag file for) the STL sources as input, then you should set this
+# tag to YES in order to let doxygen match functions declarations and
+# definitions whose arguments contain STL classes (e.g. func(std::string);
+# versus func(std::string) {}). This also make the inheritance and collaboration
+# diagrams that involve STL classes more complete and accurate.
+# The default value is: NO.
+
+BUILTIN_STL_SUPPORT    = NO
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to
+# enable parsing support.
+# The default value is: NO.
+
+CPP_CLI_SUPPORT        = NO
+
+# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
+# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
+# will parse them like normal C++ but will assume all classes use public instead
+# of private inheritance when no explicit protection keyword is present.
+# The default value is: NO.
+
+SIP_SUPPORT            = NO
+
+# For Microsoft's IDL there are propget and propput attributes to indicate
+# getter and setter methods for a property. Setting this option to YES will make
+# doxygen to replace the get and set methods by a property in the documentation.
+# This will only work if the methods are indeed getting or setting a simple
+# type. If this is not the case, or you want to show the methods anyway, you
+# should set this option to NO.
+# The default value is: YES.
+
+IDL_PROPERTY_SUPPORT   = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES, then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+# The default value is: NO.
+
+DISTRIBUTE_GROUP_DOC   = NO
+
+# Set the SUBGROUPING tag to YES to allow class member groups of the same type
+# (for instance a group of public functions) to be put as a subgroup of that
+# type (e.g. under the Public Functions section). Set it to NO to prevent
+# subgrouping. Alternatively, this can be done per class using the
+# \nosubgrouping command.
+# The default value is: YES.
+
+SUBGROUPING            = YES
+
+# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions
+# are shown inside the group in which they are included (e.g. using \ingroup)
+# instead of on a separate page (for HTML and Man pages) or section (for LaTeX
+# and RTF).
+#
+# Note that this feature does not work in combination with
+# SEPARATE_MEMBER_PAGES.
+# The default value is: NO.
+
+INLINE_GROUPED_CLASSES = NO
+
+# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions
+# with only public data fields or simple typedef fields will be shown inline in
+# the documentation of the scope in which they are defined (i.e. file,
+# namespace, or group documentation), provided this scope is documented. If set
+# to NO, structs, classes, and unions are shown on a separate page (for HTML and
+# Man pages) or section (for LaTeX and RTF).
+# The default value is: NO.
+
+INLINE_SIMPLE_STRUCTS  = NO
+
+# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or
+# enum is documented as struct, union, or enum with the name of the typedef. So
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
+# with name TypeT. When disabled the typedef will appear as a member of a file,
+# namespace, or class. And the struct will be named TypeS. This can typically be
+# useful for C code in case the coding convention dictates that all compound
+# types are typedef'ed and only the typedef is referenced, never the tag name.
+# The default value is: NO.
+
+TYPEDEF_HIDES_STRUCT   = NO
+
+# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This
+# cache is used to resolve symbols given their name and scope. Since this can be
+# an expensive process and often the same symbol appears multiple times in the
+# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small
+# doxygen will become slower. If the cache is too large, memory is wasted. The
+# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range
+# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536
+# symbols. At the end of a run doxygen will report the cache usage and suggest
+# the optimal cache size from a speed point of view.
+# Minimum value: 0, maximum value: 9, default value: 0.
+
+LOOKUP_CACHE_SIZE      = 0
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
+# documentation are documented, even if no documentation was available. Private
+# class members and static file members will be hidden unless the
+# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES.
+# Note: This will also disable the warnings about undocumented members that are
+# normally produced when WARNINGS is set to YES.
+# The default value is: NO.
+
+EXTRACT_ALL            = NO
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will
+# be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PRIVATE        = NO
+
+# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal
+# scope will be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PACKAGE        = NO
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file will be
+# included in the documentation.
+# The default value is: NO.
+
+EXTRACT_STATIC         = NO
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined
+# locally in source files will be included in the documentation. If set to NO
+# only classes defined in header files are included. Does not have any effect
+# for Java sources.
+# The default value is: YES.
+
+EXTRACT_LOCAL_CLASSES  = YES
+
+# This flag is only useful for Objective-C code. When set to YES local methods,
+# which are defined in the implementation section but not in the interface are
+# included in the documentation. If set to NO only methods in the interface are
+# included.
+# The default value is: NO.
+
+EXTRACT_LOCAL_METHODS  = NO
+
+# If this flag is set to YES, the members of anonymous namespaces will be
+# extracted and appear in the documentation as a namespace called
+# 'anonymous_namespace{file}', where file will be replaced with the base name of
+# the file that contains the anonymous namespace. By default anonymous namespace
+# are hidden.
+# The default value is: NO.
+
+EXTRACT_ANON_NSPACES   = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all
+# undocumented members inside documented classes or files. If set to NO these
+# members will be included in the various overviews, but no documentation
+# section is generated. This option has no effect if EXTRACT_ALL is enabled.
+# The default value is: NO.
+
+HIDE_UNDOC_MEMBERS     = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy. If set
+# to NO these classes will be included in the various overviews. This option has
+# no effect if EXTRACT_ALL is enabled.
+# The default value is: NO.
+
+HIDE_UNDOC_CLASSES     = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
+# (class|struct|union) declarations. If set to NO these declarations will be
+# included in the documentation.
+# The default value is: NO.
+
+HIDE_FRIEND_COMPOUNDS  = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any
+# documentation blocks found inside the body of a function. If set to NO these
+# blocks will be appended to the function's detailed documentation block.
+# The default value is: NO.
+
+HIDE_IN_BODY_DOCS      = NO
+
+# The INTERNAL_DOCS tag determines if documentation that is typed after a
+# \internal command is included. If the tag is set to NO then the documentation
+# will be excluded. Set it to YES to include the internal documentation.
+# The default value is: NO.
+
+INTERNAL_DOCS          = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file
+# names in lower-case letters. If set to YES upper-case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
+# and Mac users are advised to set this option to NO.
+# The default value is: system dependent.
+
+CASE_SENSE_NAMES       = YES
+
+# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with
+# their full class and namespace scopes in the documentation. If set to YES the
+# scope will be hidden.
+# The default value is: NO.
+
+HIDE_SCOPE_NAMES       = NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of
+# the files that are included by a file in the documentation of that file.
+# The default value is: YES.
+
+SHOW_INCLUDE_FILES     = YES
+
+# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each
+# grouped member an include statement to the documentation, telling the reader
+# which file to include in order to use the member.
+# The default value is: NO.
+
+SHOW_GROUPED_MEMB_INC  = NO
+
+# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include
+# files with double quotes in the documentation rather than with sharp brackets.
+# The default value is: NO.
+
+FORCE_LOCAL_INCLUDES   = NO
+
+# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the
+# documentation for inline members.
+# The default value is: YES.
+
+INLINE_INFO            = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the
+# (detailed) documentation of file and class members alphabetically by member
+# name. If set to NO the members will appear in declaration order.
+# The default value is: YES.
+
+SORT_MEMBER_DOCS       = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief
+# descriptions of file, namespace and class members alphabetically by member
+# name. If set to NO the members will appear in declaration order. Note that
+# this will also influence the order of the classes in the class list.
+# The default value is: NO.
+
+SORT_BRIEF_DOCS        = NO
+
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the
+# (brief and detailed) documentation of class members so that constructors and
+# destructors are listed first. If set to NO the constructors will appear in the
+# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS.
+# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief
+# member documentation.
+# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting
+# detailed member documentation.
+# The default value is: NO.
+
+SORT_MEMBERS_CTORS_1ST = NO
+
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy
+# of group names into alphabetical order. If set to NO the group names will
+# appear in their defined order.
+# The default value is: NO.
+
+SORT_GROUP_NAMES       = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by
+# fully-qualified names, including namespaces. If set to NO, the class list will
+# be sorted only by class name, not including the namespace part.
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the alphabetical
+# list.
+# The default value is: NO.
+
+SORT_BY_SCOPE_NAME     = NO
+
+# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper
+# type resolution of all parameters of a function it will reject a match between
+# the prototype and the implementation of a member function even if there is
+# only one candidate or it is obvious which candidate to choose by doing a
+# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still
+# accept a match between prototype and implementation in such cases.
+# The default value is: NO.
+
+STRICT_PROTO_MATCHING  = NO
+
+# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the
+# todo list. This list is created by putting \todo commands in the
+# documentation.
+# The default value is: YES.
+
+GENERATE_TODOLIST      = YES
+
+# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the
+# test list. This list is created by putting \test commands in the
+# documentation.
+# The default value is: YES.
+
+GENERATE_TESTLIST      = YES
+
+# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug
+# list. This list is created by putting \bug commands in the documentation.
+# The default value is: YES.
+
+GENERATE_BUGLIST       = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO)
+# the deprecated list. This list is created by putting \deprecated commands in
+# the documentation.
+# The default value is: YES.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional documentation
+# sections, marked by \if <section_label> ... \endif and \cond <section_label>
+# ... \endcond blocks.
+
+ENABLED_SECTIONS       =
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the
+# initial value of a variable or macro / define can have for it to appear in the
+# documentation. If the initializer consists of more lines than specified here
+# it will be hidden. Use a value of 0 to hide initializers completely. The
+# appearance of the value of individual variables and macros / defines can be
+# controlled using \showinitializer or \hideinitializer command in the
+# documentation regardless of this setting.
+# Minimum value: 0, maximum value: 10000, default value: 30.
+
+MAX_INITIALIZER_LINES  = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at
+# the bottom of the documentation of classes and structs. If set to YES the list
+# will mention the files that were used to generate the documentation.
+# The default value is: YES.
+
+SHOW_USED_FILES        = YES
+
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This
+# will remove the Files entry from the Quick Index and from the Folder Tree View
+# (if specified).
+# The default value is: YES.
+
+SHOW_FILES             = YES
+
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces
+# page. This will remove the Namespaces entry from the Quick Index and from the
+# Folder Tree View (if specified).
+# The default value is: YES.
+
+SHOW_NAMESPACES        = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that
+# doxygen should invoke to get the current version for each file (typically from
+# the version control system). Doxygen will invoke the program by executing (via
+# popen()) the command command input-file, where command is the value of the
+# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided
+# by doxygen. Whatever the program writes to standard output is used as the file
+# version. For an example see the documentation.
+
+FILE_VERSION_FILTER    =
+
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
+# by doxygen. The layout file controls the global structure of the generated
+# output files in an output format independent way. To create the layout file
+# that represents doxygen's defaults, run doxygen with the -l option. You can
+# optionally specify a file name after the option, if omitted DoxygenLayout.xml
+# will be used as the name of the layout file.
+#
+# Note that if you run doxygen from a directory containing a file called
+# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
+# tag is left empty.
+
+LAYOUT_FILE            =
+
+# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
+# the reference definitions. This must be a list of .bib files. The .bib
+# extension is automatically appended if omitted. This requires the bibtex tool
+# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info.
+# For LaTeX the style of the bibliography can be controlled using
+# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
+# search path. See also \cite for info how to create references.
+
+CITE_BIB_FILES         =
+
+#---------------------------------------------------------------------------
+# Configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated to
+# standard output by doxygen. If QUIET is set to YES this implies that the
+# messages are off.
+# The default value is: NO.
+
+QUIET                  = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES
+# this implies that the warnings are on.
+#
+# Tip: Turn warnings on while writing the documentation.
+# The default value is: YES.
+
+WARNINGS               = YES
+
+# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate
+# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag
+# will automatically be disabled.
+# The default value is: YES.
+
+WARN_IF_UNDOCUMENTED   = YES
+
+# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as not documenting some parameters
+# in a documented function, or documenting parameters that don't exist or using
+# markup commands wrongly.
+# The default value is: YES.
+
+WARN_IF_DOC_ERROR      = YES
+
+# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
+# are documented, but have no documentation for their parameters or return
+# value. If set to NO doxygen will only warn about wrong or incomplete parameter
+# documentation, but not about the absence of documentation.
+# The default value is: NO.
+
+WARN_NO_PARAMDOC       = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that doxygen
+# can produce. The string should contain the $file, $line, and $text tags, which
+# will be replaced by the file and line number from which the warning originated
+# and the warning text. Optionally the format may contain $version, which will
+# be replaced by the version of the file (if it could be obtained via
+# FILE_VERSION_FILTER)
+# The default value is: $file:$line: $text.
+
+WARN_FORMAT            = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning and error
+# messages should be written. If left blank the output is written to standard
+# error (stderr).
+
+WARN_LOGFILE           = warnings.log
+
+#---------------------------------------------------------------------------
+# Configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag is used to specify the files and/or directories that contain
+# documented source files. You may enter file names like myfile.cpp or
+# directories like /usr/src/myproject. Separate the files or directories with
+# spaces.
+# Note: If this tag is empty the current directory is searched.
+
+INPUT                  = ../src ../README.md ./
+
+# This tag can be used to specify the character encoding of the source files
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
+# libiconv (or the iconv built into libc) for the transcoding. See the libiconv
+# documentation (see: http://www.gnu.org/software/libiconv) for the list of
+# possible encodings.
+# The default value is: UTF-8.
+
+INPUT_ENCODING         = UTF-8
+
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and
+# *.h) to filter out the source-files in the directories. If left blank the
+# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii,
+# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp,
+# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown,
+# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf,
+# *.qsf, *.as and *.js.
+
+FILE_PATTERNS          = *.php *.md
+
+# The RECURSIVE tag can be used to specify whether or not subdirectories should
+# be searched for input files as well.
+# The default value is: NO.
+
+RECURSIVE              = YES
+
+# The EXCLUDE tag can be used to specify files and/or directories that should be
+# excluded from the INPUT source files. This way you can easily exclude a
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+#
+# Note that relative paths are relative to the directory from which doxygen is
+# run.
+
+EXCLUDE                =
+
+# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
+# directories that are symbolic links (a Unix file system feature) are excluded
+# from the input.
+# The default value is: NO.
+
+EXCLUDE_SYMLINKS       = NO
+
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories.
+#
+# Note that the wildcards are matched against the file with absolute path, so to
+# exclude all test directories for example use the pattern */test/*
+
+EXCLUDE_PATTERNS       =
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
+# (namespaces, classes, functions, etc.) that should be excluded from the
+# output. The symbol name can be a fully qualified name, a word, or if the
+# wildcard * is used, a substring. Examples: ANamespace, AClass,
+# AClass::ANamespace, ANamespace::*Test
+#
+# Note that the wildcards are matched against the file with absolute path, so to
+# exclude all test directories use the pattern */test/*
+
+EXCLUDE_SYMBOLS        =
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or directories
+# that contain example code fragments that are included (see the \include
+# command).
+
+EXAMPLE_PATH           =
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
+# *.h) to filter out the source-files in the directories. If left blank all
+# files are included.
+
+EXAMPLE_PATTERNS       =
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude commands
+# irrespective of the value of the RECURSIVE tag.
+# The default value is: NO.
+
+EXAMPLE_RECURSIVE      = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or directories
+# that contain images that are to be included in the documentation (see the
+# \image command).
+
+IMAGE_PATH             =
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command:
+#
+# <filter> <input-file>
+#
+# where <filter> is the value of the INPUT_FILTER tag, and <input-file> is the
+# name of an input file. Doxygen will then use the output that the filter
+# program writes to standard output. If FILTER_PATTERNS is specified, this tag
+# will be ignored.
+#
+# Note that the filter must not add or remove lines; it is applied before the
+# code is scanned, but not when the output code is generated. If lines are added
+# or removed, the anchors will not be placed correctly.
+
+INPUT_FILTER           =
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
+# basis. Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match. The filters are a list of the form: pattern=filter
+# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how
+# filters are used. If the FILTER_PATTERNS tag is empty or if none of the
+# patterns match the file name, INPUT_FILTER is applied.
+
+FILTER_PATTERNS        =
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER ) will also be used to filter the input files that are used for
+# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES).
+# The default value is: NO.
+
+FILTER_SOURCE_FILES    = NO
+
+# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
+# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and
+# it is also possible to disable source filtering for a specific pattern using
+# *.ext= (so without naming a filter).
+# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
+
+FILTER_SOURCE_PATTERNS =
+
+# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that
+# is part of the input, its contents will be placed on the main page
+# (index.html). This can be useful if you have a project on for instance GitHub
+# and want to reuse the introduction page also for the doxygen output.
+
+USE_MDFILE_AS_MAINPAGE = ../README.md
+
+#---------------------------------------------------------------------------
+# Configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will be
+# generated. Documented entities will be cross-referenced with these sources.
+#
+# Note: To get rid of all source code in the generated output, make sure that
+# also VERBATIM_HEADERS is set to NO.
+# The default value is: NO.
+
+SOURCE_BROWSER         = NO
+
+# Setting the INLINE_SOURCES tag to YES will include the body of functions,
+# classes and enums directly into the documentation.
+# The default value is: NO.
+
+INLINE_SOURCES         = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any
+# special comment blocks from generated source code fragments. Normal C, C++ and
+# Fortran comments will always remain visible.
+# The default value is: YES.
+
+STRIP_CODE_COMMENTS    = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES then for each documented
+# function all documented functions referencing it will be listed.
+# The default value is: NO.
+
+REFERENCED_BY_RELATION = NO
+
+# If the REFERENCES_RELATION tag is set to YES then for each documented function
+# all documented entities called/used by that function will be listed.
+# The default value is: NO.
+
+REFERENCES_RELATION    = NO
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set
+# to YES, then the hyperlinks from functions in REFERENCES_RELATION and
+# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will
+# link to the documentation.
+# The default value is: YES.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the
+# source code will show a tooltip with additional information such as prototype,
+# brief description and links to the definition and documentation. Since this
+# will make the HTML file larger and loading of large files a bit slower, you
+# can opt to disable this feature.
+# The default value is: YES.
+# This tag requires that the tag SOURCE_BROWSER is set to YES.
+
+SOURCE_TOOLTIPS        = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code will
+# point to the HTML generated by the htags(1) tool instead of doxygen built-in
+# source browser. The htags tool is part of GNU's global source tagging system
+# (see http://www.gnu.org/software/global/global.html). You will need version
+# 4.8.6 or higher.
+#
+# To use it do the following:
+# - Install the latest version of global
+# - Enable SOURCE_BROWSER and USE_HTAGS in the config file
+# - Make sure the INPUT points to the root of the source tree
+# - Run doxygen as normal
+#
+# Doxygen will invoke htags (and that will in turn invoke gtags), so these
+# tools must be available from the command line (i.e. in the search path).
+#
+# The result: instead of the source browser generated by doxygen, the links to
+# source code will now point to the output of htags.
+# The default value is: NO.
+# This tag requires that the tag SOURCE_BROWSER is set to YES.
+
+USE_HTAGS              = NO
+
+# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a
+# verbatim copy of the header file for each class for which an include is
+# specified. Set to NO to disable this.
+# See also: Section \class.
+# The default value is: YES.
+
+VERBATIM_HEADERS       = YES
+
+# If the CLANG_ASSISTED_PARSING tag is set to YES, then doxygen will use the
+# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the
+# cost of reduced performance. This can be particularly helpful with template
+# rich C++ code for which doxygen's built-in parser lacks the necessary type
+# information.
+# Note: The availability of this option depends on whether or not doxygen was
+# compiled with the --with-libclang option.
+# The default value is: NO.
+
+CLANG_ASSISTED_PARSING = NO
+
+# If clang assisted parsing is enabled you can provide the compiler with command
+# line options that you would normally use when invoking the compiler. Note that
+# the include paths will already be set by doxygen for the files and directories
+# specified with INPUT and INCLUDE_PATH.
+# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
+
+CLANG_OPTIONS          =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all
+# compounds will be generated. Enable this if the project contains a lot of
+# classes, structs, unions or interfaces.
+# The default value is: YES.
+
+ALPHABETICAL_INDEX     = YES
+
+# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in
+# which the alphabetical index list will be split.
+# Minimum value: 1, maximum value: 20, default value: 5.
+# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
+
+COLS_IN_ALPHA_INDEX    = 5
+
+# In case all classes in a project start with a common prefix, all classes will
+# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag
+# can be used to specify a prefix (or a list of prefixes) that should be ignored
+# while generating the index headers.
+# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
+
+IGNORE_PREFIX          =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output
+# The default value is: YES.
+
+GENERATE_HTML          = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: html.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_OUTPUT            = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each
+# generated HTML page (for example: .htm, .php, .asp).
+# The default value is: .html.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_FILE_EXTENSION    = .html
+
+# The HTML_HEADER tag can be used to specify a user-defined HTML header file for
+# each generated HTML page. If the tag is left blank doxygen will generate a
+# standard header.
+#
+# To get valid HTML the header file that includes any scripts and style sheets
+# that doxygen needs, which is dependent on the configuration options used (e.g.
+# the setting GENERATE_TREEVIEW). It is highly recommended to start with a
+# default header using
+# doxygen -w html new_header.html new_footer.html new_stylesheet.css
+# YourConfigFile
+# and then modify the file new_header.html. See also section "Doxygen usage"
+# for information on how to generate the default header that doxygen normally
+# uses.
+# Note: The header is subject to change so you typically have to regenerate the
+# default header when upgrading to a newer version of doxygen. For a description
+# of the possible markers and block names see the documentation.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_HEADER            =
+
+# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
+# generated HTML page. If the tag is left blank doxygen will generate a standard
+# footer. See HTML_HEADER for more information on how to generate a default
+# footer and what special commands can be used inside the footer. See also
+# section "Doxygen usage" for information on how to generate the default footer
+# that doxygen normally uses.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_FOOTER            =
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
+# sheet that is used by each HTML page. It can be used to fine-tune the look of
+# the HTML output. If left blank doxygen will generate a default style sheet.
+# See also section "Doxygen usage" for information on how to generate the style
+# sheet that doxygen normally uses.
+# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as
+# it is more robust and this tag (HTML_STYLESHEET) will in the future become
+# obsolete.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_STYLESHEET        =
+
+# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined
+# cascading style sheets that are included after the standard style sheets
+# created by doxygen. Using this option one can overrule certain style aspects.
+# This is preferred over using HTML_STYLESHEET since it does not replace the
+# standard style sheet and is therefor more robust against future updates.
+# Doxygen will copy the style sheet files to the output directory.
+# Note: The order of the extra stylesheet files is of importance (e.g. the last
+# stylesheet in the list overrules the setting of the previous ones in the
+# list). For an example see the documentation.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_EXTRA_STYLESHEET  =
+
+# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
+# other source files which should be copied to the HTML output directory. Note
+# that these files will be copied to the base HTML output directory. Use the
+# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
+# files. In the HTML_STYLESHEET file, use the file name only. Also note that the
+# files will be copied as-is; there are no commands or markers available.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_EXTRA_FILES       =
+
+# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
+# will adjust the colors in the stylesheet and background images according to
+# this color. Hue is specified as an angle on a colorwheel, see
+# http://en.wikipedia.org/wiki/Hue for more information. For instance the value
+# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
+# purple, and 360 is red again.
+# Minimum value: 0, maximum value: 359, default value: 220.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_HUE    = 220
+
+# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors
+# in the HTML output. For a value of 0 the output will use grayscales only. A
+# value of 255 will produce the most vivid colors.
+# Minimum value: 0, maximum value: 255, default value: 100.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_SAT    = 100
+
+# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the
+# luminance component of the colors in the HTML output. Values below 100
+# gradually make the output lighter, whereas values above 100 make the output
+# darker. The value divided by 100 is the actual gamma applied, so 80 represents
+# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not
+# change the gamma.
+# Minimum value: 40, maximum value: 240, default value: 80.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_GAMMA  = 80
+
+# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
+# page will contain the date and time when the page was generated. Setting this
+# to NO can help when comparing the output of multiple runs.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_TIMESTAMP         = YES
+
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
+# documentation will contain sections that can be hidden and shown after the
+# page has loaded.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_DYNAMIC_SECTIONS  = NO
+
+# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries
+# shown in the various tree structured indices initially; the user can expand
+# and collapse entries dynamically later on. Doxygen will expand the tree to
+# such a level that at most the specified number of entries are visible (unless
+# a fully collapsed tree already exceeds this amount). So setting the number of
+# entries 1 will produce a full collapsed tree by default. 0 is a special value
+# representing an infinite number of entries and will result in a full expanded
+# tree by default.
+# Minimum value: 0, maximum value: 9999, default value: 100.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_INDEX_NUM_ENTRIES = 100
+
+# If the GENERATE_DOCSET tag is set to YES, additional index files will be
+# generated that can be used as input for Apple's Xcode 3 integrated development
+# environment (see: http://developer.apple.com/tools/xcode/), introduced with
+# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a
+# Makefile in the HTML output directory. Running make will produce the docset in
+# that directory and running make install will install the docset in
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
+# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
+# for more information.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_DOCSET        = NO
+
+# This tag determines the name of the docset feed. A documentation feed provides
+# an umbrella under which multiple documentation sets from a single provider
+# (such as a company or product suite) can be grouped.
+# The default value is: Doxygen generated docs.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_FEEDNAME        = "Doxygen generated docs"
+
+# This tag specifies a string that should uniquely identify the documentation
+# set bundle. This should be a reverse domain-name style string, e.g.
+# com.mycompany.MyDocSet. Doxygen will append .docset to the name.
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_BUNDLE_ID       = org.doxygen.Project
+
+# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify
+# the documentation publisher. This should be a reverse domain-name style
+# string, e.g. com.mycompany.MyDocSet.documentation.
+# The default value is: org.doxygen.Publisher.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_PUBLISHER_ID    = org.doxygen.Publisher
+
+# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher.
+# The default value is: Publisher.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_PUBLISHER_NAME  = Publisher
+
+# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
+# additional HTML index files: index.hhp, index.hhc, and index.hhk. The
+# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
+# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on
+# Windows.
+#
+# The HTML Help Workshop contains a compiler that can convert all HTML output
+# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML
+# files are now used as the Windows 98 help format, and will replace the old
+# Windows help format (.hlp) on all Windows platforms in the future. Compressed
+# HTML files also contain an index, a table of contents, and you can search for
+# words in the documentation. The HTML workshop also contains a viewer for
+# compressed HTML files.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_HTMLHELP      = NO
+
+# The CHM_FILE tag can be used to specify the file name of the resulting .chm
+# file. You can add a path in front of the file if the result should not be
+# written to the html output directory.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+CHM_FILE               =
+
+# The HHC_LOCATION tag can be used to specify the location (absolute path
+# including file name) of the HTML help compiler ( hhc.exe). If non-empty
+# doxygen will try to run the HTML help compiler on the generated index.hhp.
+# The file has to be specified with full path.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+HHC_LOCATION           =
+
+# The GENERATE_CHI flag controls if a separate .chi index file is generated (
+# YES) or that it should be included in the master .chm file ( NO).
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+GENERATE_CHI           = NO
+
+# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc)
+# and project file content.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+CHM_INDEX_ENCODING     =
+
+# The BINARY_TOC flag controls whether a binary table of contents is generated (
+# YES) or a normal table of contents ( NO) in the .chm file. Furthermore it
+# enables the Previous and Next buttons.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+BINARY_TOC             = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members to
+# the table of contents of the HTML help documentation and to the tree view.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+TOC_EXPAND             = NO
+
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
+# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that
+# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help
+# (.qch) of the generated HTML documentation.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_QHP           = NO
+
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify
+# the file name of the resulting .qch file. The path specified is relative to
+# the HTML output folder.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QCH_FILE               =
+
+# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
+# Project output. For more information please see Qt Help Project / Namespace
+# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_NAMESPACE          = org.doxygen.Project
+
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
+# Help Project output. For more information please see Qt Help Project / Virtual
+# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
+# folders).
+# The default value is: doc.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_VIRTUAL_FOLDER     = doc
+
+# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
+# filter to add. For more information please see Qt Help Project / Custom
+# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# filters).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_CUST_FILTER_NAME   =
+
+# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
+# custom filter to add. For more information please see Qt Help Project / Custom
+# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# filters).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_CUST_FILTER_ATTRS  =
+
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
+# project's filter section matches. Qt Help Project / Filter Attributes (see:
+# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_SECT_FILTER_ATTRS  =
+
+# The QHG_LOCATION tag can be used to specify the location of Qt's
+# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the
+# generated .qhp file.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHG_LOCATION           =
+
+# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be
+# generated, together with the HTML files, they form an Eclipse help plugin. To
+# install this plugin and make it available under the help contents menu in
+# Eclipse, the contents of the directory containing the HTML and XML files needs
+# to be copied into the plugins directory of eclipse. The name of the directory
+# within the plugins directory should be the same as the ECLIPSE_DOC_ID value.
+# After copying Eclipse needs to be restarted before the help appears.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_ECLIPSEHELP   = NO
+
+# A unique identifier for the Eclipse help plugin. When installing the plugin
+# the directory name containing the HTML and XML files should also have this
+# name. Each documentation set should have its own identifier.
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES.
+
+ECLIPSE_DOC_ID         = org.doxygen.Project
+
+# If you want full control over the layout of the generated HTML pages it might
+# be necessary to disable the index and replace it with your own. The
+# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top
+# of each HTML page. A value of NO enables the index and the value YES disables
+# it. Since the tabs in the index contain the same information as the navigation
+# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+DISABLE_INDEX          = NO
+
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
+# structure should be generated to display hierarchical information. If the tag
+# value is set to YES, a side panel will be generated containing a tree-like
+# index structure (just like the one that is generated for HTML Help). For this
+# to work a browser that supports JavaScript, DHTML, CSS and frames is required
+# (i.e. any modern browser). Windows users are probably better off using the
+# HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can
+# further fine-tune the look of the index. As an example, the default style
+# sheet generated by doxygen has an example that shows how to put an image at
+# the root of the tree instead of the PROJECT_NAME. Since the tree basically has
+# the same information as the tab index, you could consider setting
+# DISABLE_INDEX to YES when enabling this option.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_TREEVIEW      = NO
+
+# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that
+# doxygen will group on one line in the generated HTML documentation.
+#
+# Note that a value of 0 will completely suppress the enum values from appearing
+# in the overview section.
+# Minimum value: 0, maximum value: 20, default value: 4.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+ENUM_VALUES_PER_LINE   = 4
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used
+# to set the initial width (in pixels) of the frame in which the tree is shown.
+# Minimum value: 0, maximum value: 1500, default value: 250.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+TREEVIEW_WIDTH         = 250
+
+# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to
+# external symbols imported via tag files in a separate window.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+EXT_LINKS_IN_WINDOW    = NO
+
+# Use this tag to change the font size of LaTeX formulas included as images in
+# the HTML documentation. When you change the font size after a successful
+# doxygen run you need to manually remove any form_*.png images from the HTML
+# output directory to force them to be regenerated.
+# Minimum value: 8, maximum value: 50, default value: 10.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+FORMULA_FONTSIZE       = 10
+
+# Use the FORMULA_TRANPARENT tag to determine whether or not the images
+# generated for formulas are transparent PNGs. Transparent PNGs are not
+# supported properly for IE 6.0, but are supported on all modern browsers.
+#
+# Note that when changing this option you need to delete any form_*.png files in
+# the HTML output directory before the changes have effect.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+FORMULA_TRANSPARENT    = YES
+
+# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
+# http://www.mathjax.org) which uses client side Javascript for the rendering
+# instead of using prerendered bitmaps. Use this if you do not have LaTeX
+# installed or if you want to formulas look prettier in the HTML output. When
+# enabled you may also need to install MathJax separately and configure the path
+# to it using the MATHJAX_RELPATH option.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+USE_MATHJAX            = NO
+
+# When MathJax is enabled you can set the default output format to be used for
+# the MathJax output. See the MathJax site (see:
+# http://docs.mathjax.org/en/latest/output.html) for more details.
+# Possible values are: HTML-CSS (which is slower, but has the best
+# compatibility), NativeMML (i.e. MathML) and SVG.
+# The default value is: HTML-CSS.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_FORMAT         = HTML-CSS
+
+# When MathJax is enabled you need to specify the location relative to the HTML
+# output directory using the MATHJAX_RELPATH option. The destination directory
+# should contain the MathJax.js script. For instance, if the mathjax directory
+# is located at the same level as the HTML output directory, then
+# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax
+# Content Delivery Network so you can quickly see the result without installing
+# MathJax. However, it is strongly recommended to install a local copy of
+# MathJax from http://www.mathjax.org before deployment.
+# The default value is: http://cdn.mathjax.org/mathjax/latest.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_RELPATH        = http://cdn.mathjax.org/mathjax/latest
+
+# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax
+# extension names that should be enabled during MathJax rendering. For example
+# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_EXTENSIONS     =
+
+# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces
+# of code that will be used on startup of the MathJax code. See the MathJax site
+# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an
+# example see the documentation.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_CODEFILE       =
+
+# When the SEARCHENGINE tag is enabled doxygen will generate a search box for
+# the HTML output. The underlying search engine uses javascript and DHTML and
+# should work on any modern browser. Note that when using HTML help
+# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET)
+# there is already a search function so this one should typically be disabled.
+# For large projects the javascript based search engine can be slow, then
+# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to
+# search using the keyboard; to jump to the search box use <access key> + S
+# (what the <access key> is depends on the OS and browser, but it is typically
+# <CTRL>, <ALT>/<option>, or both). Inside the search box use the <cursor down
+# key> to jump into the search results window, the results can be navigated
+# using the <cursor keys>. Press <Enter> to select an item or <escape> to cancel
+# the search. The filter options can be selected when the cursor is inside the
+# search box by pressing <Shift>+<cursor down>. Also here use the <cursor keys>
+# to select a filter and <Enter> or <escape> to activate or cancel the filter
+# option.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+SEARCHENGINE           = YES
+
+# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
+# implemented using a web server instead of a web client using Javascript. There
+# are two flavors of web server based searching depending on the EXTERNAL_SEARCH
+# setting. When disabled, doxygen will generate a PHP script for searching and
+# an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing
+# and searching needs to be provided by external tools. See the section
+# "External Indexing and Searching" for details.
+# The default value is: NO.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SERVER_BASED_SEARCH    = NO
+
+# When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP
+# script for searching. Instead the search results are written to an XML file
+# which needs to be processed by an external indexer. Doxygen will invoke an
+# external search engine pointed to by the SEARCHENGINE_URL option to obtain the
+# search results.
+#
+# Doxygen ships with an example indexer ( doxyindexer) and search engine
+# (doxysearch.cgi) which are based on the open source search engine library
+# Xapian (see: http://xapian.org/).
+#
+# See the section "External Indexing and Searching" for details.
+# The default value is: NO.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTERNAL_SEARCH        = NO
+
+# The SEARCHENGINE_URL should point to a search engine hosted by a web server
+# which will return the search results when EXTERNAL_SEARCH is enabled.
+#
+# Doxygen ships with an example indexer ( doxyindexer) and search engine
+# (doxysearch.cgi) which are based on the open source search engine library
+# Xapian (see: http://xapian.org/). See the section "External Indexing and
+# Searching" for details.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SEARCHENGINE_URL       =
+
+# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed
+# search data is written to a file for indexing by an external tool. With the
+# SEARCHDATA_FILE tag the name of this file can be specified.
+# The default file is: searchdata.xml.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SEARCHDATA_FILE        = searchdata.xml
+
+# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the
+# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is
+# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple
+# projects and redirect the results back to the right project.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTERNAL_SEARCH_ID     =
+
+# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen
+# projects other than the one defined by this configuration file, but that are
+# all added to the same external search index. Each project needs to have a
+# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id of
+# to a relative location where the documentation can be found. The format is:
+# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTRA_SEARCH_MAPPINGS  =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES doxygen will generate LaTeX output.
+# The default value is: YES.
+
+GENERATE_LATEX         = YES
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: latex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_OUTPUT           = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+# invoked.
+#
+# Note that when enabling USE_PDFLATEX this option is only used for generating
+# bitmaps for formulas in the HTML output, but not in the Makefile that is
+# written to the output directory.
+# The default file is: latex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_CMD_NAME         = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate
+# index for LaTeX.
+# The default file is: makeindex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+MAKEINDEX_CMD_NAME     = makeindex
+
+# If the COMPACT_LATEX tag is set to YES doxygen generates more compact LaTeX
+# documents. This may be useful for small projects and may help to save some
+# trees in general.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+COMPACT_LATEX          = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used by the
+# printer.
+# Possible values are: a4 (210 x 297 mm), letter (8.5 x 11 inches), legal (8.5 x
+# 14 inches) and executive (7.25 x 10.5 inches).
+# The default value is: a4.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+PAPER_TYPE             = a4
+
+# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names
+# that should be included in the LaTeX output. To get the times font for
+# instance you can specify
+# EXTRA_PACKAGES=times
+# If left blank no extra packages will be included.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+EXTRA_PACKAGES         =
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for the
+# generated LaTeX document. The header should contain everything until the first
+# chapter. If it is left blank doxygen will generate a standard header. See
+# section "Doxygen usage" for information on how to let doxygen write the
+# default header to a separate file.
+#
+# Note: Only use a user-defined header if you know what you are doing! The
+# following commands have a special meaning inside the header: $title,
+# $datetime, $date, $doxygenversion, $projectname, $projectnumber,
+# $projectbrief, $projectlogo. Doxygen will replace $title with the empy string,
+# for the replacement values of the other commands the user is refered to
+# HTML_HEADER.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_HEADER           =
+
+# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the
+# generated LaTeX document. The footer should contain everything after the last
+# chapter. If it is left blank doxygen will generate a standard footer. See
+# LATEX_HEADER for more information on how to generate a default footer and what
+# special commands can be used inside the footer.
+#
+# Note: Only use a user-defined footer if you know what you are doing!
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_FOOTER           =
+
+# The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or
+# other source files which should be copied to the LATEX_OUTPUT output
+# directory. Note that the files will be copied as-is; there are no commands or
+# markers available.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_EXTRA_FILES      =
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is
+# prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will
+# contain links (just like the HTML output) instead of page references. This
+# makes the output suitable for online browsing using a PDF viewer.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+PDF_HYPERLINKS         = YES
+
+# If the USE_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate
+# the PDF file directly from the LaTeX files. Set this option to YES to get a
+# higher quality PDF documentation.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+USE_PDFLATEX           = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \batchmode
+# command to the generated LaTeX files. This will instruct LaTeX to keep running
+# if errors occur, instead of asking the user for help. This option is also used
+# when generating formulas in HTML.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_BATCHMODE        = NO
+
+# If the LATEX_HIDE_INDICES tag is set to YES then doxygen will not include the
+# index chapters (such as File Index, Compound Index, etc.) in the output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_HIDE_INDICES     = NO
+
+# If the LATEX_SOURCE_CODE tag is set to YES then doxygen will include source
+# code with syntax highlighting in the LaTeX output.
+#
+# Note that which sources are shown also depends on other settings such as
+# SOURCE_BROWSER.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_SOURCE_CODE      = NO
+
+# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
+# bibliography, e.g. plainnat, or ieeetr. See
+# http://en.wikipedia.org/wiki/BibTeX and \cite for more info.
+# The default value is: plain.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_BIB_STYLE        = plain
+
+#---------------------------------------------------------------------------
+# Configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES doxygen will generate RTF output. The
+# RTF output is optimized for Word 97 and may not look too pretty with other RTF
+# readers/editors.
+# The default value is: NO.
+
+GENERATE_RTF           = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: rtf.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_OUTPUT             = rtf
+
+# If the COMPACT_RTF tag is set to YES doxygen generates more compact RTF
+# documents. This may be useful for small projects and may help to save some
+# trees in general.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+COMPACT_RTF            = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated will
+# contain hyperlink fields. The RTF file will contain links (just like the HTML
+# output) instead of page references. This makes the output suitable for online
+# browsing using Word or some other Word compatible readers that support those
+# fields.
+#
+# Note: WordPad (write) and others do not support links.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_HYPERLINKS         = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's config
+# file, i.e. a series of assignments. You only have to provide replacements,
+# missing definitions are set to their default value.
+#
+# See also section "Doxygen usage" for information on how to generate the
+# default style sheet that doxygen normally uses.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_STYLESHEET_FILE    =
+
+# Set optional variables used in the generation of an RTF document. Syntax is
+# similar to doxygen's config file. A template extensions file can be generated
+# using doxygen -e rtf extensionFile.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_EXTENSIONS_FILE    =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES doxygen will generate man pages for
+# classes and files.
+# The default value is: NO.
+
+GENERATE_MAN           = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it. A directory man3 will be created inside the directory specified by
+# MAN_OUTPUT.
+# The default directory is: man.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_OUTPUT             = man
+
+# The MAN_EXTENSION tag determines the extension that is added to the generated
+# man pages. In case the manual section does not start with a number, the number
+# 3 is prepended. The dot (.) at the beginning of the MAN_EXTENSION tag is
+# optional.
+# The default value is: .3.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_EXTENSION          = .3
+
+# The MAN_SUBDIR tag determines the name of the directory created within
+# MAN_OUTPUT in which the man pages are placed. If defaults to man followed by
+# MAN_EXTENSION with the initial . removed.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_SUBDIR             =
+
+# If the MAN_LINKS tag is set to YES and doxygen generates man output, then it
+# will generate one additional man file for each entity documented in the real
+# man page(s). These additional files only source the real man page, but without
+# them the man command would be unable to find the correct page.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_LINKS              = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES doxygen will generate an XML file that
+# captures the structure of the code including all documentation.
+# The default value is: NO.
+
+GENERATE_XML           = YES
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: xml.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_OUTPUT             = xml
+
+# If the XML_PROGRAMLISTING tag is set to YES doxygen will dump the program
+# listings (including syntax highlighting and cross-referencing information) to
+# the XML output. Note that enabling this will significantly increase the size
+# of the XML output.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_PROGRAMLISTING     = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to the DOCBOOK output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_DOCBOOK tag is set to YES doxygen will generate Docbook files
+# that can be used to generate PDF.
+# The default value is: NO.
+
+GENERATE_DOCBOOK       = NO
+
+# The DOCBOOK_OUTPUT tag is used to specify where the Docbook pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be put in
+# front of it.
+# The default directory is: docbook.
+# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
+
+DOCBOOK_OUTPUT         = docbook
+
+# If the DOCBOOK_PROGRAMLISTING tag is set to YES doxygen will include the
+# program listings (including syntax highlighting and cross-referencing
+# information) to the DOCBOOK output. Note that enabling this will significantly
+# increase the size of the DOCBOOK output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
+
+DOCBOOK_PROGRAMLISTING = NO
+
+#---------------------------------------------------------------------------
+# Configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES doxygen will generate an AutoGen
+# Definitions (see http://autogen.sf.net) file that captures the structure of
+# the code including all documentation. Note that this feature is still
+# experimental and incomplete at the moment.
+# The default value is: NO.
+
+GENERATE_AUTOGEN_DEF   = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES doxygen will generate a Perl module
+# file that captures the structure of the code including all documentation.
+#
+# Note that this feature is still experimental and incomplete at the moment.
+# The default value is: NO.
+
+GENERATE_PERLMOD       = NO
+
+# If the PERLMOD_LATEX tag is set to YES doxygen will generate the necessary
+# Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI
+# output from the Perl module output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_LATEX          = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be nicely
+# formatted so it can be parsed by a human reader. This is useful if you want to
+# understand what is going on. On the other hand, if this tag is set to NO the
+# size of the Perl module output will be much smaller and Perl will parse it
+# just the same.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_PRETTY         = YES
+
+# The names of the make variables in the generated doxyrules.make file are
+# prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. This is useful
+# so different doxyrules.make files included by the same Makefile don't
+# overwrite each other's variables.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_MAKEVAR_PREFIX =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES doxygen will evaluate all
+# C-preprocessor directives found in the sources and include files.
+# The default value is: YES.
+
+ENABLE_PREPROCESSING   = YES
+
+# If the MACRO_EXPANSION tag is set to YES doxygen will expand all macro names
+# in the source code. If set to NO only conditional compilation will be
+# performed. Macro expansion can be done in a controlled way by setting
+# EXPAND_ONLY_PREDEF to YES.
+# The default value is: NO.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+MACRO_EXPANSION        = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then
+# the macro expansion is limited to the macros specified with the PREDEFINED and
+# EXPAND_AS_DEFINED tags.
+# The default value is: NO.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+EXPAND_ONLY_PREDEF     = NO
+
+# If the SEARCH_INCLUDES tag is set to YES the includes files in the
+# INCLUDE_PATH will be searched if a #include is found.
+# The default value is: YES.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+SEARCH_INCLUDES        = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by the
+# preprocessor.
+# This tag requires that the tag SEARCH_INCLUDES is set to YES.
+
+INCLUDE_PATH           =
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will be
+# used.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+INCLUDE_FILE_PATTERNS  =
+
+# The PREDEFINED tag can be used to specify one or more macro names that are
+# defined before the preprocessor is started (similar to the -D option of e.g.
+# gcc). The argument of the tag is a list of macros of the form: name or
+# name=definition (no spaces). If the definition and the "=" are omitted, "=1"
+# is assumed. To prevent a macro definition from being undefined via #undef or
+# recursively expanded use the := operator instead of the = operator.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+PREDEFINED             =
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
+# tag can be used to specify a list of macro names that should be expanded. The
+# macro definition that is found in the sources will be used. Use the PREDEFINED
+# tag if you want to use a different macro definition that overrules the
+# definition found in the source code.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+EXPAND_AS_DEFINED      =
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will
+# remove all references to function-like macros that are alone on a line, have
+# an all uppercase name, and do not end with a semicolon. Such function macros
+# are typically used for boiler-plate code, and will confuse the parser if not
+# removed.
+# The default value is: YES.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+SKIP_FUNCTION_MACROS   = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES tag can be used to specify one or more tag files. For each tag
+# file the location of the external documentation should be added. The format of
+# a tag file without this location is as follows:
+# TAGFILES = file1 file2 ...
+# Adding location for the tag files is done as follows:
+# TAGFILES = file1=loc1 "file2 = loc2" ...
+# where loc1 and loc2 can be relative or absolute paths or URLs. See the
+# section "Linking to external documentation" for more information about the use
+# of tag files.
+# Note: Each tag file must have a unique name (where the name does NOT include
+# the path). If a tag file is not located in the directory in which doxygen is
+# run, you must also specify the path to the tagfile here.
+
+TAGFILES               =
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create a
+# tag file that is based on the input files it reads. See section "Linking to
+# external documentation" for more information about the usage of tag files.
+
+GENERATE_TAGFILE       =
+
+# If the ALLEXTERNALS tag is set to YES all external class will be listed in the
+# class index. If set to NO only the inherited external classes will be listed.
+# The default value is: NO.
+
+ALLEXTERNALS           = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed in
+# the modules index. If set to NO, only the current project's groups will be
+# listed.
+# The default value is: YES.
+
+EXTERNAL_GROUPS        = YES
+
+# If the EXTERNAL_PAGES tag is set to YES all external pages will be listed in
+# the related pages index. If set to NO, only the current project's pages will
+# be listed.
+# The default value is: YES.
+
+EXTERNAL_PAGES         = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script
+# interpreter (i.e. the result of 'which perl').
+# The default file (with absolute path) is: /usr/bin/perl.
+
+PERL_PATH              = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES doxygen will generate a class diagram
+# (in HTML and LaTeX) for classes with base or super classes. Setting the tag to
+# NO turns the diagrams off. Note that this option also works with HAVE_DOT
+# disabled, but it is recommended to install and use dot, since it yields more
+# powerful graphs.
+# The default value is: YES.
+
+CLASS_DIAGRAMS         = YES
+
+# You can define message sequence charts within doxygen comments using the \msc
+# command. Doxygen will then run the mscgen tool (see:
+# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the
+# documentation. The MSCGEN_PATH tag allows you to specify the directory where
+# the mscgen tool resides. If left empty the tool is assumed to be found in the
+# default search path.
+
+MSCGEN_PATH            =
+
+# You can include diagrams made with dia in doxygen documentation. Doxygen will
+# then run dia to produce the diagram and insert it in the documentation. The
+# DIA_PATH tag allows you to specify the directory where the dia binary resides.
+# If left empty dia is assumed to be found in the default search path.
+
+DIA_PATH               =
+
+# If set to YES, the inheritance and collaboration graphs will hide inheritance
+# and usage relations if the target is undocumented or is not a class.
+# The default value is: YES.
+
+HIDE_UNDOC_RELATIONS   = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz (see:
+# http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
+# Bell Labs. The other options in this section have no effect if this option is
+# set to NO
+# The default value is: YES.
+
+HAVE_DOT               = YES
+
+# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
+# to run in parallel. When set to 0 doxygen will base this on the number of
+# processors available in the system. You can set it explicitly to a value
+# larger than 0 to get control over the balance between CPU load and processing
+# speed.
+# Minimum value: 0, maximum value: 32, default value: 0.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_NUM_THREADS        = 0
+
+# When you want a differently looking font in the dot files that doxygen
+# generates you can specify the font name using DOT_FONTNAME. You need to make
+# sure dot is able to find the font, which can be done by putting it in a
+# standard location or by setting the DOTFONTPATH environment variable or by
+# setting DOT_FONTPATH to the directory containing the font.
+# The default value is: Helvetica.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTNAME           = Helvetica
+
+# The DOT_FONTSIZE tag can be used to set the size (in points) of the font of
+# dot graphs.
+# Minimum value: 4, maximum value: 24, default value: 10.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTSIZE           = 10
+
+# By default doxygen will tell dot to use the default font as specified with
+# DOT_FONTNAME. If you specify a different font using DOT_FONTNAME you can set
+# the path where dot can find it using this tag.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTPATH           =
+
+# If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for
+# each documented class showing the direct and indirect inheritance relations.
+# Setting this tag to YES will force the CLASS_DIAGRAMS tag to NO.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+CLASS_GRAPH            = YES
+
+# If the COLLABORATION_GRAPH tag is set to YES then doxygen will generate a
+# graph for each documented class showing the direct and indirect implementation
+# dependencies (inheritance, containment, and class references variables) of the
+# class with other documented classes.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+COLLABORATION_GRAPH    = YES
+
+# If the GROUP_GRAPHS tag is set to YES then doxygen will generate a graph for
+# groups, showing the direct groups dependencies.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GROUP_GRAPHS           = YES
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
+# collaboration diagrams in a style similar to the OMG's Unified Modeling
+# Language.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+UML_LOOK               = NO
+
+# If the UML_LOOK tag is enabled, the fields and methods are shown inside the
+# class node. If there are many fields or methods and many nodes the graph may
+# become too big to be useful. The UML_LIMIT_NUM_FIELDS threshold limits the
+# number of items for each type to make the size more manageable. Set this to 0
+# for no limit. Note that the threshold may be exceeded by 50% before the limit
+# is enforced. So when you set the threshold to 10, up to 15 fields may appear,
+# but if the number exceeds 15, the total amount of fields shown is limited to
+# 10.
+# Minimum value: 0, maximum value: 100, default value: 10.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+UML_LIMIT_NUM_FIELDS   = 10
+
+# If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and
+# collaboration graphs will show the relations between templates and their
+# instances.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+TEMPLATE_RELATIONS     = NO
+
+# If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are set to
+# YES then doxygen will generate a graph for each documented file showing the
+# direct and indirect include dependencies of the file with other documented
+# files.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INCLUDE_GRAPH          = YES
+
+# If the INCLUDED_BY_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are
+# set to YES then doxygen will generate a graph for each documented file showing
+# the direct and indirect include dependencies of the file with other documented
+# files.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INCLUDED_BY_GRAPH      = YES
+
+# If the CALL_GRAPH tag is set to YES then doxygen will generate a call
+# dependency graph for every global function or class method.
+#
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable call graphs for selected
+# functions only using the \callgraph command.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+CALL_GRAPH             = NO
+
+# If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller
+# dependency graph for every global function or class method.
+#
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable caller graphs for selected
+# functions only using the \callergraph command.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+CALLER_GRAPH           = NO
+
+# If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical
+# hierarchy of all classes instead of a textual one.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GRAPHICAL_HIERARCHY    = YES
+
+# If the DIRECTORY_GRAPH tag is set to YES then doxygen will show the
+# dependencies a directory has on other directories in a graphical way. The
+# dependency relations are determined by the #include relations between the
+# files in the directories.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DIRECTORY_GRAPH        = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
+# generated by dot.
+# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order
+# to make the SVG files visible in IE 9+ (other browsers do not have this
+# requirement).
+# Possible values are: png, png:cairo, png:cairo:cairo, png:cairo:gd, png:gd,
+# png:gd:gd, jpg, jpg:cairo, jpg:cairo:gd, jpg:gd, jpg:gd:gd, gif, gif:cairo,
+# gif:cairo:gd, gif:gd, gif:gd:gd and svg.
+# The default value is: png.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_IMAGE_FORMAT       = png
+
+# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
+# enable generation of interactive SVG images that allow zooming and panning.
+#
+# Note that this requires a modern browser other than Internet Explorer. Tested
+# and working are Firefox, Chrome, Safari, and Opera.
+# Note: For IE 9+ you need to set HTML_FILE_EXTENSION to xhtml in order to make
+# the SVG files visible. Older versions of IE do not have SVG support.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INTERACTIVE_SVG        = NO
+
+# The DOT_PATH tag can be used to specify the path where the dot tool can be
+# found. If left blank, it is assumed the dot tool can be found in the path.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_PATH               =
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that
+# contain dot files that are included in the documentation (see the \dotfile
+# command).
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOTFILE_DIRS           =
+
+# The MSCFILE_DIRS tag can be used to specify one or more directories that
+# contain msc files that are included in the documentation (see the \mscfile
+# command).
+
+MSCFILE_DIRS           =
+
+# The DIAFILE_DIRS tag can be used to specify one or more directories that
+# contain dia files that are included in the documentation (see the \diafile
+# command).
+
+DIAFILE_DIRS           =
+
+# When using plantuml, the PLANTUML_JAR_PATH tag should be used to specify the
+# path where java can find the plantuml.jar file. If left blank, it is assumed
+# PlantUML is not used or called during a preprocessing step. Doxygen will
+# generate a warning when it encounters a \startuml command in this case and
+# will not generate output for the diagram.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+PLANTUML_JAR_PATH      =
+
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes
+# that will be shown in the graph. If the number of nodes in a graph becomes
+# larger than this value, doxygen will truncate the graph, which is visualized
+# by representing a node as a red box. Note that doxygen if the number of direct
+# children of the root node in a graph is already larger than
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note that
+# the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+# Minimum value: 0, maximum value: 10000, default value: 50.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_GRAPH_MAX_NODES    = 50
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs
+# generated by dot. A depth value of 3 means that only nodes reachable from the
+# root by following a path via at most 3 edges will be shown. Nodes that lay
+# further from the root node will be omitted. Note that setting this option to 1
+# or 2 may greatly reduce the computation time needed for large code bases. Also
+# note that the size of a graph can be further restricted by
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
+# Minimum value: 0, maximum value: 1000, default value: 0.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+MAX_DOT_GRAPH_DEPTH    = 0
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
+# background. This is disabled by default, because dot on Windows does not seem
+# to support this out of the box.
+#
+# Warning: Depending on the platform used, enabling this option may lead to
+# badly anti-aliased labels on the edges of a graph (i.e. they become hard to
+# read).
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_TRANSPARENT        = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
+# files in one run (i.e. multiple -o and -T options on the command line). This
+# makes dot run faster, but since only newer versions of dot (>1.8.10) support
+# this, this feature is disabled by default.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_MULTI_TARGETS      = NO
+
+# If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page
+# explaining the meaning of the various boxes and arrows in the dot generated
+# graphs.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GENERATE_LEGEND        = YES
+
+# If the DOT_CLEANUP tag is set to YES doxygen will remove the intermediate dot
+# files that are used to generate the various graphs.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_CLEANUP            = YES

+ 26 - 0
vendor/mike42/escpos-php/example/README.md

@@ -0,0 +1,26 @@
+Examples
+--------
+
+This folder contains a collectoion of feature examples.
+Generally, demo.php is the fastest way to find out which features your
+printer supports.
+
+## Subfolders
+- `interface/` - contains examples for output interfaces: eg, parallel, serial, USB, network, file-based.
+- `specific/` - examples made in response to issues & questions. These cover specific languages, printers and interfaces, so hit narrower use cases.
+
+## List of examples
+
+Each example prints to standard output, so either edit the print connector, or redirect the output to your printer to see it in action. They are designed for developers: open them in a text editor before you run them!
+
+- `bit-image.php` - Prints a images to the printer using the older "bit image" commands.
+- `demo.php` - Demonstrates output using a large subset of availale features.
+- `qr-code.php` - Prints QR codes, if your printer supports it.
+- `character-encodings.php` - Shows available character encodings. Change from the DefaultCapabilityProfile to get more useful output for your specific printer.
+- `graphics.php` - The same output as `bit-image.php`, printed with the newer graphics commands (not supported on many non-Epson printers)
+- `receipt-with-logo.php` - A simple receipt containing a logo and basic formating.
+- `character-encodings-with-images.php` - The same as `character-encodings.php`, but also prints each string using an `ImagePrintBuffer`, showing compatibility gaps.
+- `print-from-html.php` - Runs `wkhtmltoimage` to convert HTML to an image, and then prints the image. (This is very slow)
+- `character-tables.php` - Prints a compact character code table for each available character set. Used to debug incorrect output from `character-encodings.php`.
+- `print-from-pdf.php` - Loads a PDF and prints each page in a few different ways (very slow as well)
+- `rawbt-receipt` (.php & .html) - Demonstration of Back and Front for integration between the site and the Android application “RawBT - Printer Driver for Android”

+ 207 - 0
vendor/mike42/escpos-php/example/barcode.php

@@ -0,0 +1,207 @@
+<?php
+require __DIR__ . '/../vendor/autoload.php';
+use Mike42\Escpos\Printer;
+use Mike42\Escpos\PrintConnectors\FilePrintConnector;
+
+$connector = new FilePrintConnector("php://stdout");
+$printer = new Printer($connector);
+
+/* Height and width */
+$printer->selectPrintMode(Printer::MODE_DOUBLE_HEIGHT | Printer::MODE_DOUBLE_WIDTH);
+$printer->text("Height and bar width\n");
+$printer->selectPrintMode();
+$heights = array(1, 2, 4, 8, 16, 32);
+$widths = array(1, 2, 3, 4, 5, 6, 7, 8);
+$printer -> text("Default look\n");
+$printer->barcode("ABC", Printer::BARCODE_CODE39);
+
+foreach($heights as $height) {
+    $printer -> text("\nHeight $height\n");
+    $printer->setBarcodeHeight($height);
+    $printer->barcode("ABC", Printer::BARCODE_CODE39);
+}
+foreach($widths as $width) {
+    $printer -> text("\nWidth $width\n");
+    $printer->setBarcodeWidth($width);
+    $printer->barcode("ABC", Printer::BARCODE_CODE39);
+}
+$printer->feed();
+// Set to something sensible for the rest of the examples
+$printer->setBarcodeHeight(40);
+$printer->setBarcodeWidth(2);
+
+/* Text position */
+$printer->selectPrintMode(Printer::MODE_DOUBLE_HEIGHT | Printer::MODE_DOUBLE_WIDTH);
+$printer->text("Text position\n");
+$printer->selectPrintMode();
+$hri = array (
+    Printer::BARCODE_TEXT_NONE => "No text",
+    Printer::BARCODE_TEXT_ABOVE => "Above",
+    Printer::BARCODE_TEXT_BELOW => "Below",
+    Printer::BARCODE_TEXT_ABOVE | Printer::BARCODE_TEXT_BELOW => "Both"
+);
+foreach ($hri as $position => $caption) {
+    $printer->text($caption . "\n");
+    $printer->setBarcodeTextPosition($position);
+    $printer->barcode("012345678901", Printer::BARCODE_JAN13);
+    $printer->feed();
+}
+
+/* Barcode types */
+$standards = array (
+        Printer::BARCODE_UPCA => array (
+                "title" => "UPC-A",
+                "caption" => "Fixed-length numeric product barcodes.",
+                "example" => array (
+                        array (
+                                "caption" => "12 char numeric including (wrong) check digit.",
+                                "content" => "012345678901"
+                        ),
+                        array (
+                                "caption" => "Send 11 chars to add check digit automatically.",
+                                "content" => "01234567890"
+                        )
+                )
+        ),
+        Printer::BARCODE_UPCE => array (
+                "title" => "UPC-E",
+                "caption" => "Fixed-length numeric compact product barcodes.",
+                "example" => array (
+                        array (
+                                "caption" => "6 char numeric - auto check digit & NSC",
+                                "content" => "123456"
+                        ),
+                        array (
+                                "caption" => "7 char numeric - auto check digit",
+                                "content" => "0123456"
+                        ),
+                        array (
+                                "caption" => "8 char numeric",
+                                "content" => "01234567"
+                        ),
+                        array (
+                                "caption" => "11 char numeric - auto check digit",
+                                "content" => "01234567890"
+                        ),
+                        array (
+                                "caption" => "12 char numeric including (wrong) check digit",
+                                "content" => "012345678901"
+                        )
+                )
+        ),
+        Printer::BARCODE_JAN13 => array (
+                "title" => "JAN13/EAN13",
+                "caption" => "Fixed-length numeric barcodes.",
+                "example" => array (
+                        array (
+                                "caption" => "12 char numeric - auto check digit",
+                                "content" => "012345678901"
+                        ),
+                        array (
+                                "caption" => "13 char numeric including (wrong) check digit",
+                                "content" => "0123456789012"
+                        )
+                )
+        ),
+        Printer::BARCODE_JAN8 => array (
+                "title" => "JAN8/EAN8",
+                "caption" => "Fixed-length numeric barcodes.",
+                "example" => array (
+                        array (
+                                "caption" => "7 char numeric - auto check digit",
+                                "content" => "0123456"
+                        ),
+                        array (
+                                "caption" => "8 char numeric including (wrong) check digit",
+                                "content" => "01234567"
+                        )
+                )
+        ),
+        Printer::BARCODE_CODE39 => array (
+                "title" => "Code39",
+                "caption" => "Variable length alphanumeric w/ some special chars.",
+                "example" => array (
+                        array (
+                                "caption" => "Text, numbers, spaces",
+                                "content" => "ABC 012"
+                        ),
+                        array (
+                                "caption" => "Special characters",
+                                "content" => "$%+-./"
+                        ),
+                        array (
+                                "caption" => "Extra char (*) Used as start/stop",
+                                "content" => "*TEXT*"
+                        )
+                )
+        ),
+        Printer::BARCODE_ITF => array (
+                "title" => "ITF",
+                "caption" => "Variable length numeric w/even number of digits,\nas they are encoded in pairs.",
+                "example" => array (
+                        array (
+                                "caption" => "Numeric- even number of digits",
+                                "content" => "0123456789"
+                        )
+                )
+        ),
+        Printer::BARCODE_CODABAR => array (
+                "title" => "Codabar",
+                "caption" => "Varaible length numeric with some allowable\nextra characters. ABCD/abcd must be used as\nstart/stop characters (one at the start, one\nat the end) to distinguish between barcode\napplications.",
+                "example" => array (
+                        array (
+                                "caption" => "Numeric w/ A A start/stop. ",
+                                "content" => "A012345A"
+                        ),
+                        array (
+                                "caption" => "Extra allowable characters",
+                                "content" => "A012$+-./:A"
+                        )
+                )
+        ),
+        Printer::BARCODE_CODE93 => array (
+                "title" => "Code93",
+                "caption" => "Variable length- any ASCII is available",
+                "example" => array (
+                        array (
+                                "caption" => "Text",
+                                "content" => "012abcd"
+                        )
+                )
+        ),
+        Printer::BARCODE_CODE128 => array (
+                "title" => "Code128",
+                "caption" => "Variable length- any ASCII is available",
+                "example" => array (
+                        array (
+                                "caption" => "Code set A uppercase & symbols",
+                                "content" => "{A" . "012ABCD"
+                        ),
+                        array (
+                                "caption" => "Code set B general text",
+                                "content" => "{B" . "012ABCDabcd"
+                        ),
+                        array (
+                                "caption" => "Code set C compact numbers\n Sending chr(21) chr(32) chr(43)",
+                                "content" => "{C" . chr(21) . chr(32) . chr(43)
+                        )
+                )
+        )
+);
+$printer->setBarcodeTextPosition(Printer::BARCODE_TEXT_BELOW);
+foreach ($standards as $type => $standard) {
+    $printer->selectPrintMode(Printer::MODE_DOUBLE_HEIGHT | Printer::MODE_DOUBLE_WIDTH);
+    $printer->text($standard ["title"] . "\n");
+    $printer->selectPrintMode();
+    $printer->text($standard ["caption"] . "\n\n");
+    foreach ($standard ["example"] as $id => $barcode) {
+        $printer->setEmphasis(true);
+        $printer->text($barcode ["caption"] . "\n");
+        $printer->setEmphasis(false);
+        $printer->text("Content: " . $barcode ["content"] . "\n");
+        $printer->barcode($barcode ["content"], $type);
+        $printer->feed();
+    }
+}
+$printer->cut();
+$printer->close();

+ 36 - 0
vendor/mike42/escpos-php/example/bit-image.php

@@ -0,0 +1,36 @@
+<?php
+/* Example print-outs using the older bit image print command */
+require __DIR__ . '/../vendor/autoload.php';
+use Mike42\Escpos\Printer;
+use Mike42\Escpos\EscposImage;
+use Mike42\Escpos\PrintConnectors\FilePrintConnector;
+
+$connector = new FilePrintConnector("php://stdout");
+$printer = new Printer($connector);
+
+try {
+    $tux = EscposImage::load("resources/tux.png", false);
+
+    $printer -> text("These example images are printed with the older\nbit image print command. You should only use\n\$p -> bitImage() if \$p -> graphics() does not\nwork on your printer.\n\n");
+    
+    $printer -> bitImage($tux);
+    $printer -> text("Regular Tux (bit image).\n");
+    $printer -> feed();
+    
+    $printer -> bitImage($tux, Printer::IMG_DOUBLE_WIDTH);
+    $printer -> text("Wide Tux (bit image).\n");
+    $printer -> feed();
+    
+    $printer -> bitImage($tux, Printer::IMG_DOUBLE_HEIGHT);
+    $printer -> text("Tall Tux (bit image).\n");
+    $printer -> feed();
+    
+    $printer -> bitImage($tux, Printer::IMG_DOUBLE_WIDTH | Printer::IMG_DOUBLE_HEIGHT);
+    $printer -> text("Large Tux in correct proportion (bit image).\n");
+} catch (Exception $e) {
+    /* Images not supported on your PHP, or image file not found */
+    $printer -> text($e -> getMessage() . "\n");
+}
+
+$printer -> cut();
+$printer -> close();

+ 63 - 0
vendor/mike42/escpos-php/example/character-encodings-with-images.php

@@ -0,0 +1,63 @@
+<?php
+/* Change to the correct path if you copy this example! */
+require __DIR__ . '/../vendor/autoload.php';
+use Mike42\Escpos\Printer;
+use Mike42\Escpos\PrintConnectors\FilePrintConnector;
+use Mike42\Escpos\PrintBuffers\EscposPrintBuffer;
+use Mike42\Escpos\PrintBuffers\ImagePrintBuffer;
+use Mike42\Escpos\CapabilityProfile;
+
+/**
+ * This example builds on character-encodings.php, also providing an image-based rendering.
+ * This is quite slow, since a) the buffers are changed dozens of
+ * times in the example, and b) It involves sending very wide images, which printers don't like!
+ *
+ * There are currently no test cases around the image printing, since it is an experimental feature.
+ *
+ * It does, however, illustrate the way that more encodings are available when image output is used.
+ */
+include(dirname(__FILE__) . '/resources/character-encoding-test-strings.inc');
+
+try {
+    // Enter connector and capability profile
+    $connector = new FilePrintConnector("php://stdout");
+    $profile = CapabilityProfile::load('default');
+    $buffers = array(new EscposPrintBuffer(), new ImagePrintBuffer());
+
+    /* Print a series of receipts containing i18n example strings */
+    $printer = new Printer($connector, $profile);
+    $printer -> selectPrintMode(Printer::MODE_DOUBLE_HEIGHT | Printer::MODE_EMPHASIZED | Printer::MODE_DOUBLE_WIDTH);
+    $printer -> text("Implemented languages\n");
+    $printer -> selectPrintMode();
+    foreach ($inputsOk as $label => $str) {
+        $printer -> setEmphasis(true);
+        $printer -> text($label . ":\n");
+        $printer -> setEmphasis(false);
+        foreach ($buffers as $buffer) {
+            $printer -> setPrintBuffer($buffer);
+            $printer -> text($str);
+        }
+        $printer -> setPrintBuffer($buffers[0]);
+    }
+    $printer -> feed();
+    
+    $printer -> selectPrintMode(Printer::MODE_DOUBLE_HEIGHT | Printer::MODE_EMPHASIZED | Printer::MODE_DOUBLE_WIDTH);
+    $printer -> text("Works in progress\n");
+    $printer -> selectPrintMode();
+    foreach ($inputsNotOk as $label => $str) {
+        $printer -> setEmphasis(true);
+        $printer -> text($label . ":\n");
+        $printer -> setEmphasis(false);
+        foreach ($buffers as $buffer) {
+            $printer -> setPrintBuffer($buffer);
+            $printer -> text($str);
+        }
+        $printer -> setPrintBuffer($buffers[0]);
+    }
+    $printer -> cut();
+
+    /* Close printer */
+    $printer -> close();
+} catch (Exception $e) {
+    echo "Couldn't print to this printer: " . $e -> getMessage() . "\n";
+}

+ 60 - 0
vendor/mike42/escpos-php/example/character-encodings.php

@@ -0,0 +1,60 @@
+<?php
+/* Change to the correct path if you copy this example! */
+require __DIR__ . '/../vendor/autoload.php';
+use Mike42\Escpos\Printer;
+use Mike42\Escpos\PrintConnectors\FilePrintConnector;
+use Mike42\Escpos\CapabilityProfile;
+
+/**
+ * This demonstrates available character encodings. Escpos-php accepts UTF-8,
+ * and converts this to lower-level data to the printer. This is a complex area, so be
+ * prepared to code a model-specific hack ('CapabilityProfile') for your printer.
+ *
+ * If you run into trouble, please file an issue on GitHub, including at a minimum:
+ * - A UTF-8 test string in the language you're working in, and
+ * - A test print or link to a technical document which lists the available
+ *      code pages ('character code tables') for your printer.
+ *
+ * The DefaultCapabilityProfile works for Espson-branded printers. For other models, you
+ * must use/create a PrinterCapabilityProfile for your printer containing a list of code
+ * page numbers for your printer- otherwise you will get mojibake.
+ *
+ * If you do not intend to use non-English characters, then use SimpleCapabilityProfile,
+ * which has only the default encoding, effectively disabling code page changes.
+ */
+
+include(dirname(__FILE__) . '/resources/character-encoding-test-strings.inc');
+try {
+    // Enter connector and capability profile (to match your printer)
+    $connector = new FilePrintConnector("php://stdout");
+    $profile = CapabilityProfile::load("default");
+    
+    /* Print a series of receipts containing i18n example strings */
+    $printer = new Printer($connector, $profile);
+    $printer -> selectPrintMode(Printer::MODE_DOUBLE_HEIGHT | Printer::MODE_EMPHASIZED | Printer::MODE_DOUBLE_WIDTH);
+    $printer -> text("Implemented languages\n");
+    $printer -> selectPrintMode();
+    foreach ($inputsOk as $label => $str) {
+        $printer -> setEmphasis(true);
+        $printer -> text($label . ":\n");
+        $printer -> setEmphasis(false);
+        $printer -> text($str);
+    }
+    $printer -> feed();
+    
+    $printer -> selectPrintMode(Printer::MODE_DOUBLE_HEIGHT | Printer::MODE_EMPHASIZED | Printer::MODE_DOUBLE_WIDTH);
+    $printer -> text("Works in progress\n");
+    $printer -> selectPrintMode();
+    foreach ($inputsNotOk as $label => $str) {
+        $printer -> setEmphasis(true);
+        $printer -> text($label . ":\n");
+        $printer -> setEmphasis(false);
+        $printer -> text($str);
+    }
+    $printer -> cut();
+
+    /* Close printer */
+    $printer -> close();
+} catch (Exception $e) {
+    echo "Couldn't print to this printer: " . $e -> getMessage() . "\n";
+}

+ 75 - 0
vendor/mike42/escpos-php/example/character-tables.php

@@ -0,0 +1,75 @@
+<?php
+/**
+ * This demo prints out supported code pages on your printer. This is intended
+ * for debugging character-encoding issues: If your printer does not work with
+ * a built-in capability profile, you need to check its documentation for
+ * supported code pages.
+ *
+ * These are then loaded into a capability profile, which maps code page
+ * numbers to iconv encoding names on your particular printer. This script
+ * will print all configured code pages, so that you can check that the chosen
+ * iconv encoding name matches the actual code page contents.
+ *
+ * If this is correctly set up for your printer, then the driver will try its
+ * best to map UTF-8 text into these code pages for you, allowing you to accept
+ * arbitrary input from a database, without worrying about encoding it for the printer.
+ */
+require __DIR__ . '/../vendor/autoload.php';
+use Mike42\Escpos\Printer;
+use Mike42\Escpos\PrintConnectors\FilePrintConnector;
+use Mike42\Escpos\CapabilityProfile;
+
+// Enter connector and capability profile (to match your printer)
+$connector = new FilePrintConnector("php://stdout");
+$profile = CapabilityProfile::load("default");
+$verbose = false; // Skip tables which iconv wont convert to (ie, only print characters available with UTF-8 input)
+
+/* Print a series of receipts containing i18n example strings - Code below shouldn't need changing */
+$printer = new Mike42\Escpos\Printer($connector, $profile);
+$codePages = $profile -> getCodePages();
+$first = true; // Print larger table for first code-page.
+foreach ($codePages as $table => $page) {
+    /* Change printer code page */
+    $printer -> selectCharacterTable(255);
+    $printer -> selectCharacterTable($table);
+    /* Select & print a label for it */
+    $label = $page -> getId();
+    if (!$page -> isEncodable()) {
+        $label= " (not supported)";
+    }
+    $printer -> setEmphasis(true);
+    $printer -> textRaw("Table $table: $label\n");
+    $printer -> setEmphasis(false);
+    if (!$page -> isEncodable() && !$verbose) {
+        continue; // Skip non-recognised
+    }
+    /* Print a table of available characters (first table is larger than subsequent ones */
+    if ($first) {
+        $first = false;
+        compactCharTable($printer, 1, true);
+    } else {
+        compactCharTable($printer);
+    }
+}
+$printer -> cut();
+$printer -> close();
+
+function compactCharTable($printer, $start = 4, $header = false)
+{
+    /* Output a compact character table for the current encoding */
+    $chars = str_repeat(' ', 256);
+    for ($i = 0; $i < 255; $i++) {
+        $chars[$i] = ($i > 32 && $i != 127) ? chr($i) : ' ';
+    }
+    if ($header) {
+        $printer -> setEmphasis(true);
+        $printer -> textRaw("  0123456789ABCDEF0123456789ABCDEF\n");
+        $printer -> setEmphasis(false);
+    }
+    for ($y = $start; $y < 8; $y++) {
+        $printer -> setEmphasis(true);
+        $printer -> textRaw(strtoupper(dechex($y * 2)) . " ");
+        $printer -> setEmphasis(false);
+        $printer -> textRaw(substr($chars, $y * 32, 32) . "\n");
+    }
+}

+ 51 - 0
vendor/mike42/escpos-php/example/customer-display.php

@@ -0,0 +1,51 @@
+<?php
+/**
+ * This demo interacts with an Aures OCD-300 customer display,
+ * showing its support for ESC/POS text encodings.
+ */
+
+require __DIR__ . '/../vendor/autoload.php';
+
+use Mike42\Escpos\PrintConnectors\FilePrintConnector;
+use Mike42\Escpos\CapabilityProfile;
+use Mike42\Escpos\Printer;
+use Mike42\Escpos\Devices\AuresCustomerDisplay;
+
+/*
+ * Device appears as a serial port.
+ * 
+ *   stat /dev/ttyACM0
+ *   sudo usermod -a -G dialout [username]
+ */
+$connector = new FilePrintConnector("/dev/ttyACM0");
+
+// Profile and display
+$profile = CapabilityProfile::load("OCD-300");
+$display = new AuresCustomerDisplay($connector, $profile);
+
+
+// Make a really long test string
+include(__DIR__ . "/resources/character-encoding-test-strings.inc");
+$input = "";
+foreach ($inputsOk as $str) {
+    $input .= $str;
+}
+
+// Wrap at a fixed width (as ASCII...), and show the user
+// what's about to be sent to the printer
+$wrapped = wordwrap($input, 20);
+echo($wrapped);
+
+// Roll out each line with 0.5s delay
+foreach (explode("\n", $wrapped) as $line) {
+    $display -> feed();
+    $display -> text($line);
+    usleep(500000);
+}
+
+// Finish by showing "Hello World"
+$display -> clear();
+$display -> text("Hello World\n");
+
+// Dont forget to close the device
+$display -> close();

+ 171 - 0
vendor/mike42/escpos-php/example/demo.php

@@ -0,0 +1,171 @@
+<?php
+/**
+ * This is a demo script for the functions of the PHP ESC/POS print driver,
+ * Escpos.php.
+ *
+ * Most printers implement only a subset of the functionality of the driver, so
+ * will not render this output correctly in all cases.
+ *
+ * @author Michael Billington <michael.billington@gmail.com>
+ */
+require __DIR__ . '/../vendor/autoload.php';
+use Mike42\Escpos\Printer;
+use Mike42\Escpos\PrintConnectors\FilePrintConnector;
+use Mike42\Escpos\EscposImage;
+
+$connector = new FilePrintConnector("php://stdout");
+$printer = new Printer($connector);
+
+/* Initialize */
+$printer -> initialize();
+
+/* Text */
+$printer -> text("Hello world\n");
+$printer -> cut();
+
+/* Line feeds */
+$printer -> text("ABC");
+$printer -> feed(7);
+$printer -> text("DEF");
+$printer -> feedReverse(3);
+$printer -> text("GHI");
+$printer -> feed();
+$printer -> cut();
+
+/* Font modes */
+$modes = array(
+    Printer::MODE_FONT_B,
+    Printer::MODE_EMPHASIZED,
+    Printer::MODE_DOUBLE_HEIGHT,
+    Printer::MODE_DOUBLE_WIDTH,
+    Printer::MODE_UNDERLINE);
+for ($i = 0; $i < pow(2, count($modes)); $i++) {
+    $bits = str_pad(decbin($i), count($modes), "0", STR_PAD_LEFT);
+    $mode = 0;
+    for ($j = 0; $j < strlen($bits); $j++) {
+        if (substr($bits, $j, 1) == "1") {
+            $mode |= $modes[$j];
+        }
+    }
+    $printer -> selectPrintMode($mode);
+    $printer -> text("ABCDEFGHIJabcdefghijk\n");
+}
+$printer -> selectPrintMode(); // Reset
+$printer -> cut();
+
+/* Underline */
+for ($i = 0; $i < 3; $i++) {
+    $printer -> setUnderline($i);
+    $printer -> text("The quick brown fox jumps over the lazy dog\n");
+}
+$printer -> setUnderline(0); // Reset
+$printer -> cut();
+
+/* Cuts */
+$printer -> text("Partial cut\n(not available on all printers)\n");
+$printer -> cut(Printer::CUT_PARTIAL);
+$printer -> text("Full cut\n");
+$printer -> cut(Printer::CUT_FULL);
+
+/* Emphasis */
+for ($i = 0; $i < 2; $i++) {
+    $printer -> setEmphasis($i == 1);
+    $printer -> text("The quick brown fox jumps over the lazy dog\n");
+}
+$printer -> setEmphasis(false); // Reset
+$printer -> cut();
+
+/* Double-strike (looks basically the same as emphasis) */
+for ($i = 0; $i < 2; $i++) {
+    $printer -> setDoubleStrike($i == 1);
+    $printer -> text("The quick brown fox jumps over the lazy dog\n");
+}
+$printer -> setDoubleStrike(false);
+$printer -> cut();
+
+/* Fonts (many printers do not have a 'Font C') */
+$fonts = array(
+    Printer::FONT_A,
+    Printer::FONT_B,
+    Printer::FONT_C);
+for ($i = 0; $i < count($fonts); $i++) {
+    $printer -> setFont($fonts[$i]);
+    $printer -> text("The quick brown fox jumps over the lazy dog\n");
+}
+$printer -> setFont(); // Reset
+$printer -> cut();
+
+/* Justification */
+$justification = array(
+    Printer::JUSTIFY_LEFT,
+    Printer::JUSTIFY_CENTER,
+    Printer::JUSTIFY_RIGHT);
+for ($i = 0; $i < count($justification); $i++) {
+    $printer -> setJustification($justification[$i]);
+    $printer -> text("A man a plan a canal panama\n");
+}
+$printer -> setJustification(); // Reset
+$printer -> cut();
+
+/* Barcodes - see barcode.php for more detail */
+$printer -> setBarcodeHeight(80);
+$printer->setBarcodeTextPosition(Printer::BARCODE_TEXT_BELOW);
+$printer -> barcode("9876");
+$printer -> feed();
+$printer -> cut();
+
+/* Graphics - this demo will not work on some non-Epson printers */
+try {
+    $logo = EscposImage::load("resources/escpos-php.png", false);
+    $imgModes = array(
+        Printer::IMG_DEFAULT,
+        Printer::IMG_DOUBLE_WIDTH,
+        Printer::IMG_DOUBLE_HEIGHT,
+        Printer::IMG_DOUBLE_WIDTH | Printer::IMG_DOUBLE_HEIGHT
+    );
+    foreach ($imgModes as $mode) {
+        $printer -> graphics($logo, $mode);
+    }
+} catch (Exception $e) {
+    /* Images not supported on your PHP, or image file not found */
+    $printer -> text($e -> getMessage() . "\n");
+}
+$printer -> cut();
+
+/* Bit image */
+try {
+    $logo = EscposImage::load("resources/escpos-php.png", false);
+    $imgModes = array(
+        Printer::IMG_DEFAULT,
+        Printer::IMG_DOUBLE_WIDTH,
+        Printer::IMG_DOUBLE_HEIGHT,
+        Printer::IMG_DOUBLE_WIDTH | Printer::IMG_DOUBLE_HEIGHT
+    );
+    foreach ($imgModes as $mode) {
+        $printer -> bitImage($logo, $mode);
+    }
+} catch (Exception $e) {
+    /* Images not supported on your PHP, or image file not found */
+    $printer -> text($e -> getMessage() . "\n");
+}
+$printer -> cut();
+
+/* QR Code - see also the more in-depth demo at qr-code.php */
+$testStr = "Testing 123";
+$models = array(
+    Printer::QR_MODEL_1 => "QR Model 1",
+    Printer::QR_MODEL_2 => "QR Model 2 (default)",
+    Printer::QR_MICRO => "Micro QR code\n(not supported on all printers)");
+foreach ($models as $model => $name) {
+    $printer -> qrCode($testStr, Printer::QR_ECLEVEL_L, 3, $model);
+    $printer -> text("$name\n");
+    $printer -> feed();
+}
+$printer -> cut();
+
+/* Pulse */
+$printer -> pulse();
+
+/* Always close the printer! On some PrintConnectors, no actual
+ * data is sent until the printer is closed. */
+$printer -> close();

+ 36 - 0
vendor/mike42/escpos-php/example/graphics.php

@@ -0,0 +1,36 @@
+<?php
+/* Print-outs using the newer graphics print command */
+
+require __DIR__ . '/../vendor/autoload.php';
+use Mike42\Escpos\Printer;
+use Mike42\Escpos\EscposImage;
+use Mike42\Escpos\PrintConnectors\FilePrintConnector;
+
+$connector = new FilePrintConnector("php://stdout");
+$printer = new Printer($connector);
+
+try {
+    $tux = EscposImage::load("resources/tux.png", false);
+    
+    $printer -> graphics($tux);
+    $printer -> text("Regular Tux.\n");
+    $printer -> feed();
+    
+    $printer -> graphics($tux, Printer::IMG_DOUBLE_WIDTH);
+    $printer -> text("Wide Tux.\n");
+    $printer -> feed();
+    
+    $printer -> graphics($tux, Printer::IMG_DOUBLE_HEIGHT);
+    $printer -> text("Tall Tux.\n");
+    $printer -> feed();
+    
+    $printer -> graphics($tux, Printer::IMG_DOUBLE_WIDTH | Printer::IMG_DOUBLE_HEIGHT);
+    $printer -> text("Large Tux in correct proportion.\n");
+    
+    $printer -> cut();
+} catch (Exception $e) {
+    /* Images not supported on your PHP, or image file not found */
+    $printer -> text($e -> getMessage() . "\n");
+}
+
+$printer -> close();

+ 8 - 0
vendor/mike42/escpos-php/example/interface/README.md

@@ -0,0 +1,8 @@
+Interfaces
+----------
+This directory contains boilerpalte code to show you how to open a print connector
+to printers which are connected in different ways.
+
+To get a list of supported interfaces and operating systems, see the main README.md file for the project.
+
+If you have a printer interface with no example, and you want to help put one together, then please lodge a request on the bug tracker: https://github.com/mike42/escpos-php/issues

+ 19 - 0
vendor/mike42/escpos-php/example/interface/cups.php

@@ -0,0 +1,19 @@
+<?php
+/* Change to the correct path if you copy this example! */
+require __DIR__ . '/../../vendor/autoload.php';
+use Mike42\Escpos\Printer;
+use Mike42\Escpos\PrintConnectors\CupsPrintConnector;
+
+try {
+    $connector = new CupsPrintConnector("EPSON_TM-T20");
+    
+    /* Print a "Hello world" receipt" */
+    $printer = new Printer($connector);
+    $printer -> text("Hello World!\n");
+    $printer -> cut();
+    
+    /* Close printer */
+    $printer -> close();
+} catch (Exception $e) {
+    echo "Couldn't print to this printer: " . $e -> getMessage() . "\n";
+}

+ 22 - 0
vendor/mike42/escpos-php/example/interface/ethernet.php

@@ -0,0 +1,22 @@
+<?php
+/* Change to the correct path if you copy this example! */
+require __DIR__ . '/../../vendor/autoload.php';
+use Mike42\Escpos\Printer;
+use Mike42\Escpos\PrintConnectors\NetworkPrintConnector;
+
+/* Most printers are open on port 9100, so you just need to know the IP 
+ * address of your receipt printer, and then fsockopen() it on that port.
+ */
+try {
+    $connector = new NetworkPrintConnector("10.x.x.x", 9100);
+    
+    /* Print a "Hello world" receipt" */
+    $printer = new Printer($connector);
+    $printer -> text("Hello World!\n");
+    $printer -> cut();
+    
+    /* Close printer */
+    $printer -> close();
+} catch (Exception $e) {
+    echo "Couldn't print to this printer: " . $e -> getMessage() . "\n";
+}

+ 33 - 0
vendor/mike42/escpos-php/example/interface/linux-usb.php

@@ -0,0 +1,33 @@
+<?php
+/* Change to the correct path if you copy this example! */
+require __DIR__ . '/../../vendor/autoload.php';
+use Mike42\Escpos\Printer;
+use Mike42\Escpos\PrintConnectors\FilePrintConnector;
+
+/**
+ * On Linux, use the usblp module to make your printer available as a device
+ * file. This is generally the default behaviour if you don't install any
+ * vendor drivers.
+ *
+ * Once this is done, use a FilePrintConnector to open the device.
+ *
+ * Troubleshooting: On Debian, you must be in the lp group to access this file.
+ * dmesg to see what happens when you plug in your printer to make sure no
+ * other drivers are unloading the module.
+ */
+try {
+    // Enter the device file for your USB printer here
+    $connector = new FilePrintConnector("/dev/usb/lp0");
+    //$connector = new FilePrintConnector("/dev/usb/lp1");
+    //$connector = new FilePrintConnector("/dev/usb/lp2");
+
+    /* Print a "Hello world" receipt" */
+    $printer = new Printer($connector);
+    $printer -> text("Hello World!\n");
+    $printer -> cut();
+
+    /* Close printer */
+    $printer -> close();
+} catch (Exception $e) {
+    echo "Couldn't print to this printer: " . $e -> getMessage() . "\n";
+}

+ 52 - 0
vendor/mike42/escpos-php/example/interface/smb.php

@@ -0,0 +1,52 @@
+<?php
+/* Change to the correct path if you copy this example! */
+require __DIR__ . '/../../vendor/autoload.php';
+use Mike42\Escpos\Printer;
+use Mike42\Escpos\PrintConnectors\WindowsPrintConnector;
+
+/**
+ * Install the printer using USB printing support, and the "Generic / Text Only" driver,
+ * then share it.
+ *
+ * Use a WindowsPrintConnector with the share name to print. This works on either
+ * Windows or Linux.
+ *
+ * Troubleshooting: Fire up a command prompt/terminal, and ensure that (if your printer is
+ * shared as "Receipt Printer"), the following commands work.
+ *
+ * Windows: (use an appropriate "net use" command if you need authentication)
+ *  echo "Hello World" > testfile
+ *  ## If you need authentication, use "net use" to hook up the printer:
+ *  # net use "\\computername\Receipt Printer" /user:Guest
+ *  # net use "\\computername\Receipt Printer" /user:Bob secret
+ *  # net use "\\computername\Receipt Printer" /user:workgroup\Bob secret
+ *  copy testfile "\\computername\Receipt Printer"
+ *  del testfile
+ *
+ * GNU/Linux:
+ *  # No authentication
+ *  echo "Hello World" | smbclient "//computername/Receipt Printer" -c "print -" -N
+ *  # Guest login
+ *  echo "Hello World" | smbclient "//computername/Receipt Printer" -U Guest -c "print -" -N
+ *  # Basic username/password
+ *  echo "Hello World" | smbclient "//computername/Receipt Printer" secret -U "Bob" -c "print -"
+ *  # Including domain name
+ *  echo "Hello World" | smbclient "//computername/Receipt Printer" secret -U "workgroup\\Bob" -c "print -"
+ */
+try {
+    // Enter the share name for your printer here, as a smb:// url format
+    $connector = new WindowsPrintConnector("smb://computername/Receipt Printer");
+    //$connector = new WindowsPrintConnector("smb://Guest@computername/Receipt Printer");
+    //$connector = new WindowsPrintConnector("smb://FooUser:secret@computername/workgroup/Receipt Printer");
+    //$connector = new WindowsPrintConnector("smb://User:secret@computername/Receipt Printer");
+    
+    /* Print a "Hello world" receipt" */
+    $printer = new Printer($connector);
+    $printer -> text("Hello World!\n");
+    $printer -> cut();
+    
+    /* Close printer */
+    $printer -> close();
+} catch (Exception $e) {
+    echo "Couldn't print to this printer: " . $e -> getMessage() . "\n";
+}

+ 31 - 0
vendor/mike42/escpos-php/example/interface/windows-lpt.php

@@ -0,0 +1,31 @@
+<?php
+/* Change to the correct path if you copy this example! */
+require __DIR__ . '/../../vendor/autoload.php';
+use Mike42\Escpos\Printer;
+use Mike42\Escpos\PrintConnectors\WindowsPrintConnector;
+
+/**
+ * Assuming your printer is available at LPT1,
+ * simpy instantiate a WindowsPrintConnector to it.
+ *
+ * When troubleshooting, make sure you can send it
+ * data from the command-line first:
+ *  echo "Hello World" > LPT1
+ */
+try {
+    $connector = new WindowsPrintConnector("LPT1");
+    
+    // A FilePrintConnector will also work, but on non-Windows systems, writes
+    // to an actual file called 'LPT1' rather than giving a useful error.
+    // $connector = new FilePrintConnector("LPT1");
+
+    /* Print a "Hello world" receipt" */
+    $printer = new Printer($connector);
+    $printer -> text("Hello World!\n");
+    $printer -> cut();
+
+    /* Close printer */
+    $printer -> close();
+} catch (Exception $e) {
+    echo "Couldn't print to this printer: " . $e -> getMessage() . "\n";
+}

+ 34 - 0
vendor/mike42/escpos-php/example/interface/windows-usb.php

@@ -0,0 +1,34 @@
+<?php
+/* Change to the correct path if you copy this example! */
+require __DIR__ . '/../../vendor/autoload.php';
+use Mike42\Escpos\Printer;
+use Mike42\Escpos\PrintConnectors\WindowsPrintConnector;
+
+/**
+ * Install the printer using USB printing support, and the "Generic / Text Only" driver,
+ * then share it (you can use a firewall so that it can only be seen locally).
+ *
+ * Use a WindowsPrintConnector with the share name to print.
+ *
+ * Troubleshooting: Fire up a command prompt, and ensure that (if your printer is shared as
+ * "Receipt Printer), the following commands work:
+ *
+ *  echo "Hello World" > testfile
+ *  copy testfile "\\%COMPUTERNAME%\Receipt Printer"
+ *  del testfile
+ */
+try {
+    // Enter the share name for your USB printer here
+    $connector = null;
+    //$connector = new WindowsPrintConnector("Receipt Printer");
+
+    /* Print a "Hello world" receipt" */
+    $printer = new Printer($connector);
+    $printer -> text("Hello World!\n");
+    $printer -> cut();
+    
+    /* Close printer */
+    $printer -> close();
+} catch (Exception $e) {
+    echo "Couldn't print to this printer: " . $e -> getMessage() . "\n";
+}

+ 48 - 0
vendor/mike42/escpos-php/example/margins-and-spacing.php

@@ -0,0 +1,48 @@
+<?php
+/* Left margin & page width demo. */
+require __DIR__ . '/../vendor/autoload.php';
+use Mike42\Escpos\Printer;
+use Mike42\Escpos\PrintConnectors\FilePrintConnector;
+
+$connector = new FilePrintConnector("php://stdout"); // Add connector for your printer here.
+$printer = new Printer($connector);
+
+/* Line spacing */
+/*
+$printer -> setEmphasis(true);
+$printer -> text("Line spacing\n");
+$printer -> setEmphasis(false);
+foreach(array(16, 32, 64, 128, 255) as $spacing) {
+    $printer -> setLineSpacing($spacing);
+    $printer -> text("Spacing $spacing: The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.\n");
+}
+$printer -> setLineSpacing(); // Back to default
+*/
+
+/* Stuff around with left margin */
+$printer -> setEmphasis(true);
+$printer -> text("Left margin\n");
+$printer -> setEmphasis(false);
+$printer -> text("Default left\n");
+foreach(array(1, 2, 4, 8, 16, 32, 64, 128, 256, 512) as $margin) {
+    $printer -> setPrintLeftMargin($margin);
+    $printer -> text("left margin $margin\n");
+}
+/* Reset left */
+$printer -> setPrintLeftMargin(0);
+
+/* Stuff around with page width */
+$printer -> setEmphasis(true);
+$printer -> text("Page width\n");
+$printer -> setEmphasis(false);
+$printer -> setJustification(Printer::JUSTIFY_RIGHT);
+$printer -> text("Default width\n");
+foreach(array(512, 256, 128, 64) as $width) {
+    $printer -> setPrintWidth($width);
+    $printer -> text("page width $width\n");
+}
+
+/* Printer shutdown */
+$printer -> cut();
+$printer -> close();
+

+ 95 - 0
vendor/mike42/escpos-php/example/pdf417-code.php

@@ -0,0 +1,95 @@
+<?php
+/* Demonstration of available options on the pdf417Code() command */
+require __DIR__ . '/../vendor/autoload.php';
+use Mike42\Escpos\Printer;
+use Mike42\Escpos\PrintConnectors\FilePrintConnector;
+
+$connector = new FilePrintConnector("php://stdout");
+$printer = new Printer($connector);
+
+// Most simple example
+title($printer, "PDF417 code demo\n");
+$testStr = "Testing 123";
+$printer -> pdf417Code($testStr);
+$printer -> text("Most simple example\n");
+$printer -> feed();
+
+// Demo that alignment is the same as text
+$printer -> setJustification(Printer::JUSTIFY_CENTER);
+$printer -> pdf417Code($testStr, 3, 3, 2);
+$printer -> text("Same content, narrow and centred\n");
+$printer -> setJustification();
+$printer -> feed();
+
+// Demo of error correction
+title($printer, "Error correction\n");
+$ec = array(0.1, 0.5, 1.0, 2.0, 4.0);
+foreach ($ec as $level) {
+    $printer -> pdf417Code($testStr, 3, 3, 0, $level);
+    $printer -> text("Error correction ratio $level\n");
+    $printer -> feed();
+}
+
+// Change size
+title($printer, "Pixel size\n");
+$sizes = array(
+    2 => "(minimum)",
+    3 => "(default)",
+    4 => "",
+    8 => "(maximum)");
+foreach ($sizes as $size => $label) {
+    $printer -> pdf417Code($testStr, $size);
+    $printer -> text("Module width $size dots $label\n");
+    $printer -> feed();
+}
+
+// Change height
+title($printer, "Height multiplier\n");
+$sizes = array(
+    2 => "(minimum)",
+    3 => "(default)",
+    4 => "",
+    8 => "(maximum)");
+foreach ($sizes as $size => $label) {
+    $printer -> pdf417Code($testStr, 3, $size);
+    $printer -> text("Height multiplier $size $label\n");
+    $printer -> feed();
+}
+
+// Chage data column count
+title($printer, "Data column count\n");
+$columnCounts = array(
+    0 => "(auto, default)",
+    1 => "",
+    2 => "",
+    3 => "",
+    4 => "",
+    5 => "",
+    30 => "(maximum, doesnt fit!)");
+foreach ($columnCounts as $columnCount => $label) {
+    $printer -> pdf417Code($testStr, 3, 3, $columnCount);
+    $printer -> text("Column count $columnCount $label\n");
+    $printer -> feed();
+}
+
+// Change options
+title($printer, "Options\n");
+$models = array(
+    Printer::PDF417_STANDARD => "Standard",
+    Printer::PDF417_TRUNCATED => "Truncated");
+foreach ($models as $model => $name) {
+    $printer -> pdf417Code($testStr, 3, 3, 0, 0.10, $model);
+    $printer -> text("$name\n");
+    $printer -> feed();
+}
+
+// Cut & close
+$printer -> cut();
+$printer -> close();
+
+function title(Printer $printer, $str)
+{
+    $printer -> selectPrintMode(Printer::MODE_DOUBLE_HEIGHT | Printer::MODE_DOUBLE_WIDTH);
+    $printer -> text($str);
+    $printer -> selectPrintMode();
+}

+ 86 - 0
vendor/mike42/escpos-php/example/print-from-html.php

@@ -0,0 +1,86 @@
+<?php
+require __DIR__ . '/../vendor/autoload.php';
+use Mike42\Escpos\Printer;
+use Mike42\Escpos\EscposImage;
+use Mike42\Escpos\PrintConnectors\FilePrintConnector;
+
+$connector = new FilePrintConnector("php://stdout"); // Add connector for your printer here.
+$printer = new Printer($connector);
+
+/*
+ * Due to its complxity, escpos-php does not support HTML input. To print HTML,
+ * either convert it to calls on the Printer() object, or rasterise the page with
+ * wkhtmltopdf, an external package which is designed to handle HTML efficiently.
+ *
+ * This example is provided to get you started: On Debian, first run-
+ * 
+ * sudo apt-get install wkhtmltopdf xvfb
+ *
+ * Note: Depending on the height of your pages, it is suggested that you chop it
+ * into smaller sections, as printers simply don't have the buffer capacity for
+ * very large images.
+ *
+ * As always, you can trade off quality for capacity by halving the width
+ * (550 -> 225 below) and printing w/ Escpos::IMG_DOUBLE_WIDTH | Escpos::IMG_DOUBLE_HEIGHT
+ */
+try {
+    /* Set up command */
+    $source = __DIR__ . "/resources/document.html";
+    $width = 550;
+    $dest = tempnam(sys_get_temp_dir(), 'escpos') . ".png";
+    $command = sprintf(
+        "xvfb-run wkhtmltoimage -n -q --width %s %s %s",
+        escapeshellarg($width),
+        escapeshellarg($source),
+        escapeshellarg($dest)
+    );
+
+    /* Test for dependencies */
+    foreach (array("xvfb-run", "wkhtmltoimage") as $cmd) {
+        $testCmd = sprintf("which %s", escapeshellarg($cmd));
+        exec($testCmd, $testOut, $testStatus);
+        if ($testStatus != 0) {
+            throw new Exception("You require $cmd but it could not be found");
+        }
+    }
+
+    
+    /* Run wkhtmltoimage */
+    $descriptors = array(
+            1 => array("pipe", "w"),
+            2 => array("pipe", "w"),
+    );
+    $process = proc_open($command, $descriptors, $fd);
+    if (is_resource($process)) {
+        /* Read stdout */
+        $outputStr = stream_get_contents($fd[1]);
+        fclose($fd[1]);
+        /* Read stderr */
+        $errorStr = stream_get_contents($fd[2]);
+        fclose($fd[2]);
+        /* Finish up */
+        $retval = proc_close($process);
+        if ($retval != 0) {
+            throw new Exception("Command $cmd failed: $outputStr $errorStr");
+        }
+    } else {
+        throw new Exception("Command '$cmd' failed to start.");
+    }
+
+    /* Load up the image */
+    try {
+        $img = EscposImage::load($dest);
+    } catch (Exception $e) {
+        unlink($dest);
+        throw $e;
+    }
+    unlink($dest);
+
+    /* Print it */
+    $printer -> bitImage($img); // bitImage() seems to allow larger images than graphics() on the TM-T20. bitImageColumnFormat() is another option.
+    $printer -> cut();
+} catch (Exception $e) {
+    echo $e -> getMessage();
+} finally {
+    $printer -> close();
+}

+ 78 - 0
vendor/mike42/escpos-php/example/print-from-pdf.php

@@ -0,0 +1,78 @@
+<?php
+require __DIR__ . '/../vendor/autoload.php';
+use Mike42\Escpos\Printer;
+use Mike42\Escpos\ImagickEscposImage;
+use Mike42\Escpos\PrintConnectors\FilePrintConnector;
+
+/*
+ * This is three examples in one:
+ *  1: Print an entire PDF, normal quality.
+ *  2: Print at a lower quality for speed increase (CPU & transfer)
+ *  3: Cache rendered documents for a speed increase (removes CPU image processing completely on subsequent prints)
+ */
+
+/* 1: Print an entire PDF, start-to-finish (shorter form of the example) */
+$pdf = 'resources/document.pdf';
+$connector = new FilePrintConnector("php://stdout");
+$printer = new Printer($connector);
+try {
+    $pages = ImagickEscposImage::loadPdf($pdf);
+    foreach ($pages as $page) {
+        $printer -> graphics($page);
+    }
+    $printer -> cut();
+} catch (Exception $e) {
+    /*
+	 * loadPdf() throws exceptions if files or not found, or you don't have the
+	 * imagick extension to read PDF's
+	 */
+    echo $e -> getMessage() . "\n";
+} finally {
+    $printer -> close();
+}
+
+
+/*
+ * 2: Speed up printing by roughly halving the resolution, and printing double-size.
+ * This gives a 75% speed increase at the expense of some quality.
+ * 
+ * Reduce the page width further if necessary: if it extends past the printing area, your prints will be very slow.
+ */
+$connector = new FilePrintConnector("php://stdout");
+$printer = new Printer($connector);
+$pdf = 'resources/document.pdf';
+$pages = ImagickEscposImage::loadPdf($pdf, 260);
+foreach ($pages as $page) {
+    $printer -> graphics($page, Printer::IMG_DOUBLE_HEIGHT | Printer::IMG_DOUBLE_WIDTH);
+}
+$printer -> cut();
+$printer -> close();
+
+/*
+ * 3: PDF printing still too slow? If you regularly print the same files, serialize & compress your
+ * EscposImage objects (after printing[1]), instead of throwing them away.
+ * 
+ * (You can also do this to print logos on computers which don't have an
+ * image processing library, by preparing a serialized version of your logo on your PC)
+ * 
+ * [1]After printing, the pixels are loaded and formatted for the print command you used, so even a raspberry pi can print complex PDF's quickly.
+ */
+$connector = new FilePrintConnector("php://stdout");
+$printer = new Printer($connector);
+$pdf = 'resources/document.pdf';
+$ser = 'resources/document.z';
+if (!file_exists($ser)) {
+    $pages = ImagickEscposImage::loadPdf($pdf);
+} else {
+    $pages = unserialize(gzuncompress(file_get_contents($ser)));
+}
+
+foreach ($pages as $page) {
+    $printer -> graphics($page);
+}
+$printer -> cut();
+$printer -> close();
+
+if (!file_exists($ser)) {
+    file_put_contents($ser, gzcompress(serialize($pages)));
+}

+ 86 - 0
vendor/mike42/escpos-php/example/qr-code.php

@@ -0,0 +1,86 @@
+<?php
+/* Demonstration of available options on the qrCode() command */
+require __DIR__ . '/../vendor/autoload.php';
+use Mike42\Escpos\Printer;
+use Mike42\Escpos\PrintConnectors\FilePrintConnector;
+
+$connector = new FilePrintConnector("php://stdout");
+$printer = new Printer($connector);
+
+// Most simple example
+title($printer, "QR code demo\n");
+$testStr = "Testing 123";
+$printer -> qrCode($testStr);
+$printer -> text("Most simple example\n");
+$printer -> feed();
+
+// Demo that alignment is the same as text
+$printer -> setJustification(Printer::JUSTIFY_CENTER);
+$printer -> qrCode($testStr);
+$printer -> text("Same example, centred\n");
+$printer -> setJustification();
+$printer -> feed();
+    
+// Demo of numeric data being packed more densly
+title($printer, "Data encoding\n");
+$test = array(
+    "Numeric"      => "0123456789012345678901234567890123456789",
+    "Alphanumeric" => "abcdefghijklmnopqrstuvwxyzabcdefghijklmn",
+    "Binary"       => str_repeat("\0", 40));
+foreach ($test as $type => $data) {
+    $printer -> qrCode($data);
+    $printer -> text("$type\n");
+    $printer -> feed();
+}
+
+// Demo of error correction
+title($printer, "Error correction\n");
+$ec = array(
+    Printer::QR_ECLEVEL_L => "L",
+    Printer::QR_ECLEVEL_M => "M",
+    Printer::QR_ECLEVEL_Q => "Q",
+    Printer::QR_ECLEVEL_H => "H");
+foreach ($ec as $level => $name) {
+    $printer -> qrCode($testStr, $level);
+    $printer -> text("Error correction $name\n");
+    $printer -> feed();
+}
+
+// Change size
+title($printer, "Pixel size\n");
+$sizes = array(
+    1 => "(minimum)",
+    2 => "",
+    3 => "(default)",
+    4 => "",
+    5 => "",
+    10 => "",
+    16 => "(maximum)");
+foreach ($sizes as $size => $label) {
+    $printer -> qrCode($testStr, Printer::QR_ECLEVEL_L, $size);
+    $printer -> text("Pixel size $size $label\n");
+    $printer -> feed();
+}
+
+// Change model
+title($printer, "QR model\n");
+$models = array(
+    Printer::QR_MODEL_1 => "QR Model 1",
+    Printer::QR_MODEL_2 => "QR Model 2 (default)",
+    Printer::QR_MICRO => "Micro QR code\n(not supported on all printers)");
+foreach ($models as $model => $name) {
+    $printer -> qrCode($testStr, Printer::QR_ECLEVEL_L, 3, $model);
+    $printer -> text("$name\n");
+    $printer -> feed();
+}
+
+// Cut & close
+$printer -> cut();
+$printer -> close();
+
+function title(Printer $printer, $str)
+{
+    $printer -> selectPrintMode(Printer::MODE_DOUBLE_HEIGHT | Printer::MODE_DOUBLE_WIDTH);
+    $printer -> text($str);
+    $printer -> selectPrintMode();
+}

+ 76 - 0
vendor/mike42/escpos-php/example/rawbt-receipt.html

@@ -0,0 +1,76 @@
+<!DOCTYPE html>
+<html lang="ru">
+<head>
+    <meta charset="UTF-8">
+    <title>RawBT Integration Demo</title>
+    <meta content="width=device-width, initial-scale=1" name="viewport">
+    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
+    <style>
+        html {
+            background-color: grey;
+            padding: 32px;
+        }
+
+        body {
+            max-width: 640px;
+            margin: 0 auto;
+            padding: 32px;
+            background-color: white;
+        }
+
+        button {
+            background-color: #6e89ff;
+            color: white;
+            padding: 16px;
+            border: none;
+        }
+
+        pre {
+            background-color: #f0f0f0;
+            border-left: #6e89ff solid 3px
+        }
+
+        p {
+            text-align: right;
+        }
+
+        a {
+            color: #6e89ff;
+            text-decoration: none;
+        }
+        a:before{
+            content: '\1F855';
+            margin-right:4px;
+        }
+    </style>
+    <script>
+        // for php demo call
+        function ajax_print(url, btn) {
+            b = $(btn);
+            b.attr('data-old', b.text());
+            b.text('wait');
+            $.get(url, function (data) {
+                window.location.href = data;  // main action
+            }).fail(function () {
+                alert("ajax error");
+            }).always(function () {
+                b.text(b.attr('data-old'));
+            })
+        }
+    </script>
+
+</head>
+<body>
+<img src="resources/rawbtlogo.png" alt="black & white picture">
+<h1>RawBT Integration Demo</h1>
+<pre>
+
+    window.location.href = ajax_backend_data;
+
+</pre>
+<br/>
+<button onclick="ajax_print('rawbt-receipt.php',this)">RECEIPT</button>
+
+<p><a href="https://rawbt.ru/">Visit RawBT site</a></p>
+</body>
+</html>

+ 145 - 0
vendor/mike42/escpos-php/example/rawbt-receipt.php

@@ -0,0 +1,145 @@
+<?php
+require __DIR__ . '/../autoload.php';
+
+use Mike42\Escpos\Printer;
+use Mike42\Escpos\EscposImage;
+use Mike42\Escpos\PrintConnectors\RawbtPrintConnector;
+use Mike42\Escpos\CapabilityProfile;
+
+try {
+    $profile = CapabilityProfile::load("POS-5890");
+
+    /* Fill in your own connector here */
+    $connector = new RawbtPrintConnector();
+
+    /* Information for the receipt */
+    $items = array(
+        new item("Example item #1", "4.00"),
+        new item("Another thing", "3.50"),
+        new item("Something else", "1.00"),
+        new item("A final item", "4.45"),
+    );
+    $subtotal = new item('Subtotal', '12.95');
+    $tax = new item('A local tax', '1.30');
+    $total = new item('Total', '14.25', true);
+    /* Date is kept the same for testing */
+// $date = date('l jS \of F Y h:i:s A');
+    $date = "Monday 6th of April 2015 02:56:25 PM";
+
+    /* Start the printer */
+    $logo = EscposImage::load("resources/rawbtlogo.png", false);
+    $printer = new Printer($connector, $profile);
+
+
+    /* Print top logo */
+    if ($profile->getSupportsGraphics()) {
+        $printer->graphics($logo);
+    }
+    if ($profile->getSupportsBitImageRaster() && !$profile->getSupportsGraphics()) {
+        $printer->bitImage($logo);
+    }
+
+    /* Name of shop */
+    $printer->setJustification(Printer::JUSTIFY_CENTER);
+    $printer->selectPrintMode(Printer::MODE_DOUBLE_WIDTH);
+    $printer->text("ExampleMart Ltd.\n");
+    $printer->selectPrintMode();
+    $printer->text("Shop No. 42.\n");
+    $printer->feed();
+
+
+    /* Title of receipt */
+    $printer->setEmphasis(true);
+    $printer->text("SALES INVOICE\n");
+    $printer->setEmphasis(false);
+
+    /* Items */
+    $printer->setJustification(Printer::JUSTIFY_LEFT);
+    $printer->setEmphasis(true);
+    $printer->text(new item('', '$'));
+    $printer->setEmphasis(false);
+    foreach ($items as $item) {
+        $printer->text($item->getAsString(32)); // for 58mm Font A
+    }
+    $printer->setEmphasis(true);
+    $printer->text($subtotal->getAsString(32));
+    $printer->setEmphasis(false);
+    $printer->feed();
+
+    /* Tax and total */
+    $printer->text($tax->getAsString(32));
+    $printer->selectPrintMode(Printer::MODE_DOUBLE_WIDTH);
+    $printer->text($total->getAsString(32));
+    $printer->selectPrintMode();
+
+    /* Footer */
+    $printer->feed(2);
+    $printer->setJustification(Printer::JUSTIFY_CENTER);
+    $printer->text("Thank you for shopping\n");
+    $printer->text("at ExampleMart\n");
+    $printer->text("For trading hours,\n");
+    $printer->text("please visit example.com\n");
+    $printer->feed(2);
+    $printer->text($date . "\n");
+
+    /* Barcode Default look */
+
+    $printer->barcode("ABC", Printer::BARCODE_CODE39);
+    $printer->feed();
+    $printer->feed();
+
+
+// Demo that alignment QRcode is the same as text
+    $printer2 = new Printer($connector); // dirty printer profile hack !!
+    $printer2->setJustification(Printer::JUSTIFY_CENTER);
+    $printer2->qrCode("https://rawbt.ru/mike42", Printer::QR_ECLEVEL_M, 8);
+    $printer2->text("rawbt.ru/mike42\n");
+    $printer2->setJustification();
+    $printer2->feed();
+
+
+    /* Cut the receipt and open the cash drawer */
+    $printer->cut();
+    $printer->pulse();
+
+} catch (Exception $e) {
+    echo $e->getMessage();
+} finally {
+    $printer->close();
+}
+
+/* A wrapper to do organise item names & prices into columns */
+
+class item
+{
+    private $name;
+    private $price;
+    private $dollarSign;
+
+    public function __construct($name = '', $price = '', $dollarSign = false)
+    {
+        $this->name = $name;
+        $this->price = $price;
+        $this->dollarSign = $dollarSign;
+    }
+
+    public function getAsString($width = 48)
+    {
+        $rightCols = 10;
+        $leftCols = $width - $rightCols;
+        if ($this->dollarSign) {
+            $leftCols = $leftCols / 2 - $rightCols / 2;
+        }
+        $left = str_pad($this->name, $leftCols);
+
+        $sign = ($this->dollarSign ? '$ ' : '');
+        $right = str_pad($sign . $this->price, $rightCols, ' ', STR_PAD_LEFT);
+        return "$left$right\n";
+    }
+
+    public function __toString()
+    {
+        return $this->getAsString();
+    }
+
+}

+ 104 - 0
vendor/mike42/escpos-php/example/receipt-with-logo.php

@@ -0,0 +1,104 @@
+<?php
+require __DIR__ . '/../vendor/autoload.php';
+use Mike42\Escpos\Printer;
+use Mike42\Escpos\EscposImage;
+use Mike42\Escpos\PrintConnectors\FilePrintConnector;
+
+/* Fill in your own connector here */
+$connector = new FilePrintConnector("php://stdout");
+
+/* Information for the receipt */
+$items = array(
+    new item("Example item #1", "4.00"),
+    new item("Another thing", "3.50"),
+    new item("Something else", "1.00"),
+    new item("A final item", "4.45"),
+);
+$subtotal = new item('Subtotal', '12.95');
+$tax = new item('A local tax', '1.30');
+$total = new item('Total', '14.25', true);
+/* Date is kept the same for testing */
+// $date = date('l jS \of F Y h:i:s A');
+$date = "Monday 6th of April 2015 02:56:25 PM";
+
+/* Start the printer */
+$logo = EscposImage::load("resources/escpos-php.png", false);
+$printer = new Printer($connector);
+
+/* Print top logo */
+$printer -> setJustification(Printer::JUSTIFY_CENTER);
+$printer -> graphics($logo);
+
+/* Name of shop */
+$printer -> selectPrintMode(Printer::MODE_DOUBLE_WIDTH);
+$printer -> text("ExampleMart Ltd.\n");
+$printer -> selectPrintMode();
+$printer -> text("Shop No. 42.\n");
+$printer -> feed();
+
+/* Title of receipt */
+$printer -> setEmphasis(true);
+$printer -> text("SALES INVOICE\n");
+$printer -> setEmphasis(false);
+
+/* Items */
+$printer -> setJustification(Printer::JUSTIFY_LEFT);
+$printer -> setEmphasis(true);
+$printer -> text(new item('', '$'));
+$printer -> setEmphasis(false);
+foreach ($items as $item) {
+    $printer -> text($item);
+}
+$printer -> setEmphasis(true);
+$printer -> text($subtotal);
+$printer -> setEmphasis(false);
+$printer -> feed();
+
+/* Tax and total */
+$printer -> text($tax);
+$printer -> selectPrintMode(Printer::MODE_DOUBLE_WIDTH);
+$printer -> text($total);
+$printer -> selectPrintMode();
+
+/* Footer */
+$printer -> feed(2);
+$printer -> setJustification(Printer::JUSTIFY_CENTER);
+$printer -> text("Thank you for shopping at ExampleMart\n");
+$printer -> text("For trading hours, please visit example.com\n");
+$printer -> feed(2);
+$printer -> text($date . "\n");
+
+/* Cut the receipt and open the cash drawer */
+$printer -> cut();
+$printer -> pulse();
+
+$printer -> close();
+
+/* A wrapper to do organise item names & prices into columns */
+class item
+{
+    private $name;
+    private $price;
+    private $dollarSign;
+
+    public function __construct($name = '', $price = '', $dollarSign = false)
+    {
+        $this -> name = $name;
+        $this -> price = $price;
+        $this -> dollarSign = $dollarSign;
+    }
+    
+    public function __toString()
+    {
+        $rightCols = 10;
+        $leftCols = 38;
+        if ($this -> dollarSign) {
+            $leftCols = $leftCols / 2 - $rightCols / 2;
+        }
+        $left = str_pad($this -> name, $leftCols) ;
+        
+        $sign = ($this -> dollarSign ? '$ ' : '');
+        $right = str_pad($sign . $this -> price, $rightCols, ' ', STR_PAD_LEFT);
+        return "$left$right\n";
+    }
+}

+ 35 - 0
vendor/mike42/escpos-php/example/resources/character-encoding-test-strings.inc

@@ -0,0 +1,35 @@
+<?php
+/* All strings from EscposPrintBufferTest are included below- These are fully supported
+ * on the default profile, so you can use them to test modified profiles (using the wrong
+ * profile for a printer produces mojibake) */
+$inputsOk = array(
+        "Danish" => "Quizdeltagerne spiste jordbær med fløde, mens cirkusklovnen Wolther spillede på xylofon.\n",
+        "German" => "Falsches Üben von Xylophonmusik quält jeden größeren Zwerg.\n",
+        "Greek" => "Ξεσκεπάζω την ψυχοφθόρα βδελυγμία\n",
+        "English" => "The quick brown fox jumps over the lazy dog.\n",
+        "Spanish" => "El pingüino Wenceslao hizo kilómetros bajo exhaustiva lluvia y frío, añoraba a su querido cachorro.\n",
+        "French" => "Le cœur déçu mais l'âme plutôt naïve, Louÿs rêva de crapaüter en canoë au delà des îles, près du mälström où brûlent les novæ.\n",
+        "Irish Gaelic" => "D'fhuascail Íosa, Úrmhac na hÓighe Beannaithe, pór Éava agus Ádhaimh.\n",
+        "Hungarian" => "Árvíztűrő tükörfúrógép.\n",
+        "Icelandic" => "Kæmi ný öxi hér ykist þjófum nú bæði víl og ádrepa.\n",
+        "Latvian" => "Glāžšķūņa rūķīši dzērumā čiepj Baha koncertflīģeļu vākus.\n",
+        "Polish" => "Pchnąć w tę łódź jeża lub ośm skrzyń fig.\n",
+        "Russian" => "В чащах юга жил бы цитрус? Да, но фальшивый экземпляр!\n",
+        "Turkish" => "Pijamalı hasta, yağız şoföre çabucak güvendi.\n",
+        "Japanese (Katakana half-width)" => implode("\n", array("イロハニホヘト チリヌルヲ ワカヨタレソ ツネナラム",  "ウイノオクヤマ ケフコエテ アサキユメミシ エヒモセスン")) . "\n",
+        "Vietnamese" => "Tiếng Việt, còn gọi tiếng Việt Nam hay Việt ngữ, là ngôn ngữ của người Việt (người Kinh) và là ngôn ngữ chính thức tại Việt Nam.\n"
+        );
+
+/*
+ * These strings are not expected to print correctly, if at all, even on an Epson printer. This is due to a mix of
+ * escpos driver, printer, and PHP language support issues.
+ * 
+ * They are included here as a collection of things not yet implemented.
+ */
+$inputsNotOk = array(
+        "Thai (No character encoder available)" => "นายสังฆภัณฑ์ เฮงพิทักษ์ฝั่ง ผู้เฒ่าซึ่งมีอาชีพเป็นฅนขายฃวด ถูกตำรวจปฏิบัติการจับฟ้องศาล ฐานลักนาฬิกาคุณหญิงฉัตรชฎา ฌานสมาธิ\n",
+        "Japanese (Hiragana)" => implode("\n", array("いろはにほへとちりぬるを",  " わかよたれそつねならむ", "うゐのおくやまけふこえて",  "あさきゆめみしゑひもせす")) . "\n",
+        "Japanese (Katakana full-width)" => implode("\n", array("イロハニホヘト チリヌルヲ ワカヨタレソ ツネナラム",  "ウヰノオクヤマ ケフコエテ アサキユメミシ ヱヒモセスン")) . "\n",
+        "Arabic (RTL not supported, encoding issues)" => "صِف خَلقَ خَودِ كَمِثلِ الشَمسِ إِذ بَزَغَت — يَحظى الضَجيعُ بِها نَجلاءَ مِعطارِ" . "\n",
+        "Hebrew (RTL not supported, line break issues)" => "דג סקרן שט בים מאוכזב ולפתע מצא לו חברה איך הקליטה" . "\n"
+        );

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 21 - 0
vendor/mike42/escpos-php/example/resources/document.html


BIN
vendor/mike42/escpos-php/example/resources/document.odt


BIN
vendor/mike42/escpos-php/example/resources/document.pdf


BIN
vendor/mike42/escpos-php/example/resources/document.z


BIN
vendor/mike42/escpos-php/example/resources/escpos-php-small.png


BIN
vendor/mike42/escpos-php/example/resources/escpos-php.png


BIN
vendor/mike42/escpos-php/example/resources/rawbtlogo.png


BIN
vendor/mike42/escpos-php/example/resources/tulips.png


BIN
vendor/mike42/escpos-php/example/resources/tux.png


+ 21 - 0
vendor/mike42/escpos-php/example/specific/123-code128-barcode.php

@@ -0,0 +1,21 @@
+<?php
+require __DIR__ . '/../../vendor/autoload.php';
+use Mike42\Escpos\Printer;
+use Mike42\Escpos\PrintConnectors\FilePrintConnector;
+
+$a = "{A012323392982";
+$b = "{B012323392982";
+$c = "{C" . chr(01) . chr(23) . chr(23) . chr(39) . chr(29) . chr(82);
+
+$connector = new FilePrintConnector("php://stdout");
+$printer = new Printer($connector);
+$printer -> setJustification(Printer::JUSTIFY_CENTER);
+$printer -> setBarcodeHeight(48);
+$printer->setBarcodeTextPosition(Printer::BARCODE_TEXT_BELOW);
+foreach(array($a, $b, $c) as $item)  {
+    $printer -> barcode($item, Printer::BARCODE_CODE128);
+    $printer -> feed(1);
+}
+$printer -> cut();
+$printer -> close();
+

+ 54 - 0
vendor/mike42/escpos-php/example/specific/141-custom-command.php

@@ -0,0 +1,54 @@
+<?php
+require __DIR__ . '/../../vendor/autoload.php';
+use Mike42\Escpos\Printer;
+use Mike42\Escpos\PrintConnectors\FilePrintConnector;
+
+/**
+ * This example shows how to send a custom command to the printer
+ *
+ * "ESC ( B" is the barcode function for Epson LX300 series.
+ * This is not part of standard ESC/POS, but it's a good example
+ * of how to send some binary to the driver.
+ */
+
+/* Barcode type is used in this script */
+const EAN13 = 0;
+
+/* Barcode properties */
+$type = EAN13;
+$content = "0075678164125";
+
+/*
+ * Make the command.
+ * This is documented on page A-14 of:
+ * https://files.support.epson.com/pdf/lx300p/lx300pu1.pdf
+ */
+$m = chr(EAN13);
+$n = intLowHigh(strlen($content), 2);
+$barcodeCommand = Printer::ESC . "G(" . $m . $n . $content;
+
+/* Send it off as usual */
+$connector = new FilePrintConnector("php://output");
+$printer = new Printer($connector);
+$printer->getPrintConnector()->write($barcodeCommand);
+$printer->cut();
+$printer->close();
+
+/**
+ * Generate two characters for a number: In lower and higher parts, or more parts as needed.
+ *
+ * @param int $input
+ *            Input number
+ * @param int $length
+ *            The number of bytes to output (1 - 4).
+ */
+function intLowHigh($input, $length)
+{
+    $outp = "";
+    for ($i = 0; $i < $length; $i ++) {
+        $outp .= chr($input % 256);
+        $input = (int) ($input / 256);
+    }
+    return $outp;
+}
+?>

+ 35 - 0
vendor/mike42/escpos-php/example/specific/148-data-uri.php

@@ -0,0 +1,35 @@
+<?php
+/*
+ * Example of one way you could load a PNG data URI into an EscposImage object
+ * without using a file.
+ */
+require __DIR__ . '/../../vendor/autoload.php';
+use Mike42\Escpos\Printer;
+use Mike42\Escpos\PrintConnectors\FilePrintConnector;
+use Mike42\Escpos\ImagickEscposImage;
+
+// Data URI for a PNG image (red dot from https://en.wikipedia.org/wiki/Data_URI_scheme )
+$uri = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA
+AAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO
+9TXL0Y4OHwAAAABJRU5ErkJggg==";
+
+// Convert data URI to binary data
+$imageBlob = base64_decode(explode(",", $uri)[1]);
+
+// Give Imagick a filename with the correct extension to stop it from attempting
+// to identify the format itself (this avoids CVE-2016–3714)
+$imagick = new Imagick();
+$imagick -> setResourceLimit(6, 1); // Prevent libgomp1 segfaults, grumble grumble.
+$imagick -> readImageBlob($imageBlob, "input.png");
+
+// Load Imagick straight into an EscposImage object
+$im = new ImagickEscposImage();
+$im -> readImageFromImagick($imagick);
+
+// Do a test print to make sure that this EscposImage object has the right data
+// (should see a tiny bullet point)
+$connector = new FilePrintConnector("php://output");
+$printer = new Printer($connector);
+$printer -> bitImage($im);
+$printer -> cut();
+$printer -> close();

+ 28 - 0
vendor/mike42/escpos-php/example/specific/235-get-data.php

@@ -0,0 +1,28 @@
+<?php
+/*
+ * Example showing how to return binary data back to the user.
+ * 
+ * This is intended for the "Star TSP650IIcloudPRNT" printer.
+ */
+require __DIR__ . '/../../vendor/autoload.php';
+use Mike42\Escpos\Printer;
+use Mike42\Escpos\PrintConnectors\DummyPrintConnector;
+use Mike42\Escpos\CapabilityProfile;
+
+// Make sure you load a Star print connector or you may get gibberish.
+$connector = new DummyPrintConnector();
+$profile = CapabilityProfile::load("TSP600");
+$printer = new Printer($connector);
+$printer -> text("Hello world!\n");
+$printer -> cut();
+
+// Get the data out as a string
+$data = $connector -> getData();
+
+// Return it, check the manual for specifics.
+header('Content-type: application/octet-stream');
+header('Content-Length: '.strlen($data));
+echo $data;
+
+// Close the printer when done.
+$printer -> close();

+ 25 - 0
vendor/mike42/escpos-php/example/specific/29-latvian-star-tup592.php

@@ -0,0 +1,25 @@
+<?php
+require __DIR__ . '/../../vendor/autoload.php';
+use Mike42\Escpos\CapabilityProfile;
+use Mike42\Escpos\Printer;
+use Mike42\Escpos\PrintConnectors\FilePrintConnector;
+use Mike42\Escpos\PrintBuffers\ImagePrintBuffer;
+
+/* This example shows the printing of Latvian text on the Star TUP 592 printer */
+$profile = CapabilityProfile::load("SP2000");
+
+/* Option 1: Native character encoding */
+$connector = new FilePrintConnector("php://stdout");
+$printer = new Printer($connector, $profile);
+$printer -> text("Glāžšķūņa rūķīši dzērumā čiepj Baha koncertflīģeļu vākus\n");
+$printer -> cut();
+$printer -> close();
+
+/* Option 2: Image-based output (formatting not available using this output) */
+$buffer = new ImagePrintBuffer();
+$connector = new FilePrintConnector("php://stdout");
+$printer = new Printer($connector, $profile);
+$printer -> setPrintBuffer($buffer);
+$printer -> text("Glāžšķūņa rūķīši dzērumā čiepj Baha koncertflīģeļu vākus\n");
+$printer -> cut();
+$printer -> close();

+ 39 - 0
vendor/mike42/escpos-php/example/specific/32-german-tm-t20-ii-custom-command.php

@@ -0,0 +1,39 @@
+<?php
+require __DIR__ . '/../../vendor/autoload.php';
+use Mike42\Escpos\CapabilityProfile;
+use Mike42\Escpos\Printer;
+use Mike42\Escpos\PrintConnectors\FilePrintConnector;
+
+/*
+ * This example shows how tok send a custom command to the printer-
+ * The use case here is an Epson TM-T20II and German text.
+ * 
+ * Background: Not all ESC/POS features are available in the driver, so sometimes
+ * you might want to send a custom commnad. This is useful for testing
+ * new features.
+ * 
+ * The Escpos::text() function removes non-printable characters as a precaution,
+ * so that commands cannot be injected into user input. To send raw data to
+ * the printer, you need to write bytes to the underlying PrintConnector.
+ * 
+ * If you get a new command working, please file an issue on GitHub with a code
+ * snippet so that it can be incorporated into escpos-php.
+ */
+
+/* Set up profile & connector */
+$connector = new FilePrintConnector("php://output");
+$profile = CapabilityProfile::load("default"); // Works for Epson printers
+
+$printer = new Printer($connector, $profile);
+$cmd = Printer::ESC . "V" . chr(1); // Try out 90-degree rotation.
+$printer -> getPrintConnector() -> write($cmd);
+$printer -> text("Beispieltext in Deutsch\n");
+$printer -> cut();
+$printer -> close();
+/*
+ * Hex-dump of output confirms that ESC V 1 being sent:
+ *
+ * 0000000 033   @ 033   V 001   B   e   i   s   p   i   e   l   t   e   x
+ * 0000010   t       i   n       D   e   u   t   s   c   h  \n 035   V   A
+ * 0000020 003
+ */

+ 19 - 0
vendor/mike42/escpos-php/example/specific/33-spanish-seypos-prp-300.php

@@ -0,0 +1,19 @@
+<?php
+/*
+ * Example of printing Spanish text on SEYPOS PRP-300 thermal line printer.
+ * The characters in Spanish are available in code page 437, so no special
+ * code pages are needed in this case (SimpleCapabilityProfile).
+ *
+ * Use the hardware switch to activate "Two-byte Character Code"
+ */
+require __DIR__ . '/../../vendor/autoload.php';
+use Mike42\Escpos\CapabilityProfile;
+use Mike42\Escpos\Printer;
+use Mike42\Escpos\PrintConnectors\FilePrintConnector;
+
+$connector = new FilePrintConnector("php://output");
+$profile = CapabilityProfile::load("simple"); // Works for Epson printers
+$printer = new Printer($connector);
+$printer -> text("El pingüino Wenceslao hizo kilómetros bajo exhaustiva lluvia y frío, añoraba a su querido cachorro.\n");
+$printer -> cut();
+$printer -> close();

+ 24 - 0
vendor/mike42/escpos-php/example/specific/37-chinese.php

@@ -0,0 +1,24 @@
+<?php
+/*
+ * This is an example of printing chinese text. This is a bit different to other character encodings, because
+ * the printer accepts a 2-byte character encoding (GBK), and formatting is handled differently while in this mode.
+ *
+ * At the time of writing, this is implemented separately as a textChinese() function, until chinese text
+ * can be properly detected and printed alongside other encodings.
+ */
+require __DIR__ . '/../../vendor/autoload.php';
+use Mike42\Escpos\CapabilityProfile;
+use Mike42\Escpos\Printer;
+use Mike42\Escpos\PrintConnectors\FilePrintConnector;
+
+$connector = new FilePrintConnector("/dev/usb/lp1");
+$profile = CapabilityProfile::load("default");
+
+$printer = new Printer($connector);
+
+// Example text from #37
+$printer -> textChinese("艾德蒙 AOC E2450SWH 23.6吋 LED液晶寬螢幕特價$ 19900\n\n");
+
+// Note that on the printer tested (ZJ5890), the font only contained simplified characters.
+$printer -> textChinese("示例文本打印机!\n\n");
+$printer -> close();

+ 77 - 0
vendor/mike42/escpos-php/example/specific/39-currency-symbols.php

@@ -0,0 +1,77 @@
+<?php
+require __DIR__ . '/../../vendor/autoload.php';
+use Mike42\Escpos\CapabilityProfile;
+use Mike42\Escpos\Printer;
+use Mike42\Escpos\PrintConnectors\FilePrintConnector;
+use Mike42\Escpos\PrintBuffers\ImagePrintBuffer;
+
+$profile = CapabilityProfile::load("default");
+// This is a quick demo of currency symbol issues in #39.
+
+/* Option 1: Native ESC/POS characters, depends on printer and is buggy. */
+$connector = new FilePrintConnector("php://stdout");
+$printer = new Printer($connector, $profile);
+$printer -> text("€ 9,95\n");
+$printer -> text("£ 9.95\n");
+$printer -> text("$ 9.95\n");
+$printer -> text("¥ 9.95\n");
+$printer -> cut();
+$printer -> close();
+
+/* Option 2: Image-based output (formatting not available using this output). */
+$buffer = new ImagePrintBuffer();
+$connector = new FilePrintConnector("php://stdout");
+$printer = new Printer($connector, $profile);
+$printer -> setPrintBuffer($buffer);
+$printer -> text("€ 9,95\n");
+$printer -> text("£ 9.95\n");
+$printer -> text("$ 9.95\n");
+$printer -> text("¥ 9.95\n");
+$printer -> cut();
+$printer -> close();
+
+/*
+ Option 3: If the printer is configured to print in a specific code
+ page, you can set up a CapabilityProfile which either references its
+ iconv encoding name, or includes all of the available characters.
+
+ Here, we make use of CP858 for its inclusion of currency symbols which
+ are not available in CP437. CP858 has good printer support, but is not
+ included in all iconv builds.
+*/
+class CustomCapabilityProfile extends CapabilityProfile
+{
+    function getCustomCodePages()
+    {
+        /*
+		 * Example to print in a specific, user-defined character set
+		 * on a printer which has been configured to use i
+		 */
+        return array(
+        'CP858' => "ÇüéâäàåçêëèïîìÄÅ" .
+                "ÉæÆôöòûùÿÖÜø£Ø×ƒ" .
+                "áíóúñѪº¿®¬½¼¡«»" .
+                "░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐" .
+                "└┴┬├─┼ãÃ╚╔╩╦╠═╬¤" .
+                "ðÐÊËÈ€ÍÎÏ┘┌█▄¦Ì▀" .
+                "ÓßÔÒõÕµþÞÚÛÙýݯ´" .
+                " ±‗¾¶§÷¸°¨·¹³²■ ");
+    }
+    
+    function getSupportedCodePages()
+    {
+        return array(
+                0 => 'custom:CP858');
+    }
+}
+
+$connector = new FilePrintConnector("php://stdout");
+$profile = CustomCapabilityProfile::getInstance();
+$printer = new Printer($connector, $profile);
+$printer -> text("€ 9,95\n");
+$printer -> text("£ 9.95\n");
+$printer -> text("$ 9.95\n");
+$printer -> text("¥ 9.95\n");
+
+$printer -> cut();
+$printer -> close();

+ 35 - 0
vendor/mike42/escpos-php/example/specific/44-pound-symbol-star-tsp650.php

@@ -0,0 +1,35 @@
+<?php
+/* Example of printing the GBP pound symbol on a STAR TSP650
+ * 
+ * In this example, it's shown how to check that your PHP files are actually being
+ * saved in unicode. Sections B) and C) are identical in UTF-8, but different
+ * if you are saving to a retro format like Windows-1252.
+ */
+
+// Adjust these to your environment
+require __DIR__ . '/../../vendor/autoload.php';
+use Mike42\Escpos\CapabilityProfile;
+use Mike42\Escpos\Printer;
+use Mike42\Escpos\PrintConnectors\FilePrintConnector;
+
+$connector = new FilePrintConnector("php://stdout");
+
+// Start printer
+$profile = CapabilityProfile::load("simple");
+$printer = new Printer($connector, $profile);
+
+// A) Raw pound symbol
+// This is the most likely thing to work, and bypasses all the fancy stuff.
+$printer -> textRaw("\x9C"); // based on position in CP437
+$printer -> text(" 1.95\n");
+
+// B) Manually encoded UTF8 pound symbol. Tests that the driver correctly
+//		encodes this as CP437.
+$printer -> text(base64_decode("wqM=") . " 2.95\n");
+
+// C) Pasted in file. Tests that your files are being saved as UTF-8, which
+// 		escpos-php is able to convert automatically to a mix of code pages.
+$printer -> text("£ 3.95\n");
+
+$printer -> cut();
+$printer -> close();

+ 19 - 0
vendor/mike42/escpos-php/example/specific/50-P-822D-greek.php

@@ -0,0 +1,19 @@
+<?php
+/* Example of Greek text on the P-822D */
+require __DIR__ . '/../../vendor/autoload.php';
+use Mike42\Escpos\CapabilityProfile;
+use Mike42\Escpos\Printer;
+use Mike42\Escpos\PrintConnectors\FilePrintConnector;
+
+// Setup the printer
+$connector = new FilePrintConnector("php://stdout");
+$profile = CapabilityProfile::load("P822D");
+$printer = new Printer($connector, $profile);
+
+// Print a Greek pangram
+$text = "Ξεσκεπάζω την ψυχοφθόρα βδελυγμία";
+$printer -> text($text . "\n");
+$printer -> cut();
+
+// Close the connection
+$printer -> close();

+ 64 - 0
vendor/mike42/escpos-php/example/specific/54-gfx-sidebyside.php

@@ -0,0 +1,64 @@
+<?php
+/*
+ * Example of calling ImageMagick 'convert' to manipulate an image prior to printing.
+ * 
+ * Written as an example to remind you to do four things-
+ * - escape your command-line arguments with escapeshellarg
+ * - close the printer
+ * - delete any temp files
+ * - detect and handle external command failure
+ *
+ * Note that image operations are slow. You can and should serialise an EscposImage
+ * object into some sort of cache if you will re-use the output.
+ */
+require __DIR__ . '/../../vendor/autoload.php';
+use Mike42\Escpos\CapabilityProfile;
+use Mike42\Escpos\Printer;
+use Mike42\Escpos\EscposImage;
+use Mike42\Escpos\PrintConnectors\FilePrintConnector;
+
+// Paths to images to combine
+$img1_path = dirname(__FILE__) . "/../resources/tux.png";
+$img2_path = dirname(__FILE__) . "/../resources/escpos-php.png";
+
+// Set up temp file with .png extension
+$tmpf_path = tempnam(sys_get_temp_dir(), 'escpos-php');
+$imgCombined_path = $tmpf_path . ".png";
+
+try {
+    // Convert, load image, remove temp files
+    $cmd = sprintf(
+        "convert %s %s +append %s",
+        escapeshellarg($img1_path),
+        escapeshellarg($img2_path),
+        escapeshellarg($imgCombined_path)
+    );
+    exec($cmd, $outp, $retval);
+    if ($retval != 0) {
+        // Detect and handle command failure
+        throw new Exception("Command \"$cmd\" returned $retval." . implode("\n", $outp));
+    }
+    $img = EscposImage::load($imgCombined_path);
+
+    // Setup the printer
+    $connector = new FilePrintConnector("php://stdout");
+    $profile = CapabilityProfile::load("default");
+
+    // Run the actual print
+    $printer = new Printer($connector, $profile);
+    try {
+        $printer -> setJustification(Printer::JUSTIFY_CENTER);
+        $printer -> graphics($img);
+        $printer -> cut();
+    } finally {
+        // Always close the connection
+        $printer -> close();
+    }
+} catch (Exception $e) {
+    // Print out any errors: Eg. printer connection, image loading & external image manipulation.
+    echo $e -> getMessage() . "\n";
+    echo $e -> getTraceAsString();
+} finally {
+    unlink($imgCombined_path);
+    unlink($tmpf_path);
+}

+ 74 - 0
vendor/mike42/escpos-php/example/specific/6-arabic-epos-tep-220m.php

@@ -0,0 +1,74 @@
+<?php
+/*
+ * This example shows Arabic image-based output on the EPOS TEP 220m.
+ *
+ * Because escpos-php is not yet able to render Arabic correctly
+ * on thermal line printers, small images are generated and sent
+ * instead. This is a bit slower, and only limited formatting
+ * is currently available in this mode.
+ * 
+ * Requirements are:
+ *  - imagick extension (For the ImagePrintBuffer, which does not
+ *      support gd at the time of writing)
+ *  - ArPHP 4.0 (release date: Jan 8, 2016), available from SourceForge, for
+ *      handling the layout for this example.
+ */
+require __DIR__ . '/../../vendor/autoload.php';
+use Mike42\Escpos\CapabilityProfile;
+use Mike42\Escpos\Printer;
+use Mike42\Escpos\PrintConnectors\FilePrintConnector;
+use Mike42\Escpos\PrintBuffers\ImagePrintBuffer;
+
+/*
+ * Drop Ar-php into the folder listed below:
+ */
+require_once(dirname(__FILE__) . "/../../I18N/Arabic.php");
+$fontPath = dirname(__FILE__) . "/../../I18N/Arabic/Examples/GD/ae_AlHor.ttf";
+
+/*
+ * Inputs are some text, line wrapping options, and a font size. 
+ */
+$textUtf8 = "صِف خَلقَ خَودِ كَمِثلِ الشَمسِ إِذ بَزَغَت — يَحظى الضَجيعُ بِها نَجلاءَ مِعطارِ";
+$maxChars = 50;
+$fontSize = 28;
+
+/*
+ * First, convert the text into LTR byte order with line wrapping,
+ * Using the Ar-PHP library.
+ * 
+ * The Ar-PHP library uses the default internal encoding, and can print
+ * a lot of errors depending on the input, so be prepared to debug
+ * the next four lines.
+ * 
+ * Note that this output shows that numerals are converted to placeholder
+ * characters, indicating that western numerals (123) have to be used instead.
+ */
+mb_internal_encoding("UTF-8");
+$Arabic = new I18N_Arabic('Glyphs');
+$textLtr = $Arabic -> utf8Glyphs($textUtf8, $maxChars);
+$textLine = explode("\n", $textLtr);
+
+/*
+ * Set up and use an image print buffer with a suitable font
+ */
+$buffer = new ImagePrintBuffer();
+$buffer -> setFont($fontPath);
+$buffer -> setFontSize($fontSize);
+
+$profile = CapabilityProfile::load("TEP-200M");
+$connector = new FilePrintConnector("php://output");
+        // = new WindowsPrintConnector("LPT2");
+        // Windows LPT2 was used in the bug tracker
+
+$printer = new Printer($connector, $profile);
+$printer -> setPrintBuffer($buffer);
+
+$printer -> setJustification(Printer::JUSTIFY_RIGHT);
+foreach($textLine as $text) {
+    // Print each line separately. We need to do this since Imagick thinks
+    // text is left-to-right
+    $printer -> text($text . "\n");
+}
+
+$printer -> cut();
+$printer -> close();

+ 15 - 0
vendor/mike42/escpos-php/example/specific/62-greek-symbol-swap.php

@@ -0,0 +1,15 @@
+<?php
+require __DIR__ . '/../../vendor/autoload.php';
+use Mike42\Escpos\Printer;
+use Mike42\Escpos\PrintConnectors\FilePrintConnector;
+use Mike42\Escpos\CapabilityProfile;
+
+$connector = new FilePrintConnector("php://stdout");
+$profile = CapabilityProfile::load("default");
+$printer = new Printer($connector, $profile);
+
+$printer -> text("Μιχάλης Νίκος\n");
+$printer -> cut();
+$printer -> close();
+
+?>

+ 21 - 0
vendor/mike42/escpos-php/example/specific/68-redblack.php

@@ -0,0 +1,21 @@
+<?php
+/*
+ * Example of two-color printing, tested on an epson TM-U220 with two-color ribbon installed.
+ */
+require __DIR__ . '/../../vendor/autoload.php';
+use Mike42\Escpos\Printer;
+use Mike42\Escpos\PrintConnectors\FilePrintConnector;
+
+$connector = new FilePrintConnector("/dev/usb/lp0");
+$printer = new Printer($connector);
+try {
+    $printer -> text("Hello World!\n");
+    $printer -> setColor(Printer::COLOR_2);
+    $printer -> text("Red?!\n");
+    $printer -> setColor(Printer::COLOR_1);
+    $printer -> text("Default color again?!\n");
+    $printer -> cut();
+} finally {
+    /* Always close the printer! */
+    $printer -> close();
+}

+ 28 - 0
vendor/mike42/escpos-php/example/specific/97-dithering.php

@@ -0,0 +1,28 @@
+<?php
+/*
+ * Example of dithering used in EscposImage by default, if you have Imagick loaded.
+ */
+require __DIR__ . '/../../vendor/autoload.php';
+use Mike42\Escpos\Printer;
+use Mike42\Escpos\EscposImage;
+use Mike42\Escpos\PrintConnectors\FilePrintConnector;
+
+$connector = new FilePrintConnector("/dev/usb/lp0");
+$printer = new Printer($connector);
+try {
+    /*  Load with optimisations enabled. If you have Imagick, this will get you
+        a nicely dithered image, which prints very quickly
+    */
+    $img1 = EscposImage::load(__DIR__ . '/../resources/tulips.png');
+    $printer -> bitImage($img1);
+    
+    /*  Load with optimisations disabled, forcing the use of PHP to convert the
+        pixels, which uses a threshold and is much slower.
+    */
+    $img2 = EscposImage::load(__DIR__ . '/../resources/tulips.png', false);
+    $printer -> bitImage($img2);
+    $printer -> cut();
+} finally {
+    /* Always close the printer! */
+    $printer -> close();
+}

+ 7 - 0
vendor/mike42/escpos-php/example/specific/README.md

@@ -0,0 +1,7 @@
+Specific examples
+-----------------
+
+These examples are designed for specific combinations of language,
+printer and interface.
+
+They are documented here because the general examples all set up the printer in a similar way.

+ 65 - 0
vendor/mike42/escpos-php/example/text-size.php

@@ -0,0 +1,65 @@
+<?php
+/**
+ * This print-out shows how large the available font sizes are. It is included
+ * separately due to the amount of text it prints.
+ *
+ * @author Michael Billington <michael.billington@gmail.com>
+ */
+require __DIR__ . '/../vendor/autoload.php';
+use Mike42\Escpos\Printer;
+use Mike42\Escpos\PrintConnectors\FilePrintConnector;
+
+$connector = new FilePrintConnector("php://stdout");
+$printer = new Printer($connector);
+
+/* Initialize */
+$printer -> initialize();
+
+/* Text of various (in-proportion) sizes */
+title($printer, "Change height & width\n");
+for ($i = 1; $i <= 8; $i++) {
+    $printer -> setTextSize($i, $i);
+    $printer -> text($i);
+}
+$printer -> text("\n");
+
+/* Width changing only */
+title($printer, "Change width only (height=4):\n");
+for ($i = 1; $i <= 8; $i++) {
+    $printer -> setTextSize($i, 4);
+    $printer -> text($i);
+}
+$printer -> text("\n");
+
+/* Height changing only */
+title($printer, "Change height only (width=4):\n");
+for ($i = 1; $i <= 8; $i++) {
+    $printer -> setTextSize(4, $i);
+    $printer -> text($i);
+}
+$printer -> text("\n");
+
+/* Very narrow text */
+title($printer, "Very narrow text:\n");
+$printer -> setTextSize(1, 8);
+$printer -> text("The quick brown fox jumps over the lazy dog.\n");
+
+/* Very flat text */
+title($printer, "Very wide text:\n");
+$printer -> setTextSize(4, 1);
+$printer -> text("Hello world!\n");
+
+/* Very large text */
+title($printer, "Largest possible text:\n");
+$printer -> setTextSize(8, 8);
+$printer -> text("Hello\nworld!\n");
+
+$printer -> cut();
+$printer -> close();
+
+function title(Printer $printer, $text)
+{
+    $printer -> selectPrintMode(Printer::MODE_EMPHASIZED);
+    $printer -> text("\n" . $text);
+    $printer -> selectPrintMode(); // Reset
+}

+ 22 - 0
vendor/mike42/escpos-php/example/unifont-print-buffer.php

@@ -0,0 +1,22 @@
+<?php
+
+require __DIR__ . '/../vendor/autoload.php';
+
+use Mike42\Escpos\PrintConnectors\FilePrintConnector;
+use Mike42\Escpos\Printer;
+use Mike42\Escpos\Experimental\Unifont\UnifontPrintBuffer;
+
+$connector = new FilePrintConnector("php://stdout");
+$printer = new Printer($connector);
+
+// Use Unifont to render text
+$unifontBuffer = new UnifontPrintBuffer("/usr/share/unifont/unifont.hex");
+$printer -> setPrintBuffer($unifontBuffer);
+
+// Most simple example
+$printer->text("Hello\n");
+$printer->setUpsideDown(true);
+$printer->text("World\n");
+$printer->cut();
+$printer->close();
+

+ 16 - 0
vendor/mike42/escpos-php/example/upside-down.php

@@ -0,0 +1,16 @@
+<?php
+/* Demonstration of upside-down printing */
+require __DIR__ . '/../vendor/autoload.php';
+use Mike42\Escpos\Printer;
+use Mike42\Escpos\PrintConnectors\FilePrintConnector;
+
+$connector = new FilePrintConnector("php://stdout");
+$printer = new Printer($connector);
+
+// Most simple example
+$printer -> text("Hello\n");
+$printer -> setUpsideDown(true);
+$printer -> text("World\n");
+$printer -> cut();
+$printer -> close();
+

+ 21 - 0
vendor/mike42/escpos-php/phpunit.xml

@@ -0,0 +1,21 @@
+<phpunit bootstrap="test/bootstrap.php"
+timeoutForSmallTests="1"
+timeoutForMediumTests="10"
+timeoutForLargeTests="60"
+verbose="true"
+
+>
+  <testsuites>
+    <testsuite name="unit">
+      <directory>test/unit</directory>
+    </testsuite>
+    <testsuite name="integration">
+      <directory>test/integration</directory>
+    </testsuite>
+  </testsuites>
+  <filter>
+    <whitelist processUncoveredFilesFromWhitelist="true">
+      <directory suffix=".php">src</directory>
+    </whitelist>
+  </filter>
+</phpunit>

+ 350 - 0
vendor/mike42/escpos-php/src/Mike42/Escpos/CapabilityProfile.php

@@ -0,0 +1,350 @@
+<?php
+
+/**
+ * This file is part of escpos-php: PHP receipt printer library for use with
+ * ESC/POS-compatible thermal and impact printers.
+ *
+ * Copyright (c) 2014-20 Michael Billington < michael.billington@gmail.com >,
+ * incorporating modifications by others. See CONTRIBUTORS.md for a full list.
+ *
+ * This software is distributed under the terms of the MIT license. See LICENSE.md
+ * for details.
+ */
+
+declare(strict_types=1);
+
+namespace Mike42\Escpos;
+
+use \InvalidArgumentException;
+
+/**
+ * Store compatibility information about one printer.
+ */
+class CapabilityProfile
+{
+
+    /**
+     *
+     * @var string $codePageCacheKey
+     *  Hash of the code page data structure, to identify it for caching.
+     */
+    protected $codePageCacheKey;
+
+    /**
+     *
+     * @var array $codePages
+     *  Associtive array of CodePage objects, indicating which encodings the printer supports.
+     */
+    protected $codePages;
+
+    /**
+     *
+     * @var array $colors
+     *  Not used.
+     */
+    protected $colors;
+
+    /**
+     *
+     * @var array $features
+     *  Feature values.
+     */
+    protected $features;
+
+    /**
+     *
+     * @var array $fonts
+     *  Not used
+     */
+    protected $fonts;
+
+    /**
+     *
+     * @var array $media
+     *  Not used
+     */
+    protected $media;
+
+    /**
+     *
+     * @var string $name
+     *  Name of the profile, including model number.
+     */
+    protected $name;
+
+    /**
+     *
+     * @var string $notes
+     *  Notes on the profile, null if not set.
+     */
+    protected $notes;
+
+    /**
+     *
+     * @var string $profileId
+     *  ID of the profile.
+     */
+    protected $profileId;
+
+    
+    /**
+     * @var string $vendor
+     *  Name of manufacturer.
+     */
+    protected $vendor;
+    
+    /**
+     *
+     * @var array $encodings
+     *  Data structure containing encodings loaded from disk, null if not loaded yet.
+     */
+    protected static $encodings = null;
+
+    /**
+     *
+     * @var array $profiles
+     *  Data structure containing profiles loaded from disk, null if not loaded yet.
+     */
+    protected static $profiles = null;
+
+    /**
+     * Construct new CapabilityProfile.
+     * The encoding data must be loaded from disk before calling.
+     *
+     * @param string $profileId
+     *            ID of the profile
+     * @param array $profileData
+     *            Profile data from disk.
+     */
+    protected function __construct(string $profileId, array $profileData)
+    {
+        // Basic primitive fields
+        $this->profileId = $profileId;
+        $this->name = $profileData['name'];
+        $this->notes = $profileData['notes'];
+        $this->vendor = $profileData['vendor'];
+        // More complex fields that are not currently loaded into custom objects
+        $this->features = $profileData['features'];
+        $this->colors = $profileData['colors'];
+        $this->fonts = $profileData['fonts'];
+        $this->media = $profileData['media'];
+        // More complex fields that are loaded into custom objects
+        $this->codePages = [];
+        $this->codePageCacheKey = md5(json_encode($profileData['codePages']));
+        foreach ($profileData['codePages'] as $k => $v) {
+            $this->codePages[$k] = new CodePage($v, self::$encodings[$v]);
+        }
+    }
+
+    /**
+     *
+     * @return string Hash of the code page data structure, to identify it for caching.
+     */
+    public function getCodePageCacheKey() : string
+    {
+        return $this->codePageCacheKey;
+    }
+
+    /**
+     *
+     * @return array Associative array of CodePage objects, indicating which encodings the printer supports.
+     */
+    public function getCodePages() : array
+    {
+        return $this->codePages;
+    }
+
+    /**
+     *
+     * @param string $featureName
+     *            Name of the feature to retrieve.
+     * @throws \InvalidArgumentException Where the feature does not exist.
+     *         The exception will contain suggestions for the closest-named features.
+     * @return mixed feature value.
+     */
+    public function getFeature($featureName)
+    {
+        if (isset($this->features[$featureName])) {
+            return $this->features[$featureName];
+        }
+        $suggestionsArr = $this->suggestFeatureName($featureName);
+        $suggestionsStr = implode(", ", $suggestionsArr);
+        $str = "The feature '$featureName' does not exist. Try one that does exist, such as $suggestionsStr";
+        throw new \InvalidArgumentException($str);
+    }
+
+    /**
+     *
+     * @return string ID of the profile.
+     */
+    public function getId() : string
+    {
+        return $this->profileId;
+    }
+
+    /**
+     *
+     * @return string Name of the printer.
+     */
+    public function getName() : string
+    {
+        return $this->name;
+    }
+
+    /**
+     *
+     * @return boolean True if Barcode B command is supported, false otherwise
+     */
+    public function getSupportsBarcodeB() : bool
+    {
+        return $this->getFeature('barcodeB') === true;
+    }
+
+    /**
+     *
+     * @return boolean True if Bit Image Raster command is supported, false otherwise
+     */
+    public function getSupportsBitImageRaster() : bool
+    {
+        return $this->getFeature('bitImageRaster') === true;
+    }
+
+    /**
+     *
+     * @return boolean True if Graphics command is supported, false otherwise
+     */
+    public function getSupportsGraphics() : bool
+    {
+        return $this->getFeature('graphics') === true;
+    }
+
+    /**
+     *
+     * @return boolean True if PDF417 code command is supported, false otherwise
+     */
+    public function getSupportsPdf417Code() : bool
+    {
+        return $this->getFeature('pdf417Code') === true;
+    }
+
+    /**
+     *
+     * @return boolean True if QR code command is supported, false otherwise
+     */
+    public function getSupportsQrCode(): bool
+    {
+        return $this->getFeature('qrCode') === true;
+    }
+
+    /**
+     *
+     * @return boolean True if Star mode commands are supported, false otherwise
+     */
+    public function getSupportsStarCommands(): bool
+    {
+        return $this->getFeature('starCommands') === true;
+    }
+
+    /**
+     *
+     * @return string Vendor of this printer.
+     */
+    public function getVendor() : string
+    {
+        return $this->vendor;
+    }
+
+    /**
+     *
+     * @param string $featureName
+     *            Feature that does not exist
+     * @return array Three most similar feature names that do exist.
+     */
+    protected function suggestFeatureName(string $featureName) : array
+    {
+        return self::suggestNearest($featureName, array_keys($this->features), 3);
+    }
+
+    /**
+     *
+     * @return array Names of all profiles that exist.
+     */
+    public static function getProfileNames() : array
+    {
+        self::loadCapabilitiesDataFile();
+        return array_keys(self::$profiles);
+    }
+
+    /**
+     * Retrieve the CapabilityProfile with the given ID.
+     *
+     * @param string $profileName
+     *            The ID of the profile to load.
+     * @throws InvalidArgumentException Where the ID does not exist. Some similarly-named profiles will be suggested in the Exception text.
+     * @return CapabilityProfile The CapabilityProfile that was requested.
+     */
+    public static function load(string $profileName)
+    {
+        self::loadCapabilitiesDataFile();
+        if (! isset(self::$profiles[$profileName])) {
+            $suggestionsArray = self::suggestProfileName($profileName);
+            $suggestionsStr = implode(", ", $suggestionsArray);
+            throw new InvalidArgumentException("The CapabilityProfile '$profileName' does not exist. Try one that does exist, such as $suggestionsStr.");
+        }
+        return new CapabilityProfile($profileName, self::$profiles[$profileName]);
+    }
+
+    /**
+     * Ensure that the capabilities.json data file has been loaded.
+     */
+    protected static function loadCapabilitiesDataFile()
+    {
+        if (self::$profiles === null) {
+            $filename = dirname(__FILE__) . "/resources/capabilities.json";
+            $capabilitiesData = json_decode(file_get_contents($filename), true);
+            self::$profiles = $capabilitiesData['profiles'];
+            self::$encodings = $capabilitiesData['encodings'];
+        }
+    }
+
+    /**
+     * Return choices with smallest edit distance to an invalid input.
+     *
+     * @param string $input
+     *            Input that is not a valid choice
+     * @param array $choices
+     *            Array of valid choices.
+     * @param int $num
+     *            Number of suggestions to return
+     */
+    public static function suggestNearest(string $input, array $choices, int $num) : array
+    {
+        $distances = array_fill_keys($choices, PHP_INT_MAX);
+        foreach ($distances as $word => $_) {
+            $distances[$word] = levenshtein($input, $word);
+        }
+        asort($distances);
+        return array_slice(array_keys($distances), 0, min($num, count($choices)));
+    }
+
+    /**
+     *
+     * @param string $profileName
+     *            profile name that does not exist
+     * @return array Three similar profile names that do exist, plus 'simple' and 'default' for good measure.
+     */
+    protected static function suggestProfileName(string $profileName) : array
+    {
+        $suggestions = self::suggestNearest($profileName, array_keys(self::$profiles), 3);
+        $alwaysSuggest = [
+            'simple',
+            'default'
+        ];
+        foreach ($alwaysSuggest as $item) {
+            if (array_search($item, $suggestions) === false) {
+                array_push($suggestions, $item);
+            }
+        }
+        return $suggestions;
+    }
+}

+ 198 - 0
vendor/mike42/escpos-php/src/Mike42/Escpos/CodePage.php

@@ -0,0 +1,198 @@
+<?php declare(strict_types=1);
+/**
+ * This file is part of escpos-php: PHP receipt printer library for use with
+ * ESC/POS-compatible thermal and impact printers.
+ *
+ * Copyright (c) 2014-20 Michael Billington < michael.billington@gmail.com >,
+ * incorporating modifications by others. See CONTRIBUTORS.md for a full list.
+ *
+ * This software is distributed under the terms of the MIT license. See LICENSE.md
+ * for details.
+ */
+
+namespace Mike42\Escpos;
+
+use \InvalidArgumentException;
+
+/**
+ * Class to handle data about a particular CodePage, as loaded from the receipt print
+ * database.
+ *
+ * Also computes map between UTF-8 and this encoding if necessary, using the intl library.
+ */
+class CodePage
+{
+    /**
+     * Value to use when no character is set. This is a space in ASCII.
+     */
+    const MISSING_CHAR_CODE = 0x20;
+
+    /**
+     * @var array|null $data
+     *  Data string, null if not known (can be computed with iconv)
+     */
+    protected $data;
+
+    /**
+     * @var string|null $iconv
+     *  Iconv encoding name, null if not known
+     */
+    protected $iconv;
+
+    /**
+     * @var string $id
+     *  Internal ID of the CodePage
+     */
+    protected $id;
+
+    /**
+     * @var string $name
+     *  Name of the code page. Substituted with the ID if not set.
+     */
+    protected $name;
+
+    /**
+     * @var string|null $notes
+     *  Notes on this code page, or null if not set.
+     */
+    protected $notes;
+
+    /**
+     *
+     * @param string $id
+     *            Unique internal identifier for the CodePage.
+     * @param array $codePageData
+     *            Associative array of CodePage data, as
+     *            specified by the upstream receipt-print-hq/escpos-printer-db database.
+     *            May contain 'name', 'data', 'iconv', and 'notes' fields.
+     */
+    public function __construct($id, array $codePageData)
+    {
+        $this->id = $id;
+        $this->name = isset($codePageData['name']) ? $codePageData['name'] : $id;
+        $this->data = isset($codePageData['data']) ? self::encodingArrayFromData($codePageData['data']) : null;
+        $this->iconv = isset($codePageData['iconv']) ? $codePageData['iconv'] : null;
+        $this->notes = isset($codePageData['notes']) ? $codePageData['notes'] : null;
+    }
+
+    /**
+     * Get a 128-entry array of unicode code-points from this code page.
+     *
+     * @throws InvalidArgumentException Where the data is now known or computable.
+     * @return array Data for this encoding.
+     */
+    public function getDataArray() : array
+    {
+        // Make string
+        if ($this->data !== null) {
+            // Return data if known
+            return $this->data;
+        }
+        if ($this->iconv !== null) {
+            // Calculate with iconv if we know the encoding name
+            $this->data = self::generateEncodingArray($this->iconv);
+            return $this->data;
+        }
+        // Can't encode..
+        throw new InvalidArgumentException("Cannot encode this code page");
+    }
+
+    /**
+     *
+     * @return string|null Iconv encoding name, or null if not set.
+     */
+    public function getIconv()
+    {
+        return $this->iconv;
+    }
+
+    /**
+     *
+     * @return string Unique identifier of the code page.
+     */
+    public function getId() : string
+    {
+        return $this->id;
+    }
+
+    /**
+     * @return string Name of the code page.
+     */
+    public function getName() : string
+    {
+        return $this->name;
+    }
+
+    /**
+     * The notes may explain quirks about a code-page, such as a source if it's non-standard or un-encodeable.
+     *
+     * @return string|null Notes on the code page, or null if not set.
+     */
+    public function getNotes()
+    {
+        return $this->notes;
+    }
+
+    /**
+     *
+     * @return boolean True if we can encode with this code page (ie, we know what data it holds).
+     *
+     * Many printers contain vendor-specific code pages, which are named but have not been identified or
+     * typed out. For our purposes, this is an "un-encodeable" code page.
+     */
+    public function isEncodable()
+    {
+        return $this->iconv !== null || $this->data !== null;
+    }
+
+    /**
+     * Given an ICU encoding name, generate a 128-entry array, with the unicode code points
+     * for the character at positions 128-255 in this code page.
+     *
+     * @param string $encodingName Name of the encoding
+     * @return array 128-entry array of code points
+     */
+    protected static function generateEncodingArray(string $encodingName) : array
+    {
+        // Set up converter for encoding
+        $missingChar = chr(self::MISSING_CHAR_CODE);
+        // Throws a lot of warnings for ambiguous code pages, but fallbacks seem fine.
+        $converter = @new \UConverter("UTF-8", $encodingName);
+        $converter -> setSubstChars($missingChar);
+        // Loop through 128 code points
+        $intArray = array_fill(0, 128, self::MISSING_CHAR_CODE);
+        for ($char = 128; $char <= 255; $char++) {
+            // Try to identify the UTF-8 character at this position in the code page
+            $encodingChar = chr($char);
+            $utf8 = $converter ->convert($encodingChar, false);
+            if ($utf8 === $missingChar || $utf8 === false) {
+                // Cannot be mapped to unicode
+                continue;
+            }
+            $reverse = $converter ->convert($utf8, true);
+            if ($reverse !== $encodingChar) {
+                // Avoid conversions which don't reverse well (eg. multi-byte code pages)
+                continue;
+            }
+            // Replace space with the correct character if we found it
+            $intArray[$char - 128] = \IntlChar::ord($utf8);
+        }
+        assert(count($intArray) == 128);
+        return $intArray;
+    }
+
+
+    private static function encodingArrayFromData(array $data) : array
+    {
+        $text = implode("", $data); // Join lines
+        $codePointIterator = \IntlBreakIterator::createCodePointInstance();
+        $codePointIterator -> setText($text);
+        $ret = array_fill(0, 128, self::MISSING_CHAR_CODE);
+        for ($i = 0; ($codePointIterator -> next() > 0) && ($i < 128); $i++) {
+            $codePoint = $codePointIterator -> getLastCodePoint();
+            $ret[$i] = $codePoint;
+        }
+        assert(count($ret) == 128);
+        return $ret;
+    }
+}

+ 152 - 0
vendor/mike42/escpos-php/src/Mike42/Escpos/Devices/AuresCustomerDisplay.php

@@ -0,0 +1,152 @@
+<?php
+
+/**
+ * This file is part of escpos-php: PHP receipt printer library for use with
+ * ESC/POS-compatible thermal and impact printers.
+ *
+ * Copyright (c) 2014-20 Michael Billington < michael.billington@gmail.com >,
+ * incorporating modifications by others. See CONTRIBUTORS.md for a full list.
+ *
+ * This software is distributed under the terms of the MIT license. See LICENSE.md
+ * for details.
+ */
+
+declare(strict_types=1);
+
+namespace Mike42\Escpos\Devices;
+
+use Mike42\Escpos\Printer;
+
+/**
+ * A class for sending ESC/POS-like code to an Aures customer display.
+ * The display has some features that printers do not, such as an ability to "clear" the screen.
+ */
+class AuresCustomerDisplay extends Printer
+{
+
+    /**
+     * Indicates that the text should wrap and type over
+     * existing text on the screen, rather than scroll.
+     */
+    const TEXT_OVERWRITE = 1;
+
+    /**
+     * Indicates that overflowing text should cause the
+     * display to scroll vertically, like a computer terminal.
+     */
+    const TEXT_VERTICAL_SCROLL = 2;
+
+    /**
+     * Indicates that overflowing text should cause the
+     * display to scroll horizontally, like a news ticker.
+     */
+    const TEXT_HORIZONTAL_SCROLL = 3;
+
+    /**
+     *
+     * {@inheritdoc}
+     *
+     * @see \Mike42\Escpos\Printer::initialize()
+     */
+    public function initialize()
+    {
+        // Select ESC/POS mode first
+        $this->selectEscposMode();
+        parent::initialize();
+        // ESC @ does not reset character table on this printer
+        $this->selectCharacterTable(0);
+        // Default to horizontal scroll mode. Behaves most like a printer.
+        $this->selectTextScrollMode(AuresCustomerDisplay::TEXT_VERTICAL_SCROLL);
+    }
+
+    /**
+     * Selects ESC/POS mode.
+     *
+     * This device supports other modes, which are not used.
+     */
+    protected function selectEscposMode()
+    {
+        $this->connector->write("\x02\x05\x43\x31\x03");
+    }
+
+    /**
+     *
+     * @param int $mode
+     *            The text scroll mode to use. One of
+     *            AuresCustomerDisplay::TEXT_OVERWRITE,
+     *            AuresCustomerDisplay::TEXT_VERTICAL_SCROLL or
+     *            AuresCustomerDisplay::TEXT_HORIZONTAL_SCROLL
+     */
+    public function selectTextScrollMode(int $mode = AuresCustomerDisplay::TEXT_VERTICAL_SCROLL)
+    {
+        self::validateInteger($mode, 1, 3, __FUNCTION__);
+        $this->connector->write("\x1F" . chr($mode));
+    }
+
+    /**
+     * Clear the display.
+     */
+    public function clear()
+    {
+        $this->connector->write("\x0c");
+    }
+
+    /**
+     * Instruct the display to show the firmware version.
+     */
+    public function showFirmwareVersion()
+    {
+        $this->connector->write("\x02\x05\x56\x01\x03");
+    }
+
+    /**
+     * Instruct the display to begin a self-test/demo sequence.
+     */
+    public function selfTest()
+    {
+        $this->connector->write("\x02\x05\x44\x08\x03");
+    }
+
+    /**
+     * Instruct the display to show a pre-loaded logo.
+     *
+     * Note that this driver is not capable of uploading a
+     * logo, but that the vendor supplies software
+     * which has this function.
+     */
+    public function showLogo()
+    {
+        $this->connector->write("\x02\xFC\x55\xAA\x55\xAA");
+    }
+
+    /**
+     *
+     * {@inheritdoc}
+     *
+     * @see \Mike42\Escpos\Printer::text()
+     */
+    public function text(string $str)
+    {
+        // Need to intercept line-feeds, since "\n" is insufficient on this device.
+        foreach (explode("\n", $str) as $id => $line) {
+            if ($id > 0) {
+                $this->feed();
+            }
+            parent::text($line);
+        }
+    }
+
+    /**
+     *
+     * {@inheritdoc}
+     *
+     * @see \Mike42\Escpos\Printer::feed()
+     */
+    public function feed(int $lines = 1)
+    {
+        self::validateInteger($lines, 1, 255, __FUNCTION__);
+        for ($i = 0; $i < $lines; $i ++) {
+            $this->connector->write("\r\n");
+        }
+    }
+}

+ 466 - 0
vendor/mike42/escpos-php/src/Mike42/Escpos/EscposImage.php

@@ -0,0 +1,466 @@
+<?php
+
+/**
+ * This file is part of escpos-php: PHP receipt printer library for use with
+ * ESC/POS-compatible thermal and impact printers.
+ *
+ * Copyright (c) 2014-20 Michael Billington < michael.billington@gmail.com >,
+ * incorporating modifications by others. See CONTRIBUTORS.md for a full list.
+ *
+ * This software is distributed under the terms of the MIT license. See LICENSE.md
+ * for details.
+ */
+
+declare(strict_types=1);
+
+namespace Mike42\Escpos;
+
+use Exception;
+use InvalidArgumentException;
+use Mike42\Escpos\GdEscposImage;
+use Mike42\Escpos\ImagickEscposImage;
+use Mike42\Escpos\NativeEscposImage;
+
+/**
+ * This class deals with images in raster formats, and converts them into formats
+ * which are suitable for use on thermal receipt printers. Currently, only PNG
+ * images (in) and ESC/POS raster format (out) are implemeted.
+ *
+ * Input formats:
+ *  - Currently, only PNG is supported.
+ *  - Other easily read raster formats (jpg, gif) will be added at a later date, as this is not complex.
+ *  - The BMP format can be directly read by some commands, but this has not yet been implemented.
+ *
+ * Output formats:
+ *  - Currently, only ESC/POS raster format is supported
+ *  - ESC/POS 'column format' support is partially implemented, but is not yet used by Escpos.php library.
+ *  - Output as multiple rows of column format image is not yet in the works.
+ *
+ * Libraries:
+ *  - Currently, php-gd is used to read the input. Support for imagemagick where gd is not installed is
+ *    also not complex to add, and is a likely future feature.
+ *  - Support for native use of the BMP format is a goal, for maximum compatibility with target environments.
+ */
+abstract class EscposImage
+{
+    /**
+     * @var int $imgHeight
+     *  height of the image.
+     */
+    protected $imgHeight = 0;
+    
+    /**
+     * @var int $imgWidth
+     *  width of the image
+     */
+    protected $imgWidth = 0;
+    
+    /**
+     * @var string $imgData
+     *  Image data in rows: 1 for black, 0 for white.
+     */
+    private $imgData = null;
+    
+    /**
+     * @var array:string $imgColumnData
+     *  Cached column-format data to avoid re-computation
+     */
+    private $imgColumnData = [];
+    
+    /**
+     * @var string $imgRasterData
+     *  Cached raster format data to avoid re-computation
+     */
+    private $imgRasterData = null;
+    
+    /**
+     * @var string $filename
+     *  Filename of image on disk - null if not loaded from disk.
+     */
+    private $filename = null;
+    
+    /**
+     * @var boolean $allowOptimisations
+     *  True to allow faster library-specific rendering shortcuts, false to always just use
+     *  image libraries to read pixels (more reproducible between systems).
+     */
+    private $allowOptimisations = true;
+    
+    /**
+     * Construct a new EscposImage.
+     *
+     * @param string $filename Path to image filename, or null to create an empty image.
+     * @param boolean $allowOptimisations True (default) to use any library-specific tricks
+     *  to speed up rendering, false to force the image to be read in pixel-by-pixel,
+     *  which is easier to unit test and more reproducible between systems, but slower.
+     */
+    public function __construct($filename = null, $allowOptimisations = true)
+    {
+        $this -> filename = $filename;
+        $this -> allowOptimisations = $allowOptimisations;
+    }
+
+    /**
+     * @return int height of the image in pixels
+     */
+    public function getHeight()
+    {
+        return $this -> imgHeight;
+    }
+    
+    /**
+     * @return int Number of bytes to represent a row of this image
+     */
+    public function getHeightBytes()
+    {
+        return (int)(($this -> imgHeight + 7) / 8);
+    }
+    
+    /**
+     * @return int Width of the image
+     */
+    public function getWidth()
+    {
+        return $this -> imgWidth;
+    }
+    
+    /**
+     * @return int Number of bytes to represent a row of this image
+     */
+    public function getWidthBytes()
+    {
+        return (int)(($this -> imgWidth + 7) / 8);
+    }
+
+    /**
+     * Output the image in raster (row) format. This can result in padding on the
+     * right of the image, if its width is not divisible by 8.
+     *
+     * @throws Exception Where the generated data is unsuitable for the printer
+     *  (indicates a bug or oversized image).
+     * @return string The image in raster format.
+     */
+    public function toRasterFormat()
+    {
+        // Just wraps implementations for caching & lazy loading
+        if ($this -> imgRasterData !== null) {
+            /* Return cached value */
+            return $this -> imgRasterData;
+        }
+        if ($this -> allowOptimisations) {
+            /* Use optimised code if allowed */
+            $this -> imgRasterData = $this -> getRasterFormatFromFile($this -> filename);
+        }
+        if ($this -> imgRasterData === null) {
+            /* Load in full image and render the slow way if no faster implementation
+             is available, or if we've been asked not to use it */
+            if ($this -> imgData === null) {
+                $this -> loadImageData($this -> filename);
+            }
+            $this -> imgRasterData = $this -> getRasterFormat();
+        }
+        return $this -> imgRasterData;
+    }
+    
+    /**
+     * Output the image in column format.
+     *
+     * @param boolean $doubleDensity True for double density (24px) lines, false for single-density (8px) lines.
+     * @return string[] an array, one item per line of output. All lines will be of equal size.
+     */
+    public function toColumnFormat($doubleDensity = false)
+    {
+        $densityIdx = $doubleDensity ? 1 : 0;
+        // Just wraps implementations for caching and lazy loading
+        if (isset($this -> imgColumnData[$densityIdx])) {
+            /* Return cached value */
+            return $this -> imgColumnData[$densityIdx];
+        }
+        $this -> imgColumnData[$densityIdx] = null;
+        if ($this -> allowOptimisations) {
+            /* Use optimised code if allowed */
+            $data = $this -> getColumnFormatFromFile($this -> filename, $doubleDensity);
+            $this -> imgColumnData[$densityIdx] = $data;
+        }
+        if ($this -> imgColumnData[$densityIdx] === null) {
+            /* Load in full image and render the slow way if no faster implementation
+             is available, or if we've been asked not to use it */
+            if ($this -> imgData === null) {
+                $this -> loadImageData($this -> filename);
+            }
+            $this -> imgColumnData[$densityIdx] = $this -> getColumnFormat($doubleDensity);
+        }
+        return $this -> imgColumnData[$densityIdx];
+    }
+
+    /**
+     * Load an image from disk. This default implementation always gives a zero-sized image.
+     *
+     * @param string|null $filename Filename to load from.
+     */
+    protected function loadImageData(string $filename = null)
+    {
+        // Load image in to string of 1's and 0's, also set width & height
+        $this -> setImgWidth(0);
+        $this -> setImgHeight(0);
+        $this -> setImgData("");
+    }
+    
+    /**
+     * Set image data.
+     *
+     * @param string $data Image data to use, string of 1's (black) and 0's (white) in row-major order.
+     */
+    protected function setImgData($data)
+    {
+        $this -> imgData = $data;
+    }
+    
+    /**
+     * Set image width.
+     *
+     * @param int $width width of the image
+     */
+    protected function setImgWidth($width)
+    {
+        $this -> imgWidth = $width;
+    }
+    
+    /**
+     * Set image height.
+     *
+     * @param int $height height of the image.
+     */
+    protected function setImgHeight($height)
+    {
+        $this -> imgHeight = $height;
+    }
+    
+    /**
+     * @param string $filename
+     *  Filename to load from
+     * @return string|NULL
+     *  Raster format data, or NULL if no optimised renderer is available in
+     *  this implementation.
+     */
+    protected function getRasterFormatFromFile($filename = null)
+    {
+        // No optimised implementation to provide
+        return null;
+    }
+    
+    /**
+     * @param string $filename
+     *  Filename to load from
+     * @param boolean $highDensityVertical
+     *  True for high density output (24px lines), false for regular density (8px)
+     * @return string[]|NULL
+     *  Column format data as array, or NULL if optimised renderer isn't
+     *  available in this implementation.
+     */
+    protected function getColumnFormatFromFile($filename = null, $highDensityVertical = true)
+    {
+        // No optimised implementation to provide
+        return null;
+    }
+    
+    /**
+     * Get column fromat from loaded image pixels, line by line.
+     *
+     * @throws Exception
+     *  Where wrong number of bytes has been generated.
+     * @return string
+     *  Raster format data
+     */
+    private function getRasterFormat()
+    {
+        /* Loop through and convert format */
+        $widthPixels = $this -> getWidth();
+        $heightPixels = $this -> getHeight();
+        $widthBytes = $this -> getWidthBytes();
+        $heightBytes = $this -> getHeightBytes();
+        $x = $y = $bit = $byte = $byteVal = 0;
+        $data = str_repeat("\0", $widthBytes * $heightPixels);
+        if (strlen($data) == 0) {
+            return $data;
+        }
+        do {
+            $byteVal |= (int)$this -> imgData[$y * $widthPixels + $x] << (7 - $bit);
+            $x++;
+            $bit++;
+            if ($x >= $widthPixels) {
+                $x = 0;
+                $y++;
+                $bit = 8;
+                if ($y >= $heightPixels) {
+                    $data[$byte] = chr($byteVal);
+                    break;
+                }
+            }
+            if ($bit >= 8) {
+                $data[$byte] = chr($byteVal);
+                $byteVal = 0;
+                $bit = 0;
+                $byte++;
+            }
+        } while (true);
+        if (strlen($data) != ($this -> getWidthBytes() * $this -> getHeight())) {
+            throw new Exception("Bug in " . __FUNCTION__ . ", wrong number of bytes.");
+        }
+        return $data;
+    }
+    
+    /**
+     * Get column fromat from loaded image pixels, line by line.
+     *
+     * @param boolean $highDensity
+     *  True for high density output (24px lines), false for regular density (8px)
+     * @return string[]
+     *  Array of column format data, one item per row.
+     */
+    private function getColumnFormat(bool $highDensity)
+    {
+        $out = [];
+        $i = 0;
+        while (($line = $this -> getColumnFormatLine($i, $highDensity)) !== null) {
+            $out[] = $line;
+            $i++;
+        }
+        return $out;
+    }
+    
+    /**
+     * Output image in column format. Must be called once for each line of output.
+     *
+     * @param int $lineNo
+     *  Line number to retrieve
+     * @param bool $highDensity
+     *  True for high density output (24px lines), false for regular density (8px)
+     * @throws Exception
+     *  Where wrong number of bytes has been generated.
+     * @return NULL|string
+     *  Column format data, or null if there is no more data (when iterating)
+     */
+    private function getColumnFormatLine(int $lineNo, bool $highDensity)
+    {
+        // Currently double density in both directions, very experimental
+        $widthPixels = $this -> getWidth();
+        $heightPixels = $this -> getHeight();
+        $widthBytes = $this -> getWidthBytes();
+        $heightBytes = $this -> getHeightBytes();
+        $lineHeight = $highDensity ? 3 : 1; // Vertical density. 1 or 3 (for 8 and 24 pixel lines)
+        // Initialise to zero
+        $x = $y = $bit = $byte = $byteVal = 0;
+        $data = str_repeat("\x00", $widthPixels * $lineHeight);
+        $yStart = $lineHeight * 8 * $lineNo;
+        if ($yStart >= $heightPixels) {
+            return null;
+        }
+        if (strlen($data) == 0) {
+            return $data;
+        }
+        do {
+            $yReal = $y + $yStart;
+            if ($yReal < $heightPixels) {
+                $byteVal |= (int)$this -> imgData[$yReal * $widthPixels + $x] << (7 - $bit);
+            }
+            $y++;
+            $bit++;
+            if ($y >= $lineHeight * 8) {
+                $y = 0;
+                $x++;
+                $bit = 8;
+                if ($x >= $widthPixels) {
+                    $data[$byte] = chr($byteVal);
+                    break;
+                }
+            }
+            if ($bit >= 8) {
+                $data[$byte] = chr($byteVal);
+                $byteVal = 0;
+                $bit = 0;
+                $byte++;
+            }
+        } while (true);
+        if (strlen($data) != $widthPixels * $lineHeight) {
+            throw new Exception("Bug in " . __FUNCTION__ . ", wrong number of bytes.");
+        }
+        return $data;
+    }
+    
+    /**
+     * @return boolean True if GD is loaded, false otherwise
+     */
+    public static function isGdLoaded()
+    {
+        return extension_loaded('gd');
+    }
+    
+    /**
+     * @return boolean True if Imagick is loaded, false otherwise
+     */
+    public static function isImagickLoaded()
+    {
+        return extension_loaded('imagick');
+    }
+    
+
+    /**
+     * This is a convinience method to load an image from file, auto-selecting
+     * an EscposImage implementation which uses an available library.
+     *
+     * The sub-classes can be constructed directly if you know that you will
+     * have Imagick or GD on the print server.
+     *
+     * @param string $filename
+     *  File to load from
+     * @param bool $allowOptimisations
+     *  True to allow the fastest rendering shortcuts, false to force the library
+     *  to read the image into an internal raster format and use PHP to render
+     *  the image (slower but less fragile).
+     * @param array $preferred
+     *  Order to try to load libraries in- escpos-php supports pluggable image
+     *  libraries. Items can be 'imagick', 'gd', 'native'.
+     * @throws Exception
+     *  Where no suitable library could be found for the type of file being loaded.
+     * @return EscposImage
+     *
+     */
+    public static function load(
+        string $filename,
+        bool $allowOptimisations = true,
+        array $preferred = ['imagick', 'gd', 'native']
+    ) {
+        /* Fail early if file is not readble */
+        if (!file_exists($filename) || !is_readable($filename)) {
+            throw new Exception("File '$filename' does not exist, or is not readable.");
+        }
+        $ext = pathinfo($filename, PATHINFO_EXTENSION);
+        /* Choose the first implementation which can handle this format */
+        foreach ($preferred as $implementation) {
+            if ($implementation === 'imagick') {
+                if (!self::isImagickLoaded()) {
+                    // Skip option if Imagick is not loaded
+                    continue;
+                }
+                return new ImagickEscposImage($filename, $allowOptimisations);
+            } elseif ($implementation === 'gd') {
+                if (!self::isGdLoaded()) {
+                    // Skip option if GD not loaded
+                    continue;
+                }
+                return new GdEscposImage($filename, $allowOptimisations);
+            } elseif ($implementation === 'native') {
+                if (!in_array($ext, ['bmp', 'gif', 'pbm', 'png', 'ppm', 'pgm', 'wbmp'])) {
+                    // Pure PHP may also be fastest way to generate raster output from wbmp and pbm formats.
+                    continue;
+                }
+                return new NativeEscposImage($filename, $allowOptimisations);
+            } else {
+                // Something else on the 'preferred' list.
+                throw new InvalidArgumentException("'$implementation' is not a known EscposImage implementation");
+            }
+        }
+        throw new InvalidArgumentException("No suitable EscposImage implementation found for '$filename'.");
+    }
+}

+ 38 - 0
vendor/mike42/escpos-php/src/Mike42/Escpos/Experimental/Unifont/ColumnFormatGlyph.php

@@ -0,0 +1,38 @@
+<?php
+
+/**
+ * This file is part of escpos-php: PHP receipt printer library for use with
+ * ESC/POS-compatible thermal and impact printers.
+ *
+ * Copyright (c) 2014-20 Michael Billington < michael.billington@gmail.com >,
+ * incorporating modifications by others. See CONTRIBUTORS.md for a full list.
+ *
+ * This software is distributed under the terms of the MIT license. See LICENSE.md
+ * for details.
+ */
+
+declare(strict_types=1);
+
+namespace Mike42\Escpos\Experimental\Unifont;
+
+class ColumnFormatGlyph
+{
+    public $width;
+    public $data;
+
+    public function segment(int $maxWidth)
+    {
+        if ($this->width <= $maxWidth) {
+            return [$this];
+        }
+        $dataChunks = str_split($this->data, $maxWidth * 3);
+        $ret = [];
+        foreach ($dataChunks as $chunk) {
+            $g = new ColumnFormatGlyph();
+            $g->data = $chunk;
+            $g->width = strlen($chunk) / 3;
+            $ret[] = $g;
+        }
+        return $ret;
+    }
+}

+ 21 - 0
vendor/mike42/escpos-php/src/Mike42/Escpos/Experimental/Unifont/ColumnFormatGlyphFactory.php

@@ -0,0 +1,21 @@
+<?php
+
+/**
+ * This file is part of escpos-php: PHP receipt printer library for use with
+ * ESC/POS-compatible thermal and impact printers.
+ *
+ * Copyright (c) 2014-20 Michael Billington < michael.billington@gmail.com >,
+ * incorporating modifications by others. See CONTRIBUTORS.md for a full list.
+ *
+ * This software is distributed under the terms of the MIT license. See LICENSE.md
+ * for details.
+ */
+
+declare(strict_types=1);
+
+namespace Mike42\Escpos\Experimental\Unifont;
+
+interface ColumnFormatGlyphFactory
+{
+    public function getGlyph($codePoint);
+}

+ 129 - 0
vendor/mike42/escpos-php/src/Mike42/Escpos/Experimental/Unifont/FontMap.php

@@ -0,0 +1,129 @@
+<?php
+
+/**
+ * This file is part of escpos-php: PHP receipt printer library for use with
+ * ESC/POS-compatible thermal and impact printers.
+ *
+ * Copyright (c) 2014-20 Michael Billington < michael.billington@gmail.com >,
+ * incorporating modifications by others. See CONTRIBUTORS.md for a full list.
+ *
+ * This software is distributed under the terms of the MIT license. See LICENSE.md
+ * for details.
+ */
+
+declare(strict_types=1);
+
+namespace Mike42\Escpos\Experimental\Unifont;
+
+use InvalidArgumentException;
+use Mike42\Escpos\Printer;
+
+class FontMap
+{
+    protected $printer;
+
+    const MIN = 0x20;
+    const MAX = 0x7E;
+    const FONT_A_WIDTH = 12;
+    const FONT_B_WIDTH = 9;
+
+    // Map memory locations to code points
+    protected $memory;
+
+    // Map unicode code points to bytes
+    protected $chars;
+
+    // next available slot
+    protected $next = 0;
+
+    public function __construct(ColumnFormatGlyphFactory $glyphFactory, Printer $printer)
+    {
+        $this -> printer = $printer;
+        $this -> glyphFactory = $glyphFactory;
+        $this -> reset();
+    }
+
+    public function cacheChars(array $codePoints)
+    {
+        // TODO flush existing cache to fill with these chars.
+    }
+
+    public function writeChar(int $codePoint)
+    {
+        if (!$this -> addChar($codePoint, true)) {
+            throw new InvalidArgumentException("Code point $codePoint not available");
+        }
+        $data = implode($this -> chars[$codePoint]);
+        $this -> printer -> getPrintConnector() -> write($data);
+    }
+
+    public function reset()
+    {
+        $this -> chars = [];
+        $this -> memory = array_fill(0, (\Mike42\Escpos\Experimental\Unifont\FontMap::MAX - FontMap::MIN) + 1, -1);
+    }
+
+    public function occupied($id)
+    {
+        return $this -> memory[$id] !== -1;
+    }
+
+    public function evict($id)
+    {
+        if (!$this -> occupied($id)) {
+            return true;
+        }
+        unset($this -> chars[$this -> memory[$id]]);
+        $this -> memory[$id] = -1;
+        return true;
+    }
+
+    public function addChar(int $codePoint, $evict = true)
+    {
+        if (isset($this -> chars[$codePoint])) {
+            // Char already available
+            return true;
+        }
+        // Get glyph
+        $glyph = $this -> glyphFactory -> getGlyph($codePoint);
+        $glyphParts = $glyph -> segment(self::FONT_B_WIDTH);
+        //print_r($glyphParts);
+        //
+        // Clear count($glyphParts) of space from $start
+        $start = $this -> next;
+        $chars = [];
+        $submit = [];
+        for ($i = 0; $i < count($glyphParts); $i++) {
+            $id = ($this -> next + $i) % count($this -> memory);
+            if ($this -> occupied($id)) {
+                if ($evict) {
+                    $this -> evict($id);
+                } else {
+                    return false;
+                }
+            }
+            $thisChar = $id + self::MIN;
+            $chars[] = chr($thisChar);
+            $submit[$thisChar] = $glyphParts[$i];
+        }
+
+        // Success in locating memory space, move along counters
+        $this -> next = ($this -> next + count($glyphParts)) % count($this -> memory);
+        $this -> submitCharsToPrinterFont($submit);
+        $this -> memory[$start] = $codePoint;
+        $this -> chars[$codePoint] = $chars;
+
+        return true;
+    }
+
+    public function submitCharsToPrinterFont(array $chars)
+    {
+        ksort($chars);
+        // TODO We can sort into batches of contiguous characters here.
+        foreach ($chars as $char => $glyph) {
+            $verticalBytes = 3;
+            $data = Printer::ESC . "&" . chr($verticalBytes) . chr($char) . chr($char) . chr($glyph -> width) . $glyph -> data;
+            $this -> printer -> getPrintConnector() -> write($data);
+        }
+    }
+}

+ 246 - 0
vendor/mike42/escpos-php/src/Mike42/Escpos/Experimental/Unifont/UnifontGlyphFactory.php

@@ -0,0 +1,246 @@
+<?php
+
+/**
+ * This file is part of escpos-php: PHP receipt printer library for use with
+ * ESC/POS-compatible thermal and impact printers.
+ *
+ * Copyright (c) 2014-20 Michael Billington < michael.billington@gmail.com >,
+ * incorporating modifications by others. See CONTRIBUTORS.md for a full list.
+ *
+ * This software is distributed under the terms of the MIT license. See LICENSE.md
+ * for details.
+ */
+
+declare(strict_types=1);
+
+namespace Mike42\Escpos\Experimental\Unifont;
+
+class UnifontGlyphFactory implements ColumnFormatGlyphFactory
+{
+    protected $unifontFile;
+
+    public static function colFormat16(array $in)
+    {
+        // Map 16 x 16 bit unifont (32 bytes) to 16 x 24 ESC/POS column format image (48 bytes).
+        return UnifontGlyphFactory::colFormat8($in, 2, 1) . UnifontGlyphFactory::colFormat8($in, 2, 2);
+    }
+
+    public static function colFormat8(array $in, $chars = 1, $idx = 1)
+    {
+        // Map 8 x 16 bit unifont (32 bytes) to 8 x 24 ESC/POS column format image (24 bytes).
+        return implode([
+            chr(
+                (($in[0 * $chars + $idx] & 0x80)) |
+                (($in[1 * $chars + $idx] & 0x80) >> 1) |
+                (($in[2 * $chars + $idx] & 0x80) >> 2) |
+                (($in[3 * $chars + $idx] & 0x80) >> 3) |
+                (($in[4 * $chars + $idx] & 0x80) >> 4) |
+                (($in[5 * $chars + $idx] & 0x80) >> 5) |
+                (($in[6 * $chars + $idx] & 0x80) >> 6) |
+                (($in[7 * $chars + $idx] & 0x80) >> 7)
+            ),
+            chr(
+                (($in[8 * $chars + $idx] & 0x80)) |
+                (($in[9 * $chars + $idx] & 0x80) >> 1) |
+                (($in[10 * $chars + $idx] & 0x80) >> 2) |
+                (($in[11 * $chars + $idx] & 0x80) >> 3) |
+                (($in[12 * $chars + $idx] & 0x80) >> 4) |
+                (($in[13 * $chars + $idx] & 0x80) >> 5) |
+                (($in[14 * $chars + $idx] & 0x80) >> 6) |
+                (($in[15 * $chars + $idx] & 0x80) >> 7)
+            ),
+            chr(0),
+            chr(
+                (($in[0 * $chars + $idx] & 0x40) << 1) |
+                (($in[1 * $chars + $idx] & 0x40)) |
+                (($in[2 * $chars + $idx] & 0x40) >> 1) |
+                (($in[3 * $chars + $idx] & 0x40) >> 2) |
+                (($in[4 * $chars + $idx] & 0x40) >> 3) |
+                (($in[5 * $chars + $idx] & 0x40) >> 4) |
+                (($in[6 * $chars + $idx] & 0x40) >> 5) |
+                (($in[7 * $chars + $idx] & 0x40) >> 6)
+            ),
+            chr(
+                (($in[8 * $chars + $idx] & 0x40) << 1) |
+                (($in[9 * $chars + $idx] & 0x40) >> 0) |
+                (($in[10 * $chars + $idx] & 0x40) >> 1) |
+                (($in[11 * $chars + $idx] & 0x40) >> 2) |
+                (($in[12 * $chars + $idx] & 0x40) >> 3) |
+                (($in[13 * $chars + $idx] & 0x40) >> 4) |
+                (($in[14 * $chars + $idx] & 0x40) >> 5) |
+                (($in[15 * $chars + $idx] & 0x40) >> 6)
+            ),
+            chr(0),
+            chr(
+                (($in[0 * $chars + $idx] & 0x20) << 2) |
+                (($in[1 * $chars + $idx] & 0x20) << 1) |
+                (($in[2 * $chars + $idx] & 0x20)) |
+                (($in[3 * $chars + $idx] & 0x20) >> 1) |
+                (($in[4 * $chars + $idx] & 0x20) >> 2) |
+                (($in[5 * $chars + $idx] & 0x20) >> 3) |
+                (($in[6 * $chars + $idx] & 0x20) >> 4) |
+                (($in[7 * $chars + $idx] & 0x20) >> 5)
+            ),
+            chr(
+                (($in[8 * $chars + $idx] & 0x20) << 2) |
+                (($in[9 * $chars + $idx] & 0x20) << 1) |
+                (($in[10 * $chars + $idx] & 0x20)) |
+                (($in[11 * $chars + $idx] & 0x20) >> 1) |
+                (($in[12 * $chars + $idx] & 0x20) >> 2) |
+                (($in[13 * $chars + $idx] & 0x20) >> 3) |
+                (($in[14 * $chars + $idx] & 0x20) >> 4) |
+                (($in[15 * $chars + $idx] & 0x20) >> 5)
+            ),
+            chr(0),
+            chr(
+                (($in[0 * $chars + $idx] & 0x10) << 3) |
+                (($in[1 * $chars + $idx] & 0x10) << 2) |
+                (($in[2 * $chars + $idx] & 0x10) << 1) |
+                (($in[3 * $chars + $idx] & 0x10)) |
+                (($in[4 * $chars + $idx] & 0x10) >> 1) |
+                (($in[5 * $chars + $idx] & 0x10) >> 2) |
+                (($in[6 * $chars + $idx] & 0x10) >> 3) |
+                (($in[7 * $chars + $idx] & 0x10) >> 4)
+            ),
+            chr(
+                (($in[8 * $chars + $idx] & 0x10) << 3) |
+                (($in[9 * $chars + $idx] & 0x10) << 2) |
+                (($in[10 * $chars + $idx] & 0x10) << 1) |
+                (($in[11 * $chars + $idx] & 0x10)) |
+                (($in[12 * $chars + $idx] & 0x10) >> 1) |
+                (($in[13 * $chars + $idx] & 0x10) >> 2) |
+                (($in[14 * $chars + $idx] & 0x10) >> 3) |
+                (($in[15 * $chars + $idx] & 0x10) >> 4)
+            ),
+            chr(0),
+            chr(
+                (($in[0 * $chars + $idx] & 0x08) << 4) |
+                (($in[1 * $chars + $idx] & 0x08) << 3) |
+                (($in[2 * $chars + $idx] & 0x08) << 2) |
+                (($in[3 * $chars + $idx] & 0x08) << 1) |
+                (($in[4 * $chars + $idx] & 0x08)) |
+                (($in[5 * $chars + $idx] & 0x08) >> 1) |
+                (($in[6 * $chars + $idx] & 0x08) >> 2) |
+                (($in[7 * $chars + $idx] & 0x08) >> 3)
+            ),
+            chr(
+                (($in[8 * $chars + $idx] & 0x08) << 4) |
+                (($in[9 * $chars + $idx] & 0x08) << 3) |
+                (($in[10 * $chars + $idx] & 0x08) << 2) |
+                (($in[11 * $chars + $idx] & 0x08) << 1) |
+                (($in[12 * $chars + $idx] & 0x08)) |
+                (($in[13 * $chars + $idx] & 0x08) >> 1) |
+                (($in[14 * $chars + $idx] & 0x08) >> 2) |
+                (($in[15 * $chars + $idx] & 0x08) >> 3)
+            ),
+            chr(0),
+            chr(
+                (($in[0 * $chars + $idx] & 0x04) << 5) |
+                (($in[1 * $chars + $idx] & 0x04) << 4) |
+                (($in[2 * $chars + $idx] & 0x04) << 3) |
+                (($in[3 * $chars + $idx] & 0x04) << 2) |
+                (($in[4 * $chars + $idx] & 0x04) << 1) |
+                (($in[5 * $chars + $idx] & 0x04)) |
+                (($in[6 * $chars + $idx] & 0x04) >> 1) |
+                (($in[7 * $chars + $idx] & 0x04) >> 2)
+            ),
+            chr(
+                (($in[8 * $chars + $idx] & 0x04) << 5) |
+                (($in[9 * $chars + $idx] & 0x04) << 4) |
+                (($in[10 * $chars + $idx] & 0x04) << 3) |
+                (($in[11 * $chars + $idx] & 0x04) << 2) |
+                (($in[12 * $chars + $idx] & 0x04) << 1) |
+                (($in[13 * $chars + $idx] & 0x04)) |
+                (($in[14 * $chars + $idx] & 0x04) >> 1) |
+                (($in[15 * $chars + $idx] & 0x04) >> 2)
+            ),
+            chr(0),
+            chr(
+                (($in[0 * $chars + $idx] & 0x02) << 6) |
+                (($in[1 * $chars + $idx] & 0x02) << 5) |
+                (($in[2 * $chars + $idx] & 0x02) << 4) |
+                (($in[3 * $chars + $idx] & 0x02) << 3) |
+                (($in[4 * $chars + $idx] & 0x02) << 2) |
+                (($in[5 * $chars + $idx] & 0x02) << 1) |
+                (($in[6 * $chars + $idx] & 0x02)) |
+                (($in[7 * $chars + $idx] & 0x02) >> 1)
+            ),
+            chr(
+                (($in[8 * $chars + $idx] & 0x02) << 6) |
+                (($in[9 * $chars + $idx] & 0x02) << 5) |
+                (($in[10 * $chars + $idx] & 0x02) << 4) |
+                (($in[11 * $chars + $idx] & 0x02) << 3) |
+                (($in[12 * $chars + $idx] & 0x02) << 2) |
+                (($in[13 * $chars + $idx] & 0x02) << 1) |
+                (($in[14 * $chars + $idx] & 0x02)) |
+                (($in[15 * $chars + $idx] & 0x02) >> 1)
+            ),
+            chr(0),
+            chr(
+                (($in[0 * $chars + $idx] & 0x01) << 7) |
+                (($in[1 * $chars + $idx] & 0x01) << 6) |
+                (($in[2 * $chars + $idx] & 0x01) << 5) |
+                (($in[3 * $chars + $idx] & 0x01) << 4) |
+                (($in[4 * $chars + $idx] & 0x01) << 3) |
+                (($in[5 * $chars + $idx] & 0x01) << 2) |
+                (($in[6 * $chars + $idx] & 0x01) << 1) |
+                (($in[7 * $chars + $idx] & 0x01))
+            ),
+            chr(
+                (($in[8 * $chars + $idx] & 0x01) << 7) |
+                (($in[9 * $chars + $idx] & 0x01) << 6) |
+                (($in[10 * $chars + $idx] & 0x01) << 5) |
+                (($in[11 * $chars + $idx] & 0x01) << 4) |
+                (($in[12 * $chars + $idx] & 0x01) << 3) |
+                (($in[13 * $chars + $idx] & 0x01) << 2) |
+                (($in[14 * $chars + $idx] & 0x01) >> 1) |
+                (($in[15 * $chars + $idx] & 0x01))
+            ),
+            chr(0)
+        ]);
+    }
+
+    public function __construct(array $unifontFile)
+    {
+        $this -> unifontFile = $unifontFile;
+    }
+
+    public function getGlyph($codePoint)
+    {
+        // Binary search for correct line.
+        $min = 0;
+        $max = count($this -> unifontFile) - 1;
+        $foundId = 0;
+        // Bias toward low side if file is > 255.
+        $m = min(count($this -> unifontFile) - 1, 255);
+        while ($min <= $max) {
+            $thisCodePoint = hexdec(substr($this -> unifontFile[$m], 0, 4));
+            if ($codePoint === $thisCodePoint) {
+                $foundId = $m;
+                break;
+            } elseif ($codePoint < $thisCodePoint) {
+                $max = $m - 1;
+            } else {
+                $min = $m + 1;
+            }
+            $m = floor(($min + $max) / 2);
+        }
+        $unifontLine = $this -> unifontFile[$foundId];
+
+        // Convert to column format
+        $binStr = unpack("C*", pack("H*", substr($unifontLine, 5)));
+        $bytes = count($binStr);
+        if ($bytes == 32) {
+            $width = 16;
+            $colFormat = UnifontGlyphFactory::colFormat16($binStr);
+        } elseif ($bytes == 16) {
+            $width = 8;
+            $colFormat = UnifontGlyphFactory::colFormat8($binStr);
+        }
+        // Write to obj
+        $glyph = new ColumnFormatGlyph();
+        $glyph -> width = $width;
+        $glyph -> data = $colFormat;
+        return $glyph;
+    }
+}

+ 104 - 0
vendor/mike42/escpos-php/src/Mike42/Escpos/Experimental/Unifont/UnifontPrintBuffer.php

@@ -0,0 +1,104 @@
+<?php
+
+/**
+ * This file is part of escpos-php: PHP receipt printer library for use with
+ * ESC/POS-compatible thermal and impact printers.
+ *
+ * Copyright (c) 2014-20 Michael Billington < michael.billington@gmail.com >,
+ * incorporating modifications by others. See CONTRIBUTORS.md for a full list.
+ *
+ * This software is distributed under the terms of the MIT license. See LICENSE.md
+ * for details.
+ */
+
+declare(strict_types=1);
+
+namespace Mike42\Escpos\Experimental\Unifont;
+
+use Mike42\Escpos\PrintBuffers\PrintBuffer;
+use Mike42\Escpos\Printer;
+
+class UnifontPrintBuffer implements PrintBuffer
+{
+    private $printer;
+    private $fontMap;
+    private $started;
+    private $unifont;
+
+    public function __construct(string $unifontFilename)
+    {
+        // Create UnifontGlyphFactory by reading from file
+        $unifont = file_get_contents($unifontFilename);
+        if ($unifont === false) {
+            throw new \Exception("Could not read $unifontFilename");
+        }
+        $unifontFileLines = explode("\n", $unifont);
+        $this -> unifont = new UnifontGlyphFactory($unifontFileLines);
+        // Everything else is null
+        $this -> printer = null;
+        $this -> fontMap = null;
+        $this -> started = false;
+    }
+
+    public function writeChar(int $codePoint)
+    {
+        if ($codePoint == 10) {
+            $this -> write("\n");
+        } elseif ($codePoint == 13) {
+            // Ignore CR char
+        } else {
+            // Straight column-format prints
+            $this -> fontMap -> writeChar($codePoint);
+        }
+    }
+    
+    public function writeText(string $text)
+    {
+        if (!$this -> started) {
+            $mode = Printer::MODE_FONT_B | Printer::MODE_DOUBLE_HEIGHT | Printer::MODE_DOUBLE_WIDTH;
+            $this -> printer -> getPrintConnector() -> write(Printer::ESC . "!" . chr($mode));
+            $this -> printer -> selectUserDefinedCharacterSet(true);
+        }
+        // Normalize text - this replaces combining characters with composed glyphs, and also helps us eliminated bad UTF-8 early
+        $text = \Normalizer::normalize($text);
+        if ($text === false) {
+            throw new \Exception("Input must be UTF-8");
+        }
+        // Iterate code points
+        $codePointIterator = \IntlBreakIterator::createCodePointInstance();
+        $codePointIterator->setText($text);
+        while ($codePointIterator->next() > 0) {
+            $codePoint = $codePointIterator->getLastCodePoint();
+            $this->writeChar($codePoint);
+        }
+    }
+    
+    public function flush()
+    {
+    }
+    
+    public function setPrinter(Printer $printer = null)
+    {
+        $this -> printer = $printer;
+        $this -> fontMap = new FontMap($this -> unifont, $this -> printer);
+    }
+    
+    public function writeTextRaw(string $text)
+    {
+    }
+    
+    public function getPrinter()
+    {
+        return $this -> printer;
+    }
+    
+    /**
+     * Write data to the underlying connector.
+     *
+     * @param string $data
+     */
+    private function write($data)
+    {
+        $this -> printer -> getPrintConnector() -> write($data);
+    }
+}

+ 88 - 0
vendor/mike42/escpos-php/src/Mike42/Escpos/GdEscposImage.php

@@ -0,0 +1,88 @@
+<?php
+
+/**
+ * This file is part of escpos-php: PHP receipt printer library for use with
+ * ESC/POS-compatible thermal and impact printers.
+ *
+ * Copyright (c) 2014-20 Michael Billington < michael.billington@gmail.com >,
+ * incorporating modifications by others. See CONTRIBUTORS.md for a full list.
+ *
+ * This software is distributed under the terms of the MIT license. See LICENSE.md
+ * for details.
+ */
+
+declare(strict_types=1);
+
+namespace Mike42\Escpos;
+
+use Exception;
+
+/**
+ * Implementation of EscposImage using the GD PHP plugin.
+ */
+class GdEscposImage extends EscposImage
+{
+    /**
+     * Load an image from disk, into memory, using GD.
+     *
+     * @param string|null $filename The filename to load from
+     * @throws Exception if the image format is not supported,
+     *  or the file cannot be opened.
+     */
+    protected function loadImageData(string $filename = null)
+    {
+        if ($filename === null) {
+            /* Set to blank image */
+            return parent::loadImageData($filename);
+        }
+        
+        $ext = pathinfo($filename, PATHINFO_EXTENSION);
+        switch ($ext) {
+            case "png":
+                $im = @imagecreatefrompng($filename);
+                break;
+            case "jpg":
+                $im = @imagecreatefromjpeg($filename);
+                break;
+            case "gif":
+                $im = @imagecreatefromgif($filename);
+                break;
+            default:
+                throw new Exception("Image format not supported in GD");
+        }
+        $this -> readImageFromGdResource($im);
+    }
+
+    /**
+     * Load actual image pixels from GD resource.
+     *
+     * @param resource $im GD resource to use
+     * @throws Exception Where the image can't be read.
+     */
+    public function readImageFromGdResource($im)
+    {
+        if (!is_resource($im) && !$im instanceof \GdImage) {
+            throw new Exception("Failed to load image.");
+        } elseif (!EscposImage::isGdLoaded()) {
+            throw new Exception(__FUNCTION__ . " requires 'gd' extension.");
+        }
+        /* Make a string of 1's and 0's */
+        $imgHeight = imagesy($im);
+        $imgWidth = imagesx($im);
+        $imgData = str_repeat("\0", $imgHeight * $imgWidth);
+        for ($y = 0; $y < $imgHeight; $y++) {
+            for ($x = 0; $x < $imgWidth; $x++) {
+                /* Faster to average channels, blend alpha and negate the image here than via filters (tested!) */
+                $cols = imagecolorsforindex($im, imagecolorat($im, $x, $y));
+                // 1 for white, 0 for black, ignoring transparency
+                $greyness = (int)(($cols['red'] + $cols['green'] + $cols['blue']) / 3) >> 7;
+                // 1 for black, 0 for white, taking into account transparency
+                $black = (1 - $greyness) >> ($cols['alpha'] >> 6);
+                $imgData[$y * $imgWidth + $x] = $black;
+            }
+        }
+        $this -> setImgWidth($imgWidth);
+        $this -> setImgHeight($imgHeight);
+        $this -> setImgData($imgData);
+    }
+}

+ 272 - 0
vendor/mike42/escpos-php/src/Mike42/Escpos/ImagickEscposImage.php

@@ -0,0 +1,272 @@
+<?php declare(strict_types=1);
+/**
+ * This file is part of escpos-php: PHP receipt printer library for use with
+ * ESC/POS-compatible thermal and impact printers.
+ *
+ * Copyright (c) 2014-20 Michael Billington < michael.billington@gmail.com >,
+ * incorporating modifications by others. See CONTRIBUTORS.md for a full list.
+ *
+ * This software is distributed under the terms of the MIT license. See LICENSE.md
+ * for details.
+ */
+
+namespace Mike42\Escpos;
+
+use Exception;
+use Imagick;
+
+/**
+ * Implementation of EscposImage using the Imagick PHP plugin.
+ */
+class ImagickEscposImage extends EscposImage
+{
+    /**
+     * Load actual image pixels from Imagick object
+     *
+     * @param Imagick $im Image to load from
+     */
+    public function readImageFromImagick(Imagick $im)
+    {
+        /* Strip transparency */
+        $im = self::alphaRemove($im);
+        /* Threshold */
+        $im -> setImageType(Imagick::IMGTYPE_TRUECOLOR); // Remove transparency (good for PDF's)
+        $max = $im->getQuantumRange();
+        $max = $max["quantumRangeLong"];
+        $im -> thresholdImage(0.5 * $max);
+        /* Make a string of 1's and 0's */
+        $imgHeight = $im -> getimageheight();
+        $imgWidth = $im -> getimagewidth();
+        $imgData = str_repeat("\0", $imgHeight * $imgWidth);
+        for ($y = 0; $y < $imgHeight; $y++) {
+            for ($x = 0; $x < $imgWidth; $x++) {
+                /* Faster to average channels, blend alpha and negate the image here than via filters (tested!) */
+                $cols = $im -> getImagePixelColor($x, $y);
+                $cols = $cols -> getcolor();
+                $greyness = (int)(($cols['r'] + $cols['g'] + $cols['b']) / 3) >> 7;  // 1 for white, 0 for black
+                $imgData[$y * $imgWidth + $x] = (1 - $greyness); // 1 for black, 0 for white
+            }
+        }
+        $this -> setImgWidth($imgWidth);
+        $this -> setImgHeight($imgHeight);
+        $this -> setImgData($imgData);
+    }
+
+    /**
+     * @param string $filename
+     *  Filename to load from
+     * @param boolean $highDensityVertical
+     *  True for high density output (24px lines), false for regular density (8px)
+     * @return string[]|NULL
+     *  Column format data as array, or NULL if optimised renderer isn't
+     *  available in this implementation.
+     */
+    protected function getColumnFormatFromFile($filename = null, $highDensityVertical = true)
+    {
+        if ($filename === null) {
+            return null;
+        }
+        $im = $this -> getImageFromFile($filename);
+        $this -> setImgWidth($im -> getimagewidth());
+        $this -> setImgHeight($im -> getimageheight());
+        
+        /* Strip transparency */
+        $im = self::alphaRemove($im);
+        $im -> setformat('pbm');
+        $im -> getimageblob(); // Forces 1-bit rendering now, so that subsequent operations are faster
+        $im -> rotateImage('#fff', 90.0);
+        $im -> flopImage();
+        $lineHeight = $highDensityVertical ? 3 : 1;
+        $blobs = $this -> getColumnFormatFromImage($im, $lineHeight * 8);
+        return $blobs;
+    }
+
+    /**
+     * Load an image from disk, into memory, using Imagick.
+     *
+     * @param string|null $filename The filename to load from
+     * @throws Exception if the image format is not supported,
+     *  or the file cannot be opened.
+     */
+    protected function loadImageData(string $filename = null)
+    {
+        if ($filename === null) {
+            /* Set to blank image */
+            return parent::loadImageData($filename);
+        }
+    
+        $im = $this -> getImageFromFile($filename);
+        $this -> readImageFromImagick($im);
+    }
+
+    /**
+     * Return data in column format as array of slices.
+     * Operates recursively to save cloning larger image many times.
+     *
+     * @param Imagick $im
+     * @param int $lineHeight
+     *          Height of printed line in dots. 8 or 24.
+     * @return string[]
+     */
+    private function getColumnFormatFromImage(Imagick $im, int $lineHeight)
+    {
+        $imgWidth = $im->getimagewidth();
+        if ($imgWidth == $lineHeight) {
+            // Return glob of this panel
+            return [$this -> getRasterBlobFromImage($im)];
+        } elseif ($imgWidth > $lineHeight) {
+            // Calculations
+            $slicesLeft = (int)ceil($imgWidth / $lineHeight / 2); // TODO avoid use of floats with intdiv()
+            $widthLeft = $slicesLeft * $lineHeight;
+            $widthRight = $imgWidth - $widthLeft;
+            // Slice up (left)
+            $left = clone $im;
+            $left -> extentimage($widthLeft, $left -> getimageheight(), 0, 0);
+            // Slice up (right - ensure width is divisible by lineHeight also)
+            $right = clone $im;
+            $widthRightRounded = $widthRight < $lineHeight ? $lineHeight : $widthRight;
+            $right -> extentimage($widthRightRounded, $right -> getimageheight(), $widthLeft, 0);
+            // Recurse
+            $leftBlobs = $this -> getColumnFormatFromImage($left, $lineHeight);
+            $rightBlobs = $this -> getColumnFormatFromImage($right, $lineHeight);
+            return array_merge($leftBlobs, $rightBlobs);
+        } else {
+            /* Image is smaller than full width */
+            $im -> extentimage($lineHeight, $im -> getimageheight(), 0, 0);
+            return [$this -> getRasterBlobFromImage($im)];
+        }
+    }
+
+    /**
+     * Load Imagick file from image
+     *
+     * @param string $filename Filename to load
+     * @throws Exception Wrapped Imagick error if image can't be loaded
+     * @return Imagick Loaded image
+     */
+    private function getImageFromFile($filename)
+    {
+        $im = new Imagick();
+        try {
+            $im -> setResourceLimit(6, 1); // Prevent libgomp1 segfaults, grumble grumble.
+            $im -> readimage($filename);
+        } catch (\ImagickException $e) {
+            /* Re-throw as normal exception */
+            throw new Exception($e -> getMessage());
+        }
+        return $im;
+    }
+
+    /**
+     * Pull blob (from PBM-formatted image only!), and spit out a blob or raster data.
+     * Will crash out on anything which is not a valid 'P4' file.
+     *
+     * @param Imagick $im Image which has format PBM.
+     * @return string raster data from the image
+     */
+    private function getRasterBlobFromImage(Imagick $im)
+    {
+        $blob = $im -> getimageblob();
+        /* Find where header ends */
+        $i = strpos($blob, "P4\n") + 2;
+        while ($blob[$i + 1] == '#') {
+            $i = strpos($blob, "\n", $i + 1);
+        }
+        $i = strpos($blob, "\n", $i + 1);
+        /* Return raster data only */
+        $subBlob = substr($blob, $i + 1);
+        return $subBlob;
+    }
+
+    /**
+     * @param string $filename
+     *  Filename to load from
+     * @return string|NULL
+     *  Raster format data, or NULL if no optimised renderer is available in
+     *  this implementation.
+     */
+    protected function getRasterFormatFromFile($filename = null)
+    {
+        if ($filename === null) {
+            return null;
+        }
+        $im = $this -> getImageFromFile($filename);
+        $this -> setImgWidth($im -> getimagewidth());
+        $this -> setImgHeight($im -> getimageheight());
+        /* Convert to PBM and extract raster portion */
+        $im = self::alphaRemove($im);
+        $im -> setFormat('pbm');
+        return $this -> getRasterBlobFromImage($im);
+    }
+
+    /**
+     * Load a PDF for use on the printer
+     *
+     * @param string $pdfFile
+     *  The file to load
+     * @param int $pageWidth
+     *  The width, in pixels, of the printer's output. The first page of the
+     *  PDF will be scaled to approximately fit in this area.
+     * @throws Exception Where Imagick is not loaded, or where a missing file
+     *  or invalid page number is requested.
+     * @return array Array of images, retrieved from the PDF file.
+     */
+    public static function loadPdf($pdfFile, int $pageWidth = 550)
+    {
+        if (!EscposImage::isImagickLoaded()) {
+            throw new Exception(__FUNCTION__ . " requires imagick extension.");
+        }
+        /*
+         * Load first page at very low density (resolution), to figure out what
+         * density to use to achieve $pageWidth
+         */
+        try {
+            $image = new Imagick();
+            $testRes = 2; // Test resolution
+            $image -> setresolution($testRes, $testRes);
+            /* Load document just to measure geometry */
+            $image -> readimage($pdfFile);
+            $geo = $image -> getimagegeometry();
+            $image -> destroy();
+            $width = $geo['width'];
+            $newRes = $pageWidth / $width * $testRes;
+            /* Load entire document in */
+            $image -> setresolution($newRes, $newRes);
+            $image -> readImage($pdfFile);
+            $pages = $image -> getNumberImages();
+            /* Convert images to Escpos objects */
+            $ret = [];
+            for ($i = 0; $i < $pages; $i++) {
+                $image -> setIteratorIndex($i);
+                $ep = new ImagickEscposImage();
+                $ep -> readImageFromImagick($image);
+                $ret[] = $ep;
+            }
+            return $ret;
+        } catch (\ImagickException $e) {
+            /* Wrap in normal exception, so that classes which call this do not
+             * themselves require imagick as a dependency. */
+            throw new Exception($e -> getMessage());
+        }
+    }
+
+    /**
+     * Paste image over white canvas to stip transparency reliably on different
+     * versions of ImageMagick.
+     *
+     * There are other methods for this:
+     * - flattenImages() is deprecated
+     * - setImageAlphaChannel(Imagick::ALPHACHANNEL_REMOVE) is not available on
+     *      ImageMagick < 6.8.
+     *
+     * @param Imagick $im Image to flatten
+     * @return Imagick Flattened image
+     */
+    private static function alphaRemove(Imagick $im)
+    {
+        $flat = new Imagick();
+        $flat -> newImage($im -> getimagewidth(), $im -> getimageheight(), "white", $im -> getimageformat());
+        $flat -> compositeimage($im, Imagick::COMPOSITE_OVER, 0, 0);
+        return $flat;
+    }
+}

+ 40 - 0
vendor/mike42/escpos-php/src/Mike42/Escpos/NativeEscposImage.php

@@ -0,0 +1,40 @@
+<?php
+
+/**
+ * This file is part of escpos-php: PHP receipt printer library for use with
+ * ESC/POS-compatible thermal and impact printers.
+ *
+ * Copyright (c) 2014-20 Michael Billington < michael.billington@gmail.com >,
+ * incorporating modifications by others. See CONTRIBUTORS.md for a full list.
+ *
+ * This software is distributed under the terms of the MIT license. See LICENSE.md
+ * for details.
+ */
+
+declare(strict_types=1);
+
+namespace Mike42\Escpos;
+
+use Mike42\GfxPhp\Image;
+
+/**
+ * Implementation of EscposImage using only native PHP.
+ */
+class NativeEscposImage extends EscposImage
+{
+    protected function loadImageData(string $filename = null)
+    {
+        $image = Image::fromFile($filename) -> toRgb() -> toBlackAndWhite();
+        $imgHeight = $image -> getHeight();
+        $imgWidth = $image -> getWidth();
+        $imgData = str_repeat("\0", $imgHeight * $imgWidth);
+        for ($y = 0; $y < $imgHeight; $y++) {
+            for ($x = 0; $x < $imgWidth; $x++) {
+                $imgData[$y * $imgWidth + $x] = $image -> getPixel($x, $y) == 0 ? 0: 1;
+            }
+        }
+        $this -> setImgWidth($imgWidth);
+        $this -> setImgHeight($imgHeight);
+        $this -> setImgData($imgData);
+    }
+}

+ 304 - 0
vendor/mike42/escpos-php/src/Mike42/Escpos/PrintBuffers/EscposPrintBuffer.php

@@ -0,0 +1,304 @@
+<?php
+
+/**
+ * This file is part of escpos-php: PHP receipt printer library for use with
+ * ESC/POS-compatible thermal and impact printers.
+ *
+ * Copyright (c) 2014-20 Michael Billington < michael.billington@gmail.com >,
+ * incorporating modifications by others. See CONTRIBUTORS.md for a full list.
+ *
+ * This software is distributed under the terms of the MIT license. See LICENSE.md
+ * for details.
+ */
+
+declare(strict_types=1);
+
+namespace Mike42\Escpos\PrintBuffers;
+
+use LogicException;
+use Mike42\Escpos\CodePage;
+use Mike42\Escpos\Printer;
+
+/**
+ * This class manages newlines and character encoding for the target printer, and
+ * can be interchanged for an image-bassed buffer (ImagePrintBuffer) if you can't
+ * get it operating properly on your machine.
+ */
+class EscposPrintBuffer implements PrintBuffer
+{
+    /**
+     *  True to cache output as .z, false to leave un-compressed (useful for debugging)
+     */
+    const COMPRESS_CACHE = true;
+
+    /**
+     * Un-recognised characters will be replaced with this.
+     */
+    const REPLACEMENT_CHAR = "?";
+
+    /**
+     * @var array $available
+     * Map code points to printer-specific code page numbers which contain them
+     */
+    private $available = null;
+
+    /**
+     * @var array $encode
+     * Map code pages to a map of code points to encoding-specific characters 128-255
+     */
+    private $encode = null;
+
+    /**
+     * @var Printer|null $printer
+     *  Printer for output
+     */
+    private $printer;
+
+    /**
+     * Empty print buffer.
+     */
+    public function __construct()
+    {
+        $this -> printer = null;
+    }
+
+    public function flush()
+    {
+        if ($this -> printer == null) {
+            throw new LogicException("Not attached to a printer.");
+        }
+        // TODO Not yet implemented for this buffer: This indicates that the printer needs the current line to be ended.
+    }
+
+    public function getPrinter()
+    {
+        return $this -> printer;
+    }
+
+    public function setPrinter(Printer $printer = null)
+    {
+        $this -> printer = $printer;
+        if ($printer != null) {
+            $this -> loadAvailableCharacters();
+        }
+    }
+
+    public function writeText(string $text)
+    {
+        if ($this->printer == null) {
+            throw new LogicException("Not attached to a printer.");
+        }
+        // Normalize text - this replaces combining characters with composed glyphs, and also helps us eliminated bad UTF-8 early
+        $text = \Normalizer::normalize($text);
+        if ($text === false) {
+            throw new \Exception("Input must be UTF-8");
+        }
+        // Iterate code points
+        $codePointIterator = \IntlBreakIterator::createCodePointInstance();
+        $codePointIterator->setText($text);
+        $encoding = $this->printer->getCharacterTable();
+        $currentBlock = [];
+        while ($codePointIterator->next() > 0) {
+            // Write each code point
+            $codePoint = $codePointIterator->getLastCodePoint();
+            // See if we need to change code pages
+            $matching = !isset($this->available[$codePoint]) || isset($this->encode[$encoding][$codePoint]);
+            if ($matching) {
+                $currentBlock[] = $codePoint;
+            } else {
+                // Write what we have
+                $this->writeTextUsingEncoding($currentBlock, $encoding);
+                // New encoding..
+                $encoding = self::identifyText($codePoint);
+                $currentBlock = [$codePoint];
+            }
+        }
+        // Write out last bytes
+        if (count($currentBlock) != 0) {
+            $this->writeTextUsingEncoding($currentBlock, $encoding);
+        }
+    }
+
+    public function writeTextRaw(string $text)
+    {
+        if ($this -> printer == null) {
+            throw new LogicException("Not attached to a printer.");
+        }
+        if (strlen($text) == 0) {
+            return;
+        }
+        // Pass only printable characters
+        $j = 0;
+        $l = strlen($text);
+        $outp = str_repeat(self::REPLACEMENT_CHAR, $l);
+        for ($i = 0; $i < $l; $i++) {
+            $c = substr($text, $i, 1);
+            if ($c == "\r") {
+                /* Skip past Windows line endings (raw usage). */
+                continue;
+            } elseif (self::asciiCheck($c, true)) {
+                $outp[$j] = $c;
+            }
+            $j++;
+        }
+        $this -> write(substr($outp, 0, $j));
+    }
+
+    /**
+     * Return an encoding which we can start to use for outputting this text.
+     * Later parts of the text need not be included in the returned code page.
+     *
+     * @param int $codePoint Code point to check.
+     * @return boolean|integer Code page number, or FALSE if the text is not
+     *  printable on any supported encoding.
+     */
+    private function identifyText(int $codePoint)
+    {
+        if (!isset($this -> available[$codePoint])) {
+            /* Character not available anywhere */
+            return false;
+        }
+        return $this -> available[$codePoint];
+    }
+
+    /**
+     * Based on the printer's connector, compute (or load a cached copy of) maps
+     * of UTF character to unicode characters for later use.
+     */
+    private function loadAvailableCharacters()
+    {
+        $profile = $this -> printer -> getPrinterCapabilityProfile();
+        $supportedCodePages = $profile -> getCodePages();
+        $profileName = $profile -> getId();
+        $cacheFile = dirname(__FILE__) . "/cache/Characters-" . $profileName . ".ser" .
+            (self::COMPRESS_CACHE ? ".z" : "");
+        $cacheKey = $profile -> getCodePageCacheKey();
+        /* Check for pre-generated file */
+        if (file_exists($cacheFile)) {
+            $cacheData = file_get_contents($cacheFile);
+            if (self::COMPRESS_CACHE) {
+                $cacheData = gzuncompress($cacheData);
+            }
+            if ($cacheData) {
+                $dataArray = unserialize($cacheData);
+                if (isset($dataArray["key"]) && isset($dataArray["available"]) &&
+                        isset($dataArray["encode"]) && $dataArray["key"] == $cacheKey) {
+                    $this -> available = $dataArray["available"];
+                    $this -> encode = $dataArray["encode"];
+                    return;
+                }
+            }
+        }
+
+        /* Generate conversion tables */
+        $encodeLegacy = [];
+        $encode = [];
+        $available = [];
+
+        foreach ($supportedCodePages as $num => $codePage) {
+            $encodeLegacy[$num] = [];
+            if (!$codePage -> isEncodable()) {
+                continue;
+            }
+            $map = $codePage -> getDataArray();
+            $encodeMap = [];
+            for ($char = 128; $char <= 255; $char++) {
+                $codePoint = $map[$char - 128];
+                if ($codePoint == CodePage::MISSING_CHAR_CODE) { // Skip placeholders
+                    continue;
+                }
+                $encodeMap[$codePoint] = $char;
+                if (!isset($available[$codePoint])) {
+                    $available[$codePoint] = $num;
+                }
+            }
+            $encode[$num] = $encodeMap;
+        }
+        
+        /* Use generated data */
+        $dataArray = [
+            "available" => $available,
+            "encode" => $encode,
+            "key" => $cacheKey
+        ];
+        $this -> available = $available;
+        $this -> encode = $encode;
+
+        $cacheData = serialize($dataArray);
+        if (self::COMPRESS_CACHE) {
+            $cacheData = gzcompress($cacheData);
+        }
+        /* Attempt to cache, but don't worry if we can't */
+        @file_put_contents($cacheFile, $cacheData);
+    }
+
+    /**
+     * Encode a block of text using the specified map, and write it to the printer.
+     *
+     * @param array $codePoints Text to print, as list of unicode code points
+     * @param integer $encodingNo Encoding number to use- assumed to exist.
+     */
+    private function writeTextUsingEncoding(array $codePoints, int $encodingNo)
+    {
+        $encodeMap = $this -> encode[$encodingNo];
+        $len = count($codePoints);
+
+        $rawText = str_repeat(self::REPLACEMENT_CHAR, $len);
+        $bytesWritten = 0;
+        $cr = 0x0D; // extra character from line endings on Windows
+        for ($i = 0; $i < $len; $i++) {
+            $codePoint = $codePoints[$i];
+            if (isset($encodeMap[$codePoint])) {
+                // Printable via selected code page
+                $rawText[$bytesWritten] = chr($encodeMap[$codePoint]);
+            } elseif (($codePoint > 31 && $codePoint < 127) || $codePoint == 10) {
+                // Printable as ASCII
+                $rawText[$bytesWritten] = chr($codePoint);
+            } elseif ($codePoint === $cr) {
+                // Skip past Windows line endings, LF is fine
+                continue;
+            }
+            $bytesWritten++;
+        }
+        if ($this -> printer -> getCharacterTable() != $encodingNo) {
+            $this -> printer -> selectCharacterTable($encodingNo);
+        }
+        $this -> writeTextRaw(substr($rawText, 0, $bytesWritten));
+    }
+
+    /**
+     * Write data to the underlying printer.
+     *
+     * @param string $data
+     */
+    private function write(string $data)
+    {
+        $this -> printer -> getPrintConnector() -> write($data);
+    }
+
+    /**
+     * Return true if a character is an ASCII printable character.
+     *
+     * @param string $char Character to check
+     * @param boolean $extended True to allow 128-256 values also (excluded by default)
+     * @return boolean True if the character is printable, false if it is not.
+     */
+    private static function asciiCheck(string $char, bool $extended = false)
+    {
+        if (strlen($char) != 1) {
+            // Multi-byte string
+            return false;
+        }
+        $num = ord($char);
+        if ($num > 31 && $num < 127) { // Printable
+            return true;
+        }
+        if ($num == 10) { // New-line (printer will take these)
+            return true;
+        }
+        if ($extended && $num > 127) {
+            return true;
+        }
+        return false;
+    }
+}

+ 138 - 0
vendor/mike42/escpos-php/src/Mike42/Escpos/PrintBuffers/ImagePrintBuffer.php

@@ -0,0 +1,138 @@
+<?php
+
+/**
+ * This file is part of escpos-php: PHP receipt printer library for use with
+ * ESC/POS-compatible thermal and impact printers.
+ *
+ * Copyright (c) 2014-20 Michael Billington < michael.billington@gmail.com >,
+ * incorporating modifications by others. See CONTRIBUTORS.md for a full list.
+ *
+ * This software is distributed under the terms of the MIT license. See LICENSE.md
+ * for details.
+ */
+
+declare(strict_types=1);
+
+namespace Mike42\Escpos\PrintBuffers;
+
+use Exception;
+use LogicException;
+use Mike42\Escpos\Printer;
+use Mike42\Escpos\EscposImage;
+use Mike42\Escpos\ImagickEscposImage;
+
+/**
+ * This class renders text to small images on-the-fly. It attempts to mimic the
+ * behaviour of text output, whilst supporting any fonts & character encodings
+ * which your system can handle. This class currently requires Imagick.
+ */
+class ImagePrintBuffer implements PrintBuffer
+{
+    private $printer;
+
+    /**
+     * @var string|null font to use
+     */
+    private $font;
+
+    private $fontSize;
+
+    public function __construct()
+    {
+        if (!EscposImage::isImagickLoaded()) {
+            throw new Exception("ImagePrintBuffer requires the imagick extension");
+        }
+        $this -> font = null;
+        $this -> fontSize = 24;
+    }
+
+    public function flush()
+    {
+        if ($this -> printer == null) {
+            throw new LogicException("Not attached to a printer.");
+        }
+    }
+
+    public function getPrinter()
+    {
+        return $this -> printer;
+    }
+
+    public function setPrinter(Printer $printer = null)
+    {
+        $this -> printer = $printer;
+    }
+
+    public function writeText(string $text)
+    {
+        if ($this -> printer == null) {
+            throw new LogicException("Not attached to a printer.");
+        }
+        if ($text == null) {
+            return;
+        }
+        $text = trim($text, "\n");
+        /* Create Imagick objects */
+        $image = new \Imagick();
+        $draw = new \ImagickDraw();
+        $color = new \ImagickPixel('#000000');
+        $background = new \ImagickPixel('white');
+            
+        /* Create annotation */
+        if ($this->font !== null) {
+            // Allow fallback on defaults as necessary
+            $draw->setFont($this->font);
+        }
+        /* In Arial, size 21 looks good as a substitute for FONT_B, 24 for FONT_A */
+        $draw -> setFontSize($this -> fontSize);
+        $draw -> setFillColor($color);
+        $draw -> setStrokeAntialias(true);
+        $draw -> setTextAntialias(true);
+        $metrics = $image -> queryFontMetrics($draw, $text);
+        $draw -> annotation(0, $metrics['ascender'], $text);
+
+        /* Create image & draw annotation on it */
+        $image -> newImage($metrics['textWidth'], $metrics['textHeight'], $background);
+        $image -> setImageFormat('png');
+        $image -> drawImage($draw);
+        // debugging if you want to view the images yourself
+        //$image -> writeImage("test.png");
+
+        /* Save image */
+        $escposImage = new ImagickEscposImage();
+        $escposImage -> readImageFromImagick($image);
+        $size = Printer::IMG_DEFAULT;
+        $this -> printer -> bitImage($escposImage, $size);
+    }
+
+    public function writeTextRaw(string $text)
+    {
+        if ($this -> printer == null) {
+            throw new LogicException("Not attached to a printer.");
+        }
+        $this -> printer -> getPrintConnector() -> write($text);
+    }
+
+    /**
+     * Set path on disk to TTF font that will be used to render text to image,
+     * or 'null' to use a default.
+     *
+     * ImageMagick will also accept a font name, but this will not port as well
+     * between systems.
+     *
+     * @param string $font
+     *            Font name or a filename
+     */
+    public function setFont(string $font)
+    {
+        $this->font = $font;
+    }
+
+    /**
+     * Numeric font size for rendering text to image
+     */
+    public function setFontSize(int $fontSize)
+    {
+        $this->fontSize = $fontSize;
+    }
+}

+ 66 - 0
vendor/mike42/escpos-php/src/Mike42/Escpos/PrintBuffers/PrintBuffer.php

@@ -0,0 +1,66 @@
+<?php
+
+/**
+ * This file is part of escpos-php: PHP receipt printer library for use with
+ * ESC/POS-compatible thermal and impact printers.
+ *
+ * Copyright (c) 2014-20 Michael Billington < michael.billington@gmail.com >,
+ * incorporating modifications by others. See CONTRIBUTORS.md for a full list.
+ *
+ * This software is distributed under the terms of the MIT license. See LICENSE.md
+ * for details.
+ */
+
+declare(strict_types=1);
+
+namespace Mike42\Escpos\PrintBuffers;
+
+use Mike42\Escpos\Printer;
+
+/**
+ * Print buffers manage newlines and character encoding for the target printer.
+ * They are used as a swappable component: text or image-based output.
+ *
+ * - Text output (EscposPrintBuffer) is the fast default, and is recommended for
+ *   most people, as the text output can be more directly manipulated by ESC/POS
+ *   commands.
+ * - Image output (ImagePrintBuffer) is designed to accept more encodings than the
+ *   physical printer supports, by rendering the text to small images on-the-fly.
+ *   This takes a lot more CPU than sending text, but is necessary for some users.
+ * - If your use case fits outside these, then a further speed/flexibility trade-off
+ *   can be made by printing directly from generated HTML or PDF.
+ */
+interface PrintBuffer
+{
+    /**
+     * Cause the buffer to send any partial input and wait on a newline.
+     * If the printer is already on a new line, this does nothing.
+     */
+    public function flush();
+
+    /**
+     * Used by Escpos to check if a printer is set.
+     */
+    public function getPrinter();
+
+    /**
+     * Used by Escpos to hook up one-to-one link between buffers and printers.
+     *
+     * @param Printer|null $printer New printer
+     */
+    public function setPrinter(Printer $printer = null);
+
+    /**
+     * Accept UTF-8 text for printing.
+     *
+     * @param string $text Text to print
+     */
+    public function writeText(string $text);
+
+    /**
+     * Accept 8-bit text in the current encoding and add it to the buffer.
+     *
+     * @param string $text Text to print, already the target encoding.
+     */
+    public function writeTextRaw(string $text);
+}

BIN
vendor/mike42/escpos-php/src/Mike42/Escpos/PrintBuffers/cache/Characters-OCD-300.ser.z


BIN
vendor/mike42/escpos-php/src/Mike42/Escpos/PrintBuffers/cache/Characters-default.ser.z


BIN
vendor/mike42/escpos-php/src/Mike42/Escpos/PrintBuffers/cache/Characters-simple.ser.z


Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä