]> _ Git - fluidbook-toolbox.git/commitdiff
wip #5644 @3
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 14 Dec 2022 12:58:32 +0000 (13:58 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 14 Dec 2022 12:58:32 +0000 (13:58 +0100)
14 files changed:
app/Http/Controllers/Admin/Operations/FluidbookPublication/EditOperation.php
app/Models/FluidbookPublication.php
package-lock.json
package.json
resources/linkeditor/js/linkeditor.form.js
resources/linkeditor/js/linkeditor.js
resources/linkeditor/js/linkeditor.links.js
resources/linkeditor/js/linkeditor.loader.js
resources/linkeditor/js/linkeditor.resize.js
resources/linkeditor/js/linkeditor.save.js
resources/linkeditor/js/linkeditor.utils.js
resources/linkeditor/js/linkeditor.zoom.js
resources/linkeditor/style/inc/_toolbar.sass
resources/views/fluidbook_publication/link_editor.blade.php

index 3d3f2df30c4623d135eb1b207a223291bae3e25b..72a5311d2f43aa53dbb343db815afa98c599c809 100644 (file)
@@ -23,6 +23,8 @@ trait EditOperation
         Route::match(['post'], $segment . '/{id}/edit/links/import/replace', $controller . '@importLinks');
         Route::match(['post'], $segment . '/{id}/edit/links/move', $controller . '@moveLinks');
         Route::match(['get'], $segment . '/{id}/edit/links/versions/restore/{version}', $controller . '@restoreLinks');
+        Route::match(['get'], $segment . '/{id}/edit/links/assets/{file}', $controller . '@getLinkAsset');
+
         Route::put($segment . '/{id}/save/links', $controller . '@saveLinks');
         Route::get($segment . '/{id}/edit/{type}_{page}.{format}', $controller . '@getLinkPage')
             // ->whereIn('type', ['raster', 'images', 'texts', 'vector'])
@@ -30,6 +32,15 @@ trait EditOperation
         //->whereIn('format', ['jpg', 'png', 'avif', 'webp', 'svg']);
     }
 
+    protected function getLinkAsset($fluidbook_id, $file)
+    {
+        if (!FluidbookPublication::hasPermission($fluidbook_id)) {
+            abort(401);
+        }
+        /** @var FluidbookPublication $fb */
+        $fb = FluidbookPublication::find($fluidbook_id);
+        return XSendFileController::sendfileNoCache($fb->asset_path($file));
+    }
 
     protected function saveLinks($fluidbook_id)
     {
@@ -43,6 +54,9 @@ trait EditOperation
             json_decode(request('links', '[]'), true),
             json_decode(request('rulers', '[]'), true),
         );
+        $fb = FluidbookPublication::find($fluidbook_id);
+
+        return response()->json(['assets' => $fb->getLinksAssetsDimensions(), 'versions' => FluidbookLinks::getLinksVersions($fluidbook_id)]);
     }
 
     protected function moveLinks($fluidbook_id)
index 172f414534f805fc2e68609007c2a3540b77a6e5..71f31710d522d727df7182c9742016c3902dfdfe 100644 (file)
@@ -25,6 +25,7 @@ use Cubist\Backpack\Magic\Fields\Hidden;
 use Cubist\Backpack\Magic\Fields\Integer;
 use Cubist\Backpack\Magic\Fields\SelectFromArray;
 use Cubist\Util\Files\Files;
+use Cubist\Util\Graphics\Image;
 use Cubist\Util\Json;
 use Datetime;
 
@@ -300,7 +301,7 @@ class FluidbookPublication extends ToolboxSettingsModel
 
     public function getDocumentSize($page = 1)
     {
-        $document=$this->getDocument($page);
+        $document = $this->getDocument($page);
         return $document->getPageSize($this->composition[$page][1]);
     }
 
@@ -341,6 +342,11 @@ class FluidbookPublication extends ToolboxSettingsModel
         return Files::mkdir('/application/protected/fluidbookpublication/working/' . $this->id);
     }
 
