liaofei 3 gadi atpakaļ
vecāks
revīzija
d847cd700b
100 mainītis faili ar 6563 papildinājumiem un 131 dzēšanām
  1. 32 0
      crmeb/app/common.php
  2. 2 1
      crmeb/composer.json
  3. 127 2
      crmeb/composer.lock
  4. 50 0
      crmeb/config/ajcaptcha.php
  5. 5 0
      crmeb/vendor/autoload.php
  6. 9 7
      crmeb/vendor/composer/InstalledVersions.php
  7. 1 1
      crmeb/vendor/composer/autoload_classmap.php
  8. 3 3
      crmeb/vendor/composer/autoload_files.php
  9. 1 1
      crmeb/vendor/composer/autoload_namespaces.php
  10. 3 1
      crmeb/vendor/composer/autoload_psr4.php
  11. 4 27
      crmeb/vendor/composer/autoload_real.php
  12. 15 2
      crmeb/vendor/composer/autoload_static.php
  13. 131 0
      crmeb/vendor/composer/installed.json
  14. 104 86
      crmeb/vendor/composer/installed.php
  15. 9 0
      crmeb/vendor/intervention/image/LICENSE
  16. 47 0
      crmeb/vendor/intervention/image/composer.json
  17. 11 0
      crmeb/vendor/intervention/image/provides.json
  18. 229 0
      crmeb/vendor/intervention/image/src/Intervention/Image/AbstractColor.php
  19. 364 0
      crmeb/vendor/intervention/image/src/Intervention/Image/AbstractDecoder.php
  20. 140 0
      crmeb/vendor/intervention/image/src/Intervention/Image/AbstractDriver.php
  21. 271 0
      crmeb/vendor/intervention/image/src/Intervention/Image/AbstractEncoder.php
  22. 295 0
      crmeb/vendor/intervention/image/src/Intervention/Image/AbstractFont.php
  23. 71 0
      crmeb/vendor/intervention/image/src/Intervention/Image/AbstractShape.php
  24. 81 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Commands/AbstractCommand.php
  25. 225 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Commands/Argument.php
  26. 29 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Commands/ChecksumCommand.php
  27. 35 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Commands/CircleCommand.php
  28. 36 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Commands/EllipseCommand.php
  29. 61 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Commands/ExifCommand.php
  30. 68 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Commands/IptcCommand.php
  31. 36 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Commands/LineCommand.php
  32. 48 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Commands/OrientateCommand.php
  33. 49 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Commands/PolygonCommand.php
  34. 45 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Commands/PsrResponseCommand.php
  35. 36 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Commands/RectangleCommand.php
  36. 26 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Commands/ResponseCommand.php
  37. 39 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Commands/StreamCommand.php
  38. 34 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Commands/TextCommand.php
  39. 92 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Constraint.php
  40. 8 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Exception/ImageException.php
  41. 8 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Exception/InvalidArgumentException.php
  42. 8 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Exception/MissingDependencyException.php
  43. 8 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Exception/NotFoundException.php
  44. 8 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Exception/NotReadableException.php
  45. 8 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Exception/NotSupportedException.php
  46. 8 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Exception/NotWritableException.php
  47. 8 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Exception/RuntimeException.php
  48. 19 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Facades/Image.php
  49. 92 0
      crmeb/vendor/intervention/image/src/Intervention/Image/File.php
  50. 44 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Filters/DemoFilter.php
  51. 16 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Filters/FilterInterface.php
  52. 227 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Color.php
  53. 25 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Commands/BackupCommand.php
  54. 25 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Commands/BlurCommand.php
  55. 21 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Commands/BrightnessCommand.php
  56. 29 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Commands/ColorizeCommand.php
  57. 21 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Commands/ContrastCommand.php
  58. 40 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Commands/CropCommand.php
  59. 27 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Commands/DestroyCommand.php
  60. 69 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Commands/FillCommand.php
  61. 32 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Commands/FitCommand.php
  62. 37 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Commands/FlipCommand.php
  63. 21 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Commands/GammaCommand.php
  64. 25 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Commands/GetSizeCommand.php
  65. 19 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Commands/GreyscaleCommand.php
  66. 28 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Commands/HeightenCommand.php
  67. 34 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Commands/InsertCommand.php
  68. 23 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Commands/InterlaceCommand.php
  69. 19 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Commands/InvertCommand.php
  70. 53 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Commands/LimitColorsCommand.php
  71. 83 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Commands/MaskCommand.php
  72. 31 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Commands/OpacityCommand.php
  73. 37 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Commands/PickColorCommand.php
  74. 25 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Commands/PixelCommand.php
  75. 21 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Commands/PixelateCommand.php
  76. 39 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Commands/ResetCommand.php
  77. 83 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Commands/ResizeCanvasCommand.php
  78. 84 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Commands/ResizeCommand.php
  79. 30 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Commands/RotateCommand.php
  80. 34 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Commands/SharpenCommand.php
  81. 176 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Commands/TrimCommand.php
  82. 28 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Commands/WidenCommand.php
  83. 171 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Decoder.php
  84. 89 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Driver.php
  85. 180 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Encoder.php
  86. 277 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Font.php
  87. 40 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Shapes/CircleShape.php
  88. 65 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Shapes/EllipseShape.php
  89. 90 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Shapes/LineShape.php
  90. 49 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Shapes/PolygonShape.php
  91. 76 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Shapes/RectangleShape.php
  92. 370 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Image.php
  93. 142 0
      crmeb/vendor/intervention/image/src/Intervention/Image/ImageManager.php
  94. 88 0
      crmeb/vendor/intervention/image/src/Intervention/Image/ImageManagerStatic.php
  95. 87 0
      crmeb/vendor/intervention/image/src/Intervention/Image/ImageServiceProvider.php
  96. 112 0
      crmeb/vendor/intervention/image/src/Intervention/Image/ImageServiceProviderLaravel4.php
  97. 106 0
      crmeb/vendor/intervention/image/src/Intervention/Image/ImageServiceProviderLaravelRecent.php
  98. 42 0
      crmeb/vendor/intervention/image/src/Intervention/Image/ImageServiceProviderLeague.php
  99. 34 0
      crmeb/vendor/intervention/image/src/Intervention/Image/ImageServiceProviderLumen.php
  100. 0 0
      crmeb/vendor/intervention/image/src/Intervention/Image/Imagick/Color.php

+ 32 - 0
crmeb/app/common.php

@@ -14,9 +14,11 @@ use crmeb\services\CacheService;
 use think\exception\ValidateException;
 use crmeb\services\FormBuilder as Form;
 use app\services\other\UploadService;
+use Fastknife\Service\BlockPuzzleCaptchaService;
 use app\services\system\lang\LangTypeServices;
 use app\services\system\lang\LangCodeServices;
 use app\services\system\lang\LangCountryServices;
+use think\facade\Config;
 
 if (!function_exists('getWorkerManUrl')) {
 
@@ -960,3 +962,33 @@ if (!function_exists('getLang')) {
         return $message;
     }
 }
+
+if (!function_exists('aj_captcha_check')) {
+    /**
+     * 验证滑块
+     * @param string $token
+     * @param string $pointJson
+     * @return bool
+     */
+    function aj_captcha_check(string $token, string $pointJson)
+    {
+        $config = Config::get('ajcaptcha');
+        $service = new BlockPuzzleCaptchaService($config);
+        $service->check($token, $pointJson);
+        return true;
+    }
+}
+
+
+if (!function_exists('aj_captcha_create')) {
+    /**
+     * 创建验证码
+     * @return array
+     */
+    function aj_captcha_create()
+    {
+        $config = Config::get('ajcaptcha');
+        $service = new BlockPuzzleCaptchaService($config);
+        return $service->get();
+    }
+}

+ 2 - 1
crmeb/composer.json

@@ -45,7 +45,8 @@
         "guzzlehttp/guzzle": "6.5.5",
         "alipaysdk/easysdk": "2.0",
         "lizhichao/word": "^2.1",
-        "alibabacloud/dysmsapi-20170525": "2.0.16"
+        "alibabacloud/dysmsapi-20170525": "2.0.16",
+        "fastknife/ajcaptcha": "^1.1"
     },
     "autoload": {
         "psr-4": {

+ 127 - 2
crmeb/composer.lock

@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "e082ba478114f322f42989e417c54d57",
+    "content-hash": "79e704df6a1f0e82d133706c2ab8a98e",
     "packages": [
         {
             "name": "adbario/php-dot-notation",
@@ -1040,6 +1040,41 @@
             ],
             "time": "2020-05-25T17:44:05+00:00"
         },
+        {
+            "name": "fastknife/ajcaptcha",
+            "version": "v1.1.5",
+            "source": {
+                "type": "git",
+                "url": "https://gitee.com/fastknife/aj-captcha.git",
+                "reference": "9e8eb95c444d2ff4d78d1d1d4d5cb1d29c084609"
+            },
+            "require": {
+                "ext-gd": "*",
+                "ext-iconv": "*",
+                "ext-json": "*",
+                "ext-openssl": "*",
+                "intervention/image": "^2.5",
+                "php": ">=7.1"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "Fastknife\\": "src"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "GPL-3.0-only"
+            ],
+            "authors": [
+                {
+                    "name": "bruce",
+                    "email": "2777314125@qq.com"
+                }
+            ],
+            "description": "This is a behavior verification code PHP back-end implementation package",
+            "time": "2022-07-04T10:17:37+00:00"
+        },
         {
             "name": "firebase/php-jwt",
             "version": "v5.0.0",
@@ -1453,6 +1488,96 @@
             ],
             "time": "2020-09-30T07:37:11+00:00"
         },
+        {
+            "name": "intervention/image",
+            "version": "2.7.2",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/Intervention/image.git",
+                "reference": "04be355f8d6734c826045d02a1079ad658322dad"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/Intervention/image/zipball/04be355f8d6734c826045d02a1079ad658322dad",
+                "reference": "04be355f8d6734c826045d02a1079ad658322dad",
+                "shasum": "",
+                "mirrors": [
+                    {
+                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+                        "preferred": true
+                    }
+                ]
+            },
+            "require": {
+                "ext-fileinfo": "*",
+                "guzzlehttp/psr7": "~1.1 || ^2.0",
+                "php": ">=5.4.0"
+            },
+            "require-dev": {
+                "mockery/mockery": "~0.9.2",
+                "phpunit/phpunit": "^4.8 || ^5.7 || ^7.5.15"
+            },
+            "suggest": {
+                "ext-gd": "to use GD library based image processing.",
+                "ext-imagick": "to use Imagick based image processing.",
+                "intervention/imagecache": "Caching extension for the Intervention Image library"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.4-dev"
+                },
+                "laravel": {
+                    "providers": [
+                        "Intervention\\Image\\ImageServiceProvider"
+                    ],
+                    "aliases": {
+                        "Image": "Intervention\\Image\\Facades\\Image"
+                    }
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Intervention\\Image\\": "src/Intervention/Image"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Oliver Vogel",
+                    "email": "oliver@intervention.io",
+                    "homepage": "https://intervention.io/"
+                }
+            ],
+            "description": "Image handling and manipulation library with support for Laravel integration",
+            "homepage": "http://image.intervention.io/",
+            "keywords": [
+                "gd",
+                "image",
+                "imagick",
+                "laravel",
+                "thumbnail",
+                "watermark"
+            ],
+            "support": {
+                "issues": "https://github.com/Intervention/image/issues",
+                "source": "https://github.com/Intervention/image/tree/2.7.2"
+            },
+            "funding": [
+                {
+                    "url": "https://paypal.me/interventionio",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/Intervention",
+                    "type": "github"
+                }
+            ],
+            "time": "2022-05-21T17:30:32+00:00"
+        },
         {
             "name": "league/flysystem",
             "version": "1.0.61",
@@ -4757,5 +4882,5 @@
         "ext-mbstring": "*"
     },
     "platform-dev": [],
-    "plugin-api-version": "2.2.0"
+    "plugin-api-version": "2.3.0"
 }

+ 50 - 0
crmeb/config/ajcaptcha.php

@@ -0,0 +1,50 @@
+<?php
+declare(strict_types=1);
+
+return [
+    'font_file' => '', //自定义字体包路径, 不填使用默认值
+    //文字验证码
+    'click_world' => [
+        'backgrounds' => []
+    ],
+    //滑动验证码
+    'block_puzzle' => [
+        /*背景图片路径, 不填使用默认值, 支持string与array两种数据结构。string为默认图片的目录,array索引数组则为具体图片的地址*/
+        'backgrounds' => [],
+
+        /*模板图,格式同上支持string与array*/
+        'templates' => [],
+
+        'offset' => 10, //容错偏移量
+
+        'is_cache_pixel' => true, //是否开启缓存图片像素值,开启后能提升服务端响应性能(但要注意更换图片时,需要清除缓存)
+
+        'is_interfere' => true, //开启干扰图
+    ],
+    //水印
+    'watermark' => [
+        'fontsize' => 12,
+        'color' => '#000000',
+        'text' => '我的水印'
+    ],
+    'cache' => [
+        //若您使用了框架,并且想使用类似于redis这样的缓存驱动,则应换成框架的中的缓存驱动
+        'constructor' => [think\Facade\Cache::class, 'instance'],
+        'method' => [
+            //遵守PSR-16规范不需要设置此项(tp6, laravel,hyperf)。如tp5就不支持(tp5缓存方法是rm,所以要配置为"delete" => "rm")
+            /**
+             * 'get' => 'get', //获取
+             * 'set' => 'set', //设置
+             * 'delete' => 'delete',//删除
+             * 'has' => 'has' //key是否存在
+             */
+        ],
+        'options' => [
+            //如果您依然使用\Fastknife\Utils\CacheUtils做为您的缓存驱动,那么您可以自定义缓存配置。
+            'expire' => 300,//缓存有效期 (默认为0 表示永久缓存)
+            'prefix' => '', //缓存前缀
+            'path' => '', //缓存目录
+            'serialize' => [], //缓存序列化和反序列化方法
+        ]
+    ]
+];

+ 5 - 0
crmeb/vendor/autoload.php

@@ -2,6 +2,11 @@
 
 // autoload.php @generated by Composer
 
+if (PHP_VERSION_ID < 50600) {
+    echo '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;
+    exit(1);
+}
+
 require_once __DIR__ . '/composer/autoload_real.php';
 
 return ComposerAutoloaderInitf16474ac994ccc25392f403933800b79::getLoader();

+ 9 - 7
crmeb/vendor/composer/InstalledVersions.php

@@ -21,12 +21,14 @@ use Composer\Semver\VersionParser;
  * 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, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}|array{}|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;
 
@@ -37,7 +39,7 @@ class InstalledVersions
 
     /**
      * @var array[]
-     * @psalm-var array<string, array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
+     * @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();
 
@@ -241,7 +243,7 @@ class InstalledVersions
 
     /**
      * @return array
-     * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}
+     * @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()
     {
@@ -255,7 +257,7 @@ class InstalledVersions
      *
      * @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, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}
+     * @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()
     {
@@ -278,7 +280,7 @@ class InstalledVersions
      * 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, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
+     * @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()
     {
@@ -301,7 +303,7 @@ class InstalledVersions
      * @param  array[] $data A vendor/composer/installed.php data set
      * @return void
      *
-     * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>} $data
+     * @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)
     {
@@ -311,7 +313,7 @@ class InstalledVersions
 
     /**
      * @return array[]
-     * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
+     * @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()
     {

+ 1 - 1
crmeb/vendor/composer/autoload_classmap.php

@@ -2,7 +2,7 @@
 
 // autoload_classmap.php @generated by Composer
 
-$vendorDir = dirname(dirname(__FILE__));
+$vendorDir = dirname(__DIR__);
 $baseDir = dirname($vendorDir);
 
 return array(

+ 3 - 3
crmeb/vendor/composer/autoload_files.php

@@ -2,16 +2,16 @@
 
 // autoload_files.php @generated by Composer
 
-$vendorDir = dirname(dirname(__FILE__));
+$vendorDir = dirname(__DIR__);
 $baseDir = dirname($vendorDir);
 
 return array(
     '023d27dca8066ef29e6739335ea73bad' => $vendorDir . '/symfony/polyfill-php70/bootstrap.php',
-    '25072dd6e2470089de65ae7bf11d3109' => $vendorDir . '/symfony/polyfill-php72/bootstrap.php',
     '7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php',
+    'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php',
+    '25072dd6e2470089de65ae7bf11d3109' => $vendorDir . '/symfony/polyfill-php72/bootstrap.php',
     'e69f7f6ee287b969198c3c9d6777bd38' => $vendorDir . '/symfony/polyfill-intl-normalizer/bootstrap.php',
     'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php',
-    'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php',
     'f598d06aa772fa33d905e87be6398fb1' => $vendorDir . '/symfony/polyfill-intl-idn/bootstrap.php',
     '37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php',
     'd767e4fc2dc52fe66584ab8c6684783e' => $vendorDir . '/adbario/php-dot-notation/src/helpers.php',

+ 1 - 1
crmeb/vendor/composer/autoload_namespaces.php

@@ -2,7 +2,7 @@
 
 // autoload_namespaces.php @generated by Composer
 
-$vendorDir = dirname(dirname(__FILE__));
+$vendorDir = dirname(__DIR__);
 $baseDir = dirname($vendorDir);
 
 return array(

+ 3 - 1
crmeb/vendor/composer/autoload_psr4.php

@@ -2,7 +2,7 @@
 
 // autoload_psr4.php @generated by Composer
 
-$vendorDir = dirname(dirname(__FILE__));
+$vendorDir = dirname(__DIR__);
 $baseDir = dirname($vendorDir);
 
 return array(
@@ -51,12 +51,14 @@ return array(
     'League\\Flysystem\\Cached\\' => array($vendorDir . '/league/flysystem-cached-adapter/src'),
     'League\\Flysystem\\' => array($vendorDir . '/league/flysystem/src'),
     'JmesPath\\' => array($vendorDir . '/mtdowling/jmespath.php/src'),
+    'Intervention\\Image\\' => array($vendorDir . '/intervention/image/src/Intervention/Image'),
     'GuzzleHttp\\Psr7\\' => array($vendorDir . '/guzzlehttp/psr7/src'),
     'GuzzleHttp\\Promise\\' => array($vendorDir . '/guzzlehttp/promises/src'),
     'GuzzleHttp\\' => array($vendorDir . '/guzzlehttp/guzzle/src'),
     'Godruoyi\\Snowflake\\' => array($vendorDir . '/godruoyi/php-snowflake/src'),
     'FormBuilder\\' => array($vendorDir . '/xaboy/form-builder/src'),
     'Firebase\\JWT\\' => array($vendorDir . '/firebase/php-jwt/src'),
+    'Fastknife\\' => array($vendorDir . '/fastknife/ajcaptcha/src'),
     'EasyWeChat\\' => array($vendorDir . '/overtrue/wechat/src'),
     'Doctrine\\Common\\Lexer\\' => array($vendorDir . '/doctrine/lexer/lib/Doctrine/Common/Lexer'),
     'Darabonba\\OpenApi\\' => array($vendorDir . '/alibabacloud/darabonba-openapi/src'),

+ 4 - 27
crmeb/vendor/composer/autoload_real.php

@@ -25,38 +25,15 @@ class ComposerAutoloaderInitf16474ac994ccc25392f403933800b79
         require __DIR__ . '/platform_check.php';
 
         spl_autoload_register(array('ComposerAutoloaderInitf16474ac994ccc25392f403933800b79', 'loadClassLoader'), true, true);
-        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
+        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
         spl_autoload_unregister(array('ComposerAutoloaderInitf16474ac994ccc25392f403933800b79', 'loadClassLoader'));
 
-        $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
-        if ($useStaticLoader) {
-            require __DIR__ . '/autoload_static.php';
-
-            call_user_func(\Composer\Autoload\ComposerStaticInitf16474ac994ccc25392f403933800b79::getInitializer($loader));
-        } else {
-            $map = require __DIR__ . '/autoload_namespaces.php';
-            foreach ($map as $namespace => $path) {
-                $loader->set($namespace, $path);
-            }
-
-            $map = require __DIR__ . '/autoload_psr4.php';
-            foreach ($map as $namespace => $path) {
-                $loader->setPsr4($namespace, $path);
-            }
-
-            $classMap = require __DIR__ . '/autoload_classmap.php';
-            if ($classMap) {
-                $loader->addClassMap($classMap);
-            }
-        }
+        require __DIR__ . '/autoload_static.php';
+        call_user_func(\Composer\Autoload\ComposerStaticInitf16474ac994ccc25392f403933800b79::getInitializer($loader));
 
         $loader->register(true);
 
-        if ($useStaticLoader) {
-            $includeFiles = Composer\Autoload\ComposerStaticInitf16474ac994ccc25392f403933800b79::$files;
-        } else {
-            $includeFiles = require __DIR__ . '/autoload_files.php';
-        }
+        $includeFiles = \Composer\Autoload\ComposerStaticInitf16474ac994ccc25392f403933800b79::$files;
         foreach ($includeFiles as $fileIdentifier => $file) {
             composerRequiref16474ac994ccc25392f403933800b79($fileIdentifier, $file);
         }

+ 15 - 2
crmeb/vendor/composer/autoload_static.php

@@ -8,11 +8,11 @@ class ComposerStaticInitf16474ac994ccc25392f403933800b79
 {
     public static $files = array (
         '023d27dca8066ef29e6739335ea73bad' => __DIR__ . '/..' . '/symfony/polyfill-php70/bootstrap.php',
-        '25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php',
         '7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php',
+        'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php',
+        '25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php',
         'e69f7f6ee287b969198c3c9d6777bd38' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/bootstrap.php',
         'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php',
-        'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php',
         'f598d06aa772fa33d905e87be6398fb1' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/bootstrap.php',
         '37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php',
         'd767e4fc2dc52fe66584ab8c6684783e' => __DIR__ . '/..' . '/adbario/php-dot-notation/src/helpers.php',
@@ -176,6 +176,10 @@ class ComposerStaticInitf16474ac994ccc25392f403933800b79
         array (
             'JmesPath\\' => 9,
         ),
+        'I' => 
+        array (
+            'Intervention\\Image\\' => 19,
+        ),
         'G' => 
         array (
             'GuzzleHttp\\Psr7\\' => 16,
@@ -187,6 +191,7 @@ class ComposerStaticInitf16474ac994ccc25392f403933800b79
         array (
             'FormBuilder\\' => 12,
             'Firebase\\JWT\\' => 13,
+            'Fastknife\\' => 10,
         ),
         'E' => 
         array (
@@ -406,6 +411,10 @@ class ComposerStaticInitf16474ac994ccc25392f403933800b79
         array (
             0 => __DIR__ . '/..' . '/mtdowling/jmespath.php/src',
         ),
+        'Intervention\\Image\\' => 
+        array (
+            0 => __DIR__ . '/..' . '/intervention/image/src/Intervention/Image',
+        ),
         'GuzzleHttp\\Psr7\\' => 
         array (
             0 => __DIR__ . '/..' . '/guzzlehttp/psr7/src',
@@ -430,6 +439,10 @@ class ComposerStaticInitf16474ac994ccc25392f403933800b79
         array (
             0 => __DIR__ . '/..' . '/firebase/php-jwt/src',
         ),
+        'Fastknife\\' => 
+        array (
+            0 => __DIR__ . '/..' . '/fastknife/ajcaptcha/src',
+        ),
         'EasyWeChat\\' => 
         array (
             0 => __DIR__ . '/..' . '/overtrue/wechat/src',

+ 131 - 0
crmeb/vendor/composer/installed.json

@@ -1088,6 +1088,44 @@
             ],
             "install-path": "../doctrine/lexer"
         },
+        {
+            "name": "fastknife/ajcaptcha",
+            "version": "v1.1.5",
+            "version_normalized": "1.1.5.0",
+            "source": {
+                "type": "git",
+                "url": "https://gitee.com/fastknife/aj-captcha.git",
+                "reference": "9e8eb95c444d2ff4d78d1d1d4d5cb1d29c084609"
+            },
+            "require": {
+                "ext-gd": "*",
+                "ext-iconv": "*",
+                "ext-json": "*",
+                "ext-openssl": "*",
+                "intervention/image": "^2.5",
+                "php": ">=7.1"
+            },
+            "time": "2022-07-04T10:17:37+00:00",
+            "type": "library",
+            "installation-source": "source",
+            "autoload": {
+                "psr-4": {
+                    "Fastknife\\": "src"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "GPL-3.0-only"
+            ],
+            "authors": [
+                {
+                    "name": "bruce",
+                    "email": "2777314125@qq.com"
+                }
+            ],
+            "description": "This is a behavior verification code PHP back-end implementation package",
+            "install-path": "../fastknife/ajcaptcha"
+        },
         {
             "name": "firebase/php-jwt",
             "version": "v5.0.0",
@@ -1519,6 +1557,99 @@
             ],
             "install-path": "../guzzlehttp/psr7"
         },
+        {
+            "name": "intervention/image",
+            "version": "2.7.2",
+            "version_normalized": "2.7.2.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/Intervention/image.git",
+                "reference": "04be355f8d6734c826045d02a1079ad658322dad"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/Intervention/image/zipball/04be355f8d6734c826045d02a1079ad658322dad",
+                "reference": "04be355f8d6734c826045d02a1079ad658322dad",
+                "shasum": "",
+                "mirrors": [
+                    {
+                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+                        "preferred": true
+                    }
+                ]
+            },
+            "require": {
+                "ext-fileinfo": "*",
+                "guzzlehttp/psr7": "~1.1 || ^2.0",
+                "php": ">=5.4.0"
+            },
+            "require-dev": {
+                "mockery/mockery": "~0.9.2",
+                "phpunit/phpunit": "^4.8 || ^5.7 || ^7.5.15"
+            },
+            "suggest": {
+                "ext-gd": "to use GD library based image processing.",
+                "ext-imagick": "to use Imagick based image processing.",
+                "intervention/imagecache": "Caching extension for the Intervention Image library"
+            },
+            "time": "2022-05-21T17:30:32+00:00",
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.4-dev"
+                },
+                "laravel": {
+                    "providers": [
+                        "Intervention\\Image\\ImageServiceProvider"
+                    ],
+                    "aliases": {
+                        "Image": "Intervention\\Image\\Facades\\Image"
+                    }
+                }
+            },
+            "installation-source": "dist",
+            "autoload": {
+                "psr-4": {
+                    "Intervention\\Image\\": "src/Intervention/Image"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Oliver Vogel",
+                    "email": "oliver@intervention.io",
+                    "homepage": "https://intervention.io/"
+                }
+            ],
+            "description": "Image handling and manipulation library with support for Laravel integration",
+            "homepage": "http://image.intervention.io/",
+            "keywords": [
+                "gd",
+                "image",
+                "imagick",
+                "laravel",
+                "thumbnail",
+                "watermark"
+            ],
+            "support": {
+                "issues": "https://github.com/Intervention/image/issues",
+                "source": "https://github.com/Intervention/image/tree/2.7.2"
+            },
+            "funding": [
+                {
+                    "url": "https://paypal.me/interventionio",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/Intervention",
+                    "type": "github"
+                }
+            ],
+            "install-path": "../intervention/image"
+        },
         {
             "name": "league/flysystem",
             "version": "1.0.61",

+ 104 - 86
crmeb/vendor/composer/installed.php

@@ -1,193 +1,202 @@
 <?php return array(
     'root' => array(
-        'pretty_version' => '4.5.0.x-dev',
-        'version' => '4.5.0.9999999-dev',
+        'name' => 'topthink/think',
+        'pretty_version' => 'dev-master',
+        'version' => 'dev-master',
+        'reference' => '13adf9a931c339ffb7910da803bf28c4ed4d1d9b',
         'type' => 'project',
         'install_path' => __DIR__ . '/../../',
         'aliases' => array(),
-        'reference' => 'a7e738f37c953fe6491353bb9f7807916136d5a3',
-        'name' => 'topthink/think',
         'dev' => true,
     ),
     'versions' => array(
         'adbario/php-dot-notation' => array(
             'pretty_version' => '2.2.0',
             'version' => '2.2.0.0',
+            'reference' => 'eee4fc81296531e6aafba4c2bbccfc5adab1676e',
             'type' => 'library',
             'install_path' => __DIR__ . '/../adbario/php-dot-notation',
             'aliases' => array(),
-            'reference' => 'eee4fc81296531e6aafba4c2bbccfc5adab1676e',
             'dev_requirement' => false,
         ),
         'alibabacloud/credentials' => array(
             'pretty_version' => '1.1.4',
             'version' => '1.1.4.0',
+            'reference' => 'e79d4151ad8924c0cf79d4fe0ec151b8d7663a25',
             'type' => 'library',
             'install_path' => __DIR__ . '/../alibabacloud/credentials',
             'aliases' => array(),
-            'reference' => 'e79d4151ad8924c0cf79d4fe0ec151b8d7663a25',
             'dev_requirement' => false,
         ),
         'alibabacloud/darabonba-openapi' => array(
             'pretty_version' => '0.2.6',
             'version' => '0.2.6.0',
+            'reference' => 'c64a2bafde3aaf8d11ba5aebfc08f59916b4c742',
             'type' => 'library',
             'install_path' => __DIR__ . '/../alibabacloud/darabonba-openapi',
             'aliases' => array(),
-            'reference' => 'c64a2bafde3aaf8d11ba5aebfc08f59916b4c742',
             'dev_requirement' => false,
         ),
         'alibabacloud/dysmsapi-20170525' => array(
             'pretty_version' => '2.0.16',
             'version' => '2.0.16.0',
+            'reference' => '43c4ba11cbc0fec26a373ce2c8f3572cfcad32b5',
             'type' => 'library',
             'install_path' => __DIR__ . '/../alibabacloud/dysmsapi-20170525',
             'aliases' => array(),
-            'reference' => '43c4ba11cbc0fec26a373ce2c8f3572cfcad32b5',
             'dev_requirement' => false,
         ),
         'alibabacloud/endpoint-util' => array(
             'pretty_version' => '0.1.1',
             'version' => '0.1.1.0',
+            'reference' => 'f3fe88a25d8df4faa3b0ae14ff202a9cc094e6c5',
             'type' => 'library',
             'install_path' => __DIR__ . '/../alibabacloud/endpoint-util',
             'aliases' => array(),
-            'reference' => 'f3fe88a25d8df4faa3b0ae14ff202a9cc094e6c5',
             'dev_requirement' => false,
         ),
         'alibabacloud/gateway-spi' => array(
             'pretty_version' => '1.0.0',
             'version' => '1.0.0.0',
+            'reference' => '7440f77750c329d8ab252db1d1d967314ccd1fcb',
             'type' => 'library',
             'install_path' => __DIR__ . '/../alibabacloud/gateway-spi',
             'aliases' => array(),
-            'reference' => '7440f77750c329d8ab252db1d1d967314ccd1fcb',
             'dev_requirement' => false,
         ),
         'alibabacloud/openapi-util' => array(
             'pretty_version' => '0.1.11',
             'version' => '0.1.11.0',
+            'reference' => '61ee137955a25c9f5f33170babb6071d4bccf12c',
             'type' => 'library',
             'install_path' => __DIR__ . '/../alibabacloud/openapi-util',
             'aliases' => array(),
-            'reference' => '61ee137955a25c9f5f33170babb6071d4bccf12c',
             'dev_requirement' => false,
         ),
         'alibabacloud/tea' => array(
             'pretty_version' => '3.1.19',
             'version' => '3.1.19.0',
+            'reference' => 'f940148fa6eee0f014fbf138a68310df28e67765',
             'type' => 'library',
             'install_path' => __DIR__ . '/../alibabacloud/tea',
             'aliases' => array(),
-            'reference' => 'f940148fa6eee0f014fbf138a68310df28e67765',
             'dev_requirement' => false,
         ),
         'alibabacloud/tea-fileform' => array(
             'pretty_version' => '0.3.3',
             'version' => '0.3.3.0',
+            'reference' => '3878427b661392566411dfe13620e2359334c318',
             'type' => 'library',
             'install_path' => __DIR__ . '/../alibabacloud/tea-fileform',
             'aliases' => array(),
-            'reference' => '3878427b661392566411dfe13620e2359334c318',
             'dev_requirement' => false,
         ),
         'alibabacloud/tea-utils' => array(
             'pretty_version' => '0.2.16',
             'version' => '0.2.16.0',
+            'reference' => 'ae10b306509a196e4af71803db710a0a05c54e60',
             'type' => 'library',
             'install_path' => __DIR__ . '/../alibabacloud/tea-utils',
             'aliases' => array(),
-            'reference' => 'ae10b306509a196e4af71803db710a0a05c54e60',
             'dev_requirement' => false,
         ),
         'alibabacloud/tea-xml' => array(
             'pretty_version' => '0.2.3',
             'version' => '0.2.3.0',
+            'reference' => '4bd2303d71c968cb7ae4e487c5fa3023aed3ff3b',
             'type' => 'library',
             'install_path' => __DIR__ . '/../alibabacloud/tea-xml',
             'aliases' => array(),
-            'reference' => '4bd2303d71c968cb7ae4e487c5fa3023aed3ff3b',
             'dev_requirement' => false,
         ),
         'alipaysdk/easysdk' => array(
             'pretty_version' => '2.0.0',
             'version' => '2.0.0.0',
+            'reference' => '677a035e11df6a66a085f1bd1efc58b72eb8b3d5',
             'type' => 'library',
             'install_path' => __DIR__ . '/../alipaysdk/easysdk',
             'aliases' => array(),
-            'reference' => '677a035e11df6a66a085f1bd1efc58b72eb8b3d5',
             'dev_requirement' => false,
         ),
         'aliyuncs/oss-sdk-php' => array(
             'pretty_version' => 'v2.3.0',
             'version' => '2.3.0.0',
+            'reference' => 'e69f57916678458642ac9d2fd341ae78a56996c8',
             'type' => 'library',
             'install_path' => __DIR__ . '/../aliyuncs/oss-sdk-php',
             'aliases' => array(),
-            'reference' => 'e69f57916678458642ac9d2fd341ae78a56996c8',
             'dev_requirement' => false,
         ),
         'danielstjules/stringy' => array(
             'pretty_version' => '3.1.0',
             'version' => '3.1.0.0',
+            'reference' => 'df24ab62d2d8213bbbe88cc36fc35a4503b4bd7e',
             'type' => 'library',
             'install_path' => __DIR__ . '/../danielstjules/stringy',
             'aliases' => array(),
-            'reference' => 'df24ab62d2d8213bbbe88cc36fc35a4503b4bd7e',
             'dev_requirement' => false,
         ),
         'dh2y/think-qrcode' => array(
             'pretty_version' => '2.0',
             'version' => '2.0.0.0',
+            'reference' => '977d032afa27b1852f5fc5441fad2497f6db7ff5',
             'type' => 'library',
             'install_path' => __DIR__ . '/../dh2y/think-qrcode',
             'aliases' => array(),
-            'reference' => '977d032afa27b1852f5fc5441fad2497f6db7ff5',
             'dev_requirement' => false,
         ),
         'doctrine/annotations' => array(
             'pretty_version' => 'v1.2.7',
             'version' => '1.2.7.0',
+            'reference' => 'f25c8aab83e0c3e976fd7d19875f198ccf2f7535',
             'type' => 'library',
             'install_path' => __DIR__ . '/../doctrine/annotations',
             'aliases' => array(),
-            'reference' => 'f25c8aab83e0c3e976fd7d19875f198ccf2f7535',
             'dev_requirement' => false,
         ),
         'doctrine/cache' => array(
             'pretty_version' => 'v1.4.4',
             'version' => '1.4.4.0',
+            'reference' => '6433826dd02c9e5be8a127320dc13e7e6625d020',
             'type' => 'library',
             'install_path' => __DIR__ . '/../doctrine/cache',
             'aliases' => array(),
-            'reference' => '6433826dd02c9e5be8a127320dc13e7e6625d020',
             'dev_requirement' => false,
         ),
         'doctrine/lexer' => array(
             'pretty_version' => '1.2.1',
             'version' => '1.2.1.0',
+            'reference' => 'e864bbf5904cb8f5bb334f99209b48018522f042',
             'type' => 'library',
             'install_path' => __DIR__ . '/../doctrine/lexer',
             'aliases' => array(),
-            'reference' => 'e864bbf5904cb8f5bb334f99209b48018522f042',
+            'dev_requirement' => false,
+        ),
+        'fastknife/ajcaptcha' => array(
+            'pretty_version' => 'v1.1.5',
+            'version' => '1.1.5.0',
+            'reference' => '9e8eb95c444d2ff4d78d1d1d4d5cb1d29c084609',
+            'type' => 'library',
+            'install_path' => __DIR__ . '/../fastknife/ajcaptcha',
+            'aliases' => array(),
             'dev_requirement' => false,
         ),
         'firebase/php-jwt' => array(
             'pretty_version' => 'v5.0.0',
             'version' => '5.0.0.0',
+            'reference' => '9984a4d3a32ae7673d6971ea00bae9d0a1abba0e',
             'type' => 'library',
             'install_path' => __DIR__ . '/../firebase/php-jwt',
             'aliases' => array(),
-            'reference' => '9984a4d3a32ae7673d6971ea00bae9d0a1abba0e',
             'dev_requirement' => false,
         ),
         'godruoyi/php-snowflake' => array(
             'pretty_version' => '1.0.9',
             'version' => '1.0.9.0',
+            'reference' => '4c73869e20ee4534bf867efa46dc294ba6578b73',
             'type' => 'library',
             'install_path' => __DIR__ . '/../godruoyi/php-snowflake',
             'aliases' => array(),
-            'reference' => '4c73869e20ee4534bf867efa46dc294ba6578b73',
             'dev_requirement' => false,
         ),
         'guzzle/batch' => array(
@@ -211,10 +220,10 @@
         'guzzle/guzzle' => array(
             'pretty_version' => 'v3.9.3',
             'version' => '3.9.3.0',
+            'reference' => '0645b70d953bc1c067bbc8d5bc53194706b628d9',
             'type' => 'library',
             'install_path' => __DIR__ . '/../guzzle/guzzle',
             'aliases' => array(),
-            'reference' => '0645b70d953bc1c067bbc8d5bc53194706b628d9',
             'dev_requirement' => false,
         ),
         'guzzle/http' => array(
@@ -334,208 +343,217 @@
         'guzzlehttp/guzzle' => array(
             'pretty_version' => '6.5.5',
             'version' => '6.5.5.0',
+            'reference' => '9d4290de1cfd701f38099ef7e183b64b4b7b0c5e',
             'type' => 'library',
             'install_path' => __DIR__ . '/../guzzlehttp/guzzle',
             'aliases' => array(),
-            'reference' => '9d4290de1cfd701f38099ef7e183b64b4b7b0c5e',
             'dev_requirement' => false,
         ),
         'guzzlehttp/promises' => array(
             'pretty_version' => 'v1.3.1',
             'version' => '1.3.1.0',
+            'reference' => 'a59da6cf61d80060647ff4d3eb2c03a2bc694646',
             'type' => 'library',
             'install_path' => __DIR__ . '/../guzzlehttp/promises',
             'aliases' => array(),
-            'reference' => 'a59da6cf61d80060647ff4d3eb2c03a2bc694646',
             'dev_requirement' => false,
         ),
         'guzzlehttp/psr7' => array(
             'pretty_version' => '1.7.0',
             'version' => '1.7.0.0',
+            'reference' => '53330f47520498c0ae1f61f7e2c90f55690c06a3',
             'type' => 'library',
             'install_path' => __DIR__ . '/../guzzlehttp/psr7',
             'aliases' => array(),
-            'reference' => '53330f47520498c0ae1f61f7e2c90f55690c06a3',
+            'dev_requirement' => false,
+        ),
+        'intervention/image' => array(
+            'pretty_version' => '2.7.2',
+            'version' => '2.7.2.0',
+            'reference' => '04be355f8d6734c826045d02a1079ad658322dad',
+            'type' => 'library',
+            'install_path' => __DIR__ . '/../intervention/image',
+            'aliases' => array(),
             'dev_requirement' => false,
         ),
         'league/flysystem' => array(
             'pretty_version' => '1.0.61',
             'version' => '1.0.61.0',
+            'reference' => '4fb13c01784a6c9f165a351e996871488ca2d8c9',
             'type' => 'library',
             'install_path' => __DIR__ . '/../league/flysystem',
             'aliases' => array(),
-            'reference' => '4fb13c01784a6c9f165a351e996871488ca2d8c9',
             'dev_requirement' => false,
         ),
         'league/flysystem-cached-adapter' => array(
             'pretty_version' => '1.0.9',
             'version' => '1.0.9.0',
+            'reference' => '08ef74e9be88100807a3b92cc9048a312bf01d6f',
             'type' => 'library',
             'install_path' => __DIR__ . '/../league/flysystem-cached-adapter',
             'aliases' => array(),
-            'reference' => '08ef74e9be88100807a3b92cc9048a312bf01d6f',
             'dev_requirement' => false,
         ),
         'lizhichao/one-sm' => array(
             'pretty_version' => '1.10',
             'version' => '1.10.0.0',
+            'reference' => '687a012a44a5bfd4d9143a0234e1060543be455a',
             'type' => 'library',
             'install_path' => __DIR__ . '/../lizhichao/one-sm',
             'aliases' => array(),
-            'reference' => '687a012a44a5bfd4d9143a0234e1060543be455a',
             'dev_requirement' => false,
         ),
         'lizhichao/word' => array(
             'pretty_version' => 'v2.1',
             'version' => '2.1.0.0',
+            'reference' => 'f17172d45f505e7140da0bde2103defc13255326',
             'type' => 'library',
             'install_path' => __DIR__ . '/../lizhichao/word',
             'aliases' => array(),
-            'reference' => 'f17172d45f505e7140da0bde2103defc13255326',
             'dev_requirement' => false,
         ),
         'maennchen/zipstream-php' => array(
             'pretty_version' => '2.1.0',
             'version' => '2.1.0.0',
+            'reference' => 'c4c5803cc1f93df3d2448478ef79394a5981cc58',
             'type' => 'library',
             'install_path' => __DIR__ . '/../maennchen/zipstream-php',
             'aliases' => array(),
-            'reference' => 'c4c5803cc1f93df3d2448478ef79394a5981cc58',
             'dev_requirement' => false,
         ),
         'markbaker/complex' => array(
             'pretty_version' => '1.4.8',
             'version' => '1.4.8.0',
+            'reference' => '8eaa40cceec7bf0518187530b2e63871be661b72',
             'type' => 'library',
             'install_path' => __DIR__ . '/../markbaker/complex',
             'aliases' => array(),
-            'reference' => '8eaa40cceec7bf0518187530b2e63871be661b72',
             'dev_requirement' => false,
         ),
         'markbaker/matrix' => array(
             'pretty_version' => '1.2.0',
             'version' => '1.2.0.0',
+            'reference' => '5348c5a67e3b75cd209d70103f916a93b1f1ed21',
             'type' => 'library',
             'install_path' => __DIR__ . '/../markbaker/matrix',
             'aliases' => array(),
-            'reference' => '5348c5a67e3b75cd209d70103f916a93b1f1ed21',
             'dev_requirement' => false,
         ),
         'monolog/monolog' => array(
             'pretty_version' => '1.24.0',
             'version' => '1.24.0.0',
+            'reference' => 'bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266',
             'type' => 'library',
             'install_path' => __DIR__ . '/../monolog/monolog',
             'aliases' => array(),
-            'reference' => 'bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266',
             'dev_requirement' => false,
         ),
         'mtdowling/jmespath.php' => array(
             'pretty_version' => '2.5.0',
             'version' => '2.5.0.0',
+            'reference' => '52168cb9472de06979613d365c7f1ab8798be895',
             'type' => 'library',
             'install_path' => __DIR__ . '/../mtdowling/jmespath.php',
             'aliases' => array(),
-            'reference' => '52168cb9472de06979613d365c7f1ab8798be895',
             'dev_requirement' => false,
         ),
         'myclabs/php-enum' => array(
             'pretty_version' => '1.7.6',
             'version' => '1.7.6.0',
+            'reference' => '5f36467c7a87e20fbdc51e524fd8f9d1de80187c',
             'type' => 'library',
             'install_path' => __DIR__ . '/../myclabs/php-enum',
             'aliases' => array(),
-            'reference' => '5f36467c7a87e20fbdc51e524fd8f9d1de80187c',
             'dev_requirement' => false,
         ),
         'nesbot/carbon' => array(
             'pretty_version' => '2.20.0',
             'version' => '2.20.0.0',
+            'reference' => 'bc671b896c276795fad8426b0aa24e8ade0f2498',
             'type' => 'library',
             'install_path' => __DIR__ . '/../nesbot/carbon',
             'aliases' => array(),
-            'reference' => 'bc671b896c276795fad8426b0aa24e8ade0f2498',
             'dev_requirement' => false,
         ),
         'opis/closure' => array(
             'pretty_version' => '3.5.1',
             'version' => '3.5.1.0',
+            'reference' => '93ebc5712cdad8d5f489b500c59d122df2e53969',
             'type' => 'library',
             'install_path' => __DIR__ . '/../opis/closure',
             'aliases' => array(),
-            'reference' => '93ebc5712cdad8d5f489b500c59d122df2e53969',
             'dev_requirement' => false,
         ),
         'overtrue/socialite' => array(
             'pretty_version' => '1.3.0',
             'version' => '1.3.0.0',
+            'reference' => 'fda55f0acef43a144799b1957a8f93d9f5deffce',
             'type' => 'library',
             'install_path' => __DIR__ . '/../overtrue/socialite',
             'aliases' => array(),
-            'reference' => 'fda55f0acef43a144799b1957a8f93d9f5deffce',
             'dev_requirement' => false,
         ),
         'overtrue/wechat' => array(
             'pretty_version' => '3.3.33',
             'version' => '3.3.33.0',
+            'reference' => '78e5476df330754040d1c400d0bca640d5b77cb7',
             'type' => 'library',
             'install_path' => __DIR__ . '/../overtrue/wechat',
             'aliases' => array(),
-            'reference' => '78e5476df330754040d1c400d0bca640d5b77cb7',
             'dev_requirement' => false,
         ),
         'paragonie/random_compat' => array(
             'pretty_version' => 'v9.99.99',
             'version' => '9.99.99.0',
+            'reference' => '84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95',
             'type' => 'library',
             'install_path' => __DIR__ . '/../paragonie/random_compat',
             'aliases' => array(),
-            'reference' => '84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95',
             'dev_requirement' => false,
         ),
         'phpoffice/phpspreadsheet' => array(
             'pretty_version' => '1.13.0',
             'version' => '1.13.0.0',
+            'reference' => '21bfb5b3243b8ceb9eda499a4d699fc42c11a9d1',
             'type' => 'library',
             'install_path' => __DIR__ . '/../phpoffice/phpspreadsheet',
             'aliases' => array(),
-            'reference' => '21bfb5b3243b8ceb9eda499a4d699fc42c11a9d1',
             'dev_requirement' => false,
         ),
         'pimple/pimple' => array(
             'pretty_version' => 'v3.2.3',
             'version' => '3.2.3.0',
+            'reference' => '9e403941ef9d65d20cba7d54e29fe906db42cf32',
             'type' => 'library',
             'install_path' => __DIR__ . '/../pimple/pimple',
             'aliases' => array(),
-            'reference' => '9e403941ef9d65d20cba7d54e29fe906db42cf32',
             'dev_requirement' => false,
         ),
         'psr/cache' => array(
             'pretty_version' => '1.0.1',
             'version' => '1.0.1.0',
+            'reference' => 'd11b50ad223250cf17b86e38383413f5a6764bf8',
             'type' => 'library',
             'install_path' => __DIR__ . '/../psr/cache',
             'aliases' => array(),
-            'reference' => 'd11b50ad223250cf17b86e38383413f5a6764bf8',
             'dev_requirement' => false,
         ),
         'psr/container' => array(
             'pretty_version' => '1.0.0',
             'version' => '1.0.0.0',
+            'reference' => 'b7ce3b176482dbbc1245ebf52b181af44c2cf55f',
             'type' => 'library',
             'install_path' => __DIR__ . '/../psr/container',
             'aliases' => array(),
-            'reference' => 'b7ce3b176482dbbc1245ebf52b181af44c2cf55f',
             'dev_requirement' => false,
         ),
         'psr/http-message' => array(
             'pretty_version' => '1.0.1',
             'version' => '1.0.1.0',
+            'reference' => 'f6561bf28d520154e4b0ec72be95418abe6d9363',
             'type' => 'library',
             'install_path' => __DIR__ . '/../psr/http-message',
             'aliases' => array(),
-            'reference' => 'f6561bf28d520154e4b0ec72be95418abe6d9363',
             'dev_requirement' => false,
         ),
         'psr/http-message-implementation' => array(
@@ -547,10 +565,10 @@
         'psr/log' => array(
             'pretty_version' => '1.1.2',
             'version' => '1.1.2.0',
+            'reference' => '446d54b4cb6bf489fc9d75f55843658e6f25d801',
             'type' => 'library',
             'install_path' => __DIR__ . '/../psr/log',
             'aliases' => array(),
-            'reference' => '446d54b4cb6bf489fc9d75f55843658e6f25d801',
             'dev_requirement' => false,
         ),
         'psr/log-implementation' => array(
@@ -562,163 +580,163 @@
         'psr/simple-cache' => array(
             'pretty_version' => '1.0.1',
             'version' => '1.0.1.0',
+            'reference' => '408d5eafb83c57f6365a3ca330ff23aa4a5fa39b',
             'type' => 'library',
             'install_path' => __DIR__ . '/../psr/simple-cache',
             'aliases' => array(),
-            'reference' => '408d5eafb83c57f6365a3ca330ff23aa4a5fa39b',
             'dev_requirement' => false,
         ),
         'qcloud/cos-sdk-v5' => array(
             'pretty_version' => 'v1.3.5',
             'version' => '1.3.5.0',
+            'reference' => 'cd1b9cefa04521eaf125a82eb53552d9a87aae4d',
             'type' => 'library',
             'install_path' => __DIR__ . '/../qcloud/cos-sdk-v5',
             'aliases' => array(),
-            'reference' => 'cd1b9cefa04521eaf125a82eb53552d9a87aae4d',
             'dev_requirement' => false,
         ),
         'qcloud_sts/qcloud-sts-sdk' => array(
             'pretty_version' => '3.0.3',
             'version' => '3.0.3.0',
+            'reference' => 'd6b12a0bdebc025f039c958979714298d408bf92',
             'type' => 'library',
             'install_path' => __DIR__ . '/../qcloud_sts/qcloud-sts-sdk',
             'aliases' => array(),
-            'reference' => 'd6b12a0bdebc025f039c958979714298d408bf92',
             'dev_requirement' => false,
         ),
         'qiniu/php-sdk' => array(
             'pretty_version' => 'v7.2.9',
             'version' => '7.2.9.0',
+            'reference' => 'afe7d8715d8a688b1d8d8cdf031240d2363dad90',
             'type' => 'library',
             'install_path' => __DIR__ . '/../qiniu/php-sdk',
             'aliases' => array(),
-            'reference' => 'afe7d8715d8a688b1d8d8cdf031240d2363dad90',
             'dev_requirement' => false,
         ),
         'ralouphie/getallheaders' => array(
             'pretty_version' => '2.0.5',
             'version' => '2.0.5.0',
+            'reference' => '5601c8a83fbba7ef674a7369456d12f1e0d0eafa',
             'type' => 'library',
             'install_path' => __DIR__ . '/../ralouphie/getallheaders',
             'aliases' => array(),
-            'reference' => '5601c8a83fbba7ef674a7369456d12f1e0d0eafa',
             'dev_requirement' => false,
         ),
         'songshenzong/support' => array(
             'pretty_version' => '2.0.5',
             'version' => '2.0.5.0',
+            'reference' => '34973c04ffcf226e503f1c3a69d30ac49f7621f6',
             'type' => 'library',
             'install_path' => __DIR__ . '/../songshenzong/support',
             'aliases' => array(),
-            'reference' => '34973c04ffcf226e503f1c3a69d30ac49f7621f6',
             'dev_requirement' => false,
         ),
         'spatie/macroable' => array(
             'pretty_version' => '1.0.0',
             'version' => '1.0.0.0',
+            'reference' => '74b0d189ce75142f1706aad834d5a428dfc7c3c3',
             'type' => 'library',
             'install_path' => __DIR__ . '/../spatie/macroable',
             'aliases' => array(),
-            'reference' => '74b0d189ce75142f1706aad834d5a428dfc7c3c3',
             'dev_requirement' => false,
         ),
         'symfony/event-dispatcher' => array(
             'pretty_version' => 'v2.8.50',
             'version' => '2.8.50.0',
+            'reference' => 'a77e974a5fecb4398833b0709210e3d5e334ffb0',
             'type' => 'library',
             'install_path' => __DIR__ . '/../symfony/event-dispatcher',
             'aliases' => array(),
-            'reference' => 'a77e974a5fecb4398833b0709210e3d5e334ffb0',
             'dev_requirement' => false,
         ),
         'symfony/http-foundation' => array(
             'pretty_version' => 'v3.4.28',
             'version' => '3.4.28.0',
+            'reference' => '677ae5e892b081e71a665bfa7dd90fe61800c00e',
             'type' => 'library',
             'install_path' => __DIR__ . '/../symfony/http-foundation',
             'aliases' => array(),
-            'reference' => '677ae5e892b081e71a665bfa7dd90fe61800c00e',
             'dev_requirement' => false,
         ),
         'symfony/polyfill-intl-idn' => array(
             'pretty_version' => 'v1.18.1',
             'version' => '1.18.1.0',
+            'reference' => '5dcab1bc7146cf8c1beaa4502a3d9be344334251',
             'type' => 'library',
             'install_path' => __DIR__ . '/../symfony/polyfill-intl-idn',
             'aliases' => array(),
-            'reference' => '5dcab1bc7146cf8c1beaa4502a3d9be344334251',
             'dev_requirement' => false,
         ),
         'symfony/polyfill-intl-normalizer' => array(
             'pretty_version' => 'v1.18.1',
             'version' => '1.18.1.0',
+            'reference' => '37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e',
             'type' => 'library',
             'install_path' => __DIR__ . '/../symfony/polyfill-intl-normalizer',
             'aliases' => array(),
-            'reference' => '37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e',
             'dev_requirement' => false,
         ),
         'symfony/polyfill-mbstring' => array(
             'pretty_version' => 'v1.11.0',
             'version' => '1.11.0.0',
+            'reference' => 'fe5e94c604826c35a32fa832f35bd036b6799609',
             'type' => 'library',
             'install_path' => __DIR__ . '/../symfony/polyfill-mbstring',
             'aliases' => array(),
-            'reference' => 'fe5e94c604826c35a32fa832f35bd036b6799609',
             'dev_requirement' => false,
         ),
         'symfony/polyfill-php70' => array(
             'pretty_version' => 'v1.11.0',
             'version' => '1.11.0.0',
+            'reference' => 'bc4858fb611bda58719124ca079baff854149c89',
             'type' => 'library',
             'install_path' => __DIR__ . '/../symfony/polyfill-php70',
             'aliases' => array(),
-            'reference' => 'bc4858fb611bda58719124ca079baff854149c89',
             'dev_requirement' => false,
         ),
         'symfony/polyfill-php72' => array(
             'pretty_version' => 'v1.11.0',
             'version' => '1.11.0.0',
+            'reference' => 'ab50dcf166d5f577978419edd37aa2bb8eabce0c',
             'type' => 'library',
             'install_path' => __DIR__ . '/../symfony/polyfill-php72',
             'aliases' => array(),
-            'reference' => 'ab50dcf166d5f577978419edd37aa2bb8eabce0c',
             'dev_requirement' => false,
         ),
         'symfony/process' => array(
             'pretty_version' => 'v4.3.2',
             'version' => '4.3.2.0',
+            'reference' => '856d35814cf287480465bb7a6c413bb7f5f5e69c',
             'type' => 'library',
             'install_path' => __DIR__ . '/../symfony/process',
             'aliases' => array(),
-            'reference' => '856d35814cf287480465bb7a6c413bb7f5f5e69c',
             'dev_requirement' => false,
         ),
         'symfony/psr-http-message-bridge' => array(
             'pretty_version' => 'v1.2.0',
             'version' => '1.2.0.0',
+            'reference' => '9ab9d71f97d5c7d35a121a7fb69f74fee95cd0ad',
             'type' => 'symfony-bridge',
             'install_path' => __DIR__ . '/../symfony/psr-http-message-bridge',
             'aliases' => array(),
-            'reference' => '9ab9d71f97d5c7d35a121a7fb69f74fee95cd0ad',
             'dev_requirement' => false,
         ),
         'symfony/translation' => array(
             'pretty_version' => 'v4.3.2',
             'version' => '4.3.2.0',
+            'reference' => '934ab1d18545149e012aa898cf02e9f23790f7a0',
             'type' => 'library',
             'install_path' => __DIR__ . '/../symfony/translation',
             'aliases' => array(),
-            'reference' => '934ab1d18545149e012aa898cf02e9f23790f7a0',
             'dev_requirement' => false,
         ),
         'symfony/translation-contracts' => array(
             'pretty_version' => 'v1.1.5',
             'version' => '1.1.5.0',
+            'reference' => 'cb4b18ad7b92a26e83b65dde940fab78339e6f3c',
             'type' => 'library',
             'install_path' => __DIR__ . '/../symfony/translation-contracts',
             'aliases' => array(),
-            'reference' => 'cb4b18ad7b92a26e83b65dde940fab78339e6f3c',
             'dev_requirement' => false,
         ),
         'symfony/translation-implementation' => array(
@@ -730,154 +748,154 @@
         'symfony/var-dumper' => array(
             'pretty_version' => 'v4.3.1',
             'version' => '4.3.1.0',
+            'reference' => 'f974f448154928d2b5fb7c412bd23b81d063f34b',
             'type' => 'library',
             'install_path' => __DIR__ . '/../symfony/var-dumper',
             'aliases' => array(),
-            'reference' => 'f974f448154928d2b5fb7c412bd23b81d063f34b',
             'dev_requirement' => false,
         ),
         'topthink/framework' => array(
             'pretty_version' => 'v6.0.3',
             'version' => '6.0.3.0',
+            'reference' => 'b4046fb21e6163ba23a792b694162693dbe71b4b',
             'type' => 'library',
             'install_path' => __DIR__ . '/../topthink/framework',
             'aliases' => array(),
-            'reference' => 'b4046fb21e6163ba23a792b694162693dbe71b4b',
             'dev_requirement' => false,
         ),
         'topthink/think' => array(
-            'pretty_version' => '4.5.0.x-dev',
-            'version' => '4.5.0.9999999-dev',
+            'pretty_version' => 'dev-master',
+            'version' => 'dev-master',
+            'reference' => '13adf9a931c339ffb7910da803bf28c4ed4d1d9b',
             'type' => 'project',
             'install_path' => __DIR__ . '/../../',
             'aliases' => array(),
-            'reference' => 'a7e738f37c953fe6491353bb9f7807916136d5a3',
             'dev_requirement' => false,
         ),
         'topthink/think-captcha' => array(
             'pretty_version' => 'v3.0.1',
             'version' => '3.0.1.0',
+            'reference' => '9fc0c627d773f6a54a8dd142ebf358f746557a48',
             'type' => 'library',
             'install_path' => __DIR__ . '/../topthink/think-captcha',
             'aliases' => array(),
-            'reference' => '9fc0c627d773f6a54a8dd142ebf358f746557a48',
             'dev_requirement' => false,
         ),
         'topthink/think-factory' => array(
             'pretty_version' => 'v1.0.1',
             'version' => '1.0.1.0',
+            'reference' => 'b8080a6472aae1cff47ceb8c30feec3c2835364b',
             'type' => 'library',
             'install_path' => __DIR__ . '/../topthink/think-factory',
             'aliases' => array(),
-            'reference' => 'b8080a6472aae1cff47ceb8c30feec3c2835364b',
             'dev_requirement' => false,
         ),
         'topthink/think-helper' => array(
             'pretty_version' => 'v3.1.3',
             'version' => '3.1.3.0',
+            'reference' => '4d85dfd3778623bbb1de3648f1dcd0c82f4439f4',
             'type' => 'library',
             'install_path' => __DIR__ . '/../topthink/think-helper',
             'aliases' => array(),
-            'reference' => '4d85dfd3778623bbb1de3648f1dcd0c82f4439f4',
             'dev_requirement' => false,
         ),
         'topthink/think-image' => array(
             'pretty_version' => 'v1.0.7',
             'version' => '1.0.7.0',
+            'reference' => '8586cf47f117481c6d415b20f7dedf62e79d5512',
             'type' => 'library',
             'install_path' => __DIR__ . '/../topthink/think-image',
             'aliases' => array(),
-            'reference' => '8586cf47f117481c6d415b20f7dedf62e79d5512',
             'dev_requirement' => false,
         ),
         'topthink/think-multi-app' => array(
             'pretty_version' => 'v1.0.14',
             'version' => '1.0.14.0',
+            'reference' => 'ccaad7c2d33f42cb1cc2a78d6610aaec02cea4c3',
             'type' => 'library',
             'install_path' => __DIR__ . '/../topthink/think-multi-app',
             'aliases' => array(),
-            'reference' => 'ccaad7c2d33f42cb1cc2a78d6610aaec02cea4c3',
             'dev_requirement' => false,
         ),
         'topthink/think-orm' => array(
             'pretty_version' => 'v2.0.33',
             'version' => '2.0.33.0',
+            'reference' => '35ca511a1e4d671b39f7afb4c887703c16ef6957',
             'type' => 'library',
             'install_path' => __DIR__ . '/../topthink/think-orm',
             'aliases' => array(),
-            'reference' => '35ca511a1e4d671b39f7afb4c887703c16ef6957',
             'dev_requirement' => false,
         ),
         'topthink/think-queue' => array(
             'pretty_version' => 'v3.0.2',
             'version' => '3.0.2.0',
+            'reference' => 'c34b983abce9427fca7e30ac983b75041f436ad0',
             'type' => 'library',
             'install_path' => __DIR__ . '/../topthink/think-queue',
             'aliases' => array(),
-            'reference' => 'c34b983abce9427fca7e30ac983b75041f436ad0',
             'dev_requirement' => false,
         ),
         'topthink/think-template' => array(
             'pretty_version' => 'v2.0.7',
             'version' => '2.0.7.0',
+            'reference' => 'e98bdbb4a4c94b442f17dfceba81e0134d4fbd19',
             'type' => 'library',
             'install_path' => __DIR__ . '/../topthink/think-template',
             'aliases' => array(),
-            'reference' => 'e98bdbb4a4c94b442f17dfceba81e0134d4fbd19',
             'dev_requirement' => false,
         ),
         'topthink/think-view' => array(
             'pretty_version' => 'v1.0.13',
             'version' => '1.0.13.0',
+            'reference' => '90803b73f781db5d42619082c4597afc58b2d4c5',
             'type' => 'library',
             'install_path' => __DIR__ . '/../topthink/think-view',
             'aliases' => array(),
-            'reference' => '90803b73f781db5d42619082c4597afc58b2d4c5',
             'dev_requirement' => false,
         ),
         'workerman/channel' => array(
             'pretty_version' => 'v1.0.5',
             'version' => '1.0.5.0',
+            'reference' => '0836a9a413c6e8425ee36307d95e2e49cc380f50',
             'type' => 'library',
             'install_path' => __DIR__ . '/../workerman/channel',
             'aliases' => array(),
-            'reference' => '0836a9a413c6e8425ee36307d95e2e49cc380f50',
             'dev_requirement' => false,
         ),
         'workerman/workerman' => array(
             'pretty_version' => 'v3.5.19',
             'version' => '3.5.19.0',
+            'reference' => '4e5c24073b431fd950287efbfb5cc9b4c0fc7367',
             'type' => 'library',
             'install_path' => __DIR__ . '/../workerman/workerman',
             'aliases' => array(),
-            'reference' => '4e5c24073b431fd950287efbfb5cc9b4c0fc7367',
             'dev_requirement' => false,
         ),
         'xaboy/form-builder' => array(
             'pretty_version' => '2.0.17',
             'version' => '2.0.17.0',
+            'reference' => 'fc211560f2483ad61f1735293f62dc3202ce096a',
             'type' => 'library',
             'install_path' => __DIR__ . '/../xaboy/form-builder',
             'aliases' => array(),
-            'reference' => 'fc211560f2483ad61f1735293f62dc3202ce096a',
             'dev_requirement' => false,
         ),
         'xin/container' => array(
             'pretty_version' => '2.0.1',
             'version' => '2.0.1.0',
+            'reference' => '97bb67f87dd851545938a1f2fe0ffbd379e3ff81',
             'type' => 'library',
             'install_path' => __DIR__ . '/../xin/container',
             'aliases' => array(),
-            'reference' => '97bb67f87dd851545938a1f2fe0ffbd379e3ff81',
             'dev_requirement' => false,
         ),
         'xin/helper' => array(
             'pretty_version' => '1.0.0',
             'version' => '1.0.0.0',
+            'reference' => '02a58132dae2aea2d1c0b8e66f55125969224747',
             'type' => 'library',
             'install_path' => __DIR__ . '/../xin/helper',
             'aliases' => array(),
-            'reference' => '02a58132dae2aea2d1c0b8e66f55125969224747',
             'dev_requirement' => false,
         ),
     ),

+ 9 - 0
crmeb/vendor/intervention/image/LICENSE

@@ -0,0 +1,9 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Oliver Vogel
+
+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.

+ 47 - 0
crmeb/vendor/intervention/image/composer.json

@@ -0,0 +1,47 @@
+{
+    "name": "intervention/image",
+    "description": "Image handling and manipulation library with support for Laravel integration",
+    "homepage": "http://image.intervention.io/",
+    "keywords": ["image", "gd", "imagick", "laravel", "watermark", "thumbnail"],
+    "license": "MIT",
+    "authors": [
+        {
+            "name": "Oliver Vogel",
+            "email": "oliver@intervention.io",
+            "homepage": "https://intervention.io/"
+        }
+    ],
+    "require": {
+        "php": ">=5.4.0",
+        "ext-fileinfo": "*",
+        "guzzlehttp/psr7": "~1.1 || ^2.0"
+    },
+    "require-dev": {
+        "phpunit/phpunit": "^4.8 || ^5.7 || ^7.5.15",
+        "mockery/mockery": "~0.9.2"
+    },
+    "suggest": {
+        "ext-gd": "to use GD library based image processing.",
+        "ext-imagick": "to use Imagick based image processing.",
+        "intervention/imagecache": "Caching extension for the Intervention Image library"
+    },
+    "autoload": {
+        "psr-4": {
+            "Intervention\\Image\\": "src/Intervention/Image"
+        }
+    },
+    "extra": {
+        "branch-alias": {
+            "dev-master": "2.4-dev"
+        },
+        "laravel": {
+            "providers": [
+                "Intervention\\Image\\ImageServiceProvider"
+            ],
+            "aliases": {
+                "Image": "Intervention\\Image\\Facades\\Image"
+            }
+        }
+    },
+    "minimum-stability": "stable"
+}

+ 11 - 0
crmeb/vendor/intervention/image/provides.json

@@ -0,0 +1,11 @@
+{
+  "providers": [
+    "Intervention\\Image\\ImageServiceProvider"
+  ],
+  "aliases": [
+    {
+      "alias": "Image",
+      "facade": "Intervention\\Image\\Facades\\Image"
+    }
+  ]
+}

+ 229 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/AbstractColor.php

@@ -0,0 +1,229 @@
+<?php
+
+namespace Intervention\Image;
+
+use Intervention\Image\Exception\NotReadableException;
+use Intervention\Image\Exception\NotSupportedException;
+
+abstract class AbstractColor
+{
+    /**
+     * Initiates color object from integer
+     *
+     * @param  int $value
+     * @return \Intervention\Image\AbstractColor
+     */
+    abstract public function initFromInteger($value);
+
+    /**
+     * Initiates color object from given array
+     *
+     * @param  array $value
+     * @return \Intervention\Image\AbstractColor
+     */
+    abstract public function initFromArray($value);
+
+    /**
+     * Initiates color object from given string
+     *
+     * @param  string $value
+     * @return \Intervention\Image\AbstractColor
+     */
+    abstract public function initFromString($value);
+
+    /**
+     * Initiates color object from given ImagickPixel object
+     *
+     * @param  ImagickPixel $value
+     * @return \Intervention\Image\AbstractColor
+     */
+    abstract public function initFromObject($value);
+
+    /**
+     * Initiates color object from given R, G and B values
+     *
+     * @param  int $r
+     * @param  int $g
+     * @param  int $b
+     * @return \Intervention\Image\AbstractColor
+     */
+    abstract public function initFromRgb($r, $g, $b);
+
+    /**
+     * Initiates color object from given R, G, B and A values
+     *
+     * @param  int $r
+     * @param  int $g
+     * @param  int $b
+     * @param  float   $a
+     * @return \Intervention\Image\AbstractColor
+     */
+    abstract public function initFromRgba($r, $g, $b, $a);
+
+    /**
+     * Calculates integer value of current color instance
+     *
+     * @return int
+     */
+    abstract public function getInt();
+
+    /**
+     * Calculates hexadecimal value of current color instance
+     *
+     * @param  string $prefix
+     * @return string
+     */
+    abstract public function getHex($prefix);
+
+    /**
+     * Calculates RGB(A) in array format of current color instance
+     *
+     * @return array
+     */
+    abstract public function getArray();
+
+    /**
+     * Calculates RGBA in string format of current color instance
+     *
+     * @return string
+     */
+    abstract public function getRgba();
+
+    /**
+     * Determines if current color is different from given color
+     *
+     * @param  AbstractColor $color
+     * @param  int           $tolerance
+     * @return boolean
+     */
+    abstract public function differs(AbstractColor $color, $tolerance = 0);
+
+    /**
+     * Creates new instance
+     *
+     * @param mixed $value
+     */
+    public function __construct($value = null)
+    {
+        $this->parse($value);
+    }
+
+    /**
+     * Parses given value as color
+     *
+     * @param  mixed $value
+     * @return \Intervention\Image\AbstractColor
+     */
+    public function parse($value)
+    {
+        switch (true) {
+
+            case is_string($value):
+                $this->initFromString($value);
+                break;
+
+            case is_int($value):
+                $this->initFromInteger($value);
+                break;
+
+            case is_array($value):
+                $this->initFromArray($value);
+                break;
+
+            case is_object($value):
+                $this->initFromObject($value);
+                break;
+
+            case is_null($value):
+                $this->initFromArray([255, 255, 255, 0]);
+                break;
+
+            default:
+                throw new NotReadableException(
+                    "Color format ({$value}) cannot be read."
+                );
+        }
+
+        return $this;
+    }
+
+    /**
+     * Formats current color instance into given format
+     *
+     * @param  string $type
+     * @return mixed
+     */
+    public function format($type)
+    {
+        switch (strtolower($type)) {
+
+            case 'rgba':
+                return $this->getRgba();
+
+            case 'hex':
+                return $this->getHex('#');
+
+            case 'int':
+            case 'integer':
+                return $this->getInt();
+
+            case 'array':
+                return $this->getArray();
+
+            case 'obj':
+            case 'object':
+                return $this;
+
+            default:
+                throw new NotSupportedException(
+                    "Color format ({$type}) is not supported."
+                );
+        }
+    }
+
+    /**
+     * Reads RGBA values from string into array
+     *
+     * @param  string $value
+     * @return array
+     */
+    protected function rgbaFromString($value)
+    {
+        $result = false;
+
+        // parse color string in hexidecimal format like #cccccc or cccccc or ccc
+        $hexPattern = '/^#?([a-f0-9]{1,2})([a-f0-9]{1,2})([a-f0-9]{1,2})$/i';
+
+        // parse color string in format rgb(140, 140, 140)
+        $rgbPattern = '/^rgb ?\(([0-9]{1,3}), ?([0-9]{1,3}), ?([0-9]{1,3})\)$/i';
+
+        // parse color string in format rgba(255, 0, 0, 0.5)
+        $rgbaPattern = '/^rgba ?\(([0-9]{1,3}), ?([0-9]{1,3}), ?([0-9]{1,3}), ?([0-9.]{1,4})\)$/i';
+
+        if (preg_match($hexPattern, $value, $matches)) {
+            $result = [];
+            $result[0] = strlen($matches[1]) == '1' ? hexdec($matches[1].$matches[1]) : hexdec($matches[1]);
+            $result[1] = strlen($matches[2]) == '1' ? hexdec($matches[2].$matches[2]) : hexdec($matches[2]);
+            $result[2] = strlen($matches[3]) == '1' ? hexdec($matches[3].$matches[3]) : hexdec($matches[3]);
+            $result[3] = 1;
+        } elseif (preg_match($rgbPattern, $value, $matches)) {
+            $result = [];
+            $result[0] = ($matches[1] >= 0 && $matches[1] <= 255) ? intval($matches[1]) : 0;
+            $result[1] = ($matches[2] >= 0 && $matches[2] <= 255) ? intval($matches[2]) : 0;
+            $result[2] = ($matches[3] >= 0 && $matches[3] <= 255) ? intval($matches[3]) : 0;
+            $result[3] = 1;
+        } elseif (preg_match($rgbaPattern, $value, $matches)) {
+            $result = [];
+            $result[0] = ($matches[1] >= 0 && $matches[1] <= 255) ? intval($matches[1]) : 0;
+            $result[1] = ($matches[2] >= 0 && $matches[2] <= 255) ? intval($matches[2]) : 0;
+            $result[2] = ($matches[3] >= 0 && $matches[3] <= 255) ? intval($matches[3]) : 0;
+            $result[3] = ($matches[4] >= 0 && $matches[4] <= 1) ? $matches[4] : 0;
+        } else {
+            throw new NotReadableException(
+                "Unable to read color ({$value})."
+            );
+        }
+
+        return $result;
+    }
+}