+    public function asset_path($path)
+    {
+        return $this->getAssetDir() . '/' . $path;
+    }
+
     public function getCompositionUpdate(): int
     {
         if (null === $this->composition_updated_at) {
@@ -363,6 +369,28 @@ class FluidbookPublication extends ToolboxSettingsModel
         FluidbookLinks::getLinksAndRulers($this->id, $links, $rulers);
     }
 
+    public function getLinksAssetsDimensions()
+    {
+        $res = [];
+        $this->getLinksAndRulers($links, $rules);
+        foreach ($links as $link) {
+            if ($link['type'] != 6) {
+                continue;
+            }
+
+            $file = $this->asset_path($link['alternative']);
+            if (!file_exists($file)) {
+                continue;
+            }
+            $md5 = md5($link['alternative']);
+            if (isset($res[$md5])) {
+                continue;
+            }
+            $res[$md5] = ['name' => $link['alternative'], 'dim' => Image::getimagesize($file), 'url' => url('/fluidbook-publication/' . $this->id . '/edit/links/assets/' . $link['alternative'])];
+        }
+        return $res;
+    }
+
 
     /**
      * @return array
index 1c3654d12889cac5e1efeb4b2dc953854a19d622..29c30a658f343a5e48b19ba4c22af7c262dce512 100644 (file)
@@ -1,5 +1,5 @@
 {
-    "name": "application",
+    "name": "FluidbookToolbox",
     "lockfileVersion": 2,
     "requires": true,
     "packages": {
@@ -8,6 +8,7 @@
                 "ace-builds": "^1.12.5",
                 "codemirror": "^5",
                 "command-line-args": "^5.2.1",
+                "crypto-js": "^4.1.1",
                 "jquery-contextmenu": "^2.9.2",
                 "jquery-form": "^4.3.0",
                 "jquery.scrollto": "^2.1.3",
             }
         },
         "node_modules/@babel/compat-data": {
-            "version": "7.20.1",
-            "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.20.1.tgz",
-            "integrity": "sha512-EWZ4mE2diW3QALKvDMiXnbZpRvlj+nayZ112nK93SnhqOtpdsbVD4W+2tEoT3YNBAG9RBR0ISY758ZkOgsn6pQ==",
+            "version": "7.20.5",
+            "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.20.5.tgz",
+            "integrity": "sha512-KZXo2t10+/jxmkhNXc7pZTqRvSOIvVv/+lJwHS+B2rErwOyjuVRh60yVpb7liQ1U5t7lLJ1bz+t8tSypUZdm0g==",
             "dev": true,
             "engines": {
                 "node": ">=6.9.0"
             }
         },
         "node_modules/@babel/core": {
-            "version": "7.20.2",
-            "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.20.2.tgz",
-            "integrity": "sha512-w7DbG8DtMrJcFOi4VrLm+8QM4az8Mo+PuLBKLp2zrYRCow8W/f9xiXm5sN53C8HksCyDQwCKha9JiDoIyPjT2g==",
+            "version": "7.20.5",
+            "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.20.5.tgz",
+            "integrity": "sha512-UdOWmk4pNWTm/4DlPUl/Pt4Gz4rcEMb7CY0Y3eJl5Yz1vI8ZJGmHWaVE55LoxRjdpx0z259GE9U5STA9atUinQ==",
             "dev": true,
             "dependencies": {
                 "@ampproject/remapping": "^2.1.0",
                 "@babel/code-frame": "^7.18.6",
-                "@babel/generator": "^7.20.2",
+                "@babel/generator": "^7.20.5",
                 "@babel/helper-compilation-targets": "^7.20.0",
                 "@babel/helper-module-transforms": "^7.20.2",
-                "@babel/helpers": "^7.20.1",
-                "@babel/parser": "^7.20.2",
+                "@babel/helpers": "^7.20.5",
+                "@babel/parser": "^7.20.5",
                 "@babel/template": "^7.18.10",
-                "@babel/traverse": "^7.20.1",
-                "@babel/types": "^7.20.2",
+                "@babel/traverse": "^7.20.5",
+                "@babel/types": "^7.20.5",
                 "convert-source-map": "^1.7.0",
                 "debug": "^4.1.0",
                 "gensync": "^1.0.0-beta.2",
             "dev": true
         },
         "node_modules/@babel/generator": {
-            "version": "7.20.4",
-            "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.20.4.tgz",
-            "integrity": "sha512-luCf7yk/cm7yab6CAW1aiFnmEfBJplb/JojV56MYEK7ziWfGmFlTfmL9Ehwfy4gFhbjBfWO1wj7/TuSbVNEEtA==",
+            "version": "7.20.5",
+            "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.20.5.tgz",
+            "integrity": "sha512-jl7JY2Ykn9S0yj4DQP82sYvPU+T3g0HFcWTqDLqiuA9tGRNIj9VfbtXGAYTTkyNEnQk1jkMGOdYka8aG/lulCA==",
             "dev": true,
             "dependencies": {
-                "@babel/types": "^7.20.2",
+                "@babel/types": "^7.20.5",
                 "@jridgewell/gen-mapping": "^0.3.2",
                 "jsesc": "^2.5.1"
             },
             }
         },
         "node_modules/@babel/helper-create-class-features-plugin": {
-            "version": "7.20.2",
-            "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.20.2.tgz",
-            "integrity": "sha512-k22GoYRAHPYr9I+Gvy2ZQlAe5mGy8BqWst2wRt8cwIufWTxrsVshhIBvYNqC80N0GSFWTsqRVexOtfzlgOEDvA==",
+            "version": "7.20.5",
+            "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.20.5.tgz",
+            "integrity": "sha512-3RCdA/EmEaikrhayahwToF0fpweU/8o2p8vhc1c/1kftHOdTKuC65kik/TLc+qfbS8JKw4qqJbne4ovICDhmww==",
             "dev": true,
             "dependencies": {
                 "@babel/helper-annotate-as-pure": "^7.18.6",
             }
         },
         "node_modules/@babel/helper-create-regexp-features-plugin": {
-            "version": "7.19.0",
-            "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.19.0.tgz",
-            "integrity": "sha512-htnV+mHX32DF81amCDrwIDr8nrp1PTm+3wfBN9/v8QJOLEioOCOG7qNyq0nHeFiWbT3Eb7gsPwEmV64UCQ1jzw==",
+            "version": "7.20.5",
+            "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.20.5.tgz",
+            "integrity": "sha512-m68B1lkg3XDGX5yCvGO0kPx3v9WIYLnzjKfPcQiwntEQa5ZeRkPmo2X/ISJc8qxWGfwUr+kvZAeEzAwLec2r2w==",
             "dev": true,
             "dependencies": {
                 "@babel/helper-annotate-as-pure": "^7.18.6",
-                "regexpu-core": "^5.1.0"
+                "regexpu-core": "^5.2.1"
             },
             "engines": {
                 "node": ">=6.9.0"
             }
         },
         "node_modules/@babel/helper-wrap-function": {
-            "version": "7.19.0",
-            "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.19.0.tgz",
-            "integrity": "sha512-txX8aN8CZyYGTwcLhlk87KRqncAzhh5TpQamZUa0/u3an36NtDpUP6bQgBCBcLeBs09R/OwQu3OjK0k/HwfNDg==",
+            "version": "7.20.5",
+            "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.20.5.tgz",
+            "integrity": "sha512-bYMxIWK5mh+TgXGVqAtnu5Yn1un+v8DDZtqyzKRLUzrh70Eal2O3aZ7aPYiMADO4uKlkzOiRiZ6GX5q3qxvW9Q==",
             "dev": true,
             "dependencies": {
                 "@babel/helper-function-name": "^7.19.0",
                 "@babel/template": "^7.18.10",
-                "@babel/traverse": "^7.19.0",
-                "@babel/types": "^7.19.0"
+                "@babel/traverse": "^7.20.5",
+                "@babel/types": "^7.20.5"
             },
             "engines": {
                 "node": ">=6.9.0"
             }
         },
         "node_modules/@babel/helpers": {
-            "version": "7.20.1",
-            "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.20.1.tgz",
-            "integrity": "sha512-J77mUVaDTUJFZ5BpP6mMn6OIl3rEWymk2ZxDBQJUG3P+PbmyMcF3bYWvz0ma69Af1oobDqT/iAsvzhB58xhQUg==",
+            "version": "7.20.6",
+            "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.20.6.tgz",
+            "integrity": "sha512-Pf/OjgfgFRW5bApskEz5pvidpim7tEDPlFtKcNRXWmfHGn9IEI2W2flqRQXTFb7gIPTyK++N6rVHuwKut4XK6w==",
             "dev": true,
             "dependencies": {
                 "@babel/template": "^7.18.10",
-                "@babel/traverse": "^7.20.1",
-                "@babel/types": "^7.20.0"
+                "@babel/traverse": "^7.20.5",
+                "@babel/types": "^7.20.5"
             },
             "engines": {
                 "node": ">=6.9.0"
             }
         },
         "node_modules/@babel/parser": {
-            "version": "7.20.3",
-            "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.3.tgz",
-            "integrity": "sha512-OP/s5a94frIPXwjzEcv5S/tpQfc6XhxYUnmWpgdqMWGgYCuErA3SzozaRAMQgSZWKeTJxht9aWAkUY+0UzvOFg==",
+            "version": "7.20.5",
+            "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.5.tgz",
+            "integrity": "sha512-r27t/cy/m9uKLXQNWWebeCUHgnAZq0CpG1OwKRxzJMP1vpSU4bSIK2hq+/cp0bQxetkXx38n09rNu8jVkcK/zA==",
             "dev": true,
             "bin": {
                 "parser": "bin/babel-parser.js"
             }
         },
         "node_modules/@babel/plugin-proposal-private-property-in-object": {
-            "version": "7.18.6",
-            "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.18.6.tgz",
-            "integrity": "sha512-9Rysx7FOctvT5ouj5JODjAFAkgGoudQuLPamZb0v1TGLpapdNaftzifU8NTWQm0IRjqoYypdrSmyWgkocDQ8Dw==",
+            "version": "7.20.5",
+            "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.20.5.tgz",
+            "integrity": "sha512-Vq7b9dUA12ByzB4EjQTPo25sFhY+08pQDBSZRtUAkj7lb7jahaHR5igera16QZ+3my1nYR4dKsNdYj5IjPHilQ==",
             "dev": true,
             "dependencies": {
                 "@babel/helper-annotate-as-pure": "^7.18.6",
-                "@babel/helper-create-class-features-plugin": "^7.18.6",
-                "@babel/helper-plugin-utils": "^7.18.6",
+                "@babel/helper-create-class-features-plugin": "^7.20.5",
+                "@babel/helper-plugin-utils": "^7.20.2",
                 "@babel/plugin-syntax-private-property-in-object": "^7.14.5"
             },
             "engines": {
             }
         },
         "node_modules/@babel/plugin-transform-block-scoping": {
-            "version": "7.20.2",
-            "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.20.2.tgz",
-            "integrity": "sha512-y5V15+04ry69OV2wULmwhEA6jwSWXO1TwAtIwiPXcvHcoOQUqpyMVd2bDsQJMW8AurjulIyUV8kDqtjSwHy1uQ==",
+            "version": "7.20.5",
+            "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.20.5.tgz",
+            "integrity": "sha512-WvpEIW9Cbj9ApF3yJCjIEEf1EiNJLtXagOrL5LNWEZOo3jv8pmPoYTSNJQvqej8OavVlgOoOPw6/htGZro6IkA==",
             "dev": true,
             "dependencies": {
                 "@babel/helper-plugin-utils": "^7.20.2"
             }
         },
         "node_modules/@babel/plugin-transform-named-capturing-groups-regex": {
-            "version": "7.19.1",
-            "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.19.1.tgz",
-            "integrity": "sha512-oWk9l9WItWBQYS4FgXD4Uyy5kq898lvkXpXQxoJEY1RnvPk4R/Dvu2ebXU9q8lP+rlMwUQTFf2Ok6d78ODa0kw==",
+            "version": "7.20.5",
+            "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.20.5.tgz",
+            "integrity": "sha512-mOW4tTzi5iTLnw+78iEq3gr8Aoq4WNRGpmSlrogqaiCBoR1HFhpU4JkpQFOHfeYx3ReVIFWOQJS4aZBRvuZ6mA==",
             "dev": true,
             "dependencies": {
-                "@babel/helper-create-regexp-features-plugin": "^7.19.0",
-                "@babel/helper-plugin-utils": "^7.19.0"
+                "@babel/helper-create-regexp-features-plugin": "^7.20.5",
+                "@babel/helper-plugin-utils": "^7.20.2"
             },
             "engines": {
                 "node": ">=6.9.0"
             }
         },
         "node_modules/@babel/plugin-transform-parameters": {
-            "version": "7.20.3",
-            "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.20.3.tgz",
-            "integrity": "sha512-oZg/Fpx0YDrj13KsLyO8I/CX3Zdw7z0O9qOd95SqcoIzuqy/WTGWvePeHAnZCN54SfdyjHcb1S30gc8zlzlHcA==",
+            "version": "7.20.5",
+            "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.20.5.tgz",
+            "integrity": "sha512-h7plkOmcndIUWXZFLgpbrh2+fXAi47zcUX7IrOQuZdLD0I0KvjJ6cvo3BEcAOsDOcZhVKGJqv07mkSqK0y2isQ==",
             "dev": true,
             "dependencies": {
                 "@babel/helper-plugin-utils": "^7.20.2"
             }
         },
         "node_modules/@babel/plugin-transform-regenerator": {
-            "version": "7.18.6",
-            "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.18.6.tgz",
-            "integrity": "sha512-poqRI2+qiSdeldcz4wTSTXBRryoq3Gc70ye7m7UD5Ww0nE29IXqMl6r7Nd15WBgRd74vloEMlShtH6CKxVzfmQ==",
+            "version": "7.20.5",
+            "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.20.5.tgz",
+            "integrity": "sha512-kW/oO7HPBtntbsahzQ0qSE3tFvkFwnbozz3NWFhLGqH75vLEg+sCGngLlhVkePlCs3Jv0dBBHDzCHxNiFAQKCQ==",
             "dev": true,
             "dependencies": {
-                "@babel/helper-plugin-utils": "^7.18.6",
-                "regenerator-transform": "^0.15.0"
+                "@babel/helper-plugin-utils": "^7.20.2",
+                "regenerator-transform": "^0.15.1"
             },
             "engines": {
                 "node": ">=6.9.0"
             }
         },
         "node_modules/@babel/runtime": {
-            "version": "7.20.1",
-            "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.20.1.tgz",
-            "integrity": "sha512-mrzLkl6U9YLF8qpqI7TB82PESyEGjm/0Ly91jG575eVxMMlb8fYfOXFZIJ8XfLrJZQbm7dlKry2bJmXBUEkdFg==",
+            "version": "7.20.6",
+            "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.20.6.tgz",
+            "integrity": "sha512-Q+8MqP7TiHMWzSfwiJwXCjyf4GYA4Dgw3emg/7xmwsdLJOZUp+nMqcOwOzzYheuM1rhDu8FSj2l0aoMygEuXuA==",
             "dev": true,
             "dependencies": {
-                "regenerator-runtime": "^0.13.10"
+                "regenerator-runtime": "^0.13.11"
             },
             "engines": {
                 "node": ">=6.9.0"
             }
         },
         "node_modules/@babel/traverse": {
-            "version": "7.20.1",
-            "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.20.1.tgz",
-            "integrity": "sha512-d3tN8fkVJwFLkHkBN479SOsw4DMZnz8cdbL/gvuDuzy3TS6Nfw80HuQqhw1pITbIruHyh7d1fMA47kWzmcUEGA==",
+            "version": "7.20.5",
+            "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.20.5.tgz",
+            "integrity": "sha512-WM5ZNN3JITQIq9tFZaw1ojLU3WgWdtkxnhM1AegMS+PvHjkM5IXjmYEGY7yukz5XS4sJyEf2VzWjI8uAavhxBQ==",
             "dev": true,
             "dependencies": {
                 "@babel/code-frame": "^7.18.6",
-                "@babel/generator": "^7.20.1",
+                "@babel/generator": "^7.20.5",
                 "@babel/helper-environment-visitor": "^7.18.9",
                 "@babel/helper-function-name": "^7.19.0",
                 "@babel/helper-hoist-variables": "^7.18.6",
                 "@babel/helper-split-export-declaration": "^7.18.6",
-                "@babel/parser": "^7.20.1",
-                "@babel/types": "^7.20.0",
+                "@babel/parser": "^7.20.5",
+                "@babel/types": "^7.20.5",
                 "debug": "^4.1.0",
                 "globals": "^11.1.0"
             },
             "dev": true
         },
         "node_modules/@babel/types": {
-            "version": "7.20.2",
-            "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.20.2.tgz",
-            "integrity": "sha512-FnnvsNWgZCr232sqtXggapvlkk/tuwR/qhGzcmxI0GXLCjmPYQPzio2FbdlWuY6y1sHFfQKk+rRbUZ9VStQMog==",
+            "version": "7.20.5",
+            "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.20.5.tgz",
+            "integrity": "sha512-c9fst/h2/dcF7H+MJKZ2T0KjEQ8hY/BNnDk/H3XY8C4Aw/eWQXWn/lWntHF9ooUBnGmEvbfGrTgLWc+um0YDUg==",
             "dev": true,
             "dependencies": {
                 "@babel/helper-string-parser": "^7.19.4",
             "dev": true
         },
         "node_modules/@types/node": {
-            "version": "18.11.9",
-            "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.9.tgz",
-            "integrity": "sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg==",
+            "version": "18.11.14",
+            "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.14.tgz",
+            "integrity": "sha512-0KXV57tENYmmJMl+FekeW9V3O/rlcqGQQJ/hNh9r8pKIj304pskWuEd8fCyNT86g/TpO0gcOTiLzsHLEURFMIQ==",
             "devOptional": true
         },
         "node_modules/@types/normalize-package-data": {
             }
         },
         "node_modules/ace-builds": {
-            "version": "1.13.1",
-            "resolved": "https://registry.npmjs.org/ace-builds/-/ace-builds-1.13.1.tgz",
-            "integrity": "sha512-HvkZv/AhDRSA4k5Co5Dg8dWOTfID0AQ7Sa5cU6V82fz/XfCA0A/icC3sdBoh9yg0WQoJqbFrRYc+ogr/971Vww=="
+            "version": "1.14.0",
+            "resolved": "https://registry.npmjs.org/ace-builds/-/ace-builds-1.14.0.tgz",
+            "integrity": "sha512-3q8LvawomApRCt4cC0OzxVjDsZ609lDbm8l0Xl9uqG06dKEq4RT0YXLUyk7J2SxmqIp5YXzZNw767Dr8GKUruw=="
         },
         "node_modules/acorn": {
             "version": "6.4.2",
                 "node": ">=0.10.0"
             }
         },
+        "node_modules/bindings": {
+            "version": "1.5.0",
+            "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
+            "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
+            "dev": true,
+            "optional": true,
+            "dependencies": {
+                "file-uri-to-path": "1.0.0"
+            }
+        },
         "node_modules/bl": {
             "version": "4.1.0",
             "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz",
             }
         },
         "node_modules/caniuse-lite": {
-            "version": "1.0.30001434",
-            "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001434.tgz",
-            "integrity": "sha512-aOBHrLmTQw//WFa2rcF1If9fa3ypkC1wzqqiKHgfdrXTWcU8C4gKVZT77eQAPWN1APys3+uQ0Df07rKauXGEYA==",
+            "version": "1.0.30001439",
+            "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001439.tgz",
+            "integrity": "sha512-1MgUzEkoMO6gKfXflStpYgZDlFM7M/ck/bgfVCACO5vnAf0fXoNVHdWtqGU+MYca+4bL9Z5bpOVmR33cWW9G2A==",
             "dev": true,
             "funding": [
                 {
                 "node": "*"
             }
         },
+        "node_modules/crypto-js": {
+            "version": "4.1.1",
+            "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.1.1.tgz",
+            "integrity": "sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw=="
+        },
         "node_modules/css": {
             "version": "2.2.4",
             "resolved": "https://registry.npmjs.org/css/-/css-2.2.4.tgz",
             }
         },
         "node_modules/decode-uri-component": {
-            "version": "0.2.0",
-            "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz",
-            "integrity": "sha512-hjf+xovcEn31w/EUYdTXQh/8smFL/dzYjohQGEIgjyNavaJfBY2p5F527Bo1VPATxv0VYTUC2bOcXvqFwk78Og==",
+            "version": "0.2.2",
+            "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz",
+            "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==",
             "dev": true,
             "engines": {
                 "node": ">=0.10"
             }
         },
         "node_modules/es-abstract": {
-            "version": "1.20.4",
-            "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.20.4.tgz",
-            "integrity": "sha512-0UtvRN79eMe2L+UNEF1BwRe364sj/DXhQ/k5FmivgoSdpM90b8Jc0mDzKMGo7QS0BVbOP/bTwBKNnDc9rNzaPA==",
+            "version": "1.20.5",
+            "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.20.5.tgz",
+            "integrity": "sha512-7h8MM2EQhsCA7pU/Nv78qOXFpD8Rhqd12gYiSJVkrH9+e8VuA8JlPJK/hQjjlLv6pJvx/z1iRFKzYb0XT/RuAQ==",
             "dev": true,
             "dependencies": {
                 "call-bind": "^1.0.2",
                 "function.prototype.name": "^1.1.5",
                 "get-intrinsic": "^1.1.3",
                 "get-symbol-description": "^1.0.0",
+                "gopd": "^1.0.1",
                 "has": "^1.0.3",
                 "has-property-descriptors": "^1.0.0",
                 "has-symbols": "^1.0.3",
                 "object.assign": "^4.1.4",
                 "regexp.prototype.flags": "^1.4.3",
                 "safe-regex-test": "^1.0.0",
-                "string.prototype.trimend": "^1.0.5",
-                "string.prototype.trimstart": "^1.0.5",
+                "string.prototype.trimend": "^1.0.6",
+                "string.prototype.trimstart": "^1.0.6",
                 "unbox-primitive": "^1.0.2"
             },
             "engines": {
             "dev": true
         },
         "node_modules/fastq": {
-            "version": "1.13.0",
-            "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz",
-            "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==",
+            "version": "1.14.0",
+            "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.14.0.tgz",
+            "integrity": "sha512-eR2D+V9/ExcbF9ls441yIuN6TI2ED1Y2ZcA5BmMtJsOkWOFRJQ0Jt0g1UwqXJJVAb+V+umH5Dfr8oh4EVP7VVg==",
             "dev": true,
             "dependencies": {
                 "reusify": "^1.0.4"
                 "node": ">=6"
             }
         },
+        "node_modules/file-uri-to-path": {
+            "version": "1.0.0",
+            "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
+            "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==",
+            "dev": true,
+            "optional": true
+        },
         "node_modules/fill-range": {
             "version": "4.0.0",
             "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
             "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
             "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw=="
         },
+        "node_modules/fsevents": {
+            "version": "1.2.13",
+            "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz",
+            "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==",
+            "deprecated": "fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.",
+            "dev": true,
+            "hasInstallScript": true,
+            "optional": true,
+            "os": [
+                "darwin"
+            ],
+            "dependencies": {
+                "bindings": "^1.5.0",
+                "nan": "^2.12.1"
+            },
+            "engines": {
+                "node": ">= 4.0"
+            }
+        },
         "node_modules/function-bind": {
             "version": "1.1.1",
             "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
                 "node": ">=4"
             }
         },
+        "node_modules/gopd": {
+            "version": "1.0.1",
+            "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz",
+            "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==",
+            "dev": true,
+            "dependencies": {
+                "get-intrinsic": "^1.1.3"
+            },
+            "funding": {
+                "url": "https://github.com/sponsors/ljharb"
+            }
+        },
         "node_modules/graceful-fs": {
             "version": "4.2.10",
             "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz",
             }
         },
         "node_modules/jquery": {
-            "version": "3.6.1",
-            "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.1.tgz",
-            "integrity": "sha512-opJeO4nCucVnsjiXOE+/PcCgYw9Gwpvs/a6B1LL/lQhwWwpbVEVYDZ1FokFr8PRc7ghYlrFPuyHuiiDNTQxmcw=="
+            "version": "3.6.2",
+            "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.2.tgz",
+            "integrity": "sha512-/e7ulNIEEYk1Z/l4X0vpxGt+B/dNsV8ghOPAWZaJs8pkGvsSC0tm33aMGylXcj/U7y4IcvwtMXPMyBFZn/gK9A=="
         },
         "node_modules/jquery-contextmenu": {
             "version": "2.9.2",
             }
         },
         "node_modules/minipass": {
-            "version": "3.3.4",
-            "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.4.tgz",
-            "integrity": "sha512-I9WPbWHCGu8W+6k1ZiGpPu0GkoKBeorkfKNuAFBNS1HNFJvke82sxvI5bzcCNpWPorkOO5QQ+zomzzwRxejXiw==",
+            "version": "3.3.6",
+            "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",
+            "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",
             "dev": true,
             "dependencies": {
                 "yallist": "^4.0.0"
             "integrity": "sha512-cnAsSVxIDsYt0v7HmC0hWZFwwXSh+E6PgCrREDuN/EsjgLwA5XRmlMHhSiDPrt6HxY1gTivEa/Zh7GtODoLevQ==",
             "dev": true
         },
+        "node_modules/nan": {
+            "version": "2.17.0",
+            "resolved": "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz",
+            "integrity": "sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==",
+            "dev": true,
+            "optional": true
+        },
         "node_modules/nanomatch": {
             "version": "1.2.13",
             "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz",
             "dev": true
         },
         "node_modules/node-releases": {
-            "version": "2.0.6",
-            "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz",
-            "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==",
+            "version": "2.0.7",
+            "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.7.tgz",
+            "integrity": "sha512-EJ3rzxL9pTWPjk5arA0s0dgXpnyiAbJDE6wHT62g7VsgrgQgmmZ+Ru++M1BFofncWja+Pnn3rEr3fieRySAdKQ==",
             "dev": true
         },
         "node_modules/normalize-package-data": {
             "dev": true
         },
         "node_modules/prettier": {
-            "version": "2.8.0",
-            "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.0.tgz",
-            "integrity": "sha512-9Lmg8hTFZKG0Asr/kW9Bp8tJjRVluO8EJQVfY2T7FMw9T5jy4I/Uvx0Rca/XWf50QQ1/SS48+6IJWnrb+2yemA==",
+            "version": "2.8.1",
+            "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.1.tgz",
+            "integrity": "sha512-lqGoSJBQNJidqCHE80vqZJHWHRFoNYsSpP9AjFhlhi9ODCJA541svILes/+/1GM3VaL/abZi7cpFzOpdR9UPKg==",
             "dev": true,
             "optional": true,
             "bin": {
             "version": "17.1.3",
             "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-17.1.3.tgz",
             "integrity": "sha512-tVtvNSOOqlq75rUgwLeDAEQoLIiBqmRg0/zedpI6fuqIocIkuxG23A7FIl1oVSkuSMMLgcOP5kVhNETmsmjvPw==",
+            "deprecated": "< 18.1.0 is no longer supported",
             "hasInstallScript": true,
             "dependencies": {
                 "cross-fetch": "3.1.5",
             "dev": true
         },
         "node_modules/resolve-url-loader": {
-            "version": "3.1.4",
-            "resolved": "https://registry.npmjs.org/resolve-url-loader/-/resolve-url-loader-3.1.4.tgz",
-            "integrity": "sha512-D3sQ04o0eeQEySLrcz4DsX3saHfsr8/N6tfhblxgZKXxMT2Louargg12oGNfoTRLV09GXhVUe5/qgA5vdgNigg==",
+            "version": "3.1.5",
+            "resolved": "https://registry.npmjs.org/resolve-url-loader/-/resolve-url-loader-3.1.5.tgz",
+            "integrity": "sha512-mgFMCmrV/tA4738EsFmPFE5/MaqSgUMe8LK971kVEKA/RrNVb7+VqFsg/qmKyythf34eyq476qIobP/gfFBGSQ==",
             "dev": true,
             "dependencies": {
                 "adjust-sourcemap-loader": "3.0.0",
                 "compose-function": "3.0.3",
                 "convert-source-map": "1.7.0",
                 "es6-iterator": "2.0.3",
-                "loader-utils": "1.2.3",
+                "loader-utils": "^1.2.3",
                 "postcss": "7.0.36",
                 "rework": "1.0.1",
                 "rework-visit": "1.0.0",
                 "safe-buffer": "~5.1.1"
             }
         },
-        "node_modules/resolve-url-loader/node_modules/emojis-list": {
-            "version": "2.1.0",
-            "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz",
-            "integrity": "sha512-knHEZMgs8BB+MInokmNTg/OyPlAddghe1YBgNwJBc5zsJi/uyIcXoSDsL/W9ymOsBoBGdPIHXYJ9+qKFwRwDng==",
-            "dev": true,
-            "engines": {
-                "node": ">= 0.10"
-            }
-        },
         "node_modules/resolve-url-loader/node_modules/json5": {
             "version": "1.0.1",
             "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz",
             }
         },
         "node_modules/resolve-url-loader/node_modules/loader-utils": {
-            "version": "1.2.3",
-            "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz",
-            "integrity": "sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==",
+            "version": "1.4.2",
+            "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.2.tgz",
+            "integrity": "sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg==",
             "dev": true,
             "dependencies": {
                 "big.js": "^5.2.2",
-                "emojis-list": "^2.0.0",
+                "emojis-list": "^3.0.0",
                 "json5": "^1.0.1"
             },
             "engines": {
             "dev": true
         },
         "node_modules/sass": {
-            "version": "1.56.1",
-            "resolved": "https://registry.npmjs.org/sass/-/sass-1.56.1.tgz",
-            "integrity": "sha512-VpEyKpyBPCxE7qGDtOcdJ6fFbcpOM+Emu7uZLxVrkX8KVU/Dp5UF7WLvzqRuUhB6mqqQt1xffLoG+AndxTZrCQ==",
+            "version": "1.56.2",
+            "resolved": "https://registry.npmjs.org/sass/-/sass-1.56.2.tgz",
+            "integrity": "sha512-ciEJhnyCRwzlBCB+h5cCPM6ie/6f8HrhZMQOf5vlU60Y1bI1rx5Zb0vlDZvaycHsg/MqFfF1Eq2eokAa32iw8w==",
             "dev": true,
             "dependencies": {
                 "chokidar": ">=3.0.0 <4.0.0",
                 "node": ">=8"
             }
         },
+        "node_modules/sass/node_modules/fsevents": {
+            "version": "2.3.2",
+            "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
+            "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
+            "dev": true,
+            "hasInstallScript": true,
+            "optional": true,
+            "os": [
+                "darwin"
+            ],
+            "engines": {
+                "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
+            }
+        },
         "node_modules/sass/node_modules/glob-parent": {
             "version": "5.1.2",
             "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
                 "node": ">=8"
             }
         },
+        "node_modules/watchpack/node_modules/fsevents": {
+            "version": "2.3.2",
+            "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
+            "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
+            "dev": true,
+            "hasInstallScript": true,
+            "optional": true,
+            "os": [
+                "darwin"
+            ],
+            "engines": {
+                "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
+            }
+        },
         "node_modules/watchpack/node_modules/glob-parent": {
             "version": "5.1.2",
             "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
                 "node": ">=8"
             }
         },
+        "node_modules/webfont/node_modules/fsevents": {
+            "version": "2.3.2",
+            "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
+            "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
+            "dev": true,
+            "hasInstallScript": true,
+            "optional": true,
+            "os": [
+                "darwin"
+            ],
+            "peer": true,
+            "engines": {
+                "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
+            }
+        },
         "node_modules/webfont/node_modules/glob-parent": {
             "version": "5.1.2",
             "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
             }
         },
         "node_modules/webfont/node_modules/ignore": {
-            "version": "5.2.0",
-            "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz",
-            "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==",
+            "version": "5.2.1",
+            "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.1.tgz",
+            "integrity": "sha512-d2qQLzTJ9WxQftPAuEQpSPmKqzxePjzVbpAVv62AQ64NTL+wR4JkrVqR/LqFsFEUsHDAiId52mJteHDFuDkElA==",
             "dev": true,
             "engines": {
                 "node": ">= 4"
             }
         },
         "@babel/compat-data": {
-            "version": "7.20.1",
-            "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.20.1.tgz",
-            "integrity": "sha512-EWZ4mE2diW3QALKvDMiXnbZpRvlj+nayZ112nK93SnhqOtpdsbVD4W+2tEoT3YNBAG9RBR0ISY758ZkOgsn6pQ==",
+            "version": "7.20.5",
+            "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.20.5.tgz",
+            "integrity": "sha512-KZXo2t10+/jxmkhNXc7pZTqRvSOIvVv/+lJwHS+B2rErwOyjuVRh60yVpb7liQ1U5t7lLJ1bz+t8tSypUZdm0g==",
             "dev": true
         },
         "@babel/core": {
-            "version": "7.20.2",
-            "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.20.2.tgz",
-            "integrity": "sha512-w7DbG8DtMrJcFOi4VrLm+8QM4az8Mo+PuLBKLp2zrYRCow8W/f9xiXm5sN53C8HksCyDQwCKha9JiDoIyPjT2g==",
+            "version": "7.20.5",
+            "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.20.5.tgz",
+            "integrity": "sha512-UdOWmk4pNWTm/4DlPUl/Pt4Gz4rcEMb7CY0Y3eJl5Yz1vI8ZJGmHWaVE55LoxRjdpx0z259GE9U5STA9atUinQ==",
             "dev": true,
             "requires": {
                 "@ampproject/remapping": "^2.1.0",
                 "@babel/code-frame": "^7.18.6",
-                "@babel/generator": "^7.20.2",
+                "@babel/generator": "^7.20.5",
                 "@babel/helper-compilation-targets": "^7.20.0",
                 "@babel/helper-module-transforms": "^7.20.2",
-                "@babel/helpers": "^7.20.1",
-                "@babel/parser": "^7.20.2",
+                "@babel/helpers": "^7.20.5",
+                "@babel/parser": "^7.20.5",
                 "@babel/template": "^7.18.10",
-                "@babel/traverse": "^7.20.1",
-                "@babel/types": "^7.20.2",
+                "@babel/traverse": "^7.20.5",
+                "@babel/types": "^7.20.5",
                 "convert-source-map": "^1.7.0",
                 "debug": "^4.1.0",
                 "gensync": "^1.0.0-beta.2",
             }
         },
         "@babel/generator": {
-            "version": "7.20.4",
-            "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.20.4.tgz",
-            "integrity": "sha512-luCf7yk/cm7yab6CAW1aiFnmEfBJplb/JojV56MYEK7ziWfGmFlTfmL9Ehwfy4gFhbjBfWO1wj7/TuSbVNEEtA==",
+            "version": "7.20.5",
+            "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.20.5.tgz",
+            "integrity": "sha512-jl7JY2Ykn9S0yj4DQP82sYvPU+T3g0HFcWTqDLqiuA9tGRNIj9VfbtXGAYTTkyNEnQk1jkMGOdYka8aG/lulCA==",
             "dev": true,
             "requires": {
-                "@babel/types": "^7.20.2",
+                "@babel/types": "^7.20.5",
                 "@jridgewell/gen-mapping": "^0.3.2",
                 "jsesc": "^2.5.1"
             },
             }
         },
         "@babel/helper-create-class-features-plugin": {
-            "version": "7.20.2",
-            "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.20.2.tgz",
-            "integrity": "sha512-k22GoYRAHPYr9I+Gvy2ZQlAe5mGy8BqWst2wRt8cwIufWTxrsVshhIBvYNqC80N0GSFWTsqRVexOtfzlgOEDvA==",
+            "version": "7.20.5",
+            "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.20.5.tgz",
+            "integrity": "sha512-3RCdA/EmEaikrhayahwToF0fpweU/8o2p8vhc1c/1kftHOdTKuC65kik/TLc+qfbS8JKw4qqJbne4ovICDhmww==",
             "dev": true,
             "requires": {
                 "@babel/helper-annotate-as-pure": "^7.18.6",
             }
         },
         "@babel/helper-create-regexp-features-plugin": {
-            "version": "7.19.0",
-            "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.19.0.tgz",
-            "integrity": "sha512-htnV+mHX32DF81amCDrwIDr8nrp1PTm+3wfBN9/v8QJOLEioOCOG7qNyq0nHeFiWbT3Eb7gsPwEmV64UCQ1jzw==",
+            "version": "7.20.5",
+            "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.20.5.tgz",
+            "integrity": "sha512-m68B1lkg3XDGX5yCvGO0kPx3v9WIYLnzjKfPcQiwntEQa5ZeRkPmo2X/ISJc8qxWGfwUr+kvZAeEzAwLec2r2w==",
             "dev": true,
             "requires": {
                 "@babel/helper-annotate-as-pure": "^7.18.6",
-                "regexpu-core": "^5.1.0"
+                "regexpu-core": "^5.2.1"
             }
         },
         "@babel/helper-define-polyfill-provider": {
             "dev": true
         },
         "@babel/helper-wrap-function": {
-            "version": "7.19.0",
-            "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.19.0.tgz",
-            "integrity": "sha512-txX8aN8CZyYGTwcLhlk87KRqncAzhh5TpQamZUa0/u3an36NtDpUP6bQgBCBcLeBs09R/OwQu3OjK0k/HwfNDg==",
+            "version": "7.20.5",
+            "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.20.5.tgz",
+            "integrity": "sha512-bYMxIWK5mh+TgXGVqAtnu5Yn1un+v8DDZtqyzKRLUzrh70Eal2O3aZ7aPYiMADO4uKlkzOiRiZ6GX5q3qxvW9Q==",
             "dev": true,
             "requires": {
                 "@babel/helper-function-name": "^7.19.0",
                 "@babel/template": "^7.18.10",
-                "@babel/traverse": "^7.19.0",
-                "@babel/types": "^7.19.0"
+                "@babel/traverse": "^7.20.5",
+                "@babel/types": "^7.20.5"
             }
         },
         "@babel/helpers": {
-            "version": "7.20.1",
-            "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.20.1.tgz",
-            "integrity": "sha512-J77mUVaDTUJFZ5BpP6mMn6OIl3rEWymk2ZxDBQJUG3P+PbmyMcF3bYWvz0ma69Af1oobDqT/iAsvzhB58xhQUg==",
+            "version": "7.20.6",
+            "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.20.6.tgz",
+            "integrity": "sha512-Pf/OjgfgFRW5bApskEz5pvidpim7tEDPlFtKcNRXWmfHGn9IEI2W2flqRQXTFb7gIPTyK++N6rVHuwKut4XK6w==",
             "dev": true,
             "requires": {
                 "@babel/template": "^7.18.10",
-                "@babel/traverse": "^7.20.1",
-                "@babel/types": "^7.20.0"
+                "@babel/traverse": "^7.20.5",
+                "@babel/types": "^7.20.5"
             }
         },
         "@babel/highlight": {
             }
         },
         "@babel/parser": {
-            "version": "7.20.3",
-            "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.3.tgz",
-            "integrity": "sha512-OP/s5a94frIPXwjzEcv5S/tpQfc6XhxYUnmWpgdqMWGgYCuErA3SzozaRAMQgSZWKeTJxht9aWAkUY+0UzvOFg==",
+            "version": "7.20.5",
+            "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.5.tgz",
+            "integrity": "sha512-r27t/cy/m9uKLXQNWWebeCUHgnAZq0CpG1OwKRxzJMP1vpSU4bSIK2hq+/cp0bQxetkXx38n09rNu8jVkcK/zA==",
             "dev": true
         },
         "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": {
             }
         },
         "@babel/plugin-proposal-private-property-in-object": {
-            "version": "7.18.6",
-            "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.18.6.tgz",
-            "integrity": "sha512-9Rysx7FOctvT5ouj5JODjAFAkgGoudQuLPamZb0v1TGLpapdNaftzifU8NTWQm0IRjqoYypdrSmyWgkocDQ8Dw==",
+            "version": "7.20.5",
+            "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.20.5.tgz",
+            "integrity": "sha512-Vq7b9dUA12ByzB4EjQTPo25sFhY+08pQDBSZRtUAkj7lb7jahaHR5igera16QZ+3my1nYR4dKsNdYj5IjPHilQ==",
             "dev": true,
             "requires": {
                 "@babel/helper-annotate-as-pure": "^7.18.6",
-                "@babel/helper-create-class-features-plugin": "^7.18.6",
-                "@babel/helper-plugin-utils": "^7.18.6",
+                "@babel/helper-create-class-features-plugin": "^7.20.5",
+                "@babel/helper-plugin-utils": "^7.20.2",
                 "@babel/plugin-syntax-private-property-in-object": "^7.14.5"
             }
         },
             }
         },
         "@babel/plugin-transform-block-scoping": {
-            "version": "7.20.2",
-            "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.20.2.tgz",
-            "integrity": "sha512-y5V15+04ry69OV2wULmwhEA6jwSWXO1TwAtIwiPXcvHcoOQUqpyMVd2bDsQJMW8AurjulIyUV8kDqtjSwHy1uQ==",
+            "version": "7.20.5",
+            "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.20.5.tgz",
+            "integrity": "sha512-WvpEIW9Cbj9ApF3yJCjIEEf1EiNJLtXagOrL5LNWEZOo3jv8pmPoYTSNJQvqej8OavVlgOoOPw6/htGZro6IkA==",
             "dev": true,
             "requires": {
                 "@babel/helper-plugin-utils": "^7.20.2"
             }
         },
         "@babel/plugin-transform-named-capturing-groups-regex": {
-            "version": "7.19.1",
-            "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.19.1.tgz",
-            "integrity": "sha512-oWk9l9WItWBQYS4FgXD4Uyy5kq898lvkXpXQxoJEY1RnvPk4R/Dvu2ebXU9q8lP+rlMwUQTFf2Ok6d78ODa0kw==",
+            "version": "7.20.5",
+            "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.20.5.tgz",
+            "integrity": "sha512-mOW4tTzi5iTLnw+78iEq3gr8Aoq4WNRGpmSlrogqaiCBoR1HFhpU4JkpQFOHfeYx3ReVIFWOQJS4aZBRvuZ6mA==",
             "dev": true,
             "requires": {
-                "@babel/helper-create-regexp-features-plugin": "^7.19.0",
-                "@babel/helper-plugin-utils": "^7.19.0"
+                "@babel/helper-create-regexp-features-plugin": "^7.20.5",
+                "@babel/helper-plugin-utils": "^7.20.2"
             }
         },
         "@babel/plugin-transform-new-target": {
             }
         },
         "@babel/plugin-transform-parameters": {
-            "version": "7.20.3",
-            "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.20.3.tgz",
-            "integrity": "sha512-oZg/Fpx0YDrj13KsLyO8I/CX3Zdw7z0O9qOd95SqcoIzuqy/WTGWvePeHAnZCN54SfdyjHcb1S30gc8zlzlHcA==",
+            "version": "7.20.5",
+            "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.20.5.tgz",
+            "integrity": "sha512-h7plkOmcndIUWXZFLgpbrh2+fXAi47zcUX7IrOQuZdLD0I0KvjJ6cvo3BEcAOsDOcZhVKGJqv07mkSqK0y2isQ==",
             "dev": true,
             "requires": {
                 "@babel/helper-plugin-utils": "^7.20.2"
             }
         },
         "@babel/plugin-transform-regenerator": {
-            "version": "7.18.6",
-            "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.18.6.tgz",
-            "integrity": "sha512-poqRI2+qiSdeldcz4wTSTXBRryoq3Gc70ye7m7UD5Ww0nE29IXqMl6r7Nd15WBgRd74vloEMlShtH6CKxVzfmQ==",
+            "version": "7.20.5",
+            "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.20.5.tgz",
+            "integrity": "sha512-kW/oO7HPBtntbsahzQ0qSE3tFvkFwnbozz3NWFhLGqH75vLEg+sCGngLlhVkePlCs3Jv0dBBHDzCHxNiFAQKCQ==",
             "dev": true,
             "requires": {
-                "@babel/helper-plugin-utils": "^7.18.6",
-                "regenerator-transform": "^0.15.0"
+                "@babel/helper-plugin-utils": "^7.20.2",
+                "regenerator-transform": "^0.15.1"
             }
         },
         "@babel/plugin-transform-reserved-words": {
             }
         },
         "@babel/runtime": {
-            "version": "7.20.1",
-            "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.20.1.tgz",
-            "integrity": "sha512-mrzLkl6U9YLF8qpqI7TB82PESyEGjm/0Ly91jG575eVxMMlb8fYfOXFZIJ8XfLrJZQbm7dlKry2bJmXBUEkdFg==",
+            "version": "7.20.6",
+            "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.20.6.tgz",
+            "integrity": "sha512-Q+8MqP7TiHMWzSfwiJwXCjyf4GYA4Dgw3emg/7xmwsdLJOZUp+nMqcOwOzzYheuM1rhDu8FSj2l0aoMygEuXuA==",
             "dev": true,
             "requires": {
-                "regenerator-runtime": "^0.13.10"
+                "regenerator-runtime": "^0.13.11"
             }
         },
         "@babel/template": {
             }
         },
         "@babel/traverse": {
-            "version": "7.20.1",
-            "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.20.1.tgz",
-            "integrity": "sha512-d3tN8fkVJwFLkHkBN479SOsw4DMZnz8cdbL/gvuDuzy3TS6Nfw80HuQqhw1pITbIruHyh7d1fMA47kWzmcUEGA==",
+            "version": "7.20.5",
+            "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.20.5.tgz",
+            "integrity": "sha512-WM5ZNN3JITQIq9tFZaw1ojLU3WgWdtkxnhM1AegMS+PvHjkM5IXjmYEGY7yukz5XS4sJyEf2VzWjI8uAavhxBQ==",
             "dev": true,
             "requires": {
                 "@babel/code-frame": "^7.18.6",
-                "@babel/generator": "^7.20.1",
+                "@babel/generator": "^7.20.5",
                 "@babel/helper-environment-visitor": "^7.18.9",
                 "@babel/helper-function-name": "^7.19.0",
                 "@babel/helper-hoist-variables": "^7.18.6",
                 "@babel/helper-split-export-declaration": "^7.18.6",
-                "@babel/parser": "^7.20.1",
-                "@babel/types": "^7.20.0",
+                "@babel/parser": "^7.20.5",
+                "@babel/types": "^7.20.5",
                 "debug": "^4.1.0",
                 "globals": "^11.1.0"
             },
             }
         },
         "@babel/types": {
-            "version": "7.20.2",
-            "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.20.2.tgz",
-            "integrity": "sha512-FnnvsNWgZCr232sqtXggapvlkk/tuwR/qhGzcmxI0GXLCjmPYQPzio2FbdlWuY6y1sHFfQKk+rRbUZ9VStQMog==",
+            "version": "7.20.5",
+            "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.20.5.tgz",
+            "integrity": "sha512-c9fst/h2/dcF7H+MJKZ2T0KjEQ8hY/BNnDk/H3XY8C4Aw/eWQXWn/lWntHF9ooUBnGmEvbfGrTgLWc+um0YDUg==",
             "dev": true,
             "requires": {
                 "@babel/helper-string-parser": "^7.19.4",
             "dev": true
         },
         "@types/node": {
-            "version": "18.11.9",
-            "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.9.tgz",
-            "integrity": "sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg==",
+            "version": "18.11.14",
+            "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.14.tgz",
+            "integrity": "sha512-0KXV57tENYmmJMl+FekeW9V3O/rlcqGQQJ/hNh9r8pKIj304pskWuEd8fCyNT86g/TpO0gcOTiLzsHLEURFMIQ==",
             "devOptional": true
         },
         "@types/normalize-package-data": {
             }
         },
         "ace-builds": {
-            "version": "1.13.1",
-            "resolved": "https://registry.npmjs.org/ace-builds/-/ace-builds-1.13.1.tgz",
-            "integrity": "sha512-HvkZv/AhDRSA4k5Co5Dg8dWOTfID0AQ7Sa5cU6V82fz/XfCA0A/icC3sdBoh9yg0WQoJqbFrRYc+ogr/971Vww=="
+            "version": "1.14.0",
+            "resolved": "https://registry.npmjs.org/ace-builds/-/ace-builds-1.14.0.tgz",
+            "integrity": "sha512-3q8LvawomApRCt4cC0OzxVjDsZ609lDbm8l0Xl9uqG06dKEq4RT0YXLUyk7J2SxmqIp5YXzZNw767Dr8GKUruw=="
         },
         "acorn": {
             "version": "6.4.2",
             "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==",
             "dev": true
         },
+        "bindings": {
+            "version": "1.5.0",
+            "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
+            "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
+            "dev": true,
+            "optional": true,
+            "requires": {
+                "file-uri-to-path": "1.0.0"
+            }
+        },
         "bl": {
             "version": "4.1.0",
             "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz",
             }
         },
         "caniuse-lite": {
-            "version": "1.0.30001434",
-            "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001434.tgz",
-            "integrity": "sha512-aOBHrLmTQw//WFa2rcF1If9fa3ypkC1wzqqiKHgfdrXTWcU8C4gKVZT77eQAPWN1APys3+uQ0Df07rKauXGEYA==",
+            "version": "1.0.30001439",
+            "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001439.tgz",
+            "integrity": "sha512-1MgUzEkoMO6gKfXflStpYgZDlFM7M/ck/bgfVCACO5vnAf0fXoNVHdWtqGU+MYca+4bL9Z5bpOVmR33cWW9G2A==",
             "dev": true
         },
         "chalk": {
                 "randomfill": "^1.0.3"
             }
         },
+        "crypto-js": {
+            "version": "4.1.1",
+            "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.1.1.tgz",
+            "integrity": "sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw=="
+        },
         "css": {
             "version": "2.2.4",
             "resolved": "https://registry.npmjs.org/css/-/css-2.2.4.tgz",
             }
         },
         "decode-uri-component": {
-            "version": "0.2.0",
-            "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz",
-            "integrity": "sha512-hjf+xovcEn31w/EUYdTXQh/8smFL/dzYjohQGEIgjyNavaJfBY2p5F527Bo1VPATxv0VYTUC2bOcXvqFwk78Og==",
+            "version": "0.2.2",
+            "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz",
+            "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==",
             "dev": true
         },
         "deep-equal": {
             }
         },
         "es-abstract": {
-            "version": "1.20.4",
-            "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.20.4.tgz",
-            "integrity": "sha512-0UtvRN79eMe2L+UNEF1BwRe364sj/DXhQ/k5FmivgoSdpM90b8Jc0mDzKMGo7QS0BVbOP/bTwBKNnDc9rNzaPA==",
+            "version": "1.20.5",
+            "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.20.5.tgz",
+            "integrity": "sha512-7h8MM2EQhsCA7pU/Nv78qOXFpD8Rhqd12gYiSJVkrH9+e8VuA8JlPJK/hQjjlLv6pJvx/z1iRFKzYb0XT/RuAQ==",
             "dev": true,
             "requires": {
                 "call-bind": "^1.0.2",
                 "function.prototype.name": "^1.1.5",
                 "get-intrinsic": "^1.1.3",
                 "get-symbol-description": "^1.0.0",
+                "gopd": "^1.0.1",
                 "has": "^1.0.3",
                 "has-property-descriptors": "^1.0.0",
                 "has-symbols": "^1.0.3",
                 "object.assign": "^4.1.4",
                 "regexp.prototype.flags": "^1.4.3",
                 "safe-regex-test": "^1.0.0",
-                "string.prototype.trimend": "^1.0.5",
-                "string.prototype.trimstart": "^1.0.5",
+                "string.prototype.trimend": "^1.0.6",
+                "string.prototype.trimstart": "^1.0.6",
                 "unbox-primitive": "^1.0.2"
             }
         },
             "dev": true
         },
         "fastq": {
-            "version": "1.13.0",
-            "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz",
-            "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==",
+            "version": "1.14.0",
+            "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.14.0.tgz",
+            "integrity": "sha512-eR2D+V9/ExcbF9ls441yIuN6TI2ED1Y2ZcA5BmMtJsOkWOFRJQ0Jt0g1UwqXJJVAb+V+umH5Dfr8oh4EVP7VVg==",
             "dev": true,
             "requires": {
                 "reusify": "^1.0.4"
             "integrity": "sha512-uzk64HRpUZyTGZtVuvrjP0FYxzQrBf4rojot6J65YMEbwBLB0CWm0CLojVpwpmFmxcE/lkvYICgfcGozbBq6rw==",
             "dev": true
         },
+        "file-uri-to-path": {
+            "version": "1.0.0",
+            "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
+            "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==",
+            "dev": true,
+            "optional": true
+        },
         "fill-range": {
             "version": "4.0.0",
             "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
             "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
             "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw=="
         },
+        "fsevents": {
+            "version": "1.2.13",
+            "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz",
+            "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==",
+            "dev": true,
+            "optional": true,
+            "requires": {
+                "bindings": "^1.5.0",
+                "nan": "^2.12.1"
+            }
+        },
         "function-bind": {
             "version": "1.1.1",
             "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
                 }
             }
         },
+        "gopd": {
+            "version": "1.0.1",
+            "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz",
+            "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==",
+            "dev": true,
+            "requires": {
+                "get-intrinsic": "^1.1.3"
+            }
+        },
         "graceful-fs": {
             "version": "4.2.10",
             "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz",
             }
         },
         "jquery": {
-            "version": "3.6.1",
-            "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.1.tgz",
-            "integrity": "sha512-opJeO4nCucVnsjiXOE+/PcCgYw9Gwpvs/a6B1LL/lQhwWwpbVEVYDZ1FokFr8PRc7ghYlrFPuyHuiiDNTQxmcw=="
+            "version": "3.6.2",
+            "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.2.tgz",
+            "integrity": "sha512-/e7ulNIEEYk1Z/l4X0vpxGt+B/dNsV8ghOPAWZaJs8pkGvsSC0tm33aMGylXcj/U7y4IcvwtMXPMyBFZn/gK9A=="
         },
         "jquery-contextmenu": {
             "version": "2.9.2",
             }
         },
         "minipass": {
-            "version": "3.3.4",
-            "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.4.tgz",
-            "integrity": "sha512-I9WPbWHCGu8W+6k1ZiGpPu0GkoKBeorkfKNuAFBNS1HNFJvke82sxvI5bzcCNpWPorkOO5QQ+zomzzwRxejXiw==",
+            "version": "3.3.6",
+            "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",
+            "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",
             "dev": true,
             "requires": {
                 "yallist": "^4.0.0"
             "integrity": "sha512-cnAsSVxIDsYt0v7HmC0hWZFwwXSh+E6PgCrREDuN/EsjgLwA5XRmlMHhSiDPrt6HxY1gTivEa/Zh7GtODoLevQ==",
             "dev": true
         },
+        "nan": {
+            "version": "2.17.0",
+            "resolved": "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz",
+            "integrity": "sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==",
+            "dev": true,
+            "optional": true
+        },
         "nanomatch": {
             "version": "1.2.13",
             "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz",
             }
         },
         "node-releases": {
-            "version": "2.0.6",
-            "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz",
-            "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==",
+            "version": "2.0.7",
+            "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.7.tgz",
+            "integrity": "sha512-EJ3rzxL9pTWPjk5arA0s0dgXpnyiAbJDE6wHT62g7VsgrgQgmmZ+Ru++M1BFofncWja+Pnn3rEr3fieRySAdKQ==",
             "dev": true
         },
         "normalize-package-data": {
             "dev": true
         },
         "prettier": {
-            "version": "2.8.0",
-            "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.0.tgz",
-            "integrity": "sha512-9Lmg8hTFZKG0Asr/kW9Bp8tJjRVluO8EJQVfY2T7FMw9T5jy4I/Uvx0Rca/XWf50QQ1/SS48+6IJWnrb+2yemA==",
+            "version": "2.8.1",
+            "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.1.tgz",
+            "integrity": "sha512-lqGoSJBQNJidqCHE80vqZJHWHRFoNYsSpP9AjFhlhi9ODCJA541svILes/+/1GM3VaL/abZi7cpFzOpdR9UPKg==",
             "dev": true,
             "optional": true
         },
             "dev": true
         },
         "resolve-url-loader": {
-            "version": "3.1.4",
-            "resolved": "https://registry.npmjs.org/resolve-url-loader/-/resolve-url-loader-3.1.4.tgz",
-            "integrity": "sha512-D3sQ04o0eeQEySLrcz4DsX3saHfsr8/N6tfhblxgZKXxMT2Louargg12oGNfoTRLV09GXhVUe5/qgA5vdgNigg==",
+            "version": "3.1.5",
+            "resolved": "https://registry.npmjs.org/resolve-url-loader/-/resolve-url-loader-3.1.5.tgz",
+            "integrity": "sha512-mgFMCmrV/tA4738EsFmPFE5/MaqSgUMe8LK971kVEKA/RrNVb7+VqFsg/qmKyythf34eyq476qIobP/gfFBGSQ==",
             "dev": true,
             "requires": {
                 "adjust-sourcemap-loader": "3.0.0",
                 "compose-function": "3.0.3",
                 "convert-source-map": "1.7.0",
                 "es6-iterator": "2.0.3",
-                "loader-utils": "1.2.3",
+                "loader-utils": "^1.2.3",
                 "postcss": "7.0.36",
                 "rework": "1.0.1",
                 "rework-visit": "1.0.0",
                         "safe-buffer": "~5.1.1"
                     }
                 },
-                "emojis-list": {
-                    "version": "2.1.0",
-                    "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz",
-                    "integrity": "sha512-knHEZMgs8BB+MInokmNTg/OyPlAddghe1YBgNwJBc5zsJi/uyIcXoSDsL/W9ymOsBoBGdPIHXYJ9+qKFwRwDng==",
-                    "dev": true
-                },
                 "json5": {
                     "version": "1.0.1",
                     "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz",
                     }
                 },
                 "loader-utils": {
-                    "version": "1.2.3",
-                    "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz",
-                    "integrity": "sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==",
+                    "version": "1.4.2",
+                    "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.2.tgz",
+                    "integrity": "sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg==",
                     "dev": true,
                     "requires": {
                         "big.js": "^5.2.2",
-                        "emojis-list": "^2.0.0",
+                        "emojis-list": "^3.0.0",
                         "json5": "^1.0.1"
                     }
                 },
             "dev": true
         },
         "sass": {
-            "version": "1.56.1",
-            "resolved": "https://registry.npmjs.org/sass/-/sass-1.56.1.tgz",
-            "integrity": "sha512-VpEyKpyBPCxE7qGDtOcdJ6fFbcpOM+Emu7uZLxVrkX8KVU/Dp5UF7WLvzqRuUhB6mqqQt1xffLoG+AndxTZrCQ==",
+            "version": "1.56.2",
+            "resolved": "https://registry.npmjs.org/sass/-/sass-1.56.2.tgz",
+            "integrity": "sha512-ciEJhnyCRwzlBCB+h5cCPM6ie/6f8HrhZMQOf5vlU60Y1bI1rx5Zb0vlDZvaycHsg/MqFfF1Eq2eokAa32iw8w==",
             "dev": true,
             "requires": {
                 "chokidar": ">=3.0.0 <4.0.0",
                         "to-regex-range": "^5.0.1"
                     }
                 },
+                "fsevents": {
+                    "version": "2.3.2",
+                    "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
+                    "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
+                    "dev": true,
+                    "optional": true
+                },
                 "glob-parent": {
                     "version": "5.1.2",
                     "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
                         "to-regex-range": "^5.0.1"
                     }
                 },
+                "fsevents": {
+                    "version": "2.3.2",
+                    "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
+                    "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
+                    "dev": true,
+                    "optional": true
+                },
                 "glob-parent": {
                     "version": "5.1.2",
                     "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
                         "to-regex-range": "^5.0.1"
                     }
                 },
+                "fsevents": {
+                    "version": "2.3.2",
+                    "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
+                    "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
+                    "dev": true,
+                    "optional": true,
+                    "peer": true
+                },
                 "glob-parent": {
                     "version": "5.1.2",
                     "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
                     }
                 },
                 "ignore": {
-                    "version": "5.2.0",
-                    "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz",
-                    "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==",
+                    "version": "5.2.1",
+                    "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.1.tgz",
+                    "integrity": "sha512-d2qQLzTJ9WxQftPAuEQpSPmKqzxePjzVbpAVv62AQ64NTL+wR4JkrVqR/LqFsFEUsHDAiId52mJteHDFuDkElA==",
                     "dev": true
                 },
                 "is-binary-path": {
index 12597d54d20ffc658432a2d38631d8ae20bef97c..8bc754b0677364ce3cdbaac69634e58b91419dab 100644 (file)
@@ -46,6 +46,7 @@
         "ace-builds": "^1.12.5",
         "codemirror": "^5",
         "command-line-args": "^5.2.1",
+        "crypto-js": "^4.1.1",
         "jquery-contextmenu": "^2.9.2",
         "jquery-form": "^4.3.0",
         "jquery.scrollto": "^2.1.3",
index 463d337abb48c61642726bfb827d941ff9b4ad6c..85521524e82794f5cf9bd9cf5907a123de6b2f01 100644 (file)
@@ -44,6 +44,12 @@ LinkeditorForm.prototype = {
                 tf.val(data[0]);
                 tf.trigger('change');
                 $(parent).removeClass('loading');
+                setTimeout(function () {
+                    $this.linkeditor.save.saveIfUnsavedChanges(TRANSLATIONS.upload_save_message, false, function () {
+
+                    });
+                }, 500);
+
             });
         });
 
@@ -195,20 +201,20 @@ LinkeditorForm.prototype = {
 
     initSpectrum: function () {
         $("#linkeditor-panel-form .spectrum:not(.init)").each(function () {
-            var t=$(this);
+            var t = $(this);
             $(this).spectrum({
                 preferredFormat: 'hex3',
                 showAlpha: true,
                 allowEmpty: false,
                 showInput: true,
                 showInitial: true,
-                showButtons:false,
+                showButtons: false,
                 flat: true,
-                move:function(color){
+                move: function (color) {
                     t.val(color.toString());
                     $(t).trigger('change');
                 },
-                dragend:function(color){
+                dragend: function (color) {
                     t.val(color.toString());
                     $(t).trigger('change');
                 }
index ff87fb93a4230b8af1249ca75c0891ef6a51a928..968f052d3d34790693ebca4abe8b5fe075162582 100644 (file)
@@ -45,6 +45,8 @@ require('select2');
 import 'select2/dist/css/select2.css';
 import 'select2-bootstrap-theme/dist/select2-bootstrap.css';
 
+window.MD5 = require("crypto-js/md5");
+
 $.ajaxSetup({
     headers: {
         'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
@@ -67,11 +69,14 @@ function LinkEditor() {
     this.canvasRect = null;
     this.editorRect = null;
     this.currentPage = -1;
+    this.currentNumericPage = 1;
+    this.maskHashEvent = false;
 
     this.rightClick = false;
 
     this.dimensionProperties = ['left', 'top', 'width', 'height'];
 
+
     this.init();
 }
 
@@ -79,12 +84,12 @@ LinkEditor.prototype = {
     init: function () {
         var $this = this;
 
+        this.utils = new LinkeditorUtils(this);
         this.toolbar = new LinkeditorToolbar(this);
         this.resize = new LinkeditorResize(this);
         this.rulers = new LinkeditorRulers(this);
         this.zoom = new LinkeditorZoom(this);
         this.links = new LinkeditorLinks(this);
-        this.utils = new LinkeditorUtils(this);
         this.loader = new LinkeditorLoader(this);
         this.save = new LinkeditorSave(this);
         this.panels = new LinkeditorPanels(this);
@@ -131,6 +136,9 @@ LinkEditor.prototype = {
         });
 
         $(window).on('hashchange', function () {
+            if ($this.maskHashEvent) {
+                return;
+            }
             $this.changePage();
         });
 
@@ -216,24 +224,8 @@ LinkEditor.prototype = {
             $this.links.mouseUp();
         });
 
-        if (this.single) {
-            $("#linkeditor").addClass('single');
-        } else {
-            $("#linkeditor").addClass('double');
-        }
-
-        $('.linkeditor-page').css({
-            width: this.pw, height: this.ph
-        });
-
-        $("#linkeditor-page-right").css({left: this.pw})
-        $('#linkeditor-fluidbook').css({
-            width: this.fw, height: this.ph
-        });
-
         this.links.initEvents();
 
-
         this.resize.resize();
         this.changePage();
     },
@@ -262,11 +254,11 @@ LinkEditor.prototype = {
     },
 
     nextPage: function () {
-        this.changePage(this.currentPage + (this.single ? 1 : 2));
+        this.changePage(this.currentNumericPage + (this.single ? 1 : 2));
     },
 
     previousPage: function () {
-        this.changePage(this.currentPage - (this.single ? 1 : 2));
+        this.changePage(this.currentNumericPage - (this.single ? 1 : 2));
     },
 
     lastPage: function () {
@@ -359,6 +351,14 @@ LinkEditor.prototype = {
     },
 
     changePage: function (page) {
+        var $this = this;
+        this.maskHashEvent = true;
+        setTimeout(function () {
+            $this.maskHashEvent = false;
+        }, 500);
+        var formerPage = this.currentPage;
+        var wasSpecialPage = this.utils.isSpecialPage(formerPage);
+
         if (page === undefined) {
             let h = window.location.hash;
             if (h.length === 0) {
@@ -367,7 +367,27 @@ LinkEditor.prototype = {
                 page = window.location.hash.substring(1);
             }
         }
+
         let normPage = this.utils.normalizePage(page);
+        let isSpecial = this.utils.isSpecialPage(normPage);
+
+        // Consider than clicking the special page act as a toggle
+        if (normPage === this.currentPage && isSpecial) {
+            normPage = this.currentNumericPage;
+            isSpecial = false;
+        }
+
+        // Keep the value of the numeric page to be able to use arrows to change page even from a special page
+        if (!isSpecial) {
+            this.currentNumericPage = normPage;
+        }
+
+        // Set icon of special page active
+        $("[data-special]").removeClass('active');
+        if (isSpecial) {
+            $("[data-special=" + normPage + "]").addClass('active');
+        }
+
         if (normPage === this.currentPage) {
             return;
         }
@@ -379,9 +399,9 @@ LinkEditor.prototype = {
         if (!this.single) {
             this.loader.loadPage(this.currentPage + 1, 'right');
         }
-        $("#linkeditor-page-field input").val(this.currentPage);
+        $("#linkeditor-page-field input").val(this.currentNumericPage);
         this.resize.resize();
-        if (this.mobileFirst) {
+        if (this.mobileFirst || isSpecial || wasSpecialPage) {
             this.zoom.reset();
         }
         this.loader.preloadPages();
@@ -436,6 +456,20 @@ LinkEditor.prototype = {
         this.rulers.clear();
         this.links.clear();
     },
+
+    notification: function (text, type, timeout) {
+        if (timeout === undefined) {
+            timeout = 5000;
+        }
+        if (type === undefined) {
+            type = 'success';
+        }
+        new Noty({
+            type: type,
+            text: text,
+            timeout: timeout,
+        }).show();
+    }
 }
 
 
index 9144f6477deff6f9b5b5563d2266b038598b5ab6..2fae748fed59d7b79391dab06ba403c027b0d9cc 100644 (file)
@@ -85,6 +85,10 @@ LinkeditorLinks.prototype = {
         key('pagedown', function () {
             $this.selectNextLink();
         });
+        key('ctrl+l', function () {
+            $this.openImageLink();
+            return false;
+        });
         key('enter', function () {
             if ($(document.activeElement).is('input[name="to"]')) {
                 $this.selectNextLink();
@@ -128,7 +132,7 @@ LinkeditorLinks.prototype = {
                         "image_link": {
                             isHtmlName: true,
                             name: TRANSLATIONS.edit_image_link + ' <kbd>Ctrl+L</kbd>', callback: function () {
-                                $this.linkeditor.changePage(selection.attr('fb-uid'));
+                                $this.openImageLink();
                             }
                         },
                     });
@@ -154,7 +158,16 @@ LinkeditorLinks.prototype = {
         }, 250);
     },
 
-    selectLinkAndSelectToField(link) {
+    openImageLink: function () {
+        let selection = $(".link[fb-type=6].selected");
+        if (selection.length !== 1 || selection.attr('fb-alternative') == '') {
+            this.linkeditor.notification(TRANSLATIONS.error_open_image_link, 'warning');
+            return;
+        }
+        this.linkeditor.changePage('link_' + MD5(selection.attr('fb-alternative')).toString());
+    },
+
+    selectLinkAndSelectToField: function (link) {
         if ($(link).length === 0) {
             return;
         }
index 6b9f4976cacccf9cd320ebe0b7bdd8b1a2040d8b..7f5627e7e7a977920d7bd4c48aa5c6f931128c0e 100644 (file)
@@ -13,8 +13,12 @@ LinkeditorLoader.prototype = {
     loadPage: function (p, side) {
         var container = $("#linkeditor-page-" + side);
         $(container).attr('data-page', p);
-        if (this.linkeditor.mobileFirst) {
-            let h = FLUIDBOOK_DATA.page_dimensions[p][1];
+        if (this.linkeditor.utils.isSpecialPage(p)) {
+            var dim = this.linkeditor.utils.getPageDimensions(p);
+            $("#linkeditor-fluidbook").css({width: dim[0], height: dim[1]});
+            $(container).css({width: dim[0], height: dim[1]});
+        } else if (this.linkeditor.mobileFirst) {
+            let h = this.linkeditor.utils.getPageDimensions(p)[1];
             $("#linkeditor-fluidbook").css('height', h);
             $(container).css('height', h);
         }
@@ -29,7 +33,6 @@ LinkeditorLoader.prototype = {
         this.linkeditor.rulers.loadRulers(p, side);
     },
 
-
     preloadPages: function () {
         let j = 1;
         var $this = this;
@@ -49,13 +52,17 @@ LinkeditorLoader.prototype = {
     _loadPage: function (p, container) {
         var imageFormat = FLUIDBOOK_DATA.settings.imageFormat;
         var c = '<div class="contents">';
-        if (this.rasterizePages.indexOf(p) >= 0) {
-            c += '<img draggable="false" src="raster_' + p + '.' + imageFormat + '" />';
-        } else if (this.vectorPages.indexOf(p) >= 0) {
-            c += '<img draggable="false" src="vector_' + p + '.svg" />';
+        if (this.linkeditor.utils.isSpecialPage(p)) {
+            c += '<img draggable="false" class="images" src="' + this.linkeditor.utils.getSpecialPageAssetURL(p) + '" />';
         } else {
-            c += '<img draggable="false" class="images" src="images_' + p + '.' + imageFormat + '" />';
-            c += '<img draggable="false" class="texts" src="texts_' + p + '.svg" />';
+            if (this.rasterizePages.indexOf(p) >= 0) {
+                c += '<img draggable="false" src="raster_' + p + '.' + imageFormat + '" />';
+            } else if (this.vectorPages.indexOf(p) >= 0) {
+                c += '<img draggable="false" src="vector_' + p + '.svg" />';
+            } else {
+                c += '<img draggable="false" class="images" src="images_' + p + '.' + imageFormat + '" />';
+                c += '<img draggable="false" class="texts" src="texts_' + p + '.svg" />';
+            }
         }
         c += '</div>';
         $(container).html(c);
index ea21c457a6599e7a67d5718b45261c79013c4d54..b19b8f7c02037c47d1fbb3c56b3f034f6e631fa9 100644 (file)
@@ -22,6 +22,30 @@ LinkeditorResize.prototype = {
     },
 
     resize: function () {
+
+        let special = this.linkeditor.utils.isSpecialPage();
+        if (this.linkeditor.single || special) {
+            $("#linkeditor").addClass('single');
+        } else {
+            $("#linkeditor").addClass('double');
+        }
+
+        if (special) {
+            var dim = this.linkeditor.utils.getPageDimensions();
+            $('.linkeditor-page,#linkeditor-fluidbook').css({
+                width: dim[0], height: dim[1]
+            });
+        } else {
+            $('.linkeditor-page').css({
+                width: this.linkeditor.pw, height: this.linkeditor.ph
+            });
+
+            $("#linkeditor-page-right").css({left: this.linkeditor.pw})
+            $('#linkeditor-fluidbook').css({
+                width: this.linkeditor.fw, height: this.linkeditor.ph
+            });
+        }
+
         this.updateWindowDimensions();
         this.resizeMain();
         this.resizeCanvas();
@@ -44,7 +68,10 @@ LinkeditorResize.prototype = {
         var aw = this.linkeditor.canvasRect.width - 30;
         var ah = this.linkeditor.canvasRect.height - 30;
 
-        if (this.linkeditor.mobileFirst) {
+        if (this.linkeditor.utils.isSpecialPage()) {
+            let dim = this.linkeditor.utils.getPageDimensions();
+            this.linkeditor.fs = Math.min(1, aw / dim[0], ah / dim[1]);
+        } else if (this.linkeditor.mobileFirst) {
             this.linkeditor.fs = 620 / this.linkeditor.fw;
         } else {
             this.linkeditor.fs = Math.min(aw / this.linkeditor.fw, ah / this.linkeditor.fh);
@@ -52,7 +79,11 @@ LinkeditorResize.prototype = {
 
         let left, top;
 
-        if (!this.linkeditor.mobileFirst) {
+        if (this.linkeditor.utils.isSpecialPage()) {
+            let dim = this.linkeditor.utils.getPageDimensions();
+            left = (this.linkeditor.canvasRect.width - (dim[0] * this.linkeditor.fs)) / 2;
+            top = (this.linkeditor.canvasRect.height - (dim[1] * this.linkeditor.fs)) / 2;
+        } else if (!this.linkeditor.mobileFirst) {
             left = ((this.linkeditor.canvasRect.width * 2) - this.linkeditor.fw * this.linkeditor.fs) / 2;
             top = ((this.linkeditor.canvasRect.height * 2) - this.linkeditor.fh * this.linkeditor.fs) / 2;
         } else {
index 7de9c39ec090d16b3bd3b734f5dea4b1d6f42c60..c17759656a014d735ce3a30e121ad0791daaeafb 100644 (file)
@@ -55,7 +55,7 @@ LinkeditorSave.prototype = {
         if (message === undefined) {
             message = TRANSLATIONS.manual_save_message;
         }
-        var notificationTimeout = 5000;
+
         $.ajax({
             url: '/fluidbook-publication/' + FLUIDBOOK_DATA.id + '/save/links', method: 'post', data: {
                 _method: 'put',
@@ -65,26 +65,19 @@ LinkeditorSave.prototype = {
             },
             success: function (data) {
                 if (notify) {
-                    new Noty({
-                        type: "success",
-                        text: TRANSLATIONS.success_save,
-                        timeout: notificationTimeout,
-                    }).show();
+                    $this.linkeditor.notification(TRANSLATIONS.success_save);
                 }
                 clearTimeout($this.automaticSaveTimeout);
                 $this.unsavedChanges = false;
                 $this.runningAutomaticSaveTimeout = false;
 
-                $this.linkeditor.versions.refresh();
+                window.ASSETS = data.assets;
+                $this.linkeditor.versions.setVersions(data.versions);
                 callback();
             },
             error: function (jqXHR, status, error) {
                 $this.linkeditor.hasChanged();
-                new Noty({
-                    type: "error",
-                    text: TRANSLATIONS.error_save + ' : ' + error,
-                    timeout: notificationTimeout,
-                }).show();
+                $this.linkeditor.notification(TRANSLATIONS.error_save + ' : ' + error, 'error');
             },
         });
     },
index 24fcc311e8898b6414d432680e4cbfcc5e134a3c..d4324f29836990bf72bef8d07ff46af9e7068075 100644 (file)
@@ -12,7 +12,43 @@ LinkeditorUtils.prototype = {
 
     },
 
+    isSpecialPage: function (page) {
+        if (page === undefined) {
+            page = this.linkeditor.currentPage;
+        }
+        return page.toString().indexOf('link_') === 0 || page === 'aftersearch' || page === 'background';
+    },
+
+    getSpecialPageAssetURL(page) {
+        if (page.toString().indexOf('link_') === 0) {
+            return ASSETS[this.getLinkImageId(page)]['url'];
+        } else {
+            return THEME[page]['url'];
+        }
+    },
+
+    getLinkImageId(page) {
+        return page.toString().substring(5);
+    },
+
+    getPageDimensions(page) {
+        if (page === undefined) {
+            page = this.linkeditor.currentPage;
+        }
+        if (this.isSpecialPage(page)) {
+            if (page.toString().indexOf('link_') === 0) {
+                return ASSETS[this.getLinkImageId(page)]['dim'];
+            } else {
+                return THEME[page]['dim'];
+            }
+        }
+        return FLUIDBOOK_DATA.page_dimensions[page];
+    },
+
     normalizePage: function (page) {
+        if (this.isSpecialPage(page)) {
+            return page;
+        }
         page = parseInt(page);
         if (page % 2 === 1 && !this.linkeditor.single) {
             page--;
index d9579838b754f1d8b5d718a4514e9cdd45cb2329..e93c47522a5349571e62fce8ee29c617a88a7fb3 100644 (file)
@@ -87,10 +87,12 @@ LinkeditorZoom.prototype = {
         this.zoom = z;
 
         let cw2, ch2, zh;
-        if (this.linkeditor.mobileFirst) {
+        if (this.linkeditor.utils.isSpecialPage()) {
+            cw2 = this.linkeditor.canvasRect.width;
+            zh = this.linkeditor.canvasRect.height;
+        } else if (this.linkeditor.mobileFirst) {
             cw2 = this.linkeditor.canvasRect.width;
             zh = (this.linkeditor.getCurrentPageHeight() * this.linkeditor.fs) + 150;
-            console.log(zh);
         } else {
             cw2 = this.linkeditor.canvasRect.width * 2;
             ch2 = this.linkeditor.canvasRect.height * 2;
@@ -116,7 +118,6 @@ LinkeditorZoom.prototype = {
                 $this.resetZoomDrag();
             }
             $this.linkeditor.rulers.updateRulers();
-
         }, 10);
         return true;
     },
index 539ea1eec50bfbf9199e7b511e5acca2902b9d39..df7b4a89284da6be34f03cb44fa69f9b90accbf6 100644 (file)
@@ -94,7 +94,7 @@
         @include dark-theme
             color: $toolbar-color-dark
 
-        &:hover, &.hover
+        &:hover, &.hover, &.active
             background-color: #fff
             @include dark-theme
                 background-color: #000
index dc67a0c3416d423084a1326c07f2207875632c10..10d2e0a731ce48c9dbdea11b954d8ca7d29d744f 100644 (file)
         $mh = max($mh,$fbdata['page_dimensions'][$i][1]);
     }
     $fbdata['pages_max_height']=$mh;
+    $theme=\App\Models\FluidbookTheme::find($fluidbook->theme);
+    /** @var \Cubist\Backpack\Magic\PageData $themeData */
+    $themeData=$theme->getPageData();
+    $t=$themeData->getRawData();
+
+    $extraFiles=['background'=>'backgroundImage','aftersearch'=>'afterSearch'];
+    $hasExtra=false;
+    foreach ($extraFiles as $name=>$field) {
+        $file=$themeData->getImageFile($t[$field]);
+        if(null===$file){
+            $t[$name]=null;
+            continue;
+        }
+        $t[$name]=['path'=>$file,'url'=>$themeData->getImageURL($t[$field]),'dim'=>Cubist\Util\Graphics\Image::getimagesize($file)];
+        $hasExtra=true;
+    }
 
     $translations=[
         'success_save'=>__('Liens sauvegardés'),
         'warning_unsaved_changes'=>__('Des données n\'ont pas été sauvegardées'),
         'before_export_save_message'=>__("Sauvegarde avant export"),
         'before_restore_message'=>__("Sauvegarde avant la restauration des liens"),
+        'upload_save_message'=>__("Après l'upload d'un fichier"),
         'restore_version_tooltip'=>__('Restaurer cette version'),
         'export_version_tooltip'=>__('Exporter les liens au format xlsx'),
         'delete_link'=>__('Supprimer le lien'),
         'edit_image_link'=>__('Editer les liens de l\'image'),
         'delete_selection'=>__('Supprimer la sélection'),
         'select_all'=>__('Tout sélectionner'),
+        'error_open_image_link'=>__('Impossible d\'ajouter des liens au contenu de ce lien'),
     ];
 
     $rulers=!count($rulers)?'{}':json_encode($rulers);
@@ -42,6 +60,7 @@
     foreach ($settings as $k=>$v) {
         $settings[$k]=$user->getToolboxSetting('linkeditor_'.$k,$v);
     }
+    $assets=$fluidbook->getLinksAssetsDimensions();
 @endphp
 @extends('layouts.linkeditor')
 
                        data-tooltip="{{__('Aller à la page suivante')}}"></a>
                     <a href="#" data-action="lastPage" data-icon="last-page"
                        data-tooltip="{{__('Aller à la dernière page')}}"></a>
-                    <div class="separator"></div>
-                    <a href="#" data-action="pageBackground" data-icon="landscape"
-                       data-tooltip="{{__('Editer les liens du fond')}}"></a>
-                    <a href="#" data-action="pageAftersearch" data-icon="search"
-                       data-tooltip="{{__('Editer les liens de l\'image supplémentaire du menu')}}"></a>
+                    @if($hasExtra)
+                        <div class="separator"></div>
+                        @if(null!==$t['background'])
+                            <a href="#background" data-action="changePage"
+                               data-action-args="{{json_encode(['background'])}}"
+                               data-icon="landscape"
+                               data-special="background"
+                               data-tooltip="{{__('Editer les liens du fond')}}"></a>
+                        @endif
+                        @if(null!==$t['aftersearch'])
+                            <a href="#aftersearch" data-action="changePage"
+                               data-action-args="{{json_encode(['aftersearch'])}}"
+                               data-icon="search"
+                               data-special="aftersearch"
+                               data-tooltip="{{__('Editer les liens de l\'image supplémentaire du menu')}}"></a>
+                        @endif
+                    @endif
                 </nav>
                 <nav id="linkeditor-toolbar-right">
 
         var LINKS = {!! $links !!};
         var RULERS = {!! $rulers !!};
         var SETTINGS = @json($settings);
+        var THEME = @json($t);
+        var ASSETS = @json($assets);
     </script>
     <script
         src="/packages/linkeditor/js/linkeditor.js?v={{filemtime(public_path('packages/linkeditor/js/linkeditor.js'))}}"></script>