+ 364 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/AbstractDecoder.php

@@ -0,0 +1,364 @@
+<?php
+
+namespace Intervention\Image;
+
+use GuzzleHttp\Psr7\Stream;
+use Intervention\Image\Exception\NotReadableException;
+use Psr\Http\Message\StreamInterface;
+
+abstract class AbstractDecoder
+{
+    /**
+     * Initiates new image from path in filesystem
+     *
+     * @param  string $path
+     * @return \Intervention\Image\Image
+     */
+    abstract public function initFromPath($path);
+
+    /**
+     * Initiates new image from binary data
+     *
+     * @param  string $data
+     * @return \Intervention\Image\Image
+     */
+    abstract public function initFromBinary($data);
+
+    /**
+     * Initiates new image from GD resource
+     *
+     * @param  Resource $resource
+     * @return \Intervention\Image\Image
+     */
+    abstract public function initFromGdResource($resource);
+
+    /**
+     * Initiates new image from Imagick object
+     *
+     * @param \Imagick $object
+     * @return \Intervention\Image\Image
+     */
+    abstract public function initFromImagick(\Imagick $object);
+
+    /**
+     * Buffer of input data
+     *
+     * @var mixed
+     */
+    private $data;
+
+    /**
+     * Creates new Decoder with data
+     *
+     * @param mixed $data
+     */
+    public function __construct($data = null)
+    {
+        $this->data = $data;
+    }
+
+    /**
+     * Init from given URL
+     *
+     * @param  string $url
+     * @return \Intervention\Image\Image
+     */
+    public function initFromUrl($url)
+    {
+        
+        $options = [
+            'http' => [
+                'method'=>"GET",
+                'protocol_version'=>1.1, // force use HTTP 1.1 for service mesh environment with envoy
+                'header'=>"Accept-language: en\r\n".
+                "User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36\r\n"
+          ]
+        ];
+        
+        $context  = stream_context_create($options);
+        
+
+        if ($data = @file_get_contents($url, false, $context)) {
+            return $this->initFromBinary($data);
+        }
+
+        throw new NotReadableException(
+            "Unable to init from given url (".$url.")."
+        );
+    }
+
+    /**
+     * Init from given stream
+     *
+     * @param StreamInterface|resource $stream
+     * @return \Intervention\Image\Image
+     */
+    public function initFromStream($stream)
+    {
+        if (!$stream instanceof StreamInterface) {
+            $stream = new Stream($stream);
+        }
+
+        try {
+            $offset = $stream->tell();
+        } catch (\RuntimeException $e) {
+            $offset = 0;
+        }
+
+        $shouldAndCanSeek = $offset !== 0 && $stream->isSeekable();
+
+        if ($shouldAndCanSeek) {
+            $stream->rewind();
+        }
+
+        try {
+            $data = $stream->getContents();
+        } catch (\RuntimeException $e) {
+            $data = null;
+        }
+
+        if ($shouldAndCanSeek) {
+            $stream->seek($offset);
+        }
+
+        if ($data) {
+            return $this->initFromBinary($data);
+        }
+
+        throw new NotReadableException(
+            "Unable to init from given stream"
+        );
+    }
+
+    /**
+     * Determines if current source data is GD resource
+     *
+     * @return boolean
+     */
+    public function isGdResource()
+    {
+        if (is_resource($this->data)) {
+            return (get_resource_type($this->data) == 'gd');
+        }
+
+        if ($this->data instanceof \GdImage) {
+            return true;
+        }
+
+        return false;
+    }
+
+    /**
+     * Determines if current source data is Imagick object
+     *
+     * @return boolean
+     */
+    public function isImagick()
+    {
+        return is_a($this->data, 'Imagick');
+    }
+
+    /**
+     * Determines if current source data is Intervention\Image\Image object
+     *
+     * @return boolean
+     */
+    public function isInterventionImage()
+    {
+        return is_a($this->data, '\Intervention\Image\Image');
+    }
+
+    /**
+     * Determines if current data is SplFileInfo object
+     *
+     * @return boolean
+     */
+    public function isSplFileInfo()
+    {
+        return is_a($this->data, 'SplFileInfo');
+    }
+
+    /**
+     * Determines if current data is Symfony UploadedFile component
+     *
+     * @return boolean
+     */
+    public function isSymfonyUpload()
+    {
+        return is_a($this->data, 'Symfony\Component\HttpFoundation\File\UploadedFile');
+    }
+
+    /**
+     * Determines if current source data is file path
+     *
+     * @return boolean
+     */
+    public function isFilePath()
+    {
+        if (is_string($this->data)) {
+            try {
+                return is_file($this->data);
+            } catch (\Exception $e) {
+                return false;
+            }
+        }
+
+        return false;
+    }
+
+    /**
+     * Determines if current source data is url
+     *
+     * @return boolean
+     */
+    public function isUrl()
+    {
+        return (bool) filter_var($this->data, FILTER_VALIDATE_URL);
+    }
+
+    /**
+     * Determines if current source data is a stream resource
+     *
+     * @return boolean
+     */
+    public function isStream()
+    {
+        if ($this->data instanceof StreamInterface) return true;
+        if (!is_resource($this->data)) return false;
+        if (get_resource_type($this->data) !== 'stream') return false;
+
+        return true;
+    }
+
+    /**
+     * Determines if current source data is binary data
+     *
+     * @return boolean
+     */
+    public function isBinary()
+    {
+        if (is_string($this->data)) {
+            $mime = finfo_buffer(finfo_open(FILEINFO_MIME_TYPE), $this->data);
+            return (substr($mime, 0, 4) != 'text' && $mime != 'application/x-empty');
+        }
+
+        return false;
+    }
+
+    /**
+     * Determines if current source data is data-url
+     *
+     * @return boolean
+     */
+    public function isDataUrl()
+    {
+        $data = $this->decodeDataUrl($this->data);
+
+        return is_null($data) ? false : true;
+    }
+
+    /**
+     * Determines if current source data is base64 encoded
+     *
+     * @return boolean
+     */
+    public function isBase64()
+    {
+        if (!is_string($this->data)) {
+            return false;
+        }
+
+        return base64_encode(base64_decode($this->data)) === str_replace(["\n", "\r"], '', $this->data);
+    }
+
+    /**
+     * Initiates new Image from Intervention\Image\Image
+     *
+     * @param  Image $object
+     * @return \Intervention\Image\Image
+     */
+    public function initFromInterventionImage($object)
+    {
+        return $object;
+    }
+
+    /**
+     * Parses and decodes binary image data from data-url
+     *
+     * @param  string $data_url
+     * @return string
+     */
+    private function decodeDataUrl($data_url)
+    {
+        if (!is_string($data_url)) {
+            return null;
+        }
+
+        $pattern = "/^data:(?:image\/[a-zA-Z\-\.]+)(?:charset=\".+\")?;base64,(?P<data>.+)$/";
+        preg_match($pattern, str_replace(["\n", "\r"], '', $data_url), $matches);
+
+        if (is_array($matches) && array_key_exists('data', $matches)) {
+            return base64_decode($matches['data']);
+        }
+
+        return null;
+    }
+
+    /**
+     * Initiates new image from mixed data
+     *
+     * @param  mixed $data
+     * @return \Intervention\Image\Image
+     */
+    public function init($data)
+    {
+        $this->data = $data;
+
+        switch (true) {
+
+            case $this->isGdResource():
+                return $this->initFromGdResource($this->data);
+
+            case $this->isImagick():
+                return $this->initFromImagick($this->data);
+
+            case $this->isInterventionImage():
+                return $this->initFromInterventionImage($this->data);
+
+            case $this->isSplFileInfo():
+                return $this->initFromPath($this->data->getRealPath());
+
+            case $this->isBinary():
+                return $this->initFromBinary($this->data);
+
+            case $this->isUrl():
+                return $this->initFromUrl($this->data);
+
+            case $this->isStream():
+                return $this->initFromStream($this->data);
+
+            case $this->isDataUrl():
+                return $this->initFromBinary($this->decodeDataUrl($this->data));
+
+            case $this->isFilePath():
+                return $this->initFromPath($this->data);
+
+            // isBase64 has to be after isFilePath to prevent false positives
+            case $this->isBase64():
+                return $this->initFromBinary(base64_decode($this->data));
+
+            default:
+                throw new NotReadableException("Image source not readable");
+        }
+    }
+
+    /**
+     * Decoder object transforms to string source data
+     *
+     * @return string
+     */
+    public function __toString()
+    {
+        return (string) $this->data;
+    }
+}

+ 140 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/AbstractDriver.php

@@ -0,0 +1,140 @@
+<?php
+
+namespace Intervention\Image;
+
+use Intervention\Image\Exception\NotSupportedException;
+
+abstract class AbstractDriver
+{
+    /**
+     * Decoder instance to init images from
+     *
+     * @var \Intervention\Image\AbstractDecoder
+     */
+    public $decoder;
+
+    /**
+     * Image encoder instance
+     *
+     * @var \Intervention\Image\AbstractEncoder
+     */
+    public $encoder;
+
+    /**
+     * Creates new image instance
+     *
+     * @param  int     $width
+     * @param  int     $height
+     * @param  string  $background
+     * @return \Intervention\Image\Image
+     */
+    abstract public function newImage($width, $height, $background);
+
+    /**
+     * Reads given string into color object
+     *
+     * @param  string $value
+     * @return AbstractColor
+     */
+    abstract public function parseColor($value);
+
+    /**
+     * Checks if core module installation is available
+     *
+     * @return boolean
+     */
+    abstract protected function coreAvailable();
+
+    /**
+     * Returns clone of given core
+     *
+     * @return mixed
+     */
+    public function cloneCore($core)
+    {
+        return clone $core;
+    }
+
+    /**
+     * Initiates new image from given input
+     *
+     * @param  mixed $data
+     * @return \Intervention\Image\Image
+     */
+    public function init($data)
+    {
+        return $this->decoder->init($data);
+    }
+
+    /**
+     * Encodes given image
+     *
+     * @param  Image   $image
+     * @param  string  $format
+     * @param  int     $quality
+     * @return \Intervention\Image\Image
+     */
+    public function encode($image, $format, $quality)
+    {
+        return $this->encoder->process($image, $format, $quality);
+    }
+
+    /**
+     * Executes named command on given image
+     *
+     * @param  Image  $image
+     * @param  string $name
+     * @param  array $arguments
+     * @return \Intervention\Image\Commands\AbstractCommand
+     */
+    public function executeCommand($image, $name, $arguments)
+    {
+        $commandName = $this->getCommandClassName($name);
+        $command = new $commandName($arguments);
+        $command->execute($image);
+
+        return $command;
+    }
+
+    /**
+     * Returns classname of given command name
+     *
+     * @param  string $name
+     * @return string
+     */
+    private function getCommandClassName($name)
+    {
+        if (extension_loaded('mbstring')) {
+            $name = mb_strtoupper(mb_substr($name, 0, 1)) . mb_substr($name, 1);
+        } else {
+            $name = strtoupper(substr($name, 0, 1)) . substr($name, 1);
+        }
+
+        $drivername = $this->getDriverName();
+        $classnameLocal = sprintf('\Intervention\Image\%s\Commands\%sCommand', $drivername, ucfirst($name));
+        $classnameGlobal = sprintf('\Intervention\Image\Commands\%sCommand', ucfirst($name));
+
+        if (class_exists($classnameLocal)) {
+            return $classnameLocal;
+        } elseif (class_exists($classnameGlobal)) {
+            return $classnameGlobal;
+        }
+
+        throw new NotSupportedException(
+            "Command ({$name}) is not available for driver ({$drivername})."
+        );
+    }
+
+    /**
+     * Returns name of current driver instance
+     *
+     * @return string
+     */
+    public function getDriverName()
+    {
+        $reflect = new \ReflectionClass($this);
+        $namespace = $reflect->getNamespaceName();
+
+        return substr(strrchr($namespace, "\\"), 1);
+    }
+}

+ 271 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/AbstractEncoder.php

@@ -0,0 +1,271 @@
+<?php
+
+namespace Intervention\Image;
+
+use Intervention\Image\Exception\InvalidArgumentException;
+use Intervention\Image\Exception\NotSupportedException;
+
+abstract class AbstractEncoder
+{
+    /**
+     * Buffer of encode result data
+     *
+     * @var string
+     */
+    public $result;
+
+    /**
+     * Image object to encode
+     *
+     * @var Image
+     */
+    public $image;
+
+    /**
+     * Output format of encoder instance
+     *
+     * @var string
+     */
+    public $format;
+
+    /**
+     * Output quality of encoder instance
+     *
+     * @var int
+     */
+    public $quality;
+    
+    /**
+     * Processes and returns encoded image as JPEG string
+     *
+     * @return string
+     */
+    abstract protected function processJpeg();
+
+    /**
+     * Processes and returns encoded image as PNG string
+     *
+     * @return string
+     */
+    abstract protected function processPng();
+
+    /**
+     * Processes and returns encoded image as GIF string
+     *
+     * @return string
+     */
+    abstract protected function processGif();
+
+    /**
+     * Processes and returns encoded image as TIFF string
+     *
+     * @return string
+     */
+    abstract protected function processTiff();
+
+    /**
+     * Processes and returns encoded image as BMP string
+     *
+     * @return string
+     */
+    abstract protected function processBmp();
+
+    /**
+     * Processes and returns encoded image as ICO string
+     *
+     * @return string
+     */
+    abstract protected function processIco();
+
+    /**
+     * Processes and returns image as WebP encoded string
+     *
+     * @return string
+     */
+    abstract protected function processWebp();
+
+    /**
+     * Processes and returns image as Avif encoded string
+     *
+     * @return string
+     */
+    abstract protected function processAvif();
+
+    /**
+     * Processes and returns image as Heic encoded string
+     *
+     * @return string
+     */
+    abstract protected function processHeic();
+
+    /**
+     * Process a given image
+     *
+     * @param  Image   $image
+     * @param  string  $format
+     * @param  int     $quality
+     * @return Image
+     */
+    public function process(Image $image, $format = null, $quality = null)
+    {
+        $this->setImage($image);
+        $this->setFormat($format);
+        $this->setQuality($quality);
+
+        switch (strtolower($this->format)) {
+
+            case 'data-url':
+                $this->result = $this->processDataUrl();
+                break;
+
+            case 'gif':
+            case 'image/gif':
+                $this->result = $this->processGif();
+                break;
+
+            case 'png':
+            case 'image/png':
+            case 'image/x-png':
+                $this->result = $this->processPng();
+                break;
+
+            case 'jpg':
+            case 'jpeg':
+            case 'jfif':
+            case 'image/jp2':
+            case 'image/jpg':
+            case 'image/jpeg':
+            case 'image/pjpeg':
+            case 'image/jfif':
+                $this->result = $this->processJpeg();
+                break;
+
+            case 'tif':
+            case 'tiff':
+            case 'image/tiff':
+            case 'image/tif':
+            case 'image/x-tif':
+            case 'image/x-tiff':
+                $this->result = $this->processTiff();
+                break;
+
+            case 'bmp':
+            case 'ms-bmp':
+            case 'x-bitmap':
+            case 'x-bmp':
+            case 'x-ms-bmp':
+            case 'x-win-bitmap':
+            case 'x-windows-bmp':
+            case 'x-xbitmap':
+            case 'image/ms-bmp':
+            case 'image/x-bitmap':
+            case 'image/x-bmp':
+            case 'image/x-ms-bmp':
+            case 'image/x-win-bitmap':
+            case 'image/x-windows-bmp':
+            case 'image/x-xbitmap':
+                $this->result = $this->processBmp();
+                break;
+
+            case 'ico':
+            case 'image/x-ico':
+            case 'image/x-icon':
+            case 'image/vnd.microsoft.icon':
+                $this->result = $this->processIco();
+                break;
+
+            case 'psd':
+            case 'image/vnd.adobe.photoshop':
+                $this->result = $this->processPsd();
+                break;
+
+            case 'webp':
+            case 'image/webp':
+            case 'image/x-webp':
+                $this->result = $this->processWebp();
+                break;
+
+            case 'avif':
+            case 'image/avif':
+                $this->result = $this->processAvif();
+                break;
+
+            case 'heic':
+            case 'image/heic':
+            case 'image/heif':
+                $this->result = $this->processHeic();
+                break;
+                
+            default:
+                throw new NotSupportedException(
+                    "Encoding format ({$this->format}) is not supported."
+                );
+        }
+
+        $this->setImage(null);
+
+        return $image->setEncoded($this->result);
+    }
+
+    /**
+     * Processes and returns encoded image as data-url string
+     *
+     * @return string
+     */
+    protected function processDataUrl()
+    {
+        $mime = $this->image->mime ? $this->image->mime : 'image/png';
+
+        return sprintf('data:%s;base64,%s',
+            $mime,
+            base64_encode($this->process($this->image, $mime, $this->quality))
+        );
+    }
+
+    /**
+     * Sets image to process
+     *
+     * @param Image $image
+     */
+    protected function setImage($image)
+    {
+        $this->image = $image;
+    }
+
+    /**
+     * Determines output format
+     *
+     * @param string $format
+     */
+    protected function setFormat($format = null)
+    {
+        if ($format == '' && $this->image instanceof Image) {
+            $format = $this->image->mime;
+        }
+
+        $this->format = $format ? $format : 'jpg';
+
+        return $this;
+    }
+
+    /**
+     * Determines output quality
+     *
+     * @param int $quality
+     */
+    protected function setQuality($quality)
+    {
+        $quality = is_null($quality) ? 90 : $quality;
+        $quality = $quality === 0 ? 1 : $quality;
+
+        if ($quality < 0 || $quality > 100) {
+            throw new InvalidArgumentException(
+                'Quality must range from 0 to 100.'
+            );
+        }
+
+        $this->quality = intval($quality);
+
+        return $this;
+    }
+}

+ 295 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/AbstractFont.php

@@ -0,0 +1,295 @@
+<?php
+
+namespace Intervention\Image;
+
+abstract class AbstractFont
+{
+    /**
+     * Text to be written
+     *
+     * @var String
+     */
+    public $text;
+
+    /**
+     * Text size in pixels
+     *
+     * @var int
+     */
+    public $size = 12;
+
+    /**
+     * Color of the text
+     *
+     * @var mixed
+     */
+    public $color = '000000';
+
+    /**
+     * Rotation angle of the text
+     *
+     * @var int
+     */
+    public $angle = 0;
+
+    /**
+     * Horizontal alignment of the text
+     *
+     * @var String
+     */
+    public $align;
+
+    /**
+     * Vertical alignment of the text
+     *
+     * @var String
+     */
+    public $valign;
+
+    /**
+     * Space between text characters
+     *
+     * @var float
+     */
+    public $kerning = 0;
+
+    /**
+     * Path to TTF or GD library internal font file of the text
+     *
+     * @var mixed
+     */
+    public $file;
+
+    /**
+     * Draws font to given image on given position
+     *
+     * @param  Image   $image
+     * @param  int     $posx
+     * @param  int     $posy
+     * @return boolean
+     */
+    abstract public function applyToImage(Image $image, $posx = 0, $posy = 0);
+
+    /**
+     * Calculates bounding box of current font setting
+     *
+     * @return array
+     */
+    abstract public function getBoxSize();
+
+    /**
+     * Create a new instance of Font
+     *
+     * @param String $text Text to be written
+     */
+    public function __construct($text = null)
+    {
+        $this->text = $text;
+    }
+
+    /**
+     * Set text to be written
+     *
+     * @param  String $text
+     * @return self
+     */
+    public function text($text)
+    {
+        $this->text = $text;
+
+        return $this;
+    }
+
+    /**
+     * Get text to be written
+     *
+     * @return String
+     */
+    public function getText()
+    {
+        return $this->text;
+    }
+
+    /**
+     * Set font size in pixels
+     *
+     * @param  int $size
+     * @return self
+     */
+    public function size($size)
+    {
+        $this->size = $size;
+
+        return $this;
+    }
+
+    /**
+     * Get font size in pixels
+     *
+     * @return int
+     */
+    public function getSize()
+    {
+        return $this->size;
+    }
+
+    /**
+     * Set color of text to be written
+     *
+     * @param  mixed $color
+     * @return self
+     */
+    public function color($color)
+    {
+        $this->color = $color;
+
+        return $this;
+    }
+
+    /**
+     * Get color of text
+     *
+     * @return mixed
+     */
+    public function getColor()
+    {
+        return $this->color;
+    }
+
+    /**
+     * Set rotation angle of text
+     *
+     * @param  int $angle
+     * @return self
+     */
+    public function angle($angle)
+    {
+        $this->angle = $angle;
+
+        return $this;
+    }
+
+    /**
+     * Get rotation angle of text
+     *
+     * @return int
+     */
+    public function getAngle()
+    {
+        return $this->angle;
+    }
+
+    /**
+     * Set horizontal text alignment
+     *
+     * @param  string $align
+     * @return self
+     */
+    public function align($align)
+    {
+        $this->align = $align;
+
+        return $this;
+    }
+
+    /**
+     * Get horizontal text alignment
+     *
+     * @return string
+     */
+    public function getAlign()
+    {
+        return $this->align;
+    }
+
+    /**
+     * Set vertical text alignment
+     *
+     * @param  string $valign
+     * @return self
+     */
+    public function valign($valign)
+    {
+        $this->valign = $valign;
+
+        return $this;
+    }
+
+    /**
+     * Get vertical text alignment
+     *
+     * @return string
+     */
+    public function getValign()
+    {
+        return $this->valign;
+    }
+
+    /**
+     * Set text kerning
+     *
+     * @param  string $kerning
+     * @return void
+     */
+    public function kerning($kerning)
+    {
+        $this->kerning = $kerning;
+    }
+
+    /**
+     * Get kerning
+     *
+     * @return float
+     */
+    public function getKerning()
+    {
+        return $this->kerning;
+    }
+
+    /**
+     * Set path to font file
+     *
+     * @param  string $file
+     * @return self
+     */
+    public function file($file)
+    {
+        $this->file = $file;
+
+        return $this;
+    }
+
+    /**
+     * Get path to font file
+     *
+     * @return string
+     */
+    public function getFile()
+    {
+        return $this->file;
+    }
+
+    /**
+     * Checks if current font has access to an applicable font file
+     *
+     * @return boolean
+     */
+    protected function hasApplicableFontFile()
+    {
+        if (is_string($this->file)) {
+            return file_exists($this->file);
+        }
+
+        return false;
+    }
+
+    /**
+     * Counts lines of text to be written
+     *
+     * @return int
+     */
+    public function countLines()
+    {
+        return count(explode(PHP_EOL, $this->text));
+    }
+}

+ 71 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/AbstractShape.php

@@ -0,0 +1,71 @@
+<?php
+
+namespace Intervention\Image;
+
+abstract class AbstractShape
+{
+    /**
+     * Background color of shape
+     *
+     * @var string
+     */
+    public $background;
+
+    /**
+     * Border color of current shape
+     *
+     * @var string
+     */
+    public $border_color;
+
+    /**
+     * Border width of shape
+     *
+     * @var int
+     */
+    public $border_width = 0;
+
+    /**
+     * Draws shape to given image on given position
+     *
+     * @param  Image   $image
+     * @param  int     $posx
+     * @param  int     $posy
+     * @return boolean
+     */
+    abstract public function applyToImage(Image $image, $posx = 0, $posy = 0);
+
+    /**
+     * Set text to be written
+     *
+     * @param  string $text
+     * @return void
+     */
+    public function background($color)
+    {
+        $this->background = $color;
+    }
+
+    /**
+     * Set border width and color of current shape
+     *
+     * @param  int     $width
+     * @param  string  $color
+     * @return void
+     */
+    public function border($width, $color = null)
+    {
+        $this->border_width = is_numeric($width) ? intval($width) : 0;
+        $this->border_color = is_null($color) ? '#000000' : $color;
+    }
+
+    /**
+     * Determines if current shape has border
+     *
+     * @return boolean
+     */
+    public function hasBorder()
+    {
+        return ($this->border_width >= 1);
+    }
+}

+ 81 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Commands/AbstractCommand.php

@@ -0,0 +1,81 @@
+<?php
+
+namespace Intervention\Image\Commands;
+
+use Intervention\Image\Commands\Argument;
+
+abstract class AbstractCommand
+{
+    /**
+     * Arguments of command
+     *
+     * @var array
+     */
+    public $arguments;
+
+    /**
+     * Output of command
+     *
+     * @var mixed
+     */
+    protected $output;
+
+    /**
+     * Executes current command on given image
+     *
+     * @param  \Intervention\Image\Image $image
+     * @return mixed
+     */
+    abstract public function execute($image);
+
+    /**
+     * Creates new command instance
+     *
+     * @param array $arguments
+     */
+    public function __construct($arguments)
+    {
+        $this->arguments = $arguments;
+    }
+
+    /**
+     * Creates new argument instance from given argument key
+     *
+     * @param  int $key
+     * @return \Intervention\Image\Commands\Argument
+     */
+    public function argument($key)
+    {
+        return new Argument($this, $key);
+    }
+
+    /**
+     * Returns output data of current command
+     *
+     * @return mixed
+     */
+    public function getOutput()
+    {
+        return $this->output ? $this->output : null;
+    }
+
+    /**
+     * Determines if current instance has output data
+     *
+     * @return boolean
+     */
+    public function hasOutput()
+    {
+        return ! is_null($this->output);
+    }
+
+    /**
+     * Sets output data of current command
+     *
+     * @param mixed $value
+     */
+    public function setOutput($value)
+    {
+        $this->output = $value;
+    }
+}

+ 225 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Commands/Argument.php

@@ -0,0 +1,225 @@
+<?php
+
+namespace Intervention\Image\Commands;
+
+use Intervention\Image\Exception\InvalidArgumentException;
+
+class Argument
+{
+    /**
+     * Command with arguments
+     *
+     * @var AbstractCommand
+     */
+    public $command;
+
+    /**
+     * Key of argument in array
+     *
+     * @var int
+     */
+    public $key;
+
+    /**
+     * Creates new instance from given command and key
+     *
+     * @param AbstractCommand $command
+     * @param int             $key
+     */
+    public function __construct(AbstractCommand $command, $key = 0)
+    {
+        $this->command = $command;
+        $this->key = $key;
+    }
+
+    /**
+     * Returns name of current arguments command
+     *
+     * @return string
+     */
+    public function getCommandName()
+    {
+        preg_match("/\\\\([\w]+)Command$/", get_class($this->command), $matches);
+        return isset($matches[1]) ? lcfirst($matches[1]).'()' : 'Method';
+    }
+
+    /**
+     * Returns value of current argument
+     *
+     * @param  mixed $default
+     * @return mixed
+     */
+    public function value($default = null)
+    {
+        $arguments = $this->command->arguments;
+
+        if (is_array($arguments)) {
+            return isset($arguments[$this->key]) ? $arguments[$this->key] : $default;
+        }
+
+        return $default;
+    }
+
+    /**
+     * Defines current argument as required
+     *
+     * @return \Intervention\Image\Commands\Argument
+     */
+    public function required()
+    {
+        if ( ! array_key_exists($this->key, $this->command->arguments)) {
+            throw new InvalidArgumentException(
+                sprintf("Missing argument %d for %s", $this->key + 1, $this->getCommandName())
+            );
+        }
+
+        return $this;
+    }
+
+    /**
+     * Determines that current argument must be of given type
+     *
+     * @return \Intervention\Image\Commands\Argument
+     */
+    public function type($type)
+    {
+        $valid = true;
+        $value = $this->value();
+
+        if ($value === null) {
+            return $this;
+        }
+
+        switch (strtolower($type)) {
+            case 'bool':
+            case 'boolean':
+                $valid = \is_bool($value);
+                $message = '%s accepts only boolean values as argument %d.';
+                break;
+            case 'int':
+            case 'integer':
+                $valid = \is_int($value);
+                $message = '%s accepts only integer values as argument %d.';
+                break;
+            case 'num':
+            case 'numeric':
+                $valid = is_numeric($value);
+                $message = '%s accepts only numeric values as argument %d.';
+                break;
+            case 'str':
+            case 'string':
+                $valid = \is_string($value);
+                $message = '%s accepts only string values as argument %d.';
+                break;
+            case 'array':
+                $valid = \is_array($value);
+                $message = '%s accepts only array as argument %d.';
+                break;
+            case 'closure':
+                $valid = is_a($value, '\Closure');
+                $message = '%s accepts only Closure as argument %d.';
+                break;
+            case 'digit':
+                $valid = $this->isDigit($value);
+                $message = '%s accepts only integer values as argument %d.';
+                break;
+        }
+
+        if (! $valid) {
+            $commandName = $this->getCommandName();
+            $argument = $this->key + 1;
+
+            if (isset($message)) {
+                $message = sprintf($message, $commandName, $argument);
+            } else {
+                $message = sprintf('Missing argument for %d.', $argument);
+            }
+
+            throw new InvalidArgumentException(
+                $message
+            );
+        }
+
+        return $this;
+    }
+
+    /**
+     * Determines that current argument value must be numeric between given values
+     *
+     * @return \Intervention\Image\Commands\Argument
+     */
+    public function between($x, $y)
+    {
+        $value = $this->type('numeric')->value();
+
+        if (is_null($value)) {
+            return $this;
+        }
+
+        $alpha = min($x, $y);
+        $omega = max($x, $y);
+
+        if ($value < $alpha || $value > $omega) {
+            throw new InvalidArgumentException(
+                sprintf('Argument %d must be between %s and %s.', $this->key, $x, $y)
+            );
+        }
+
+        return $this;
+    }
+
+    /**
+     * Determines that current argument must be over a minimum value
+     *
+     * @return \Intervention\Image\Commands\Argument
+     */
+    public function min($value)
+    {
+        $v = $this->type('numeric')->value();
+
+        if (is_null($v)) {
+            return $this;
+        }
+
+        if ($v < $value) {
+            throw new InvalidArgumentException(
+                sprintf('Argument %d must be at least %s.', $this->key, $value)
+            );
+        }
+
+        return $this;
+    }
+
+    /**
+     * Determines that current argument must be under a maxiumum value
+     *
+     * @return \Intervention\Image\Commands\Argument
+     */
+    public function max($value)
+    {
+        $v = $this->type('numeric')->value();
+
+        if (is_null($v)) {
+            return $this;
+        }
+
+        if ($v > $value) {
+            throw new InvalidArgumentException(
+                sprintf('Argument %d may not be greater than %s.', $this->key, $value)
+            );
+        }
+
+        return $this;
+    }
+
+    /**
+     * Checks if value is "PHP" integer (120 but also 120.0)
+     *
+     * @param  mixed $value
+     * @return boolean
+     */
+    private function isDigit($value)
+    {
+        return is_numeric($value) ? intval($value) == $value : false;
+    }
+}

+ 29 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Commands/ChecksumCommand.php

@@ -0,0 +1,29 @@
+<?php
+
+namespace Intervention\Image\Commands;
+
+class ChecksumCommand extends AbstractCommand
+{
+    /**
+     * Calculates checksum of given image
+     *
+     * @param  \Intervention\Image\Image $image
+     * @return boolean
+     */
+    public function execute($image)
+    {
+        $colors = [];
+
+        $size = $image->getSize();
+
+        for ($x=0; $x <= ($size->width-1); $x++) {
+            for ($y=0; $y <= ($size->height-1); $y++) {
+                $colors[] = $image->pickColor($x, $y, 'array');
+            }
+        }
+
+        $this->setOutput(md5(serialize($colors)));
+
+        return true;
+    }
+}

+ 35 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Commands/CircleCommand.php

@@ -0,0 +1,35 @@
+<?php
+
+namespace Intervention\Image\Commands;
+
+use Closure;
+
+class CircleCommand extends AbstractCommand
+{
+    /**
+     * Draw a circle centered on given image
+     *
+     * @param  \Intervention\Image\image $image
+     * @return boolean
+     */
+    public function execute($image)
+    {
+        $diameter = $this->argument(0)->type('numeric')->required()->value();
+        $x = $this->argument(1)->type('numeric')->required()->value();
+        $y = $this->argument(2)->type('numeric')->required()->value();
+        $callback = $this->argument(3)->type('closure')->value();
+
+        $circle_classname = sprintf('\Intervention\Image\%s\Shapes\CircleShape',
+            $image->getDriver()->getDriverName());
+
+        $circle = new $circle_classname($diameter);
+
+        if ($callback instanceof Closure) {
+            $callback($circle);
+        }
+
+        $circle->applyToImage($image, $x, $y);
+
+        return true;
+    }
+}

+ 36 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Commands/EllipseCommand.php

@@ -0,0 +1,36 @@
+<?php
+
+namespace Intervention\Image\Commands;
+
+use Closure;
+
+class EllipseCommand extends AbstractCommand
+{
+    /**
+     * Draws ellipse on given image
+     *
+     * @param  \Intervention\Image\Image $image
+     * @return boolean
+     */
+    public function execute($image)
+    {
+        $width = $this->argument(0)->type('numeric')->required()->value();
+        $height = $this->argument(1)->type('numeric')->required()->value();
+        $x = $this->argument(2)->type('numeric')->required()->value();
+        $y = $this->argument(3)->type('numeric')->required()->value();
+        $callback = $this->argument(4)->type('closure')->value();
+
+        $ellipse_classname = sprintf('\Intervention\Image\%s\Shapes\EllipseShape',
+            $image->getDriver()->getDriverName());
+
+        $ellipse = new $ellipse_classname($width, $height);
+
+        if ($callback instanceof Closure) {
+            $callback($ellipse);
+        }
+
+        $ellipse->applyToImage($image, $x, $y);
+
+        return true;
+    }
+}

+ 61 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Commands/ExifCommand.php

@@ -0,0 +1,61 @@
+<?php
+
+namespace Intervention\Image\Commands;
+
+use Intervention\Image\Exception\NotReadableException;
+use Intervention\Image\Exception\NotSupportedException;
+
+class ExifCommand extends AbstractCommand
+{
+    /**
+     * Read Exif data from the given image
+     *
+     * Note: Windows PHP Users - in order to use this method you will need to
+     * enable the mbstring and exif extensions within the php.ini file.
+     *
+     * @param  \Intervention\Image\Image $image
+     * @return boolean
+     */
+    public function execute($image)
+    {
+        if (!function_exists('exif_read_data')) {
+            throw new NotSupportedException(
+                "Reading Exif data is not supported by this PHP installation."
+            );
+        }
+
+        $key = $this->argument(0)->value();
+
+        // try to read exif data from image file
+        try {
+            if ($image->dirname && $image->basename) {
+                $stream = $image->dirname . '/' . $image->basename;
+            } elseif (version_compare(PHP_VERSION, '7.2.0', '>=')) {
+                // https://www.php.net/manual/en/function.exif-read-data.php#refsect1-function.exif-read-data-changelog
+                $stream = $image->stream()->detach();
+            } else {
+                // https://bugs.php.net/bug.php?id=65187
+                $stream = $image->encode('data-url')->encoded;
+            }
+
+            $data = @exif_read_data($stream);
+
+            if (!is_null($key) && is_array($data)) {
+                $data = array_key_exists($key, $data) ? $data[$key] : false;
+            }
+
+        } catch (\Exception $e) {
+            throw new NotReadableException(
+                sprintf(
+                    "Cannot read the Exif data from the filename (%s) provided ",
+                    $image->dirname . '/' . $image->basename
+                ),
+                $e->getCode(),
+                $e
+            );
+        }
+
+        $this->setOutput($data);
+        return true;
+    }
+}

+ 68 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Commands/IptcCommand.php

@@ -0,0 +1,68 @@
+<?php
+
+namespace Intervention\Image\Commands;
+
+use Intervention\Image\Exception\NotSupportedException;
+
+class IptcCommand extends AbstractCommand
+{
+    /**
+     * Read Iptc data from the given image
+     *
+     * @param  \Intervention\Image\Image $image
+     * @return boolean
+     */
+    public function execute($image)
+    {
+        if ( ! function_exists('iptcparse')) {
+            throw new NotSupportedException(
+                "Reading Iptc data is not supported by this PHP installation."
+            );
+        }
+
+        $key = $this->argument(0)->value();
+
+        $info = [];
+        @getimagesize($image->dirname .'/'. $image->basename, $info);
+
+        $data = [];
+
+        if (array_key_exists('APP13', $info)) {
+            $iptc = iptcparse($info['APP13']);
+
+            if (is_array($iptc)) {
+                $data['DocumentTitle'] = isset($iptc["2#005"][0]) ? $iptc["2#005"][0] : null;
+                $data['Urgency'] = isset($iptc["2#010"][0]) ? $iptc["2#010"][0] : null;
+                $data['Category'] = isset($iptc["2#015"][0]) ? $iptc["2#015"][0] : null;
+                $data['Subcategories'] = isset($iptc["2#020"][0]) ? $iptc["2#020"][0] : null;
+                $data['Keywords'] = isset($iptc["2#025"][0]) ? $iptc["2#025"] : null;
+                $data['ReleaseDate'] = isset($iptc["2#030"][0]) ? $iptc["2#030"][0] : null;
+                $data['ReleaseTime'] = isset($iptc["2#035"][0]) ? $iptc["2#035"][0] : null;
+                $data['SpecialInstructions'] = isset($iptc["2#040"][0]) ? $iptc["2#040"][0] : null;
+                $data['CreationDate'] = isset($iptc["2#055"][0]) ? $iptc["2#055"][0] : null;
+                $data['CreationTime'] = isset($iptc["2#060"][0]) ? $iptc["2#060"][0] : null;
+                $data['AuthorByline'] = isset($iptc["2#080"][0]) ? $iptc["2#080"][0] : null;
+                $data['AuthorTitle'] = isset($iptc["2#085"][0]) ? $iptc["2#085"][0] : null;
+                $data['City'] = isset($iptc["2#090"][0]) ? $iptc["2#090"][0] : null;
+                $data['SubLocation'] = isset($iptc["2#092"][0]) ? $iptc["2#092"][0] : null;
+                $data['State'] = isset($iptc["2#095"][0]) ? $iptc["2#095"][0] : null;
+                $data['Country'] = isset($iptc["2#101"][0]) ? $iptc["2#101"][0] : null;
+                $data['OTR'] = isset($iptc["2#103"][0]) ? $iptc["2#103"][0] : null;
+                $data['Headline'] = isset($iptc["2#105"][0]) ? $iptc["2#105"][0] : null;
+                $data['Source'] = isset($iptc["2#110"][0]) ? $iptc["2#110"][0] : null;
+                $data['PhotoSource'] = isset($iptc["2#115"][0]) ? $iptc["2#115"][0] : null;
+                $data['Copyright'] = isset($iptc["2#116"][0]) ? $iptc["2#116"][0] : null;
+                $data['Caption'] = isset($iptc["2#120"][0]) ? $iptc["2#120"][0] : null;
+                $data['CaptionWriter'] = isset($iptc["2#122"][0]) ? $iptc["2#122"][0] : null;
+            }
+        }
+
+        if (! is_null($key) && is_array($data)) {
+            $data = array_key_exists($key, $data) ? $data[$key] : false;
+        }
+
+        $this->setOutput($data);
+
+        return true;
+    }
+}

+ 36 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Commands/LineCommand.php

@@ -0,0 +1,36 @@
+<?php
+
+namespace Intervention\Image\Commands;
+
+use Closure;
+
+class LineCommand extends AbstractCommand
+{
+    /**
+     * Draws line on given image
+     *
+     * @param  \Intervention\Image\Image $image
+     * @return boolean
+     */
+    public function execute($image)
+    {
+        $x1 = $this->argument(0)->type('numeric')->required()->value();
+        $y1 = $this->argument(1)->type('numeric')->required()->value();
+        $x2 = $this->argument(2)->type('numeric')->required()->value();
+        $y2 = $this->argument(3)->type('numeric')->required()->value();
+        $callback = $this->argument(4)->type('closure')->value();
+
+        $line_classname = sprintf('\Intervention\Image\%s\Shapes\LineShape',
+            $image->getDriver()->getDriverName());
+
+        $line = new $line_classname($x2, $y2);
+
+        if ($callback instanceof Closure) {
+            $callback($line);
+        }
+
+        $line->applyToImage($image, $x1, $y1);
+
+        return true;
+    }
+}

+ 48 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Commands/OrientateCommand.php

@@ -0,0 +1,48 @@
+<?php
+
+namespace Intervention\Image\Commands;
+
+class OrientateCommand extends AbstractCommand
+{
+    /**
+     * Correct image orientation according to Exif data
+     *
+     * @param  \Intervention\Image\Image $image
+     * @return boolean
+     */
+    public function execute($image)
+    {
+        switch ($image->exif('Orientation')) {
+
+            case 2:
+                $image->flip();
+                break;
+
+            case 3:
+                $image->rotate(180);
+                break;
+
+            case 4:
+                $image->rotate(180)->flip();
+                break;
+
+            case 5:
+                $image->rotate(270)->flip();
+                break;
+
+            case 6:
+                $image->rotate(270);
+                break;
+
+            case 7:
+                $image->rotate(90)->flip();
+                break;
+
+            case 8:
+                $image->rotate(90);
+                break;
+        }
+
+        return true;
+    }
+}

+ 49 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Commands/PolygonCommand.php

@@ -0,0 +1,49 @@
+<?php
+
+namespace Intervention\Image\Commands;
+
+use Closure;
+use Intervention\Image\Exception\InvalidArgumentException;
+
+class PolygonCommand extends AbstractCommand
+{
+    /**
+     * Draw a polygon on given image
+     *
+     * @param  \Intervention\Image\image $image
+     * @return boolean
+     */
+    public function execute($image)
+    {
+        $points = $this->argument(0)->type('array')->required()->value();
+        $callback = $this->argument(1)->type('closure')->value();
+
+        $vertices_count = count($points);
+
+        // check if number if coordinates is even
+        if ($vertices_count % 2 !== 0) {
+            throw new InvalidArgumentException(
+                "The number of given polygon vertices must be even."
+            );
+        }
+
+        if ($vertices_count < 6) {
+            throw new InvalidArgumentException(
+                "You must have at least 3 points in your array."
+            );
+        }
+        
+        $polygon_classname = sprintf('\Intervention\Image\%s\Shapes\PolygonShape',
+            $image->getDriver()->getDriverName());
+
+        $polygon = new $polygon_classname($points);
+        
+        if ($callback instanceof Closure) {
+            $callback($polygon);
+        }
+
+        $polygon->applyToImage($image);
+
+        return true;
+    }
+}

+ 45 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Commands/PsrResponseCommand.php

@@ -0,0 +1,45 @@
+<?php
+
+namespace Intervention\Image\Commands;
+
+use GuzzleHttp\Psr7\Response;
+
+class PsrResponseCommand extends AbstractCommand
+{
+    /**
+     * Builds PSR7 compatible response. May replace "response" command in
+     * some future.
+     *
+     * Method will generate binary stream and put it inside PSR-7
+     * ResponseInterface. Following code can be optimized using native php
+     * streams and more "clean" streaming, however drivers has to be updated
+     * first.
+     *
+     * @param  \Intervention\Image\Image $image
+     * @return boolean
+     */
+    public function execute($image)
+    {
+        $format = $this->argument(0)->value();
+        $quality = $this->argument(1)->between(0, 100)->value();
+
+        //Encoded property will be populated at this moment
+        $stream = $image->stream($format, $quality);
+
+        $mimetype = finfo_buffer(
+            finfo_open(FILEINFO_MIME_TYPE),
+            $image->getEncoded()
+        );
+
+        $this->setOutput(new Response(
+            200,
+            [
+                'Content-Type'   => $mimetype,
+                'Content-Length' => strlen($image->getEncoded())
+            ],
+            $stream
+        ));
+
+        return true;
+    }
+}

+ 36 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Commands/RectangleCommand.php

@@ -0,0 +1,36 @@
+<?php
+
+namespace Intervention\Image\Commands;
+
+use Closure;
+
+class RectangleCommand extends AbstractCommand
+{
+    /**
+     * Draws rectangle on given image
+     *
+     * @param  \Intervention\Image\Image $image
+     * @return boolean
+     */
+    public function execute($image)
+    {
+        $x1 = $this->argument(0)->type('numeric')->required()->value();
+        $y1 = $this->argument(1)->type('numeric')->required()->value();
+        $x2 = $this->argument(2)->type('numeric')->required()->value();
+        $y2 = $this->argument(3)->type('numeric')->required()->value();
+        $callback = $this->argument(4)->type('closure')->value();
+
+        $rectangle_classname = sprintf('\Intervention\Image\%s\Shapes\RectangleShape',
+            $image->getDriver()->getDriverName());
+
+        $rectangle = new $rectangle_classname($x1, $y1, $x2, $y2);
+
+        if ($callback instanceof Closure) {
+            $callback($rectangle);
+        }
+
+        $rectangle->applyToImage($image, $x1, $y1);
+
+        return true;
+    }
+}

+ 26 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Commands/ResponseCommand.php

@@ -0,0 +1,26 @@
+<?php
+
+namespace Intervention\Image\Commands;
+
+use Intervention\Image\Response;
+
+class ResponseCommand extends AbstractCommand
+{
+    /**
+     * Builds HTTP response from given image
+     *
+     * @param  \Intervention\Image\Image $image
+     * @return boolean
+     */
+    public function execute($image)
+    {
+        $format = $this->argument(0)->value();
+        $quality = $this->argument(1)->between(0, 100)->value();
+
+        $response = new Response($image, $format, $quality);
+
+        $this->setOutput($response->make());
+
+        return true;
+    }
+}

+ 39 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Commands/StreamCommand.php

@@ -0,0 +1,39 @@
+<?php
+
+namespace Intervention\Image\Commands;
+
+class StreamCommand extends AbstractCommand
+{
+    /**
+     * Builds PSR7 stream based on image data. Method uses Guzzle PSR7
+     * implementation as easiest choice.
+     *
+     * @param  \Intervention\Image\Image $image
+     * @return boolean
+     */
+    public function execute($image)
+    {
+        $format = $this->argument(0)->value();
+        $quality = $this->argument(1)->between(0, 100)->value();
+        $data = $image->encode($format, $quality)->getEncoded();
+
+        $this->setOutput($this->getStream($data));
+
+        return true;
+    }
+
+    /**
+     * Create stream from given data
+     *
+     * @param  string $data
+     * @return \Psr\Http\Message\StreamInterface
+     */
+    protected function getStream($data)
+    {
+        if (class_exists(\GuzzleHttp\Psr7\Utils::class)) {
+            return \GuzzleHttp\Psr7\Utils::streamFor($data); // guzzlehttp/psr7 >= 2.0
+        }
+
+        return \GuzzleHttp\Psr7\stream_for($data); // guzzlehttp/psr7 < 2.0
+    }
+}

+ 34 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Commands/TextCommand.php

@@ -0,0 +1,34 @@
+<?php
+
+namespace Intervention\Image\Commands;
+
+use Closure;
+
+class TextCommand extends AbstractCommand
+{
+    /**
+     * Write text on given image
+     * @param  \Intervention\Image\Image $image
+     * @return boolean
+     */
+    public function execute($image)
+    {
+        $text = $this->argument(0)->required()->value();
+        $x = $this->argument(1)->type('numeric')->value(0);
+        $y = $this->argument(2)->type('numeric')->value(0);
+        $callback = $this->argument(3)->type('closure')->value();
+
+        $fontclassname = sprintf('\Intervention\Image\%s\Font',
+            $image->getDriver()->getDriverName());
+
+        $font = new $fontclassname($text);
+
+        if ($callback instanceof Closure) {
+            $callback($font);
+        }
+
+        $font->applyToImage($image, $x, $y);
+
+        return true;
+    }
+}

+ 92 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Constraint.php

@@ -0,0 +1,92 @@
+<?php
+
+namespace Intervention\Image;
+
+class Constraint
+{
+    /**
+     * Bit value of aspect ratio constraint
+     */
+    const ASPECTRATIO = 1;
+
+    /**
+     * Bit value of upsize constraint
+     */
+    const UPSIZE = 2;
+
+    /**
+     * Constraint size
+     *
+     * @var \Intervention\Image\Size
+     */
+    private $size;
+
+    /**
+     * Integer value of fixed parameters
+     *
+     * @var int
+     */
+    private $fixed = 0;
+
+    /**
+     * Create a new constraint based on size
+     *
+     * @param Size $size
+     */
+    public function __construct(Size $size)
+    {
+        $this->size = $size;
+    }
+
+    /**
+     * Returns current size of constraint
+     *
+     * @return \Intervention\Image\Size
+     */
+    public function getSize()
+    {
+        return $this->size;
+    }
+
+    /**
+     * Fix the given argument in current constraint
+     *
+     * @param  int $type
+     * @return void
+     */
+    public function fix($type)
+    {
+        $this->fixed = ($this->fixed & ~(1 << $type)) | (1 << $type);
+    }
+
+    /**
+     * Checks if given argument is fixed in current constraint
+     *
+     * @param  int  $type
+     * @return boolean
+     */
+    public function isFixed($type)
+    {
+        return (bool) ($this->fixed & (1 << $type));
+    }
+
+    /**
+     * Fixes aspect ratio in current constraint
+     *
+     * @return void
+     */
+    public function aspectRatio()
+    {
+        $this->fix(self::ASPECTRATIO);
+    }
+
+    /**
+     * Fixes possibility to size up in current constraint
+     *
+     * @return void
+     */
+    public function upsize()
+    {
+        $this->fix(self::UPSIZE);
+    }
+}

+ 8 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Exception/ImageException.php

@@ -0,0 +1,8 @@
+<?php
+
+namespace Intervention\Image\Exception;
+
+class ImageException extends \RuntimeException
+{
+    # nothing to override
+}

+ 8 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Exception/InvalidArgumentException.php

@@ -0,0 +1,8 @@
+<?php
+
+namespace Intervention\Image\Exception;
+
+class InvalidArgumentException extends ImageException
+{
+    # nothing to override
+}

+ 8 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Exception/MissingDependencyException.php

@@ -0,0 +1,8 @@
+<?php
+
+namespace Intervention\Image\Exception;
+
+class MissingDependencyException extends ImageException
+{
+    # nothing to override
+}

+ 8 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Exception/NotFoundException.php

@@ -0,0 +1,8 @@
+<?php
+
+namespace Intervention\Image\Exception;
+
+class NotFoundException extends ImageException
+{
+    # nothing to override
+}

+ 8 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Exception/NotReadableException.php

@@ -0,0 +1,8 @@
+<?php
+
+namespace Intervention\Image\Exception;
+
+class NotReadableException extends ImageException
+{
+    # nothing to override
+}

+ 8 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Exception/NotSupportedException.php

@@ -0,0 +1,8 @@
+<?php
+
+namespace Intervention\Image\Exception;
+
+class NotSupportedException extends ImageException
+{
+    # nothing to override
+}

+ 8 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Exception/NotWritableException.php

@@ -0,0 +1,8 @@
+<?php
+
+namespace Intervention\Image\Exception;
+
+class NotWritableException extends ImageException
+{
+    # nothing to override
+}

+ 8 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Exception/RuntimeException.php

@@ -0,0 +1,8 @@
+<?php
+
+namespace Intervention\Image\Exception;
+
+class RuntimeException extends ImageException
+{
+    # nothing to override
+}

+ 19 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Facades/Image.php

@@ -0,0 +1,19 @@
+<?php
+
+namespace Intervention\Image\Facades;
+
+use Illuminate\Support\Facades\Facade;
+
+/**
+ * @method static \Intervention\Image\Image make(mixed $data)
+ * @method static self configure(array $config)
+ * @method static \Intervention\Image\Image canvas(int $width, int $height, mixed $background = null)
+ * @method static \Intervention\Image\Image cache(\Closure $callback, int $lifetime = null, boolean $returnObj = false)
+ */
+class Image extends Facade
+{
+    protected static function getFacadeAccessor()
+    {
+        return 'image';
+    }
+}

+ 92 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/File.php

@@ -0,0 +1,92 @@
+<?php
+
+namespace Intervention\Image;
+
+class File
+{
+    /**
+     * Mime type
+     *
+     * @var string
+     */
+    public $mime;
+
+    /**
+     * Name of directory path
+     *
+     * @var string
+     */
+    public $dirname;
+
+    /**
+     * Basename of current file
+     *
+     * @var string
+     */
+    public $basename;
+
+    /**
+     * File extension of current file
+     *
+     * @var string
+     */
+    public $extension;
+
+    /**
+     * File name of current file
+     *
+     * @var string
+     */
+    public $filename;
+
+    /**
+     * Sets all instance properties from given path
+     *
+     * @param string $path
+     */
+    public function setFileInfoFromPath($path)
+    {
+        $info = pathinfo($path);
+        $this->dirname = array_key_exists('dirname', $info) ? $info['dirname'] : null;
+        $this->basename = array_key_exists('basename', $info) ? $info['basename'] : null;
+        $this->extension = array_key_exists('extension', $info) ? $info['extension'] : null;
+        $this->filename = array_key_exists('filename', $info) ? $info['filename'] : null;
+
+        if (file_exists($path) && is_file($path)) {
+            $this->mime = finfo_file(finfo_open(FILEINFO_MIME_TYPE), $path);
+        }
+
+        return $this;
+    }
+
+     /**
+      * Get file size
+      * 
+      * @return mixed
+      */
+    public function filesize()
+    {
+        $path = $this->basePath();
+
+        if (file_exists($path) && is_file($path)) {
+            return filesize($path);
+        }
+        
+        return false;
+    }
+
+    /**
+     * Get fully qualified path
+     *
+     * @return string
+     */
+    public function basePath()
+    {
+        if ($this->dirname && $this->basename) {
+            return ($this->dirname .'/'. $this->basename);
+        }
+
+        return null;
+    }
+
+}

+ 44 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Filters/DemoFilter.php

@@ -0,0 +1,44 @@
+<?php
+
+namespace Intervention\Image\Filters;
+
+use Intervention\Image\Image;
+
+class DemoFilter implements FilterInterface
+{
+    /**
+     * Default size of filter effects
+     */
+    const DEFAULT_SIZE = 10;
+
+    /**
+     * Size of filter effects
+     *
+     * @var int
+     */
+    private $size;
+
+    /**
+     * Creates new instance of filter
+     *
+     * @param int $size
+     */
+    public function __construct($size = null)
+    {
+        $this->size = is_numeric($size) ? intval($size) : self::DEFAULT_SIZE;
+    }
+
+    /**
+     * Applies filter effects to given image
+     *
+     * @param  \Intervention\Image\Image $image
+     * @return \Intervention\Image\Image
+     */
+    public function applyFilter(Image $image)
+    {
+        $image->pixelate($this->size);
+        $image->greyscale();
+
+        return $image;
+    }
+}

+ 16 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Filters/FilterInterface.php

@@ -0,0 +1,16 @@
+<?php
+
+namespace Intervention\Image\Filters;
+
+use Intervention\Image\Image;
+
+interface FilterInterface
+{
+    /**
+     * Applies filter to given image
+     *
+     * @param  \Intervention\Image\Image $image
+     * @return \Intervention\Image\Image
+     */
+    public function applyFilter(Image $image);
+}

+ 227 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Color.php

@@ -0,0 +1,227 @@
+<?php
+
+namespace Intervention\Image\Gd;
+
+use Intervention\Image\AbstractColor;
+use Intervention\Image\Exception\NotSupportedException;
+
+class Color extends AbstractColor
+{
+    /**
+     * RGB Red value of current color instance
+     *
+     * @var int
+     */
+    public $r;
+
+    /**
+     * RGB Green value of current color instance
+     *
+     * @var int
+     */
+    public $g;
+
+    /**
+     * RGB Blue value of current color instance
+     *
+     * @var int
+     */
+    public $b;
+
+    /**
+     * RGB Alpha value of current color instance
+     *
+     * @var float
+     */
+    public $a;
+
+    /**
+     * Initiates color object from integer
+     *
+     * @param  int $value
+     * @return \Intervention\Image\AbstractColor
+     */
+    public function initFromInteger($value)
+    {
+        $this->a = ($value >> 24) & 0xFF;
+        $this->r = ($value >> 16) & 0xFF;
+        $this->g = ($value >> 8) & 0xFF;
+        $this->b = $value & 0xFF;
+    }
+
+    /**
+     * Initiates color object from given array
+     *
+     * @param  array $value
+     * @return \Intervention\Image\AbstractColor
+     */
+    public function initFromArray($array)
+    {
+        $array = array_values($array);
+
+        if (count($array) == 4) {
+
+            // color array with alpha value
+            list($r, $g, $b, $a) = $array;
+            $this->a = $this->alpha2gd($a);
+
+        } elseif (count($array) == 3) {
+
+            // color array without alpha value
+            list($r, $g, $b) = $array;
+            $this->a = 0;
+
+        }
+
+        $this->r = $r;
+        $this->g = $g;
+        $this->b = $b;
+    }
+
+    /**
+     * Initiates color object from given string
+     *
+     * @param  string $value
+     * @return \Intervention\Image\AbstractColor
+     */
+    public function initFromString($value)
+    {
+        if ($color = $this->rgbaFromString($value)) {
+            $this->r = $color[0];
+            $this->g = $color[1];
+            $this->b = $color[2];
+            $this->a = $this->alpha2gd($color[3]);
+        }
+    }
+
+    /**
+     * Initiates color object from given R, G and B values
+     *
+     * @param  int $r
+     * @param  int $g
+     * @param  int $b
+     * @return \Intervention\Image\AbstractColor
+     */
+    public function initFromRgb($r, $g, $b)
+    {
+        $this->r = intval($r);
+        $this->g = intval($g);
+        $this->b = intval($b);
+        $this->a = 0;
+    }
+
+    /**
+     * Initiates color object from given R, G, B and A values
+     *
+     * @param  int     $r
+     * @param  int     $g
+     * @param  int     $b
+     * @param  float   $a
+     * @return \Intervention\Image\AbstractColor
+     */
+    public function initFromRgba($r, $g, $b, $a = 1)
+    {
+        $this->r = intval($r);
+        $this->g = intval($g);
+        $this->b = intval($b);
+        $this->a = $this->alpha2gd($a);
+    }
+
+    /**
+     * Initiates color object from given ImagickPixel object
+     *
+     * @param  ImagickPixel $value
+     * @return \Intervention\Image\AbstractColor
+     */
+    public function initFromObject($value)
+    {
+        throw new NotSupportedException(
+            "GD colors cannot init from ImagickPixel objects."
+        );
+    }
+
+    /**
+     * Calculates integer value of current color instance
+     *
+     * @return int
+     */
+    public function getInt()
+    {
+        return ($this->a << 24) + ($this->r << 16) + ($this->g << 8) + $this->b;
+    }
+
+    /**
+     * Calculates hexadecimal value of current color instance
+     *
+     * @param  string $prefix
+     * @return string
+     */
+    public function getHex($prefix = '')
+    {
+        return sprintf('%s%02x%02x%02x', $prefix, $this->r, $this->g, $this->b);
+    }
+
+    /**
+     * Calculates RGB(A) in array format of current color instance
+     *
+     * @return array
+     */
+    public function getArray()
+    {
+        return [$this->r, $this->g, $this->b, round(1 - $this->a / 127, 2)];
+    }
+
+    /**
+     * Calculates RGBA in string format of current color instance
+     *
+     * @return string
+     */
+    public function getRgba()
+    {
+        return sprintf('rgba(%d, %d, %d, %.2F)', $this->r, $this->g, $this->b, round(1 - $this->a / 127, 2));
+    }
+
+    /**
+     * Determines if current color is different from given color
+     *
+     * @param  AbstractColor $color
+     * @param  int       $tolerance
+     * @return boolean
+     */
+    public function differs(AbstractColor $color, $tolerance = 0)
+    {
+        $color_tolerance = round($tolerance * 2.55);
+        $alpha_tolerance = round($tolerance * 1.27);
+
+        $delta = [
+            'r' => abs($color->r - $this->r),
+            'g' => abs($color->g - $this->g),
+            'b' => abs($color->b - $this->b),
+            'a' => abs($color->a - $this->a)
+        ];
+
+        return (
+            $delta['r'] > $color_tolerance or
+            $delta['g'] > $color_tolerance or
+            $delta['b'] > $color_tolerance or
+            $delta['a'] > $alpha_tolerance
+        );
+    }
+
+    /**
+     * Convert rgba alpha (0-1) value to gd value (0-127)
+     *
+     * @param  float $input
+     * @return int
+     */
+    private function alpha2gd($input)
+    {
+        $oldMin = 0;
+        $oldMax = 1;
+
+        $newMin = 127;
+        $newMax = 0;
+
+        return ceil(((($input- $oldMin) * ($newMax - $newMin)) / ($oldMax - $oldMin)) + $newMin);
+    }
+}

+ 25 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Commands/BackupCommand.php

@@ -0,0 +1,25 @@
+<?php
+
+namespace Intervention\Image\Gd\Commands;
+
+use Intervention\Image\Commands\AbstractCommand;
+
+class BackupCommand extends AbstractCommand
+{
+    /**
+     * Saves a backups of current state of image core
+     *
+     * @param  \Intervention\Image\Image $image
+     * @return boolean
+     */
+    public function execute($image)
+    {
+        $backupName = $this->argument(0)->value();
+
+        // clone current image resource
+        $clone = clone $image;
+        $image->setBackup($clone->getCore(), $backupName);
+
+        return true;
+    }
+}

+ 25 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Commands/BlurCommand.php

@@ -0,0 +1,25 @@
+<?php
+
+namespace Intervention\Image\Gd\Commands;
+
+use Intervention\Image\Commands\AbstractCommand;
+
+class BlurCommand extends AbstractCommand
+{
+    /**
+     * Applies blur effect on image
+     *
+     * @param  \Intervention\Image\Image $image
+     * @return boolean
+     */
+    public function execute($image)
+    {
+        $amount = $this->argument(0)->between(0, 100)->value(1);
+
+        for ($i=0; $i < intval($amount); $i++) {
+            imagefilter($image->getCore(), IMG_FILTER_GAUSSIAN_BLUR);
+        }
+
+        return true;
+    }
+}

+ 21 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Commands/BrightnessCommand.php

@@ -0,0 +1,21 @@
+<?php
+
+namespace Intervention\Image\Gd\Commands;
+
+use Intervention\Image\Commands\AbstractCommand;
+
+class BrightnessCommand extends AbstractCommand
+{
+    /**
+     * Changes image brightness
+     *
+     * @param  \Intervention\Image\Image $image
+     * @return boolean
+     */
+    public function execute($image)
+    {
+        $level = $this->argument(0)->between(-100, 100)->required()->value();
+
+        return imagefilter($image->getCore(), IMG_FILTER_BRIGHTNESS, ($level * 2.55));
+    }
+}

+ 29 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Commands/ColorizeCommand.php

@@ -0,0 +1,29 @@
+<?php
+
+namespace Intervention\Image\Gd\Commands;
+
+use Intervention\Image\Commands\AbstractCommand;
+
+class ColorizeCommand extends AbstractCommand
+{
+    /**
+     * Changes balance of different RGB color channels
+     *
+     * @param  \Intervention\Image\Image $image
+     * @return boolean
+     */
+    public function execute($image)
+    {
+        $red = $this->argument(0)->between(-100, 100)->required()->value();
+        $green = $this->argument(1)->between(-100, 100)->required()->value();
+        $blue = $this->argument(2)->between(-100, 100)->required()->value();
+
+        // normalize colorize levels
+        $red = round($red * 2.55);
+        $green = round($green * 2.55);
+        $blue = round($blue * 2.55);
+
+        // apply filter
+        return imagefilter($image->getCore(), IMG_FILTER_COLORIZE, $red, $green, $blue);
+    }
+}

+ 21 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Commands/ContrastCommand.php

@@ -0,0 +1,21 @@
+<?php
+
+namespace Intervention\Image\Gd\Commands;
+
+use Intervention\Image\Commands\AbstractCommand;
+
+class ContrastCommand extends AbstractCommand
+{
+    /**
+     * Changes contrast of image
+     *
+     * @param  \Intervention\Image\Image $image
+     * @return boolean
+     */
+    public function execute($image)
+    {
+        $level = $this->argument(0)->between(-100, 100)->required()->value();
+
+        return imagefilter($image->getCore(), IMG_FILTER_CONTRAST, ($level * -1));
+    }
+}

+ 40 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Commands/CropCommand.php

@@ -0,0 +1,40 @@
+<?php
+
+namespace Intervention\Image\Gd\Commands;
+
+use Intervention\Image\Point;
+use Intervention\Image\Size;
+
+class CropCommand extends ResizeCommand
+{
+    /**
+     * Crop an image instance
+     *
+     * @param  \Intervention\Image\Image $image
+     * @return boolean
+     */
+    public function execute($image)
+    {
+        $width = $this->argument(0)->type('digit')->required()->value();
+        $height = $this->argument(1)->type('digit')->required()->value();
+        $x = $this->argument(2)->type('digit')->value();
+        $y = $this->argument(3)->type('digit')->value();
+
+        if (is_null($width) || is_null($height)) {
+            throw new \Intervention\Image\Exception\InvalidArgumentException(
+                "Width and height of cutout needs to be defined."
+            );
+        }
+
+        $cropped = new Size($width, $height);
+        $position = new Point($x, $y);
+
+        // align boxes
+        if (is_null($x) && is_null($y)) {
+            $position = $image->getSize()->align('center')->relativePosition($cropped->align('center'));
+        }
+
+        // crop image core
+        return $this->modify($image, 0, 0, $position->x, $position->y, $cropped->width, $cropped->height, $cropped->width, $cropped->height);
+    }
+}

+ 27 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Commands/DestroyCommand.php

@@ -0,0 +1,27 @@
+<?php
+
+namespace Intervention\Image\Gd\Commands;
+
+use Intervention\Image\Commands\AbstractCommand;
+
+class DestroyCommand extends AbstractCommand
+{
+    /**
+     * Destroys current image core and frees up memory
+     *
+     * @param  \Intervention\Image\Image $image
+     * @return boolean
+     */
+    public function execute($image)
+    {
+        // destroy image core
+        imagedestroy($image->getCore());
+
+        // destroy backups
+        foreach ($image->getBackups() as $backup) {
+            imagedestroy($backup);
+        }
+
+        return true;
+    }
+}

+ 69 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Commands/FillCommand.php

@@ -0,0 +1,69 @@
+<?php
+
+namespace Intervention\Image\Gd\Commands;
+
+use Intervention\Image\Commands\AbstractCommand;
+use Intervention\Image\Gd\Color;
+use Intervention\Image\Gd\Decoder;
+
+class FillCommand extends AbstractCommand
+{
+    /**
+     * Fills image with color or pattern
+     *
+     * @param  \Intervention\Image\Image $image
+     * @return boolean
+     */
+    public function execute($image)
+    {
+        $filling = $this->argument(0)->value();
+        $x = $this->argument(1)->type('digit')->value();
+        $y = $this->argument(2)->type('digit')->value();
+
+        $width = $image->getWidth();
+        $height = $image->getHeight();
+        $resource = $image->getCore();
+
+        try {
+
+            // set image tile filling
+            $source = new Decoder;
+            $tile = $source->init($filling);
+            imagesettile($image->getCore(), $tile->getCore());
+            $filling = IMG_COLOR_TILED;
+
+        } catch (\Intervention\Image\Exception\NotReadableException $e) {
+
+            // set solid color filling
+            $color = new Color($filling);
+            $filling = $color->getInt();
+        }
+
+        imagealphablending($resource, true);
+
+        if (is_int($x) && is_int($y)) {
+
+            // resource should be visible through transparency
+            $base = $image->getDriver()->newImage($width, $height)->getCore();
+            imagecopy($base, $resource, 0, 0, 0, 0, $width, $height);
+
+            // floodfill if exact position is defined
+            imagefill($resource, $x, $y, $filling);
+
+            // copy filled original over base
+            imagecopy($base, $resource, 0, 0, 0, 0, $width, $height);
+
+            // set base as new resource-core
+            $image->setCore($base);
+            imagedestroy($resource);
+
+        } else {
+            // fill whole image otherwise
+            imagefilledrectangle($resource, 0, 0, $width - 1, $height - 1, $filling);
+        }
+
+        isset($tile) ? imagedestroy($tile->getCore()) : null;
+
+        return true;
+    }
+}

+ 32 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Commands/FitCommand.php

@@ -0,0 +1,32 @@
+<?php
+
+namespace Intervention\Image\Gd\Commands;
+
+use Intervention\Image\Size;
+
+class FitCommand extends ResizeCommand
+{
+    /**
+     * Crops and resized an image at the same time
+     *
+     * @param  \Intervention\Image\Image $image
+     * @return boolean
+     */
+    public function execute($image)
+    {
+        $width = $this->argument(0)->type('digit')->required()->value();
+        $height = $this->argument(1)->type('digit')->value($width);
+        $constraints = $this->argument(2)->type('closure')->value();
+        $position = $this->argument(3)->type('string')->value('center');
+
+        // calculate size
+        $cropped = $image->getSize()->fit(new Size($width, $height), $position);
+        $resized = clone $cropped;
+        $resized = $resized->resize($width, $height, $constraints);
+
+        // modify image
+        $this->modify($image, 0, 0, $cropped->pivot->x, $cropped->pivot->y, $resized->getWidth(), $resized->getHeight(), $cropped->getWidth(), $cropped->getHeight());
+
+        return true;
+    }
+}

+ 37 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Commands/FlipCommand.php

@@ -0,0 +1,37 @@
+<?php
+
+namespace Intervention\Image\Gd\Commands;
+
+class FlipCommand extends ResizeCommand
+{
+    /**
+     * Mirrors an image
+     *
+     * @param  \Intervention\Image\Image $image
+     * @return boolean
+     */
+    public function execute($image)
+    {
+        $mode = $this->argument(0)->value('h');
+
+        $size = $image->getSize();
+        $dst = clone $size;
+
+        switch (strtolower($mode)) {
+            case 2:
+            case 'v':
+            case 'vert':
+            case 'vertical':
+                $size->pivot->y = $size->height - 1;
+                $size->height = $size->height * (-1);
+                break;
+
+            default:
+                $size->pivot->x = $size->width - 1;
+                $size->width = $size->width * (-1);
+                break;
+        }
+
+        return $this->modify($image, 0, 0, $size->pivot->x, $size->pivot->y, $dst->width, $dst->height, $size->width, $size->height);
+    }
+}

+ 21 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Commands/GammaCommand.php

@@ -0,0 +1,21 @@
+<?php
+
+namespace Intervention\Image\Gd\Commands;
+
+use Intervention\Image\Commands\AbstractCommand;
+
+class GammaCommand extends AbstractCommand
+{
+    /**
+     * Applies gamma correction to a given image
+     *
+     * @param  \Intervention\Image\Image $image
+     * @return boolean
+     */
+    public function execute($image)
+    {
+        $gamma = $this->argument(0)->type('numeric')->required()->value();
+
+        return imagegammacorrect($image->getCore(), 1, $gamma);
+    }
+}

+ 25 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Commands/GetSizeCommand.php

@@ -0,0 +1,25 @@
+<?php
+
+namespace Intervention\Image\Gd\Commands;
+
+use Intervention\Image\Commands\AbstractCommand;
+use Intervention\Image\Size;
+
+class GetSizeCommand extends AbstractCommand
+{
+    /**
+     * Reads size of given image instance in pixels
+     *
+     * @param  \Intervention\Image\Image $image
+     * @return boolean
+     */
+    public function execute($image)
+    {
+        $this->setOutput(new Size(
+            imagesx($image->getCore()),
+            imagesy($image->getCore())
+        ));
+
+        return true;
+    }
+}

+ 19 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Commands/GreyscaleCommand.php

@@ -0,0 +1,19 @@
+<?php
+
+namespace Intervention\Image\Gd\Commands;
+
+use Intervention\Image\Commands\AbstractCommand;
+
+class GreyscaleCommand extends AbstractCommand
+{
+    /**
+     * Turns an image into a greyscale version
+     *
+     * @param  \Intervention\Image\Image $image
+     * @return boolean
+     */
+    public function execute($image)
+    {
+        return imagefilter($image->getCore(), IMG_FILTER_GRAYSCALE);
+    }
+}

+ 28 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Commands/HeightenCommand.php

@@ -0,0 +1,28 @@
+<?php
+
+namespace Intervention\Image\Gd\Commands;
+
+class HeightenCommand extends ResizeCommand
+{
+    /**
+     * Resize image proportionally to given height
+     *
+     * @param  \Intervention\Image\Image $image
+     * @return boolean
+     */
+    public function execute($image)
+    {
+        $height = $this->argument(0)->type('digit')->required()->value();
+        $additionalConstraints = $this->argument(1)->type('closure')->value();
+
+        $this->arguments[0] = null;
+        $this->arguments[1] = $height;
+        $this->arguments[2] = function ($constraint) use ($additionalConstraints) {
+            $constraint->aspectRatio();
+            if(is_callable($additionalConstraints))
+                $additionalConstraints($constraint);
+        };
+
+        return parent::execute($image);
+    }
+}

+ 34 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Commands/InsertCommand.php

@@ -0,0 +1,34 @@
+<?php
+
+namespace Intervention\Image\Gd\Commands;
+
+use Intervention\Image\Commands\AbstractCommand;
+
+class InsertCommand extends AbstractCommand
+{
+    /**
+     * Insert another image into given image
+     *
+     * @param  \Intervention\Image\Image $image
+     * @return boolean
+     */
+    public function execute($image)
+    {
+        $source = $this->argument(0)->required()->value();
+        $position = $this->argument(1)->type('string')->value();
+        $x = $this->argument(2)->type('digit')->value(0);
+        $y = $this->argument(3)->type('digit')->value(0);
+
+        // build watermark
+        $watermark = $image->getDriver()->init($source);
+
+        // define insertion point
+        $image_size = $image->getSize()->align($position, $x, $y);
+        $watermark_size = $watermark->getSize()->align($position);
+        $target = $image_size->relativePosition($watermark_size);
+
+        // insert image at position
+        imagealphablending($image->getCore(), true);
+        return imagecopy($image->getCore(), $watermark->getCore(), $target->x, $target->y, 0, 0, $watermark_size->width, $watermark_size->height);
+    }
+}

+ 23 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Commands/InterlaceCommand.php

@@ -0,0 +1,23 @@
+<?php
+
+namespace Intervention\Image\Gd\Commands;
+
+use Intervention\Image\Commands\AbstractCommand;
+
+class InterlaceCommand extends AbstractCommand
+{
+    /**
+     * Toggles interlaced encoding mode
+     *
+     * @param  \Intervention\Image\Image $image
+     * @return boolean
+     */
+    public function execute($image)
+    {
+        $mode = $this->argument(0)->type('bool')->value(true);
+
+        imageinterlace($image->getCore(), $mode);
+
+        return true;
+    }
+}

+ 19 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Commands/InvertCommand.php

@@ -0,0 +1,19 @@
+<?php
+
+namespace Intervention\Image\Gd\Commands;
+
+use Intervention\Image\Commands\AbstractCommand;
+
+class InvertCommand extends AbstractCommand
+{
+    /**
+     * Inverts colors of an image
+     *
+     * @param  \Intervention\Image\Image $image
+     * @return boolean
+     */
+    public function execute($image)
+    {
+        return imagefilter($image->getCore(), IMG_FILTER_NEGATE);
+    }
+}

+ 53 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Commands/LimitColorsCommand.php

@@ -0,0 +1,53 @@
+<?php
+
+namespace Intervention\Image\Gd\Commands;
+
+use Intervention\Image\Commands\AbstractCommand;
+
+
+class LimitColorsCommand extends AbstractCommand
+{
+    /**
+     * Reduces colors of a given image
+     *
+     * @param  \Intervention\Image\Image $image
+     * @return boolean
+     */
+    public function execute($image)
+    {
+        $count = $this->argument(0)->value();
+        $matte = $this->argument(1)->value();
+
+        // get current image size
+        $size = $image->getSize();
+
+        // create empty canvas
+        $resource = imagecreatetruecolor($size->width, $size->height);
+
+        // define matte
+        if (is_null($matte)) {
+            $matte = imagecolorallocatealpha($resource, 255, 255, 255, 127);
+        } else {
+            $matte = $image->getDriver()->parseColor($matte)->getInt();
+        }
+
+        // fill with matte and copy original image
+        imagefill($resource, 0, 0, $matte);
+
+        // set transparency
+        imagecolortransparent($resource, $matte);
+
+        // copy original image
+        imagecopy($resource, $image->getCore(), 0, 0, 0, 0, $size->width, $size->height);
+
+        if (is_numeric($count) && $count <= 256) {
+            // decrease colors
+            imagetruecolortopalette($resource, true, $count);
+        }
+
+        // set new resource
+        $image->setCore($resource);
+
+        return true;
+    }
+}

+ 83 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Commands/MaskCommand.php

@@ -0,0 +1,83 @@
+<?php
+
+namespace Intervention\Image\Gd\Commands;
+
+use Intervention\Image\Commands\AbstractCommand;
+
+class MaskCommand extends AbstractCommand
+{
+    /**
+     * Applies an alpha mask to an image
+     *
+     * @param  \Intervention\Image\Image $image
+     * @return boolean
+     */
+    public function execute($image)
+    {
+        $mask_source = $this->argument(0)->value();
+        $mask_w_alpha = $this->argument(1)->type('bool')->value(false);
+
+        $image_size = $image->getSize();
+
+        // create empty canvas
+        $canvas = $image->getDriver()->newImage($image_size->width, $image_size->height, [0,0,0,0]);
+
+        // build mask image from source
+        $mask = $image->getDriver()->init($mask_source);
+        $mask_size = $mask->getSize();
+
+        // resize mask to size of current image (if necessary)
+        if ($mask_size != $image_size) {
+            $mask->resize($image_size->width, $image_size->height);
+        }
+
+        imagealphablending($canvas->getCore(), false);
+
+        if ( ! $mask_w_alpha) {
+            // mask from greyscale image
+            imagefilter($mask->getCore(), IMG_FILTER_GRAYSCALE);
+        }
+
+        // redraw old image pixel by pixel considering alpha map
+        for ($x=0; $x < $image_size->width; $x++) {
+            for ($y=0; $y < $image_size->height; $y++) {
+
+                $color = $image->pickColor($x, $y, 'array');
+                $alpha = $mask->pickColor($x, $y, 'array');
+
+                if ($mask_w_alpha) {
+                    $alpha = $alpha[3]; // use alpha channel as mask
+                } else {
+
+                    if ($alpha[3] == 0) { // transparent as black
+                        $alpha = 0;
+                    } else {
+
+                        // $alpha = floatval(round((($alpha[0] + $alpha[1] + $alpha[3]) / 3) / 255, 2));
+
+                        // image is greyscale, so channel doesn't matter (use red channel)
+                        $alpha = floatval(round($alpha[0] / 255, 2));
+                    }
+
+                }
+
+                // preserve alpha of original image...
+                if ($color[3] < $alpha) {
+                    $alpha = $color[3];
+                }
+
+                // replace alpha value
+                $color[3] = $alpha;
+
+                // redraw pixel
+                $canvas->pixel($color, $x, $y);
+            }
+        }
+
+
+        // replace current image with masked instance
+        $image->setCore($canvas->getCore());
+
+        return true;
+    }
+}

+ 31 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Commands/OpacityCommand.php

@@ -0,0 +1,31 @@
+<?php
+
+namespace Intervention\Image\Gd\Commands;
+
+use Intervention\Image\Commands\AbstractCommand;
+
+class OpacityCommand extends AbstractCommand
+{
+    /**
+     * Defines opacity of an image
+     *
+     * @param  \Intervention\Image\Image $image
+     * @return boolean
+     */
+    public function execute($image)
+    {
+        $transparency = $this->argument(0)->between(0, 100)->required()->value();
+
+        // get size of image
+        $size = $image->getSize();
+
+        // build temp alpha mask
+        $mask_color = sprintf('rgba(0, 0, 0, %.1F)', $transparency / 100);
+        $mask = $image->getDriver()->newImage($size->width, $size->height, $mask_color);
+
+        // mask image
+        $image->mask($mask->getCore(), true);
+
+        return true;
+    }
+}

+ 37 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Commands/PickColorCommand.php

@@ -0,0 +1,37 @@
+<?php
+
+namespace Intervention\Image\Gd\Commands;
+
+use Intervention\Image\Commands\AbstractCommand;
+use Intervention\Image\Gd\Color;
+
+class PickColorCommand extends AbstractCommand
+{
+    /**
+     * Read color information from a certain position
+     *
+     * @param  \Intervention\Image\Image $image
+     * @return boolean
+     */
+    public function execute($image)
+    {
+        $x = $this->argument(0)->type('digit')->required()->value();
+        $y = $this->argument(1)->type('digit')->required()->value();
+        $format = $this->argument(2)->type('string')->value('array');
+
+        // pick color
+        $color = imagecolorat($image->getCore(), $x, $y);
+
+        if ( ! imageistruecolor($image->getCore())) {
+            $color = imagecolorsforindex($image->getCore(), $color);
+            $color['alpha'] = round(1 - $color['alpha'] / 127, 2);
+        }
+
+        $color = new Color($color);
+
+        // format to output
+        $this->setOutput($color->format($format));
+
+        return true;
+    }
+}

+ 25 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Commands/PixelCommand.php

@@ -0,0 +1,25 @@
+<?php
+
+namespace Intervention\Image\Gd\Commands;
+
+use Intervention\Image\Commands\AbstractCommand;
+use Intervention\Image\Gd\Color;
+
+class PixelCommand extends AbstractCommand
+{
+    /**
+     * Draws one pixel to a given image
+     *
+     * @param  \Intervention\Image\Image $image
+     * @return boolean
+     */
+    public function execute($image)
+    {
+        $color = $this->argument(0)->required()->value();
+        $color = new Color($color);
+        $x = $this->argument(1)->type('digit')->required()->value();
+        $y = $this->argument(2)->type('digit')->required()->value();
+
+        return imagesetpixel($image->getCore(), $x, $y, $color->getInt());
+    }
+}

+ 21 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Commands/PixelateCommand.php

@@ -0,0 +1,21 @@
+<?php
+
+namespace Intervention\Image\Gd\Commands;
+
+use Intervention\Image\Commands\AbstractCommand;
+
+class PixelateCommand extends AbstractCommand
+{
+    /**
+     * Applies a pixelation effect to a given image
+     *
+     * @param  \Intervention\Image\Image $image
+     * @return boolean
+     */
+    public function execute($image)
+    {
+        $size = $this->argument(0)->type('digit')->value(10);
+
+        return imagefilter($image->getCore(), IMG_FILTER_PIXELATE, $size, true);
+    }
+}

+ 39 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Commands/ResetCommand.php

@@ -0,0 +1,39 @@
+<?php
+
+namespace Intervention\Image\Gd\Commands;
+
+use Intervention\Image\Commands\AbstractCommand;
+use Intervention\Image\Exception\RuntimeException;
+
+class ResetCommand extends AbstractCommand
+{
+    /**
+     * Resets given image to its backup state
+     *
+     * @param  \Intervention\Image\Image $image
+     * @return boolean
+     */
+    public function execute($image)
+    {
+        $backupName = $this->argument(0)->value();
+        $backup = $image->getBackup($backupName);
+        
+        if (is_resource($backup) || $backup instanceof \GdImage) {
+
+            // destroy current resource
+            imagedestroy($image->getCore());
+
+            // clone backup
+            $backup = $image->getDriver()->cloneCore($backup);
+
+            // reset to new resource
+            $image->setCore($backup);
+
+            return true;
+        }
+
+        throw new RuntimeException(
+            "Backup not available. Call backup() before reset()."
+        );
+    }
+}

+ 83 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Commands/ResizeCanvasCommand.php

@@ -0,0 +1,83 @@
+<?php
+
+namespace Intervention\Image\Gd\Commands;
+
+use Intervention\Image\Commands\AbstractCommand;
+
+class ResizeCanvasCommand extends AbstractCommand
+{
+    /**
+     * Resizes image boundaries
+     *
+     * @param  \Intervention\Image\Image $image
+     * @return boolean
+     */
+    public function execute($image)
+    {
+        $width = $this->argument(0)->type('digit')->required()->value();
+        $height = $this->argument(1)->type('digit')->required()->value();
+        $anchor = $this->argument(2)->value('center');
+        $relative = $this->argument(3)->type('boolean')->value(false);
+        $bgcolor = $this->argument(4)->value();
+
+        $original_width = $image->getWidth();
+        $original_height = $image->getHeight();
+
+        // check of only width or height is set
+        $width = is_null($width) ? $original_width : intval($width);
+        $height = is_null($height) ? $original_height : intval($height);
+
+        // check on relative width/height
+        if ($relative) {
+            $width = $original_width + $width;
+            $height = $original_height + $height;
+        }
+
+        // check for negative width/height
+        $width = ($width <= 0) ? $width + $original_width : $width;
+        $height = ($height <= 0) ? $height + $original_height : $height;
+
+        // create new canvas
+        $canvas = $image->getDriver()->newImage($width, $height, $bgcolor);
+
+        // set copy position
+        $canvas_size = $canvas->getSize()->align($anchor);
+        $image_size = $image->getSize()->align($anchor);
+        $canvas_pos = $image_size->relativePosition($canvas_size);
+        $image_pos = $canvas_size->relativePosition($image_size);
+
+        if ($width <= $original_width) {
+            $dst_x = 0;
+            $src_x = $canvas_pos->x;
+            $src_w = $canvas_size->width;
+        } else {
+            $dst_x = $image_pos->x;
+            $src_x = 0;
+            $src_w = $original_width;
+        }
+
+        if ($height <= $original_height) {
+            $dst_y = 0;
+            $src_y = $canvas_pos->y;
+            $src_h = $canvas_size->height;
+        } else {
+            $dst_y = $image_pos->y;
+            $src_y = 0;
+            $src_h = $original_height;
+        }
+
+        // make image area transparent to keep transparency
+        // even if background-color is set
+        $transparent = imagecolorallocatealpha($canvas->getCore(), 255, 255, 255, 127);
+        imagealphablending($canvas->getCore(), false); // do not blend / just overwrite
+        imagefilledrectangle($canvas->getCore(), $dst_x, $dst_y, $dst_x + $src_w - 1, $dst_y + $src_h - 1, $transparent);
+
+        // copy image into new canvas
+        imagecopy($canvas->getCore(), $image->getCore(), $dst_x, $dst_y, $src_x, $src_y, $src_w, $src_h);
+
+        // set new core to canvas
+        $image->setCore($canvas->getCore());
+
+        return true;
+    }
+}

+ 84 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Commands/ResizeCommand.php

@@ -0,0 +1,84 @@
+<?php
+
+namespace Intervention\Image\Gd\Commands;
+
+use Intervention\Image\Commands\AbstractCommand;
+
+class ResizeCommand extends AbstractCommand
+{
+    /**
+     * Resizes image dimensions
+     *
+     * @param  \Intervention\Image\Image $image
+     * @return boolean
+     */
+    public function execute($image)
+    {
+        $width = $this->argument(0)->value();
+        $height = $this->argument(1)->value();
+        $constraints = $this->argument(2)->type('closure')->value();
+
+        // resize box
+        $resized = $image->getSize()->resize($width, $height, $constraints);
+
+        // modify image
+        $this->modify($image, 0, 0, 0, 0, $resized->getWidth(), $resized->getHeight(), $image->getWidth(), $image->getHeight());
+
+        return true;
+    }
+
+    /**
+     * Wrapper function for 'imagecopyresampled'
+     *
+     * @param  Image   $image
+     * @param  int     $dst_x
+     * @param  int     $dst_y
+     * @param  int     $src_x
+     * @param  int     $src_y
+     * @param  int     $dst_w
+     * @param  int     $dst_h
+     * @param  int     $src_w
+     * @param  int     $src_h
+     * @return boolean
+     */
+    protected function modify($image, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h)
+    {
+        // create new image
+        $modified = imagecreatetruecolor(intval($dst_w), intval($dst_h));
+
+        // get current image
+        $resource = $image->getCore();
+
+        // preserve transparency
+        $transIndex = imagecolortransparent($resource);
+
+        if ($transIndex != -1) {
+            $rgba = imagecolorsforindex($modified, $transIndex);
+            $transColor = imagecolorallocatealpha($modified, $rgba['red'], $rgba['green'], $rgba['blue'], 127);
+            imagefill($modified, 0, 0, $transColor);
+            imagecolortransparent($modified, $transColor);
+        } else {
+            imagealphablending($modified, false);
+            imagesavealpha($modified, true);
+        }
+
+        // copy content from resource
+        $result = imagecopyresampled(
+            $modified,
+            $resource,
+            $dst_x,
+            $dst_y,
+            $src_x,
+            $src_y,
+            intval($dst_w),
+            intval($dst_h),
+            $src_w,
+            $src_h
+        );
+
+        // set new content as recource
+        $image->setCore($modified);
+
+        return $result;
+    }
+}

+ 30 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Commands/RotateCommand.php

@@ -0,0 +1,30 @@
+<?php
+
+namespace Intervention\Image\Gd\Commands;
+
+use Intervention\Image\Commands\AbstractCommand;
+use Intervention\Image\Gd\Color;
+
+class RotateCommand extends AbstractCommand
+{
+    /**
+     * Rotates image counter clockwise
+     *
+     * @param  \Intervention\Image\Image $image
+     * @return boolean
+     */
+    public function execute($image)
+    {
+        $angle = $this->argument(0)->type('numeric')->required()->value();
+        $color = $this->argument(1)->value();
+        $color = new Color($color);
+
+        // restrict rotations beyond 360 degrees, since the end result is the same
+        $angle = fmod($angle, 360);
+
+        // rotate image
+        $image->setCore(imagerotate($image->getCore(), $angle, $color->getInt()));
+
+        return true;
+    }
+}

+ 34 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Commands/SharpenCommand.php

@@ -0,0 +1,34 @@
+<?php
+
+namespace Intervention\Image\Gd\Commands;
+
+use Intervention\Image\Commands\AbstractCommand;
+
+class SharpenCommand extends AbstractCommand
+{
+    /**
+     * Sharpen image
+     *
+     * @param  \Intervention\Image\Image $image
+     * @return boolean
+     */
+    public function execute($image)
+    {
+        $amount = $this->argument(0)->between(0, 100)->value(10);
+
+        // build matrix
+        $min = $amount >= 10 ? $amount * -0.01 : 0;
+        $max = $amount * -0.025;
+        $abs = ((4 * $min + 4 * $max) * -1) + 1;
+        $div = 1;
+
+        $matrix = [
+            [$min, $max, $min],
+            [$max, $abs, $max],
+            [$min, $max, $min]
+        ];
+
+        // apply the matrix
+        return imageconvolution($image->getCore(), $matrix, $div, 0);
+    }
+}

+ 176 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Commands/TrimCommand.php

@@ -0,0 +1,176 @@
+<?php
+
+namespace Intervention\Image\Gd\Commands;
+
+use Intervention\Image\Gd\Color;
+
+class TrimCommand extends ResizeCommand
+{
+    /**
+     * Trims away parts of an image
+     *
+     * @param  \Intervention\Image\Image $image
+     * @return boolean
+     */
+    public function execute($image)
+    {
+        $base = $this->argument(0)->type('string')->value();
+        $away = $this->argument(1)->value();
+        $tolerance = $this->argument(2)->type('numeric')->value(0);
+        $feather = $this->argument(3)->type('numeric')->value(0);
+
+        $width = $image->getWidth();
+        $height = $image->getHeight();
+
+        // default values
+        $checkTransparency = false;
+
+        // define borders to trim away
+        if (is_null($away)) {
+            $away = ['top', 'right', 'bottom', 'left'];
+        } elseif (is_string($away)) {
+            $away = [$away];
+        }
+
+        // lower border names
+        foreach ($away as $key => $value) {
+            $away[$key] = strtolower($value);
+        }
+
+        // define base color position
+        switch (strtolower($base)) {
+            case 'transparent':
+            case 'trans':
+                $checkTransparency = true;
+                $base_x = 0;
+                $base_y = 0;
+                break;
+
+            case 'bottom-right':
+            case 'right-bottom':
+                $base_x = $width - 1;
+                $base_y = $height - 1;
+                break;
+
+            default:
+            case 'top-left':
+            case 'left-top':
+                $base_x = 0;
+                $base_y = 0;
+                break;
+        }
+
+        // pick base color
+        if ($checkTransparency) {
+            $color = new Color; // color will only be used to compare alpha channel
+        } else {
+            $color = $image->pickColor($base_x, $base_y, 'object');
+        }
+
+        $top_x = 0;
+        $top_y = 0;
+        $bottom_x = $width;
+        $bottom_y = $height;
+
+        // search upper part of image for colors to trim away
+        if (in_array('top', $away)) {
+
+            for ($y=0; $y < ceil($height/2); $y++) {
+                for ($x=0; $x < $width; $x++) {
+
+                    $checkColor = $image->pickColor($x, $y, 'object');
+
+                    if ($checkTransparency) {
+                        $checkColor->r = $color->r;
+                        $checkColor->g = $color->g;
+                        $checkColor->b = $color->b;
+                    }
+
+                    if ($color->differs($checkColor, $tolerance)) {
+                        $top_y = max(0, $y - $feather);
+                        break 2;
+                    }
+
+                }
+            }
+
+        }
+
+        // search left part of image for colors to trim away
+        if (in_array('left', $away)) {
+
+            for ($x=0; $x < ceil($width/2); $x++) {
+                for ($y=$top_y; $y < $height; $y++) {
+
+                    $checkColor = $image->pickColor($x, $y, 'object');
+
+                    if ($checkTransparency) {
+                        $checkColor->r = $color->r;
+                        $checkColor->g = $color->g;
+                        $checkColor->b = $color->b;
+                    }
+
+                    if ($color->differs($checkColor, $tolerance)) {
+                        $top_x = max(0, $x - $feather);
+                        break 2;
+                    }
+
+                }
+            }
+
+        }
+
+        // search lower part of image for colors to trim away
+        if (in_array('bottom', $away)) {
+
+            for ($y=($height-1); $y >= floor($height/2)-1; $y--) {
+                for ($x=$top_x; $x < $width; $x++) {
+
+                    $checkColor = $image->pickColor($x, $y, 'object');
+
+                    if ($checkTransparency) {
+                        $checkColor->r = $color->r;
+                        $checkColor->g = $color->g;
+                        $checkColor->b = $color->b;
+                    }
+
+                    if ($color->differs($checkColor, $tolerance)) {
+                        $bottom_y = min($height, $y+1 + $feather);
+                        break 2;
+                    }
+
+                }
+            }
+
+        }
+
+        // search right part of image for colors to trim away
+        if (in_array('right', $away)) {
+
+            for ($x=($width-1); $x >= floor($width/2)-1; $x--) {
+                for ($y=$top_y; $y < $bottom_y; $y++) {
+
+                    $checkColor = $image->pickColor($x, $y, 'object');
+
+                    if ($checkTransparency) {
+                        $checkColor->r = $color->r;
+                        $checkColor->g = $color->g;
+                        $checkColor->b = $color->b;
+                    }
+
+                    if ($color->differs($checkColor, $tolerance)) {
+                        $bottom_x = min($width, $x+1 + $feather);
+                        break 2;
+                    }
+
+                }
+            }
+
+        }
+
+
+        // trim parts of image
+        return $this->modify($image, 0, 0, $top_x, $top_y, ($bottom_x-$top_x), ($bottom_y-$top_y), ($bottom_x-$top_x), ($bottom_y-$top_y));
+
+    }
+}

+ 28 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Commands/WidenCommand.php

@@ -0,0 +1,28 @@
+<?php
+
+namespace Intervention\Image\Gd\Commands;
+
+class WidenCommand extends ResizeCommand
+{
+    /**
+     * Resize image proportionally to given width
+     *
+     * @param  \Intervention\Image\Image $image
+     * @return boolean
+     */
+    public function execute($image)
+    {
+        $width = $this->argument(0)->type('digit')->required()->value();
+        $additionalConstraints = $this->argument(1)->type('closure')->value();
+
+        $this->arguments[0] = $width;
+        $this->arguments[1] = null;
+        $this->arguments[2] = function ($constraint) use ($additionalConstraints) {
+            $constraint->aspectRatio();
+            if(is_callable($additionalConstraints))
+                $additionalConstraints($constraint);
+        };
+
+        return parent::execute($image);
+    }
+}

+ 171 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Decoder.php

@@ -0,0 +1,171 @@
+<?php
+
+namespace Intervention\Image\Gd;
+
+use Intervention\Image\Exception\NotReadableException;
+use Intervention\Image\Exception\NotSupportedException;
+use Intervention\Image\Image;
+
+class Decoder extends \Intervention\Image\AbstractDecoder
+{
+    /**
+     * Initiates new image from path in filesystem
+     *
+     * @param  string $path
+     * @return \Intervention\Image\Image
+     */
+    public function initFromPath($path)
+    {
+        if ( ! file_exists($path)) {
+            throw new NotReadableException(
+                "Unable to find file ({$path})."
+            );
+        }
+
+        // get mime type of file
+        $mime = finfo_file(finfo_open(FILEINFO_MIME_TYPE), $path);
+
+        // define core
+        switch (strtolower($mime)) {
+            case 'image/png':
+            case 'image/x-png':
+                $core = @imagecreatefrompng($path);
+                break;
+
+            case 'image/jpg':
+            case 'image/jpeg':
+            case 'image/pjpeg':
+                $core = @imagecreatefromjpeg($path);
+                if (!$core) {
+                    $core= @imagecreatefromstring(file_get_contents($path));
+                }
+                break;
+
+            case 'image/gif':
+                $core = @imagecreatefromgif($path);
+                break;
+
+            case 'image/webp':
+            case 'image/x-webp':
+                if ( ! function_exists('imagecreatefromwebp')) {
+                    throw new NotReadableException(
+                        "Unsupported image type. GD/PHP installation does not support WebP format."
+                    );
+                }
+                $core = @imagecreatefromwebp($path);
+                break;
+
+            case 'image/bmp':
+            case 'image/ms-bmp':
+            case 'image/x-bitmap':
+            case 'image/x-bmp':
+            case 'image/x-ms-bmp':
+            case 'image/x-win-bitmap':
+            case 'image/x-windows-bmp':
+            case 'image/x-xbitmap':
+                if (! function_exists('imagecreatefrombmp')) {
+                    throw new NotReadableException(
+                        "Unsupported image type. GD/PHP installation does not support BMP format."
+                    );
+                }
+                $core = @imagecreatefrombmp($path);
+                break;
+
+            default:
+                throw new NotReadableException(
+                    sprintf("Unsupported image type %s. GD driver is only able to decode JPG, PNG, GIF, BMP or WebP files.", strtolower($mime))
+                );
+        }
+
+        if (empty($core)) {
+            throw new NotReadableException(
+                "Unable to decode image from file ({$path})."
+            );
+        }
+
+        $this->gdResourceToTruecolor($core);
+
+        // build image
+        $image = $this->initFromGdResource($core);
+        $image->mime = $mime;
+        $image->setFileInfoFromPath($path);
+
+        return $image;
+    }
+
+    /**
+     * Initiates new image from GD resource
+     *
+     * @param  Resource $resource
+     * @return \Intervention\Image\Image
+     */
+    public function initFromGdResource($resource)
+    {
+        return new Image(new Driver, $resource);
+    }
+
+    /**
+     * Initiates new image from Imagick object
+     *
+     * @param  Imagick $object
+     * @return \Intervention\Image\Image
+     */
+    public function initFromImagick(\Imagick $object)
+    {
+        throw new NotSupportedException(
+            "Gd driver is unable to init from Imagick object."
+        );
+    }
+
+    /**
+     * Initiates new image from binary data
+     *
+     * @param  string $data
+     * @return \Intervention\Image\Image
+     */
+    public function initFromBinary($binary)
+    {
+        $resource = @imagecreatefromstring($binary);
+
+        if ($resource === false) {
+             throw new NotReadableException(
+                "Unable to init from given binary data."
+            );
+        }
+
+        $image = $this->initFromGdResource($resource);
+        $image->mime = finfo_buffer(finfo_open(FILEINFO_MIME_TYPE), $binary);
+
+        return $image;
+    }
+
+    /**
+     * Transform GD resource into Truecolor version
+     *
+     * @param  resource $resource
+     * @return bool
+     */
+    public function gdResourceToTruecolor(&$resource)
+    {
+        $width = imagesx($resource);
+        $height = imagesy($resource);
+
+        // new canvas
+        $canvas = imagecreatetruecolor($width, $height);
+
+        // fill with transparent color
+        imagealphablending($canvas, false);
+        $transparent = imagecolorallocatealpha($canvas, 255, 255, 255, 127);
+        imagefilledrectangle($canvas, 0, 0, $width, $height, $transparent);
+        imagecolortransparent($canvas, $transparent);
+        imagealphablending($canvas, true);
+
+        // copy original
+        imagecopy($canvas, $resource, 0, 0, 0, 0, $width, $height);
+        imagedestroy($resource);
+
+        $resource = $canvas;
+
+        return true;
+    }
+}

+ 89 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Driver.php

@@ -0,0 +1,89 @@
+<?php
+
+namespace Intervention\Image\Gd;
+
+use Intervention\Image\Exception\NotSupportedException;
+use Intervention\Image\Image;
+
+class Driver extends \Intervention\Image\AbstractDriver
+{
+    /**
+     * Creates new instance of driver
+     *
+     * @param Decoder $decoder
+     * @param Encoder $encoder
+     */
+    public function __construct(Decoder $decoder = null, Encoder $encoder = null)
+    {
+        if ( ! $this->coreAvailable()) {
+            throw new NotSupportedException(
+                "GD Library extension not available with this PHP installation."
+            );
+        }
+
+        $this->decoder = $decoder ? $decoder : new Decoder;
+        $this->encoder = $encoder ? $encoder : new Encoder;
+    }
+
+    /**
+     * Creates new image instance
+     *
+     * @param  int     $width
+     * @param  int     $height
+     * @param  mixed   $background
+     * @return \Intervention\Image\Image
+     */
+    public function newImage($width, $height, $background = null)
+    {
+        // create empty resource
+        $core = imagecreatetruecolor($width, $height);
+        $image = new Image(new static, $core);
+
+        // set background color
+        $background = new Color($background);
+        imagefill($image->getCore(), 0, 0, $background->getInt());
+
+        return $image;
+    }
+
+    /**
+     * Reads given string into color object
+     *
+     * @param  string $value
+     * @return AbstractColor
+     */
+    public function parseColor($value)
+    {
+        return new Color($value);
+    }
+
+    /**
+     * Checks if core module installation is available
+     *
+     * @return boolean
+     */
+    protected function coreAvailable()
+    {
+        return (extension_loaded('gd') && function_exists('gd_info'));
+    }
+
+    /**
+     * Returns clone of given core
+     *
+     * @return mixed
+     */
+    public function cloneCore($core)
+    {
+        $width = imagesx($core);
+        $height = imagesy($core);
+        $clone = imagecreatetruecolor($width, $height);
+        imagealphablending($clone, false);
+        imagesavealpha($clone, true);
+        $transparency = imagecolorallocatealpha($clone, 0, 0, 0, 127);
+        imagefill($clone, 0, 0, $transparency);
+        
+        imagecopy($clone, $core, 0, 0, 0, 0, $width, $height);
+
+        return $clone;
+    }
+}

+ 180 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Encoder.php

@@ -0,0 +1,180 @@
+<?php
+
+namespace Intervention\Image\Gd;
+
+use Intervention\Image\Exception\NotSupportedException;
+
+class Encoder extends \Intervention\Image\AbstractEncoder
+{
+    /**
+     * Processes and returns encoded image as JPEG string
+     *
+     * @return string
+     */
+    protected function processJpeg()
+    {
+        ob_start();
+        imagejpeg($this->image->getCore(), null, $this->quality);
+        $this->image->mime = image_type_to_mime_type(IMAGETYPE_JPEG);
+        $buffer = ob_get_contents();
+        ob_end_clean();
+
+        return $buffer;
+    }
+
+    /**
+     * Processes and returns encoded image as PNG string
+     *
+     * @return string
+     */
+    protected function processPng()
+    {
+        ob_start();
+        $resource = $this->image->getCore();
+        imagealphablending($resource, false);
+        imagesavealpha($resource, true);
+        imagepng($resource, null, -1);
+        $this->image->mime = image_type_to_mime_type(IMAGETYPE_PNG);
+        $buffer = ob_get_contents();
+        ob_end_clean();
+
+        return $buffer;
+    }
+
+    /**
+     * Processes and returns encoded image as GIF string
+     *
+     * @return string
+     */
+    protected function processGif()
+    {
+        ob_start();
+        imagegif($this->image->getCore());
+        $this->image->mime = image_type_to_mime_type(IMAGETYPE_GIF);
+        $buffer = ob_get_contents();
+        ob_end_clean();
+
+        return $buffer;
+    }
+
+    /**
+     * Processes and returns encoded image as WEBP string
+     *
+     * @return string
+     */
+    protected function processWebp()
+    {
+        if ( ! function_exists('imagewebp')) {
+            throw new NotSupportedException(
+                "Webp format is not supported by PHP installation."
+            );
+        }
+
+        ob_start();
+        imagepalettetotruecolor($this->image->getCore());
+        imagealphablending($this->image->getCore(), true);
+        imagesavealpha($this->image->getCore(), true);
+        imagewebp($this->image->getCore(), null, $this->quality);
+        $this->image->mime = defined('IMAGETYPE_WEBP') ? image_type_to_mime_type(IMAGETYPE_WEBP) : 'image/webp';
+        $buffer = ob_get_contents();
+        ob_end_clean();
+        
+        return $buffer;
+    }
+
+    /**
+     * Processes and returns encoded image as TIFF string
+     *
+     * @return string
+     */
+    protected function processTiff()
+    {
+        throw new NotSupportedException(
+            "TIFF format is not supported by Gd Driver."
+        );
+    }
+
+    /**
+     * Processes and returns encoded image as BMP string
+     *
+     * @return string
+     */
+    protected function processBmp()
+    {
+        if ( ! function_exists('imagebmp')) {
+            throw new NotSupportedException(
+                "BMP format is not supported by PHP installation."
+            );
+        }
+
+        ob_start();
+        imagebmp($this->image->getCore());
+        $this->image->mime = defined('IMAGETYPE_BMP') ? image_type_to_mime_type(IMAGETYPE_BMP) : 'image/bmp';
+        $buffer = ob_get_contents();
+        ob_end_clean();
+        
+        return $buffer;
+    }
+
+    /**
+     * Processes and returns encoded image as ICO string
+     *
+     * @return string
+     */
+    protected function processIco()
+    {
+        throw new NotSupportedException(
+            "ICO format is not supported by Gd Driver."
+        );
+    }
+
+    /**
+     * Processes and returns encoded image as PSD string
+     *
+     * @return string
+     */
+    protected function processPsd()
+    {
+        throw new NotSupportedException(
+            "PSD format is not supported by Gd Driver."
+        );
+    }
+
+    /**
+     * Processes and returns encoded image as AVIF string
+     *
+     * @return string
+     */
+    protected function processAvif()
+    {
+	    if ( ! function_exists('imageavif')) {
+		    throw new NotSupportedException(
+		      "AVIF format is not supported by PHP installation."
+		    );
+	    }
+
+	    ob_start();
+        $resource = $this->image->getCore();
+	    imagepalettetotruecolor($resource);
+	    imagealphablending($resource, true);
+	    imagesavealpha($resource, true);
+	    imageavif($resource, null, $this->quality);
+	    $this->image->mime = defined('IMAGETYPE_AVIF') ? image_type_to_mime_type(IMAGETYPE_AVIF) : 'image/avif';
+	    $buffer = ob_get_contents();
+	    ob_end_clean();
+
+	    return $buffer;
+    }
+
+    /**
+     * Processes and returns encoded image as HEIC string
+     *
+     * @return string
+     */
+    protected function processHeic()
+    {
+        throw new NotSupportedException(
+            "HEIC format is not supported by Gd Driver."
+        );
+    }
+}

+ 277 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Font.php

@@ -0,0 +1,277 @@
+<?php
+
+namespace Intervention\Image\Gd;
+
+use Intervention\Image\Exception\NotSupportedException;
+use Intervention\Image\Image;
+
+class Font extends \Intervention\Image\AbstractFont
+{
+    /**
+     * Get font size in points
+     *
+     * @return int
+     */
+    protected function getPointSize()
+    {
+        return intval(ceil($this->size * 0.75));
+    }
+
+    /**
+     * Filter function to access internal integer font values
+     *
+     * @return int
+     */
+    private function getInternalFont()
+    {
+        $internalfont = is_null($this->file) ? 1 : $this->file;
+        $internalfont = is_numeric($internalfont) ? $internalfont : false;
+
+        if ( ! in_array($internalfont, [1, 2, 3, 4, 5])) {
+            throw new NotSupportedException(
+                sprintf('Internal GD font (%s) not available. Use only 1-5.', $internalfont)
+            );
+        }
+
+        return intval($internalfont);
+    }
+
+    /**
+     * Get width of an internal font character
+     *
+     * @return int
+     */
+    private function getInternalFontWidth()
+    {
+        return $this->getInternalFont() + 4;
+    }
+
+    /**
+     * Get height of an internal font character
+     *
+     * @return int
+     */
+    private function getInternalFontHeight()
+    {
+        switch ($this->getInternalFont()) {
+            case 1:
+                return 8;
+
+            case 2:
+                return 14;
+
+            case 3:
+                return 14;
+
+            case 4:
+                return 16;
+
+            case 5:
+                return 16;
+        }
+    }
+
+    /**
+     * Calculates bounding box of current font setting
+     *
+     * @return Array
+     */
+    public function getBoxSize()
+    {
+        $box = [];
+
+        if ($this->hasApplicableFontFile()) {
+
+            // imagettfbbox() converts numeric entities to their respective
+            // character. Preserve any originally double encoded entities to be
+            // represented as is.
+            // eg: &amp;#160; will render &#160; rather than its character.
+            $this->text = preg_replace('/&(#(?:x[a-fA-F0-9]+|[0-9]+);)/', '&#38;\1', $this->text);
+            $this->text = mb_encode_numericentity($this->text, array(0x0080, 0xffff, 0, 0xffff), 'UTF-8');
+
+            // get bounding box with angle 0
+            $box = imagettfbbox($this->getPointSize(), 0, $this->file, $this->text);
+
+            // rotate points manually
+            if ($this->angle != 0) {
+
+                $angle = pi() * 2 - $this->angle * pi() * 2 / 360;
+
+                for ($i=0; $i<4; $i++) {
+                    $x = $box[$i * 2];
+                    $y = $box[$i * 2 + 1];
+                    $box[$i * 2] = cos($angle) * $x - sin($angle) * $y;
+                    $box[$i * 2 + 1] = sin($angle) * $x + cos($angle) * $y;
+                }
+            }
+
+            $box['width'] = intval(abs($box[4] - $box[0]));
+            $box['height'] = intval(abs($box[5] - $box[1]));
+
+        } else {
+
+            // get current internal font size
+            $width = $this->getInternalFontWidth();
+            $height = $this->getInternalFontHeight();
+
+            if (strlen($this->text) == 0) {
+                // no text -> no boxsize
+                $box['width'] = 0;
+                $box['height'] = 0;
+            } else {
+                // calculate boxsize
+                $box['width'] = strlen($this->text) * $width;
+                $box['height'] = $height;
+            }
+        }
+
+        return $box;
+    }
+
+    /**
+     * Draws font to given image at given position
+     *
+     * @param  Image   $image
+     * @param  int     $posx
+     * @param  int     $posy
+     * @return void
+     */
+    public function applyToImage(Image $image, $posx = 0, $posy = 0)
+    {
+        // parse text color
+        $color = new Color($this->color);
+
+        if ($this->hasApplicableFontFile()) {
+
+            if ($this->angle != 0 || is_string($this->align) || is_string($this->valign)) {
+
+                $box = $this->getBoxSize();
+
+                $align = is_null($this->align) ? 'left' : strtolower($this->align);
+                $valign = is_null($this->valign) ? 'bottom' : strtolower($this->valign);
+
+                // correction on position depending on v/h alignment
+                switch ($align.'-'.$valign) {
+
+                    case 'center-top':
+                        $posx = $posx - round(($box[6]+$box[4])/2);
+                        $posy = $posy - round(($box[7]+$box[5])/2);
+                        break;
+
+                    case 'right-top':
+                        $posx = $posx - $box[4];
+                        $posy = $posy - $box[5];
+                        break;
+
+                    case 'left-top':
+                        $posx = $posx - $box[6];
+                        $posy = $posy - $box[7];
+                        break;
+
+                    case 'center-center':
+                    case 'center-middle':
+                        $posx = $posx - round(($box[0]+$box[4])/2);
+                        $posy = $posy - round(($box[1]+$box[5])/2);
+                        break;
+
+                    case 'right-center':
+                    case 'right-middle':
+                        $posx = $posx - round(($box[2]+$box[4])/2);
+                        $posy = $posy - round(($box[3]+$box[5])/2);
+                        break;
+
+                    case 'left-center':
+                    case 'left-middle':
+                        $posx = $posx - round(($box[0]+$box[6])/2);
+                        $posy = $posy - round(($box[1]+$box[7])/2);
+                        break;
+
+                    case 'center-bottom':
+                        $posx = $posx - round(($box[0]+$box[2])/2);
+                        $posy = $posy - round(($box[1]+$box[3])/2);
+                        break;
+
+                    case 'right-bottom':
+                        $posx = $posx - $box[2];
+                        $posy = $posy - $box[3];
+                        break;
+
+                    case 'left-bottom':
+                        $posx = $posx - $box[0];
+                        $posy = $posy - $box[1];
+                        break;
+                }
+            }
+
+            // enable alphablending for imagettftext
+            imagealphablending($image->getCore(), true);
+
+            // draw ttf text
+            imagettftext($image->getCore(), $this->getPointSize(), $this->angle, $posx, $posy, $color->getInt(), $this->file, $this->text);
+
+        } else {
+
+            // get box size
+            $box = $this->getBoxSize();
+            $width = $box['width'];
+            $height = $box['height'];
+
+            // internal font specific position corrections
+            if ($this->getInternalFont() == 1) {
+                $top_correction = 1;
+                $bottom_correction = 2;
+            } elseif ($this->getInternalFont() == 3) {
+                $top_correction = 2;
+                $bottom_correction = 4;
+            } else {
+                $top_correction = 3;
+                $bottom_correction = 4;
+            }
+
+            // x-position corrections for horizontal alignment
+            switch (strtolower($this->align)) {
+                case 'center':
+                    $posx = ceil($posx - ($width / 2));
+                    break;
+
+                case 'right':
+                    $posx = ceil($posx - $width) + 1;
+                    break;
+            }
+
+            // y-position corrections for vertical alignment
+            switch (strtolower($this->valign)) {
+                case 'center':
+                case 'middle':
+                    $posy = ceil($posy - ($height / 2));
+                    break;
+
+                case 'top':
+                    $posy = ceil($posy - $top_correction);
+                    break;
+
+                default:
+                case 'bottom':
+                    $posy = round($posy - $height + $bottom_correction);
+                    break;
+            }
+
+            // draw text
+            imagestring($image->getCore(), $this->getInternalFont(), $posx, $posy, $this->text, $color->getInt());
+        }
+    }
+
+    /**
+     * Set text kerning
+     *
+     * @param  string $kerning
+     * @return void
+     */
+    public function kerning($kerning)
+    {
+        throw new \Intervention\Image\Exception\NotSupportedException(
+            "Kerning is not supported by GD driver."
+        );
+    }
+
+}

+ 40 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Shapes/CircleShape.php

@@ -0,0 +1,40 @@
+<?php
+
+namespace Intervention\Image\Gd\Shapes;
+
+use Intervention\Image\Image;
+
+class CircleShape extends EllipseShape
+{
+    /**
+     * Diameter of circle in pixels
+     *
+     * @var int
+     */
+    public $diameter = 100;
+
+    /**
+     * Create new instance of circle
+     *
+     * @param int $diameter
+     */
+    public function __construct($diameter = null)
+    {
+        $this->width = is_numeric($diameter) ? intval($diameter) : $this->diameter;
+        $this->height = is_numeric($diameter) ? intval($diameter) : $this->diameter;
+        $this->diameter = is_numeric($diameter) ? intval($diameter) : $this->diameter;
+    }
+
+    /**
+     * Draw current circle on given image
+     *
+     * @param  Image   $image
+     * @param  int     $x
+     * @param  int     $y
+     * @return boolean
+     */
+    public function applyToImage(Image $image, $x = 0, $y = 0)
+    {
+        return parent::applyToImage($image, $x, $y);
+    }
+}

+ 65 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Shapes/EllipseShape.php

@@ -0,0 +1,65 @@
+<?php
+
+namespace Intervention\Image\Gd\Shapes;
+
+use Intervention\Image\AbstractShape;
+use Intervention\Image\Gd\Color;
+use Intervention\Image\Image;
+
+class EllipseShape extends AbstractShape
+{
+    /**
+     * Width of ellipse in pixels
+     *
+     * @var int
+     */
+    public $width = 100;
+
+    /**
+     * Height of ellipse in pixels
+     *
+     * @var int
+     */
+    public $height = 100;
+
+    /**
+     * Create new ellipse instance
+     *
+     * @param int $width
+     * @param int $height
+     */
+    public function __construct($width = null, $height = null)
+    {
+        $this->width = is_numeric($width) ? intval($width) : $this->width;
+        $this->height = is_numeric($height) ? intval($height) : $this->height;
+    }
+
+    /**
+     * Draw ellipse instance on given image
+     *
+     * @param  Image   $image
+     * @param  int     $x
+     * @param  int     $y
+     * @return boolean
+     */
+    public function applyToImage(Image $image, $x = 0, $y = 0)
+    {
+        // parse background color
+        $background = new Color($this->background);
+
+        if ($this->hasBorder()) {
+            // slightly smaller ellipse to keep 1px bordered edges clean
+            imagefilledellipse($image->getCore(), $x, $y, $this->width-1, $this->height-1, $background->getInt());
+
+            $border_color = new Color($this->border_color);
+            imagesetthickness($image->getCore(), $this->border_width);
+
+            // gd's imageellipse doesn't respect imagesetthickness so i use imagearc with 359.9 degrees here
+            imagearc($image->getCore(), $x, $y, $this->width, $this->height, 0, 359.99, $border_color->getInt());
+        } else {
+            imagefilledellipse($image->getCore(), $x, $y, $this->width, $this->height, $background->getInt());
+        }
+
+        return true;
+    }
+}

+ 90 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Shapes/LineShape.php

@@ -0,0 +1,90 @@
+<?php
+
+namespace Intervention\Image\Gd\Shapes;
+
+use Intervention\Image\AbstractShape;
+use Intervention\Image\Gd\Color;
+use Intervention\Image\Image;
+
+class LineShape extends AbstractShape
+{
+    /**
+     * Starting point x-coordinate of line
+     *
+     * @var int
+     */
+    public $x = 0;
+
+    /**
+     * Starting point y-coordinate of line
+     *
+     * @var int
+     */
+    public $y = 0;
+
+    /**
+     * Color of line
+     *
+     * @var string
+     */
+    public $color = '#000000';
+
+    /**
+     * Width of line in pixels
+     *
+     * @var int
+     */
+    public $width = 1;
+
+    /**
+     * Create new line shape instance
+     *
+     * @param int $x
+     * @param int $y
+     */
+    public function __construct($x = null, $y = null)
+    {
+        $this->x = is_numeric($x) ? intval($x) : $this->x;
+        $this->y = is_numeric($y) ? intval($y) : $this->y;
+    }
+
+    /**
+     * Set current line color
+     *
+     * @param  string $color
+     * @return void
+     */
+    public function color($color)
+    {
+        $this->color = $color;
+    }
+
+    /**
+     * Set current line width in pixels
+     *
+     * @param  int $width
+     * @return void
+     */
+    public function width($width)
+    {
+        throw new \Intervention\Image\Exception\NotSupportedException(
+            "Line width is not supported by GD driver."
+        );
+    }
+
+    /**
+     * Draw current instance of line to given endpoint on given image
+     *
+     * @param  Image   $image
+     * @param  int     $x
+     * @param  int     $y
+     * @return boolean
+     */
+    public function applyToImage(Image $image, $x = 0, $y = 0)
+    {
+        $color = new Color($this->color);
+        imageline($image->getCore(), $x, $y, $this->x, $this->y, $color->getInt());
+
+        return true;
+    }
+}

+ 49 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Shapes/PolygonShape.php

@@ -0,0 +1,49 @@
+<?php
+
+namespace Intervention\Image\Gd\Shapes;
+
+use Intervention\Image\AbstractShape;
+use Intervention\Image\Gd\Color;
+use Intervention\Image\Image;
+
+class PolygonShape extends AbstractShape
+{
+    /**
+     * Array of points of polygon
+     *
+     * @var int
+     */
+    public $points;
+
+    /**
+     * Create new polygon instance
+     *
+     * @param array $points
+     */
+    public function __construct($points)
+    {
+        $this->points = $points;
+    }
+
+    /**
+     * Draw polygon on given image
+     *
+     * @param  Image   $image
+     * @param  int     $x
+     * @param  int     $y
+     * @return boolean
+     */
+    public function applyToImage(Image $image, $x = 0, $y = 0)
+    {
+        $background = new Color($this->background);
+        imagefilledpolygon($image->getCore(), $this->points, intval(count($this->points) / 2), $background->getInt());
+        
+        if ($this->hasBorder()) {
+            $border_color = new Color($this->border_color);
+            imagesetthickness($image->getCore(), $this->border_width);
+            imagepolygon($image->getCore(), $this->points, intval(count($this->points) / 2), $border_color->getInt());
+        }
+    
+        return true;
+    }
+}

+ 76 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Shapes/RectangleShape.php

@@ -0,0 +1,76 @@
+<?php
+
+namespace Intervention\Image\Gd\Shapes;
+
+use Intervention\Image\AbstractShape;
+use Intervention\Image\Gd\Color;
+use Intervention\Image\Image;
+
+class RectangleShape extends AbstractShape
+{
+    /**
+     * X-Coordinate of top-left point
+     *
+     * @var int
+     */
+    public $x1 = 0;
+
+    /**
+     * Y-Coordinate of top-left point
+     *
+     * @var int
+     */
+    public $y1 = 0;
+
+    /**
+     * X-Coordinate of bottom-right point
+     *
+     * @var int
+     */
+    public $x2 = 0;
+
+    /**
+     * Y-Coordinate of bottom-right point
+     *
+     * @var int
+     */
+    public $y2 = 0;
+
+    /**
+     * Create new rectangle shape instance
+     *
+     * @param int $x1
+     * @param int $y1
+     * @param int $x2
+     * @param int $y2
+     */
+    public function __construct($x1 = null, $y1 = null, $x2 = null, $y2 = null)
+    {
+        $this->x1 = is_numeric($x1) ? intval($x1) : $this->x1;
+        $this->y1 = is_numeric($y1) ? intval($y1) : $this->y1;
+        $this->x2 = is_numeric($x2) ? intval($x2) : $this->x2;
+        $this->y2 = is_numeric($y2) ? intval($y2) : $this->y2;
+    }
+
+    /**
+     * Draw rectangle to given image at certain position
+     *
+     * @param  Image   $image
+     * @param  int     $x
+     * @param  int     $y
+     * @return boolean
+     */
+    public function applyToImage(Image $image, $x = 0, $y = 0)
+    {
+        $background = new Color($this->background);
+        imagefilledrectangle($image->getCore(), $this->x1, $this->y1, $this->x2, $this->y2, $background->getInt());
+
+        if ($this->hasBorder()) {
+            $border_color = new Color($this->border_color);
+            imagesetthickness($image->getCore(), $this->border_width);
+            imagerectangle($image->getCore(), $this->x1, $this->y1, $this->x2, $this->y2, $border_color->getInt());
+        }
+
+        return true;
+    }
+}

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 370 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Image.php


+ 142 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/ImageManager.php

@@ -0,0 +1,142 @@
+<?php
+
+namespace Intervention\Image;
+
+use Closure;
+use Intervention\Image\Exception\MissingDependencyException;
+use Intervention\Image\Exception\NotSupportedException;
+
+class ImageManager
+{
+    /**
+     * Config
+     *
+     * @var array
+     */
+    public $config = [
+        'driver' => 'gd'
+    ];
+
+    /**
+     * Creates new instance of Image Manager
+     *
+     * @param array $config
+     */
+    public function __construct(array $config = [])
+    {
+        $this->checkRequirements();
+        $this->configure($config);
+    }
+
+    /**
+     * Overrides configuration settings
+     *
+     * @param array $config
+     *
+     * @return self
+     */
+    public function configure(array $config = [])
+    {
+        $this->config = array_replace($this->config, $config);
+
+        return $this;
+    }
+
+    /**
+     * Initiates an Image instance from different input types
+     *
+     * @param  mixed $data
+     *
+     * @return \Intervention\Image\Image
+     */
+    public function make($data)
+    {
+        return $this->createDriver()->init($data);
+    }
+
+    /**
+     * Creates an empty image canvas
+     *
+     * @param  int   $width
+     * @param  int   $height
+     * @param  mixed $background
+     *
+     * @return \Intervention\Image\Image
+     */
+    public function canvas($width, $height, $background = null)
+    {
+        return $this->createDriver()->newImage($width, $height, $background);
+    }
+
+    /**
+     * Create new cached image and run callback
+     * (requires additional package intervention/imagecache)
+     *
+     * @param Closure $callback
+     * @param int     $lifetime
+     * @param boolean $returnObj
+     *
+     * @return Image
+     */
+    public function cache(Closure $callback, $lifetime = null, $returnObj = false)
+    {
+        if (class_exists('Intervention\\Image\\ImageCache')) {
+            // create imagecache
+            $imagecache = new ImageCache($this);
+
+            // run callback
+            if (is_callable($callback)) {
+                $callback($imagecache);
+            }
+
+            return $imagecache->get($lifetime, $returnObj);
+        }
+
+        throw new MissingDependencyException(
+            "Please install package intervention/imagecache before running this function."
+        );
+    }
+
+    /**
+     * Creates a driver instance according to config settings
+     *
+     * @return \Intervention\Image\AbstractDriver
+     */
+    private function createDriver()
+    {
+        if (is_string($this->config['driver'])) {
+            $drivername = ucfirst($this->config['driver']);
+            $driverclass = sprintf('Intervention\\Image\\%s\\Driver', $drivername);
+
+            if (class_exists($driverclass)) {
+                return new $driverclass;
+            }
+
+            throw new NotSupportedException(
+                "Driver ({$drivername}) could not be instantiated."
+            );
+        }
+
+        if ($this->config['driver'] instanceof AbstractDriver) {
+            return $this->config['driver'];
+        }
+
+        throw new NotSupportedException(
+            "Unknown driver type."
+        );
+    }
+
+    /**
+     * Check if all requirements are available
+     *
+     * @return void
+     */
+    private function checkRequirements()
+    {
+        if ( ! function_exists('finfo_buffer')) {
+            throw new MissingDependencyException(
+                "PHP Fileinfo extension must be installed/enabled to use Intervention Image."
+            );
+        }
+    }
+}

+ 88 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/ImageManagerStatic.php

@@ -0,0 +1,88 @@
+<?php
+
+namespace Intervention\Image;
+
+use Closure;
+
+class ImageManagerStatic
+{
+    /**
+     * Instance of Intervention\Image\ImageManager
+     *
+     * @var ImageManager
+     */
+    public static $manager;
+
+    /**
+     * Creates a new instance
+     *
+     * @param ImageManager $manager
+     */
+    public function __construct(ImageManager $manager = null)
+    {
+        self::$manager = $manager ? $manager : new ImageManager;
+    }
+
+    /**
+     * Get or create new ImageManager instance
+     *
+     * @return ImageManager
+     */
+    public static function getManager()
+    {
+        return self::$manager ? self::$manager : new ImageManager;
+    }
+
+    /**
+     * Statically create new custom configured image manager
+     *
+     * @param  array $config
+     *
+     * @return ImageManager
+     */
+    public static function configure(array $config = [])
+    {
+        return self::$manager = self::getManager()->configure($config);
+    }
+
+    /**
+     * Statically initiates an Image instance from different input types
+     *
+     * @param  mixed $data
+     *
+     * @return \Intervention\Image\Image
+     * @throws \Intervention\Image\Exception\NotReadableException
+     */
+    public static function make($data)
+    {
+        return self::getManager()->make($data);
+    }
+
+    /**
+     * Statically creates an empty image canvas
+     *
+     * @param  int   $width
+     * @param  int   $height
+     * @param  mixed $background
+     *
+     * @return \Intervention\Image\Image
+     */
+    public static function canvas($width, $height, $background = null)
+    {
+        return self::getManager()->canvas($width, $height, $background);
+    }
+
+    /**
+     * Create new cached image and run callback statically
+     *
+     * @param  Closure  $callback
+     * @param  int      $lifetime
+     * @param  boolean  $returnObj
+     *
+     * @return mixed
+     */
+    public static function cache(Closure $callback, $lifetime = null, $returnObj = false)
+    {
+        return self::getManager()->cache($callback, $lifetime, $returnObj);
+    }
+}

+ 87 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/ImageServiceProvider.php

@@ -0,0 +1,87 @@
+<?php
+
+namespace Intervention\Image;
+
+use Illuminate\Support\ServiceProvider;
+use Laravel\Lumen\Application as LumenApplication;
+use Illuminate\Foundation\Application as IlluminateApplication;
+
+class ImageServiceProvider extends ServiceProvider
+{
+    /**
+     * Indicates if loading of the provider is deferred.
+     *
+     * @var bool
+     */
+    protected $defer = false;
+
+    /**
+     * Actual provider
+     *
+     * @var \Illuminate\Support\ServiceProvider
+     */
+    protected $provider;
+
+    /**
+     * Create a new service provider instance.
+     *
+     * @param  \Illuminate\Contracts\Foundation\Application  $app
+     * @return void
+     */
+    public function __construct($app)
+    {
+        parent::__construct($app);
+
+        $this->provider = $this->getProvider();
+    }
+
+    /**
+     * Bootstrap the application events.
+     *
+     * @return void
+     */
+    public function boot()
+    {
+        if (method_exists($this->provider, 'boot')) {
+            return $this->provider->boot();
+        }
+    }
+
+    /**
+     * Register the service provider.
+     *
+     * @return void
+     */
+    public function register()
+    {
+        return $this->provider->register();
+    }
+
+    /**
+     * Return ServiceProvider according to Laravel version
+     *
+     * @return \Intervention\Image\Provider\ProviderInterface
+     */
+    private function getProvider()
+    {
+        if ($this->app instanceof LumenApplication) {
+            $provider = '\Intervention\Image\ImageServiceProviderLumen';
+        } elseif (version_compare(IlluminateApplication::VERSION, '5.0', '<')) {
+            $provider = '\Intervention\Image\ImageServiceProviderLaravel4';
+        } else {
+            $provider = '\Intervention\Image\ImageServiceProviderLaravelRecent';
+        }
+
+        return new $provider($this->app);
+    }
+
+    /**
+     * Get the services provided by the provider.
+     *
+     * @return array
+     */
+    public function provides()
+    {
+        return ['image'];
+    }
+}

+ 112 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/ImageServiceProviderLaravel4.php

@@ -0,0 +1,112 @@
+<?php
+
+namespace Intervention\Image;
+
+use Illuminate\Support\ServiceProvider;
+use Illuminate\Http\Response as IlluminateResponse;
+
+class ImageServiceProviderLaravel4 extends ServiceProvider
+{
+    /**
+     * Bootstrap the application events.
+     *
+     * @return void
+     */
+    public function boot()
+    {
+        $this->package('intervention/image');
+
+        // try to create imagecache route only if imagecache is present
+        if (class_exists('Intervention\\Image\\ImageCache')) {
+
+            $app = $this->app;
+
+            // load imagecache config
+            $app['config']->package('intervention/imagecache', __DIR__.'/../../../../imagecache/src/config', 'imagecache');
+            $config = $app['config'];
+
+            // create dynamic manipulation route
+            if (is_string($config->get('imagecache::route'))) {
+
+                // add original to route templates
+                $config->set('imagecache::templates.original', null);
+
+                // setup image manipulator route
+                $app['router']->get($config->get('imagecache::route').'/{template}/{filename}', ['as' => 'imagecache', function ($template, $filename) use ($app, $config) {
+
+                    // disable session cookies for image route
+                    $app['config']->set('session.driver', 'array');
+
+                    // find file
+                    foreach ($config->get('imagecache::paths') as $path) {
+                        // don't allow '..' in filenames
+                        $image_path = $path.'/'.str_replace('..', '', $filename);
+                        if (file_exists($image_path) && is_file($image_path)) {
+                            break;
+                        } else {
+                            $image_path = false;
+                        }
+                    }
+
+                    // abort if file not found
+                    if ($image_path === false) {
+                        $app->abort(404);
+                    }
+
+                    // define template callback
+                    $callback = $config->get("imagecache::templates.{$template}");
+
+                    if (is_callable($callback) || class_exists($callback)) {
+
+                        // image manipulation based on callback
+                        $content = $app['image']->cache(function ($image) use ($image_path, $callback) {
+                            
+                            switch (true) {
+                                case is_callable($callback):
+                                    return $callback($image->make($image_path));
+                                    break;
+                                
+                                case class_exists($callback):
+                                    return $image->make($image_path)->filter(new $callback);
+                                    break;
+                            }
+
+                        }, $config->get('imagecache::lifetime'));
+
+                    } else {
+
+                        // get original image file contents
+                        $content = file_get_contents($image_path);
+                    }
+
+                    // define mime type
+                    $mime = finfo_buffer(finfo_open(FILEINFO_MIME_TYPE), $content);
+
+                    // return http response
+                    return new IlluminateResponse($content, 200, [
+                        'Content-Type' => $mime,
+                        'Cache-Control' => 'max-age='.($config->get('imagecache::lifetime')*60).', public',
+                        'Etag' => md5($content)
+                    ]);
+
+                }])->where(['template' => join('|', array_keys($config->get('imagecache::templates'))), 'filename' => '[ \w\\.\\/\\-]+']);
+            }
+        }
+    }
+
+    /**
+     * Register the service provider.
+     *
+     * @return void
+     */
+    public function register()
+    {
+        $app = $this->app;
+
+        $app['image'] = $app->share(function ($app) {
+            return new ImageManager($app['config']->get('image::config'));
+        });
+
+        $app->alias('image', 'Intervention\Image\ImageManager');
+    }
+}

+ 106 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/ImageServiceProviderLaravelRecent.php

@@ -0,0 +1,106 @@
+<?php
+
+namespace Intervention\Image;
+
+use Illuminate\Support\ServiceProvider;
+
+class ImageServiceProviderLaravelRecent extends ServiceProvider
+{
+    /**
+     * Determines if Intervention Imagecache is installed
+     *
+     * @return boolean
+     */
+    private function cacheIsInstalled()
+    {
+        return class_exists('Intervention\\Image\\ImageCache');
+    }
+
+    /**
+     * Bootstrap the application events.
+     *
+     * @return void
+     */
+    public function boot()
+    {
+        $this->publishes([
+            __DIR__.'/../../config/config.php' => config_path('image.php')
+        ]);
+
+        // setup intervention/imagecache if package is installed
+        $this->cacheIsInstalled() ? $this->bootstrapImageCache() : null;
+    }
+
+    /**
+     * Register the service provider.
+     *
+     * @return void
+     */
+    public function register()
+    {
+        $app = $this->app;
+
+        // merge default config
+        $this->mergeConfigFrom(
+            __DIR__.'/../../config/config.php',
+            'image'
+        );
+
+        // create image
+        $app->singleton('image', function ($app) {
+            return new ImageManager($this->getImageConfig($app));
+        });
+
+        $app->alias('image', 'Intervention\Image\ImageManager');
+    }
+
+    /**
+     * Bootstrap imagecache
+     *
+     * @return void
+     */
+    protected function bootstrapImageCache()
+    {
+        $app = $this->app;
+        $config = __DIR__.'/../../../../imagecache/src/config/config.php';
+
+        $this->publishes([
+            $config => config_path('imagecache.php')
+        ]);
+
+        // merge default config
+        $this->mergeConfigFrom(
+            $config,
+            'imagecache'
+        );
+
+        // imagecache route
+        if (is_string(config('imagecache.route'))) {
+
+            $filename_pattern = '[ \w\\.\\/\\-\\@\(\)\=]+';
+
+            // route to access template applied image file
+            $app['router']->get(config('imagecache.route').'/{template}/{filename}', [
+                'uses' => 'Intervention\Image\ImageCacheController@getResponse',
+                'as' => 'imagecache'
+            ])->where(['filename' => $filename_pattern]);
+        }
+    }
+
+    /**
+     * Return image configuration as array
+     *
+     * @param  Application $app
+     * @return array
+     */
+    private function getImageConfig($app)
+    {
+        $config = $app['config']->get('image');
+
+        if (is_null($config)) {
+            return [];
+        }
+
+        return $config;
+    }
+}

+ 42 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/ImageServiceProviderLeague.php

@@ -0,0 +1,42 @@
+<?php
+
+namespace Intervention\Image;
+
+use League\Container\ServiceProvider\AbstractServiceProvider;
+
+class ImageServiceProviderLeague extends AbstractServiceProvider
+{
+    /**
+     * @var array $config
+     */
+    protected $config;
+
+    /**
+     * @var array $provides
+     */
+    protected $provides = [
+        'Intervention\Image\ImageManager'
+    ];
+
+    /**
+     * Constructor.
+     *
+     * @param array $config
+     */
+    public function __construct($config = [])
+    {
+        $this->config = $config;
+    }
+
+    /**
+     * Register the server provider.
+     *
+     * @return void
+     */
+    public function register()
+    {
+        $this->getContainer()->share('Intervention\Image\ImageManager', function () {
+            return new ImageManager($this->config);
+        });
+    }
+}

+ 34 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/ImageServiceProviderLumen.php

@@ -0,0 +1,34 @@
+<?php
+
+namespace Intervention\Image;
+
+use Illuminate\Support\ServiceProvider;
+
+class ImageServiceProviderLumen extends ServiceProvider
+{
+    /**
+     * Register the service provider.
+     *
+     * @return void
+     */
+    public function register()
+    {
+        $app = $this->app;
+
+        // merge default config
+        $this->mergeConfigFrom(
+          __DIR__.'/../../config/config.php',
+          'image'
+        );
+
+        // set configuration
+        $app->configure('image');
+
+        // create image
+        $app->singleton('image',function ($app) {
+            return new ImageManager($app['config']->get('image'));
+        });
+
+        $app->alias('image', 'Intervention\Image\ImageManager');
+    }
+}

+ 0 - 0
crmeb/vendor/intervention/image/src/Intervention/Image/Imagick/Color.php


Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels