Version Description
(released: 24 Nov 2021) * Bugfix: On some systems, the converter test run that is done when showing the settings page could result in an uncatched error.
Download this release
Release Info
Developer | rosell.dk |
Plugin | WebP Express |
Version | 0.24.1 |
Comparing to | |
See all releases |
Code changes from version 0.23.0 to 0.24.1
- README.txt +18 -2
- changelog.txt +10 -0
- composer.json +3 -2
- docs/development.md +28 -17
- docs/publishing.md +3 -3
- lib/classes/AlterHtmlHelper.php +1 -1
- lib/classes/ConvertHelperIndependent.php +7 -6
- lib/classes/ConvertersHelper.php +35 -0
- lib/classes/TestRun.php +2 -1
- lib/classes/WCFMApi.php +180 -9
- lib/classes/WCFMPage.php +4 -4
- lib/wcfm/index.0c25b0fb.css +1 -0
- lib/wcfm/index.659b742a.css +0 -1
- lib/wcfm/index.be5d792e.js +23 -0
- lib/wcfm/index.ee44cdbf.js +0 -29
- lib/wcfm/{vendor.b4e4e155.js → vendor.fa68d508.js} +2 -2
- lib/wcfm/wcfm-options.js +19 -8
- vendor/composer/installed.json +15 -15
- vendor/composer/installed.php +8 -8
- vendor/rosell-dk/image-mime-type-guesser/README.md +32 -38
- vendor/rosell-dk/image-mime-type-guesser/src/Detectors/GetImageSize.php +1 -1
- vendor/rosell-dk/image-mime-type-guesser/src/Detectors/MimeContentType.php +0 -1
- vendor/rosell-dk/image-mime-type-guesser/src/Detectors/SniffFirstFourBytes.php +111 -15
- vendor/rosell-dk/image-mime-type-guesser/src/GuessFromExtension.php +3 -3
- vendor/rosell-dk/webp-convert/README.md +8 -2
- vendor/rosell-dk/webp-convert/composer.json +1 -1
- vendor/rosell-dk/webp-convert/docs/development.md +79 -0
- vendor/rosell-dk/webp-convert/docs/v1.3/converting/convert-options.md +322 -0
- vendor/rosell-dk/webp-convert/docs/v1.3/converting/convert.md +96 -0
- vendor/rosell-dk/webp-convert/docs/v1.3/converting/converters.md +322 -0
- vendor/rosell-dk/webp-convert/docs/v1.3/serving/convert-and-serve.md +167 -0
- vendor/rosell-dk/webp-convert/docs/v1.3/webp-on-demand/tweaks.md +167 -0
- vendor/rosell-dk/webp-convert/docs/v1.3/webp-on-demand/webp-on-demand.md +133 -0
- vendor/rosell-dk/webp-convert/docs/v1.3/webp-on-demand/without-composer.md +45 -0
- vendor/rosell-dk/webp-convert/docs/v2.0/converting/architecture-q50-w600.jpg +0 -0
- vendor/rosell-dk/webp-convert/docs/v2.0/converting/converters/stack.md +248 -0
- vendor/rosell-dk/webp-convert/docs/v2.0/converting/dice.png +0 -0
- vendor/rosell-dk/webp-convert/docs/v2.0/converting/introduction-for-converting.md +251 -0
- vendor/rosell-dk/webp-convert/docs/v2.0/converting/mouse-q100.jpg +0 -0
- vendor/rosell-dk/webp-convert/docs/v2.0/converting/options.md +402 -0
- vendor/rosell-dk/webp-convert/docs/v2.0/migrating-to-2.0.md +73 -0
- vendor/rosell-dk/webp-convert/docs/v2.0/serving/introduction-for-serving.md +157 -0
- vendor/rosell-dk/webp-convert/docs/v2.0/serving/laravel-nginx-serving.md +116 -0
- vendor/rosell-dk/webp-convert/docs/v2.0/webp-on-demand/tweaks.md +181 -0
- vendor/rosell-dk/webp-convert/docs/v2.0/webp-on-demand/webp-on-demand.md +145 -0
- vendor/rosell-dk/webp-convert/docs/v2.0/webp-on-demand/without-composer.md +58 -0
- vendor/rosell-dk/webp-convert/src/Convert/Converters/AbstractConverter.php +10 -5
- vendor/rosell-dk/webp-convert/src/Convert/Converters/BaseTraits/OptionsTrait.php +110 -152
- vendor/rosell-dk/webp-convert/src/Convert/Converters/ConverterTraits/ExecTrait.php +30 -0
- vendor/rosell-dk/webp-convert/src/Convert/Converters/Cwebp.php +5 -3
- vendor/rosell-dk/webp-convert/src/Convert/Converters/Ewww.php +1 -2
- vendor/rosell-dk/webp-convert/src/Convert/Converters/FFMpeg.php +14 -5
- vendor/rosell-dk/webp-convert/src/Convert/Converters/Gd.php +0 -1
- vendor/rosell-dk/webp-convert/src/Convert/Converters/Gmagick.php +0 -1
- vendor/rosell-dk/webp-convert/src/Convert/Converters/GraphicsMagick.php +14 -3
- vendor/rosell-dk/webp-convert/src/Convert/Converters/ImageMagick.php +2 -2
- vendor/rosell-dk/webp-convert/src/Convert/Converters/Imagick.php +0 -1
- vendor/rosell-dk/webp-convert/src/Convert/Converters/Stack.php +54 -3
- vendor/rosell-dk/webp-convert/src/Convert/Converters/Vips.php +3 -3
- vendor/rosell-dk/webp-convert/src/Convert/Converters/Wpc.php +64 -6
- vendor/rosell-dk/webp-convert/src/Helpers/SanityCheck.txt +255 -0
- vendor/rosell-dk/webp-convert/src/Options/Option.php +10 -0
- vendor/rosell-dk/webp-convert/src/Options/OptionFactory.php +5 -1
- vendor/rosell-dk/webp-convert/src/WebPConvert.php +24 -41
- webp-express.php +1 -1
README.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://ko-fi.com/rosell
|
|
4 |
Tags: webp, images, performance
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 5.8
|
7 |
-
Stable tag: 0.
|
8 |
Requires PHP: 5.6
|
9 |
License: GPLv3
|
10 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
@@ -34,7 +34,7 @@ The plugin implements the "WebP On Demand" solution described [here](https://git
|
|
34 |
- [DOM Util for WebP](https://github.com/rosell-dk/dom-util-for-webp): For the Alter HTML functionality
|
35 |
- [Image MimeType Guesser](https://github.com/rosell-dk/image-mime-type-guesser): For detecting mime types of images.
|
36 |
- [HTAccess Capability Tester](https://github.com/rosell-dk/htaccess-capability-tester): For testing .htaccess capabilities in a given directory, using live tests
|
37 |
-
- [WebP Convert File Manager](https://github.com/rosell-dk/webp-convert-filemanager): For browsing conversions
|
38 |
|
39 |
### Benefits
|
40 |
- Much faster load time for images in browsers that supports webp. The converted images are typically *less than half the size* (for jpeg), while maintaining the same quality. Bear in mind that for most web sites, images are responsible for the largest part of the waiting time.
|
@@ -175,6 +175,7 @@ Bread on the table don't come for free, even though this plugin does, and always
|
|
175 |
* Ruben Solvang
|
176 |
|
177 |
**Persons who recently contributed with [ko-fi](https://ko-fi.com/rosell) - Thanks!**
|
|
|
178 |
* 13 Nov: @sween
|
179 |
* 9 Nov: @utrenkner
|
180 |
* 26 Oct: Anonymous
|
@@ -781,6 +782,18 @@ If you want to make sure that my coffee supplies don't run dry, you can even buy
|
|
781 |
|
782 |
== Changelog ==
|
783 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
784 |
= 0.23.0 =
|
785 |
*(pre-released: 15 Nov 2021)*
|
786 |
* Changed names for preventing replacing image with webp. Use "?dontreplace" / ".dontreplace" instead of "?original" and ".do-not-convert". The old ones are deprecated, but will still work (for a while)
|
@@ -853,6 +866,9 @@ For older releases, check out changelog.txt
|
|
853 |
|
854 |
== Upgrade Notice ==
|
855 |
|
|
|
|
|
|
|
856 |
= 0.23.0 =
|
857 |
* Various improvements and bug fixes
|
858 |
|
4 |
Tags: webp, images, performance
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 5.8
|
7 |
+
Stable tag: 0.24.1
|
8 |
Requires PHP: 5.6
|
9 |
License: GPLv3
|
10 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
34 |
- [DOM Util for WebP](https://github.com/rosell-dk/dom-util-for-webp): For the Alter HTML functionality
|
35 |
- [Image MimeType Guesser](https://github.com/rosell-dk/image-mime-type-guesser): For detecting mime types of images.
|
36 |
- [HTAccess Capability Tester](https://github.com/rosell-dk/htaccess-capability-tester): For testing .htaccess capabilities in a given directory, using live tests
|
37 |
+
- [WebP Convert File Manager](https://github.com/rosell-dk/webp-convert-filemanager): For browsing conversions and triggering conversions.
|
38 |
|
39 |
### Benefits
|
40 |
- Much faster load time for images in browsers that supports webp. The converted images are typically *less than half the size* (for jpeg), while maintaining the same quality. Bear in mind that for most web sites, images are responsible for the largest part of the waiting time.
|
175 |
* Ruben Solvang
|
176 |
|
177 |
**Persons who recently contributed with [ko-fi](https://ko-fi.com/rosell) - Thanks!**
|
178 |
+
* 20 Nov: Ben J
|
179 |
* 13 Nov: @sween
|
180 |
* 9 Nov: @utrenkner
|
181 |
* 26 Oct: Anonymous
|
782 |
|
783 |
== Changelog ==
|
784 |
|
785 |
+
= 0.24.1 =
|
786 |
+
*(released: 24 Nov 2021)*
|
787 |
+
* Bugfix: On some systems, the converter test run that is done when showing the settings page could result in an uncatched error.
|
788 |
+
|
789 |
+
= 0.24.0 =
|
790 |
+
*(pre-released: 20 Nov 2021, not "released", in the sense that stable tag never pointed to this release)*
|
791 |
+
* Improved file manager: You can now tweak conversion settings, delete conversion and see mime type of images.
|
792 |
+
* Conversion logs are made more readable
|
793 |
+
* Bumped webp-convert to 0.24.0
|
794 |
+
|
795 |
+
For more info, see the closed issues on the [webp-express 0.24.0 milestone](https://github.com/rosell-dk/webp-express/milestone/45?closed=1)
|
796 |
+
|
797 |
= 0.23.0 =
|
798 |
*(pre-released: 15 Nov 2021)*
|
799 |
* Changed names for preventing replacing image with webp. Use "?dontreplace" / ".dontreplace" instead of "?original" and ".do-not-convert". The old ones are deprecated, but will still work (for a while)
|
866 |
|
867 |
== Upgrade Notice ==
|
868 |
|
869 |
+
= 0.24.1 =
|
870 |
+
* Improved file manager and fixed rare PHP error displayed on settings page
|
871 |
+
|
872 |
= 0.23.0 =
|
873 |
* Various improvements and bug fixes
|
874 |
|
changelog.txt
CHANGED
@@ -1,3 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
= 0.23.0 =
|
2 |
*(pre-released: 15 Nov 2021, scheduled for release 16 Nov 2021)*
|
3 |
* Changed names for preventing replacing image with webp. Use "?dontreplace" / ".dontreplace" instead of "?original" and ".do-not-convert". The old ones are deprecated, but will still work (for a while)
|
1 |
+
= 0.24.1 =
|
2 |
+
* Bugfix: On some systems, the converter test run that is done when showing the settings page could result in an uncatched error.
|
3 |
+
|
4 |
+
= 0.24.0 =
|
5 |
+
* Improved file manager: You can now tweak conversion settings, delete conversion and see mime type of images.
|
6 |
+
* Conversions logs are made more readable
|
7 |
+
* Bumped webp-convert to 0.24.0
|
8 |
+
|
9 |
+
For more info, see the closed issues on the [webp-express 0.24.0 milestone](https://github.com/rosell-dk/webp-express/milestone/45?closed=1)
|
10 |
+
|
11 |
= 0.23.0 =
|
12 |
*(pre-released: 15 Nov 2021, scheduled for release 16 Nov 2021)*
|
13 |
* Changed names for preventing replacing image with webp. Use "?dontreplace" / ".dontreplace" instead of "?original" and ".do-not-convert". The old ones are deprecated, but will still work (for a while)
|
composer.json
CHANGED
@@ -5,10 +5,11 @@
|
|
5 |
"license": "MIT",
|
6 |
"require": {
|
7 |
"composer/installers": "^1.0.0",
|
8 |
-
"rosell-dk/webp-convert": "^2.
|
9 |
"rosell-dk/webp-convert-cloud-service": "^2.0.0",
|
10 |
"rosell-dk/dom-util-for-webp": "^0.5.0",
|
11 |
-
"rosell-dk/htaccess-capability-tester": "^0.9.0"
|
|
|
12 |
},
|
13 |
"require-dev": {
|
14 |
},
|
5 |
"license": "MIT",
|
6 |
"require": {
|
7 |
"composer/installers": "^1.0.0",
|
8 |
+
"rosell-dk/webp-convert": "^2.8.0",
|
9 |
"rosell-dk/webp-convert-cloud-service": "^2.0.0",
|
10 |
"rosell-dk/dom-util-for-webp": "^0.5.0",
|
11 |
+
"rosell-dk/htaccess-capability-tester": "^0.9.0",
|
12 |
+
"rosell-dk/image-mime-type-guesser": "^0.4.0"
|
13 |
},
|
14 |
"require-dev": {
|
15 |
},
|
docs/development.md
CHANGED
@@ -22,29 +22,31 @@ rmdir vendor/bin
|
|
22 |
|
23 |
|
24 |
## Copying WCFM
|
25 |
-
I created the following script for
|
26 |
```
|
27 |
#!/bin/bash
|
28 |
|
29 |
WCFM_PATH=/home/rosell/github/webp-convert-filemanager
|
30 |
-
WE_PATH=/home/rosell/github/webp-express
|
|
|
31 |
WCFMPage_PATH=/home/rosell/github/webp-express/lib/classes/WCFMPage.php
|
|
|
32 |
|
33 |
copyassets() {
|
34 |
# remove assets in WebP Express
|
35 |
-
rm -f $
|
36 |
-
rm -f $
|
37 |
-
rm -f $
|
38 |
|
39 |
# copy assets from WCFM
|
40 |
-
cp $WCFM_PATH/dist/assets/index*.css $
|
41 |
-
cp $WCFM_PATH/dist/assets/index*.js $
|
42 |
-
cp $WCFM_PATH/dist/assets/vendor*.js $
|
43 |
|
44 |
|
45 |
#CSS_FILE = $(ls /home/rosell/github/webp-express/lib/wcfm | grep 'index.*css' | tr '\n' ' ' | sed 's/\s//')
|
46 |
-
CSS_FILE=$(ls $
|
47 |
-
JS_FILE=$(ls $
|
48 |
|
49 |
|
50 |
if [ ! $CSS_FILE ]; then
|
@@ -65,7 +67,7 @@ copyassets() {
|
|
65 |
}
|
66 |
|
67 |
if [ ! $1 ]; then
|
68 |
-
echo "Missing argument. Must be
|
69 |
exit
|
70 |
fi
|
71 |
|
@@ -73,19 +75,28 @@ buildwcfm() {
|
|
73 |
npm run build --prefix $WCFM_PATH
|
74 |
}
|
75 |
|
76 |
-
if [ $1 = "
|
77 |
-
echo "
|
78 |
copyassets
|
79 |
fi
|
80 |
|
81 |
-
if [ $1 = "
|
82 |
-
echo "
|
83 |
buildwcfm
|
84 |
fi
|
85 |
|
86 |
-
if [ $1 = "build-
|
87 |
-
echo "build-
|
88 |
buildwcfm
|
89 |
copyassets
|
90 |
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
```
|
22 |
|
23 |
|
24 |
## Copying WCFM
|
25 |
+
I created the following script for building WCFM, copying it to webp-express, etc
|
26 |
```
|
27 |
#!/bin/bash
|
28 |
|
29 |
WCFM_PATH=/home/rosell/github/webp-convert-filemanager
|
30 |
+
WE_PATH=/home/rosell/github/webp-express
|
31 |
+
WE_PATH_WCFM=$WE_PATH/lib/wcfm
|
32 |
WCFMPage_PATH=/home/rosell/github/webp-express/lib/classes/WCFMPage.php
|
33 |
+
WC_PATH=/home/rosell/github/webp-convert
|
34 |
|
35 |
copyassets() {
|
36 |
# remove assets in WebP Express
|
37 |
+
rm -f $WE_PATH_WCFM/index*.css
|
38 |
+
rm -f $WE_PATH_WCFM/index*.js
|
39 |
+
rm -f $WE_PATH_WCFM/vendor*.js
|
40 |
|
41 |
# copy assets from WCFM
|
42 |
+
cp $WCFM_PATH/dist/assets/index*.css $WE_PATH_WCFM/
|
43 |
+
cp $WCFM_PATH/dist/assets/index*.js $WE_PATH_WCFM/
|
44 |
+
cp $WCFM_PATH/dist/assets/vendor*.js $WE_PATH_WCFM/
|
45 |
|
46 |
|
47 |
#CSS_FILE = $(ls /home/rosell/github/webp-express/lib/wcfm | grep 'index.*css' | tr '\n' ' ' | sed 's/\s//')
|
48 |
+
CSS_FILE=$(ls $WE_PATH_WCFM | grep 'index.*css' | tr '\n' ' ' | sed 's/\s//')
|
49 |
+
JS_FILE=$(ls $WE_PATH_WCFM | grep 'index.*js' | tr '\n' ' ' | sed 's/\s//')
|
50 |
|
51 |
|
52 |
if [ ! $CSS_FILE ]; then
|
67 |
}
|
68 |
|
69 |
if [ ! $1 ]; then
|
70 |
+
echo "Missing argument. Must be buildfm, copyfm, build-copyfm or rsync-wc"
|
71 |
exit
|
72 |
fi
|
73 |
|
75 |
npm run build --prefix $WCFM_PATH
|
76 |
}
|
77 |
|
78 |
+
if [ $1 = "copyfm" ]; then
|
79 |
+
echo "copyfm"
|
80 |
copyassets
|
81 |
fi
|
82 |
|
83 |
+
if [ $1 = "buildfm" ]; then
|
84 |
+
echo "buildfm"
|
85 |
buildwcfm
|
86 |
fi
|
87 |
|
88 |
+
if [ $1 = "build-copyfm" ]; then
|
89 |
+
echo "build-copyfm"
|
90 |
buildwcfm
|
91 |
copyassets
|
92 |
fi
|
93 |
+
|
94 |
+
rsyncwc() {
|
95 |
+
rsync -avh --size-only --exclude '.git' --exclude '.github' --exclude='composer.lock' --exclude='scripts' --exclude='vendor/rosell-dk/webp-convert/.git' --exclude='vendor/rosell-dk/webp-convert/.git' --exclude='.gitignore' "$WC_PATH/src/" "$WE_PATH/vendor/rosell-dk/webp-convert/src" --delete
|
96 |
+
}
|
97 |
+
|
98 |
+
if [ $1 = "rsync-wc" ]; then
|
99 |
+
echo "rsync-wc"
|
100 |
+
rsyncwc
|
101 |
+
fi
|
102 |
```
|
docs/publishing.md
CHANGED
@@ -79,7 +79,7 @@ rsync -avh --dry-run --exclude '.git' --exclude '.github' --exclude='composer.lo
|
|
79 |
|
80 |
```
|
81 |
cd /var/www/we/svn
|
82 |
-
rsync -avh --exclude '.git' --exclude '.github'
|
83 |
```
|
84 |
|
85 |
**It should NOT contain a long list of files! (unless you have run phpreplace)**
|
@@ -114,12 +114,12 @@ svn status | grep '^!' | awk '{print $2}' | xargs svn delete --force (t
|
|
114 |
Then add a new tag
|
115 |
```
|
116 |
cd svn
|
117 |
-
svn cp trunk tags/0.
|
118 |
```
|
119 |
|
120 |
And commit!
|
121 |
```
|
122 |
-
svn ci -m '0.
|
123 |
```
|
124 |
|
125 |
|
79 |
|
80 |
```
|
81 |
cd /var/www/we/svn
|
82 |
+
rsync -avh --exclude '.git' --exclude '.github' --exclude='composer.lock' --exclude='scripts' --exclude='vendor/rosell-dk/webp-convert/.git' --exclude='.gitignore' ~/github/webp-express/ /var/www/we/svn/trunk/ --delete
|
83 |
```
|
84 |
|
85 |
**It should NOT contain a long list of files! (unless you have run phpreplace)**
|
114 |
Then add a new tag
|
115 |
```
|
116 |
cd svn
|
117 |
+
svn cp trunk tags/0.23.0 (this will copy trunk into a new tag)
|
118 |
```
|
119 |
|
120 |
And commit!
|
121 |
```
|
122 |
+
svn ci -m '0.24.0 pre-release'
|
123 |
```
|
124 |
|
125 |
|
lib/classes/AlterHtmlHelper.php
CHANGED
@@ -44,7 +44,7 @@ class AlterHtmlHelper
|
|
44 |
if (!isset(self::$options)) {
|
45 |
self::$options = json_decode(Option::getOption('webp-express-alter-html-options', null), true);
|
46 |
if (!isset(self::$options['prevent-using-webps-larger-than-original'])) {
|
47 |
-
|
48 |
}
|
49 |
// Set scope if it isn't there (it wasn't cached until 0.17.5)
|
50 |
if (!isset(self::$options['scope'])) {
|
44 |
if (!isset(self::$options)) {
|
45 |
self::$options = json_decode(Option::getOption('webp-express-alter-html-options', null), true);
|
46 |
if (!isset(self::$options['prevent-using-webps-larger-than-original'])) {
|
47 |
+
self::$options['prevent-using-webps-larger-than-original'] = true;
|
48 |
}
|
49 |
// Set scope if it isn't there (it wasn't cached until 0.17.5)
|
50 |
if (!isset(self::$options['scope'])) {
|
lib/classes/ConvertHelperIndependent.php
CHANGED
@@ -571,7 +571,7 @@ APACHE
|
|
571 |
$text = preg_replace('#' . preg_quote($_SERVER["DOCUMENT_ROOT"]) . '#', '[doc-root]', $text);
|
572 |
|
573 |
// TODO: Put version number somewhere else. Ie \WebPExpress\VersionNumber::version
|
574 |
-
$text = 'WebP Express 0.
|
575 |
|
576 |
$logFile = self::getLogFilename($source, $logDir);
|
577 |
|
@@ -647,17 +647,18 @@ APACHE
|
|
647 |
$converter = ConverterFactory::makeConverter($converter, $source, $destination, $convertOptions, $logger);
|
648 |
$converter->doConvert();
|
649 |
} else {
|
|
|
650 |
WebPConvert::convert($source, $destination, $convertOptions, $logger);
|
651 |
}
|
652 |
$success = true;
|
653 |
} catch (\WebpConvert\Exceptions\WebPConvertException $e) {
|
654 |
$msg = $e->getMessage();
|
655 |
} catch (\Exception $e) {
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
}
|
662 |
|
663 |
if (!is_null($logDir)) {
|
571 |
$text = preg_replace('#' . preg_quote($_SERVER["DOCUMENT_ROOT"]) . '#', '[doc-root]', $text);
|
572 |
|
573 |
// TODO: Put version number somewhere else. Ie \WebPExpress\VersionNumber::version
|
574 |
+
$text = 'WebP Express 0.24.1. ' . $msgTop . ', ' . date("Y-m-d H:i:s") . "\n\r\n\r" . $text;
|
575 |
|
576 |
$logFile = self::getLogFilename($source, $logDir);
|
577 |
|
647 |
$converter = ConverterFactory::makeConverter($converter, $source, $destination, $convertOptions, $logger);
|
648 |
$converter->doConvert();
|
649 |
} else {
|
650 |
+
//error_log('options:' . print_r(json_encode($convertOptions,JSON_PRETTY_PRINT), true));
|
651 |
WebPConvert::convert($source, $destination, $convertOptions, $logger);
|
652 |
}
|
653 |
$success = true;
|
654 |
} catch (\WebpConvert\Exceptions\WebPConvertException $e) {
|
655 |
$msg = $e->getMessage();
|
656 |
} catch (\Exception $e) {
|
657 |
+
//$msg = 'An exception was thrown!';
|
658 |
+
$msg = $e->getMessage();
|
659 |
+
} catch (\Throwable $e) {
|
660 |
+
//Executed only in PHP 7 and 8, will not match in PHP 5
|
661 |
+
$msg = $e->getMessage();
|
662 |
}
|
663 |
|
664 |
if (!is_null($logDir)) {
|
lib/classes/ConvertersHelper.php
CHANGED
@@ -193,6 +193,31 @@ class ConvertersHelper
|
|
193 |
return $result;
|
194 |
}
|
195 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
196 |
public static function getWorkingAndActiveConverterIds($config)
|
197 |
{
|
198 |
$converters = self::getWorkingAndActiveConverters($config);
|
@@ -203,6 +228,16 @@ class ConvertersHelper
|
|
203 |
return $result;
|
204 |
}
|
205 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
206 |
/**
|
207 |
* Get converter id by converter object
|
208 |
*
|
193 |
return $result;
|
194 |
}
|
195 |
|
196 |
+
/**
|
197 |
+
* Get active converters.
|
198 |
+
*
|
199 |
+
* @param object $config
|
200 |
+
* @return array Array of converter objects
|
201 |
+
*/
|
202 |
+
public static function getActiveConverters($config)
|
203 |
+
{
|
204 |
+
if (!isset($config['converters'])) {
|
205 |
+
return [];
|
206 |
+
}
|
207 |
+
$converters = $config['converters'];
|
208 |
+
if (!is_array($converters)) {
|
209 |
+
return [];
|
210 |
+
}
|
211 |
+
$result = [];
|
212 |
+
foreach ($converters as $c) {
|
213 |
+
if (isset($c['deactivated']) && $c['deactivated']) {
|
214 |
+
continue;
|
215 |
+
}
|
216 |
+
$result[] = $c;
|
217 |
+
}
|
218 |
+
return $result;
|
219 |
+
}
|
220 |
+
|
221 |
public static function getWorkingAndActiveConverterIds($config)
|
222 |
{
|
223 |
$converters = self::getWorkingAndActiveConverters($config);
|
228 |
return $result;
|
229 |
}
|
230 |
|
231 |
+
public static function getActiveConverterIds($config)
|
232 |
+
{
|
233 |
+
$converters = self::getActiveConverters($config);
|
234 |
+
$result = [];
|
235 |
+
foreach ($converters as $converter) {
|
236 |
+
$result[] = $converter['converter'];
|
237 |
+
}
|
238 |
+
return $result;
|
239 |
+
}
|
240 |
+
|
241 |
/**
|
242 |
* Get converter id by converter object
|
243 |
*
|
lib/classes/TestRun.php
CHANGED
@@ -117,7 +117,8 @@ class TestRun
|
|
117 |
}
|
118 |
$workingConverters[] = $converterId;
|
119 |
} catch (\Exception $e) {
|
120 |
-
|
|
|
121 |
$errors[$converterId] = $e->getMessage();
|
122 |
}
|
123 |
}
|
117 |
}
|
118 |
$workingConverters[] = $converterId;
|
119 |
} catch (\Exception $e) {
|
120 |
+
$errors[$converterId] = $e->getMessage();
|
121 |
+
} catch (\Throwable $e) {
|
122 |
$errors[$converterId] = $e->getMessage();
|
123 |
}
|
124 |
}
|
lib/classes/WCFMApi.php
CHANGED
@@ -4,6 +4,7 @@ namespace WebPExpress;
|
|
4 |
|
5 |
use \WebPConvert\Convert\Converters\Stack;
|
6 |
use \WebPConvert\WebPConvert;
|
|
|
7 |
|
8 |
/**
|
9 |
*
|
@@ -35,6 +36,14 @@ class WCFMApi
|
|
35 |
case 'convert':
|
36 |
$result = self::processConvert();
|
37 |
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
}
|
39 |
|
40 |
$json = wp_json_encode($result, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE);
|
@@ -147,24 +156,74 @@ class WCFMApi
|
|
147 |
}*/
|
148 |
//}
|
149 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
150 |
|
151 |
|
152 |
$systemStatus = [
|
153 |
'converterRequirements' => [
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
// TODO: Add more!
|
159 |
]
|
160 |
];
|
161 |
|
162 |
//getUnsupportedDefaultOptions
|
163 |
//supportedStandardOptions: {
|
|
|
164 |
|
165 |
return [
|
166 |
//'converters' => $converters,
|
167 |
-
|
|
|
|
|
168 |
'systemStatus' => $systemStatus
|
169 |
];
|
170 |
|
@@ -190,6 +249,33 @@ class WCFMApi
|
|
190 |
];
|
191 |
}
|
192 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
193 |
|
194 |
public static function processInfo() {
|
195 |
|
@@ -197,7 +283,8 @@ class WCFMApi
|
|
197 |
|
198 |
//$args = json_decode(sanitize_text_field(stripslashes($_POST['args'])), true);
|
199 |
|
200 |
-
|
|
|
201 |
if (!array_key_exists('path', $args)) {
|
202 |
throw new \Exception('"path" argument missing for command');
|
203 |
}
|
@@ -218,6 +305,7 @@ class WCFMApi
|
|
218 |
$absPath = Paths::getAbsDirById($rootId) . '/' . $relPath;
|
219 |
//absPathExistsAndIsFile
|
220 |
SanityCheck::absPathExists($absPath);
|
|
|
221 |
$result = [
|
222 |
'original' => [
|
223 |
//'filename' => $absPath,
|
@@ -227,6 +315,7 @@ class WCFMApi
|
|
227 |
'url' => Paths::getUrlById($rootId) . '/' . $relPath . '?' . SelfTestHelper::randomDigitsAndLetters(8) . '&dontreplace&original',
|
228 |
]
|
229 |
];
|
|
|
230 |
|
231 |
// TODO: NO!
|
232 |
// We must use ConvertHelper::getDestination for the abs path.
|
@@ -254,6 +343,7 @@ class WCFMApi
|
|
254 |
'size' => filesize($absPathDest),
|
255 |
'url' => $destinationUrl . '?' . SelfTestHelper::randomDigitsAndLetters(8),
|
256 |
];
|
|
|
257 |
}
|
258 |
|
259 |
// Get log, if exists. Ignore errors.
|
@@ -348,7 +438,7 @@ class WCFMApi
|
|
348 |
|
349 |
//$args = json_decode(sanitize_text_field(stripslashes($_POST['args'])), true);
|
350 |
|
351 |
-
$args =
|
352 |
if (!array_key_exists('path', $args)) {
|
353 |
throw new \Exception('"path" argument missing for command');
|
354 |
}
|
@@ -431,24 +521,60 @@ class WCFMApi
|
|
431 |
|
432 |
}
|
433 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
434 |
public static function processConvert() {
|
435 |
|
436 |
Validate::postHasKey('args');
|
437 |
|
438 |
//$args = json_decode(sanitize_text_field(stripslashes($_POST['args'])), true);
|
439 |
|
440 |
-
$args =
|
441 |
if (!array_key_exists('path', $args)) {
|
442 |
throw new \Exception('"path" argument missing for command');
|
443 |
}
|
444 |
|
445 |
$path = SanityCheck::noStreamWrappers($args['path']);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
446 |
list($absPath, $relPath, $rootId) = self::analyzePathReceived($path);
|
447 |
-
|
|
|
|
|
448 |
$result = [
|
449 |
'success' => $convertResult['success'],
|
450 |
'data' => $convertResult['msg'],
|
451 |
'log' => $convertResult['log'],
|
|
|
452 |
];
|
453 |
$info = [];
|
454 |
if (isset($convertResult['filesize-webp'])) {
|
@@ -457,6 +583,10 @@ class WCFMApi
|
|
457 |
if (isset($convertResult['destination-url'])) {
|
458 |
$info['url'] = $convertResult['destination-url'] . '?' . SelfTestHelper::randomDigitsAndLetters(8);
|
459 |
}
|
|
|
|
|
|
|
|
|
460 |
$result['converted'] = $info;
|
461 |
return $result;
|
462 |
|
@@ -484,4 +614,45 @@ class WCFMApi
|
|
484 |
//absPathExistsAndIsFile
|
485 |
SanityCheck::absPathExists($absPath); */
|
486 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
487 |
}
|
4 |
|
5 |
use \WebPConvert\Convert\Converters\Stack;
|
6 |
use \WebPConvert\WebPConvert;
|
7 |
+
use \ImageMimeTypeGuesser\ImageMimeTypeGuesser;
|
8 |
|
9 |
/**
|
10 |
*
|
36 |
case 'convert':
|
37 |
$result = self::processConvert();
|
38 |
break;
|
39 |
+
case 'delete-converted':
|
40 |
+
$result = self::processDeleteConverted();
|
41 |
+
break;
|
42 |
+
default:
|
43 |
+
throw new \Exception('Unknown command');
|
44 |
+
}
|
45 |
+
if (!isset($result)) {
|
46 |
+
throw new \Exception('Command: ' . $command . ' gave no result');
|
47 |
}
|
48 |
|
49 |
$json = wp_json_encode($result, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE);
|
156 |
}*/
|
157 |
//}
|
158 |
|
159 |
+
$webpConvertOptionDefinitions = WebPConvert::getConverterOptionDefinitions();
|
160 |
+
|
161 |
+
$config = Config::loadConfigAndFix();
|
162 |
+
$defaults = [
|
163 |
+
'auto-limit' => (isset($config['quality-auto']) && $config['quality-auto']),
|
164 |
+
'alpha-quality' => $config['alpha-quality'],
|
165 |
+
'quality' => $config['max-quality'],
|
166 |
+
'encoding' => $config['jpeg-encoding'],
|
167 |
+
'near-lossless' => ($config['jpeg-enable-near-lossless'] ? $config['jpeg-near-lossless'] : 100),
|
168 |
+
'metadata' => $config['metadata'],
|
169 |
+
'stack-converters' => ConvertersHelper::getActiveConverterIds($config),
|
170 |
+
|
171 |
+
// 'method' (I could copy from cwebp...)
|
172 |
+
// 'sharp-yuv' (n/a)
|
173 |
+
// low-memory (n/a)
|
174 |
+
// auto-filter (n/a)
|
175 |
+
// preset (n/a)
|
176 |
+
// size-in-percentage (I could copy from cwebp...)
|
177 |
+
];
|
178 |
+
|
179 |
+
$good = ConvertersHelper::getWorkingAndActiveConverterIds($config);
|
180 |
+
if (isset($good[0])) {
|
181 |
+
$defaults['converter'] = $good[0];
|
182 |
+
}
|
183 |
+
//'converter' => 'ewww',
|
184 |
+
|
185 |
+
|
186 |
+
// TODO:add PNG options
|
187 |
+
$pngDefaults = [
|
188 |
+
'encoding' => $config['png-encoding'],
|
189 |
+
'near-lossless' => ($config['png-enable-near-lossless'] ? $config['png-near-lossless'] : 100),
|
190 |
+
'quality' => $config['png-quality'],
|
191 |
+
];
|
192 |
+
|
193 |
+
|
194 |
+
// Filter active converters
|
195 |
+
foreach ($config['converters'] as $converter) {
|
196 |
+
/*if (isset($converter['deactivated']) && ($converter['deactivated'])) {
|
197 |
+
//continue;
|
198 |
+
}*/
|
199 |
+
if (isset($converter['options'])) {
|
200 |
+
foreach ($converter['options'] as $optionName => $optionValue) {
|
201 |
+
$defaults[$converter['converter'] . '-' . $optionName] = $optionValue;
|
202 |
+
}
|
203 |
+
|
204 |
+
}
|
205 |
+
}
|
206 |
|
207 |
|
208 |
$systemStatus = [
|
209 |
'converterRequirements' => [
|
210 |
+
'gd' => [
|
211 |
+
'extensionLoaded' => extension_loaded('gd'),
|
212 |
+
'compiledWithWebP' => function_exists('imagewebp'),
|
213 |
+
]
|
214 |
// TODO: Add more!
|
215 |
]
|
216 |
];
|
217 |
|
218 |
//getUnsupportedDefaultOptions
|
219 |
//supportedStandardOptions: {
|
220 |
+
$defaults['png'] = $pngDefaults;
|
221 |
|
222 |
return [
|
223 |
//'converters' => $converters,
|
224 |
+
'defaults' => $defaults,
|
225 |
+
//'pngDefaults' => $pngDefaults,
|
226 |
+
'options' => $webpConvertOptionDefinitions,
|
227 |
'systemStatus' => $systemStatus
|
228 |
];
|
229 |
|
249 |
];
|
250 |
}
|
251 |
|
252 |
+
/*
|
253 |
+
* Get mime
|
254 |
+
* @return string
|
255 |
+
*/
|
256 |
+
private static function setMime($path, &$info) {
|
257 |
+
$mimeResult = ImageMimeTypeGuesser::detect($path);
|
258 |
+
if (!$mimeResult) {
|
259 |
+
return;
|
260 |
+
}
|
261 |
+
$info['mime'] = $mimeResult;
|
262 |
+
if ($mimeResult == 'image/webp') {
|
263 |
+
$handle = @fopen($path, 'r');
|
264 |
+
if ($handle !== false) {
|
265 |
+
// 20 bytes is sufficient for all our sniffers, except image/svg+xml.
|
266 |
+
// The svg sniffer takes care of reading more
|
267 |
+
$sampleBin = @fread($handle, 20);
|
268 |
+
if ($sampleBin !== false) {
|
269 |
+
if (preg_match("/^RIFF.{4}WEBPVP8\ /", $sampleBin) === 1) {
|
270 |
+
$info['mime'] .= ' (lossy)';
|
271 |
+
} else if (preg_match("/^RIFF.{4}WEBPVP8L/", $sampleBin) === 1) {
|
272 |
+
$info['mime'] .= ' (lossless)';
|
273 |
+
}
|
274 |
+
}
|
275 |
+
}
|
276 |
+
|
277 |
+
}
|
278 |
+
}
|
279 |
|
280 |
public static function processInfo() {
|
281 |
|
283 |
|
284 |
//$args = json_decode(sanitize_text_field(stripslashes($_POST['args'])), true);
|
285 |
|
286 |
+
//$args = $_POST['args'];
|
287 |
+
$args = self::getArgs();
|
288 |
if (!array_key_exists('path', $args)) {
|
289 |
throw new \Exception('"path" argument missing for command');
|
290 |
}
|
305 |
$absPath = Paths::getAbsDirById($rootId) . '/' . $relPath;
|
306 |
//absPathExistsAndIsFile
|
307 |
SanityCheck::absPathExists($absPath);
|
308 |
+
|
309 |
$result = [
|
310 |
'original' => [
|
311 |
//'filename' => $absPath,
|
315 |
'url' => Paths::getUrlById($rootId) . '/' . $relPath . '?' . SelfTestHelper::randomDigitsAndLetters(8) . '&dontreplace&original',
|
316 |
]
|
317 |
];
|
318 |
+
self::setMime($absPath, $result['original']);
|
319 |
|
320 |
// TODO: NO!
|
321 |
// We must use ConvertHelper::getDestination for the abs path.
|
343 |
'size' => filesize($absPathDest),
|
344 |
'url' => $destinationUrl . '?' . SelfTestHelper::randomDigitsAndLetters(8),
|
345 |
];
|
346 |
+
self::setMime($absPathDest, $result['converted']);
|
347 |
}
|
348 |
|
349 |
// Get log, if exists. Ignore errors.
|
438 |
|
439 |
//$args = json_decode(sanitize_text_field(stripslashes($_POST['args'])), true);
|
440 |
|
441 |
+
$args = self::getArgs();
|
442 |
if (!array_key_exists('path', $args)) {
|
443 |
throw new \Exception('"path" argument missing for command');
|
444 |
}
|
521 |
|
522 |
}
|
523 |
|
524 |
+
private static function getArgs() {
|
525 |
+
//return $_POST['args'];
|
526 |
+
|
527 |
+
$args = $_POST['args'];
|
528 |
+
// $args = '{\"path\":\"\"}';
|
529 |
+
//$args = '{"path":"hollo"}';
|
530 |
+
|
531 |
+
//error_log('get args:' . gettype($args));
|
532 |
+
//error_log(print_r($args, true));
|
533 |
+
//error_log(print_r(($_POST['args'] + ''), true));
|
534 |
+
|
535 |
+
//error_log('type:' . gettype($_POST['args']));
|
536 |
+
$args = json_decode('"' . $args . '"', true);
|
537 |
+
$args = json_decode($args, true);
|
538 |
+
//error_log('decoded:' . gettype($args));
|
539 |
+
//error_log(print_r($args, true));
|
540 |
+
//$args = json_decode($args, true);
|
541 |
+
|
542 |
+
return $args;
|
543 |
+
}
|
544 |
+
|
545 |
public static function processConvert() {
|
546 |
|
547 |
Validate::postHasKey('args');
|
548 |
|
549 |
//$args = json_decode(sanitize_text_field(stripslashes($_POST['args'])), true);
|
550 |
|
551 |
+
$args = self::getArgs();
|
552 |
if (!array_key_exists('path', $args)) {
|
553 |
throw new \Exception('"path" argument missing for command');
|
554 |
}
|
555 |
|
556 |
$path = SanityCheck::noStreamWrappers($args['path']);
|
557 |
+
|
558 |
+
$convertOptions = null;
|
559 |
+
if (isset($args['convertOptions'])) {
|
560 |
+
$convertOptions = $args['convertOptions'];
|
561 |
+
$convertOptions['log-call-arguments'] = true;
|
562 |
+
//unset($convertOptions['converter']);
|
563 |
+
//$convertOptions['png'] = ['quality' => 7];
|
564 |
+
//$convertOptions['png-quality'] = 8;
|
565 |
+
}
|
566 |
+
|
567 |
+
//error_log(print_r(json_encode($convertOptions, JSON_PRETTY_PRINT), true));
|
568 |
+
|
569 |
list($absPath, $relPath, $rootId) = self::analyzePathReceived($path);
|
570 |
+
|
571 |
+
$convertResult = Convert::convertFile($absPath, null, $convertOptions);
|
572 |
+
|
573 |
$result = [
|
574 |
'success' => $convertResult['success'],
|
575 |
'data' => $convertResult['msg'],
|
576 |
'log' => $convertResult['log'],
|
577 |
+
'args' => $args, // for debugging. TODO
|
578 |
];
|
579 |
$info = [];
|
580 |
if (isset($convertResult['filesize-webp'])) {
|
583 |
if (isset($convertResult['destination-url'])) {
|
584 |
$info['url'] = $convertResult['destination-url'] . '?' . SelfTestHelper::randomDigitsAndLetters(8);
|
585 |
}
|
586 |
+
if (isset($convertResult['destination-path'])) {
|
587 |
+
self::setMime($convertResult['destination-path'], $info);
|
588 |
+
}
|
589 |
+
|
590 |
$result['converted'] = $info;
|
591 |
return $result;
|
592 |
|
614 |
//absPathExistsAndIsFile
|
615 |
SanityCheck::absPathExists($absPath); */
|
616 |
}
|
617 |
+
|
618 |
+
public static function processDeleteConverted() {
|
619 |
+
|
620 |
+
Validate::postHasKey('args');
|
621 |
+
|
622 |
+
//$args = json_decode(sanitize_text_field(stripslashes($_POST['args'])), true);
|
623 |
+
|
624 |
+
//$args = $_POST['args'];
|
625 |
+
$args = self::getArgs();
|
626 |
+
if (!array_key_exists('path', $args)) {
|
627 |
+
throw new \Exception('"path" argument missing for command');
|
628 |
+
}
|
629 |
+
|
630 |
+
$path = SanityCheck::noStreamWrappers($args['path']);
|
631 |
+
list($absPath, $relPath, $rootId) = self::analyzePathReceived($path);
|
632 |
+
|
633 |
+
$config = Config::loadConfigAndFix();
|
634 |
+
$destinationOptions = DestinationOptions::createFromConfig($config);
|
635 |
+
if ($destinationOptions->useDocRoot) {
|
636 |
+
if (!(Paths::canUseDocRootForStructuringCacheDir())) {
|
637 |
+
$destinationOptions->useDocRoot = false;
|
638 |
+
}
|
639 |
+
}
|
640 |
+
$destinationPath = Paths::getDestinationPathCorrespondingToSource($absPath, $destinationOptions);
|
641 |
+
|
642 |
+
if (@!file_exists($destinationPath)) {
|
643 |
+
throw new \Exception('file not found: ' . $destinationPath);
|
644 |
+
}
|
645 |
+
|
646 |
+
if (@!unlink($destinationPath)) {
|
647 |
+
throw new \Exception('failed deleting file');
|
648 |
+
}
|
649 |
+
|
650 |
+
$result = [
|
651 |
+
'success' => true,
|
652 |
+
'data' => $destinationPath
|
653 |
+
];
|
654 |
+
return $result;
|
655 |
+
|
656 |
+
}
|
657 |
+
|
658 |
}
|
lib/classes/WCFMPage.php
CHANGED
@@ -39,16 +39,16 @@ class WCFMPage
|
|
39 |
|
40 |
public static function addToHead() {
|
41 |
$baseUrl = plugins_url('lib/wcfm', WEBPEXPRESS_PLUGIN);
|
42 |
-
//$url = plugins_url('js/conversion-manager/index.
|
43 |
|
44 |
$wcfmNonce = wp_create_nonce('webpexpress-wcfm-nonce');
|
45 |
echo '<scr' . 'ipt>window.webpExpressWCFMNonce = "' . $wcfmNonce . '";</scr' . 'ipt>';
|
46 |
|
47 |
-
echo '<scr' . 'ipt src="' . $baseUrl . '/wcfm-options.js?
|
48 |
//echo '<scr' . 'ipt type="module" src="' . $baseUrl . '/vendor.js?1"></scr' . 'ipt>';
|
49 |
|
50 |
-
echo '<scr' . 'ipt type="module" src="' . $baseUrl . '/index.
|
51 |
-
echo '<link rel="stylesheet" href="' . $baseUrl . '/index.
|
52 |
}
|
53 |
|
54 |
}
|
39 |
|
40 |
public static function addToHead() {
|
41 |
$baseUrl = plugins_url('lib/wcfm', WEBPEXPRESS_PLUGIN);
|
42 |
+
//$url = plugins_url('js/conversion-manager/index.be5d792e.js ', WEBPEXPRESS_PLUGIN);
|
43 |
|
44 |
$wcfmNonce = wp_create_nonce('webpexpress-wcfm-nonce');
|
45 |
echo '<scr' . 'ipt>window.webpExpressWCFMNonce = "' . $wcfmNonce . '";</scr' . 'ipt>';
|
46 |
|
47 |
+
echo '<scr' . 'ipt src="' . $baseUrl . '/wcfm-options.js?25"></scr' . 'ipt>';
|
48 |
//echo '<scr' . 'ipt type="module" src="' . $baseUrl . '/vendor.js?1"></scr' . 'ipt>';
|
49 |
|
50 |
+
echo '<scr' . 'ipt type="module" src="' . $baseUrl . '/index.be5d792e.js"></scr' . 'ipt>';
|
51 |
+
echo '<link rel="stylesheet" href="' . $baseUrl . '/index.0c25b0fb.css">';
|
52 |
}
|
53 |
|
54 |
}
|
lib/wcfm/index.0c25b0fb.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.splitpanes{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%;height:100%}.splitpanes--vertical{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.splitpanes--horizontal{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.splitpanes--dragging *{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.splitpanes__pane{width:100%;height:100%;overflow:hidden}.splitpanes--vertical .splitpanes__pane{-webkit-transition:width .2s ease-out;transition:width .2s ease-out}.splitpanes--horizontal .splitpanes__pane{-webkit-transition:height .2s ease-out;transition:height .2s ease-out}.splitpanes--dragging .splitpanes__pane{-webkit-transition:none;transition:none}.splitpanes__splitter{-ms-touch-action:none;touch-action:none}.splitpanes--vertical>.splitpanes__splitter{min-width:1px;cursor:col-resize}.splitpanes--horizontal>.splitpanes__splitter{min-height:1px;cursor:row-resize}.splitpanes.default-theme .splitpanes__pane{background-color:#f2f2f2}.splitpanes.default-theme .splitpanes__splitter{background-color:#fff;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;-ms-flex-negative:0;flex-shrink:0}.splitpanes.default-theme .splitpanes__splitter:after,.splitpanes.default-theme .splitpanes__splitter:before{content:"";position:absolute;top:50%;left:50%;background-color:#00000026;-webkit-transition:background-color .3s;transition:background-color .3s}.splitpanes.default-theme .splitpanes__splitter:hover:after,.splitpanes.default-theme .splitpanes__splitter:hover:before{background-color:#00000040}.splitpanes.default-theme .splitpanes__splitter:first-child{cursor:auto}.default-theme.splitpanes .splitpanes .splitpanes__splitter{z-index:1}.default-theme.splitpanes--vertical>.splitpanes__splitter,.default-theme .splitpanes--vertical>.splitpanes__splitter{width:7px;border-left:1px solid #eee;margin-left:-1px}.default-theme.splitpanes--vertical>.splitpanes__splitter:after,.default-theme .splitpanes--vertical>.splitpanes__splitter:after,.default-theme.splitpanes--vertical>.splitpanes__splitter:before,.default-theme .splitpanes--vertical>.splitpanes__splitter:before{-webkit-transform:translateY(-50%);transform:translateY(-50%);width:1px;height:30px}.default-theme.splitpanes--vertical>.splitpanes__splitter:before,.default-theme .splitpanes--vertical>.splitpanes__splitter:before{margin-left:-2px}.default-theme.splitpanes--vertical>.splitpanes__splitter:after,.default-theme .splitpanes--vertical>.splitpanes__splitter:after{margin-left:1px}.default-theme.splitpanes--horizontal>.splitpanes__splitter,.default-theme .splitpanes--horizontal>.splitpanes__splitter{height:7px;border-top:1px solid #eee;margin-top:-1px}.default-theme.splitpanes--horizontal>.splitpanes__splitter:after,.default-theme .splitpanes--horizontal>.splitpanes__splitter:after,.default-theme.splitpanes--horizontal>.splitpanes__splitter:before,.default-theme .splitpanes--horizontal>.splitpanes__splitter:before{-webkit-transform:translateX(-50%);transform:translate(-50%);width:30px;height:1px}.default-theme.splitpanes--horizontal>.splitpanes__splitter:before,.default-theme .splitpanes--horizontal>.splitpanes__splitter:before{margin-top:-2px}.default-theme.splitpanes--horizontal>.splitpanes__splitter:after,.default-theme .splitpanes--horizontal>.splitpanes__splitter:after{margin-top:1px}.fileitem.selected p[data-v-4fb0cc48]{background:#ccc!important}.fileitem[data-v-4fb0cc48]{vertical-align:middle;white-space:nowrap}.fileitem p[data-v-4fb0cc48]:hover{background:#eee}.fileitem p[data-v-4fb0cc48]{user-select:none;cursor:pointer;margin:0;padding:3px;line-height:25px;border-bottom:1px solid #f2f2f2}.fileitem p .fold-unfold[data-v-4fb0cc48]{user-select:none;cursor:pointer}.fileitem p .fold-unfold.empty[data-v-4fb0cc48]{visibility:hidden}.fileitem p svg.icon-unfold[data-v-4fb0cc48],.fileitem p svg.icon-fold[data-v-4fb0cc48]{width:12px;height:12px;vertical-align:middle;padding:3px;margin-right:3px;display:inline-block;border:0px solid grey}.fileitem p svg.icon-folder[data-v-4fb0cc48],.fileitem p svg.icon-file[data-v-4fb0cc48]{width:20px;height:20px;display:inline;vertical-align:middle;padding-top:1px;padding-bottom:2px;padding-right:5px}.fileitem p svg.icon-file[data-v-4fb0cc48]{margin-left:22px}ul{list-style-type:none;padding:0;margin:0}li{margin:0 0 0 20px}.modal-mask{position:fixed;z-index:9998;top:0;left:0;width:100%;height:100%;background-color:#00000080;display:table}.modal-mask .modal-wrapper{height:100%;width:100%}.modal-mask .modal-wrapper .modal-container{padding:0;background-color:#fff;border-radius:2px;box-shadow:0 2px 8px #00000054;font-family:Helvetica,Arial,sans-serif;position:relative}.modal-mask .modal-wrapper .modal-container .title{position:absolute;left:0px;top:0;right:0;height:20px;background-color:#ccc;padding:5px 0 0 15px;font-size:14px;font-weight:bold}.modal-mask .modal-wrapper .modal-container .close-button{position:absolute;right:3px;top:3px;background-color:#fff;padding:2px 5px;font-size:10px;z-index:999;border-radius:18px;border:1px solid #ccc;line-height:13px}.modal-mask .modal-wrapper .modal-container .close-button:hover{cursor:pointer;background-color:#999}.modal-mask .modal-wrapper .modal-container .modal-body{position:absolute;top:25px;bottom:0px;left:0;right:0;overflow-y:auto;padding:20px}.modal-mask .modal-wrapper .modal-container .modal-body .close-button-with-text{text-align:right;margin-bottom:5px}.modal-mask .modal-wrapper .modal-container .modal-body .close-button-with-text button{padding:3px 20px}.modal-enter-active,.modal-leave-active{transition:opacity .5s ease}.modal-enter-from,.modal-leave-to{opacity:0}.image-viewport{position:relative}.image-viewport>.zoomer{width:100%;border:solid 1px silver;overflow:hidden}.image-viewport>.zoomer img{vertical-align:top;object-fit:contain;width:100%;height:100%;user-drag:none;-webkit-user-drag:none;-moz-user-drag:none}.image-viewport .zoom-info{display:none;position:absolute;bottom:0px;right:0px;padding:1px 4px;font-size:9px;background-color:#fff}.image-viewport:hover .zoom-info{display:block;cursor:pointer}.variant .header .title[data-v-0c38121e]{display:inline-block}.variant .header .size[data-v-0c38121e]{display:inline-block;float:right}.variant .header .zoom[data-v-0c38121e]{display:inline-block;float:right;visibility:hidden}.variant .footer[data-v-0c38121e]{font-style:italic;margin-top:2px}.variant .footer .select[data-v-0c38121e]{float:right}.variant .footer .select button[data-v-0c38121e]{padding:3px 10px}.variant:hover .header .zoom[data-v-0c38121e]{visibility:visible}.variants-component .variants .variant.selected[data-v-25a3327e]{background-color:#ccc}.variants-component .variants .variant[data-v-25a3327e]{display:inline-block;width:47%;margin-right:1%;padding:1%;margin-bottom:20px}.variants-component .variants .variant .header .title[data-v-25a3327e]{display:inline-block}.variants-component .variants .variant .header .size[data-v-25a3327e]{display:inline-block;float:right}.variants-component .variants .variant .header .zoom[data-v-25a3327e]{display:inline-block;float:right;visibility:hidden}.variants-component .variants .variant .footer[data-v-25a3327e]{font-style:italic}.variants-component .variants .variant .footer .select[data-v-25a3327e]{float:right}.variants-component .variants .variant .footer .select button[data-v-25a3327e]{padding:3px 10px}.variants-component .variants .variant:hover .header .zoom[data-v-25a3327e]{visibility:visible}.file-properties .variant-wrap[data-v-1e863e69]{display:inline-block;width:48%;margin-right:2%;margin-bottom:20px;vertical-align:top}.file-properties .variant-wrap .variant-footer[data-v-1e863e69]{font-style:italic}.file-properties .variant-wrap .variant-footer button[data-v-1e863e69]{float:right;padding:3px 10px}.file-properties .variant-wrap .icon-trash[data-v-1e863e69]{width:18px;height:18px;cursor:pointer;float:right}.file-properties .error[data-v-1e863e69]{color:red;font-weight:bold}.file-properties .path[data-v-1e863e69]{margin-bottom:20px}.file-properties .path .path[data-v-1e863e69]{color:#666;font-style:italic}.file-properties .log-button[data-v-1e863e69]{margin-left:15px}.file-properties .icon-converting[data-v-1e863e69]{padding:0 5px}.folder-properties .path{margin-bottom:20px}.folder-properties .path .path{color:#666;font-style:italic}h3[data-v-6ea04f9d]{margin:20px 0}@font-face{font-family:"password";src:url(data:font/woff;charset=utf-8;base64,d09GRgABAAAAABHQABEAAAAAYDgAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABgAAAABwAAAAcdRNqx0dERUYAAAGcAAAAHgAAACABEwAET1MvMgAAAbwAAABKAAAAYHRqRGZjbWFwAAACCAAAAXYAAAHCFDc4PGN2dCAAAAOAAAAAIwAAAEA2qiGNZnBnbQAAA6QAAAXBAAAL4j+uG59nYXNwAAAJaAAAAAgAAAAIAAAAEGdseWYAAAlwAAABYgAAQsjlC6hNaGVhZAAACtQAAAAsAAAANg5uo91oaGVhAAALAAAAACAAAAAkDmkIvGhtdHgAAAsgAAAASgAAA5bKU1PMbG9jYQAAC2wAAAGvAAABzu+p3w5tYXhwAAANHAAAACAAAAAgAZYAUG5hbWUAAA08AAACIgAABH/2En2lcG9zdAAAD2AAAAHkAAACzNVvq6twcmVwAAARRAAAAIEAAACNGVACEHdlYmYAABHIAAAABgAAAAZ7vlhFAAAAAQAAAADMPaLPAAAAANRqm7oAAAAA1GssPXjaY2BkYGDgA2IJBhBgYmAEwqdAzALmMQAADiEBGAAAeNpjYGL/zziBgZWBhYWBhQEEIDQQpzHOgvAhYAEDA78DAwMXlMvgFhwSxODAoPCbiQPMB5IaDAyM/0FstjS2NCClwMAIAIc1CIIAAHjaY2BgYGaAYBkGRgYQ2APkMYL5LAwLgLQKgwKQxcJQx/CfMZixQoFLQURBSkFOQUlBTUFfwUohXmGNopLqn99M//8DVSswLGAMAqpiUBBQkFCQgaqyhKti/P///+P/h/4X/Pd5cPTBgQd7H+x5sPPBtgfrHix90PjA9P6BW89ZH0NdQhAwsjHAlTIyAQkmdAVAr7GwsrFzcHJx8/Dy8QsICgmLiIqJS0hKScvIyskrKCopq6iqqWtoamnr6OrpGxgaGZuYmplbWFpZ29ja2Ts4Ojm7uLq5e3h6efv4+vkHBAYFh4SGhUdERkXHxMbFJyQytLV3dk+eMW/xoiXLli5fuXrVmrXr123YuHnrlm07tu/ZvXcfQ1FKaubtioUF2Y/Kshg6ZjEUMzCkl4Ndl1PDsGJXY3IeiJ1beyepqXX6ocOXr9y4efXaToaDRxge3rv/5ClD5fVbDC09zb1d/RMm9k2dxjBlztzZQA2FQFwFxACBLn9gAAB42mNgwAQsZyCQLY1xFlsaiGScxcHw/wY6n8GFVRAAPAoNgwB42q1WaXPTVhSVvMVJyFKy0KIuT7w4Te0nk1IIBkwIkmUX3MXZWglKK8VOui/QMsNv0K+5Mu0M/cZP67mSbQxJ2hmmmYzuee8dvbtfmTQlSNv3XF+I9jNtdrtNhd17Hl02aM0PjkS071GmFP5d1IpatysPDNMkzSfNkY2+pmtOYFukKxLBkUUZJXqCnncot3qvv6ZPOW7XpYLrmZQt+Tv3PVOaRuQJ6nSwteUbgmqMar4v4pQd9mgNW4OVoHU+X2fm844nYE0UCprqeAF2BJ9NMdpgtBEYge/7BukV35ekdbxD37coqwTuyZVCWJZ3Oh7lpU0FacMPn/TAopySsEv04vyBLfiELTZSC/gJktulbNnEoSMiEUFBvJ4vwcltL+gY4Y7vSd/0BW3tejgz2LWBfovyiiacSl/LpJEqYCltiYhLO6TMwRHpXSigfNmiCSXY1Gmn+yynHQi+gbYCnylBIzG1qPoT05rj2mVzFPtJ9XIuptJb9ApMcOB3INxIhpyXJF6awTElYcDIoZXIjgwbqYrpU16nFbylGS9cG3/pjEoc6k9PZZFsQ5p+2bRoRsWZjEu9sGHRrAJRCDrj3OXXAaTt0wyvdrCawcqiOVwzn4REIAJd6KVZJxBRIGgWQbNoXrX3vDjXa/grNHMon1j0hmpve+3ddNMwsb+Q7J9VsTbn7Hvx3BwSGNo0V+GaRSXb8Rl+zOBB+jIykS11vJiDB2/tCPlltWVT4rUhNtJzfgWtwDs+PGnB/hZ2X07VKQmMNW1BIloOaZt9XdeTXC0oLdYy7p5Hc9IWLk2j+KagOLBFAPV/zc/r2qxm21EQny1U6HHFuIAwLcK3hYpFSyrWWS4jzizPqTjL8k0V51i+peI8y/MqLrA0VDzB8m0VF1m+o+JJlh8oOYw7FQJEWIoq6Q+4QSwqjx0ujw4fpoeVscPV0eGj9PBdpdFM5TX8ew/+vQu7BPxjacI/lhfgH0sJ/1iuwD+WJfjHchX+sXwf/rFcg38slRL1pEwtBbXzgXDYBCdJJVpPca1WFVkVstCFF9EALXFKFmVYkzwR/5VhsPfro9Tqy3SxHOf1JdfDIGMHPxyPzPHjS0pcSez9CDzdPa4E3Xmict7Xlv/U+K+xKWvxJX0JHl2G/zD4ZHvRFGHNoiuqeq5u0cZ/UVHAXdCvIiXacklURYsbH6G8E0Ut2cKk8PCFwGDFNNjQ9aVF6K9hQi2jufCfUGjSqRxGVSlEPcJd114ci2p6B+VwJ1iCAp4VW9ve04zICuNpZjV73rd5fhYximXClk10rvNqGwY8w9LPRcYJepKyTtjDccYJDeCA59er74QwCVNdNpFDCQ1N+AWRaMF9JyiR6aTMYTgg9nkUVP7YrbiRPSolRuDZSSfkC11I+XWOgcBOfnUQA1lHaG4k21RE8wjRlC1WxtmqJyFjBwYR1fa8qqjj68oWDzYF2zIMeaGE1Z3xD3maqJMqeJAZyWV8c2CBM0xNwF/6V10cpnIT86DKUWtiqNf9alzVF9GAt0bbnfHtrZfZJ3JuK6pVTrzUVnStEkExFwusPc5BWqpUBdUZVdgwulxcEqVeRZOk1zUwNDD/X6MUW/9X9bH5PF/qEiNkLN+mP7DR5WAM/W+y/6YcBGDgx8jlFlxeSpsTvwzQhwtVuoxe/PiU/TuYufriAl0BvqvoKkSbo+YirqKJz+AwTp8oLkdqA36q+pgzAJ8B6Aw+V3092ekAJDvbzHEBdpjDYJc5DPaYw2CfObcBvmAOgy+Zw8BjDgOfOQ7APeYwuM8cBl8xh8ED5jQBvmYOg2+YwyBgDoOQOTbAAXMYdJnDoMccBoeKro/CfMQL2gT6NkG3gL5L6gmLLSy+V3RjxP6BFwn7xwQx+6cEMfVnRfUR9RdeJNRfE8TU3xLE1IeKbo6oj3iRUH9PEFP/SBBTH6unk7nM8IeXXaHiIWVXOk+G3xTrH4qiY04AAAAAAQAB//8AD3ja7dm9SsRAFIbhc/IzcRs1IAgiuvEHCxcVbVNskU7BarGwXUIuKeQKBKvE67BL6S14AcoyOBEEsZCVBXdX32JgMuF7QsiZSYaIJ5mINw5H4kskJ7XKadpEwc7zeW3Cp7TxPdeV2u+Gw264iczuJG20G7+Ik/gwiZPM69sDLW0Rjl7vs+BRRFQrrUxucunJ1nDTHa9eeiqyJlcqYSA9XfGjjWPdk3Xpu7YfiLWlFjrRwpbWpT+6gS3x8PDw8PDw8PDw8PDw8PDw8PD+sXdUm3E23BbH6Y07I7dOVrn+DNdGsmnxv2BTU3h4eHh4eHh8I/KthUdtL9IexTwEomc8Y/a4i7HuzlKPs2R5Ny3HPJlXfbCWME/w8PDw8PDw8PDw8PDw8PDw8PDw8OblyZSpX82E1deMX7W21YHe6cC27TfXoR7w8JbX+/H/NtfkPeu7rNdl4yROTP5SdW3R7/0NSf4AKAAAeNpjYGRgYADiG5O/msbz23xlkOdgAIEr2Tq2yDRbGlsakOJgYALxABg6CJB42mNgZGDgYPh/g4GB/T8Dw///bGkMQBEU8BQAhRMGN3jaY3rD4MIABEyrGBjY/zPOGsWjeKRjZmMGBrY0BgYYzaTEwMA4E4gFIZjhDJB2B9LRaHnGmDjzQXrh7JkINlsqhM04CwCA7V/zAAB42nXCK2hqYQAA4PP8z/v9fv1HYZw0ThJZkCUxyUnDJCYxXMQkJjENw2UYhpiGYQzDZZiGjIuYhmnIGEMWhuEiJjEN0zjccfvl+xAEOf3nAukid8gz8on6aBFtokN0jm4xHsthVewSu8fesC/8BC/jbfwGf8L3hE4UiDpxRTwQHyRBnpIXZJe8I5/JT+CDImiCIZiDLcVTOapKXVL31Bv1RZ/QZbpN39BP9J7RmQJTZ66YB+aDZdkztsEO2Bm74QAXcxWux024FXfkIV/iW/yIX/A7QRTyQk3oC1NhLaRiJCZiRxyLS/Eg+VJRakpDaS5tZV7OyVX5p/wor+VUiZRE6Sq/lHcVUaFaUH+o1+pv9Y8ma7FW1trarfaipXqkJ3pHH+tL/WCYxrnRMAbGzNiYwIzNitkzJ+bKPFrQKlkta2QtrJ0t2nm7Zvftqb22UydyEqfjjJ2lc3BN99xtuAN35m484MVexet5E2/lHX3ol/yWP/IX/i4Qg3xQC/rBNFgHKYxgAjtw/B+P8BXuQxDGYSXshZNwFR4zMFPKtL6NMotvuyyR1bOFbP0vo22DDAAAAQAAAOYACgACAAAAAAACAAYAFgB3AAAAMAAuAAAAAHjalVPLbtNAFD2OyyMRIKSiLqoCd4WERNuUFCgVK0ApIF5qJbp2XMdx49ip7dRJtnwCX8GSFb9A4QtY8Qns2LDh+HpSkBWQiOWZc1/nzj2eALiCH7BQ/BZxk6sNa6HO/QGtElu4DM/gGi5hZLCNG3hr8AIE7w0+gyWcGHyWtd8MPocxvht8Hrcs3+A6rlnvDG7gmfXB4AuYWj8NvoiHtVnfRezWPhr8CUt23eATNO3rBn+m/5XBX9Cwzfm/2li243Zw7Ekn8OVo5Lj9IPJl6g17kySVwzjMZDCR3BlLxzvAI8QYYoIEAXz0kHHMHQqQKjqGg4j7AeUR7NMKud9GExu4i9e0Uz45ORLm7DLLZ21If4I2vRFZ9vgm9LrKWK2p2lJheUMrYTxQNmHfNXavVs3vFTBDmCnqdXSKgbL26YvR5dpmzVPdZww9VUToLeyie8SazJygVGCHPB08Ub0yZm9jnU/XcKR/nGKNa8zs9X+rKivVmeQqY7n6hL1G7B9qdU6UsbPMnbrxX2eaFy3nTBlNVYucaAMtbGKLbwt3aA8r+q/S3/zLV3ip3lW9aQM+haIuu5RKPidy6Ss6emQIqI6nExf3UXBEHocZfdqReqaMD3myid4LwSF5S2UG9JWajZXB48n2uXZO55zdnxfmNj1m1OUunErov0/VWrjHdZP4900vFO2Sd8Q9Zu9A2WL91xRM7VP+PT1xwEhC7vAXtNG/vgAAeNpt0DdsE3EUx/HvSxw7cXrvhN7L3TmXQreTHL33TiCJbQhJcDAQOiL0IhASG4i2AKJXgYABEL2JMjAwIroYgBmH+7PxWz56b3h6+hGFnSfU8b98AImSaKJxEIMTF7HE4SaeBBJJIpkUUkkjnQwyySKbHHLJI58CCmlHEe3pQEc60ZkudKUb3elBT3rRmz70pR8aOgYeijEpoZQyyunPAAYyiMEMYShefFRQSRUWwxjOCEYyitGMYSzjGM8EJjKJyUxhKtOYzgxmMovZzGEu85hPtTg4RiubuckBPrKFPezkICc4LjHs4B2b2C9OcbFbYtnGHd5LHIc4yS9+8pujnOYh9znDAhaylxoeU8sDHvE80ttTnvEp0t4rXvCSs/j5wT7e8po3BPjCN7aziCCLWUI9DRymkaU0EaKZMMtYzgo+s5JVtLCatazhGkdYzzo2sJGvfOc65zjPDXFLvCRIoiRJsqRIqqRJumRIpmRJNhe4yBWucpdLXOYeWzklOdzituRKHrskXwqk0Omvb2kK6DaGK9wQ1DSvpqy09am9z6M0leVtGpqmKXWlofQoi5WmskRZqixT/rvntdXVXV131wX94VBtTXVzwF4Zlq1pOarCoca/g2lVtGn57D8iGn8AgBmYDXjaY/DewXAiKGIjI2Nf5AbGnRwMHAzJBRsZ2J02STIyaIEYm3k4GDkgLDE2MIvDaRezAwMjAyeQzem0iwHKZmZw2ajC2BEYscGhI2Ijc4rLRjUQbxdHAwMji0NHckgESEkkEGzm42Dk0drB+L91A0vvRiYGl82sKWwMLi4A/hwlYAAAAAABWEV7vQAA) format("woff");font-weight:normal;font-style:normal}.autoui-input .icon-eye{width:18px;height:18px;margin-left:5px;cursor:pointer}.autoui-input .icon-eye:hover{fill:#333}.autoui-input .icon-eye.revealed{fill:#888}.autoui-input input{width:100%;min-height:30px}.autoui-input input.obscured{font-family:"password",sans-serif;font-size:8px}.autoui-input input.sensitive{width:calc(100% - 30px)}.autoui-input input.small{max-width:100px}.slider-target,.slider-target *{-webkit-touch-callout:none;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-user-select:none;touch-action:none;-ms-user-select:none;-moz-user-select:none;user-select:none;box-sizing:border-box}.slider-target{position:relative}.slider-base,.slider-connects{width:100%;height:100%;position:relative;z-index:1}.slider-connects{overflow:hidden;z-index:0}.slider-connect,.slider-origin{will-change:transform;position:absolute;z-index:1;top:0;right:0;-ms-transform-origin:0 0;-webkit-transform-origin:0 0;-webkit-transform-style:preserve-3d;transform-origin:0 0;transform-style:flat}.slider-connect{height:100%;width:100%}.slider-origin{height:10%;width:10%}.slider-txt-dir-rtl.slider-horizontal .slider-origin{left:0;right:auto}.slider-vertical .slider-origin{width:0}.slider-horizontal .slider-origin{height:0}.slider-handle{-webkit-backface-visibility:hidden;backface-visibility:hidden;position:absolute}.slider-touch-area{height:100%;width:100%}.slider-state-tap .slider-connect,.slider-state-tap .slider-origin{transition:transform .3s}.slider-state-drag *{cursor:inherit!important}.slider-horizontal{height:6px}.slider-horizontal .slider-handle{width:16px;height:16px;top:-6px;right:-8px}.slider-vertical{width:6px;height:300px}.slider-vertical .slider-handle{width:16px;height:16px;top:-8px;right:-6px}.slider-txt-dir-rtl.slider-horizontal .slider-handle{left:-8px;right:auto}.slider-base{background-color:#d4e0e7}.slider-base,.slider-connects{border-radius:3px}.slider-connect{background:#41b883;cursor:pointer}.slider-draggable{cursor:ew-resize}.slider-vertical .slider-draggable{cursor:ns-resize}.slider-handle{width:16px;height:16px;border-radius:50%;background:#fff;border:0;right:-8px;box-shadow:.5px .5px 2px 1px #00000052;cursor:-webkit-grab;cursor:grab}.slider-handle:focus{outline:none}.slider-active{box-shadow:.5px .5px 2px 1px #0000006b;cursor:-webkit-grabbing;cursor:grabbing}[disabled] .slider-connect{background:#b8b8b8}[disabled].slider-handle,[disabled] .slider-handle,[disabled].slider-target{cursor:not-allowed}[disabled] .slider-tooltip{background:#b8b8b8;border-color:#b8b8b8}.slider-tooltip{position:absolute;display:block;font-size:14px;font-weight:500;white-space:nowrap;padding:2px 5px;min-width:20px;text-align:center;color:#fff;border-radius:5px;border:1px solid #41b883;background:#41b883}.slider-horizontal .slider-tooltip{transform:translate(-50%);left:50%;bottom:24px}.slider-horizontal .slider-tooltip:before{content:"";position:absolute;bottom:-10px;left:50%;width:0;height:0;border:5px solid transparent;border-top-color:inherit;transform:translate(-50%)}.slider-vertical .slider-tooltip{transform:translateY(-50%);top:50%;right:24px}.slider-vertical .slider-tooltip:before{content:"";position:absolute;right:-10px;top:50%;width:0;height:0;border:5px solid transparent;border-left-color:inherit;transform:translateY(-50%)}.slider-horizontal .slider-origin>.slider-tooltip{transform:translate(50%);left:auto;bottom:14px}.slider-vertical .slider-origin>.slider-tooltip{transform:translateY(-18px);top:auto;right:18px}.slider-pips,.slider-pips *{box-sizing:border-box}.slider-pips{position:absolute;color:#999}.slider-value{position:absolute;white-space:nowrap;text-align:center}.slider-value-sub{color:#ccc;font-size:10px}.slider-marker{position:absolute;background:#ccc}.slider-marker-large,.slider-marker-sub{background:#aaa}.slider-pips-horizontal{padding:10px 0;height:80px;top:100%;left:0;width:100%}.slider-value-horizontal{transform:translate(-50%,50%)}.slider-rtl .slider-value-horizontal{transform:translate(50%,50%)}.slider-marker-horizontal.slider-marker{margin-left:-1px;width:2px;height:5px}.slider-marker-horizontal.slider-marker-sub{height:10px}.slider-marker-horizontal.slider-marker-large{height:15px}.slider-pips-vertical{padding:0 10px;height:100%;top:0;left:100%}.slider-value-vertical{transform:translateY(-50%);padding-left:25px}.slider-rtl .slider-value-vertical{transform:translateY(50%)}.slider-marker-vertical.slider-marker{width:5px;height:2px;margin-top:-1px}.slider-marker-vertical.slider-marker-sub{width:10px}.slider-marker-vertical.slider-marker-large{width:15px}.slider[data-v-8f297ee6]{padding:10px 0}.slider .slider-connect{background-color:#0075ff}.slider .slider-tooltip{background-color:#0075ff;border-color:#0075ff;display:none}.slider:hover .slider-tooltip{display:block}.slider .slider-active .slider-tooltip{display:block}.vue-toggles{cursor:pointer;display:flex;align-items:center;border-radius:9999px;overflow:hidden;transition:background-color ease .2s,width ease .2s,height ease .2s}.vue-toggles .dot{position:relative;display:flex;align-items:center;border-radius:9999px;box-shadow:0 1px 3px #0000001a,0 1px 2px #0000000f;transition:margin ease .2s}.vue-toggles .text{position:absolute;font-family:inherit;user-select:none;white-space:nowrap}@media all and (-ms-high-contrast: none){.vue-toggles .text{top:50%;transform:translateY(-50%)}}@media (prefers-reduced-motion){.vue-toggles,.vue-toggles *,.vue-toggles *:before,.vue-toggles *:after{animation:none!important;transition:none!important;transition-duration:none!important}}.help-icon{display:inline-block;margin-left:2px}.icon{width:16px;height:16px;vertical-align:top;padding:0 2px 1px}.buttons a:first-child{margin-left:0}.buttons a{margin:0 5px;background-color:#f5f5f5;border-radius:0;color:#000!important;padding:2px 10px;border-color:#fff;text-decoration:none!important;font-family:arial,sans-serif;font-size:13.33px;border-width:1px;border-style:solid;border-bottom-color:#ccc;border-right-color:#ccc}.buttons a:hover{background-color:#fff}.buttons a.mouse-down{border-bottom-color:#fff;border-right-color:#fff;border-top-color:#ccc;border-left-color:#ccc}.auto-component input.method[data-v-26c389a5]{width:40px}.auto-component[data-v-26c389a5]{display:table;width:100%}.auto-component>*[data-v-26c389a5]{display:table-row}.auto-component>*>*[data-v-26c389a5]{display:table-cell;padding:0 0 10px}.auto-component>*>div[data-v-26c389a5]:first-child{min-width:210px;vertical-align:top;padding-top:0}.auto-component>*>div[data-v-26c389a5]:last-child{width:100%;box-sizing:border-box}.fade-enter-active[data-v-26c389a5]{transition:all .5s;opacity:0;transform:scale(.7)}.fade-enter-to[data-v-26c389a5]{opacity:1;transform:scale(1)}.fade-leave-active[data-v-26c389a5]{transition:all .5s;transform:scale(1);opacity:1}.fade-leave-to[data-v-26c389a5]{opacity:0;transform:scale(.7)}@media (max-width: 600px){.auto-component[data-v-26c389a5]{display:block}.auto-component>*[data-v-26c389a5]{display:block}.auto-component>*>*[data-v-26c389a5]{display:block}}.autoui-table[data-v-30912c7e]{display:table}.autoui-table>*[data-v-30912c7e]{display:table-row}.autoui-table>*>*[data-v-30912c7e]{display:table-cell;padding:5px 20px 5px 0}.table-inline-block>div>*[data-v-30912c7e]{display:inline-block;margin-right:10px;padding:5px 20px 5px 0}.table-inline-block>div>*[data-v-30912c7e]:first-child{width:120px}.view-select[data-v-30912c7e]{display:block;text-align:right}.view *[data-v-30912c7e]:first-child{display:inline-block;margin-right:10px}.view *[data-v-30912c7e]:last-child{width:200px;display:inline-block}.convert-options button{float:right;margin-top:10px}.welcome{padding:20px 30px}.welcome h4{margin-bottom:3px}.welcome li{list-style-type:disc}.welcome ul{margin:0 0 20px}.welcome .headline h3{margin-top:0;padding-top:0;font-size:24px}.convertOptionsButton{position:absolute;right:10px;top:8px}.splitpanes__pane{background-color:#fff!important;padding:0;min-height:80px;box-shadow:inset 0 0 3px #0003}.pane-content{height:100%;overflow-y:auto}.pane-content>*{padding:10px 20px}body,html{height:100%;margin:0;padding:0}.mainpanel,#webpconvert-filemanager{height:100%;min-height:300px;position:relative}.mainpanel{min-height:400px}.wcfm,input{font-family:"Avenir",Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:#222;font-size:14px}input{padding:5px 8px;border-color:#333;border-width:1px;box-sizing:border-box}div .multiselect{min-height:30px}div .multiselect__select{height:30px;line-height:16px;width:30px}div .multiselect__select:before{border-top-color:#000;border-width:6px 6px 0 6px}div .multiselect__single{margin-bottom:3px}div .multiselect__tags{border-color:#333;border-radius:0;padding:5px 40px 0 5px;min-height:30px}li.multiselect__element{margin-left:0}div .multiselect__tag{margin-bottom:0;padding-bottom:3px;padding-top:3px}fieldset[disabled] .multiselect{pointer-events:none}.multiselect__spinner{position:absolute;right:1px;top:1px;width:48px;height:35px;background:#fff;display:block}.multiselect__spinner:after,.multiselect__spinner:before{position:absolute;content:"";top:50%;left:50%;margin:-8px 0 0 -8px;width:16px;height:16px;border-radius:100%;border-color:#41b883 transparent transparent;border-style:solid;border-width:2px;box-shadow:0 0 0 1px transparent}.multiselect__spinner:before{-webkit-animation:spinning 2.4s cubic-bezier(.41,.26,.2,.62);animation:spinning 2.4s cubic-bezier(.41,.26,.2,.62);-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.multiselect__spinner:after{-webkit-animation:spinning 2.4s cubic-bezier(.51,.09,.21,.8);animation:spinning 2.4s cubic-bezier(.51,.09,.21,.8);-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.multiselect__loading-enter-active,.multiselect__loading-leave-active{transition:opacity .4s ease-in-out;opacity:1}.multiselect__loading-enter,.multiselect__loading-leave-active{opacity:0}.multiselect,.multiselect__input,.multiselect__single{font-family:inherit;font-size:16px;touch-action:manipulation}.multiselect{box-sizing:content-box;display:block;position:relative;width:100%;min-height:40px;text-align:left;color:#35495e}.multiselect *{box-sizing:border-box}.multiselect:focus{outline:none}.multiselect--disabled{background:#ededed;pointer-events:none;opacity:.6}.multiselect--active{z-index:50}.multiselect--active:not(.multiselect--above) .multiselect__current,.multiselect--active:not(.multiselect--above) .multiselect__input,.multiselect--active:not(.multiselect--above) .multiselect__tags{border-bottom-left-radius:0;border-bottom-right-radius:0}.multiselect--active .multiselect__select{transform:rotate(180deg)}.multiselect--above.multiselect--active .multiselect__current,.multiselect--above.multiselect--active .multiselect__input,.multiselect--above.multiselect--active .multiselect__tags{border-top-left-radius:0;border-top-right-radius:0}.multiselect__input,.multiselect__single{position:relative;display:inline-block;min-height:20px;line-height:20px;border:none;border-radius:5px;background:#fff;padding:0 0 0 5px;width:100%;transition:border .1s ease;box-sizing:border-box;margin-bottom:8px;vertical-align:top}.multiselect__input::-moz-placeholder{color:#35495e}.multiselect__input:-ms-input-placeholder{color:#35495e}.multiselect__input::placeholder{color:#35495e}.multiselect__tag~.multiselect__input,.multiselect__tag~.multiselect__single{width:auto}.multiselect__input:hover,.multiselect__single:hover{border-color:#cfcfcf}.multiselect__input:focus,.multiselect__single:focus{border-color:#a8a8a8;outline:none}.multiselect__single{padding-left:5px;margin-bottom:8px}.multiselect__tags-wrap{display:inline}.multiselect__tags{min-height:40px;display:block;padding:8px 40px 0 8px;border-radius:5px;border:1px solid #e8e8e8;background:#fff;font-size:14px}.multiselect__tag{position:relative;display:inline-block;padding:4px 26px 4px 10px;border-radius:5px;margin-right:10px;color:#fff;line-height:1;background:#41b883;margin-bottom:5px;white-space:nowrap;overflow:hidden;max-width:100%;text-overflow:ellipsis}.multiselect__tag-icon{cursor:pointer;margin-left:7px;position:absolute;right:0;top:0;bottom:0;font-weight:700;font-style:normal;width:22px;text-align:center;line-height:22px;transition:all .2s ease;border-radius:5px}.multiselect__tag-icon:after{content:"\d7";color:#266d4d;font-size:14px}.multiselect__tag-icon:focus:after,.multiselect__tag-icon:hover:after{color:#fff}.multiselect__current{min-height:40px;overflow:hidden;padding:8px 30px 0 12px;white-space:nowrap;border-radius:5px;border:1px solid #e8e8e8}.multiselect__current,.multiselect__select{line-height:16px;box-sizing:border-box;display:block;margin:0;text-decoration:none;cursor:pointer}.multiselect__select{position:absolute;width:40px;height:38px;right:1px;top:1px;padding:4px 8px;text-align:center;transition:transform .2s ease}.multiselect__select:before{position:relative;right:0;top:65%;color:#999;margin-top:4px;border-style:solid;border-width:5px 5px 0 5px;border-color:#999 transparent transparent transparent;content:""}.multiselect__placeholder{color:#adadad;display:inline-block;margin-bottom:10px;padding-top:2px}.multiselect--active .multiselect__placeholder{display:none}.multiselect__content-wrapper{position:absolute;display:block;background:#fff;width:100%;max-height:240px;overflow:auto;border:1px solid #e8e8e8;border-top:none;border-bottom-left-radius:5px;border-bottom-right-radius:5px;z-index:50;-webkit-overflow-scrolling:touch}.multiselect__content{list-style:none;display:inline-block;padding:0;margin:0;min-width:100%;vertical-align:top}.multiselect--above .multiselect__content-wrapper{bottom:100%;border-radius:5px 5px 0 0;border-bottom:none;border-top:1px solid #e8e8e8}.multiselect__content::-webkit-scrollbar{display:none}.multiselect__element{display:block}.multiselect__option{display:block;padding:12px;min-height:40px;line-height:16px;text-decoration:none;text-transform:none;vertical-align:middle;position:relative;cursor:pointer;white-space:nowrap}.multiselect__option:after{top:0;right:0;position:absolute;line-height:40px;padding-right:12px;padding-left:20px;font-size:13px}.multiselect__option--highlight{background:#41b883;outline:none;color:#fff}.multiselect__option--highlight:after{content:attr(data-select);background:#41b883;color:#fff}.multiselect__option--selected{background:#f3f3f3;color:#35495e;font-weight:700}.multiselect__option--selected:after{content:attr(data-selected);color:silver}.multiselect__option--selected.multiselect__option--highlight{background:#ff6a6a;color:#fff}.multiselect__option--selected.multiselect__option--highlight:after{background:#ff6a6a;content:attr(data-deselect);color:#fff}.multiselect--disabled .multiselect__current,.multiselect--disabled .multiselect__select{background:#ededed;color:#a6a6a6}.multiselect__option--disabled{background:#ededed!important;color:#a6a6a6!important;cursor:text;pointer-events:none}.multiselect__option--group{background:#ededed;color:#35495e}.multiselect__option--group.multiselect__option--highlight{background:#35495e;color:#fff}.multiselect__option--group.multiselect__option--highlight:after{background:#35495e}.multiselect__option--disabled.multiselect__option--highlight{background:#dedede}.multiselect__option--group-selected.multiselect__option--highlight{background:#ff6a6a;color:#fff}.multiselect__option--group-selected.multiselect__option--highlight:after{background:#ff6a6a;content:attr(data-deselect);color:#fff}.multiselect-enter-active,.multiselect-leave-active{transition:all .15s ease}.multiselect-enter,.multiselect-leave-active{opacity:0}.multiselect__strong{margin-bottom:8px;line-height:20px;display:inline-block;vertical-align:top}[dir=rtl] .multiselect{text-align:right}[dir=rtl] .multiselect__select{right:auto;left:1px}[dir=rtl] .multiselect__tags{padding:8px 8px 0 40px}[dir=rtl] .multiselect__content{text-align:right}[dir=rtl] .multiselect__option:after{right:auto;left:0}[dir=rtl] .multiselect__clear{right:auto;left:12px}[dir=rtl] .multiselect__spinner{right:auto;left:1px}@-webkit-keyframes spinning{0%{transform:rotate(0)}to{transform:rotate(2turn)}}@keyframes spinning{0%{transform:rotate(0)}to{transform:rotate(2turn)}}div.v-popper--theme-menu .v-popper__inner{background-color:#66f;color:#fff;padding:10px 15px 11px;line-height:1.2;max-width:300px}.v-popper__inner a{color:#fff;text-decoration:underline}.v-popper__inner p{margin-top:0}.v-popper__inner p:last-child{margin-bottom:0}.table-table{display:table}.table-table>*{display:table-row}.table-table>*>*{display:table-cell;padding:5px 20px 5px 0}.table-inline-block>div>*{display:inline-block;margin-right:10px;padding:5px 20px 5px 0}.table-inline-block>div>*:first-child{width:120px}.resize-observer[data-v-b329ee4c]{position:absolute;top:0;left:0;z-index:-1;width:100%;height:100%;border:none;background-color:transparent;pointer-events:none;display:block;overflow:hidden;opacity:0}.resize-observer[data-v-b329ee4c] object{display:block;position:absolute;top:0;left:0;height:100%;width:100%;overflow:hidden;pointer-events:none;z-index:-1}.v-popper--theme-dropdown .v-popper__inner{background:#fff;color:#000;padding:24px;border-radius:6px;box-shadow:0 6px 30px #0000001a}.v-popper--theme-dropdown .v-popper__arrow{border-color:#fff}.v-popper{width:max-content}.v-popper--theme-tooltip .v-popper__inner{background:rgba(0,0,0,.8);color:#fff;border-radius:6px;padding:7px 12px 6px}.v-popper--theme-tooltip .v-popper__arrow{border-color:#000c}.v-popper__popper{z-index:10000}.v-popper__popper.v-popper__popper--hidden{visibility:hidden;opacity:0;transition:opacity .15s,visibility .15s}.v-popper__popper.v-popper__popper--shown{visibility:visible;opacity:1;transition:opacity .15s}.v-popper__popper.v-popper__popper--skip-transition,.v-popper__popper.v-popper__popper--skip-transition>.v-popper__wrapper{transition:none!important}.v-popper__inner{position:relative}.v-popper__arrow-container{width:10px;height:10px}.v-popper__arrow{border-style:solid;position:relative;width:0;height:0}.v-popper__popper[data-popper-placement^=top] .v-popper__arrow{border-width:5px 5px 0 5px;border-left-color:transparent!important;border-right-color:transparent!important;border-bottom-color:transparent!important}.v-popper__popper[data-popper-placement^=bottom] .v-popper__arrow-container{top:0}.v-popper__popper[data-popper-placement^=bottom] .v-popper__arrow{border-width:0 5px 5px 5px;border-left-color:transparent!important;border-right-color:transparent!important;border-top-color:transparent!important;top:-5px}.v-popper__popper[data-popper-placement^=right] .v-popper__arrow{border-width:5px 5px 5px 0;border-left-color:transparent!important;border-top-color:transparent!important;border-bottom-color:transparent!important;left:-5px}.v-popper__popper[data-popper-placement^=left] .v-popper__arrow-container{right:-5px}.v-popper__popper[data-popper-placement^=left] .v-popper__arrow{border-width:5px 0 5px 5px;border-top-color:transparent!important;border-right-color:transparent!important;border-bottom-color:transparent!important;right:-5px}
|
lib/wcfm/index.659b742a.css
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
.splitpanes{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%;height:100%}.splitpanes--vertical{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.splitpanes--horizontal{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.splitpanes--dragging *{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.splitpanes__pane{width:100%;height:100%;overflow:hidden}.splitpanes--vertical .splitpanes__pane{-webkit-transition:width .2s ease-out;transition:width .2s ease-out}.splitpanes--horizontal .splitpanes__pane{-webkit-transition:height .2s ease-out;transition:height .2s ease-out}.splitpanes--dragging .splitpanes__pane{-webkit-transition:none;transition:none}.splitpanes__splitter{-ms-touch-action:none;touch-action:none}.splitpanes--vertical>.splitpanes__splitter{min-width:1px;cursor:col-resize}.splitpanes--horizontal>.splitpanes__splitter{min-height:1px;cursor:row-resize}.splitpanes.default-theme .splitpanes__pane{background-color:#f2f2f2}.splitpanes.default-theme .splitpanes__splitter{background-color:#fff;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;-ms-flex-negative:0;flex-shrink:0}.splitpanes.default-theme .splitpanes__splitter:after,.splitpanes.default-theme .splitpanes__splitter:before{content:"";position:absolute;top:50%;left:50%;background-color:#00000026;-webkit-transition:background-color .3s;transition:background-color .3s}.splitpanes.default-theme .splitpanes__splitter:hover:after,.splitpanes.default-theme .splitpanes__splitter:hover:before{background-color:#00000040}.splitpanes.default-theme .splitpanes__splitter:first-child{cursor:auto}.default-theme.splitpanes .splitpanes .splitpanes__splitter{z-index:1}.default-theme.splitpanes--vertical>.splitpanes__splitter,.default-theme .splitpanes--vertical>.splitpanes__splitter{width:7px;border-left:1px solid #eee;margin-left:-1px}.default-theme.splitpanes--vertical>.splitpanes__splitter:after,.default-theme .splitpanes--vertical>.splitpanes__splitter:after,.default-theme.splitpanes--vertical>.splitpanes__splitter:before,.default-theme .splitpanes--vertical>.splitpanes__splitter:before{-webkit-transform:translateY(-50%);transform:translateY(-50%);width:1px;height:30px}.default-theme.splitpanes--vertical>.splitpanes__splitter:before,.default-theme .splitpanes--vertical>.splitpanes__splitter:before{margin-left:-2px}.default-theme.splitpanes--vertical>.splitpanes__splitter:after,.default-theme .splitpanes--vertical>.splitpanes__splitter:after{margin-left:1px}.default-theme.splitpanes--horizontal>.splitpanes__splitter,.default-theme .splitpanes--horizontal>.splitpanes__splitter{height:7px;border-top:1px solid #eee;margin-top:-1px}.default-theme.splitpanes--horizontal>.splitpanes__splitter:after,.default-theme .splitpanes--horizontal>.splitpanes__splitter:after,.default-theme.splitpanes--horizontal>.splitpanes__splitter:before,.default-theme .splitpanes--horizontal>.splitpanes__splitter:before{-webkit-transform:translateX(-50%);transform:translate(-50%);width:30px;height:1px}.default-theme.splitpanes--horizontal>.splitpanes__splitter:before,.default-theme .splitpanes--horizontal>.splitpanes__splitter:before{margin-top:-2px}.default-theme.splitpanes--horizontal>.splitpanes__splitter:after,.default-theme .splitpanes--horizontal>.splitpanes__splitter:after{margin-top:1px}.selectbox[data-v-3ed78ba0]{width:200px;position:relative;display:inline-block}.selectbox .box[data-v-3ed78ba0]{border:1px solid black;padding:5px 10px;width:100%;box-sizing:border-box;cursor:pointer;user-select:none}.selectbox .box[data-v-3ed78ba0]:after{position:absolute;content:"";top:14px;right:10px;width:0;height:0;border:6px solid transparent;border-color:black transparent transparent transparent}.selectbox .box.is-open[data-v-3ed78ba0]:after{border-color:transparent transparent black transparent;top:6px}.selectbox .dropdown[data-v-3ed78ba0]{position:absolute;z-index:100;background-color:#fff;border:1px solid #eee;left:0;right:0}.selectbox .dropdown .option[data-v-3ed78ba0]{padding:5px 10px;border-bottom:1px solid #eee}.selectbox .dropdown .option .icon[data-v-3ed78ba0]{width:18px;height:18px;float:right}.selectbox .dropdown .option[data-v-3ed78ba0]:hover{background-color:#eee;cursor:pointer;user-select:none}.help-icon{display:inline-block;margin-left:2px}.convert-option-menu{display:inline-block;margin-left:2px}.menu-inner{font-size:16px}.icon{width:16px;height:16px;vertical-align:top;padding:0 2px 1px}.buttons a:first-child{margin-left:0}.buttons a{margin:0 5px;background-color:#f5f5f5;border-radius:0;color:#000!important;padding:2px 10px;border-color:#fff;text-decoration:none!important;font-family:arial,sans-serif;font-size:13.33px;border-width:1px;border-style:solid;border-bottom-color:#ccc;border-right-color:#ccc}.buttons a:hover{background-color:#fff}.buttons a.mouse-down{border-bottom-color:#fff;border-right-color:#fff;border-top-color:#ccc;border-left-color:#ccc}input[data-v-641ada22]{width:100%}input.small[data-v-641ada22]{max-width:100px}.multiselect__option--selected .click-to-add{display:none}.click-to-add[data-v-6b6f53d2]{float:right;font-size:13px}.vue-toggles{cursor:pointer;display:flex;align-items:center;border-radius:9999px;overflow:hidden;transition:background-color ease .2s,width ease .2s,height ease .2s}.vue-toggles .dot{position:relative;display:flex;align-items:center;border-radius:9999px;box-shadow:0 1px 3px #0000001a,0 1px 2px #0000000f;transition:margin ease .2s}.vue-toggles .text{position:absolute;font-family:inherit;user-select:none;white-space:nowrap}@media all and (-ms-high-contrast: none){.vue-toggles .text{top:50%;transform:translateY(-50%)}}@media (prefers-reduced-motion){.vue-toggles,.vue-toggles *,.vue-toggles *:before,.vue-toggles *:after{animation:none!important;transition:none!important;transition-duration:none!important}}.slider-target,.slider-target *{-webkit-touch-callout:none;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-user-select:none;touch-action:none;-ms-user-select:none;-moz-user-select:none;user-select:none;box-sizing:border-box}.slider-target{position:relative}.slider-base,.slider-connects{width:100%;height:100%;position:relative;z-index:1}.slider-connects{overflow:hidden;z-index:0}.slider-connect,.slider-origin{will-change:transform;position:absolute;z-index:1;top:0;right:0;-ms-transform-origin:0 0;-webkit-transform-origin:0 0;-webkit-transform-style:preserve-3d;transform-origin:0 0;transform-style:flat}.slider-connect{height:100%;width:100%}.slider-origin{height:10%;width:10%}.slider-txt-dir-rtl.slider-horizontal .slider-origin{left:0;right:auto}.slider-vertical .slider-origin{width:0}.slider-horizontal .slider-origin{height:0}.slider-handle{-webkit-backface-visibility:hidden;backface-visibility:hidden;position:absolute}.slider-touch-area{height:100%;width:100%}.slider-state-tap .slider-connect,.slider-state-tap .slider-origin{transition:transform .3s}.slider-state-drag *{cursor:inherit!important}.slider-horizontal{height:6px}.slider-horizontal .slider-handle{width:16px;height:16px;top:-6px;right:-8px}.slider-vertical{width:6px;height:300px}.slider-vertical .slider-handle{width:16px;height:16px;top:-8px;right:-6px}.slider-txt-dir-rtl.slider-horizontal .slider-handle{left:-8px;right:auto}.slider-base{background-color:#d4e0e7}.slider-base,.slider-connects{border-radius:3px}.slider-connect{background:#41b883;cursor:pointer}.slider-draggable{cursor:ew-resize}.slider-vertical .slider-draggable{cursor:ns-resize}.slider-handle{width:16px;height:16px;border-radius:50%;background:#fff;border:0;right:-8px;box-shadow:.5px .5px 2px 1px #00000052;cursor:-webkit-grab;cursor:grab}.slider-handle:focus{outline:none}.slider-active{box-shadow:.5px .5px 2px 1px #0000006b;cursor:-webkit-grabbing;cursor:grabbing}[disabled] .slider-connect{background:#b8b8b8}[disabled].slider-handle,[disabled] .slider-handle,[disabled].slider-target{cursor:not-allowed}[disabled] .slider-tooltip{background:#b8b8b8;border-color:#b8b8b8}.slider-tooltip{position:absolute;display:block;font-size:14px;font-weight:500;white-space:nowrap;padding:2px 5px;min-width:20px;text-align:center;color:#fff;border-radius:5px;border:1px solid #41b883;background:#41b883}.slider-horizontal .slider-tooltip{transform:translate(-50%);left:50%;bottom:24px}.slider-horizontal .slider-tooltip:before{content:"";position:absolute;bottom:-10px;left:50%;width:0;height:0;border:5px solid transparent;border-top-color:inherit;transform:translate(-50%)}.slider-vertical .slider-tooltip{transform:translateY(-50%);top:50%;right:24px}.slider-vertical .slider-tooltip:before{content:"";position:absolute;right:-10px;top:50%;width:0;height:0;border:5px solid transparent;border-left-color:inherit;transform:translateY(-50%)}.slider-horizontal .slider-origin>.slider-tooltip{transform:translate(50%);left:auto;bottom:14px}.slider-vertical .slider-origin>.slider-tooltip{transform:translateY(-18px);top:auto;right:18px}.slider-pips,.slider-pips *{box-sizing:border-box}.slider-pips{position:absolute;color:#999}.slider-value{position:absolute;white-space:nowrap;text-align:center}.slider-value-sub{color:#ccc;font-size:10px}.slider-marker{position:absolute;background:#ccc}.slider-marker-large,.slider-marker-sub{background:#aaa}.slider-pips-horizontal{padding:10px 0;height:80px;top:100%;left:0;width:100%}.slider-value-horizontal{transform:translate(-50%,50%)}.slider-rtl .slider-value-horizontal{transform:translate(50%,50%)}.slider-marker-horizontal.slider-marker{margin-left:-1px;width:2px;height:5px}.slider-marker-horizontal.slider-marker-sub{height:10px}.slider-marker-horizontal.slider-marker-large{height:15px}.slider-pips-vertical{padding:0 10px;height:100%;top:0;left:100%}.slider-value-vertical{transform:translateY(-50%);padding-left:25px}.slider-rtl .slider-value-vertical{transform:translateY(50%)}.slider-marker-vertical.slider-marker{width:5px;height:2px;margin-top:-1px}.slider-marker-vertical.slider-marker-sub{width:10px}.slider-marker-vertical.slider-marker-large{width:15px}.slider[data-v-636c0afb]{padding:10px 0}.slider .slider-connect{background-color:#0075ff}.slider .slider-tooltip{background-color:#0075ff;border-color:#0075ff;display:none}.slider:hover .slider-tooltip{display:block}.slider .slider-active .slider-tooltip{display:block}.convert-option>div[data-v-5def6a67]:first-child{min-width:210px;vertical-align:top;padding-top:10px}.convert-option>div[data-v-5def6a67]:last-child{width:300px;box-sizing:border-box}.convert-option input.method[data-v-5def6a67]{width:40px}.fade-enter-active[data-v-5def6a67]{transition:all 1s;opacity:0;transform:scale(0);transform:translate(30px)}.fade-enter-to[data-v-5def6a67]{opacity:1;transform:translate(0);transform:scale(1)}.fade-leave-active[data-v-5def6a67]{transition:all 1s;opacity:1}.fade-leave-to[data-v-5def6a67]{opacity:0}.view-select[data-v-563ca147]{display:block;text-align:right}.view *[data-v-563ca147]:first-child{display:inline-block;margin-right:10px}.view *[data-v-563ca147]:last-child{width:200px;display:inline-block}.fileitem.selected p[data-v-4fb0cc48]{background:#ccc!important}.fileitem[data-v-4fb0cc48]{vertical-align:middle;white-space:nowrap}.fileitem p[data-v-4fb0cc48]:hover{background:#eee}.fileitem p[data-v-4fb0cc48]{user-select:none;cursor:pointer;margin:0;padding:3px;line-height:25px;border-bottom:1px solid #f2f2f2}.fileitem p .fold-unfold[data-v-4fb0cc48]{user-select:none;cursor:pointer}.fileitem p .fold-unfold.empty[data-v-4fb0cc48]{visibility:hidden}.fileitem p svg.icon-unfold[data-v-4fb0cc48],.fileitem p svg.icon-fold[data-v-4fb0cc48]{width:12px;height:12px;vertical-align:middle;padding:3px;margin-right:3px;display:inline-block;border:0px solid grey}.fileitem p svg.icon-folder[data-v-4fb0cc48],.fileitem p svg.icon-file[data-v-4fb0cc48]{width:20px;height:20px;display:inline;vertical-align:middle;padding-top:1px;padding-bottom:2px;padding-right:5px}.fileitem p svg.icon-file[data-v-4fb0cc48]{margin-left:22px}ul{list-style-type:none;padding:0;margin:0}li{margin:0 0 0 20px}.modal-mask{position:fixed;z-index:9998;top:0;left:0;width:100%;height:100%;background-color:#00000080;display:table}.modal-mask .modal-wrapper{height:100%;width:100%}.modal-mask .modal-wrapper .modal-container{padding:0;background-color:#fff;border-radius:2px;box-shadow:0 2px 8px #00000054;font-family:Helvetica,Arial,sans-serif;position:relative}.modal-mask .modal-wrapper .modal-container .title{position:absolute;left:0px;top:0;right:0;height:20px;background-color:#ccc;padding:5px 0 0 15px;font-size:14px;font-weight:bold}.modal-mask .modal-wrapper .modal-container .close-button{position:absolute;right:2px;top:2px;background-color:#fff;padding:2px 5px;font-size:12px;z-index:999;border-radius:20px;border:1px solid #ccc}.modal-mask .modal-wrapper .modal-container .close-button:hover{cursor:pointer}.modal-mask .modal-wrapper .modal-container .modal-body{position:absolute;top:25px;bottom:0px;left:0;right:0;overflow-y:auto;padding:20px}.modal-mask .modal-wrapper .modal-container .modal-body .close-button-with-text{text-align:right;margin-bottom:5px}.modal-mask .modal-wrapper .modal-container .modal-body .close-button-with-text button{padding:3px 20px}.modal-enter-active,.modal-leave-active{transition:opacity .5s ease}.modal-enter-from,.modal-leave-to{opacity:0}.image-viewport{position:relative}.image-viewport>.zoomer{width:100%;border:solid 1px silver;overflow:hidden}.image-viewport>.zoomer img{vertical-align:top;object-fit:contain;width:100%;height:100%;user-drag:none;-webkit-user-drag:none;-moz-user-drag:none}.image-viewport .zoom-info{display:none;position:absolute;bottom:0px;right:0px;padding:1px 4px;font-size:9px;background-color:#fff}.image-viewport:hover .zoom-info{display:block;cursor:pointer}.variant[data-v-0372e854]{display:inline-block;width:48%;margin-right:2%;margin-bottom:20px}.variant .header .title[data-v-0372e854]{display:inline-block}.variant .header .size[data-v-0372e854]{display:inline-block;float:right}.variant .header .zoom[data-v-0372e854]{display:inline-block;float:right;visibility:hidden}.variant .footer[data-v-0372e854]{font-style:italic;margin-top:2px}.variant .footer .select[data-v-0372e854]{float:right}.variant .footer .select button[data-v-0372e854]{padding:3px 10px}.variant:hover .header .zoom[data-v-0372e854]{visibility:visible}.variants-component .variants .variant.selected[data-v-25a3327e]{background-color:#ccc}.variants-component .variants .variant[data-v-25a3327e]{display:inline-block;width:47%;margin-right:1%;padding:1%;margin-bottom:20px}.variants-component .variants .variant .header .title[data-v-25a3327e]{display:inline-block}.variants-component .variants .variant .header .size[data-v-25a3327e]{display:inline-block;float:right}.variants-component .variants .variant .header .zoom[data-v-25a3327e]{display:inline-block;float:right;visibility:hidden}.variants-component .variants .variant .footer[data-v-25a3327e]{font-style:italic}.variants-component .variants .variant .footer .select[data-v-25a3327e]{float:right}.variants-component .variants .variant .footer .select button[data-v-25a3327e]{padding:3px 10px}.variants-component .variants .variant:hover .header .zoom[data-v-25a3327e]{visibility:visible}.file-properties .error[data-v-1f62a342]{color:red;font-weight:bold}.file-properties .path[data-v-1f62a342]{margin-bottom:20px}.file-properties .path .path[data-v-1f62a342]{color:#666;font-style:italic}.file-properties .log-button[data-v-1f62a342]{margin-left:15px}.file-properties .icon-converting[data-v-1f62a342]{padding:0 5px}.folder-properties .path{margin-bottom:20px}.folder-properties .path .path{color:#666;font-style:italic}.welcome{padding:20px 30px}.welcome h4{margin-bottom:3px}.welcome li{list-style-type:disc}.welcome ul{margin:0 0 20px}.welcome .headline h3{margin-top:0;padding-top:0;font-size:24px}.convertOptionsButton{position:absolute;right:10px;top:8px}.splitpanes__pane{background-color:#fff!important;padding:0;min-height:80px;box-shadow:inset 0 0 3px #0003}.pane-content{height:100%;overflow-y:auto}.pane-content>*{padding:10px 20px}body,html{height:100%;margin:0;padding:0}.mainpanel,#webpconvert-filemanager{height:100%;min-height:300px;position:relative}.mainpanel{min-height:400px}.wcfm,input{font-family:"Avenir",Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:#222;font-size:14px}input{padding:5px 8px;border-color:#333;border-width:1px;box-sizing:border-box}div .multiselect{min-height:30px}div .multiselect__select{height:30px;line-height:16px;width:30px}div .multiselect__select:before{border-top-color:#000;border-width:6px 6px 0 6px}div .multiselect__single{margin-bottom:3px}div .multiselect__tags{border-color:#333;border-radius:0;padding:5px 40px 0 5px;min-height:30px}li.multiselect__element{margin-left:0}div .multiselect__tag{margin-bottom:0;padding-bottom:3px;padding-top:3px}fieldset[disabled] .multiselect{pointer-events:none}.multiselect__spinner{position:absolute;right:1px;top:1px;width:48px;height:35px;background:#fff;display:block}.multiselect__spinner:after,.multiselect__spinner:before{position:absolute;content:"";top:50%;left:50%;margin:-8px 0 0 -8px;width:16px;height:16px;border-radius:100%;border-color:#41b883 transparent transparent;border-style:solid;border-width:2px;box-shadow:0 0 0 1px transparent}.multiselect__spinner:before{-webkit-animation:spinning 2.4s cubic-bezier(.41,.26,.2,.62);animation:spinning 2.4s cubic-bezier(.41,.26,.2,.62);-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.multiselect__spinner:after{-webkit-animation:spinning 2.4s cubic-bezier(.51,.09,.21,.8);animation:spinning 2.4s cubic-bezier(.51,.09,.21,.8);-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.multiselect__loading-enter-active,.multiselect__loading-leave-active{transition:opacity .4s ease-in-out;opacity:1}.multiselect__loading-enter,.multiselect__loading-leave-active{opacity:0}.multiselect,.multiselect__input,.multiselect__single{font-family:inherit;font-size:16px;touch-action:manipulation}.multiselect{box-sizing:content-box;display:block;position:relative;width:100%;min-height:40px;text-align:left;color:#35495e}.multiselect *{box-sizing:border-box}.multiselect:focus{outline:none}.multiselect--disabled{background:#ededed;pointer-events:none;opacity:.6}.multiselect--active{z-index:50}.multiselect--active:not(.multiselect--above) .multiselect__current,.multiselect--active:not(.multiselect--above) .multiselect__input,.multiselect--active:not(.multiselect--above) .multiselect__tags{border-bottom-left-radius:0;border-bottom-right-radius:0}.multiselect--active .multiselect__select{transform:rotate(180deg)}.multiselect--above.multiselect--active .multiselect__current,.multiselect--above.multiselect--active .multiselect__input,.multiselect--above.multiselect--active .multiselect__tags{border-top-left-radius:0;border-top-right-radius:0}.multiselect__input,.multiselect__single{position:relative;display:inline-block;min-height:20px;line-height:20px;border:none;border-radius:5px;background:#fff;padding:0 0 0 5px;width:100%;transition:border .1s ease;box-sizing:border-box;margin-bottom:8px;vertical-align:top}.multiselect__input::-moz-placeholder{color:#35495e}.multiselect__input:-ms-input-placeholder{color:#35495e}.multiselect__input::placeholder{color:#35495e}.multiselect__tag~.multiselect__input,.multiselect__tag~.multiselect__single{width:auto}.multiselect__input:hover,.multiselect__single:hover{border-color:#cfcfcf}.multiselect__input:focus,.multiselect__single:focus{border-color:#a8a8a8;outline:none}.multiselect__single{padding-left:5px;margin-bottom:8px}.multiselect__tags-wrap{display:inline}.multiselect__tags{min-height:40px;display:block;padding:8px 40px 0 8px;border-radius:5px;border:1px solid #e8e8e8;background:#fff;font-size:14px}.multiselect__tag{position:relative;display:inline-block;padding:4px 26px 4px 10px;border-radius:5px;margin-right:10px;color:#fff;line-height:1;background:#41b883;margin-bottom:5px;white-space:nowrap;overflow:hidden;max-width:100%;text-overflow:ellipsis}.multiselect__tag-icon{cursor:pointer;margin-left:7px;position:absolute;right:0;top:0;bottom:0;font-weight:700;font-style:normal;width:22px;text-align:center;line-height:22px;transition:all .2s ease;border-radius:5px}.multiselect__tag-icon:after{content:"\d7";color:#266d4d;font-size:14px}.multiselect__tag-icon:focus:after,.multiselect__tag-icon:hover:after{color:#fff}.multiselect__current{min-height:40px;overflow:hidden;padding:8px 30px 0 12px;white-space:nowrap;border-radius:5px;border:1px solid #e8e8e8}.multiselect__current,.multiselect__select{line-height:16px;box-sizing:border-box;display:block;margin:0;text-decoration:none;cursor:pointer}.multiselect__select{position:absolute;width:40px;height:38px;right:1px;top:1px;padding:4px 8px;text-align:center;transition:transform .2s ease}.multiselect__select:before{position:relative;right:0;top:65%;color:#999;margin-top:4px;border-style:solid;border-width:5px 5px 0 5px;border-color:#999 transparent transparent transparent;content:""}.multiselect__placeholder{color:#adadad;display:inline-block;margin-bottom:10px;padding-top:2px}.multiselect--active .multiselect__placeholder{display:none}.multiselect__content-wrapper{position:absolute;display:block;background:#fff;width:100%;max-height:240px;overflow:auto;border:1px solid #e8e8e8;border-top:none;border-bottom-left-radius:5px;border-bottom-right-radius:5px;z-index:50;-webkit-overflow-scrolling:touch}.multiselect__content{list-style:none;display:inline-block;padding:0;margin:0;min-width:100%;vertical-align:top}.multiselect--above .multiselect__content-wrapper{bottom:100%;border-radius:5px 5px 0 0;border-bottom:none;border-top:1px solid #e8e8e8}.multiselect__content::-webkit-scrollbar{display:none}.multiselect__element{display:block}.multiselect__option{display:block;padding:12px;min-height:40px;line-height:16px;text-decoration:none;text-transform:none;vertical-align:middle;position:relative;cursor:pointer;white-space:nowrap}.multiselect__option:after{top:0;right:0;position:absolute;line-height:40px;padding-right:12px;padding-left:20px;font-size:13px}.multiselect__option--highlight{background:#41b883;outline:none;color:#fff}.multiselect__option--highlight:after{content:attr(data-select);background:#41b883;color:#fff}.multiselect__option--selected{background:#f3f3f3;color:#35495e;font-weight:700}.multiselect__option--selected:after{content:attr(data-selected);color:silver}.multiselect__option--selected.multiselect__option--highlight{background:#ff6a6a;color:#fff}.multiselect__option--selected.multiselect__option--highlight:after{background:#ff6a6a;content:attr(data-deselect);color:#fff}.multiselect--disabled .multiselect__current,.multiselect--disabled .multiselect__select{background:#ededed;color:#a6a6a6}.multiselect__option--disabled{background:#ededed!important;color:#a6a6a6!important;cursor:text;pointer-events:none}.multiselect__option--group{background:#ededed;color:#35495e}.multiselect__option--group.multiselect__option--highlight{background:#35495e;color:#fff}.multiselect__option--group.multiselect__option--highlight:after{background:#35495e}.multiselect__option--disabled.multiselect__option--highlight{background:#dedede}.multiselect__option--group-selected.multiselect__option--highlight{background:#ff6a6a;color:#fff}.multiselect__option--group-selected.multiselect__option--highlight:after{background:#ff6a6a;content:attr(data-deselect);color:#fff}.multiselect-enter-active,.multiselect-leave-active{transition:all .15s ease}.multiselect-enter,.multiselect-leave-active{opacity:0}.multiselect__strong{margin-bottom:8px;line-height:20px;display:inline-block;vertical-align:top}[dir=rtl] .multiselect{text-align:right}[dir=rtl] .multiselect__select{right:auto;left:1px}[dir=rtl] .multiselect__tags{padding:8px 8px 0 40px}[dir=rtl] .multiselect__content{text-align:right}[dir=rtl] .multiselect__option:after{right:auto;left:0}[dir=rtl] .multiselect__clear{right:auto;left:12px}[dir=rtl] .multiselect__spinner{right:auto;left:1px}@-webkit-keyframes spinning{0%{transform:rotate(0)}to{transform:rotate(2turn)}}@keyframes spinning{0%{transform:rotate(0)}to{transform:rotate(2turn)}}div.v-popper--theme-menu .v-popper__inner{background-color:#66f;color:#fff;padding:10px 15px 11px;line-height:1.2;max-width:300px}.v-popper__inner a{color:#fff;text-decoration:underline}.v-popper__inner p{margin-top:0}.v-popper__inner p:last-child{margin-bottom:0}.table-table{display:table}.table-table>*{display:table-row}.table-table>*>*{display:table-cell;padding:5px 20px 5px 0}.table-inline-block>div>*{display:inline-block;margin-right:10px;padding:5px 20px 5px 0}.table-inline-block>div>*:first-child{width:120px}.resize-observer[data-v-b329ee4c]{position:absolute;top:0;left:0;z-index:-1;width:100%;height:100%;border:none;background-color:transparent;pointer-events:none;display:block;overflow:hidden;opacity:0}.resize-observer[data-v-b329ee4c] object{display:block;position:absolute;top:0;left:0;height:100%;width:100%;overflow:hidden;pointer-events:none;z-index:-1}.v-popper--theme-dropdown .v-popper__inner{background:#fff;color:#000;padding:24px;border-radius:6px;box-shadow:0 6px 30px #0000001a}.v-popper--theme-dropdown .v-popper__arrow{border-color:#fff}.v-popper{width:max-content}.v-popper--theme-tooltip .v-popper__inner{background:rgba(0,0,0,.8);color:#fff;border-radius:6px;padding:7px 12px 6px}.v-popper--theme-tooltip .v-popper__arrow{border-color:#000c}.v-popper__popper{z-index:10000}.v-popper__popper.v-popper__popper--hidden{visibility:hidden;opacity:0;transition:opacity .15s,visibility .15s}.v-popper__popper.v-popper__popper--shown{visibility:visible;opacity:1;transition:opacity .15s}.v-popper__popper.v-popper__popper--skip-transition,.v-popper__popper.v-popper__popper--skip-transition>.v-popper__wrapper{transition:none!important}.v-popper__inner{position:relative}.v-popper__arrow-container{width:10px;height:10px}.v-popper__arrow{border-style:solid;position:relative;width:0;height:0}.v-popper__popper[data-popper-placement^=top] .v-popper__arrow{border-width:5px 5px 0 5px;border-left-color:transparent!important;border-right-color:transparent!important;border-bottom-color:transparent!important}.v-popper__popper[data-popper-placement^=bottom] .v-popper__arrow-container{top:0}.v-popper__popper[data-popper-placement^=bottom] .v-popper__arrow{border-width:0 5px 5px 5px;border-left-color:transparent!important;border-right-color:transparent!important;border-top-color:transparent!important;top:-5px}.v-popper__popper[data-popper-placement^=right] .v-popper__arrow{border-width:5px 5px 5px 0;border-left-color:transparent!important;border-top-color:transparent!important;border-bottom-color:transparent!important;left:-5px}.v-popper__popper[data-popper-placement^=left] .v-popper__arrow-container{right:-5px}.v-popper__popper[data-popper-placement^=left] .v-popper__arrow{border-width:5px 0 5px 5px;border-top-color:transparent!important;border-right-color:transparent!important;border-bottom-color:transparent!important;right:-5px}
|
|
lib/wcfm/index.be5d792e.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var ue=Object.defineProperty;var G=Object.getOwnPropertySymbols;var he=Object.prototype.hasOwnProperty,pe=Object.prototype.propertyIsEnumerable;var Z=(t,e,o)=>e in t?ue(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,K=(t,e)=>{for(var o in e||(e={}))he.call(e,o)&&Z(t,o,e[o]);if(G)for(var o of G(e))pe.call(e,o)&&Z(t,o,e[o]);return t};import{_ as v,o as s,c as d,a as Q,b as r,n as $,d as p,e as q,t as _,p as Y,f as H,r as m,g as w,F as B,h as P,i as x,j as A,k as J,m as ee,V as te,w as S,l as W,q as z,v as I,s as me,u as oe,x as ie,y as ne,z as X,T as fe,A as se,B as ge,C as ve}from"./vendor.fa68d508.js";const ye=function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))l(i);new MutationObserver(i=>{for(const n of i)if(n.type==="childList")for(const a of n.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&l(a)}).observe(document,{childList:!0,subtree:!0});function o(i){const n={};return i.integrity&&(n.integrity=i.integrity),i.referrerpolicy&&(n.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?n.credentials="include":i.crossorigin==="anonymous"?n.credentials="omit":n.credentials="same-origin",n}function l(i){if(i.ep)return;i.ep=!0;const n=o(i);fetch(i.href,n)}};ye();class L{static post(e,o,l){var i=this;window.wcfmoptions.poster(e,o,function(n){l.call(i,n)},function(){console.log("failure")})}}const _e={},we={style:{position:"absolute",width:"0",height:"0"},width:"0",height:"0",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},be=Q(`<defs><symbol id="icon-folder" viewBox="0 0 309.267 309.267"><g><path style="fill:#D0994B;" d="M260.944,43.491H125.64c0,0-18.324-28.994-28.994-28.994H48.323c-10.67,0-19.329,8.65-19.329,19.329
|
2 |
+
v222.286c0,10.67,8.659,19.329,19.329,19.329h212.621c10.67,0,19.329-8.659,19.329-19.329V62.82
|
3 |
+
C280.273,52.15,271.614,43.491,260.944,43.491z"></path><path style="fill:#E4E7E7;" d="M28.994,72.484h251.279v77.317H28.994V72.484z"></path><path style="fill:#F4B459;" d="M19.329,91.814h270.609c10.67,0,19.329,8.65,19.329,19.329l-19.329,164.298
|
4 |
+
c0,10.67-8.659,19.329-19.329,19.329H38.658c-10.67,0-19.329-8.659-19.329-19.329L0,111.143C0,100.463,8.659,91.814,19.329,91.814z
|
5 |
+
"></path></g></symbol><symbol id="icon-unfold" viewBox="0 0 32 32"><path d="M28,14H18V4c0-1.104-0.896-2-2-2s-2,0.896-2,2v10H4c-1.104,0-2,0.896-2,2s0.896,2,2,2h10v10c0,1.104,0.896,2,2,2 s2-0.896,2-2V18h10c1.104,0,2-0.896,2-2S29.104,14,28,14z"></path></symbol><symbol id="icon-fold" viewBox="0 0 24 24"><g fill="none" stroke="#000" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><line x1="5" y1="12" x2="19" y2="12"></line></g></symbol><symbol id="icon-file" viewBox="0 0 56 56"><g><path style="fill:#E9E9E0;" d="M36.985,0H7.963C7.155,0,6.5,0.655,6.5,1.926V55c0,0.345,0.655,1,1.463,1h40.074
|
6 |
+
c0.808,0,1.463-0.655,1.463-1V12.978c0-0.696-0.093-0.92-0.257-1.085L37.607,0.257C37.442,0.093,37.218,0,36.985,0z"></path><polygon style="fill:#D9D7CA;" points="37.5,0.151 37.5,12 49.349,12 "></polygon><circle style="fill:#F3D55B;" cx="18.931" cy="14.431" r="4.569"></circle><polygon style="fill:#c5e8e1;" points="6.5,39 17.5,39 49.5,39 49.5,28 39.5,18.5 29,30 23.517,24.517 "></polygon><path style="fill:#14A085;" d="M48.037,56H7.963C7.155,56,6.5,55.345,6.5,54.537V39h43v15.537C49.5,55.345,48.845,56,48.037,56z"></path><g></g></g></symbol><symbol id="icon-ok" viewBox="0 0 256 256"><g fill="green" stroke="none" transform="translate(0.000000,256.000000) scale(0.100000,-0.100000)"><path d="M1064 2545 c-406 -72 -744 -324 -927 -690 -96 -193 -127 -333 -127 -575 0 -243 33 -387 133 -585 177 -351 518 -606 907 -676 118 -22 393 -17 511 8 110 24 252 78 356 136 327 183 569 525 628 887 19 122 19 338 0 460 -81 498 -483 914 -990 1025 -101 22 -389 28 -491 10z m814 -745 c39 -27 73 -59 77 -70 9 -27 10 -25 -372 -590 -345 -510 -357 -524 -420 -512 -19 4 -98 74 -250 225 -123 121 -225 228 -228 238 -3 10 1 31 9 47 20 40 125 132 149 132 11 0 79 -59 162 -140 79 -77 146 -140 149 -140 3 0 38 48 78 108 95 143 465 678 496 720 35 46 64 42 150 -18z"></path></g></symbol><symbol id="icon-not-available" viewBox="0 0 500.000000 500.000000" preserveAspectRatio="xMidYMid meet"><g fill="#b11010" stroke="none" transform="translate(0.000000,500.000000) scale(0.100000,-0.100000)"><path d="M2315 4800 c-479 -35 -928 -217 -1303 -527 -352 -293 -615 -702 -738 -1151 -104 -380 -104 -824 0 -1204 107 -389 302 -724 591 -1013 354 -354 785 -572 1279 -646 196 -30 476 -30 672 0 494 74 925 292 1279 646 354 354 571 784 646 1279 30 197 30 475 0 672 -75 495 -292 925 -646 1279 -289 289 -624 484 -1013 591 -228 62 -528 91 -767 74z m353 -511 c458 -50 874 -272 1170 -624 417 -497 536 -1174 308 -1763 -56 -145 -176 -367 -235 -434 -4 -4 -566 552 -1250 1236 l-1243 1243 94 60 c354 229 754 327 1156 282z m864 -3200 c-67 -59 -289 -179 -434 -235 -946 -366 -2024 172 -2322 1158 -47 155 -66 276 -73 453 -13 362 84 704 290 1023 l60 94 1243 -1243 c684 -684 1240 -1246 1236 -1250z"></path></g></symbol><symbol id="icon-help" viewBox="0 0 400 400" style="enable-background:new 0 0 400 400;" xml:space="preserve"><g><path style="fill:#cccccc;" d="M199.996,0C89.719,0,0,89.72,0,200c0,110.279,89.719,200,199.996,200C310.281,400,400,310.279,400,200
|
7 |
+
C400,89.72,310.281,0,199.996,0z M199.996,373.77C104.187,373.77,26.23,295.816,26.23,200
|
8 |
+
c0-95.817,77.957-173.769,173.766-173.769c95.816,0,173.772,77.953,173.772,173.769
|
9 |
+
C373.769,295.816,295.812,373.77,199.996,373.77z"></path><path style="fill:#000000;" d="M199.996,91.382c-35.176,0-63.789,28.616-63.789,63.793c0,7.243,5.871,13.115,13.113,13.115
|
10 |
+
c7.246,0,13.117-5.873,13.117-13.115c0-20.71,16.848-37.562,37.559-37.562c20.719,0,37.566,16.852,37.566,37.562
|
11 |
+
c0,20.714-16.849,37.566-37.566,37.566c-7.242,0-13.113,5.873-13.113,13.114v45.684c0,7.243,5.871,13.115,13.113,13.115
|
12 |
+
s13.117-5.872,13.117-13.115v-33.938c28.905-6.064,50.68-31.746,50.68-62.427C263.793,119.998,235.176,91.382,199.996,91.382z"></path><path d="M200.004,273.738c-9.086,0-16.465,7.371-16.465,16.462s7.379,16.465,16.465,16.465c9.094,0,16.457-7.374,16.457-16.465
|
13 |
+
S209.098,273.738,200.004,273.738z"></path></g></symbol><symbol id="icon-loading" viewBox="0 0 128 128" xml:space="preserve"><g><path d="M38.52 33.37L21.36 16.2A63.6 63.6 0 0 1 59.5.16v24.3a39.5 39.5 0 0 0-20.98 8.92z" fill="#049046"></path><path d="M38.52 33.37L21.36 16.2A63.6 63.6 0 0 1 59.5.16v24.3a39.5 39.5 0 0 0-20.98 8.92z" fill="#c5e8e1" transform="rotate(45 64 64)"></path><path d="M38.52 33.37L21.36 16.2A63.6 63.6 0 0 1 59.5.16v24.3a39.5 39.5 0 0 0-20.98 8.92z" fill="#c5e8e1" transform="rotate(90 64 64)"></path><path d="M38.52 33.37L21.36 16.2A63.6 63.6 0 0 1 59.5.16v24.3a39.5 39.5 0 0 0-20.98 8.92z" fill="#c5e8e1" transform="rotate(135 64 64)"></path><path d="M38.52 33.37L21.36 16.2A63.6 63.6 0 0 1 59.5.16v24.3a39.5 39.5 0 0 0-20.98 8.92z" fill="#c5e8e1" transform="rotate(180 64 64)"></path><path d="M38.52 33.37L21.36 16.2A63.6 63.6 0 0 1 59.5.16v24.3a39.5 39.5 0 0 0-20.98 8.92z" fill="#c5e8e1" transform="rotate(225 64 64)"></path><path d="M38.52 33.37L21.36 16.2A63.6 63.6 0 0 1 59.5.16v24.3a39.5 39.5 0 0 0-20.98 8.92z" fill="#c5e8e1" transform="rotate(270 64 64)"></path><path d="M38.52 33.37L21.36 16.2A63.6 63.6 0 0 1 59.5.16v24.3a39.5 39.5 0 0 0-20.98 8.92z" fill="#c5e8e1" transform="rotate(315 64 64)"></path><animateTransform attributeName="transform" type="rotate" values="0 64 64;45 64 64;90 64 64;135 64 64;180 64 64;225 64 64;270 64 64;315 64 64" calcMode="discrete" dur="720ms" repeatCount="indefinite"></animateTransform></g></symbol><symbol id="icon-trash" viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve"><path d="M423.059,45.755h-97.156C321.093,19.757,298.267,0,270.897,0h-29.794c-27.37,0-50.196,19.757-55.006,45.755H88.941c-5.633,0-10.199,4.567-10.199,10.199v62.781c0,5.632,4.566,10.199,10.199,10.199h13.21v372.867c0,5.632,4.566,10.199,10.199,10.199H399.65c5.633,0,10.199-4.567,10.199-10.199V128.934h13.21c5.633,0,10.199-4.567,10.199-10.199V55.954C433.258,50.322,428.692,45.755,423.059,45.755zM241.103,20.398h29.794c16.063,0,29.672,10.706,34.065,25.356h97.926C211.432,31.104,225.04,20.398,241.103,20.398z M389.45,491.602H122.55V128.934H389.45V491.602z M412.861,108.536H99.14V66.153h313.72V108.536z"></path><path d="M256,151.099c-17.359,0-31.481,14.122-31.481,31.48v255.378c0,17.358,14.122,31.481,31.481,31.481s31.481-14.123,31.481-31.481V182.579C287.481,165.22,273.359,151.099,256,151.099z M267.082,437.957c0,6.11-4.972,11.082-11.082,11.082c-6.11,0-11.082-4.972-11.082-11.082V182.579c0-6.11,4.972-11.081,11.082-11.081c6.11,0,11.082,4.971,11.082,11.081V437.957z"></path><path d="M171.938,151.099c-17.359,0-31.481,14.122-31.481,31.48v255.378c0,17.358,14.123,31.481,31.481,31.481c17.359,0,31.481-14.123,31.481-31.481V182.579C203.419,165.22,189.297,151.099,171.938,151.099z M183.021,437.957c0,6.11-4.972,11.082-11.082,11.082s-11.082-4.972-11.082-11.082V182.579c0-6.11,4.972-11.081,11.082-11.081s11.082,4.971,11.082,11.081V437.957z"></path><path d="M340.062,151.099c-17.359,0-31.481,14.122-31.481,31.48v255.378c0,17.358,14.122,31.481,31.481,31.481c17.359,0,31.481-14.123,31.481-31.481V182.579C371.543,165.22,357.421,151.099,340.062,151.099z M351.144,437.957c0,6.11-4.972,11.082-11.082,11.082s-11.082-4.972-11.082-11.082V182.579c0-6.11,4.972-11.081,11.082-11.081s11.082,4.971,11.082,11.081V437.957z"></path><path d="M218.758,79.806H118.735c-5.633,0-10.199,4.567-10.199,10.199c0,5.632,4.566,10.199,10.199,10.199h100.023c5.633,0,10.199-4.567,10.199-10.199C228.957,84.373,224.391,79.806,218.758,79.806z"></path><path d="M259.192,79.806h-5.32c-5.633,0-10.199,4.567-10.199,10.199c0,5.632,4.566,10.199,10.199,10.199h5.32c5.633,0,10.199-4.567,10.199-10.199C269.392,84.373,264.825,79.806,259.192,79.806z"></path></symbol><symbol id="icon-eye" x="0px" y="0px" viewBox="0 0 572.098 572.098" xml:space="preserve"><path d="M99.187,398.999l44.333-44.332c-24.89-15.037-47.503-33.984-66.763-56.379c29.187-33.941,66.053-60.018,106.947-76.426c-6.279,14.002-9.853,29.486-9.853,45.827c0,16.597,3.696,32.3,10.165,46.476l35.802-35.797c-5.698-5.594-9.248-13.36-9.248-21.977c0-17.02,13.801-30.82,30.82-30.82c8.611,0,16.383,3.55,21.971,9.248l32.534-32.534l36.635-36.628l18.366-18.373c-21.206-4.186-42.896-6.469-64.848-6.469c-107.663,0-209.732,52.155-273.038,139.518L0,298.288l13.011,17.957C36.83,349.116,66.151,376.999,99.187,398.999z"></path><path d="M459.208,188.998l-44.854,44.854c30.539,16.071,58.115,37.846,80.986,64.437c-52.167,60.662-128.826,96.273-209.292,96.273c-10.3,0-20.533-0.6-30.661-1.744l-52.375,52.375c26.903,6.887,54.762,10.57,83.036,10.57c107.663,0,209.738-52.154,273.038-139.523l13.011-17.957l-13.011-17.956C532.023,242.995,497.844,212.15,459.208,188.998z"></path><path d="M286.049,379.888c61.965,0,112.198-50.234,112.198-112.199c0-5.588-0.545-11.035-1.335-16.402L269.647,378.56C275.015,379.349,280.461,379.888,286.049,379.888z"></path><path d="M248.815,373.431L391.79,230.455l4.994-4.994l45.796-45.796l86.764-86.77c13.543-13.543,13.543-35.502,0-49.046c-6.77-6.769-15.649-10.159-24.523-10.159s-17.754,3.384-24.522,10.159l-108.33,108.336l-22.772,22.772l-29.248,29.248l-48.14,48.14l-34.456,34.456l-44.027,44.027l-33.115,33.115l-45.056,45.055l-70.208,70.203c-13.543,13.543-13.543,35.502,0,49.045c6.769,6.77,15.649,10.16,24.523,10.16s17.754-3.385,24.523-10.16l88.899-88.898l50.086-50.086L248.815,373.431z"></path></symbol></defs>`,1),ke=[be];function xe(t,e){return s(),d("svg",we,ke)}var Ve=v(_e,[["render",xe]]);const Ce={name:"FileItem",emits:["toggle","select"],props:{item:Object},data(){return{hover:!1,selected:!1}},inject:["wcfm"],methods:{onClick(t){this.selected=!0,this.$emit("select",this)},getWCFM(){return this.wcfm},getFullPath(){for(var t=this.$parent,e=[];t!==null&&t.$parent!==null;)t.item&&e.push(t.item.name),t=t.$parent;return e.pop(),e=e.reverse().join("/"),e=e.replace("//","/"),e},infoClick(){this.getWCFM().displayInfo(this.getFullPath())},convertClick(){this.getWCFM().onConvertClick(this.getFullPath())}}},R=t=>(Y("data-v-4fb0cc48"),t=t(),H(),t),ze={key:0,class:"icon-fold"},Se=R(()=>r("use",{"xlink:href":"#icon-fold"},null,-1)),Me=[Se],Ie={key:1,class:"icon-unfold"},Oe=R(()=>r("use",{"xlink:href":"#icon-unfold"},null,-1)),Te=[Oe],$e=R(()=>r("use",{"xlink:href":"#icon-folder"},null,-1)),Be=[$e],Le={key:2,class:"icon-file"},De=R(()=>r("use",{"xlink:href":"#icon-file"},null,-1)),qe=[De];function Ae(t,e,o,l,i,n){return s(),d("div",{class:$({fileitem:!0,selected:i.selected}),onMouseover:e[2]||(e[2]=a=>i.hover=!0),onMouseleave:e[3]||(e[3]=a=>i.hover=!1),onClick:e[4]||(e[4]=(...a)=>n.onClick&&n.onClick(...a))},[r("p",null,[o.item.isDir?(s(),d("span",{key:0,class:$({"fold-unfold":!0,empty:o.item.isEmpty}),onClick:e[0]||(e[0]=a=>this.$emit("toggle"))},[o.item.isOpen?(s(),d("svg",ze,Me)):p("",!0),o.item.isOpen?p("",!0):(s(),d("svg",Ie,Te))],2)):p("",!0),o.item.isDir?(s(),d("svg",{key:1,class:"icon-folder",onClick:e[1]||(e[1]=a=>this.$emit("toggle"))},Be)):p("",!0),o.item.isDir?p("",!0):(s(),d("svg",Le,qe)),q(" "+_(o.item.nickname||o.item.name),1)])],34)}var Pe=v(Ce,[["render",Ae],["__scopeId","data-v-4fb0cc48"]]);const Ue={name:"FileTree",components:{FileItem:Pe},emits:["select"],props:{item:Object},data(){return{loading:!1}},methods:{load(){var t=this;L.post("get-folder",{path:this.$refs.thefileitem.getFullPath()},function(e){t.loading=!0,t.item.children=e.children.sort(function(o,l){return o.isDir&&!l.isDir?-1:!o.isDir&&l.isDir||o.name>l.name?1:o.name<l.name?-1:0}),t.item.loaded=!0,t.loading=!1})},toggle(){this.item.isOpen=!this.item.isOpen,this.item.loaded||this.load()},onSelect(t){this.$emit("select",t)}},mounted(){let t=this.$refs.thefileitem.getFullPath();(t=="/"||t.indexOf("/")==-1)&&this.toggle()}},je={key:0},Re=r("li",null,"loading...",-1),Fe=[Re],Ne={key:1,class:"tree"};function Ye(t,e,o,l,i,n){const a=m("FileItem"),c=m("FileTree",!0);return s(),d(B,null,[w(a,{ref:"thefileitem",item:o.item,onDblclick:n.toggle,onToggle:n.toggle,onSelect:n.onSelect},null,8,["item","onDblclick","onToggle","onSelect"]),i.loading?(s(),d("ul",je,Fe)):p("",!0),o.item.children!==void 0&&o.item.isOpen?(s(),d("ul",Ne,[(s(!0),d(B,null,P(o.item.children,g=>(s(),d("li",null,[w(c,{item:g,onSelect:n.onSelect},null,8,["item","onSelect"])]))),256))])):p("",!0)],64)}var He=v(Ue,[["render",Ye]]);const We={name:"Files",components:{FileTree:He},emits:["select"],props:{item:Object,statusText:String},methods:{onSelect(t){this.selectedItem&&(this.selectedItem.selected=!1),this.selectedItem=t,this.$emit("select",this.selectedItem.getFullPath(),this.selectedItem.item.isDir)}},data(){return{selected:null}}},Xe={key:1};function Ee(t,e,o,l,i,n){const a=m("FileTree");return s(),d(B,null,[o.item?(s(),x(a,{key:0,item:o.item,onSelect:n.onSelect},null,8,["item","onSelect"])):p("",!0),o.item?p("",!0):(s(),d("div",Xe,_(o.statusText),1))],64)}var Ge=v(We,[["render",Ee]]);const Ze={name:"Modal",emits:["close"],props:{title:{type:String},closeButtonText:{type:String},width:{type:[Number,String],default:"95%"},maxwidth:{type:[Number,String],default:"700px"},alignment:{type:String,default:"center"},height:{type:[Number,String],default:"92%"},maxheight:{type:[Number,String],default:"700px"},valignment:{type:String,default:"center"}},computed:{containerStyle(){let t={width:this.width,"max-width":this.maxwidth,height:this.height,"max-height":this.maxheight};return this.alignment=="center"&&(t.margin="0px auto"),this.alignment=="right"&&(t.position="absolute",t.right="10px"),this.valignment=="center"&&(t.top="50%",t.transform="translateY(-50%)"),this.alignment=="bottom"&&(t.position="absolute",t.bottom="10px"),t}},methods:{onCloseClick(){this.$emit("close")},registerKeyDownEvent(){let t=this;document.onkeydown=function(e){e=e||window.event;var o=!1;"key"in e?o=e.key==="Escape"||e.key==="Esc":o=e.keyCode===27,o&&t.$emit("close")}}},mounted(){this.registerKeyDownEvent()}},Ke={class:"modal-mask"},Qe={class:"modal-wrapper"},Je={class:"title"},et={class:"modal-body"},tt={class:"content"},ot=q(" default body "),it={class:"close-button-with-text"};function nt(t,e,o,l,i,n){return s(),d("div",Ke,[r("div",Qe,[r("div",{class:"modal-container",style:A(n.containerStyle)},[r("a",{class:"close-button",onClick:e[0]||(e[0]=(...a)=>n.onCloseClick&&n.onCloseClick(...a))},"X"),r("div",Je,_(o.title),1),r("div",et,[r("div",tt,[J(t.$slots,"default",{},()=>[ot]),r("div",it,[r("button",{onClick:e[1]||(e[1]=(...a)=>n.onCloseClick&&n.onCloseClick(...a))},_(o.closeButtonText),1)])])])],4)])])}var ae=v(Ze,[["render",nt]]);const st={name:"ZoomSlider",components:{Slider:ee},emits:["update:zoom"],props:{zoom:{type:Number,default:1}},watch:{exp(t,e){this.$emit("update:zoom",2**t)},zoom(t,e){this.exp=Math.log2(t)}},methods:{sliderFormat(t){return Math.round(2**t*100)+"%"}},mounted(){},data(){return{exp:0}}},at={class:"zoom-slider"};function lt(t,e,o,l,i,n){const a=m("Slider");return s(),d("div",at,[w(a,{modelValue:i.exp,"onUpdate:modelValue":e[0]||(e[0]=c=>i.exp=c),min:-4,max:4,width:100,step:-1,format:n.sliderFormat,tooltipPosition:"bottom",orientation:"horizontal"},null,8,["modelValue","format"])])}var rt=v(st,[["render",lt]]);const ct={name:"ImageViewport",components:{VueZoomer:te,ZoomSlider:rt},emits:["update:zoom","update:translateX","update:translateY","load","resize"],props:{src:{type:String},height:{type:Number,default:500},zoom:{type:Number,default:1},scaleZoomRatio:{type:Number},translateX:{type:Number,default:1},translateY:{type:Number,default:1}},data(){return{ratio:1,ro:null}},watch:{height(t,e){var o;((o=this.$refs)==null?void 0:o.zoomer)&&(this.$refs.zoomer.onWindowResize(),this.$refs.zoomer.refreshContainerPos())},scaleZoomRatio(t){var e;((e=this.$refs)==null?void 0:e.zoomer)&&(this.$refs.zoomer.onWindowResize(),this.$refs.zoomer.refreshContainerPos()),this.$refs.zoomer.scale=this.zoom*this.scaleZoomRatio},zoom(t,e){this.isImageReady(),this.$refs.zoomer.scale=t*this.scaleZoomRatio},translateX(t,e){this.$refs.zoomer.translateX!=t&&(this.$refs.zoomer.translateX=t)},translateY(t,e){this.$refs.zoomer.translateY!=t&&(this.$refs.zoomer.translateY=t)}},methods:{getGoodContainerHeight(){var t,e,o;if((e=(t=this.$refs)==null?void 0:t.theimg)==null?void 0:e.naturalWidth){let l=this.$refs.theimg.naturalWidth/this.$refs.theimg.naturalHeight,n=((o=this.$refs.root)==null?void 0:o.offsetWidth)/l;return n>300&&(n=300),n}return 300},updateContainerHeight(){},isImageReady(){var t,e,o;return!(!((e=(t=this.$refs)==null?void 0:t.theimg)==null?void 0:e.naturalWidth)||!((o=this.$refs.root)==null?void 0:o.offsetWidth))},calcScaleZoomRatio(){var l,i;if(!this.isImageReady())return 1;let t=this.$refs.theimg.naturalWidth/((l=this.$refs.root)==null?void 0:l.offsetWidth),e=this.$refs.theimg.naturalHeight/((i=this.$refs.root)==null?void 0:i.offsetHeight),o=Math.max(t,e);return isNaN(o)?1:o},updateRatio(){},updateScale(){this.zoom&&(this.$refs.zoomer.scale=this.zoom*this.scaleZoomRatio)},zoomToFit(){},onImgLoad(){var t,e;((e=(t=this.$refs)==null?void 0:t.theimg)==null?void 0:e.naturalWidth)&&this.$emit("load")},onResize(){this.$emit("resize")},onDoubleTap(){console.log("double tab - zoom to 100%"),this.$emit("update:zoom",1),this.$emit("update:translateX",0),this.$emit("update:translateY",0)}},mounted(){window.ResizeObserver&&(this.ro=new ResizeObserver(this.onResize).observe(this.$refs.root)),this.$refs.zoomer.tapDetector.onDoubleTap(this.onDoubleTap),this.$watch("$refs.zoomer.scale",(t,e)=>{this.isImageReady(),this.$emit("update:zoom",t/this.scaleZoomRatio)}),this.$watch("$refs.zoomer.translateX",(t,e)=>{this.$emit("update:translateX",t)}),this.$watch("$refs.zoomer.translateY",(t,e)=>{this.$emit("update:translateY",t)})},beforeDestroy(){window.ResizeObserver&&this.ro.unobserve(this.$refs.zoomer)}},dt={ref:"root",class:"image-viewport"},ut=["src"],ht={class:"zoom-info"};function pt(t,e,o,l,i,n){const a=m("v-zoomer");return s(),d("div",dt,[w(a,{ref:"zoomer",class:"zoomer",minScale:.1,maxScale:8,onResize:n.onResize,doubleClickToZoom:!1,style:A({height:o.height+"px"}),pivot:"cursor",limitTranslation:!1,lockPanOnNoScale:!1},{default:S(()=>[r("img",{ref:"theimg",src:o.src,onLoad:e[0]||(e[0]=(...c)=>n.onImgLoad&&n.onImgLoad(...c))},null,40,ut)]),_:1},8,["minScale","onResize","style"]),r("div",ht," zoom: "+_(Math.round(o.zoom*100))+"% ",1)],512)}var mt=v(ct,[["render",pt]]);const ft={name:"Variant",components:{ImageViewport:mt},emits:["select","update:zoom","update:translateX","update:translateY","load","resize"],props:{title:{type:String},info:{type:Object},url:{type:String,default:""},height:{type:Number},zoom:{type:Number},scaleZoomRatio:{type:Number},translateX:{type:Number},translateY:{type:Number},variantIndex:{type:Number}},computed:{imageUrl:function(){var t;return(t=this.info)==null?void 0:t.url},filesize:function(){var e;if(!((e=this.info)==null?void 0:e.size))return"";let t=this.info.size;return t<1024?t+" bytes":(t/=1024,t<1024?Math.round(t*10)/10+" kb":(t/=1024,Math.round(t*10)/10+" MB"))}},methods:{onVariantSelect(){this.$emit("select",this.variantIndex)},onLoad(){this.$emit("load")},zoomToFit(){this.$refs.theport.zoomToFit()}},mounted(){this.$watch("$refs.theport.zoom",(t,e)=>{this.$emit("update:zoom",t)}),this.$watch("$refs.theport.translateX",(t,e)=>{this.$emit("update:translateX",t)}),this.$watch("$refs.theport.translateY",(t,e)=>{this.$emit("update:translateY",t)})},data(){return{}}},gt={class:"variant"},vt={class:"header"},yt={class:"title"},_t={class:"size"};function wt(t,e,o,l,i,n){const a=m("ImageViewport");return s(),d("div",gt,[r("div",vt,[r("div",yt,_(o.title),1),r("div",_t,_(n.filesize),1)]),w(a,{ref:"theport",src:n.imageUrl,height:o.height,zoom:o.zoom,"onUpdate:zoom":e[0]||(e[0]=c=>o.zoom=c),scaleZoomRatio:o.scaleZoomRatio,translateX:o.translateX,"onUpdate:translateX":e[1]||(e[1]=c=>o.translateX=c),translateY:o.translateY,"onUpdate:translateY":e[2]||(e[2]=c=>o.translateY=c),onLoad:n.onLoad,onResize:e[3]||(e[3]=c=>this.$emit("resize"))},null,8,["src","height","zoom","scaleZoomRatio","translateX","translateY","onLoad"])])}var le=v(ft,[["render",wt],["__scopeId","data-v-0c38121e"]]);const bt={name:"Variants",components:{Variant:le},emits:["update:zoom","update:translateX","update:translateY"],props:{file:{type:Object},viewport:{type:Object},height:{type:Number},zoom:{type:Number,default:1},translateX:{type:Number,default:0},translateY:{type:Number,default:0}},watch:{file(t,e){}},methods:{onZoomChange(t){this.$emit("update:zoom",t)},onTranslateXChange(t){this.$emit("update:translateX",t)},onTranslateYChange(t){this.$emit("update:translateY",t)},sliderFormat(t){return Math.round(t*100)+"%"},changeImage(){this.imageUrl=="http://localhost:3000/src/assets/dummy.jpg"?this.imageUrl="http://localhost:3000/src/assets/dummy2.jpg":this.imageUrl="http://localhost:3000/src/assets/dummy.jpg",this.selectedVariant=-1},onVariantSelect(t){this.selectedVariant=t}},mounted(){this.$watch("$refs.variants.zoom",(t,e)=>{})},data(){var t="http://localhost:3000/src/assets/200x100.jpg";return{imageUrl:"",selectedVariant:-1,variants:[{title:"Existing conversion",size:732,url:t},{title:"Lossy, q:20",size:35e5,url:t}]}}},re=t=>(Y("data-v-25a3327e"),t=t(),H(),t),kt={class:"variants-component"},xt=re(()=>r("br",null,null,-1)),Vt=re(()=>r("br",null,null,-1)),Ct={class:"variants"};function zt(t,e,o,l,i,n){const a=m("Variant");return s(),d("div",kt,[q(" File: "+_(o.file)+" ",1),r("button",{onClick:e[0]||(e[0]=c=>n.changeImage())},"Change image"),xt,Vt,r("div",Ct,[(s(!0),d(B,null,P(i.variants,(c,g)=>(s(),x(a,{title:c.title,info:c,variantIndex:g,class:$({selected:g==i.selectedVariant}),height:o.height,zoom:o.zoom,"onUpdate:zoom":[e[1]||(e[1]=u=>o.zoom=u),n.onZoomChange],translateX:o.translateX,"onUpdate:translateX":[e[2]||(e[2]=u=>o.translateX=u),n.onTranslateXChange],translateY:o.translateY,"onUpdate:translateY":[e[3]||(e[3]=u=>o.translateY=u),n.onTranslateYChange],onSelect:n.onVariantSelect},null,8,["title","info","variantIndex","class","height","zoom","translateX","translateY","onSelect","onUpdate:zoom","onUpdate:translateX","onUpdate:translateY"]))),256))])])}var St=v(bt,[["render",zt],["__scopeId","data-v-25a3327e"]]);class U{static escape(e){return e.replace(/./gm,function(o){var l=/[0-9a-zA-Z\!\[\]\(\)\*\#]/;return l.test(o.charAt(0))?o.charAt(0):"&#"+o.charCodeAt(0)+";"})}static md2htmlOneLine(e){return e=U.escape(e),e=e.replace(/\[([^[]+)\]\(([^)]+)\)/gm,function(o,l,i){return'<a target="blank" href="'+i+'">'+l+"</a>"}),e=e.replace(/(\*\*[^\*]+\*\*)/gm,function(o){return"<b>"+o.substr(2,o.length-4)+"</b>"}),e=e.replace(/(\*[^\*]+\*)/gm,function(o){return"<i>"+o.substr(1,o.length-2)+"</i>"}),e.substr(0,1)=="#"&&(e.substr(0,2)=="# "&&(e="<h1>"+e.substr(2)+"</h1>"),e.substr(0,3)=="## "&&(e="<h2>"+e.substr(3)+"</h2>"),e.substr(0,4)=="### "&&(e="<h3>"+e.substr(4)+"</h3>"),e.substr(0,5)=="#### "&&(e="<h4>"+e.substr(5)+"</h4>")),e}static md2html(e){e=e.replace(/\r\n/g,`
|
14 |
+
`);for(var o=e.split(`
|
15 |
+
`),l=[],i=0;i<o.length;i++)l.push(U.md2htmlOneLine(o[i]));return l.join("<br>")}}const Mt={name:"FileProperties",components:{Variant:le,Variants:St,Modal:ae},props:{file:{type:Object,default:{}}},inject:["wcfm"],computed:{originalMime:function(){var t;return((t=this.originalInfo)==null?void 0:t.mime)?this.originalInfo.mime:""},convertedMime:function(){var t;return((t=this.convertedInfo)==null?void 0:t.mime)?this.convertedInfo.mime:""}},watch:{file(t,e){t.isDir||this.changePath(t.path)}},methods:{onVariantSelect(t){this.selectedVariant=t},onOriginalLoad(){if(this.updateHeight(),this.$refs.original.$refs.theport.calcScaleZoomRatio()>1){let e=this.$refs.original.$refs.theport,o=e.$refs.theimg,l=e.$refs.root,i=o.naturalWidth,n=o.naturalHeight,a=l.offsetWidth,g=this.height/n,u=a/i;this.zoom=Math.min(g,u)}else this.zoom=1;this.translateX=0,this.translateY=0},onOriginalResize(){this.updateHeight()},onConvertClick(){var o;let t=this;this.converting=!0;let e=(o=this.wcfm.$refs.convertOptions)==null?void 0:o.getOptions();t.errorMsg="",L.post("convert",{path:this.path,convertOptions:e},function(l){t.converting=!1,(l==null?void 0:l.success)==!1&&(t.errorMsg=l.data),l.converted&&(t.convertedInfo=l.converted),l.log&&(t.log=U.md2html(l.log))})},onDeleteConvertedClick(){let t=this;L.post("delete-converted",{path:this.path},function(e){(e==null?void 0:e.success)==!1?t.errorMsg=e.data:(t.log="",t.convertedInfo=null)})},updateHeight(){this.$refs.original&&(this.height=this.$refs.original.$refs.theport.getGoodContainerHeight(),this.scaleZoomRatio=this.$refs.original.$refs.theport.calcScaleZoomRatio())},reset(){this.originalInfo=null,this.convertedInfo=null},reload(){this.load()},changePath(t){this.reset(),this.path=t,this.loading=!0,this.errorMsg="",this.log="",this.load()},load(){let t=this;L.post("info",{path:this.path},function(e){(e==null?void 0:e.success)==!1&&(t.errorMsg=e.data),t.loading=!1,t.originalInfo=e.original,e.converted&&(t.convertedInfo=e.converted),e.log&&(t.log=U.md2html(e.log))})}},mounted(){this.file&&(this.path=this.file.path,this.load())},data(){return{zoom:1,scaleZoomRatio:1,translateX:0,translateY:0,height:100,loading:!1,errorMsg:"",originalInfo:null,convertedInfo:null,path:"",log:"",showingLogDialog:!1,converting:!1}}},F=t=>(Y("data-v-1e863e69"),t=t(),H(),t),It={class:"file-properties"},Ot={class:"path"},Tt=q(" Path: "),$t={class:"path"},Bt={key:0,class:"error"},Lt={class:"variant-wrap"},Dt={class:"variant-footer"},qt={class:"variant-wrap"},At={key:0,class:"variant-footer"},Pt=F(()=>r("use",{"xlink:href":"#icon-trash"},null,-1)),Ut=[Pt],jt=["innerHTML"],Rt={key:0},Ft={key:1},Nt={key:0,class:"icon-converting",width:"15",height:"15"},Yt=F(()=>r("use",{"xlink:href":"#icon-loading"},null,-1)),Ht=[Yt],Wt=["disabled"],Xt=F(()=>r("p",null," Above, you see the original image. If it has been converted, you also see the converted image (provided that your browser supports webp). ",-1)),Et=F(()=>r("p",null," You can zoom in on the image, ie using scroll wheel. Both images will zoom, allowing you to compare the quality. Double-click the image to set zoom to 100%. You can also drag the image. ",-1));function Gt(t,e,o,l,i,n){const a=m("Variant"),c=m("Modal"),g=W("tooltip");return s(),d("div",It,[r("div",Ot,[Tt,r("span",$t,_(o.file.path),1)]),i.errorMsg!=""?(s(),d("div",Bt,[r("p",null,"Error: "+_(i.errorMsg),1)])):p("",!0),z(r("div",null,"Getting info...",512),[[I,i.loading]]),r("div",null,[r("div",Lt,[z(w(a,{ref:"original",title:"Original",info:i.originalInfo,height:i.height,zoom:i.zoom,"onUpdate:zoom":e[0]||(e[0]=u=>i.zoom=u),scaleZoomRatio:i.scaleZoomRatio,translateX:i.translateX,"onUpdate:translateX":e[1]||(e[1]=u=>i.translateX=u),translateY:i.translateY,"onUpdate:translateY":e[2]||(e[2]=u=>i.translateY=u),onLoad:n.onOriginalLoad,onResize:n.onOriginalResize},null,8,["info","height","zoom","scaleZoomRatio","translateX","translateY","onLoad","onResize"]),[[I,i.originalInfo]]),r("div",Dt,_(n.originalMime),1)]),r("div",qt,[z(w(a,{title:"Existing conversion",info:i.convertedInfo,height:i.height,zoom:i.zoom,"onUpdate:zoom":e[3]||(e[3]=u=>i.zoom=u),scaleZoomRatio:i.scaleZoomRatio,translateX:i.translateX,"onUpdate:translateX":e[4]||(e[4]=u=>i.translateX=u),translateY:i.translateY,"onUpdate:translateY":e[5]||(e[5]=u=>i.translateY=u)},null,8,["info","height","zoom","scaleZoomRatio","translateX","translateY"]),[[I,i.convertedInfo]]),i.convertedInfo?(s(),d("div",At,[q(_(n.convertedMime)+" ",1),z((s(),d("svg",{class:"icon-trash",onClick:e[6]||(e[6]=(...u)=>n.onDeleteConvertedClick&&n.onDeleteConvertedClick(...u))},Ut,512)),[[g,"Delete conversion"]])])):p("",!0)])]),z(w(c,{title:"Conversion log",closeButtonText:"Ok",width:"95vw",maxwidth:"1400px",height:"95vh",onClose:e[7]||(e[7]=u=>i.showingLogDialog=!1)},{default:S(()=>[r("div",{innerHTML:i.log},null,8,jt)]),_:1},512),[[I,i.showingLogDialog]]),r("div",null,[r("button",{onClick:e[8]||(e[8]=(...u)=>n.onConvertClick&&n.onConvertClick(...u))},[i.convertedInfo?(s(),d("span",Rt,"Reconvert")):p("",!0),i.convertedInfo?p("",!0):(s(),d("span",Ft,"Convert"))]),i.converting?(s(),d("svg",Nt,Ht)):p("",!0),i.log!=""?(s(),d("button",{key:1,onClick:e[9]||(e[9]=u=>i.showingLogDialog=!0),class:"log-button",disabled:i.converting},"View conversion log",8,Wt)):p("",!0)]),Xt,Et])}var Zt=v(Mt,[["render",Gt],["__scopeId","data-v-1e863e69"]]);const Kt={name:"FolderProperties",components:{},props:{file:{type:Object,default:{}}},watch:{file(t,e){}}},Qt={class:"folder-properties"},Jt={class:"path"},eo=q(" Path: "),to={class:"path"},oo=r("p",null," You cannot do anything on folders yet. Browse to an image... ",-1);function io(t,e,o,l,i,n){return s(),d("div",Qt,[r("div",Jt,[eo,r("span",to,_(o.file.path),1)]),oo])}var no=v(Kt,[["render",io]]);const so={name:"Group",components:{},props:{modelValue:{},ui:Object,schema:Object},emits:["update:modelValue"],methods:{onLocalChange(){this.$emit("update:modelValue",this.modelValue)}},mounted(){},data(){return{}}},ao={class:"group"},lo={key:0};function ro(t,e,o,l,i,n){return s(),d("div",ao,[o.ui.title?(s(),d("h3",lo,_(o.ui?o.ui.title:""),1)):p("",!0),J(t.$slots,"default",{},void 0,!0)])}var co=v(so,[["render",ro],["__scopeId","data-v-6ea04f9d"]]);const uo={name:"Input",props:{modelValue:{},schema:Object,sensitive:{type:Boolean,default:!1}},computed:{inputType:function(){if(this.dataType=="string")return"text";if(this.dataType=="int"||this.dataType=="float")return"number"},inputClass:function(){return this.dataType=="int"?"small":this.sensitive?"sensitive"+(this.passwordRevealed?" revealed":" obscured"):""},valueAsString:function(){return this.modelValue.toString()},dataType:function(){var t;if((t=this==null?void 0:this.schema)==null?void 0:t.type)switch(this.schema.type[0]){case"integer":return"int";default:return"string"}else return""}},emits:["update:modelValue"],methods:{updateLocalModel(t){this.stringValue=t.toString()},onEyeClick(){this.passwordRevealed=!this.passwordRevealed},onLocalChange(){var o;switch(((o=this==null?void 0:this.schema)==null?void 0:o.type)?this.schema.type[0]:"string"){case"integer":var e=parseInt(this.stringValue,10);this.$emit("update:modelValue",e);break;default:this.$emit("update:modelValue",this.stringValue);break}}},mounted(){this.updateLocalModel(this.modelValue)},watch:{modelValue(t,e){this.updateLocalModel(t)},option(t,e){}},data(){return{stringValue:"",passwordRevealed:!1}}},ho=["type"],po=r("use",{"xlink:href":"#icon-eye"},null,-1),mo=[po];function fo(t,e,o,l,i,n){return s(),d("div",{onInput:e[2]||(e[2]=a=>n.onLocalChange()),class:"autoui-input"},[z(r("input",{type:n.inputType,class:$(n.inputClass),"onUpdate:modelValue":e[0]||(e[0]=a=>i.stringValue=a)},null,10,ho),[[me,i.stringValue]]),o.sensitive?(s(),d("svg",{key:0,class:$({"icon-eye":!0,revealed:i.passwordRevealed}),onClick:e[1]||(e[1]=(...a)=>n.onEyeClick&&n.onEyeClick(...a))},mo,2)):p("",!0)],32)}var go=v(uo,[["render",fo]]);const vo={name:"MultiSelect",components:{VueMultiselect:oe},props:{modelValue:{},schema:Object,ui:Object},emits:["update:modelValue"],computed:{options:function(){var e,o;var t=[];return((e=this==null?void 0:this.schema)==null?void 0:e.enum)&&(t=this.schema.enum),((o=this==null?void 0:this.ui)==null?void 0:o.options)&&(t=this.ui.options),t}},methods:{updateLocalModel(t){var e=t.toString().trim().split(",");e=e.filter(function(o){return o!=""}),this.valueAsArray=e},onLocalChange(){this.$emit("update:modelValue",this.valueAsArray.join(","))}},mounted(){this.updateLocalModel(this.modelValue)},watch:{modelValue(t,e){this.updateLocalModel(t)}},data(){return{valueAsArray:[]}}},yo={key:0},_o={key:0,class:"multiselect__single"},wo={key:1,class:"multiselect__single"},bo={key:2,class:"multiselect__single"};function ko(t,e,o,l,i,n){const a=m("VueMultiselect");return s(),x(a,{modelValue:i.valueAsArray,"onUpdate:modelValue":[e[0]||(e[0]=c=>i.valueAsArray=c),n.onLocalChange],options:n.options,multiple:!0,"close-on-select":!1,"clear-on-select":!1,"preserve-search":!1,"preselect-first":!1,searchable:!1,allowEmpty:!0,placeholder:""},{selection:S(({values:c,search:g,isOpen:u})=>[u?p("",!0):(s(),d("span",yo,[c.length>0&&c.length<n.options.length?(s(),d("span",_o,_(c.join(", ")),1)):p("",!0),c.length==n.options.length?(s(),d("span",wo," all ")):p("",!0),c.length==0&&!u?(s(),d("span",bo," none ")):p("",!0)]))]),_:1},8,["modelValue","options","onUpdate:modelValue"])}var xo=v(vo,[["render",ko]]);const Vo={name:"Select",components:{VueMultiselect:oe},props:{modelValue:{},ui:Object,schema:Object},emits:["update:modelValue"],methods:{updateLocalModel(t){},onLocalChange(){this.$emit("update:modelValue",this.modelValue)}},computed:{options:function(){var e,o;var t=[];return((e=this==null?void 0:this.schema)==null?void 0:e.enum)&&(t=this.schema.enum),((o=this==null?void 0:this.ui)==null?void 0:o.options)&&(t=this.ui.options),t}},mounted(){},watch:{modelValue(t,e){}},data(){return{}}};function Co(t,e,o,l,i,n){const a=m("VueMultiselect");return s(),x(a,{modelValue:o.modelValue,"onUpdate:modelValue":[e[0]||(e[0]=c=>o.modelValue=c),n.onLocalChange],options:n.options,multiple:!1,"close-on-select":!0,"clear-on-select":!1,"preserve-search":!1,"preselect-first":!1,searchable:!1,selectLabel:"",deselectLabel:"",allowEmpty:!1},null,8,["modelValue","options","onUpdate:modelValue"])}var zo=v(Vo,[["render",Co]]);const So={name:"Slider",components:{VueSlider:ee},props:{modelValue:{},ui:Object,schema:Object},emits:["update:modelValue"],methods:{onLocalChange(){this.$emit("update:modelValue",this.modelValue)}},mounted(){},data(){return{}}},Mo={class:"slider"};function Io(t,e,o,l,i,n){const a=m("VueSlider");return s(),d("div",Mo,[w(a,{modelValue:o.modelValue,"onUpdate:modelValue":[e[0]||(e[0]=c=>o.modelValue=c),n.onLocalChange],min:o.schema.minimum,max:o.schema.maximum},null,8,["modelValue","onUpdate:modelValue","min","max"])])}var Oo=v(So,[["render",Io],["__scopeId","data-v-8f297ee6"]]);const To={name:"Toggle",props:{modelValue:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},reverse:{type:Boolean,default:!1},checkedText:{type:String,default:null},uncheckedText:{type:String,default:null},width:{type:[Number,String],default:75},height:{type:[Number,String],default:25},uncheckedBg:{type:String,default:"#939393"},uncheckedBgHover:{type:String,default:"#838383"},checkedBg:{type:String,default:"#0075ff"},checkedBgHover:{type:String,default:"#005cc8"},disabledBg:{type:String,default:"red"},dotColor:{type:String,default:"#fff"},fontSize:{type:[Number,String],default:"12"},checkedColor:{type:String,default:"#fff"},uncheckedColor:{type:String,default:"#fff"},fontWeight:{type:[Number,String],default:"normal"}},emits:["update:modelValue"],data(){return{checked:!0,hovering:!1}},methods:{toggle(){this.checked=!this.checked,this.$emit("update:modelValue",this.checked)}},mounted(){this.checked=this.modelValue},watch:{modelValue(t,e){this.checked=t}},computed:{bgStyle(){var t;return this.disabled?t=this.disabledBg:this.checked?t=this.hovering?this.checkedBgHover:this.checkedBg:t=this.hovering?this.uncheckedBgHover:this.uncheckedBg,{width:`${this.width}px`,height:`${this.height}px`,background:t}},dotStyle(){const t={background:this.dotColor,width:`${this.height-8}px`,height:`${this.height-8}px`,"min-width":`${this.height-8}px`,"min-height":`${this.height-8}px`,"margin-left":this.checked?`${this.width-(this.height-3)}px`:"5px"};return!this.checked&&this.reverse||this.checked&&!this.reverse?t.marginLeft=`${this.width-(this.height-3)}px`:(this.checked&&this.reverse||!this.checked&&!this.reverse)&&(t.marginLeft="5px"),t},textStyle(){const t={"font-weight":this.fontWeight,"font-size":`${this.fontSize}px`,color:this.checked&&!this.disabled?this.checkedColor:this.uncheckedColor,right:this.checked?`${this.height-3}px`:"auto",left:this.checked?"auto":`${this.height-3}px`};return!this.checked&&this.reverse?(t.right=`${this.height-3}px`,t.left="auto"):this.checked&&this.reverse&&(t.left=`${this.height-3}px`,t.right="auto"),t}}},$o=["aria-checked","aria-readonly"];function Bo(t,e,o,l,i,n){return s(),d("span",{class:"vue-toggles",style:A(n.bgStyle),role:"switch",tabindex:"0","aria-checked":i.checked?"true":"false","aria-readonly":o.disabled?"true":"false",onClick:e[0]||(e[0]=a=>o.disabled?null:this.toggle()),onKeyup:[e[1]||(e[1]=ie(ne(a=>o.disabled?null:this.toggle(),["prevent"]),["enter"])),e[2]||(e[2]=ie(ne(a=>o.disabled?null:this.toggle(),["prevent"]),["space"]))],onMouseleave:e[3]||(e[3]=a=>i.hovering=!1),onMouseover:e[4]||(e[4]=a=>i.hovering=!0)},[r("span",{"aria-hidden":"true",style:A(n.dotStyle),class:"dot"},[z(r("span",{style:A(n.textStyle),class:"text"},_(o.checkedText),5),[[I,o.checkedText&&i.checked]]),z(r("span",{style:A(n.textStyle),class:"text"},_(o.uncheckedText),5),[[I,o.uncheckedText&&!i.checked]])],4)],44,$o)}var Lo=v(To,[["render",Bo]]);const Do={name:"HelpIcon",props:{schema:Object,ui:Object},computed:{descriptionParagraphs(){return this.schema.description.split(/\n\n/)}},data(){return{btnDown:""}},methods:{}},qo={class:"help-icon"},Ao=r("svg",{class:"icon"},[r("use",{"xlink:href":"#icon-help"})],-1),Po={class:"menu-inner"},Uo={key:0,class:"buttons"},jo=["href","onMousedown"];function Ro(t,e,o,l,i,n){const a=m("VMenu");return s(),d("div",qo,[w(a,{delay:{show:100,hide:150}},{popper:S(()=>[r("div",Po,[(s(!0),d(B,null,P(n.descriptionParagraphs,c=>(s(),d("p",null,_(c),1))),256)),o.ui.links?(s(),d("div",Uo,[(s(!0),d(B,null,P(o.ui.links,c=>(s(),d("a",{href:c[1],target:"_blank",class:$({"mouse-down":i.btnDown==c[0]}),onMousedown:g=>i.btnDown=c[0],onMouseup:e[0]||(e[0]=g=>i.btnDown=""),onMouseleave:e[1]||(e[1]=g=>i.btnDown="")},_(c[0]),43,jo))),256))])):p("",!0)])]),default:S(()=>[Ao]),_:1})])}var Fo=v(Do,[["render",Ro]]);const No={name:"AutoComponent",components:{Group:co,Input:go,MultiSelect:xo,Select:zo,Slider:Oo,Toggle:Lo,HelpIcon:Fo},props:{ui:Object,modelValue:{},schema:Object,advancedView:Boolean,expressionContext:String},emits:["componentDataChange"],watch:{modelValue(t,e){this.updateLocalModel(t)},ui(){this.updateLocalModel(this.modelValue)},schema(){},localModel(t){this.$emit("componentDataChange",{value:this.localModel,"data-property":this.ui["data-property"]})}},computed:{componentSchema(){return this.ui.hasOwnProperty("data-property")&&this.schema.hasOwnProperty("properties")&&this.schema.properties.hasOwnProperty(this.ui["data-property"])?this.schema.properties[this.ui["data-property"]]:null},enabled(){return(this==null?void 0:this.ui.advanced)&&!this.advancedView?!1:this.displayExpr?this.displayExpr.evaluate(this.expressionContext):!0}},data(){return{localModel:"",displayExpr:null}},mounted(){this.updateLocalModel(this.modelValue),(this==null?void 0:this.ui.display)&&(this.displayExpr=new X(this.ui.display))},methods:{updateLocalModel(t){this.ui.hasOwnProperty("data-property")&&t.hasOwnProperty(this.ui["data-property"])&&(this.localModel=t[this.ui["data-property"]])},onComponentDataChange(t){this.$emit("componentDataChange",t)}}},Yo={key:0,class:"auto-component"},Ho={key:0},Wo={key:3};function Xo(t,e,o,l,i,n){const a=m("HelpIcon"),c=m("Toggle"),g=m("Slider"),u=m("Select"),C=m("MultiSelect"),V=m("Input"),y=m("AutoComponent",!0),D=m("Group");return s(),x(fe,{name:"fade"},{default:S(()=>{var O,T;return[n.enabled&&o.ui.component?(s(),d("div",Yo,[r("div",null,[o.ui.component!="group"?(s(),d("div",Ho,[r("label",null,_((O=n.componentSchema)==null?void 0:O.title),1),((T=n.componentSchema)==null?void 0:T.description)?(s(),x(a,{key:0,schema:n.componentSchema,ui:o.ui},null,8,["schema","ui"])):p("",!0)])):p("",!0),r("div",{class:$("component-"+o.ui.component)},[o.ui.component=="checkbox"?(s(),x(c,{key:0,modelValue:i.localModel,"onUpdate:modelValue":e[0]||(e[0]=b=>i.localModel=b),height:20,width:40},null,8,["modelValue"])):p("",!0),o.ui.component=="slider"?(s(),x(g,{key:1,modelValue:i.localModel,"onUpdate:modelValue":e[1]||(e[1]=b=>i.localModel=b),schema:n.componentSchema},null,8,["modelValue","schema"])):p("",!0),o.ui.component=="select"?(s(),x(u,{key:2,modelValue:i.localModel,"onUpdate:modelValue":e[2]||(e[2]=b=>i.localModel=b),schema:n.componentSchema,ui:o.ui},null,8,["modelValue","schema","ui"])):p("",!0),o.ui.component=="multi-select"?(s(),d("div",Wo,[w(C,{modelValue:i.localModel,"onUpdate:modelValue":e[3]||(e[3]=b=>i.localModel=b),schema:n.componentSchema,ui:o.ui},null,8,["modelValue","schema","ui"])])):p("",!0),o.ui.component=="input"?(s(),x(V,{key:4,modelValue:i.localModel,"onUpdate:modelValue":e[4]||(e[4]=b=>i.localModel=b),schema:n.componentSchema},null,8,["modelValue","schema"])):p("",!0),o.ui.component=="password"?(s(),x(V,{key:5,sensitive:!0,modelValue:i.localModel,"onUpdate:modelValue":e[5]||(e[5]=b=>i.localModel=b),schema:n.componentSchema},null,8,["modelValue","schema"])):p("",!0),o.ui.component=="group"?(s(),x(D,{key:6,modelValue:i.localModel,"onUpdate:modelValue":e[6]||(e[6]=b=>i.localModel=b),schema:n.componentSchema,ui:o.ui},{default:S(()=>[(s(!0),d(B,null,P(o.ui["sub-components"],b=>(s(),x(y,{ui:b,schema:o.schema,modelValue:o.modelValue,advancedView:o.advancedView,expressionContext:o.expressionContext,onComponentDataChange:n.onComponentDataChange},null,8,["ui","schema","modelValue","advancedView","expressionContext","onComponentDataChange"]))),256))]),_:1},8,["modelValue","schema","ui"])):p("",!0)],2)])])):p("",!0)]}),_:1})}var Eo=v(No,[["render",Xo],["__scopeId","data-v-26c389a5"]]);const Go={name:"AutoUI",components:{AutoComponent:Eo},props:{schema:Object,ui:Object,modelValue:{},expressionContext:String,advancedView:{type:Boolean,default:!1},showAdvancedButton:{type:Boolean,default:!0}},computed:{},data(){return{}},mounted(){},methods:{onComponentDataChange(t){this.modelValue[t["data-property"]]=t.value}}},Zo={class:"autoui"},Ko={key:0,class:"view-select"},Qo=["textContent"];function Jo(t,e,o,l,i,n){const a=m("AutoComponent"),c=W("tooltip");return s(),d("div",Zo,[o.showAdvancedButton?(s(),d("div",Ko,[z(r("button",{textContent:_(o.advancedView?"Hide advanced options":"Show advanced options"),onClick:e[0]||(e[0]=g=>o.advancedView=!o.advancedView)},null,8,Qo),[[c,"Swich between advanced view (all available options) and simple view (most used options)"]])])):p("",!0),w(a,{ui:o.ui,schema:o.schema,modelValue:o.modelValue,advancedView:o.advancedView,expressionContext:o.expressionContext,onComponentDataChange:n.onComponentDataChange},null,8,["ui","schema","modelValue","advancedView","expressionContext","onComponentDataChange"])])}var ei=v(Go,[["render",Jo],["__scopeId","data-v-30912c7e"]]);const ti={name:"ConvertOptions2",components:{AutoUI:ei},computed:{tweakpng(){var t,e;return((e=(t=this==null?void 0:this.general)==null?void 0:t.data)==null?void 0:e.tweakpng)==null?!0:this.general.data.tweakpng}},methods:{isOptionSupportedByConverter(t,e){return!e||e=="stack"||!this.unsupportedBy||!this.unsupportedBy[t]?!0:!this.unsupportedBy[t].includes(e)},getOptions(){var V;if(!((V=this==null?void 0:this.general)==null?void 0:V.data))return{};let t=JSON.parse(JSON.stringify(this.general.data)),e=t.converter,o={};for(var l in t)t.hasOwnProperty(l)&&this.isOptionSupportedByConverter(l,e)&&(o[l]=t[l]);if(i!="stack"){for(var i in this.uniqueOptionIds)if(i!=e)for(var n=0;n<this.uniqueOptionIds[i].length;n++){let y=this.uniqueOptionIds[i][n];delete o[y]}}let a=o.tweakpng;if(delete o.tweakpng,delete o.png,!a)return o;let c=this.png.data,g=c.overrides,u={},C=this;return g.forEach(function(y){c[y]!==void 0&&C.isOptionSupportedByConverter(y,e)&&(u[y]=c[y])}),o.png=u,o}},mounted(){var t=this;L.post("conversion-settings",{folder:""},function(e){let o=[],l=[],i=[],n={},a={},c={overrides:["encoding","quality","near-lossless"]},g=[],u=e.options.general,C=e.options.unique;u.push({id:"tweakpng",schema:{title:"Tweak settings for PNG",description:"",type:["boolean"],default:!1},ui:{component:"checkbox","data-property":"tweakpng"},unsupportedBy:[]});let V=u.map(f=>f);for(const f in C)for(let h=0;h<C[f].length;h++){let k=C[f][h];V.push(k)}for(var y=0;y<V.length;y++)g.push(V[y].id);i.push({component:"multi-select","data-property":"overrides",options:g,display:"false"}),n.overrides={title:"Overrides",description:"Select options you want to override for PNG",type:["string"],default:[]};let D={},O=!1,T=[];for(var y=0;y<V.length;y++){let h=V[y];h.schema&&(n[h.id]=h.schema,e.defaults[h.id]?(a[h.id]=e.defaults[h.id],c[h.id]=e.defaults[h.id]):h.schema.default!=null&&(a[h.id]=h.schema.default,c[h.id]=h.schema.default),h.schema.default!=null&&(T[h.id]=h.schema.default)),h.unsupportedBy&&(D[h.id]=h.unsupportedBy)}if(e.defaults.png)for(const[f,h]of Object.entries(e.defaults.png))c[f]!=h&&(c[f]=h,O=!0);for(var y=0;y<u.length;y++){let h=u[y];if(h.ui){let k=h.ui;k["data-property"]=h.id,k.display?(k.display.indexOf("option.encoding")>=0&&(k.display=k.display.replace(/option.encoding/gi,"getOption('encoding')")),k.display='supported("'+h.id+'") && ('+k.display+")"):k.display='supported("'+h.id+'")',o.push(k);let M=Object.assign({},k);M.display?M.display='overriding("'+h.id+'") && ('+M.display+")":M.display='overriding("'+h.id+'")',i.push(M)}}let b=[];for(const f in C){let h={component:"group",title:f+" options","sub-components":[],display:"(option('converter') == '"+f+"') || (option('converter') == 'stack')"};b[f]=[];let k=!1;for(let M=0;M<C[f].length;M++){let j=C[f][M];if(j.ui){let N=j.ui;N["data-property"]=j.id,N.advanced||(k=!0),h["sub-components"].push(N),b[f].push(j.id)}}h.advanced=!k,h["sub-components"].length>0&&l.push(h)}a.tweakpng=O,t.uniqueOptionIds=K({},b),t.general={ui:{component:"group",title:"General","sub-components":o},data:a},t.uniqueUi={component:"group",title:"","sub-components":l},t.png={ui:{component:"group",title:"PNG tweaks","sub-components":i},data:c},t.unsupportedBy=D,t.schema={title:"Options",type:["object"],properties:n};let ce={option:function(f){return t.isOptionSupportedByConverter(f,t.general.data.converter)?t.general.data[f]:T[f]},imageType:"any",supported:function(f){return t.general.data.converter?t.isOptionSupportedByConverter(f,t.general.data.converter):!0}},de={option:function(f){let k=t.png.data.overrides.indexOf("converting")>-1?t.png.data.converter:t.general.data.converter;return t.isOptionSupportedByConverter(f,k)?t.png.data.overrides.indexOf(f)>-1?t.png.data[f]:t.general.data[f]:T[f]},imageType:"png",overriding:function(f){return t.png.data.overrides.indexOf(f)>-1},supported:function(f){return t.general.data.converter?t.isOptionSupportedByConverter(f,t.general.data.converter):!0}};X.setGlobalContext(ce,"general"),X.setGlobalContext(de,"png")})},data(){return{schema:{},general:{ui:{},data:{quality:40,"alpha-quality":65,"auto-limit":!0,"command-line-options":"","skip-these-precompiled-binaries":""}},png:{ui:{},data:{}},advancedView:!1,unsupportedBy:[],uniqueUi:[],uniqueOptionIds:[]}}},oi={class:"convert-options"},ii=["textContent"];function ni(t,e,o,l,i,n){const a=m("AutoUI"),c=W("tooltip");return s(),d("div",oi,[z(r("button",{textContent:_(i.advancedView?"Hide advanced options":"Show advanced options"),onClick:e[0]||(e[0]=g=>i.advancedView=!i.advancedView)},null,8,ii),[[c,"Swich between advanced view (all available options) and simple view (most used options)"]]),w(a,{ui:i.general.ui,schema:i.schema,modelValue:i.general.data,expressionContext:"general",advancedView:i.advancedView,showAdvancedButton:!1},null,8,["ui","schema","modelValue","advancedView"]),z(w(a,{ui:i.png.ui,schema:i.schema,modelValue:i.png.data,expressionContext:"png",advancedView:i.advancedView,showAdvancedButton:!1},null,8,["ui","schema","modelValue","advancedView"]),[[I,n.tweakpng]]),w(a,{ui:i.uniqueUi,schema:i.schema,modelValue:i.general.data,expressionContext:"general",advancedView:i.advancedView,showAdvancedButton:!1},null,8,["ui","schema","modelValue","advancedView"])])}var si=v(ti,[["render",ni]]);const ai={name:"Welcome"},li={class:"welcome"},ri=Q('<div class="headline"><div>Welcome to</div><h3>WebP Convert file manager</h3></div><p> To open a folder, click the "+" sign next to the folder name or double click the folder name </p><p><h4>Whats new?</h4><ul><li> You can now adjust conversion settings. The settings start out with the defaults stored in WebP Express (It will however not start out with Stack converter, but instead with your top active working converter - in order to simplify the UI). The options UI are generated from the option definitions exposed be the WebP Convert library. This means that the UI will always be up-to-date. Note that the WebP Express settings is not quite up-to-date. So you will find conversion settings in this interface, which you will not find in WebP Express settings. Also, this interface has a "Auto-limit" option (advanced option), which is used instead of the quality:auto, max-quality and default-quality settings, which are deprecated. </li></ul></p><p><h4>Whats planned ahead?</h4> I have plenty of ideas, but no planned priority. Ideas: <ul><li>Trigger bulk conversion on folders / mark for background conversion</li><li>Stats on folders</li><li>Display more info on images (dimensions, quality on jpeg and such)</li><li>Interface to allow adjusting quality on a conversion quickly and compare directly</li><li>Compare converters side-by-side (visual quality, result size, conversion time)</li></ul> To support development, you can <a href="https://ko-fi.com/rosell" target="_blank">buy me a cup of coffee</a></p>',4),ci=[ri];function di(t,e,o,l,i,n){return s(),d("div",li,ci)}var ui=v(ai,[["render",di]]);const hi={name:"WCFM",components:{SVGs:Ve,ConvertOptions2:si,FileProperties:Zt,FolderProperties:no,Modal:ae,Files:Ge,Splitpanes:se.exports.Splitpanes,Pane:se.exports.Pane,Welcome:ui},methods:{onConvertCloseClick(){console.log("CLRCL"),this.showConvertOptions=!1},onFileSelect(t,e){this.file={path:t,isDir:e}},displayInfo(t){var e=this;L.post("info",{path:t},function(o){e.selectedInfo=o})}},mounted(){var t=this;L.post("get-folder",{path:""},function(e){t.item=e.children[0]})},data(){return{file:null,selectedItem:null,item:null,treeStatusText:"loading file tree...",selectedInfo:{},showConvertOptions:!1}},provide(){return{wcfm:this}}},pi={class:"wcfm",style:{overflow:"hidden"}},mi={class:"pane-content"},fi={key:0,class:"pane-content"};function gi(t,e,o,l,i,n){const a=m("SVGs"),c=m("Files"),g=m("pane"),u=m("FileProperties"),C=m("FolderProperties"),V=m("Welcome"),y=m("splitpanes"),D=m("ConvertOptions2"),O=m("Modal");return s(),d("div",pi,[w(a),w(y,{class:"default-theme",style:{position:"absolute",top:"0",left:"0"}},{default:S(()=>[w(g,{size:"30"},{default:S(()=>[r("div",mi,[r("div",null,[w(c,{item:i.item,statusText:i.treeStatusText,onSelect:n.onFileSelect},null,8,["item","statusText","onSelect"])])])]),_:1}),w(g,{size:"70",style:{"overflow-y":"auto"}},{default:S(()=>[i.file?(s(),d("div",fi,[i.file.isDir?p("",!0):(s(),x(u,{key:0,file:i.file},null,8,["file"])),i.file.isDir?(s(),x(C,{key:1,file:i.file},null,8,["file"])):p("",!0)])):p("",!0),i.file?p("",!0):(s(),x(V,{key:1}))]),_:1})]),_:1}),r("button",{class:"convertOptionsButton",onClick:e[0]||(e[0]=T=>i.showConvertOptions=!0)},"Conversion options"),z(w(O,{title:"Conversion options",closeButtonText:"Ok",width:"600px",height:"95%",maxheight:"650px",alignment:"right",onClose:n.onConvertCloseClick},{default:S(()=>[w(D,{ref:"convertOptions"},null,512)]),_:1},8,["onClose"]),[[I,i.showConvertOptions]])])}var vi=v(hi,[["render",gi]]);var yi={general:[{id:"converter",schema:{title:"Converter",description:"Conversion method. Cwebp and vips are best. the *magick are nearly as good, but only recent versions supports near-lossless. gd is poor, as it does not support any webp options. For full discussion, check the guide",enum:["cwebp","vips","imagick","gmagick","imagemagick","graphicsmagick","wpc","ffmpeg","ewww","gd","stack"],type:["string"],default:"stack"},ui:{component:"select",links:[["Guide","https://github.com/rosell-dk/webp-convert/blob/master/docs/v1.3/converting/converters.md"]]},sensitive:!1,options:["cwebp","vips","imagick","gmagick","imagemagick","graphicsmagick","wpc","ffmpeg","ewww","gd","stack"]},{id:"encoding",schema:{title:"Encoding",description:'Set encoding for the webp. If you choose "auto", webp-convert will convert to both lossy and lossless and pick the smallest result',enum:["auto","lossy","lossless"],type:["string"],default:"auto"},ui:{component:"select",links:[["Guide","https://github.com/rosell-dk/webp-convert/blob/master/docs/v2.0/converting/introduction-for-converting.md#auto-selecting-between-losslesslossy-encoding"]]},sensitive:!1,options:["auto","lossy","lossless"],unsupportedBy:["ewww","gd","stack"]},{id:"quality",schema:{title:"Quality (Lossy)",description:'Quality for lossy encoding. In case you enable "auto-limit", you can consider this property a maximum quality.',"default-png":85,"default-jpeg":75,oneOf:[{type:"number",minimum:0,maximum:100},{type:"string",enum:["auto"]}],type:["integer","string"],default:75},ui:{component:"slider",display:"option('encoding') != 'lossless'"},unsupportedBy:["stack"]},{id:"auto-limit",schema:{title:"Auto-limit",description:`Enable this option to prevent an unnecessarily high quality setting for low quality jpegs. It works by adjusting quality setting down to the quality of the jpeg. Converting ie a jpeg with quality:50 to ie quality:80 does not get you better quality than converting it to quality:80, but it does get you a much bigger file - so you really should enable this option.
|
16 |
+
|
17 |
+
The option is ignored for PNG and never adjusts quality up.
|
18 |
+
|
19 |
+
The feature requires Imagick, ImageMagick or Gmagick in order to detect the quality of the jpeg.
|
20 |
+
|
21 |
+
The option is relative new. Before this option, you could do the same by setting quality to "auto" and specifying a "max-quality" and a "default-quality". These are deprecated now.`,type:["boolean"],default:!0},ui:{component:"checkbox",advanced:!0,links:[["Guide","https://github.com/rosell-dk/webp-convert/blob/master/docs/v2.0/converting/introduction-for-converting.md#preventing-unnecessarily-high-quality-setting-for-low-quality-jpegs"]],display:"option('encoding') != 'lossless'"},unsupportedBy:[]},{id:"alpha-quality",schema:{title:"Alpha quality",description:"Quality of alpha channel. Often, there is no need for high quality transparency layer and in some cases you can tweak this all the way down to 10 and save a lot in file size. The option only has effect with lossy encoding, and of course only on images with transparency.",type:["integer"],default:85,minimum:0,maximum:100},ui:{component:"slider",links:[["Guide","https://github.com/rosell-dk/webp-convert/blob/master/docs/v2.0/converting/introduction-for-converting.md#alpha-quality"]],display:"(option('encoding') != 'lossless') && (imageType!='jpeg')"},unsupportedBy:["ffmpeg","ewww","gd","stack"]},{id:"near-lossless",schema:{title:'"Near lossless" quality',description:"This option allows you to get impressively better compression for lossless encoding, with minimal impact on visual quality. The range is 0 (maximum preprocessing) to 100 (no preprocessing). Read the guide for more info.",type:["integer"],default:60,minimum:0,maximum:100},ui:{component:"slider",links:[["Guide","https://github.com/rosell-dk/webp-convert/blob/master/docs/v2.0/converting/introduction-for-converting.md#near-lossless"]],display:"option('encoding') != 'lossy'"},unsupportedBy:["gmagick","graphicsmagick","ffmpeg","ewww","gd","stack"]},{id:"metadata",schema:{title:"Metadata",description:'Determines which metadata that should be copied over to the webp. Setting it to "all" preserves all metadata, setting it to "none" strips all metadata. *cwebp* can take a comma-separated list of which kinds of metadata that should be copied (ie "exif,icc"). *gd* will always remove all metadata and *ffmpeg* will always keep all metadata. The rest can either strip all or keep all (they will keep all, unless the option is set to *none*)',type:["string"],default:"none"},ui:{component:"multi-select",options:["all","none","exif","icc","xmp"]},sensitive:!1,unsupportedBy:["ffmpeg","gd","stack"]},{id:"method",schema:{title:"Reduction effort (0-6)",description:'Controls the trade off between encoding speed and the compressed file size and quality. Possible values range from 0 to 6. 0 is fastest. 6 results in best quality and compression. PS: The option corresponds to the "method" option in libwebp',type:["integer"],default:6,minimum:0,maximum:6},ui:{component:"slider",advanced:!0},unsupportedBy:["ewww","gd","stack"]},{id:"sharp-yuv",schema:{title:"Sharp YUV",description:"Better RGB->YUV color conversion (sharper and more accurate) at the expense of a little extra conversion time.",type:["boolean"],default:!0},ui:{component:"checkbox",advanced:!0,links:[["Ctrl.blog","https://www.ctrl.blog/entry/webp-sharp-yuv.html"]]},unsupportedBy:["ffmpeg","ewww","gd","stack"]},{id:"auto-filter",schema:{title:"Auto-filter",description:"Turns auto-filter on. This algorithm will spend additional time optimizing the filtering strength to reach a well-balanced quality. Unfortunately, it is extremely expensive in terms of computation. It takes about 5-10 times longer to do a conversion. A 1MB picture which perhaps typically takes about 2 seconds to convert, will takes about 15 seconds to convert with auto-filter. ",type:["boolean"],default:!1},ui:{component:"checkbox",advanced:!0},unsupportedBy:["vips","ffmpeg","ewww","gd","stack"]},{id:"low-memory",schema:{title:"Low memory",description:"Reduce memory usage of lossy encoding at the cost of ~30% longer encoding time and marginally larger output size. Only effective when the *method* option is 3 or more. Read more in [the docs](https://developers.google.com/speed/webp/docs/cwebp)",type:["boolean"],default:!1},ui:{component:"checkbox",advanced:!0,display:"(option('encoding') != 'lossless') && (option('method')>2)"},unsupportedBy:["ffmpeg","ewww","gd","stack"]},{id:"preset",schema:{title:"Preset",description:'Using a preset will set many of the other options to suit a particular type of source material. It even overrides them. It does however not override the quality option. "none" means that no preset will be set',enum:["none","default","photo","picture","drawing","icon","text"],type:["string"],default:"none"},ui:{component:"select",advanced:!0},sensitive:!1,options:["none","default","photo","picture","drawing","icon","text"],unsupportedBy:["ewww","gd","stack"]}],unique:{cwebp:[{id:"cwebp-use-nice",schema:{title:"Use nice",description:"If *use-nice* is set, it will be examined if the *nice* command is available. If it is, the binary is executed using *nice*. This assigns low priority to the process and will save system resources - but result in slower conversion.",type:["boolean"],default:!0},ui:{component:"checkbox",advanced:!0}},{id:"cwebp-try-cwebp",schema:{title:"Try plain cwebp command",description:'If set, the converter will try executing "cwebp -version". In case it succeeds, and the version is higher than those working cwebps found using other methods, the conversion will be done by executing this cwebp.',type:["boolean"],default:!0},ui:{component:"checkbox",advanced:!0}},{id:"cwebp-try-discovering-cwebp",schema:{title:"Try discovering cwebp binary",description:'If set, the converter will try to discover installed cwebp binaries using a "which -a cwebp" command, or in case that fails, a "whereis -b cwebp" command. These commands will find cwebp binaries residing in PATH',type:["boolean"],default:!0},ui:{component:"checkbox",advanced:!0}},{id:"cwebp-try-common-system-paths",schema:{title:"Try locating cwebp in common system paths",description:'If set, the converter will look for a cwebp binaries residing in common system locations such as "/usr/bin/cwebp". If such exist, it is assumed that they are valid cwebp binaries. A version check will be run on the binaries found (they are executed with the "-version" flag. The cwebp with the highest version found using this method and the other enabled methods will be used for the actual conversion.Note: All methods for discovering cwebp binaries are per default enabled. You can save a few microseconds by disabling some, but it is probably not worth it, as your setup will then become less resilient to system changes.',type:["boolean"],default:!0},ui:{component:"checkbox",advanced:!0}},{id:"cwebp-try-supplied-binary-for-os",schema:{title:"Try precompiled cwebp binaries",description:'If set, the converter will try use a precompiled cwebp binary that comes with webp-convert. But only if it has a higher version that those found by other methods. As the library knows the versions of its bundled binaries, no additional time is spent executing them with the "-version" parameter. The binaries are hash-checked before executed. The library btw. comes with several versions of precompiled cwebps because they have different dependencies - some works on some systems and others on others.',type:["boolean"],default:!0},ui:{component:"checkbox",advanced:!0}},{id:"cwebp-skip-these-precompiled-binaries",schema:{title:"Skip these precompiled binaries",description:"",type:["string"],default:""},ui:{component:"multi-select",advanced:!0,options:["cwebp-120-linux-x86-64","cwebp-110-linux-x86-64","cwebp-103-linux-x86-64-static","cwebp-061-linux-x86-64"],display:"option('cwebp-try-supplied-binary-for-os') == true"},sensitive:!1},{id:"cwebp-rel-path-to-precompiled-binaries",schema:{title:"Rel path to precompiled binaries",description:"",type:["string"],default:"./Binaries"},ui:{component:"",advanced:!0,display:"option('cwebp-try-supplied-binary-for-os') == true"},sensitive:!0},{id:"cwebp-command-line-options",schema:{title:"Command line options",description:"",type:["string"],default:""},ui:{component:"input",advanced:!0},sensitive:!1}],vips:[],imagick:[],gmagick:[],imagemagick:[{id:"imagemagick-use-nice",schema:{title:"Use nice",description:"If *use-nice* is set, it will be examined if the *nice* command is available. If it is, the binary is executed using *nice*. This assigns low priority to the process and will save system resources - but result in slower conversion.",type:["boolean"],default:!0},ui:{component:"checkbox",advanced:!0}},{id:"imagemagick-try-common-system-paths",schema:{title:"Try locating ImageMagick in common system paths",description:'If set, the converter will look for a ImageMagick binaries residing in common system locations such as "/usr/bin/convert". If such exist, it is assumed that they are valid ImageMagick binaries. ',type:["boolean"],default:!0},ui:{component:"checkbox",advanced:!0}}],graphicsmagick:[{id:"graphicsmagick-use-nice",schema:{title:"Use nice",description:"If *use-nice* is set, it will be examined if the *nice* command is available. If it is, the binary is executed using *nice*. This assigns low priority to the process and will save system resources - but result in slower conversion.",type:["boolean"],default:!0},ui:{component:"checkbox",advanced:!0}}],wpc:[{id:"wpc-api-key",schema:{title:"API key",description:"",type:["string"],default:""},ui:{component:"password",advanced:!1,display:"option('wpc-api-version') != 0"},sensitive:!0},{id:"wpc-secret",schema:{title:"Secret",description:"",type:["string"],default:""},ui:{component:"password",advanced:!1,display:"option('wpc-api-version') == 0"},sensitive:!0},{id:"wpc-api-url",schema:{title:"API url",description:"URL to connect to",type:["string"],default:""},ui:{component:"password",advanced:!1},sensitive:!0},{id:"wpc-api-version",schema:{title:"API version",description:"",type:["integer"],default:2,minimum:0,maximum:2},ui:{component:"select",advanced:!1,options:["0","1","2"]}},{id:"wpc-crypt-api-key-in-transfer",schema:{title:"Crypt API key in transfer",description:"",type:["boolean"],default:!1},ui:{component:"checkbox",advanced:!0,display:"option('wpc-api-version') >= 1"}}],ffmpeg:[{id:"ffmpeg-use-nice",schema:{title:"Use nice",description:"If *use-nice* is set, it will be examined if the *nice* command is available. If it is, the binary is executed using *nice*. This assigns low priority to the process and will save system resources - but result in slower conversion.",type:["boolean"],default:!0},ui:{component:"checkbox",advanced:!0}}],ewww:[{id:"ewww-api-key",schema:{title:"Ewww API key",description:'ewww API key. If you choose "auto", webp-convert will convert to both lossy and lossless and pick the smallest result',type:["string"],default:""},ui:{component:"password"},sensitive:!0},{id:"ewww-check-key-status-before-converting",schema:{title:"Check key status before converting",description:"If enabled, the api key will be validated (relative inexpensive) before trying to convert. For automatic conversions, you should enable it. Otherwise you run the risk that the same files will be uploaded to ewww cloud service over and over again, in case the key has expired. For manually triggered conversions, you can safely disable the option.",type:["boolean"],default:!0},ui:{component:"checkbox"}}],gd:[],stack:[{id:"stack-converters",schema:{title:"Converters",description:"Converters to try, ordered by priority.",sensitive:!0,type:["array"],default:["cwebp","vips","imagick","gmagick","imagemagick","graphicsmagick","wpc","ffmpeg","ewww","gd"]},ui:{component:"multi-select",options:["cwebp","vips","imagick","gmagick","imagemagick","graphicsmagick","wpc","ffmpeg","ewww","gd"],advanced:!0},sensitive:!0},{id:"stack-shuffle",schema:{title:"Shuffle",description:"Shuffles the converter order on each conversion. Can for example be used to spread out requests on multiple cloud converters",type:["boolean"],default:!1},ui:{component:"checkbox",advanced:!0}}]}};const E=ge(vi);E.use(te);E.use(ve,{defaultHtml:!1});window.wcfmoptions||(window.wcfmoptions={},window.wcfmoptions.poster=function(t,e,o,l){switch(t){case"get-folder":switch(e.path){case"":var i={children:[{name:"/",isDir:!0,nickname:"root"}]};break;case"/":var i={children:[{name:"empty-folder",isDir:!0,isEmpty:!0},{name:"file",isDir:!1,isConverted:!0},{name:"aaa",isDir:!1,isConverted:!0},{name:"test-folder",isDir:!0},{name:"file2",isDir:!1,isConverted:!1}]};break;case"/empty-folder":var i={children:[]};break;case"/test-folder":var i={children:[{name:"banana",isDir:!1},{name:"subfolder",isDir:!0},{name:"apple",isDir:!1}]};break;case"/test-folder/subfolder":var i={children:[{name:"file2",isDir:!1},{name:"file1",isDir:!1}]};break;default:l();return}break;case"conversion-settings":var i={options:yi,defaults:{quality:17,"ewww-api-key":"apilapi","wpc-api-key":"bogulogu",png:{encoding:"lossless",quality:90},converter:"vips"},systemStatus:{converterRequirements:{gd:{extensionLoaded:!1,compiledWithWebP:!0}}}};break;case"info":if(e.path=="/file2")var i={original:{size:100,url:"http://localhost:3000/src/assets/200x100.jpg",mime2:"image/jpeg"},converted:{size:70,url:"http://localhost:3000/src/assets/200x100.jpg",mime:"image/webp"},log:`blah blah blah
|
22 |
+
\rand *more* blah`};else if(e.path=="/file")var i={original:{size:100,url:"http://localhost:3000/src/assets/dummy2.jpg",mime:"image/jpeg"},log:"blah blah *blah*"};else var i={original:{size:100,url:"http://localhost:3000/src/assets/dummy.jpg",mime:"image/jpeg"},converted:{size:70,url:"http://localhost:3000/src/assets/dummy.jpg",mime:"image/webp"},log:"blah blah *blah*"};break;case"convert":if(e.path=="/file2")var i={success:!1,data:"We pretend file2 errors converting...",log:"Oh no!"};else var i={success:!0,converted:{size:26050,url:"http://we0/wordpress/wp-content/uploads/2021/10/Screenshot_2021-10-04_13-43-11.png.webp",mime:"image/webp"},log:`All is *groovy*
|
23 |
+
next line`};break;case"delete-converted":if(e.path=="/file2")var i={success:!1,data:"We pretend file2 errors deleting..."};else var i={success:!0};break;default:var i="ok";break}o(i)});E.mount("#webpconvert-filemanager");
|
lib/wcfm/index.ee44cdbf.js
DELETED
@@ -1,29 +0,0 @@
|
|
1 |
-
import{_ as f,o as l,c,a as R,b as a,n as S,d as u,e as y,t as p,p as V,f as I,r as m,g as _,F as x,h as Y,i as z,j as D,k as H,m as j,V as O,w as b,l as $,v as k,s as X,q as B,u as U}from"./vendor.b4e4e155.js";const A=function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))n(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const r of i.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&n(r)}).observe(document,{childList:!0,subtree:!0});function s(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerpolicy&&(i.referrerPolicy=o.referrerpolicy),o.crossorigin==="use-credentials"?i.credentials="include":o.crossorigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(o){if(o.ep)return;o.ep=!0;const i=s(o);fetch(o.href,i)}};A();class v{static post(e,s,n){var o=this;window.wcfmoptions.poster(e,s,function(i){n.call(o,i)},function(){console.log("failure")})}}const E={},q={style:{position:"absolute",width:"0",height:"0"},width:"0",height:"0",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},G=R(`<defs><symbol id="icon-folder" viewBox="0 0 309.267 309.267"><g><path style="fill:#D0994B;" d="M260.944,43.491H125.64c0,0-18.324-28.994-28.994-28.994H48.323c-10.67,0-19.329,8.65-19.329,19.329
|
2 |
-
v222.286c0,10.67,8.659,19.329,19.329,19.329h212.621c10.67,0,19.329-8.659,19.329-19.329V62.82
|
3 |
-
C280.273,52.15,271.614,43.491,260.944,43.491z"></path><path style="fill:#E4E7E7;" d="M28.994,72.484h251.279v77.317H28.994V72.484z"></path><path style="fill:#F4B459;" d="M19.329,91.814h270.609c10.67,0,19.329,8.65,19.329,19.329l-19.329,164.298
|
4 |
-
c0,10.67-8.659,19.329-19.329,19.329H38.658c-10.67,0-19.329-8.659-19.329-19.329L0,111.143C0,100.463,8.659,91.814,19.329,91.814z
|
5 |
-
"></path></g></symbol><symbol id="icon-unfold" viewBox="0 0 32 32"><path d="M28,14H18V4c0-1.104-0.896-2-2-2s-2,0.896-2,2v10H4c-1.104,0-2,0.896-2,2s0.896,2,2,2h10v10c0,1.104,0.896,2,2,2 s2-0.896,2-2V18h10c1.104,0,2-0.896,2-2S29.104,14,28,14z"></path></symbol><symbol id="icon-fold" viewBox="0 0 24 24"><g fill="none" stroke="#000" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><line x1="5" y1="12" x2="19" y2="12"></line></g></symbol><symbol id="icon-file" viewBox="0 0 56 56"><g><path style="fill:#E9E9E0;" d="M36.985,0H7.963C7.155,0,6.5,0.655,6.5,1.926V55c0,0.345,0.655,1,1.463,1h40.074
|
6 |
-
c0.808,0,1.463-0.655,1.463-1V12.978c0-0.696-0.093-0.92-0.257-1.085L37.607,0.257C37.442,0.093,37.218,0,36.985,0z"></path><polygon style="fill:#D9D7CA;" points="37.5,0.151 37.5,12 49.349,12 "></polygon><circle style="fill:#F3D55B;" cx="18.931" cy="14.431" r="4.569"></circle><polygon style="fill:#c5e8e1;" points="6.5,39 17.5,39 49.5,39 49.5,28 39.5,18.5 29,30 23.517,24.517 "></polygon><path style="fill:#14A085;" d="M48.037,56H7.963C7.155,56,6.5,55.345,6.5,54.537V39h43v15.537C49.5,55.345,48.845,56,48.037,56z"></path><g></g></g></symbol><svg id="icon-ok" viewBox="0 0 256 256"><g fill="green" stroke="none" transform="translate(0.000000,256.000000) scale(0.100000,-0.100000)"><path d="M1064 2545 c-406 -72 -744 -324 -927 -690 -96 -193 -127 -333 -127 -575 0 -243 33 -387 133 -585 177 -351 518 -606 907 -676 118 -22 393 -17 511 8 110 24 252 78 356 136 327 183 569 525 628 887 19 122 19 338 0 460 -81 498 -483 914 -990 1025 -101 22 -389 28 -491 10z m814 -745 c39 -27 73 -59 77 -70 9 -27 10 -25 -372 -590 -345 -510 -357 -524 -420 -512 -19 4 -98 74 -250 225 -123 121 -225 228 -228 238 -3 10 1 31 9 47 20 40 125 132 149 132 11 0 79 -59 162 -140 79 -77 146 -140 149 -140 3 0 38 48 78 108 95 143 465 678 496 720 35 46 64 42 150 -18z"></path></g></svg><svg id="icon-not-available" viewBox="0 0 500.000000 500.000000" preserveAspectRatio="xMidYMid meet"><g fill="#b11010" stroke="none" transform="translate(0.000000,500.000000) scale(0.100000,-0.100000)"><path d="M2315 4800 c-479 -35 -928 -217 -1303 -527 -352 -293 -615 -702 -738 -1151 -104 -380 -104 -824 0 -1204 107 -389 302 -724 591 -1013 354 -354 785 -572 1279 -646 196 -30 476 -30 672 0 494 74 925 292 1279 646 354 354 571 784 646 1279 30 197 30 475 0 672 -75 495 -292 925 -646 1279 -289 289 -624 484 -1013 591 -228 62 -528 91 -767 74z m353 -511 c458 -50 874 -272 1170 -624 417 -497 536 -1174 308 -1763 -56 -145 -176 -367 -235 -434 -4 -4 -566 552 -1250 1236 l-1243 1243 94 60 c354 229 754 327 1156 282z m864 -3200 c-67 -59 -289 -179 -434 -235 -946 -366 -2024 172 -2322 1158 -47 155 -66 276 -73 453 -13 362 84 704 290 1023 l60 94 1243 -1243 c684 -684 1240 -1246 1236 -1250z"></path></g></svg><svg id="icon-help" viewBox="0 0 400 400" style="enable-background:new 0 0 400 400;" xml:space="preserve"><g><path style="fill:#cccccc;" d="M199.996,0C89.719,0,0,89.72,0,200c0,110.279,89.719,200,199.996,200C310.281,400,400,310.279,400,200
|
7 |
-
C400,89.72,310.281,0,199.996,0z M199.996,373.77C104.187,373.77,26.23,295.816,26.23,200
|
8 |
-
c0-95.817,77.957-173.769,173.766-173.769c95.816,0,173.772,77.953,173.772,173.769
|
9 |
-
C373.769,295.816,295.812,373.77,199.996,373.77z"></path><path style="fill:#000000;" d="M199.996,91.382c-35.176,0-63.789,28.616-63.789,63.793c0,7.243,5.871,13.115,13.113,13.115
|
10 |
-
c7.246,0,13.117-5.873,13.117-13.115c0-20.71,16.848-37.562,37.559-37.562c20.719,0,37.566,16.852,37.566,37.562
|
11 |
-
c0,20.714-16.849,37.566-37.566,37.566c-7.242,0-13.113,5.873-13.113,13.114v45.684c0,7.243,5.871,13.115,13.113,13.115
|
12 |
-
s13.117-5.872,13.117-13.115v-33.938c28.905-6.064,50.68-31.746,50.68-62.427C263.793,119.998,235.176,91.382,199.996,91.382z"></path><path d="M200.004,273.738c-9.086,0-16.465,7.371-16.465,16.462s7.379,16.465,16.465,16.465c9.094,0,16.457-7.374,16.457-16.465
|
13 |
-
S209.098,273.738,200.004,273.738z"></path></g></svg><svg id="icon-help2" viewBox="0 0 431.855 431.855" style="enable-background:new 0 0 431.855 431.855;" xml:space="preserve"><g><path style="fill:#aaaaaa;" d="M215.936,0C96.722,0,0.008,96.592,0.008,215.814c0,119.336,96.714,216.041,215.927,216.041
|
14 |
-
c119.279,0,215.911-96.706,215.911-216.041C431.847,96.592,335.214,0,215.936,0z M231.323,335.962
|
15 |
-
c-5.015,4.463-10.827,6.706-17.411,6.706c-6.812,0-12.754-2.203-17.826-6.617c-5.08-4.406-7.625-10.575-7.625-18.501
|
16 |
-
c0-7.031,2.463-12.949,7.373-17.745c4.91-4.796,10.933-7.194,18.078-7.194c7.031,0,12.949,2.398,17.753,7.194
|
17 |
-
c4.796,4.796,7.202,10.713,7.202,17.745C238.858,325.362,236.346,331.5,231.323,335.962z M293.856,180.934
|
18 |
-
c-3.853,7.145-8.429,13.306-13.737,18.501c-5.292,5.194-14.81,13.924-28.548,26.198c-3.788,3.463-6.836,6.503-9.12,9.12
|
19 |
-
c-2.284,2.626-3.991,5.023-5.105,7.202c-1.122,2.178-1.983,4.357-2.593,6.535c-0.61,2.17-1.528,5.999-2.772,11.469
|
20 |
-
c-2.113,11.608-8.754,17.411-19.915,17.411c-5.804,0-10.681-1.894-14.656-5.69c-3.959-3.796-5.934-9.429-5.934-16.907
|
21 |
-
c0-9.372,1.455-17.493,4.357-24.361c2.886-6.869,6.747-12.892,11.543-18.086c4.804-5.194,11.274-11.356,19.427-18.501
|
22 |
-
c7.145-6.251,12.307-10.965,15.485-14.144c3.186-3.186,5.861-6.73,8.031-10.632c2.187-3.91,3.26-8.145,3.26-12.721
|
23 |
-
c0-8.933-3.308-16.46-9.957-22.597c-6.641-6.137-15.209-9.21-25.703-9.21c-12.282,0-21.321,3.097-27.125,9.291
|
24 |
-
c-5.804,6.194-10.705,15.314-14.729,27.369c-3.804,12.616-11.006,18.923-21.598,18.923c-6.251,0-11.526-2.203-15.826-6.609
|
25 |
-
c-4.292-4.406-6.438-9.177-6.438-14.314c0-10.6,3.406-21.346,10.21-32.23c6.812-10.884,16.745-19.899,29.807-27.036
|
26 |
-
c13.054-7.145,28.296-10.722,45.699-10.722c16.184,0,30.466,2.991,42.854,8.966c12.388,5.966,21.963,14.087,28.718,24.361
|
27 |
-
c6.747,10.266,10.128,21.427,10.128,33.482C299.635,165.473,297.709,173.789,293.856,180.934z"></path></g></svg><svg id="icon-loading" viewBox="0 0 128 128" xml:space="preserve"><g><path d="M38.52 33.37L21.36 16.2A63.6 63.6 0 0 1 59.5.16v24.3a39.5 39.5 0 0 0-20.98 8.92z" fill="#049046"></path><path d="M38.52 33.37L21.36 16.2A63.6 63.6 0 0 1 59.5.16v24.3a39.5 39.5 0 0 0-20.98 8.92z" fill="#c5e8e1" transform="rotate(45 64 64)"></path><path d="M38.52 33.37L21.36 16.2A63.6 63.6 0 0 1 59.5.16v24.3a39.5 39.5 0 0 0-20.98 8.92z" fill="#c5e8e1" transform="rotate(90 64 64)"></path><path d="M38.52 33.37L21.36 16.2A63.6 63.6 0 0 1 59.5.16v24.3a39.5 39.5 0 0 0-20.98 8.92z" fill="#c5e8e1" transform="rotate(135 64 64)"></path><path d="M38.52 33.37L21.36 16.2A63.6 63.6 0 0 1 59.5.16v24.3a39.5 39.5 0 0 0-20.98 8.92z" fill="#c5e8e1" transform="rotate(180 64 64)"></path><path d="M38.52 33.37L21.36 16.2A63.6 63.6 0 0 1 59.5.16v24.3a39.5 39.5 0 0 0-20.98 8.92z" fill="#c5e8e1" transform="rotate(225 64 64)"></path><path d="M38.52 33.37L21.36 16.2A63.6 63.6 0 0 1 59.5.16v24.3a39.5 39.5 0 0 0-20.98 8.92z" fill="#c5e8e1" transform="rotate(270 64 64)"></path><path d="M38.52 33.37L21.36 16.2A63.6 63.6 0 0 1 59.5.16v24.3a39.5 39.5 0 0 0-20.98 8.92z" fill="#c5e8e1" transform="rotate(315 64 64)"></path><animateTransform attributeName="transform" type="rotate" values="0 64 64;45 64 64;90 64 64;135 64 64;180 64 64;225 64 64;270 64 64;315 64 64" calcMode="discrete" dur="720ms" repeatCount="indefinite"></animateTransform></g></svg></defs>`,1),K=[G];function J(t,e){return l(),c("svg",q,K)}var Q=f(E,[["render",J]]);class w{static escape(e){return e.replace(/./gm,function(s){var n=/[0-9a-zA-Z\!\[\]\(\)\*\#]/;return n.test(s.charAt(0))?s.charAt(0):"&#"+s.charCodeAt(0)+";"})}static md2htmlOneLine(e){return e=w.escape(e),e=e.replace(/\[([^[]+)\]\(([^)]+)\)/gm,function(s,n,o){return'<a target="blank" href="'+o+'">'+n+"</a>"}),e=e.replace(/(\*\*[^\*]+\*\*)/gm,function(s){return"<b>"+s.substr(2,s.length-4)+"</b>"}),e=e.replace(/(\*[^\*]+\*)/gm,function(s){return"<i>"+s.substr(1,s.length-2)+"</i>"}),e.substr(0,1)=="#"&&(e.substr(0,2)=="# "&&(e="<h1>"+e.substr(2)+"</h1>"),e.substr(0,3)=="## "&&(e="<h2>"+e.substr(3)+"</h2>"),e.substr(0,4)=="### "&&(e="<h3>"+e.substr(4)+"</h3>"),e.substr(0,5)=="#### "&&(e="<h4>"+e.substr(5)+"</h4>")),e==""&&(e="<br>"),e}static md2html(e){for(var s=e.match(/[^\r\n]+/g),n=[],o=0;o<s.length;o++)n.push(w.md2htmlOneLine(s[o]));return n.join("<br>")}}const ee={name:"FileItem",emits:["toggle","select"],props:{item:Object},data(){return{hover:!1,selected:!1}},inject:["wcfm"],methods:{onClick(t){this.selected=!0,this.$emit("select",this)},getWCFM(){return this.wcfm},getFullPath(){for(var t=this.$parent,e=[];t!==null&&t.$parent!==null;)t.item&&e.push(t.item.name),t=t.$parent;return e.pop(),e=e.reverse().join("/"),e=e.replace("//","/"),e},infoClick(){this.getWCFM().displayInfo(this.getFullPath())},convertClick(){this.getWCFM().onConvertClick(this.getFullPath())}}},C=t=>(V("data-v-4fb0cc48"),t=t(),I(),t),te={key:0,class:"icon-fold"},oe=C(()=>a("use",{"xlink:href":"#icon-fold"},null,-1)),se=[oe],ie={key:1,class:"icon-unfold"},ne=C(()=>a("use",{"xlink:href":"#icon-unfold"},null,-1)),ae=[ne],le=C(()=>a("use",{"xlink:href":"#icon-folder"},null,-1)),re=[le],ce={key:2,class:"icon-file"},de=C(()=>a("use",{"xlink:href":"#icon-file"},null,-1)),he=[de];function ue(t,e,s,n,o,i){return l(),c("div",{class:S({fileitem:!0,selected:o.selected}),onMouseover:e[2]||(e[2]=r=>o.hover=!0),onMouseleave:e[3]||(e[3]=r=>o.hover=!1),onClick:e[4]||(e[4]=(...r)=>i.onClick&&i.onClick(...r))},[a("p",null,[s.item.isDir?(l(),c("span",{key:0,class:S({"fold-unfold":!0,empty:s.item.isEmpty}),onClick:e[0]||(e[0]=r=>this.$emit("toggle"))},[s.item.isOpen?(l(),c("svg",te,se)):u("",!0),s.item.isOpen?u("",!0):(l(),c("svg",ie,ae))],2)):u("",!0),s.item.isDir?(l(),c("svg",{key:1,class:"icon-folder",onClick:e[1]||(e[1]=r=>this.$emit("toggle"))},re)):u("",!0),s.item.isDir?u("",!0):(l(),c("svg",ce,he)),y(" "+p(s.item.nickname||s.item.name),1)])],34)}var me=f(ee,[["render",ue],["__scopeId","data-v-4fb0cc48"]]);const fe={name:"FileTree",components:{FileItem:me},emits:["select"],props:{item:Object},data(){return{loading:!1}},methods:{load(){var t=this;v.post("get-folder",{path:this.$refs.thefileitem.getFullPath()},function(e){t.loading=!0,t.item.children=e.children.sort(function(s,n){return s.isDir&&!n.isDir?-1:!s.isDir&&n.isDir||s.name>n.name?1:s.name<n.name?-1:0}),t.item.loaded=!0,t.loading=!1})},toggle(){this.item.isOpen=!this.item.isOpen,this.item.loaded||this.load()},onSelect(t){this.$emit("select",t)}},mounted(){let t=this.$refs.thefileitem.getFullPath();(t=="/"||t.indexOf("/")==-1)&&this.toggle()}},_e={key:0},pe=a("li",null,"loading...",-1),ge=[pe],ve={key:1,class:"tree"};function ye(t,e,s,n,o,i){const r=m("FileItem"),h=m("FileTree",!0);return l(),c(x,null,[_(r,{ref:"thefileitem",item:s.item,onDblclick:i.toggle,onToggle:i.toggle,onSelect:i.onSelect},null,8,["item","onDblclick","onToggle","onSelect"]),o.loading?(l(),c("ul",_e,ge)):u("",!0),s.item.children!==void 0&&s.item.isOpen?(l(),c("ul",ve,[(l(!0),c(x,null,Y(s.item.children,d=>(l(),c("li",null,[_(h,{item:d,onSelect:i.onSelect},null,8,["item","onSelect"])]))),256))])):u("",!0)],64)}var ze=f(fe,[["render",ye]]);const be={name:"Files",components:{FileTree:ze},emits:["select"],props:{item:Object,statusText:String},methods:{onSelect(t){this.selectedItem&&(this.selectedItem.selected=!1),this.selectedItem=t,this.$emit("select",this.selectedItem.getFullPath(),this.selectedItem.item.isDir)}},data(){return{selected:null}}},we={key:1};function xe(t,e,s,n,o,i){const r=m("FileTree");return l(),c(x,null,[s.item?(l(),z(r,{key:0,item:s.item,onSelect:i.onSelect},null,8,["item","onSelect"])):u("",!0),s.item?u("",!0):(l(),c("div",we,p(s.statusText),1))],64)}var $e=f(be,[["render",xe]]);const ke={name:"Modal",emits:["close"],props:{title:{type:String},closeButtonText:{type:String},width:{type:[Number,String],default:"95%"},maxwidth:{type:[Number,String],default:"700px"},alignment:{type:String,default:"center"},height:{type:[Number,String],default:"92%"},maxheight:{type:[Number,String],default:"700px"},valignment:{type:String,default:"center"}},computed:{containerStyle(){let t={width:this.width,"max-width":this.maxwidth,height:this.height,"max-height":this.maxheight};return this.alignment=="center"&&(t.margin="0px auto"),this.alignment=="right"&&(t.position="absolute",t.right="10px"),this.valignment=="center"&&(t.top="50%",t.transform="translateY(-50%)"),this.alignment=="bottom"&&(t.position="absolute",t.bottom="10px"),t}},methods:{onCloseClick(){this.$emit("close")},registerKeyDownEvent(){let t=this;document.onkeydown=function(e){e=e||window.event;var s=!1;"key"in e?s=e.key==="Escape"||e.key==="Esc":s=e.keyCode===27,s&&t.$emit("close")}}},mounted(){this.registerKeyDownEvent()}},Ce={class:"modal-mask"},Se={class:"modal-wrapper"},Ve={class:"title"},Ie={class:"modal-body"},Me={class:"content"},Fe=y(" default body "),Re={class:"close-button-with-text"};function Ye(t,e,s,n,o,i){return l(),c("div",Ce,[a("div",Se,[a("div",{class:"modal-container",style:D(i.containerStyle)},[a("a",{class:"close-button",onClick:e[0]||(e[0]=(...r)=>i.onCloseClick&&i.onCloseClick(...r))},"X"),a("div",Ve,p(s.title),1),a("div",Ie,[a("div",Me,[H(t.$slots,"default",{},()=>[Fe]),a("div",Re,[a("button",{onClick:e[1]||(e[1]=(...r)=>i.onCloseClick&&i.onCloseClick(...r))},p(s.closeButtonText),1)])])])],4)])])}var L=f(ke,[["render",Ye]]);const De={name:"ZoomSlider",components:{Slider:j},emits:["update:zoom"],props:{zoom:{type:Number,default:1}},watch:{exp(t,e){this.$emit("update:zoom",2**t)},zoom(t,e){this.exp=Math.log2(t)}},methods:{sliderFormat(t){return Math.round(2**t*100)+"%"}},mounted(){},data(){return{exp:0}}},Oe={class:"zoom-slider"};function Xe(t,e,s,n,o,i){const r=m("Slider");return l(),c("div",Oe,[_(r,{modelValue:o.exp,"onUpdate:modelValue":e[0]||(e[0]=h=>o.exp=h),min:-4,max:4,width:100,step:-1,format:i.sliderFormat,tooltipPosition:"bottom",orientation:"horizontal"},null,8,["modelValue","format"])])}var Le=f(De,[["render",Xe]]);const Te={name:"ImageViewport",components:{VueZoomer:O,ZoomSlider:Le},emits:["update:zoom","update:translateX","update:translateY","load","resize"],props:{src:{type:String},height:{type:Number,default:500},zoom:{type:Number,default:1},scaleZoomRatio:{type:Number},translateX:{type:Number,default:1},translateY:{type:Number,default:1}},data(){return{ratio:1,ro:null}},watch:{height(t,e){var s;((s=this.$refs)==null?void 0:s.zoomer)&&(this.$refs.zoomer.onWindowResize(),this.$refs.zoomer.refreshContainerPos())},scaleZoomRatio(t){var e;((e=this.$refs)==null?void 0:e.zoomer)&&(this.$refs.zoomer.onWindowResize(),this.$refs.zoomer.refreshContainerPos()),this.$refs.zoomer.scale=this.zoom*this.scaleZoomRatio},zoom(t,e){this.isImageReady(),this.$refs.zoomer.scale=t*this.scaleZoomRatio},translateX(t,e){this.$refs.zoomer.translateX!=t&&(this.$refs.zoomer.translateX=t)},translateY(t,e){this.$refs.zoomer.translateY!=t&&(this.$refs.zoomer.translateY=t)}},methods:{getGoodContainerHeight(){var t,e,s;if((e=(t=this.$refs)==null?void 0:t.theimg)==null?void 0:e.naturalWidth){let n=this.$refs.theimg.naturalWidth/this.$refs.theimg.naturalHeight,i=((s=this.$refs.root)==null?void 0:s.offsetWidth)/n;return i>300&&(i=300),i}return 300},updateContainerHeight(){},isImageReady(){var t,e,s;return!(!((e=(t=this.$refs)==null?void 0:t.theimg)==null?void 0:e.naturalWidth)||!((s=this.$refs.root)==null?void 0:s.offsetWidth))},calcScaleZoomRatio(){var n,o;if(!this.isImageReady())return 1;let t=this.$refs.theimg.naturalWidth/((n=this.$refs.root)==null?void 0:n.offsetWidth),e=this.$refs.theimg.naturalHeight/((o=this.$refs.root)==null?void 0:o.offsetHeight),s=Math.max(t,e);return isNaN(s)?1:s},updateRatio(){},updateScale(){this.zoom&&(this.$refs.zoomer.scale=this.zoom*this.scaleZoomRatio)},zoomToFit(){},onImgLoad(){var t,e;((e=(t=this.$refs)==null?void 0:t.theimg)==null?void 0:e.naturalWidth)&&this.$emit("load")},onResize(){this.$emit("resize")},onDoubleTap(){console.log("double tab - zoom to 100%"),this.$emit("update:zoom",1),this.$emit("update:translateX",0),this.$emit("update:translateY",0)}},mounted(){window.ResizeObserver&&(this.ro=new ResizeObserver(this.onResize).observe(this.$refs.root)),this.$refs.zoomer.tapDetector.onDoubleTap(this.onDoubleTap),this.$watch("$refs.zoomer.scale",(t,e)=>{this.isImageReady(),this.$emit("update:zoom",t/this.scaleZoomRatio)}),this.$watch("$refs.zoomer.translateX",(t,e)=>{this.$emit("update:translateX",t)}),this.$watch("$refs.zoomer.translateY",(t,e)=>{this.$emit("update:translateY",t)})},beforeDestroy(){window.ResizeObserver&&this.ro.unobserve(this.$refs.zoomer)}},We={ref:"root",class:"image-viewport"},Ne=["src"],Pe={class:"zoom-info"};function Ze(t,e,s,n,o,i){const r=m("v-zoomer");return l(),c("div",We,[_(r,{ref:"zoomer",class:"zoomer",minScale:.1,maxScale:8,onResize:i.onResize,doubleClickToZoom:!1,style:D({height:s.height+"px"}),pivot:"cursor",limitTranslation:!1,lockPanOnNoScale:!1},{default:b(()=>[a("img",{ref:"theimg",src:s.src,onLoad:e[0]||(e[0]=(...h)=>i.onImgLoad&&i.onImgLoad(...h))},null,40,Ne)]),_:1},8,["minScale","onResize","style"]),a("div",Pe," zoom: "+p(Math.round(s.zoom*100))+"% ",1)],512)}var He=f(Te,[["render",Ze]]);const je={name:"Variant",components:{ImageViewport:He},emits:["select","update:zoom","update:translateX","update:translateY","load","resize"],props:{title:{type:String},info:{type:Object},url:{type:String,default:""},height:{type:Number},zoom:{type:Number},scaleZoomRatio:{type:Number},translateX:{type:Number},translateY:{type:Number},variantIndex:{type:Number}},computed:{imageUrl:function(){var t;return(t=this.info)==null?void 0:t.url},filesize:function(){var e;if(!((e=this.info)==null?void 0:e.size))return"";let t=this.info.size;return t<1024?t+" bytes":(t/=1024,t<1024?Math.round(t*10)/10+" kb":(t/=1024,Math.round(t*10)/10+" MB"))}},methods:{onVariantSelect(){this.$emit("select",this.variantIndex)},onLoad(){this.$emit("load")},zoomToFit(){this.$refs.theport.zoomToFit()}},mounted(){this.$watch("$refs.theport.zoom",(t,e)=>{this.$emit("update:zoom",t)}),this.$watch("$refs.theport.translateX",(t,e)=>{this.$emit("update:translateX",t)}),this.$watch("$refs.theport.translateY",(t,e)=>{this.$emit("update:translateY",t)})},data(){return{}}},Be={class:"variant"},Ue={class:"header"},Ae={class:"title"},Ee={class:"size"};function qe(t,e,s,n,o,i){const r=m("ImageViewport");return l(),c("div",Be,[a("div",Ue,[a("div",Ae,p(s.title),1),a("div",Ee,p(i.filesize),1)]),_(r,{ref:"theport",src:i.imageUrl,height:s.height,zoom:s.zoom,"onUpdate:zoom":e[0]||(e[0]=h=>s.zoom=h),scaleZoomRatio:s.scaleZoomRatio,translateX:s.translateX,"onUpdate:translateX":e[1]||(e[1]=h=>s.translateX=h),translateY:s.translateY,"onUpdate:translateY":e[2]||(e[2]=h=>s.translateY=h),onLoad:i.onLoad,onResize:e[3]||(e[3]=h=>this.$emit("resize"))},null,8,["src","height","zoom","scaleZoomRatio","translateX","translateY","onLoad"])])}var T=f(je,[["render",qe],["__scopeId","data-v-0372e854"]]);const Ge={name:"Variants",components:{Variant:T},emits:["update:zoom","update:translateX","update:translateY"],props:{file:{type:Object},viewport:{type:Object},height:{type:Number},zoom:{type:Number,default:1},translateX:{type:Number,default:0},translateY:{type:Number,default:0}},watch:{file(t,e){}},methods:{onZoomChange(t){this.$emit("update:zoom",t)},onTranslateXChange(t){this.$emit("update:translateX",t)},onTranslateYChange(t){this.$emit("update:translateY",t)},sliderFormat(t){return Math.round(t*100)+"%"},changeImage(){this.imageUrl=="http://localhost:3000/src/assets/dummy.jpg"?this.imageUrl="http://localhost:3000/src/assets/dummy2.jpg":this.imageUrl="http://localhost:3000/src/assets/dummy.jpg",this.selectedVariant=-1},onVariantSelect(t){this.selectedVariant=t}},mounted(){this.$watch("$refs.variants.zoom",(t,e)=>{})},data(){var t="http://localhost:3000/src/assets/200x100.jpg";return{imageUrl:"",selectedVariant:-1,variants:[{title:"Existing conversion",size:732,url:t},{title:"Lossy, q:20",size:35e5,url:t}]}}},W=t=>(V("data-v-25a3327e"),t=t(),I(),t),Ke={class:"variants-component"},Je=W(()=>a("br",null,null,-1)),Qe=W(()=>a("br",null,null,-1)),et={class:"variants"};function tt(t,e,s,n,o,i){const r=m("Variant");return l(),c("div",Ke,[y(" File: "+p(s.file)+" ",1),a("button",{onClick:e[0]||(e[0]=h=>i.changeImage())},"Change image"),Je,Qe,a("div",et,[(l(!0),c(x,null,Y(o.variants,(h,d)=>(l(),z(r,{title:h.title,info:h,variantIndex:d,class:S({selected:d==o.selectedVariant}),height:s.height,zoom:s.zoom,"onUpdate:zoom":[e[1]||(e[1]=g=>s.zoom=g),i.onZoomChange],translateX:s.translateX,"onUpdate:translateX":[e[2]||(e[2]=g=>s.translateX=g),i.onTranslateXChange],translateY:s.translateY,"onUpdate:translateY":[e[3]||(e[3]=g=>s.translateY=g),i.onTranslateYChange],onSelect:i.onVariantSelect},null,8,["title","info","variantIndex","class","height","zoom","translateX","translateY","onSelect","onUpdate:zoom","onUpdate:translateX","onUpdate:translateY"]))),256))])])}var ot=f(Ge,[["render",tt],["__scopeId","data-v-25a3327e"]]);const st={name:"FileProperties",components:{Variant:T,Variants:ot,Modal:L},props:{file:{type:Object,default:{}}},watch:{file(t,e){t.isDir||this.changePath(t.path)}},methods:{onVariantSelect(t){this.selectedVariant=t},onOriginalLoad(){if(this.updateHeight(),this.$refs.original.$refs.theport.calcScaleZoomRatio()>1){let e=this.$refs.original.$refs.theport,s=e.$refs.theimg,n=e.$refs.root,o=s.naturalWidth,i=s.naturalHeight,r=n.offsetWidth,d=this.height/i,g=r/o;this.zoom=Math.min(d,g)}else this.zoom=1;this.translateX=0,this.translateY=0},onOriginalResize(){this.updateHeight()},onConvertClick(){let t=this;this.converting=!0,v.post("convert",{path:this.path},function(e){t.converting=!1,(e==null?void 0:e.success)==!1&&(t.errorMsg=e.data),e.converted&&(t.convertedInfo=e.converted),e.log&&(t.log=w.md2html(e.log))})},updateHeight(){this.$refs.original&&(this.height=this.$refs.original.$refs.theport.getGoodContainerHeight(),this.scaleZoomRatio=this.$refs.original.$refs.theport.calcScaleZoomRatio())},reset(){this.originalInfo=null,this.convertedInfo=null},reload(){this.load()},changePath(t){this.reset(),this.path=t,this.loading=!0,this.errorMsg="",this.log="",this.load()},load(){let t=this;v.post("info",{path:this.path},function(e){(e==null?void 0:e.success)==!1&&(t.errorMsg=e.data),t.loading=!1,t.originalInfo=e.original,e.converted&&(t.convertedInfo=e.converted),e.log&&(t.log=w.md2html(e.log))})}},mounted(){this.file&&(this.path=this.file.path,this.load())},data(){return{zoom:1,scaleZoomRatio:1,translateX:0,translateY:0,height:100,loading:!1,errorMsg:"",originalInfo:null,convertedInfo:null,path:"",log:"",showingLogDialog:!1,converting:!1}}},M=t=>(V("data-v-1f62a342"),t=t(),I(),t),it={class:"file-properties"},nt={class:"path"},at=y(" Path: "),lt={class:"path"},rt={key:0,class:"error"},ct=["innerHTML"],dt={key:0},ht={key:1},ut={key:0,class:"icon-converting",width:"15",height:"15"},mt=M(()=>a("use",{"xlink:href":"#icon-loading"},null,-1)),ft=[mt],_t=["disabled"],pt=M(()=>a("p",null," Above, you see the original image. If it has been converted, you also see the converted image (provided that your browser supports webp). ",-1)),gt=M(()=>a("p",null," You can zoom in on the image, ie using scroll wheel. Both images will zoom, allowing you to compare the quality. Double-click the image to set zoom to 100%. You can also drag the image. ",-1));function vt(t,e,s,n,o,i){const r=m("Variant"),h=m("Modal");return l(),c("div",it,[a("div",nt,[at,a("span",lt,p(s.file.path),1)]),o.errorMsg!=""?(l(),c("div",rt,[a("p",null,"Error: "+p(o.errorMsg),1)])):u("",!0),$(a("div",null,"Getting info...",512),[[k,o.loading]]),$(_(r,{ref:"original",title:"Original",info:o.originalInfo,height:o.height,zoom:o.zoom,"onUpdate:zoom":e[0]||(e[0]=d=>o.zoom=d),scaleZoomRatio:o.scaleZoomRatio,translateX:o.translateX,"onUpdate:translateX":e[1]||(e[1]=d=>o.translateX=d),translateY:o.translateY,"onUpdate:translateY":e[2]||(e[2]=d=>o.translateY=d),onLoad:i.onOriginalLoad,onResize:i.onOriginalResize},null,8,["info","height","zoom","scaleZoomRatio","translateX","translateY","onLoad","onResize"]),[[k,o.originalInfo]]),$(_(r,{title:"Existing conversion",info:o.convertedInfo,height:o.height,zoom:o.zoom,"onUpdate:zoom":e[3]||(e[3]=d=>o.zoom=d),scaleZoomRatio:o.scaleZoomRatio,translateX:o.translateX,"onUpdate:translateX":e[4]||(e[4]=d=>o.translateX=d),translateY:o.translateY,"onUpdate:translateY":e[5]||(e[5]=d=>o.translateY=d)},null,8,["info","height","zoom","scaleZoomRatio","translateX","translateY"]),[[k,o.convertedInfo]]),$(_(h,{title:"Conversion log",closeButtonText:"Ok",width:"95vw",maxwidth:"1400px",height:"95vh",onClose:e[6]||(e[6]=d=>o.showingLogDialog=!1)},{default:b(()=>[a("div",{innerHTML:o.log},null,8,ct)]),_:1},512),[[k,o.showingLogDialog]]),a("div",null,[a("button",{onClick:e[7]||(e[7]=(...d)=>i.onConvertClick&&i.onConvertClick(...d))},[o.convertedInfo?(l(),c("span",dt,"Reconvert")):u("",!0),o.convertedInfo?u("",!0):(l(),c("span",ht,"Convert"))]),o.converting?(l(),c("svg",ut,ft)):u("",!0),o.log!=""?(l(),c("button",{key:1,onClick:e[8]||(e[8]=d=>o.showingLogDialog=!0),class:"log-button",disabled:o.converting},"View conversion log",8,_t)):u("",!0)]),pt,gt])}var yt=f(st,[["render",vt],["__scopeId","data-v-1f62a342"]]);const zt={name:"FolderProperties",components:{},props:{file:{type:Object,default:{}}},watch:{file(t,e){}}},bt={class:"folder-properties"},wt={class:"path"},xt=y(" Path: "),$t={class:"path"},kt=a("p",null," You cannot do anything on folders yet. Browse to an image... ",-1);function Ct(t,e,s,n,o,i){return l(),c("div",bt,[a("div",wt,[xt,a("span",$t,p(s.file.path),1)]),kt])}var St=f(zt,[["render",Ct]]);const Vt={name:"Welcome"},It={class:"welcome"},Mt=R('<div class="headline"><div>Welcome to</div><h3>WebP Convert file manager</h3></div><p> To open a folder, click the "+" sign next to the folder name or double click the folder name </p><p><h4>Whats new?</h4><ul><li>You can now convert files and view conversion log</li></ul></p><p><h4>Whats planned ahead?</h4> I have plenty of ideas, but no planned priority. Ideas: <ul><li>Trigger bulk conversion on folders / mark for background conversion</li><li>Stats on folders</li><li>Display more info on images (mime type, dimensions and such)</li><li>Adjust conversion settings</li><li>Interface to allow adjusting quality on a conversion quickly and compare directly</li></ul> To support development, you can <a href="https://ko-fi.com/rosell" target="_blank">buy me a cup of coffee</a></p>',4),Ft=[Mt];function Rt(t,e,s,n,o,i){return l(),c("div",It,Ft)}var Yt=f(Vt,[["render",Rt]]);const Dt={name:"WCFM",components:{SVGs:Q,FileProperties:yt,FolderProperties:St,Modal:L,Files:$e,Splitpanes:X.exports.Splitpanes,Pane:X.exports.Pane,Welcome:Yt},methods:{onConvertClick(t){var n,o;let e=(o=(n=this.$refs.convertOptions)==null?void 0:n.general)==null?void 0:o.data,s={path:t,convertOptions:e};console.log(s),v.post("convert",s,function(i){console.log("convert response:",i)})},onConvertCloseClick(){console.log("CLRCL"),this.showConvertOptions=!1},onFileSelect(t,e){this.file={path:t,isDir:e}},displayInfo(t){var e=this;v.post("info",{path:t},function(s){e.selectedInfo=s})}},mounted(){var t=this;v.post("get-folder",{path:""},function(e){t.item=e.children[0]})},data(){return{file:null,selectedItem:null,item:null,treeStatusText:"loading file tree...",selectedInfo:{},showConvertOptions:!1}},provide(){return{wcfm:this}}},Ot={class:"wcfm",style:{overflow:"hidden"}},Xt={class:"pane-content"},Lt={key:0,class:"pane-content"};function Tt(t,e,s,n,o,i){const r=m("SVGs"),h=m("Files"),d=m("pane"),g=m("FileProperties"),N=m("FolderProperties"),P=m("Welcome"),Z=m("splitpanes");return l(),c("div",Ot,[_(r),_(Z,{class:"default-theme",style:{position:"absolute",top:"0",left:"0"}},{default:b(()=>[_(d,{size:"30"},{default:b(()=>[a("div",Xt,[a("div",null,[_(h,{item:o.item,statusText:o.treeStatusText,onSelect:i.onFileSelect},null,8,["item","statusText","onSelect"])])])]),_:1}),_(d,{size:"70",style:{"overflow-y":"auto"}},{default:b(()=>[o.file?(l(),c("div",Lt,[o.file.isDir?u("",!0):(l(),z(g,{key:0,file:o.file},null,8,["file"])),o.file.isDir?(l(),z(N,{key:1,file:o.file},null,8,["file"])):u("",!0)])):u("",!0),o.file?u("",!0):(l(),z(P,{key:1}))]),_:1})]),_:1})])}var Wt=f(Dt,[["render",Tt]]);const F=B(Wt);F.use(O);F.use(U,{defaultHtml:!1});window.wcfmoptions||(window.wcfmoptions={},window.wcfmoptions.poster=function(t,e,s,n){switch(t){case"get-folder":switch(e.path){case"":var o={children:[{name:"/",isDir:!0,nickname:"root"}]};break;case"/":var o={children:[{name:"empty-folder",isDir:!0,isEmpty:!0},{name:"file",isDir:!1,isConverted:!0},{name:"aaa",isDir:!1,isConverted:!0},{name:"test-folder",isDir:!0},{name:"file2",isDir:!1,isConverted:!1}]};break;case"/empty-folder":var o={children:[]};break;case"/test-folder":var o={children:[{name:"banana",isDir:!1},{name:"subfolder",isDir:!0},{name:"apple",isDir:!1}]};break;case"/test-folder/subfolder":var o={children:[{name:"file2",isDir:!1},{name:"file1",isDir:!1}]};break;default:n();return}break;case"conversion-settings":var o={systemStatus:{converterRequirements:{gd:{extensionLoaded:!1,compiledWithWebP:!0}}}};break;case"info":if(e.path=="/file2")var o={original:{size:100,url:"http://localhost:3000/src/assets/200x100.jpg"},converted:{size:70,url:"http://localhost:3000/src/assets/200x100.jpg"},log:`blah blah blah
|
28 |
-
\rand *more* blah`};else if(e.path=="/file")var o={original:{size:100,url:"http://localhost:3000/src/assets/dummy2.jpg"},log:"blah blah *blah*"};else var o={original:{size:100,url:"http://localhost:3000/src/assets/dummy.jpg"},converted:{size:70,url:"http://localhost:3000/src/assets/dummy.jpg"},log:"blah blah *blah*"};break;case"convert":if(e.path=="/file2")var o={success:!1,data:"We pretend file2 errors converting...",log:"Oh no!"};else var o={success:!0,converted:{size:26050,url:"http://we0/wordpress/wp-content/uploads/2021/10/Screenshot_2021-10-04_13-43-11.png.webp"},log:`All is *groovy*
|
29 |
-
next line`};break;default:var o="ok";break}s(o)});F.mount("#webpconvert-filemanager");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/wcfm/{vendor.b4e4e155.js → vendor.fa68d508.js}
RENAMED
@@ -11,6 +11,6 @@ var Fh=Object.defineProperty;var Rc=Object.getOwnPropertySymbols;var jh=Object.p
|
|
11 |
`)}Wy(e.hoists,t),o(),i("return ")}function Al(e,t,{helper:n,push:r,newline:i,isTS:o}){const s=n(t==="filter"?os:t==="component"?rs:is);for(let a=0;a<e.length;a++){let l=e[a];const c=l.endsWith("__self");c&&(l=l.slice(0,-6)),r(`const ${kr(l,t)} = ${s}(${JSON.stringify(l)}${c?", true":""})${o?"!":""}`),a<e.length-1&&i()}}function Wy(e,t){if(!e.length)return;t.pure=!0;const{push:n,newline:r,helper:i,scopeId:o,mode:s}=t;r();for(let a=0;a<e.length;a++){const l=e[a];l&&(n(`const _hoisted_${a+1} = `),ut(l,t),r())}t.pure=!1}function Nl(e,t){const n=e.length>3||!1;t.push("["),n&&t.indent(),Gi(e,t,n),n&&t.deindent(),t.push("]")}function Gi(e,t,n=!1,r=!0){const{push:i,newline:o}=t;for(let s=0;s<e.length;s++){const a=e[s];be(a)?i(a):ue(a)?Nl(a,t):ut(a,t),s<e.length-1&&(n?(r&&i(","),o()):r&&i(", "))}}function ut(e,t){if(be(e)){t.push(e);return}if(Wn(e)){t.push(t.helper(e));return}switch(e.type){case 1:case 9:case 11:ut(e.codegenNode,t);break;case 2:Yy(e,t);break;case 4:Fp(e,t);break;case 5:Xy(e,t);break;case 12:ut(e.codegenNode,t);break;case 8:jp(e,t);break;case 3:Zy(e,t);break;case 13:Jy(e,t);break;case 14:qy(e,t);break;case 15:_y(e,t);break;case 17:eb(e,t);break;case 18:tb(e,t);break;case 19:nb(e,t);break;case 20:rb(e,t);break;case 21:Gi(e.body,t,!0,!1);break}}function Yy(e,t){t.push(JSON.stringify(e.content),e)}function Fp(e,t){const{content:n,isStatic:r}=e;t.push(r?JSON.stringify(n):n,e)}function Xy(e,t){const{push:n,helper:r,pure:i}=t;i&&n(Ss),n(`${r(Di)}(`),ut(e.content,t),n(")")}function jp(e,t){for(let n=0;n<e.children.length;n++){const r=e.children[n];be(r)?t.push(r):ut(r,t)}}function Gy(e,t){const{push:n}=t;if(e.type===8)n("["),jp(e,t),n("]");else if(e.isStatic){const r=Vi(e.content)?e.content:JSON.stringify(e.content);n(r,e)}else n(`[${e.content}]`,e)}function Zy(e,t){const{push:n,helper:r,pure:i}=t;i&&n(Ss),n(`${r(Dr)}(${JSON.stringify(e.content)})`,e)}function Jy(e,t){const{push:n,helper:r,pure:i}=t,{tag:o,props:s,children:a,patchFlag:l,dynamicProps:c,directives:u,isBlock:f,disableTracking:p,isComponent:d}=e;u&&n(r(ss)+"("),f&&n(`(${r(Vn)}(${p?"true":""}), `),i&&n(Ss);const m=f?ur(t.inSSR,d):cr(t.inSSR,d);n(r(m)+"(",e),Gi(Qy([o,s,a,l,c]),t),n(")"),f&&n(")"),u&&(n(", "),ut(u,t),n(")"))}function Qy(e){let t=e.length;for(;t--&&e[t]==null;);return e.slice(0,t+1).map(n=>n||"null")}function qy(e,t){const{push:n,helper:r,pure:i}=t,o=be(e.callee)?e.callee:r(e.callee);i&&n(Ss),n(o+"(",e),Gi(e.arguments,t),n(")")}function _y(e,t){const{push:n,indent:r,deindent:i,newline:o}=t,{properties:s}=e;if(!s.length){n("{}",e);return}const a=s.length>1||!1;n(a?"{":"{ "),a&&r();for(let l=0;l<s.length;l++){const{key:c,value:u}=s[l];Gy(c,t),n(": "),ut(u,t),l<s.length-1&&(n(","),o())}a&&i(),n(a?"}":" }")}function eb(e,t){Nl(e.elements,t)}function tb(e,t){const{push:n,indent:r,deindent:i}=t,{params:o,returns:s,body:a,newline:l,isSlot:c}=e;c&&n(`_${mn[ds]}(`),n("(",e),ue(o)?Gi(o,t):o&&ut(o,t),n(") => "),(l||a)&&(n("{"),r()),s?(l&&n("return "),ue(s)?Nl(s,t):ut(s,t)):a&&ut(a,t),(l||a)&&(i(),n("}")),c&&(e.isNonScopedSlot&&n(", undefined, true"),n(")"))}function nb(e,t){const{test:n,consequent:r,alternate:i,newline:o}=e,{push:s,indent:a,deindent:l,newline:c}=t;if(n.type===4){const f=!Vi(n.content);f&&s("("),Fp(n,t),f&&s(")")}else s("("),ut(n,t),s(")");o&&a(),t.indentLevel++,o||s(" "),s("? "),ut(r,t),t.indentLevel--,o&&c(),o||s(" "),s(": ");const u=i.type===19;u||t.indentLevel++,ut(i,t),u||t.indentLevel--,o&&l(!0)}function rb(e,t){const{push:n,helper:r,indent:i,deindent:o,newline:s}=t;n(`_cache[${e.index}] || (`),e.isVNode&&(i(),n(`${r(ji)}(-1),`),s()),n(`_cache[${e.index}] = `),ut(e.value,t),e.isVNode&&(n(","),s(),n(`${r(ji)}(1),`),s(),n(`_cache[${e.index}]`),o()),n(")")}function ib(e,t,n=!1,r=[],i=Object.create(null)){}function ob(e,t,n){return!1}function sb(e,t){if(e&&(e.type==="ObjectProperty"||e.type==="ArrayPattern")){let n=t.length;for(;n--;){const r=t[n];if(r.type==="AssignmentExpression")return!0;if(r.type!=="ObjectProperty"&&!r.type.endsWith("Pattern"))break}}return!1}function ab(e,t){for(const n of e.params)for(const r of zn(n))t(r)}function lb(e,t){for(const n of e.body)if(n.type==="VariableDeclaration"){if(n.declare)continue;for(const r of n.declarations)for(const i of zn(r.id))t(i)}else if(n.type==="FunctionDeclaration"||n.type==="ClassDeclaration"){if(n.declare||!n.id)continue;t(n.id)}}function zn(e,t=[]){switch(e.type){case"Identifier":t.push(e);break;case"MemberExpression":let n=e;for(;n.type==="MemberExpression";)n=n.object;t.push(n);break;case"ObjectPattern":for(const r of e.properties)r.type==="RestElement"?zn(r.argument,t):zn(r.value,t);break;case"ArrayPattern":e.elements.forEach(r=>{r&&zn(r,t)});break;case"RestElement":zn(e.argument,t);break;case"AssignmentPattern":zn(e.left,t);break}return t}const cb=e=>/Function(?:Expression|Declaration)$|Method$/.test(e.type),Vp=e=>e&&(e.type==="ObjectProperty"||e.type==="ObjectMethod")&&!e.computed,ub=(e,t)=>Vp(t)&&t.key===e;new RegExp("\\b"+"do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,super,throw,while,yield,delete,export,import,return,switch,default,extends,finally,continue,debugger,function,arguments,typeof,void".split(",").join("\\b|\\b")+"\\b");const fb=(e,t)=>{if(e.type===5)e.content=Es(e.content,t);else if(e.type===1)for(let n=0;n<e.props.length;n++){const r=e.props[n];if(r.type===7&&r.name!=="for"){const i=r.exp,o=r.arg;i&&i.type===4&&!(r.name==="on"&&o)&&(r.exp=Es(i,t,r.name==="slot")),o&&o.type===4&&!o.isStatic&&(r.arg=Es(o,t))}}};function Es(e,t,n=!1,r=!1,i=Object.create(t.identifiers)){return e}const pb=Ml(/^(if|else|else-if)$/,(e,t,n)=>zp(e,t,n,(r,i,o)=>{const s=n.parent.children;let a=s.indexOf(r),l=0;for(;a-->=0;){const c=s[a];c&&c.type===9&&(l+=c.branches.length)}return()=>{if(o)r.codegenNode=Hp(i,l,n);else{const c=db(r.codegenNode);c.alternate=Hp(i,l+r.branches.length-1,n)}}}));function zp(e,t,n,r){if(t.name!=="else"&&(!t.exp||!t.exp.content.trim())){const i=t.exp?t.exp.loc:e.loc;n.onError(Be(28,t.loc)),t.exp=Ee("true",!1,i)}if(t.name==="if"){const i=Bp(e,t),o={type:9,loc:e.loc,branches:[i]};if(n.replaceNode(o),r)return r(o,i,!0)}else{const i=n.parent.children;let o=i.indexOf(e);for(;o-->=-1;){const s=i[o];if(s&&s.type===2&&!s.content.trim().length){n.removeNode(s);continue}if(s&&s.type===9){t.name==="else-if"&&s.branches[s.branches.length-1].condition===void 0&&n.onError(Be(30,e.loc)),n.removeNode();const a=Bp(e,t);s.branches.push(a);const l=r&&r(s,a,!1);Xi(a,n),l&&l(),n.currentNode=null}else n.onError(Be(30,e.loc));break}}}function Bp(e,t){return{type:10,loc:e.loc,condition:t.name==="else"?void 0:t.exp,children:e.tagType===3&&!Et(e,"for")?e.children:[e],userKey:Br(e,"key")}}function Hp(e,t,n){return e.condition?ms(e.condition,kp(e,t,n),Ze(n.helper(Dr),['""',"true"])):kp(e,t,n)}function kp(e,t,n){const{helper:r}=n,i=Ge("key",Ee(`${t}`,!1,tt,2)),{children:o}=e,s=o[0];if(o.length!==1||s.type!==1)if(o.length===1&&s.type===11){const l=s.codegenNode;return Ui(l,i,n),l}else{let l=64;return _s[64],Vr(n,r($r),Mt([i]),o,l+"",void 0,void 0,!0,!1,!1,e.loc)}else{const l=s.codegenNode,c=Op(l);return c.type===13&&vs(c,n),Ui(c,i,n),l}}function db(e){for(;;)if(e.type===19)if(e.alternate.type===19)e=e.alternate;else return e;else e.type===20&&(e=e.value)}const hb=Ml("for",(e,t,n)=>{const{helper:r,removeHelper:i}=n;return Up(e,t,n,o=>{const s=Ze(r(as),[o.source]),a=Et(e,"memo"),l=Br(e,"key"),c=l&&(l.type===6?Ee(l.value.content,!0):l.exp),u=l?Ge("key",c):null,f=o.source.type===4&&o.source.constType>0,p=f?64:l?128:256;return o.codegenNode=Vr(n,r($r),void 0,s,p+"",void 0,void 0,!0,!f,!1,e.loc),()=>{let d;const m=Hr(e),{children:b}=o,v=b.length!==1||b[0].type!==1,S=ki(e)?e:m&&e.children.length===1&&ki(e.children[0])?e.children[0]:null;if(S?(d=S.codegenNode,m&&u&&Ui(d,u,n)):v?d=Vr(n,r($r),u?Mt([u]):void 0,e.children,64+"",void 0,void 0,!0,void 0,!1):(d=b[0].codegenNode,m&&u&&Ui(d,u,n),d.isBlock!==!f&&(d.isBlock?(i(Vn),i(ur(n.inSSR,d.isComponent))):i(cr(n.inSSR,d.isComponent))),d.isBlock=!f,d.isBlock?(r(Vn),r(ur(n.inSSR,d.isComponent))):r(cr(n.inSSR,d.isComponent))),a){const g=ar(ws(o.parseResult,[Ee("_cached")]));g.body=yp([Kt(["const _memo = (",a.exp,")"]),Kt(["if (_cached",...c?[" && _cached.key === ",c]:[],` && ${n.helperString(yl)}(_cached, _memo)) return _cached`]),Kt(["const _item = ",d]),Ee("_item.memo = _memo"),Ee("return _item")]),s.arguments.push(g,Ee("_cache"),Ee(String(n.cached++)))}else s.arguments.push(ar(ws(o.parseResult),d,!0))}})});function Up(e,t,n,r){if(!t.exp){n.onError(Be(31,t.loc));return}const i=Rl(t.exp);if(!i){n.onError(Be(32,t.loc));return}const{addIdentifiers:o,removeIdentifiers:s,scopes:a}=n,{source:l,value:c,key:u,index:f}=i,p={type:11,loc:t.loc,source:l,valueAlias:c,keyAlias:u,objectIndexAlias:f,parseResult:i,children:Hr(e)?e.children:[e]};n.replaceNode(p),a.vFor++;const d=r&&r(p);return()=>{a.vFor--,d&&d()}}const mb=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,Kp=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,gb=/^\(|\)$/g;function Rl(e,t){const n=e.loc,r=e.content,i=r.match(mb);if(!i)return;const[,o,s]=i,a={source:Os(n,s.trim(),r.indexOf(s,o.length)),value:void 0,key:void 0,index:void 0};let l=o.trim().replace(gb,"").trim();const c=o.indexOf(l),u=l.match(Kp);if(u){l=l.replace(Kp,"").trim();const f=u[1].trim();let p;if(f&&(p=r.indexOf(f,c+l.length),a.key=Os(n,f,p)),u[2]){const d=u[2].trim();d&&(a.index=Os(n,d,r.indexOf(d,a.key?p+f.length:c+l.length)))}}return l&&(a.value=Os(n,l,c)),a}function Os(e,t,n){return Ee(t,!1,El(e,n,t.length))}function ws({value:e,key:t,index:n},r=[]){return vb([e,t,n,...r])}function vb(e){let t=e.length;for(;t--&&!e[t];);return e.slice(0,t+1).map((n,r)=>n||Ee("_".repeat(r+1),!1))}const Wp=Ee("undefined",!1),Yp=(e,t)=>{if(e.type===1&&(e.tagType===1||e.tagType===3)){const n=Et(e,"slot");if(n)return n.exp,t.scopes.vSlot++,()=>{t.scopes.vSlot--}}},yb=(e,t)=>{let n;if(Hr(e)&&e.props.some(Ol)&&(n=Et(e,"for"))){const r=n.parseResult=Rl(n.exp);if(r){const{value:i,key:o,index:s}=r,{addIdentifiers:a,removeIdentifiers:l}=t;return i&&a(i),o&&a(o),s&&a(s),()=>{i&&l(i),o&&l(o),s&&l(s)}}}},bb=(e,t,n)=>ar(e,t,!1,!0,t.length?t[0].loc:n);function Xp(e,t,n=bb){t.helper(ds);const{children:r,loc:i}=e,o=[],s=[];let a=t.scopes.vSlot>0||t.scopes.vFor>0;const l=Et(e,"slot",!0);if(l){const{arg:b,exp:v}=l;b&&!mt(b)&&(a=!0),o.push(Ge(b||Ee("default",!0),n(v,r,i)))}let c=!1,u=!1;const f=[],p=new Set;for(let b=0;b<r.length;b++){const v=r[b];let S;if(!Hr(v)||!(S=Et(v,"slot",!0))){v.type!==3&&f.push(v);continue}if(l){t.onError(Be(37,S.loc));break}c=!0;const{children:g,loc:O}=v,{arg:E=Ee("default",!0),exp:$,loc:R}=S;let T;mt(E)?T=E?E.content:"default":a=!0;const P=n($,g,O);let N,j,V;if(N=Et(v,"if"))a=!0,s.push(ms(N.exp,Ts(E,P),Wp));else if(j=Et(v,/^else(-if)?$/,!0)){let F=b,C;for(;F--&&(C=r[F],C.type===3););if(C&&Hr(C)&&Et(C,"if")){r.splice(b,1),b--;let w=s[s.length-1];for(;w.alternate.type===19;)w=w.alternate;w.alternate=j.exp?ms(j.exp,Ts(E,P),Wp):Ts(E,P)}else t.onError(Be(30,j.loc))}else if(V=Et(v,"for")){a=!0;const F=V.parseResult||Rl(V.exp);F?s.push(Ze(t.helper(as),[F.source,ar(ws(F),Ts(E,P),!0)])):t.onError(Be(32,V.loc))}else{if(T){if(p.has(T)){t.onError(Be(38,R));continue}p.add(T),T==="default"&&(u=!0)}o.push(Ge(E,P))}}if(!l){const b=(v,S)=>{const g=n(v,S,i);return t.compatConfig&&(g.isNonScopedSlot=!0),Ge("default",g)};c?f.length&&f.some(v=>Gp(v))&&(u?t.onError(Be(39,f[0].loc)):o.push(b(void 0,f))):o.push(b(void 0,r))}const d=a?2:Ps(e.children)?3:1;let m=Mt(o.concat(Ge("_",Ee(d+"",!1))),i);return s.length&&(m=Ze(t.helper(vl),[m,zr(s)])),{slots:m,hasDynamicSlots:a}}function Ts(e,t){return Mt([Ge("name",e),Ge("fn",t)])}function Ps(e){for(let t=0;t<e.length;t++){const n=e[t];switch(n.type){case 1:if(n.tagType===2||Ps(n.children))return!0;break;case 9:if(Ps(n.branches))return!0;break;case 10:case 11:if(Ps(n.children))return!0;break}}return!1}function Gp(e){return e.type!==2&&e.type!==12?!0:e.type===2?!!e.content.trim():Gp(e.content)}const Zp=new WeakMap,Jp=(e,t)=>function(){if(e=t.currentNode,!(e.type===1&&(e.tagType===0||e.tagType===1)))return;const{tag:r,props:i}=e,o=e.tagType===1;let s=o?Qp(e,t):`"${r}"`;const a=je(s)&&s.callee===Li;let l,c,u,f=0,p,d,m,b=a||s===Lr||s===_o||!o&&(r==="svg"||r==="foreignObject"||Br(e,"key",!0));if(i.length>0){const v=Il(e,t);l=v.props,f=v.patchFlag,d=v.dynamicPropNames;const S=v.directives;m=S&&S.length?zr(S.map(g=>Eb(g,t))):void 0}if(e.children.length>0)if(s===$i&&(b=!0,f|=1024),o&&s!==Lr&&s!==$i){const{slots:S,hasDynamicSlots:g}=Xp(e,t);c=S,g&&(f|=1024)}else if(e.children.length===1&&s!==Lr){const S=e.children[0],g=S.type,O=g===5||g===8;O&&jt(S,t)===0&&(f|=1),O||g===2?c=S:c=e.children}else c=e.children;f!==0&&(u=String(f),d&&d.length&&(p=Ob(d))),e.codegenNode=Vr(t,s,l,c,u,p,m,!!b,!1,o,e.loc)};function Qp(e,t,n=!1){let{tag:r}=e;const i=Ll(r),o=Br(e,"is");if(o)if(i||fr("COMPILER_IS_ON_ELEMENT",t)){const l=o.type===6?o.value&&Ee(o.value.content,!0):o.exp;if(l)return Ze(t.helper(Li),[l])}else o.type===6&&o.value.content.startsWith("vue:")&&(r=o.value.content.slice(4));const s=!i&&Et(e,"is");if(s&&s.exp)return Ze(t.helper(Li),[s.exp]);const a=bl(r)||t.isBuiltInComponent(r);return a?(n||t.helper(a),a):(t.helper(rs),t.components.add(r),kr(r,"component"))}function Il(e,t,n=e.props,r=!1){const{tag:i,loc:o}=e,s=e.tagType===1;let a=[];const l=[],c=[];let u=0,f=!1,p=!1,d=!1,m=!1,b=!1,v=!1;const S=[],g=({key:E,value:$})=>{if(mt(E)){const R=E.content,T=yn(R);if(!s&&T&&R.toLowerCase()!=="onclick"&&R!=="onUpdate:modelValue"&&!Sn(R)&&(m=!0),T&&Sn(R)&&(v=!0),$.type===20||($.type===4||$.type===8)&&jt($,t)>0)return;R==="ref"?f=!0:R==="class"?p=!0:R==="style"?d=!0:R!=="key"&&!S.includes(R)&&S.push(R),s&&(R==="class"||R==="style")&&!S.includes(R)&&S.push(R)}else b=!0};for(let E=0;E<n.length;E++){const $=n[E];if($.type===6){const{loc:R,name:T,value:P}=$;let N=Ee(P?P.content:"",!0,P?P.loc:R);if(T==="ref"&&(f=!0),T==="is"&&(Ll(i)||P&&P.content.startsWith("vue:")||fr("COMPILER_IS_ON_ELEMENT",t)))continue;a.push(Ge(Ee(T,!0,El(R,0,T.length)),N))}else{const{name:R,arg:T,exp:P,loc:N}=$,j=R==="bind",V=R==="on";if(R==="slot"){s||t.onError(Be(40,N));continue}if(R==="once"||R==="memo"||R==="is"||j&&Hi(T,"is")&&(Ll(i)||fr("COMPILER_IS_ON_ELEMENT",t))||V&&r)continue;if(!T&&(j||V)){if(b=!0,P)if(a.length&&(l.push(Mt($l(a),o)),a=[]),j){if(fr("COMPILER_V_BIND_OBJECT_ORDER",t)){l.unshift(P);continue}l.push(P)}else l.push({type:14,loc:N,callee:t.helper(us),arguments:[P]});else t.onError(Be(j?34:35,N));continue}const F=t.directiveTransforms[R];if(F){const{props:C,needRuntime:w}=F($,e,t);!r&&C.forEach(g),a.push(...C),w&&(c.push($),Wn(w)&&Zp.set($,w))}else c.push($)}$.type===6&&$.name==="ref"&&t.scopes.vFor>0&&pr("COMPILER_V_FOR_REF",t,$.loc)&&a.push(Ge(Ee("refInFor",!0),Ee("true",!1)))}let O;if(l.length?(a.length&&l.push(Mt($l(a),o)),l.length>1?O=Ze(t.helper(Fi),l,o):O=l[0]):a.length&&(O=Mt($l(a),o)),b?u|=16:(p&&!s&&(u|=2),d&&!s&&(u|=4),S.length&&(u|=8),m&&(u|=32)),(u===0||u===32)&&(f||v||c.length>0)&&(u|=512),!t.inSSR&&O)switch(O.type){case 15:let E=-1,$=-1,R=!1;for(let N=0;N<O.properties.length;N++){const j=O.properties[N].key;mt(j)?j.content==="class"?E=N:j.content==="style"&&($=N):j.isHandlerKey||(R=!0)}const T=O.properties[E],P=O.properties[$];R?O=Ze(t.helper(Fr),[O]):(T&&!mt(T.value)&&(T.value=Ze(t.helper(ls),[T.value])),P&&!mt(P.value)&&(d||P.value.type===17)&&(P.value=Ze(t.helper(cs),[P.value])));break;case 14:break;default:O=Ze(t.helper(Fr),[Ze(t.helper(jr),[O])]);break}return{props:O,directives:c,patchFlag:u,dynamicPropNames:S}}function $l(e){const t=new Map,n=[];for(let r=0;r<e.length;r++){const i=e[r];if(i.key.type===8||!i.key.isStatic){n.push(i);continue}const o=i.key.content,s=t.get(o);s?(o==="style"||o==="class"||yn(o))&&Sb(s,i):(t.set(o,i),n.push(i))}return n}function Sb(e,t){e.value.type===17?e.value.elements.push(t.value):e.value=zr([e.value,t.value],e.loc)}function Eb(e,t){const n=[],r=Zp.get(e);r?n.push(t.helperString(r)):(t.helper(is),t.directives.add(e.name),n.push(kr(e.name,"directive")));const{loc:i}=e;if(e.exp&&n.push(e.exp),e.arg&&(e.exp||n.push("void 0"),n.push(e.arg)),Object.keys(e.modifiers).length){e.arg||(e.exp||n.push("void 0"),n.push("void 0"));const o=Ee("true",!1,i);n.push(Mt(e.modifiers.map(s=>Ge(s,o)),i))}return zr(n,e.loc)}function Ob(e){let t="[";for(let n=0,r=e.length;n<r;n++)t+=JSON.stringify(e[n]),n<r-1&&(t+=", ");return t+"]"}function Ll(e){return e[0].toLowerCase()+e.slice(1)==="component"}const wb=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Tb=/-(\w)/g,qp=wb(e=>e.replace(Tb,(t,n)=>n?n.toUpperCase():"")),Pb=(e,t)=>{if(ki(e)){const{children:n,loc:r}=e,{slotName:i,slotProps:o}=_p(e,t),s=[t.prefixIdentifiers?"_ctx.$slots":"$slots",i,"{}","undefined","true"];let a=2;o&&(s[2]=o,a=3),n.length&&(s[3]=ar([],n,!1,!1,r),a=4),t.scopeId&&!t.slotted&&(a=5),s.splice(a),e.codegenNode=Ze(t.helper(gl),s,r)}};function _p(e,t){let n='"default"',r;const i=[];for(let o=0;o<e.props.length;o++){const s=e.props[o];s.type===6?s.value&&(s.name==="name"?n=JSON.stringify(s.value.content):(s.name=qp(s.name),i.push(s))):s.name==="bind"&&Hi(s.arg,"name")?s.exp&&(n=s.exp):(s.name==="bind"&&s.arg&&mt(s.arg)&&(s.arg.content=qp(s.arg.content)),i.push(s))}if(i.length>0){const{props:o,directives:s}=Il(e,t,i);r=o,s.length&&t.onError(Be(36,s[0].loc))}return{slotName:n,slotProps:r}}const xb=/^\s*([\w$_]+|(async\s*)?\([^)]*?\))\s*=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/,Dl=(e,t,n,r)=>{const{loc:i,modifiers:o,arg:s}=e;!e.exp&&!o.length&&n.onError(Be(35,i));let a;if(s.type===4)if(s.isStatic){const f=s.content;a=Ee(Yn(st(f)),!0,s.loc)}else a=Kt([`${n.helperString(ps)}(`,s,")"]);else a=s,a.children.unshift(`${n.helperString(ps)}(`),a.children.push(")");let l=e.exp;l&&!l.content.trim()&&(l=void 0);let c=n.cacheHandlers&&!l&&!n.inVOnce;if(l){const f=Sl(l.content),p=!(f||xb.test(l.content)),d=l.content.includes(";");(p||c&&f)&&(l=Kt([`${p?"$event":"(...args)"} => ${d?"{":"("}`,l,d?"}":")"]))}let u={props:[Ge(a,l||Ee("() => {}",!1,i))]};return r&&(u=r(u)),c&&(u.props[0].value=n.cache(u.props[0].value)),u.props.forEach(f=>f.key.isHandlerKey=!0),u},ed=(e,t,n)=>{const{exp:r,modifiers:i,loc:o}=e,s=e.arg;return s.type!==4?(s.children.unshift("("),s.children.push(') || ""')):s.isStatic||(s.content=`${s.content} || ""`),i.includes("camel")&&(s.type===4?s.isStatic?s.content=st(s.content):s.content=`${n.helperString(fs)}(${s.content})`:(s.children.unshift(`${n.helperString(fs)}(`),s.children.push(")"))),n.inSSR||(i.includes("prop")&&td(s,"."),i.includes("attr")&&td(s,"^")),!r||r.type===4&&!r.content.trim()?(n.onError(Be(34,o)),{props:[Ge(s,Ee("",!0,o))]}):{props:[Ge(s,r)]}},td=(e,t)=>{e.type===4?e.isStatic?e.content=t+e.content:e.content=`\`${t}\${${e.content}}\``:(e.children.unshift(`'${t}' + (`),e.children.push(")"))},Cb=(e,t)=>{if(e.type===0||e.type===1||e.type===11||e.type===10)return()=>{const n=e.children;let r,i=!1;for(let o=0;o<n.length;o++){const s=n[o];if(gs(s)){i=!0;for(let a=o+1;a<n.length;a++){const l=n[a];if(gs(l))r||(r=n[o]={type:8,loc:s.loc,children:[s]}),r.children.push(" + ",l),n.splice(a,1),a--;else{r=void 0;break}}}}if(!(!i||n.length===1&&(e.type===0||e.type===1&&e.tagType===0&&!e.props.find(o=>o.type===7&&!t.directiveTransforms[o.name])&&e.tag!=="template")))for(let o=0;o<n.length;o++){const s=n[o];if(gs(s)||s.type===8){const a=[];(s.type!==2||s.content!==" ")&&a.push(s),!t.ssr&&jt(s,t)===0&&a.push(1+""),n[o]={type:12,content:s,loc:s.loc,codegenNode:Ze(t.helper(ns),a)}}}}},nd=new WeakSet,Mb=(e,t)=>{if(e.type===1&&Et(e,"once",!0))return nd.has(e)||t.inVOnce?void 0:(nd.add(e),t.inVOnce=!0,t.helper(ji),()=>{t.inVOnce=!1;const n=t.currentNode;n.codegenNode&&(n.codegenNode=t.cache(n.codegenNode,!0))})},Fl=(e,t,n)=>{const{exp:r,arg:i}=e;if(!r)return n.onError(Be(41,e.loc)),jl();const o=r.loc.source,s=r.type===4?r.content:o;n.bindingMetadata[o];const a=!1;if(!s.trim()||!Sl(s)&&!a)return n.onError(Be(42,r.loc)),jl();const l=i||Ee("modelValue",!0),c=i?mt(i)?`onUpdate:${i.content}`:Kt(['"onUpdate:" + ',i]):"onUpdate:modelValue";let u;const f=n.isTS?"($event: any)":"$event";u=Kt([`${f} => ((`,r,") = $event)"]);const p=[Ge(l,e.exp),Ge(c,u)];if(e.modifiers.length&&t.tagType===1){const d=e.modifiers.map(b=>(Vi(b)?b:JSON.stringify(b))+": true").join(", "),m=i?mt(i)?`${i.content}Modifiers`:Kt([i,' + "Modifiers"']):"modelModifiers";p.push(Ge(m,Ee(`{ ${d} }`,!1,e.loc,2)))}return jl(p)};function jl(e=[]){return{props:e}}const Ab=/[\w).+\-_$\]]/,Nb=(e,t)=>{!fr("COMPILER_FILTER",t)||(e.type===5&&xs(e.content,t),e.type===1&&e.props.forEach(n=>{n.type===7&&n.name!=="for"&&n.exp&&xs(n.exp,t)}))};function xs(e,t){if(e.type===4)rd(e,t);else for(let n=0;n<e.children.length;n++){const r=e.children[n];typeof r=="object"&&(r.type===4?rd(r,t):r.type===8?xs(e,t):r.type===5&&xs(r.content,t))}}function rd(e,t){const n=e.content;let r=!1,i=!1,o=!1,s=!1,a=0,l=0,c=0,u=0,f,p,d,m,b=[];for(d=0;d<n.length;d++)if(p=f,f=n.charCodeAt(d),r)f===39&&p!==92&&(r=!1);else if(i)f===34&&p!==92&&(i=!1);else if(o)f===96&&p!==92&&(o=!1);else if(s)f===47&&p!==92&&(s=!1);else if(f===124&&n.charCodeAt(d+1)!==124&&n.charCodeAt(d-1)!==124&&!a&&!l&&!c)m===void 0?(u=d+1,m=n.slice(0,d).trim()):v();else{switch(f){case 34:i=!0;break;case 39:r=!0;break;case 96:o=!0;break;case 40:c++;break;case 41:c--;break;case 91:l++;break;case 93:l--;break;case 123:a++;break;case 125:a--;break}if(f===47){let S=d-1,g;for(;S>=0&&(g=n.charAt(S),g===" ");S--);(!g||!Ab.test(g))&&(s=!0)}}m===void 0?m=n.slice(0,d).trim():u!==0&&v();function v(){b.push(n.slice(u,d).trim()),u=d+1}if(b.length){for(d=0;d<b.length;d++)m=Rb(m,b[d],t);e.content=m}}function Rb(e,t,n){n.helper(os);const r=t.indexOf("(");if(r<0)return n.filters.add(t),`${kr(t,"filter")}(${e})`;{const i=t.slice(0,r),o=t.slice(r+1);return n.filters.add(i),`${kr(i,"filter")}(${e}${o!==")"?","+o:o}`}}const id=new WeakSet,Ib=(e,t)=>{if(e.type===1){const n=Et(e,"memo");return!n||id.has(e)?void 0:(id.add(e),()=>{const r=e.codegenNode||t.currentNode.codegenNode;r&&r.type===13&&(e.tagType!==1&&vs(r,t),e.codegenNode=Ze(t.helper(hs),[n.exp,ar(void 0,r),"_cache",String(t.cached++)]))})}};function od(e){return[[Mb,pb,Ib,hb,Nb,Pb,Jp,Yp,Cb],{on:Dl,bind:ed,model:Fl}]}function sd(e,t={}){const n=t.onError||fl,r=t.mode==="module";t.prefixIdentifiers===!0?n(Be(46)):r&&n(Be(47));const i=!1;t.cacheHandlers&&n(Be(48)),t.scopeId&&!r&&n(Be(49));const o=be(e)?Tl(e,t):e,[s,a]=od();return Lp(o,Me({},t,{prefixIdentifiers:i,nodeTransforms:[...s,...t.nodeTransforms||[]],directiveTransforms:Me({},a,t.directiveTransforms||{})})),Dp(o,Me({},t,{prefixIdentifiers:i}))}const ad=()=>({props:[]}),Vl=Symbol(""),zl=Symbol(""),Bl=Symbol(""),Hl=Symbol(""),Cs=Symbol(""),kl=Symbol(""),Ul=Symbol(""),Kl=Symbol(""),Wl=Symbol(""),Yl=Symbol("");mp({[Vl]:"vModelRadio",[zl]:"vModelCheckbox",[Bl]:"vModelText",[Hl]:"vModelSelect",[Cs]:"vModelDynamic",[kl]:"withModifiers",[Ul]:"withKeys",[Kl]:"vShow",[Wl]:"Transition",[Yl]:"TransitionGroup"});let Ur;function $b(e,t=!1){return Ur||(Ur=document.createElement("div")),t?(Ur.innerHTML=`<div foo="${e.replace(/"/g,""")}">`,Ur.children[0].getAttribute("foo")):(Ur.innerHTML=e,Ur.textContent)}const Lb=it("style,iframe,script,noscript",!0),Xl={isVoidTag:Hc,isNativeTag:e=>zc(e)||Bc(e),isPreTag:e=>e==="pre",decodeEntities:$b,isBuiltInComponent:e=>{if(lr(e,"Transition"))return Wl;if(lr(e,"TransitionGroup"))return Yl},getNamespace(e,t){let n=t?t.ns:0;if(t&&n===2)if(t.tag==="annotation-xml"){if(e==="svg")return 1;t.props.some(r=>r.type===6&&r.name==="encoding"&&r.value!=null&&(r.value.content==="text/html"||r.value.content==="application/xhtml+xml"))&&(n=0)}else/^m(?:[ions]|text)$/.test(t.tag)&&e!=="mglyph"&&e!=="malignmark"&&(n=0);else t&&n===1&&(t.tag==="foreignObject"||t.tag==="desc"||t.tag==="title")&&(n=0);if(n===0){if(e==="svg")return 1;if(e==="math")return 2}return n},getTextMode({tag:e,ns:t}){if(t===0){if(e==="textarea"||e==="title")return 1;if(Lb(e))return 2}return 0}},ld=e=>{e.type===1&&e.props.forEach((t,n)=>{t.type===6&&t.name==="style"&&t.value&&(e.props[n]={type:7,name:"bind",arg:Ee("style",!0,t.loc),exp:Db(t.value.content,t.loc),modifiers:[],loc:t.loc})})},Db=(e,t)=>{const n=na(e);return Ee(JSON.stringify(n),!1,t,3)};function rn(e,t){return Be(e,t)}const Fb=(e,t,n)=>{const{exp:r,loc:i}=e;return r||n.onError(rn(50,i)),t.children.length&&(n.onError(rn(51,i)),t.children.length=0),{props:[Ge(Ee("innerHTML",!0,i),r||Ee("",!0))]}},jb=(e,t,n)=>{const{exp:r,loc:i}=e;return r||n.onError(rn(52,i)),t.children.length&&(n.onError(rn(53,i)),t.children.length=0),{props:[Ge(Ee("textContent",!0),r?Ze(n.helperString(Di),[r],i):Ee("",!0))]}},Vb=(e,t,n)=>{const r=Fl(e,t,n);if(!r.props.length||t.tagType===1)return r;e.arg&&n.onError(rn(55,e.arg.loc));const{tag:i}=t,o=n.isCustomElement(i);if(i==="input"||i==="textarea"||i==="select"||o){let s=Bl,a=!1;if(i==="input"||o){const l=Br(t,"type");if(l){if(l.type===7)s=Cs;else if(l.value)switch(l.value.content){case"radio":s=Vl;break;case"checkbox":s=zl;break;case"file":a=!0,n.onError(rn(56,e.loc));break}}else Sp(t)&&(s=Cs)}else i==="select"&&(s=Hl);a||(r.needRuntime=n.helper(s))}else n.onError(rn(54,e.loc));return r.props=r.props.filter(s=>!(s.key.type===4&&s.key.content==="modelValue")),r},zb=it("passive,once,capture"),Bb=it("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),Hb=it("left,right"),cd=it("onkeyup,onkeydown,onkeypress",!0),kb=(e,t,n,r)=>{const i=[],o=[],s=[];for(let a=0;a<t.length;a++){const l=t[a];l==="native"&&pr("COMPILER_V_ON_NATIVE",n)||zb(l)?s.push(l):Hb(l)?mt(e)?cd(e.content)?i.push(l):o.push(l):(i.push(l),o.push(l)):Bb(l)?o.push(l):i.push(l)}return{keyModifiers:i,nonKeyModifiers:o,eventOptionModifiers:s}},ud=(e,t)=>mt(e)&&e.content.toLowerCase()==="onclick"?Ee(t,!0):e.type!==4?Kt(["(",e,`) === "onClick" ? "${t}" : (`,e,")"]):e,Ub=(e,t,n)=>Dl(e,t,n,r=>{const{modifiers:i}=e;if(!i.length)return r;let{key:o,value:s}=r.props[0];const{keyModifiers:a,nonKeyModifiers:l,eventOptionModifiers:c}=kb(o,i,n,e.loc);if(l.includes("right")&&(o=ud(o,"onContextmenu")),l.includes("middle")&&(o=ud(o,"onMouseup")),l.length&&(s=Ze(n.helper(kl),[s,JSON.stringify(l)])),a.length&&(!mt(o)||cd(o.content))&&(s=Ze(n.helper(Ul),[s,JSON.stringify(a)])),c.length){const u=c.map(En).join("");o=mt(o)?Ee(`${o.content}${u}`,!0):Kt(["(",o,`) + "${u}"`])}return{props:[Ge(o,s)]}}),Kb=(e,t,n)=>{const{exp:r,loc:i}=e;return r||n.onError(rn(58,i)),{props:[],needRuntime:n.helper(Kl)}},Wb=(e,t)=>{e.type===1&&e.tagType===0&&(e.tag==="script"||e.tag==="style")&&(t.onError(rn(60,e.loc)),t.removeNode())},fd=[ld],pd={cloak:ad,html:Fb,text:jb,model:Vb,on:Ub,show:Kb};function Yb(e,t={}){return sd(e,Me({},Xl,t,{nodeTransforms:[Wb,...fd,...t.nodeTransforms||[]],directiveTransforms:Me({},pd,t.directiveTransforms||{}),transformHoist:null}))}function Xb(e,t={}){return Tl(e,Me({},Xl,t))}var Gb=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",DOMDirectiveTransforms:pd,DOMNodeTransforms:fd,TRANSITION:Wl,TRANSITION_GROUP:Yl,V_MODEL_CHECKBOX:zl,V_MODEL_DYNAMIC:Cs,V_MODEL_RADIO:Vl,V_MODEL_SELECT:Hl,V_MODEL_TEXT:Bl,V_ON_WITH_KEYS:Ul,V_ON_WITH_MODIFIERS:kl,V_SHOW:Kl,compile:Yb,createDOMCompilerError:rn,parse:Xb,parserOptions:Xl,transformStyle:ld,generateCodeFrame:Lc,BASE_TRANSITION:pl,CAMELIZE:fs,CAPITALIZE:up,CREATE_BLOCK:dl,CREATE_COMMENT:Dr,CREATE_ELEMENT_BLOCK:hl,CREATE_ELEMENT_VNODE:ts,CREATE_SLOTS:vl,CREATE_STATIC:ml,CREATE_TEXT:ns,CREATE_VNODE:es,FRAGMENT:$r,GUARD_REACTIVE_PROPS:jr,IS_MEMO_SAME:yl,IS_REF:hp,KEEP_ALIVE:$i,MERGE_PROPS:Fi,NORMALIZE_CLASS:ls,NORMALIZE_PROPS:Fr,NORMALIZE_STYLE:cs,OPEN_BLOCK:Vn,POP_SCOPE_ID:pp,PUSH_SCOPE_ID:fp,RENDER_LIST:as,RENDER_SLOT:gl,RESOLVE_COMPONENT:rs,RESOLVE_DIRECTIVE:is,RESOLVE_DYNAMIC_COMPONENT:Li,RESOLVE_FILTER:os,SET_BLOCK_TRACKING:ji,SUSPENSE:_o,TELEPORT:Lr,TO_DISPLAY_STRING:Di,TO_HANDLERS:us,TO_HANDLER_KEY:ps,UNREF:dp,WITH_CTX:ds,WITH_DIRECTIVES:ss,WITH_MEMO:hs,advancePositionWithClone:zi,advancePositionWithMutation:Bi,assert:wy,baseCompile:sd,baseParse:Tl,buildProps:Il,buildSlots:Xp,checkCompatEnabled:pr,createArrayExpression:zr,createAssignmentExpression:my,createBlockStatement:yp,createCacheExpression:vp,createCallExpression:Ze,createCompilerError:Be,createCompoundExpression:Kt,createConditionalExpression:ms,createForLoopParams:ws,createFunctionExpression:ar,createIfStatement:hy,createInterpolation:py,createObjectExpression:Mt,createObjectProperty:Ge,createReturnStatement:vy,createRoot:gp,createSequenceExpression:gy,createSimpleExpression:Ee,createStructuralDirectiveTransform:Ml,createTemplateLiteral:dy,createTransformContext:$p,createVNodeCall:Vr,extractIdentifiers:zn,findDir:Et,findProp:Br,generate:Dp,getBaseTransformPreset:od,getInnerRange:El,getMemoedVNodeCall:Op,getVNodeBlockHelper:ur,getVNodeHelper:cr,hasDynamicKeyVBind:Sp,hasScopeRef:Wt,helperNameMap:mn,injectProp:Ui,isBindKey:Hi,isBuiltInType:lr,isCoreComponent:bl,isFunctionType:cb,isInDestructureAssignment:sb,isMemberExpression:Sl,isMemberExpressionBrowser:bp,isMemberExpressionNode:Oy,isReferencedIdentifier:ob,isSimpleIdentifier:Vi,isSlotOutlet:ki,isStaticExp:mt,isStaticProperty:Vp,isStaticPropertyKey:ub,isTemplateNode:Hr,isText:gs,isVSlot:Ol,locStub:tt,makeBlock:vs,noopDirectiveTransform:ad,processExpression:Es,processFor:Up,processIf:zp,processSlotOutlet:_p,registerRuntimeHelpers:mp,resolveComponentType:Qp,toValidAssetId:kr,trackSlotScopes:Yp,trackVForSlotScopes:yb,transform:Lp,transformBind:ed,transformElement:Jp,transformExpression:fb,transformModel:Fl,transformOn:Dl,traverseNode:Xi,walkBlockDeclarations:lb,walkFunctionParams:ab,walkIdentifiers:ib,warnDeprecation:xy}),Zb=ul(Gb),Jb=ul(uy),Qb=ul(cm);(function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=Zb,n=Jb,r=Qb;function i(l){if(l&&l.__esModule)return l;var c=Object.create(null);return l&&Object.keys(l).forEach(function(u){c[u]=l[u]}),c.default=l,Object.freeze(c)}var o=i(n);const s=Object.create(null);function a(l,c){if(!r.isString(l))if(l.nodeType)l=l.innerHTML;else return r.NOOP;const u=l,f=s[u];if(f)return f;if(l[0]==="#"){const m=document.querySelector(l);l=m?m.innerHTML:""}const{code:p}=t.compile(l,r.extend({hoistStatic:!0,onError:void 0,onWarn:r.NOOP},c)),d=new Function("Vue",p)(o);return d._rc=!0,s[u]=d}n.registerRuntimeCompiler(a),Object.keys(n).forEach(function(l){l!=="default"&&(e[l]=n[l])}),e.compile=a})(lp);ap.exports=lp;(function(e){e.exports=function(t){var n={};function r(i){if(n[i])return n[i].exports;var o=n[i]={i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=n,r.d=function(i,o,s){r.o(i,o)||Object.defineProperty(i,o,{enumerable:!0,get:s})},r.r=function(i){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})},r.t=function(i,o){if(o&1&&(i=r(i)),o&8||o&4&&typeof i=="object"&&i&&i.__esModule)return i;var s=Object.create(null);if(r.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:i}),o&2&&typeof i!="string")for(var a in i)r.d(s,a,function(l){return i[l]}.bind(null,a));return s},r.n=function(i){var o=i&&i.__esModule?function(){return i.default}:function(){return i};return r.d(o,"a",o),o},r.o=function(i,o){return Object.prototype.hasOwnProperty.call(i,o)},r.p="",r(r.s="fae3")}({"00ee":function(t,n,r){var i=r("b622"),o=i("toStringTag"),s={};s[o]="z",t.exports=String(s)==="[object z]"},"0366":function(t,n,r){var i=r("1c0b");t.exports=function(o,s,a){if(i(o),s===void 0)return o;switch(a){case 0:return function(){return o.call(s)};case 1:return function(l){return o.call(s,l)};case 2:return function(l,c){return o.call(s,l,c)};case 3:return function(l,c,u){return o.call(s,l,c,u)}}return function(){return o.apply(s,arguments)}}},"057f":function(t,n,r){var i=r("fc6a"),o=r("241c").f,s={}.toString,a=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],l=function(c){try{return o(c)}catch(u){return a.slice()}};t.exports.f=function(u){return a&&s.call(u)=="[object Window]"?l(u):o(i(u))}},"06cf":function(t,n,r){var i=r("83ab"),o=r("d1e7"),s=r("5c6c"),a=r("fc6a"),l=r("c04e"),c=r("5135"),u=r("0cfb"),f=Object.getOwnPropertyDescriptor;n.f=i?f:function(d,m){if(d=a(d),m=l(m,!0),u)try{return f(d,m)}catch(b){}if(c(d,m))return s(!o.f.call(d,m),d[m])}},"0cfb":function(t,n,r){var i=r("83ab"),o=r("d039"),s=r("cc12");t.exports=!i&&!o(function(){return Object.defineProperty(s("div"),"a",{get:function(){return 7}}).a!=7})},"159b":function(t,n,r){var i=r("da84"),o=r("fdbc"),s=r("17c2"),a=r("9112");for(var l in o){var c=i[l],u=c&&c.prototype;if(u&&u.forEach!==s)try{a(u,"forEach",s)}catch(f){u.forEach=s}}},"17c2":function(t,n,r){var i=r("b727").forEach,o=r("a640"),s=o("forEach");t.exports=s?[].forEach:function(l){return i(this,l,arguments.length>1?arguments[1]:void 0)}},"1be4":function(t,n,r){var i=r("d066");t.exports=i("document","documentElement")},"1c0b":function(t,n){t.exports=function(r){if(typeof r!="function")throw TypeError(String(r)+" is not a function");return r}},"1c7e":function(t,n,r){var i=r("b622"),o=i("iterator"),s=!1;try{var a=0,l={next:function(){return{done:!!a++}},return:function(){s=!0}};l[o]=function(){return this},Array.from(l,function(){throw 2})}catch(c){}t.exports=function(c,u){if(!u&&!s)return!1;var f=!1;try{var p={};p[o]=function(){return{next:function(){return{done:f=!0}}}},c(p)}catch(d){}return f}},"1d80":function(t,n){t.exports=function(r){if(r==null)throw TypeError("Can't call method on "+r);return r}},"1dde":function(t,n,r){var i=r("d039"),o=r("b622"),s=r("2d00"),a=o("species");t.exports=function(l){return s>=51||!i(function(){var c=[],u=c.constructor={};return u[a]=function(){return{foo:1}},c[l](Boolean).foo!==1})}},"23cb":function(t,n,r){var i=r("a691"),o=Math.max,s=Math.min;t.exports=function(a,l){var c=i(a);return c<0?o(c+l,0):s(c,l)}},"23e7":function(t,n,r){var i=r("da84"),o=r("06cf").f,s=r("9112"),a=r("6eeb"),l=r("ce4e"),c=r("e893"),u=r("94ca");t.exports=function(f,p){var d=f.target,m=f.global,b=f.stat,v,S,g,O,E,$;if(m?S=i:b?S=i[d]||l(d,{}):S=(i[d]||{}).prototype,S)for(g in p){if(E=p[g],f.noTargetGet?($=o(S,g),O=$&&$.value):O=S[g],v=u(m?g:d+(b?".":"#")+g,f.forced),!v&&O!==void 0){if(typeof E==typeof O)continue;c(E,O)}(f.sham||O&&O.sham)&&s(E,"sham",!0),a(S,g,E,f)}}},"241c":function(t,n,r){var i=r("ca84"),o=r("7839"),s=o.concat("length","prototype");n.f=Object.getOwnPropertyNames||function(l){return i(l,s)}},"2532":function(t,n,r){var i=r("23e7"),o=r("5a34"),s=r("1d80"),a=r("ab13");i({target:"String",proto:!0,forced:!a("includes")},{includes:function(c){return!!~String(s(this)).indexOf(o(c),arguments.length>1?arguments[1]:void 0)}})},"2a62":function(t,n,r){var i=r("825a");t.exports=function(o){var s=o.return;if(s!==void 0)return i(s.call(o)).value}},"2d00":function(t,n,r){var i=r("da84"),o=r("342f"),s=i.process,a=s&&s.versions,l=a&&a.v8,c,u;l?(c=l.split("."),u=c[0]<4?1:c[0]+c[1]):o&&(c=o.match(/Edge\/(\d+)/),(!c||c[1]>=74)&&(c=o.match(/Chrome\/(\d+)/),c&&(u=c[1]))),t.exports=u&&+u},"342f":function(t,n,r){var i=r("d066");t.exports=i("navigator","userAgent")||""},"35a1":function(t,n,r){var i=r("f5df"),o=r("3f8c"),s=r("b622"),a=s("iterator");t.exports=function(l){if(l!=null)return l[a]||l["@@iterator"]||o[i(l)]}},"37e8":function(t,n,r){var i=r("83ab"),o=r("9bf2"),s=r("825a"),a=r("df75");t.exports=i?Object.defineProperties:function(c,u){s(c);for(var f=a(u),p=f.length,d=0,m;p>d;)o.f(c,m=f[d++],u[m]);return c}},"3bbe":function(t,n,r){var i=r("861d");t.exports=function(o){if(!i(o)&&o!==null)throw TypeError("Can't set "+String(o)+" as a prototype");return o}},"3ca3":function(t,n,r){var i=r("6547").charAt,o=r("69f3"),s=r("7dd0"),a="String Iterator",l=o.set,c=o.getterFor(a);s(String,"String",function(u){l(this,{type:a,string:String(u),index:0})},function(){var f=c(this),p=f.string,d=f.index,m;return d>=p.length?{value:void 0,done:!0}:(m=i(p,d),f.index+=m.length,{value:m,done:!1})})},"3f8c":function(t,n){t.exports={}},"428f":function(t,n,r){var i=r("da84");t.exports=i},"44ad":function(t,n,r){var i=r("d039"),o=r("c6b6"),s="".split;t.exports=i(function(){return!Object("z").propertyIsEnumerable(0)})?function(a){return o(a)=="String"?s.call(a,""):Object(a)}:Object},"44d2":function(t,n,r){var i=r("b622"),o=r("7c73"),s=r("9bf2"),a=i("unscopables"),l=Array.prototype;l[a]==null&&s.f(l,a,{configurable:!0,value:o(null)}),t.exports=function(c){l[a][c]=!0}},"44e7":function(t,n,r){var i=r("861d"),o=r("c6b6"),s=r("b622"),a=s("match");t.exports=function(l){var c;return i(l)&&((c=l[a])!==void 0?!!c:o(l)=="RegExp")}},"4930":function(t,n,r){var i=r("2d00"),o=r("d039");t.exports=!!Object.getOwnPropertySymbols&&!o(function(){var s=Symbol();return!String(s)||!(Object(s)instanceof Symbol)||!Symbol.sham&&i&&i<41})},"4d64":function(t,n,r){var i=r("fc6a"),o=r("50c4"),s=r("23cb"),a=function(l){return function(c,u,f){var p=i(c),d=o(p.length),m=s(f,d),b;if(l&&u!=u){for(;d>m;)if(b=p[m++],b!=b)return!0}else for(;d>m;m++)if((l||m in p)&&p[m]===u)return l||m||0;return!l&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},"4de4":function(t,n,r){var i=r("23e7"),o=r("b727").filter,s=r("1dde"),a=s("filter");i({target:"Array",proto:!0,forced:!a},{filter:function(c){return o(this,c,arguments.length>1?arguments[1]:void 0)}})},"4df4":function(t,n,r){var i=r("0366"),o=r("7b0b"),s=r("9bdd"),a=r("e95a"),l=r("50c4"),c=r("8418"),u=r("35a1");t.exports=function(p){var d=o(p),m=typeof this=="function"?this:Array,b=arguments.length,v=b>1?arguments[1]:void 0,S=v!==void 0,g=u(d),O=0,E,$,R,T,P,N;if(S&&(v=i(v,b>2?arguments[2]:void 0,2)),g!=null&&!(m==Array&&a(g)))for(T=g.call(d),P=T.next,$=new m;!(R=P.call(T)).done;O++)N=S?s(T,v,[R.value,O],!0):R.value,c($,O,N);else for(E=l(d.length),$=new m(E);E>O;O++)N=S?v(d[O],O):d[O],c($,O,N);return $.length=O,$}},"4fad":function(t,n,r){var i=r("23e7"),o=r("6f53").entries;i({target:"Object",stat:!0},{entries:function(a){return o(a)}})},"50c4":function(t,n,r){var i=r("a691"),o=Math.min;t.exports=function(s){return s>0?o(i(s),9007199254740991):0}},"5135":function(t,n,r){var i=r("7b0b"),o={}.hasOwnProperty;t.exports=Object.hasOwn||function(a,l){return o.call(i(a),l)}},"5692":function(t,n,r){var i=r("c430"),o=r("c6cd");(t.exports=function(s,a){return o[s]||(o[s]=a!==void 0?a:{})})("versions",[]).push({version:"3.15.2",mode:i?"pure":"global",copyright:"\xA9 2021 Denis Pushkarev (zloirock.ru)"})},"56ef":function(t,n,r){var i=r("d066"),o=r("241c"),s=r("7418"),a=r("825a");t.exports=i("Reflect","ownKeys")||function(c){var u=o.f(a(c)),f=s.f;return f?u.concat(f(c)):u}},"5899":function(t,n){t.exports=`
|
12 |
\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`},"58a8":function(t,n,r){var i=r("1d80"),o=r("5899"),s="["+o+"]",a=RegExp("^"+s+s+"*"),l=RegExp(s+s+"*$"),c=function(u){return function(f){var p=String(i(f));return u&1&&(p=p.replace(a,"")),u&2&&(p=p.replace(l,"")),p}};t.exports={start:c(1),end:c(2),trim:c(3)}},"5a34":function(t,n,r){var i=r("44e7");t.exports=function(o){if(i(o))throw TypeError("The method doesn't accept regular expressions");return o}},"5c6c":function(t,n){t.exports=function(r,i){return{enumerable:!(r&1),configurable:!(r&2),writable:!(r&4),value:i}}},"6547":function(t,n,r){var i=r("a691"),o=r("1d80"),s=function(a){return function(l,c){var u=String(o(l)),f=i(c),p=u.length,d,m;return f<0||f>=p?a?"":void 0:(d=u.charCodeAt(f),d<55296||d>56319||f+1===p||(m=u.charCodeAt(f+1))<56320||m>57343?a?u.charAt(f):d:a?u.slice(f,f+2):(d-55296<<10)+(m-56320)+65536)}};t.exports={codeAt:s(!1),charAt:s(!0)}},"65f0":function(t,n,r){var i=r("861d"),o=r("e8b5"),s=r("b622"),a=s("species");t.exports=function(l,c){var u;return o(l)&&(u=l.constructor,typeof u=="function"&&(u===Array||o(u.prototype))?u=void 0:i(u)&&(u=u[a],u===null&&(u=void 0))),new(u===void 0?Array:u)(c===0?0:c)}},"69f3":function(t,n,r){var i=r("7f9a"),o=r("da84"),s=r("861d"),a=r("9112"),l=r("5135"),c=r("c6cd"),u=r("f772"),f=r("d012"),p="Object already initialized",d=o.WeakMap,m,b,v,S=function(P){return v(P)?b(P):m(P,{})},g=function(P){return function(N){var j;if(!s(N)||(j=b(N)).type!==P)throw TypeError("Incompatible receiver, "+P+" required");return j}};if(i||c.state){var O=c.state||(c.state=new d),E=O.get,$=O.has,R=O.set;m=function(P,N){if($.call(O,P))throw new TypeError(p);return N.facade=P,R.call(O,P,N),N},b=function(P){return E.call(O,P)||{}},v=function(P){return $.call(O,P)}}else{var T=u("state");f[T]=!0,m=function(P,N){if(l(P,T))throw new TypeError(p);return N.facade=P,a(P,T,N),N},b=function(P){return l(P,T)?P[T]:{}},v=function(P){return l(P,T)}}t.exports={set:m,get:b,has:v,enforce:S,getterFor:g}},"6eeb":function(t,n,r){var i=r("da84"),o=r("9112"),s=r("5135"),a=r("ce4e"),l=r("8925"),c=r("69f3"),u=c.get,f=c.enforce,p=String(String).split("String");(t.exports=function(d,m,b,v){var S=v?!!v.unsafe:!1,g=v?!!v.enumerable:!1,O=v?!!v.noTargetGet:!1,E;if(typeof b=="function"&&(typeof m=="string"&&!s(b,"name")&&o(b,"name",m),E=f(b),E.source||(E.source=p.join(typeof m=="string"?m:""))),d===i){g?d[m]=b:a(m,b);return}else S?!O&&d[m]&&(g=!0):delete d[m];g?d[m]=b:o(d,m,b)})(Function.prototype,"toString",function(){return typeof this=="function"&&u(this).source||l(this)})},"6f53":function(t,n,r){var i=r("83ab"),o=r("df75"),s=r("fc6a"),a=r("d1e7").f,l=function(c){return function(u){for(var f=s(u),p=o(f),d=p.length,m=0,b=[],v;d>m;)v=p[m++],(!i||a.call(f,v))&&b.push(c?[v,f[v]]:f[v]);return b}};t.exports={entries:l(!0),values:l(!1)}},"7156":function(t,n,r){var i=r("861d"),o=r("d2bb");t.exports=function(s,a,l){var c,u;return o&&typeof(c=a.constructor)=="function"&&c!==l&&i(u=c.prototype)&&u!==l.prototype&&o(s,u),s}},"7418":function(t,n){n.f=Object.getOwnPropertySymbols},"746f":function(t,n,r){var i=r("428f"),o=r("5135"),s=r("e538"),a=r("9bf2").f;t.exports=function(l){var c=i.Symbol||(i.Symbol={});o(c,l)||a(c,l,{value:s.f(l)})}},"7839":function(t,n){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"7b0b":function(t,n,r){var i=r("1d80");t.exports=function(o){return Object(i(o))}},"7c73":function(t,n,r){var i=r("825a"),o=r("37e8"),s=r("7839"),a=r("d012"),l=r("1be4"),c=r("cc12"),u=r("f772"),f=">",p="<",d="prototype",m="script",b=u("IE_PROTO"),v=function(){},S=function(R){return p+m+f+R+p+"/"+m+f},g=function(R){R.write(S("")),R.close();var T=R.parentWindow.Object;return R=null,T},O=function(){var R=c("iframe"),T="java"+m+":",P;return R.style.display="none",l.appendChild(R),R.src=String(T),P=R.contentWindow.document,P.open(),P.write(S("document.F=Object")),P.close(),P.F},E,$=function(){try{E=document.domain&&new ActiveXObject("htmlfile")}catch(T){}$=E?g(E):O();for(var R=s.length;R--;)delete $[d][s[R]];return $()};a[b]=!0,t.exports=Object.create||function(T,P){var N;return T!==null?(v[d]=i(T),N=new v,v[d]=null,N[b]=T):N=$(),P===void 0?N:o(N,P)}},"7db0":function(t,n,r){var i=r("23e7"),o=r("b727").find,s=r("44d2"),a="find",l=!0;a in[]&&Array(1)[a](function(){l=!1}),i({target:"Array",proto:!0,forced:l},{find:function(u){return o(this,u,arguments.length>1?arguments[1]:void 0)}}),s(a)},"7dd0":function(t,n,r){var i=r("23e7"),o=r("9ed3"),s=r("e163"),a=r("d2bb"),l=r("d44e"),c=r("9112"),u=r("6eeb"),f=r("b622"),p=r("c430"),d=r("3f8c"),m=r("ae93"),b=m.IteratorPrototype,v=m.BUGGY_SAFARI_ITERATORS,S=f("iterator"),g="keys",O="values",E="entries",$=function(){return this};t.exports=function(R,T,P,N,j,V,F){o(P,T,N);var C=function(ve){if(ve===j&&B)return B;if(!v&&ve in L)return L[ve];switch(ve){case g:return function(){return new P(this,ve)};case O:return function(){return new P(this,ve)};case E:return function(){return new P(this,ve)}}return function(){return new P(this)}},w=T+" Iterator",M=!1,L=R.prototype,z=L[S]||L["@@iterator"]||j&&L[j],B=!v&&z||C(j),K=T=="Array"&&L.entries||z,G,de,ce;if(K&&(G=s(K.call(new R)),b!==Object.prototype&&G.next&&(!p&&s(G)!==b&&(a?a(G,b):typeof G[S]!="function"&&c(G,S,$)),l(G,w,!0,!0),p&&(d[w]=$))),j==O&&z&&z.name!==O&&(M=!0,B=function(){return z.call(this)}),(!p||F)&&L[S]!==B&&c(L,S,B),d[T]=B,j)if(de={values:C(O),keys:V?B:C(g),entries:C(E)},F)for(ce in de)(v||M||!(ce in L))&&u(L,ce,de[ce]);else i({target:T,proto:!0,forced:v||M},de);return de}},"7f9a":function(t,n,r){var i=r("da84"),o=r("8925"),s=i.WeakMap;t.exports=typeof s=="function"&&/native code/.test(o(s))},"825a":function(t,n,r){var i=r("861d");t.exports=function(o){if(!i(o))throw TypeError(String(o)+" is not an object");return o}},"83ab":function(t,n,r){var i=r("d039");t.exports=!i(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},"8418":function(t,n,r){var i=r("c04e"),o=r("9bf2"),s=r("5c6c");t.exports=function(a,l,c){var u=i(l);u in a?o.f(a,u,s(0,c)):a[u]=c}},"861d":function(t,n){t.exports=function(r){return typeof r=="object"?r!==null:typeof r=="function"}},"8875":function(t,n,r){var i,o,s;(function(a,l){o=[],i=l,s=typeof i=="function"?i.apply(n,o):i,s!==void 0&&(t.exports=s)})(typeof self!="undefined"?self:this,function(){function a(){var l=Object.getOwnPropertyDescriptor(document,"currentScript");if(!l&&"currentScript"in document&&document.currentScript||l&&l.get!==a&&document.currentScript)return document.currentScript;try{throw new Error}catch(E){var c=/.*at [^(]*\((.*):(.+):(.+)\)$/ig,u=/@([^@]*):(\d+):(\d+)\s*$/ig,f=c.exec(E.stack)||u.exec(E.stack),p=f&&f[1]||!1,d=f&&f[2]||!1,m=document.location.href.replace(document.location.hash,""),b,v,S,g=document.getElementsByTagName("script");p===m&&(b=document.documentElement.outerHTML,v=new RegExp("(?:[^\\n]+?\\n){0,"+(d-2)+"}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),S=b.replace(v,"$1").trim());for(var O=0;O<g.length;O++)if(g[O].readyState==="interactive"||g[O].src===p||p===m&&g[O].innerHTML&&g[O].innerHTML.trim()===S)return g[O];return null}}return a})},"8925":function(t,n,r){var i=r("c6cd"),o=Function.toString;typeof i.inspectSource!="function"&&(i.inspectSource=function(s){return o.call(s)}),t.exports=i.inspectSource},"8bbf":function(t,n){t.exports=ap.exports},"90e3":function(t,n){var r=0,i=Math.random();t.exports=function(o){return"Symbol("+String(o===void 0?"":o)+")_"+(++r+i).toString(36)}},"9112":function(t,n,r){var i=r("83ab"),o=r("9bf2"),s=r("5c6c");t.exports=i?function(a,l,c){return o.f(a,l,s(1,c))}:function(a,l,c){return a[l]=c,a}},"94ca":function(t,n,r){var i=r("d039"),o=/#|\.prototype\./,s=function(f,p){var d=l[a(f)];return d==u?!0:d==c?!1:typeof p=="function"?i(p):!!p},a=s.normalize=function(f){return String(f).replace(o,".").toLowerCase()},l=s.data={},c=s.NATIVE="N",u=s.POLYFILL="P";t.exports=s},"9bdd":function(t,n,r){var i=r("825a"),o=r("2a62");t.exports=function(s,a,l,c){try{return c?a(i(l)[0],l[1]):a(l)}catch(u){throw o(s),u}}},"9bf2":function(t,n,r){var i=r("83ab"),o=r("0cfb"),s=r("825a"),a=r("c04e"),l=Object.defineProperty;n.f=i?l:function(u,f,p){if(s(u),f=a(f,!0),s(p),o)try{return l(u,f,p)}catch(d){}if("get"in p||"set"in p)throw TypeError("Accessors not supported");return"value"in p&&(u[f]=p.value),u}},"9ed3":function(t,n,r){var i=r("ae93").IteratorPrototype,o=r("7c73"),s=r("5c6c"),a=r("d44e"),l=r("3f8c"),c=function(){return this};t.exports=function(u,f,p){var d=f+" Iterator";return u.prototype=o(i,{next:s(1,p)}),a(u,d,!1,!0),l[d]=c,u}},a434:function(t,n,r){var i=r("23e7"),o=r("23cb"),s=r("a691"),a=r("50c4"),l=r("7b0b"),c=r("65f0"),u=r("8418"),f=r("1dde"),p=f("splice"),d=Math.max,m=Math.min,b=9007199254740991,v="Maximum allowed length exceeded";i({target:"Array",proto:!0,forced:!p},{splice:function(g,O){var E=l(this),$=a(E.length),R=o(g,$),T=arguments.length,P,N,j,V,F,C;if(T===0?P=N=0:T===1?(P=0,N=$-R):(P=T-2,N=m(d(s(O),0),$-R)),$+P-N>b)throw TypeError(v);for(j=c(E,N),V=0;V<N;V++)F=R+V,F in E&&u(j,V,E[F]);if(j.length=N,P<N){for(V=R;V<$-N;V++)F=V+N,C=V+P,F in E?E[C]=E[F]:delete E[C];for(V=$;V>$-N+P;V--)delete E[V-1]}else if(P>N)for(V=$-N;V>R;V--)F=V+N-1,C=V+P-1,F in E?E[C]=E[F]:delete E[C];for(V=0;V<P;V++)E[V+R]=arguments[V+2];return E.length=$-N+P,j}})},a4d3:function(t,n,r){var i=r("23e7"),o=r("da84"),s=r("d066"),a=r("c430"),l=r("83ab"),c=r("4930"),u=r("fdbf"),f=r("d039"),p=r("5135"),d=r("e8b5"),m=r("861d"),b=r("825a"),v=r("7b0b"),S=r("fc6a"),g=r("c04e"),O=r("5c6c"),E=r("7c73"),$=r("df75"),R=r("241c"),T=r("057f"),P=r("7418"),N=r("06cf"),j=r("9bf2"),V=r("d1e7"),F=r("9112"),C=r("6eeb"),w=r("5692"),M=r("f772"),L=r("d012"),z=r("90e3"),B=r("b622"),K=r("e538"),G=r("746f"),de=r("d44e"),ce=r("69f3"),ve=r("b727").forEach,Se=M("hidden"),Re="Symbol",Je="prototype",Qe=B("toPrimitive"),ft=ce.set,kt=ce.getterFor(Re),Ve=Object[Je],ze=o.Symbol,vt=s("JSON","stringify"),x=N.f,I=j.f,k=T.f,X=V.f,W=w("symbols"),q=w("op-symbols"),ne=w("string-to-symbol-registry"),_=w("symbol-to-string-registry"),ee=w("wks"),Q=o.QObject,fe=!Q||!Q[Je]||!Q[Je].findChild,le=l&&f(function(){return E(I({},"a",{get:function(){return I(this,"a",{value:7}).a}})).a!=7})?function(ge,te,oe){var ae=x(Ve,te);ae&&delete Ve[te],I(ge,te,oe),ae&&ge!==Ve&&I(Ve,te,ae)}:I,pe=function(ge,te){var oe=W[ge]=E(ze[Je]);return ft(oe,{type:Re,tag:ge,description:te}),l||(oe.description=te),oe},y=u?function(ge){return typeof ge=="symbol"}:function(ge){return Object(ge)instanceof ze},h=function(te,oe,ae){te===Ve&&h(q,oe,ae),b(te);var we=g(oe,!0);return b(ae),p(W,we)?(ae.enumerable?(p(te,Se)&&te[Se][we]&&(te[Se][we]=!1),ae=E(ae,{enumerable:O(0,!1)})):(p(te,Se)||I(te,Se,O(1,{})),te[Se][we]=!0),le(te,we,ae)):I(te,we,ae)},U=function(te,oe){b(te);var ae=S(oe),we=$(ae).concat(Fe(ae));return ve(we,function(Pe){(!l||Z.call(ae,Pe))&&h(te,Pe,ae[Pe])}),te},Y=function(te,oe){return oe===void 0?E(te):U(E(te),oe)},Z=function(te){var oe=g(te,!0),ae=X.call(this,oe);return this===Ve&&p(W,oe)&&!p(q,oe)?!1:ae||!p(this,oe)||!p(W,oe)||p(this,Se)&&this[Se][oe]?ae:!0},me=function(te,oe){var ae=S(te),we=g(oe,!0);if(!(ae===Ve&&p(W,we)&&!p(q,we))){var Pe=x(ae,we);return Pe&&p(W,we)&&!(p(ae,Se)&&ae[Se][we])&&(Pe.enumerable=!0),Pe}},Oe=function(te){var oe=k(S(te)),ae=[];return ve(oe,function(we){!p(W,we)&&!p(L,we)&&ae.push(we)}),ae},Fe=function(te){var oe=te===Ve,ae=k(oe?q:S(te)),we=[];return ve(ae,function(Pe){p(W,Pe)&&(!oe||p(Ve,Pe))&&we.push(W[Pe])}),we};if(c||(ze=function(){if(this instanceof ze)throw TypeError("Symbol is not a constructor");var te=!arguments.length||arguments[0]===void 0?void 0:String(arguments[0]),oe=z(te),ae=function(we){this===Ve&&ae.call(q,we),p(this,Se)&&p(this[Se],oe)&&(this[Se][oe]=!1),le(this,oe,O(1,we))};return l&&fe&&le(Ve,oe,{configurable:!0,set:ae}),pe(oe,te)},C(ze[Je],"toString",function(){return kt(this).tag}),C(ze,"withoutSetter",function(ge){return pe(z(ge),ge)}),V.f=Z,j.f=h,N.f=me,R.f=T.f=Oe,P.f=Fe,K.f=function(ge){return pe(B(ge),ge)},l&&(I(ze[Je],"description",{configurable:!0,get:function(){return kt(this).description}}),a||C(Ve,"propertyIsEnumerable",Z,{unsafe:!0}))),i({global:!0,wrap:!0,forced:!c,sham:!c},{Symbol:ze}),ve($(ee),function(ge){G(ge)}),i({target:Re,stat:!0,forced:!c},{for:function(ge){var te=String(ge);if(p(ne,te))return ne[te];var oe=ze(te);return ne[te]=oe,_[oe]=te,oe},keyFor:function(te){if(!y(te))throw TypeError(te+" is not a symbol");if(p(_,te))return _[te]},useSetter:function(){fe=!0},useSimple:function(){fe=!1}}),i({target:"Object",stat:!0,forced:!c,sham:!l},{create:Y,defineProperty:h,defineProperties:U,getOwnPropertyDescriptor:me}),i({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:Oe,getOwnPropertySymbols:Fe}),i({target:"Object",stat:!0,forced:f(function(){P.f(1)})},{getOwnPropertySymbols:function(te){return P.f(v(te))}}),vt){var Le=!c||f(function(){var ge=ze();return vt([ge])!="[null]"||vt({a:ge})!="{}"||vt(Object(ge))!="{}"});i({target:"JSON",stat:!0,forced:Le},{stringify:function(te,oe,ae){for(var we=[te],Pe=1,yt;arguments.length>Pe;)we.push(arguments[Pe++]);if(yt=oe,!(!m(oe)&&te===void 0||y(te)))return d(oe)||(oe=function(qr,bt){if(typeof yt=="function"&&(bt=yt.call(this,qr,bt)),!y(bt))return bt}),we[1]=oe,vt.apply(null,we)}})}ze[Je][Qe]||F(ze[Je],Qe,ze[Je].valueOf),de(ze,Re),L[Se]=!0},a630:function(t,n,r){var i=r("23e7"),o=r("4df4"),s=r("1c7e"),a=!s(function(l){Array.from(l)});i({target:"Array",stat:!0,forced:a},{from:o})},a640:function(t,n,r){var i=r("d039");t.exports=function(o,s){var a=[][o];return!!a&&i(function(){a.call(null,s||function(){throw 1},1)})}},a691:function(t,n){var r=Math.ceil,i=Math.floor;t.exports=function(o){return isNaN(o=+o)?0:(o>0?i:r)(o)}},a9e3:function(t,n,r){var i=r("83ab"),o=r("da84"),s=r("94ca"),a=r("6eeb"),l=r("5135"),c=r("c6b6"),u=r("7156"),f=r("c04e"),p=r("d039"),d=r("7c73"),m=r("241c").f,b=r("06cf").f,v=r("9bf2").f,S=r("58a8").trim,g="Number",O=o[g],E=O.prototype,$=c(d(E))==g,R=function(V){var F=f(V,!1),C,w,M,L,z,B,K,G;if(typeof F=="string"&&F.length>2){if(F=S(F),C=F.charCodeAt(0),C===43||C===45){if(w=F.charCodeAt(2),w===88||w===120)return NaN}else if(C===48){switch(F.charCodeAt(1)){case 66:case 98:M=2,L=49;break;case 79:case 111:M=8,L=55;break;default:return+F}for(z=F.slice(2),B=z.length,K=0;K<B;K++)if(G=z.charCodeAt(K),G<48||G>L)return NaN;return parseInt(z,M)}}return+F};if(s(g,!O(" 0o1")||!O("0b1")||O("+0x1"))){for(var T=function(F){var C=arguments.length<1?0:F,w=this;return w instanceof T&&($?p(function(){E.valueOf.call(w)}):c(w)!=g)?u(new O(R(C)),w,T):R(C)},P=i?m(O):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,fromString,range".split(","),N=0,j;P.length>N;N++)l(O,j=P[N])&&!l(T,j)&&v(T,j,b(O,j));T.prototype=E,E.constructor=T,a(o,g,T)}},ab13:function(t,n,r){var i=r("b622"),o=i("match");t.exports=function(s){var a=/./;try{"/./"[s](a)}catch(l){try{return a[o]=!1,"/./"[s](a)}catch(c){}}return!1}},ae93:function(t,n,r){var i=r("d039"),o=r("e163"),s=r("9112"),a=r("5135"),l=r("b622"),c=r("c430"),u=l("iterator"),f=!1,p=function(){return this},d,m,b;[].keys&&(b=[].keys(),"next"in b?(m=o(o(b)),m!==Object.prototype&&(d=m)):f=!0);var v=d==null||i(function(){var S={};return d[u].call(S)!==S});v&&(d={}),(!c||v)&&!a(d,u)&&s(d,u,p),t.exports={IteratorPrototype:d,BUGGY_SAFARI_ITERATORS:f}},b041:function(t,n,r){var i=r("00ee"),o=r("f5df");t.exports=i?{}.toString:function(){return"[object "+o(this)+"]"}},b0c0:function(t,n,r){var i=r("83ab"),o=r("9bf2").f,s=Function.prototype,a=s.toString,l=/^\s*function ([^ (]*)/,c="name";i&&!(c in s)&&o(s,c,{configurable:!0,get:function(){try{return a.call(this).match(l)[1]}catch(u){return""}}})},b622:function(t,n,r){var i=r("da84"),o=r("5692"),s=r("5135"),a=r("90e3"),l=r("4930"),c=r("fdbf"),u=o("wks"),f=i.Symbol,p=c?f:f&&f.withoutSetter||a;t.exports=function(d){return(!s(u,d)||!(l||typeof u[d]=="string"))&&(l&&s(f,d)?u[d]=f[d]:u[d]=p("Symbol."+d)),u[d]}},b64b:function(t,n,r){var i=r("23e7"),o=r("7b0b"),s=r("df75"),a=r("d039"),l=a(function(){s(1)});i({target:"Object",stat:!0,forced:l},{keys:function(u){return s(o(u))}})},b727:function(t,n,r){var i=r("0366"),o=r("44ad"),s=r("7b0b"),a=r("50c4"),l=r("65f0"),c=[].push,u=function(f){var p=f==1,d=f==2,m=f==3,b=f==4,v=f==6,S=f==7,g=f==5||v;return function(O,E,$,R){for(var T=s(O),P=o(T),N=i(E,$,3),j=a(P.length),V=0,F=R||l,C=p?F(O,j):d||S?F(O,0):void 0,w,M;j>V;V++)if((g||V in P)&&(w=P[V],M=N(w,V,T),f))if(p)C[V]=M;else if(M)switch(f){case 3:return!0;case 5:return w;case 6:return V;case 2:c.call(C,w)}else switch(f){case 4:return!1;case 7:c.call(C,w)}return v?-1:m||b?b:C}};t.exports={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6),filterOut:u(7)}},c04e:function(t,n,r){var i=r("861d");t.exports=function(o,s){if(!i(o))return o;var a,l;if(s&&typeof(a=o.toString)=="function"&&!i(l=a.call(o))||typeof(a=o.valueOf)=="function"&&!i(l=a.call(o))||!s&&typeof(a=o.toString)=="function"&&!i(l=a.call(o)))return l;throw TypeError("Can't convert object to primitive value")}},c14f:function(t,n,r){r("ce77")},c430:function(t,n){t.exports=!1},c6b6:function(t,n){var r={}.toString;t.exports=function(i){return r.call(i).slice(8,-1)}},c6cd:function(t,n,r){var i=r("da84"),o=r("ce4e"),s="__core-js_shared__",a=i[s]||o(s,{});t.exports=a},c740:function(t,n,r){var i=r("23e7"),o=r("b727").findIndex,s=r("44d2"),a="findIndex",l=!0;a in[]&&Array(1)[a](function(){l=!1}),i({target:"Array",proto:!0,forced:l},{findIndex:function(u){return o(this,u,arguments.length>1?arguments[1]:void 0)}}),s(a)},c8ba:function(t,n){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(i){typeof window=="object"&&(r=window)}t.exports=r},ca84:function(t,n,r){var i=r("5135"),o=r("fc6a"),s=r("4d64").indexOf,a=r("d012");t.exports=function(l,c){var u=o(l),f=0,p=[],d;for(d in u)!i(a,d)&&i(u,d)&&p.push(d);for(;c.length>f;)i(u,d=c[f++])&&(~s(p,d)||p.push(d));return p}},caad:function(t,n,r){var i=r("23e7"),o=r("4d64").includes,s=r("44d2");i({target:"Array",proto:!0},{includes:function(l){return o(this,l,arguments.length>1?arguments[1]:void 0)}}),s("includes")},cc12:function(t,n,r){var i=r("da84"),o=r("861d"),s=i.document,a=o(s)&&o(s.createElement);t.exports=function(l){return a?s.createElement(l):{}}},ce4e:function(t,n,r){var i=r("da84"),o=r("9112");t.exports=function(s,a){try{o(i,s,a)}catch(l){i[s]=a}return a}},ce77:function(t,n,r){},d012:function(t,n){t.exports={}},d039:function(t,n){t.exports=function(r){try{return!!r()}catch(i){return!0}}},d066:function(t,n,r){var i=r("428f"),o=r("da84"),s=function(a){return typeof a=="function"?a:void 0};t.exports=function(a,l){return arguments.length<2?s(i[a])||s(o[a]):i[a]&&i[a][l]||o[a]&&o[a][l]}},d1e7:function(t,n,r){var i={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,s=o&&!i.call({1:2},1);n.f=s?function(l){var c=o(this,l);return!!c&&c.enumerable}:i},d28b:function(t,n,r){var i=r("746f");i("iterator")},d2bb:function(t,n,r){var i=r("825a"),o=r("3bbe");t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var s=!1,a={},l;try{l=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,l.call(a,[]),s=a instanceof Array}catch(c){}return function(u,f){return i(u),o(f),s?l.call(u,f):u.__proto__=f,u}}():void 0)},d3b7:function(t,n,r){var i=r("00ee"),o=r("6eeb"),s=r("b041");i||o(Object.prototype,"toString",s,{unsafe:!0})},d44e:function(t,n,r){var i=r("9bf2").f,o=r("5135"),s=r("b622"),a=s("toStringTag");t.exports=function(l,c,u){l&&!o(l=u?l:l.prototype,a)&&i(l,a,{configurable:!0,value:c})}},d81d:function(t,n,r){var i=r("23e7"),o=r("b727").map,s=r("1dde"),a=s("map");i({target:"Array",proto:!0,forced:!a},{map:function(c){return o(this,c,arguments.length>1?arguments[1]:void 0)}})},da84:function(t,n,r){(function(i){var o=function(s){return s&&s.Math==Math&&s};t.exports=o(typeof globalThis=="object"&&globalThis)||o(typeof window=="object"&&window)||o(typeof self=="object"&&self)||o(typeof i=="object"&&i)||function(){return this}()||Function("return this")()}).call(this,r("c8ba"))},dbb4:function(t,n,r){var i=r("23e7"),o=r("83ab"),s=r("56ef"),a=r("fc6a"),l=r("06cf"),c=r("8418");i({target:"Object",stat:!0,sham:!o},{getOwnPropertyDescriptors:function(f){for(var p=a(f),d=l.f,m=s(p),b={},v=0,S,g;m.length>v;)g=d(p,S=m[v++]),g!==void 0&&c(b,S,g);return b}})},ddb0:function(t,n,r){var i=r("da84"),o=r("fdbc"),s=r("e260"),a=r("9112"),l=r("b622"),c=l("iterator"),u=l("toStringTag"),f=s.values;for(var p in o){var d=i[p],m=d&&d.prototype;if(m){if(m[c]!==f)try{a(m,c,f)}catch(v){m[c]=f}if(m[u]||a(m,u,p),o[p]){for(var b in s)if(m[b]!==s[b])try{a(m,b,s[b])}catch(v){m[b]=s[b]}}}}},df75:function(t,n,r){var i=r("ca84"),o=r("7839");t.exports=Object.keys||function(a){return i(a,o)}},e01a:function(t,n,r){var i=r("23e7"),o=r("83ab"),s=r("da84"),a=r("5135"),l=r("861d"),c=r("9bf2").f,u=r("e893"),f=s.Symbol;if(o&&typeof f=="function"&&(!("description"in f.prototype)||f().description!==void 0)){var p={},d=function(){var O=arguments.length<1||arguments[0]===void 0?void 0:String(arguments[0]),E=this instanceof d?new f(O):O===void 0?f():f(O);return O===""&&(p[E]=!0),E};u(d,f);var m=d.prototype=f.prototype;m.constructor=d;var b=m.toString,v=String(f("test"))=="Symbol(test)",S=/^Symbol\((.*)\)[^)]+$/;c(m,"description",{configurable:!0,get:function(){var O=l(this)?this.valueOf():this,E=b.call(O);if(a(p,O))return"";var $=v?E.slice(7,-1):E.replace(S,"$1");return $===""?void 0:$}}),i({global:!0,forced:!0},{Symbol:d})}},e163:function(t,n,r){var i=r("5135"),o=r("7b0b"),s=r("f772"),a=r("e177"),l=s("IE_PROTO"),c=Object.prototype;t.exports=a?Object.getPrototypeOf:function(u){return u=o(u),i(u,l)?u[l]:typeof u.constructor=="function"&&u instanceof u.constructor?u.constructor.prototype:u instanceof Object?c:null}},e177:function(t,n,r){var i=r("d039");t.exports=!i(function(){function o(){}return o.prototype.constructor=null,Object.getPrototypeOf(new o)!==o.prototype})},e260:function(t,n,r){var i=r("fc6a"),o=r("44d2"),s=r("3f8c"),a=r("69f3"),l=r("7dd0"),c="Array Iterator",u=a.set,f=a.getterFor(c);t.exports=l(Array,"Array",function(p,d){u(this,{type:c,target:i(p),index:0,kind:d})},function(){var p=f(this),d=p.target,m=p.kind,b=p.index++;return!d||b>=d.length?(p.target=void 0,{value:void 0,done:!0}):m=="keys"?{value:b,done:!1}:m=="values"?{value:d[b],done:!1}:{value:[b,d[b]],done:!1}},"values"),s.Arguments=s.Array,o("keys"),o("values"),o("entries")},e439:function(t,n,r){var i=r("23e7"),o=r("d039"),s=r("fc6a"),a=r("06cf").f,l=r("83ab"),c=o(function(){a(1)}),u=!l||c;i({target:"Object",stat:!0,forced:u,sham:!l},{getOwnPropertyDescriptor:function(p,d){return a(s(p),d)}})},e538:function(t,n,r){var i=r("b622");n.f=i},e893:function(t,n,r){var i=r("5135"),o=r("56ef"),s=r("06cf"),a=r("9bf2");t.exports=function(l,c){for(var u=o(c),f=a.f,p=s.f,d=0;d<u.length;d++){var m=u[d];i(l,m)||f(l,m,p(c,m))}}},e8b5:function(t,n,r){var i=r("c6b6");t.exports=Array.isArray||function(s){return i(s)=="Array"}},e95a:function(t,n,r){var i=r("b622"),o=r("3f8c"),s=i("iterator"),a=Array.prototype;t.exports=function(l){return l!==void 0&&(o.Array===l||a[s]===l)}},f5df:function(t,n,r){var i=r("00ee"),o=r("c6b6"),s=r("b622"),a=s("toStringTag"),l=o(function(){return arguments}())=="Arguments",c=function(u,f){try{return u[f]}catch(p){}};t.exports=i?o:function(u){var f,p,d;return u===void 0?"Undefined":u===null?"Null":typeof(p=c(f=Object(u),a))=="string"?p:l?o(f):(d=o(f))=="Object"&&typeof f.callee=="function"?"Arguments":d}},f772:function(t,n,r){var i=r("5692"),o=r("90e3"),s=i("keys");t.exports=function(a){return s[a]||(s[a]=o(a))}},fae3:function(t,n,r){if(r.r(n),r.d(n,"Splitpanes",function(){return N}),r.d(n,"Pane",function(){return F}),typeof window!="undefined"){var i=window.document.currentScript;{var o=r("8875");i=o(),"currentScript"in document||Object.defineProperty(document,"currentScript",{get:o})}var s=i&&i.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);s&&(r.p=s[1])}r("b64b"),r("a4d3"),r("4de4"),r("e439"),r("159b"),r("dbb4");function a(C,w,M){return w in C?Object.defineProperty(C,w,{value:M,enumerable:!0,configurable:!0,writable:!0}):C[w]=M,C}function l(C,w){var M=Object.keys(C);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(C);w&&(L=L.filter(function(z){return Object.getOwnPropertyDescriptor(C,z).enumerable})),M.push.apply(M,L)}return M}function c(C){for(var w=1;w<arguments.length;w++){var M=arguments[w]!=null?arguments[w]:{};w%2?l(Object(M),!0).forEach(function(L){a(C,L,M[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(C,Object.getOwnPropertyDescriptors(M)):l(Object(M)).forEach(function(L){Object.defineProperty(C,L,Object.getOwnPropertyDescriptor(M,L))})}return C}function u(C){if(Array.isArray(C))return C}r("e01a"),r("d3b7"),r("d28b"),r("e260"),r("3ca3"),r("ddb0");function f(C,w){var M=C==null?null:typeof Symbol!="undefined"&&C[Symbol.iterator]||C["@@iterator"];if(M!=null){var L=[],z=!0,B=!1,K,G;try{for(M=M.call(C);!(z=(K=M.next()).done)&&(L.push(K.value),!(w&&L.length===w));z=!0);}catch(de){B=!0,G=de}finally{try{!z&&M.return!=null&&M.return()}finally{if(B)throw G}}return L}}r("fb6a"),r("b0c0"),r("a630");function p(C,w){(w==null||w>C.length)&&(w=C.length);for(var M=0,L=new Array(w);M<w;M++)L[M]=C[M];return L}function d(C,w){if(!!C){if(typeof C=="string")return p(C,w);var M=Object.prototype.toString.call(C).slice(8,-1);if(M==="Object"&&C.constructor&&(M=C.constructor.name),M==="Map"||M==="Set")return Array.from(C);if(M==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(M))return p(C,w)}}function m(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
13 |
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function b(C,w){return u(C)||f(C,w)||d(C,w)||m()}function v(C,w){if(C==null)return{};var M={},L=Object.keys(C),z,B;for(B=0;B<L.length;B++)z=L[B],!(w.indexOf(z)>=0)&&(M[z]=C[z]);return M}function S(C,w){if(C==null)return{};var M=v(C,w),L,z;if(Object.getOwnPropertySymbols){var B=Object.getOwnPropertySymbols(C);for(z=0;z<B.length;z++)L=B[z],!(w.indexOf(L)>=0)&&(!Object.prototype.propertyIsEnumerable.call(C,L)||(M[L]=C[L]))}return M}function g(C){if(Array.isArray(C))return p(C)}function O(C){if(typeof Symbol!="undefined"&&C[Symbol.iterator]!=null||C["@@iterator"]!=null)return Array.from(C)}function E(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
14 |
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $(C){return g(C)||O(C)||d(C)||E()}r("d81d"),r("7db0"),r("caad"),r("2532"),r("4fad"),r("a434"),r("c740");var R=r("8bbf"),T=["target"],P={name:"splitpanes",emits:["ready","resize","resized","pane-click","pane-maximize","pane-add","pane-remove","splitter-click"],props:{horizontal:{type:Boolean},pushOtherPanes:{type:Boolean,default:!0},dblClickSplitter:{type:Boolean,default:!0},rtl:{type:Boolean,default:!1},firstSplitter:{type:Boolean}},provide:function(){return{requestUpdate:this.requestUpdate,onPaneAdd:this.onPaneAdd,onPaneRemove:this.onPaneRemove,onPaneClick:this.onPaneClick}},data:function(){return{container:null,ready:!1,panes:[],touch:{mouseDown:!1,dragging:!1,activeSplitter:null},splitterTaps:{splitter:null,timeoutId:null}}},computed:{panesCount:function(){return this.panes.length},indexedPanes:function(){return this.panes.reduce(function(w,M){return(w[M.id]=M)&&w},{})}},methods:{updatePaneComponents:function(){var w=this;this.panes.forEach(function(M){M.update&&M.update(a({},w.horizontal?"height":"width","".concat(w.indexedPanes[M.id].size,"%")))})},bindEvents:function(){document.addEventListener("mousemove",this.onMouseMove,{passive:!1}),document.addEventListener("mouseup",this.onMouseUp),"ontouchstart"in window&&(document.addEventListener("touchmove",this.onMouseMove,{passive:!1}),document.addEventListener("touchend",this.onMouseUp))},unbindEvents:function(){document.removeEventListener("mousemove",this.onMouseMove,{passive:!1}),document.removeEventListener("mouseup",this.onMouseUp),"ontouchstart"in window&&(document.removeEventListener("touchmove",this.onMouseMove,{passive:!1}),document.removeEventListener("touchend",this.onMouseUp))},onMouseDown:function(w,M){this.bindEvents(),this.touch.mouseDown=!0,this.touch.activeSplitter=M},onMouseMove:function(w){this.touch.mouseDown&&(w.preventDefault(),this.touch.dragging=!0,this.calculatePanesSize(this.getCurrentMouseDrag(w)),this.$emit("resize",this.panes.map(function(M){return{min:M.min,max:M.max,size:M.size}})))},onMouseUp:function(){var w=this;this.touch.dragging&&this.$emit("resized",this.panes.map(function(M){return{min:M.min,max:M.max,size:M.size}})),this.touch.mouseDown=!1,setTimeout(function(){w.touch.dragging=!1,w.unbindEvents()},100)},onSplitterClick:function(w,M){var L=this;"ontouchstart"in window&&(w.preventDefault(),this.dblClickSplitter&&(this.splitterTaps.splitter===M?(clearTimeout(this.splitterTaps.timeoutId),this.splitterTaps.timeoutId=null,this.onSplitterDblClick(w,M),this.splitterTaps.splitter=null):(this.splitterTaps.splitter=M,this.splitterTaps.timeoutId=setTimeout(function(){L.splitterTaps.splitter=null},500)))),this.touch.dragging||this.$emit("splitter-click",this.panes[M])},onSplitterDblClick:function(w,M){var L=0;this.panes=this.panes.map(function(z,B){return z.size=B===M?z.max:z.min,B!==M&&(L+=z.min),z}),this.panes[M].size-=L,this.$emit("pane-maximize",this.panes[M])},onPaneClick:function(w,M){this.$emit("pane-click",this.indexedPanes[M])},getCurrentMouseDrag:function(w){var M=this.container.getBoundingClientRect(),L="ontouchstart"in window&&w.touches?w.touches[0]:w,z=L.clientX,B=L.clientY;return{x:z-M.left,y:B-M.top}},getCurrentDragPercentage:function(w){w=w[this.horizontal?"y":"x"];var M=this.container[this.horizontal?"clientHeight":"clientWidth"];return this.rtl&&!this.horizontal&&(w=M-w),w*100/M},calculatePanesSize:function(w){var M=this.touch.activeSplitter,L={prevPanesSize:this.sumPrevPanesSize(M),nextPanesSize:this.sumNextPanesSize(M),prevReachedMinPanes:0,nextReachedMinPanes:0},z=0+(this.pushOtherPanes?0:L.prevPanesSize),B=100-(this.pushOtherPanes?0:L.nextPanesSize),K=Math.max(Math.min(this.getCurrentDragPercentage(w),B),z),G=[M,M+1],de=this.panes[G[0]]||null,ce=this.panes[G[1]]||null,ve=de.max<100&&K>=de.max+L.prevPanesSize,Se=ce.max<100&&K<=100-(ce.max+this.sumNextPanesSize(M+1));if(ve||Se){ve?(de.size=de.max,ce.size=Math.max(100-de.max-L.prevPanesSize-L.nextPanesSize,0)):(de.size=Math.max(100-ce.max-L.prevPanesSize-this.sumNextPanesSize(M+1),0),ce.size=ce.max);return}if(this.pushOtherPanes){var Re=this.doPushOtherPanes(L,K);if(!Re)return;L=Re.sums,G=Re.panesToResize,de=this.panes[G[0]]||null,ce=this.panes[G[1]]||null}de!==null&&(de.size=Math.min(Math.max(K-L.prevPanesSize-L.prevReachedMinPanes,de.min),de.max)),ce!==null&&(ce.size=Math.min(Math.max(100-K-L.nextPanesSize-L.nextReachedMinPanes,ce.min),ce.max))},doPushOtherPanes:function(w,M){var L=this,z=this.touch.activeSplitter,B=[z,z+1];return M<w.prevPanesSize+this.panes[B[0]].min&&(B[0]=this.findPrevExpandedPane(z).index,w.prevReachedMinPanes=0,B[0]<z&&this.panes.forEach(function(K,G){G>B[0]&&G<=z&&(K.size=K.min,w.prevReachedMinPanes+=K.min)}),w.prevPanesSize=this.sumPrevPanesSize(B[0]),B[0]===void 0)?(w.prevReachedMinPanes=0,this.panes[0].size=this.panes[0].min,this.panes.forEach(function(K,G){G>0&&G<=z&&(K.size=K.min,w.prevReachedMinPanes+=K.min)}),this.panes[B[1]].size=100-w.prevReachedMinPanes-this.panes[0].min-w.prevPanesSize-w.nextPanesSize,null):M>100-w.nextPanesSize-this.panes[B[1]].min&&(B[1]=this.findNextExpandedPane(z).index,w.nextReachedMinPanes=0,B[1]>z+1&&this.panes.forEach(function(K,G){G>z&&G<B[1]&&(K.size=K.min,w.nextReachedMinPanes+=K.min)}),w.nextPanesSize=this.sumNextPanesSize(B[1]-1),B[1]===void 0)?(w.nextReachedMinPanes=0,this.panes[this.panesCount-1].size=this.panes[this.panesCount-1].min,this.panes.forEach(function(K,G){G<L.panesCount-1&&G>=z+1&&(K.size=K.min,w.nextReachedMinPanes+=K.min)}),this.panes[B[0]].size=100-w.prevPanesSize-w.nextReachedMinPanes-this.panes[this.panesCount-1].min-w.nextPanesSize,null):{sums:w,panesToResize:B}},sumPrevPanesSize:function(w){return this.panes.reduce(function(M,L,z){return M+(z<w?L.size:0)},0)},sumNextPanesSize:function(w){return this.panes.reduce(function(M,L,z){return M+(z>w+1?L.size:0)},0)},findPrevExpandedPane:function(w){var M=$(this.panes).reverse().find(function(L){return L.index<w&&L.size>L.min});return M||{}},findNextExpandedPane:function(w){var M=this.panes.find(function(L){return L.index>w+1&&L.size>L.min});return M||{}},checkSplitpanesNodes:function(){var w=Array.from(this.container.children);w.forEach(function(M){var L=M.classList.contains("splitpanes__pane"),z=M.classList.contains("splitpanes__splitter");if(!L&&!z){M.parentNode.removeChild(M),console.warn("Splitpanes: Only <pane> elements are allowed at the root of <splitpanes>. One of your DOM nodes was removed.");return}})},addSplitter:function(w,M){var L=this,z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,B=w-1,K=document.createElement("div");K.classList.add("splitpanes__splitter"),z||(K.onmousedown=function(G){return L.onMouseDown(G,B)},typeof window!="undefined"&&"ontouchstart"in window&&(K.ontouchstart=function(G){return L.onMouseDown(G,B)}),K.onclick=function(G){return L.onSplitterClick(G,B+1)}),this.dblClickSplitter&&(K.ondblclick=function(G){return L.onSplitterDblClick(G,B+1)}),M.parentNode.insertBefore(K,M)},removeSplitter:function(w){w.onmousedown=void 0,w.onclick=void 0,w.ondblclick=void 0,w.parentNode.removeChild(w)},redoSplitters:function(){var w=this,M=Array.from(this.container.children);M.forEach(function(z){z.className.includes("splitpanes__splitter")&&w.removeSplitter(z)});var L=0;M.forEach(function(z){z.className.includes("splitpanes__pane")&&(!L&&w.firstSplitter?w.addSplitter(L,z,!0):L&&w.addSplitter(L,z),L++)})},requestUpdate:function(w){var M=w.target,L=S(w,T),z=this.indexedPanes[M._.uid];Object.entries(L).forEach(function(B){var K=b(B,2),G=K[0],de=K[1];return z[G]=de})},onPaneAdd:function(w){var M=this,L=-1;Array.from(w.$el.parentNode.children).some(function(K){return K.className.includes("splitpanes__pane")&&L++,K===w.$el});var z=parseFloat(w.minSize),B=parseFloat(w.maxSize);this.panes.splice(L,0,{id:w._.uid,index:L,min:isNaN(z)?0:z,max:isNaN(B)?100:B,size:w.size===null?null:parseFloat(w.size),givenSize:w.size,update:w.update}),this.panes.forEach(function(K,G){return K.index=G}),this.ready&&this.$nextTick(function(){M.redoSplitters(),M.resetPaneSizes({addedPane:M.panes[L]}),M.$emit("pane-add",{index:L,panes:M.panes.map(function(K){return{min:K.min,max:K.max,size:K.size}})})})},onPaneRemove:function(w){var M=this,L=this.panes.findIndex(function(B){return B.id===w._.uid}),z=this.panes.splice(L,1)[0];this.panes.forEach(function(B,K){return B.index=K}),this.$nextTick(function(){M.redoSplitters(),M.resetPaneSizes({removedPane:c(c({},z),{},{index:L})}),M.$emit("pane-remove",{removed:z,panes:M.panes.map(function(B){return{min:B.min,max:B.max,size:B.size}})})})},resetPaneSizes:function(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};!w.addedPane&&!w.removedPane?this.initialPanesSizing():this.panes.some(function(M){return M.givenSize!==null||M.min||M.max<100})?this.equalizeAfterAddOrRemove(w):this.equalize(),this.ready&&this.$emit("resized",this.panes.map(function(M){return{min:M.min,max:M.max,size:M.size}}))},equalize:function(){var w=100/this.panesCount,M=0,L=[],z=[];this.panes.forEach(function(B){B.size=Math.max(Math.min(w,B.max),B.min),M-=B.size,B.size>=B.max&&L.push(B.id),B.size<=B.min&&z.push(B.id)}),M>.1&&this.readjustSizes(M,L,z)},initialPanesSizing:function(){var w=this;100/this.panesCount;var M=100,L=[],z=[],B=0;this.panes.forEach(function(G){M-=G.size,G.size!==null&&B++,G.size>=G.max&&L.push(G.id),G.size<=G.min&&z.push(G.id)});var K=100;M>.1&&(this.panes.forEach(function(G){G.size===null&&(G.size=Math.max(Math.min(M/(w.panesCount-B),G.max),G.min)),K-=G.size}),K>.1&&this.readjustSizes(M,L,z))},equalizeAfterAddOrRemove:function(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},M=w.addedPane;w.removedPane;var L=100/this.panesCount,z=0,B=[],K=[];M&&M.givenSize!==null&&(L=(100-M.givenSize)/(this.panesCount-1)),this.panes.forEach(function(G){z-=G.size,G.size>=G.max&&B.push(G.id),G.size<=G.min&&K.push(G.id)}),!(Math.abs(z)<.1)&&(this.panes.forEach(function(G){M&&M.givenSize!==null&&M.id===G.id||(G.size=Math.max(Math.min(L,G.max),G.min)),z-=G.size,G.size>=G.max&&B.push(G.id),G.size<=G.min&&K.push(G.id)}),z>.1&&this.readjustSizes(z,B,K))},readjustSizes:function(w,M,L){var z=this,B;w>0?B=w/(this.panesCount-M.length):B=w/(this.panesCount-L.length),this.panes.forEach(function(K,G){if(w>0&&!M.includes(K.id)){var de=Math.max(Math.min(K.size+B,K.max),K.min),ce=de-K.size;w-=ce,K.size=de}else if(!L.includes(K.id)){var ve=Math.max(Math.min(K.size+B,K.max),K.min),Se=ve-K.size;w-=Se,K.size=ve}K.update(a({},z.horizontal?"height":"width","".concat(z.indexedPanes[K.id].size,"%")))}),Math.abs(w)>.1&&this.$nextTick(function(){z.ready&&console.warn("Splitpanes: Could not resize panes correctly due to their constraints.")})}},watch:{panes:{deep:!0,immediate:!1,handler:function(){this.updatePaneComponents()}},horizontal:function(){this.updatePaneComponents()},firstSplitter:function(){this.redoSplitters()},dblClickSplitter:function(w){var M=this,L=$(this.container.querySelectorAll(".splitpanes__splitter"));L.forEach(function(z,B){z.ondblclick=w?function(K){return M.onSplitterDblClick(K,B)}:void 0})}},beforeUnmount:function(){this.ready=!1},mounted:function(){this.container=this.$refs.container,this.checkSplitpanesNodes(),this.redoSplitters(),this.resetPaneSizes(),this.$emit("ready"),this.ready=!0},render:function(){return Object(R.h)("div",{ref:"container",class:["splitpanes","splitpanes--".concat(this.horizontal?"horizontal":"vertical"),{"splitpanes--dragging":this.touch.dragging}]},this.$slots.default())}};r("c14f");var N=P;function j(C,w,M,L,z,B){return Object(R.openBlock)(),Object(R.createBlock)("div",{class:"splitpanes__pane",onClick:w[1]||(w[1]=function(K){return B.onPaneClick(K,C._.uid)}),style:C.style},[Object(R.renderSlot)(C.$slots,"default")],4)}r("a9e3");var V={name:"pane",inject:["requestUpdate","onPaneAdd","onPaneRemove","onPaneClick"],props:{size:{type:[Number,String],default:null},minSize:{type:[Number,String],default:0},maxSize:{type:[Number,String],default:100}},data:function(){return{style:{}}},mounted:function(){this.onPaneAdd(this)},beforeUnmount:function(){this.onPaneRemove(this)},methods:{update:function(w){this.style=w}},computed:{sizeNumber:function(){return this.size||this.size===0?parseFloat(this.size):null},minSizeNumber:function(){return parseFloat(this.minSize)},maxSizeNumber:function(){return parseFloat(this.maxSize)}},watch:{sizeNumber:function(w){this.requestUpdate({target:this,size:w})},minSizeNumber:function(w){this.requestUpdate({target:this,min:w})},maxSizeNumber:function(w){this.requestUpdate({target:this,max:w})}}};V.render=j;var F=V},fb6a:function(t,n,r){var i=r("23e7"),o=r("861d"),s=r("e8b5"),a=r("23cb"),l=r("50c4"),c=r("fc6a"),u=r("8418"),f=r("b622"),p=r("1dde"),d=p("slice"),m=f("species"),b=[].slice,v=Math.max;i({target:"Array",proto:!0,forced:!d},{slice:function(g,O){var E=c(this),$=l(E.length),R=a(g,$),T=a(O===void 0?$:O,$),P,N,j;if(s(E)&&(P=E.constructor,typeof P=="function"&&(P===Array||s(P.prototype))?P=void 0:o(P)&&(P=P[m],P===null&&(P=void 0)),P===Array||P===void 0))return b.call(E,R,T);for(N=new(P===void 0?Array:P)(v(T-R,0)),j=0;R<T;R++,j++)R in E&&u(N,j,E[R]);return N.length=j,N}})},fc6a:function(t,n,r){var i=r("44ad"),o=r("1d80");t.exports=function(s){return i(o(s))}},fdbc:function(t,n){t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},fdbf:function(t,n,r){var i=r("4930");t.exports=i&&!Symbol.sham&&typeof Symbol.iterator=="symbol"}})})(fy);var dd=(e,t)=>{for(const[n,r]of t)e[n]=r;return e};function Gl(e){return e===0?!1:Array.isArray(e)&&e.length===0?!0:!e}function qb(e){return(...t)=>!e(...t)}function _b(e,t){return e===void 0&&(e="undefined"),e===null&&(e="null"),e===!1&&(e="false"),e.toString().toLowerCase().indexOf(t.trim())!==-1}function hd(e,t,n,r){return t?e.filter(i=>_b(r(i,n),t)).sort((i,o)=>r(i,n).length-r(o,n).length):e}function e0(e){return e.filter(t=>!t.$isLabel)}function Zl(e,t){return n=>n.reduce((r,i)=>i[e]&&i[e].length?(r.push({$groupLabel:i[t],$isLabel:!0}),r.concat(i[e])):r,[])}function t0(e,t,n,r,i){return o=>o.map(s=>{if(!s[n])return console.warn("Options passed to vue-multiselect do not contain groups, despite the config."),[];const a=hd(s[n],e,t,i);return a.length?{[r]:s[r],[n]:a}:[]})}const md=(...e)=>t=>e.reduce((n,r)=>r(n),t);var n0={data(){return{search:"",isOpen:!1,preferredOpenDirection:"below",optimizedHeight:this.maxHeight}},props:{internalSearch:{type:Boolean,default:!0},options:{type:Array,required:!0},multiple:{type:Boolean,default:!1},trackBy:{type:String},label:{type:String},searchable:{type:Boolean,default:!0},clearOnSelect:{type:Boolean,default:!0},hideSelected:{type:Boolean,default:!1},placeholder:{type:String,default:"Select option"},allowEmpty:{type:Boolean,default:!0},resetAfter:{type:Boolean,default:!1},closeOnSelect:{type:Boolean,default:!0},customLabel:{type:Function,default(e,t){return Gl(e)?"":t?e[t]:e}},taggable:{type:Boolean,default:!1},tagPlaceholder:{type:String,default:"Press enter to create a tag"},tagPosition:{type:String,default:"top"},max:{type:[Number,Boolean],default:!1},id:{default:null},optionsLimit:{type:Number,default:1e3},groupValues:{type:String},groupLabel:{type:String},groupSelect:{type:Boolean,default:!1},blockKeys:{type:Array,default(){return[]}},preserveSearch:{type:Boolean,default:!1},preselectFirst:{type:Boolean,default:!1}},mounted(){!this.multiple&&this.max&&console.warn("[Vue-Multiselect warn]: Max prop should not be used when prop Multiple equals false."),this.preselectFirst&&!this.internalValue.length&&this.options.length&&this.select(this.filteredOptions[0])},computed:{internalValue(){return this.modelValue||this.modelValue===0?Array.isArray(this.modelValue)?this.modelValue:[this.modelValue]:[]},filteredOptions(){const e=this.search||"",t=e.toLowerCase().trim();let n=this.options.concat();return this.internalSearch?n=this.groupValues?this.filterAndFlat(n,t,this.label):hd(n,t,this.label,this.customLabel):n=this.groupValues?Zl(this.groupValues,this.groupLabel)(n):n,n=this.hideSelected?n.filter(qb(this.isSelected)):n,this.taggable&&t.length&&!this.isExistingOption(t)&&(this.tagPosition==="bottom"?n.push({isTag:!0,label:e}):n.unshift({isTag:!0,label:e})),n.slice(0,this.optionsLimit)},valueKeys(){return this.trackBy?this.internalValue.map(e=>e[this.trackBy]):this.internalValue},optionKeys(){return(this.groupValues?this.flatAndStrip(this.options):this.options).map(t=>this.customLabel(t,this.label).toString().toLowerCase())},currentOptionLabel(){return this.multiple?this.searchable?"":this.placeholder:this.internalValue.length?this.getOptionLabel(this.internalValue[0]):this.searchable?"":this.placeholder}},watch:{internalValue(){this.resetAfter&&this.internalValue.length&&(this.search="",this.$emit("update:modelValue",this.multiple?[]:null))},search(){this.$emit("search-change",this.search)}},emits:["open","search-change","close","select","update:modelValue","remove","tag"],methods:{getValue(){return this.multiple?this.internalValue:this.internalValue.length===0?null:this.internalValue[0]},filterAndFlat(e,t,n){return md(t0(t,n,this.groupValues,this.groupLabel,this.customLabel),Zl(this.groupValues,this.groupLabel))(e)},flatAndStrip(e){return md(Zl(this.groupValues,this.groupLabel),e0)(e)},updateSearch(e){this.search=e},isExistingOption(e){return this.options?this.optionKeys.indexOf(e)>-1:!1},isSelected(e){const t=this.trackBy?e[this.trackBy]:e;return this.valueKeys.indexOf(t)>-1},isOptionDisabled(e){return!!e.$isDisabled},getOptionLabel(e){if(Gl(e))return"";if(e.isTag)return e.label;if(e.$isLabel)return e.$groupLabel;const t=this.customLabel(e,this.label);return Gl(t)?"":t},select(e,t){if(e.$isLabel&&this.groupSelect){this.selectGroup(e);return}if(!(this.blockKeys.indexOf(t)!==-1||this.disabled||e.$isDisabled||e.$isLabel)&&!(this.max&&this.multiple&&this.internalValue.length===this.max)&&!(t==="Tab"&&!this.pointerDirty)){if(e.isTag)this.$emit("tag",e.label,this.id),this.search="",this.closeOnSelect&&!this.multiple&&this.deactivate();else{if(this.isSelected(e)){t!=="Tab"&&this.removeElement(e);return}this.$emit("select",e,this.id),this.multiple?this.$emit("update:modelValue",this.internalValue.concat([e])):this.$emit("update:modelValue",e),this.clearOnSelect&&(this.search="")}this.closeOnSelect&&this.deactivate()}},selectGroup(e){const t=this.options.find(n=>n[this.groupLabel]===e.$groupLabel);if(!!t){if(this.wholeGroupSelected(t)){this.$emit("remove",t[this.groupValues],this.id);const n=this.internalValue.filter(r=>t[this.groupValues].indexOf(r)===-1);this.$emit("update:modelValue",n)}else{const n=t[this.groupValues].filter(r=>!(this.isOptionDisabled(r)||this.isSelected(r)));this.$emit("select",n,this.id),this.$emit("update:modelValue",this.internalValue.concat(n))}this.closeOnSelect&&this.deactivate()}},wholeGroupSelected(e){return e[this.groupValues].every(t=>this.isSelected(t)||this.isOptionDisabled(t))},wholeGroupDisabled(e){return e[this.groupValues].every(this.isOptionDisabled)},removeElement(e,t=!0){if(this.disabled||e.$isDisabled)return;if(!this.allowEmpty&&this.internalValue.length<=1){this.deactivate();return}const n=typeof e=="object"?this.valueKeys.indexOf(e[this.trackBy]):this.valueKeys.indexOf(e);if(this.$emit("remove",e,this.id),this.multiple){const r=this.internalValue.slice(0,n).concat(this.internalValue.slice(n+1));this.$emit("update:modelValue",r)}else this.$emit("update:modelValue",null);this.closeOnSelect&&t&&this.deactivate()},removeLastElement(){this.blockKeys.indexOf("Delete")===-1&&this.search.length===0&&Array.isArray(this.internalValue)&&this.internalValue.length&&this.removeElement(this.internalValue[this.internalValue.length-1],!1)},activate(){this.isOpen||this.disabled||(this.adjustPosition(),this.groupValues&&this.pointer===0&&this.filteredOptions.length&&(this.pointer=1),this.isOpen=!0,this.searchable?(this.preserveSearch||(this.search=""),this.$nextTick(()=>this.$refs.search&&this.$refs.search.focus())):this.$el.focus(),this.$emit("open",this.id))},deactivate(){!this.isOpen||(this.isOpen=!1,this.searchable?this.$refs.search&&this.$refs.search.blur():this.$el.blur(),this.preserveSearch||(this.search=""),this.$emit("close",this.getValue(),this.id))},toggle(){this.isOpen?this.deactivate():this.activate()},adjustPosition(){if(typeof window=="undefined")return;const e=this.$el.getBoundingClientRect().top,t=window.innerHeight-this.$el.getBoundingClientRect().bottom;t>this.maxHeight||t>e||this.openDirection==="below"||this.openDirection==="bottom"?(this.preferredOpenDirection="below",this.optimizedHeight=Math.min(t-40,this.maxHeight)):(this.preferredOpenDirection="above",this.optimizedHeight=Math.min(e-40,this.maxHeight))}}},r0={data(){return{pointer:0,pointerDirty:!1}},props:{showPointer:{type:Boolean,default:!0},optionHeight:{type:Number,default:40}},computed:{pointerPosition(){return this.pointer*this.optionHeight},visibleElements(){return this.optimizedHeight/this.optionHeight}},watch:{filteredOptions(){this.pointerAdjust()},isOpen(){this.pointerDirty=!1},pointer(){this.$refs.search&&this.$refs.search.setAttribute("aria-activedescendant",this.id+"-"+this.pointer.toString())}},methods:{optionHighlight(e,t){return{"multiselect__option--highlight":e===this.pointer&&this.showPointer,"multiselect__option--selected":this.isSelected(t)}},groupHighlight(e,t){if(!this.groupSelect)return["multiselect__option--disabled",{"multiselect__option--group":t.$isLabel}];const n=this.options.find(r=>r[this.groupLabel]===t.$groupLabel);return n&&!this.wholeGroupDisabled(n)?["multiselect__option--group",{"multiselect__option--highlight":e===this.pointer&&this.showPointer},{"multiselect__option--group-selected":this.wholeGroupSelected(n)}]:"multiselect__option--disabled"},addPointerElement({key:e}="Enter"){this.filteredOptions.length>0&&this.select(this.filteredOptions[this.pointer],e),this.pointerReset()},pointerForward(){this.pointer<this.filteredOptions.length-1&&(this.pointer++,this.$refs.list.scrollTop<=this.pointerPosition-(this.visibleElements-1)*this.optionHeight&&(this.$refs.list.scrollTop=this.pointerPosition-(this.visibleElements-1)*this.optionHeight),this.filteredOptions[this.pointer]&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerForward()),this.pointerDirty=!0},pointerBackward(){this.pointer>0?(this.pointer--,this.$refs.list.scrollTop>=this.pointerPosition&&(this.$refs.list.scrollTop=this.pointerPosition),this.filteredOptions[this.pointer]&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerBackward()):this.filteredOptions[this.pointer]&&this.filteredOptions[0].$isLabel&&!this.groupSelect&&this.pointerForward(),this.pointerDirty=!0},pointerReset(){!this.closeOnSelect||(this.pointer=0,this.$refs.list&&(this.$refs.list.scrollTop=0))},pointerAdjust(){this.pointer>=this.filteredOptions.length-1&&(this.pointer=this.filteredOptions.length?this.filteredOptions.length-1:0),this.filteredOptions.length>0&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerForward()},pointerSet(e){this.pointer=e,this.pointerDirty=!0}}},i0={name:"vue-multiselect",mixins:[n0,r0],props:{name:{type:String,default:""},modelValue:{type:null,default(){return[]}},selectLabel:{type:String,default:"Press enter to select"},selectGroupLabel:{type:String,default:"Press enter to select group"},selectedLabel:{type:String,default:"Selected"},deselectLabel:{type:String,default:"Press enter to remove"},deselectGroupLabel:{type:String,default:"Press enter to deselect group"},showLabels:{type:Boolean,default:!0},limit:{type:Number,default:99999},maxHeight:{type:Number,default:300},limitText:{type:Function,default:e=>`and ${e} more`},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},openDirection:{type:String,default:""},showNoOptions:{type:Boolean,default:!0},showNoResults:{type:Boolean,default:!0},tabindex:{type:Number,default:0}},computed:{isSingleLabelVisible(){return(this.singleValue||this.singleValue===0)&&(!this.isOpen||!this.searchable)&&!this.visibleValues.length},isPlaceholderVisible(){return!this.internalValue.length&&(!this.searchable||!this.isOpen)},visibleValues(){return this.multiple?this.internalValue.slice(0,this.limit):[]},singleValue(){return this.internalValue[0]},deselectLabelText(){return this.showLabels?this.deselectLabel:""},deselectGroupLabelText(){return this.showLabels?this.deselectGroupLabel:""},selectLabelText(){return this.showLabels?this.selectLabel:""},selectGroupLabelText(){return this.showLabels?this.selectGroupLabel:""},selectedLabelText(){return this.showLabels?this.selectedLabel:""},inputStyle(){return this.searchable||this.multiple&&this.modelValue&&this.modelValue.length?this.isOpen?{width:"100%"}:{width:"0",position:"absolute",padding:"0"}:""},contentStyle(){return this.options.length?{display:"inline-block"}:{display:"block"}},isAbove(){return this.openDirection==="above"||this.openDirection==="top"?!0:this.openDirection==="below"||this.openDirection==="bottom"?!1:this.preferredOpenDirection==="above"},showSearchInput(){return this.searchable&&(this.hasSingleSelectedSlot&&(this.visibleSingleValue||this.visibleSingleValue===0)?this.isOpen:!0)}}};const o0={ref:"tags",class:"multiselect__tags"},s0={class:"multiselect__tags-wrap"},a0={class:"multiselect__spinner"},l0={key:0},c0={class:"multiselect__option"},u0={class:"multiselect__option"},f0=Nn("No elements found. Consider changing the search query."),p0={class:"multiselect__option"},d0=Nn("List is empty.");function h0(e,t,n,r,i,o){return Ie(),ke("div",{tabindex:e.searchable?-1:n.tabindex,class:[{"multiselect--active":e.isOpen,"multiselect--disabled":n.disabled,"multiselect--above":o.isAbove},"multiselect"],onFocus:t[14]||(t[14]=s=>e.activate()),onBlur:t[15]||(t[15]=s=>e.searchable?!1:e.deactivate()),onKeydown:[t[16]||(t[16]=Dt(Xe(s=>e.pointerForward(),["self","prevent"]),["down"])),t[17]||(t[17]=Dt(Xe(s=>e.pointerBackward(),["self","prevent"]),["up"]))],onKeypress:t[18]||(t[18]=Dt(Xe(s=>e.addPointerElement(s),["stop","self"]),["enter","tab"])),onKeyup:t[19]||(t[19]=Dt(s=>e.deactivate(),["esc"])),role:"combobox","aria-owns":"listbox-"+e.id},[qe(e.$slots,"caret",{toggle:e.toggle},()=>[he("div",{onMousedown:t[1]||(t[1]=Xe(s=>e.toggle(),["prevent","stop"])),class:"multiselect__select"},null,32)]),qe(e.$slots,"clear",{search:e.search}),he("div",o0,[qe(e.$slots,"selection",{search:e.search,remove:e.removeElement,values:o.visibleValues,isOpen:e.isOpen},()=>[xr(he("div",s0,[(Ie(!0),ke(Ye,null,ko(o.visibleValues,(s,a)=>qe(e.$slots,"tag",{option:s,search:e.search,remove:e.removeElement},()=>[(Ie(),ke("span",{class:"multiselect__tag",key:a},[he("span",{textContent:Jt(e.getOptionLabel(s))},null,8,["textContent"]),he("i",{tabindex:"1",onKeypress:Dt(Xe(l=>e.removeElement(s),["prevent"]),["enter"]),onMousedown:Xe(l=>e.removeElement(s),["prevent"]),class:"multiselect__tag-icon"},null,40,["onKeypress","onMousedown"])]))])),256))],512),[[sr,o.visibleValues.length>0]]),e.internalValue&&e.internalValue.length>n.limit?qe(e.$slots,"limit",{key:0},()=>[he("strong",{class:"multiselect__strong",textContent:Jt(n.limitText(e.internalValue.length-n.limit))},null,8,["textContent"])]):Lt("v-if",!0)]),he(Ni,{name:"multiselect__loading"},{default:qt(()=>[qe(e.$slots,"loading",{},()=>[xr(he("div",a0,null,512),[[sr,n.loading]])])]),_:3}),e.searchable?(Ie(),ke("input",{key:0,ref:"search",name:n.name,id:e.id,type:"text",autocomplete:"off",spellcheck:"false",placeholder:e.placeholder,style:o.inputStyle,value:e.search,disabled:n.disabled,tabindex:n.tabindex,onInput:t[2]||(t[2]=s=>e.updateSearch(s.target.value)),onFocus:t[3]||(t[3]=Xe(s=>e.activate(),["prevent"])),onBlur:t[4]||(t[4]=Xe(s=>e.deactivate(),["prevent"])),onKeyup:t[5]||(t[5]=Dt(s=>e.deactivate(),["esc"])),onKeydown:[t[6]||(t[6]=Dt(Xe(s=>e.pointerForward(),["prevent"]),["down"])),t[7]||(t[7]=Dt(Xe(s=>e.pointerBackward(),["prevent"]),["up"])),t[9]||(t[9]=Dt(Xe(s=>e.removeLastElement(),["stop"]),["delete"]))],onKeypress:t[8]||(t[8]=Dt(Xe(s=>e.addPointerElement(s),["prevent","stop","self"]),["enter"])),class:"multiselect__input","aria-controls":"listbox-"+e.id},null,44,["name","id","placeholder","value","disabled","tabindex","aria-controls"])):Lt("v-if",!0),o.isSingleLabelVisible?(Ie(),ke("span",{key:1,class:"multiselect__single",onMousedown:t[10]||(t[10]=Xe((...s)=>e.toggle&&e.toggle(...s),["prevent"]))},[qe(e.$slots,"singleLabel",{option:o.singleValue},()=>[Nn(Jt(e.currentOptionLabel),1)])],32)):Lt("v-if",!0),o.isPlaceholderVisible?(Ie(),ke("span",{key:2,class:"multiselect__placeholder",onMousedown:t[11]||(t[11]=Xe((...s)=>e.toggle&&e.toggle(...s),["prevent"]))},[qe(e.$slots,"placeholder",{},()=>[Nn(Jt(e.placeholder),1)])],32)):Lt("v-if",!0)],512),he(Ni,{name:"multiselect"},{default:qt(()=>[xr(he("div",{class:"multiselect__content-wrapper",onFocus:t[12]||(t[12]=(...s)=>e.activate&&e.activate(...s)),tabindex:"-1",onMousedown:t[13]||(t[13]=Xe(()=>{},["prevent"])),style:{maxHeight:e.optimizedHeight+"px"},ref:"list"},[he("ul",{class:"multiselect__content",style:o.contentStyle,role:"listbox",id:"listbox-"+e.id},[qe(e.$slots,"beforeList"),e.multiple&&e.max===e.internalValue.length?(Ie(),ke("li",l0,[he("span",c0,[qe(e.$slots,"maxElements",{},()=>[Nn("Maximum of "+Jt(e.max)+" options selected. First remove a selected option to select another.",1)])])])):Lt("v-if",!0),!e.max||e.internalValue.length<e.max?(Ie(!0),ke(Ye,{key:1},ko(e.filteredOptions,(s,a)=>(Ie(),ke("li",{class:"multiselect__element",key:a,id:e.id+"-"+a,role:s&&(s.$isLabel||s.$isDisabled)?null:"option"},[s&&(s.$isLabel||s.$isDisabled)?Lt("v-if",!0):(Ie(),ke("span",{key:0,class:[e.optionHighlight(a,s),"multiselect__option"],onClick:Xe(l=>e.select(s),["stop"]),onMouseenter:Xe(l=>e.pointerSet(a),["self"]),"data-select":s&&s.isTag?e.tagPlaceholder:o.selectLabelText,"data-selected":o.selectedLabelText,"data-deselect":o.deselectLabelText},[qe(e.$slots,"option",{option:s,search:e.search,index:a},()=>[he("span",null,Jt(e.getOptionLabel(s)),1)])],42,["onClick","onMouseenter","data-select","data-selected","data-deselect"])),s&&(s.$isLabel||s.$isDisabled)?(Ie(),ke("span",{key:1,"data-select":e.groupSelect&&o.selectGroupLabelText,"data-deselect":e.groupSelect&&o.deselectGroupLabelText,class:[e.groupHighlight(a,s),"multiselect__option"],onMouseenter:Xe(l=>e.groupSelect&&e.pointerSet(a),["self"]),onMousedown:Xe(l=>e.selectGroup(s),["prevent"])},[qe(e.$slots,"option",{option:s,search:e.search,index:a},()=>[he("span",null,Jt(e.getOptionLabel(s)),1)])],42,["data-select","data-deselect","onMouseenter","onMousedown"])):Lt("v-if",!0)],8,["id","role"]))),128)):Lt("v-if",!0),xr(he("li",null,[he("span",u0,[qe(e.$slots,"noResult",{search:e.search},()=>[f0])])],512),[[sr,n.showNoResults&&e.filteredOptions.length===0&&e.search&&!n.loading]]),xr(he("li",null,[he("span",p0,[qe(e.$slots,"noOptions",{},()=>[d0])])],512),[[sr,n.showNoOptions&&e.options.length===0&&!e.search&&!n.loading]]),qe(e.$slots,"afterList")],12,["id"])],36),[[sr,e.isOpen]])]),_:3})],42,["tabindex","aria-owns"])}i0.render=h0;function Jl(e){return[null,void 0,!1].indexOf(e)!==-1}function gd(e){var t={exports:{}};return e(t,t.exports),t.exports}function vd(e){return(vd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}var yd=gd(function(e,t){e.exports=function(){var n=["decimals","thousand","mark","prefix","suffix","encoder","decoder","negativeBefore","negative","edit","undo"];function r(m){return m.split("").reverse().join("")}function i(m,b){return m.substring(0,b.length)===b}function o(m,b){return m.slice(-1*b.length)===b}function s(m,b,v){if((m[b]||m[v])&&m[b]===m[v])throw new Error(b)}function a(m){return typeof m=="number"&&isFinite(m)}function l(m,b){return m=m.toString().split("e"),(+((m=(m=Math.round(+(m[0]+"e"+(m[1]?+m[1]+b:b)))).toString().split("e"))[0]+"e"+(m[1]?+m[1]-b:-b))).toFixed(b)}function c(m,b,v,S,g,O,E,$,R,T,P,N){var j,V,F,C=N,w="",M="";return O&&(N=O(N)),!!a(N)&&(m!==!1&&parseFloat(N.toFixed(m))===0&&(N=0),N<0&&(j=!0,N=Math.abs(N)),m!==!1&&(N=l(N,m)),(N=N.toString()).indexOf(".")!==-1?(F=(V=N.split("."))[0],v&&(w=v+V[1])):F=N,b&&(F=r(F).match(/.{1,3}/g),F=r(F.join(r(b)))),j&&$&&(M+=$),S&&(M+=S),j&&R&&(M+=R),M+=F,M+=w,g&&(M+=g),T&&(M=T(M,C)),M)}function u(m,b,v,S,g,O,E,$,R,T,P,N){var j,V="";return P&&(N=P(N)),!(!N||typeof N!="string")&&($&&i(N,$)&&(N=N.replace($,""),j=!0),S&&i(N,S)&&(N=N.replace(S,"")),R&&i(N,R)&&(N=N.replace(R,""),j=!0),g&&o(N,g)&&(N=N.slice(0,-1*g.length)),b&&(N=N.split(b).join("")),v&&(N=N.replace(v,".")),j&&(V+="-"),(V=(V+=N).replace(/[^0-9\.\-.]/g,""))!==""&&(V=Number(V),E&&(V=E(V)),!!a(V)&&V))}function f(m){var b,v,S,g={};for(m.suffix===void 0&&(m.suffix=m.postfix),b=0;b<n.length;b+=1)if((S=m[v=n[b]])===void 0)v!=="negative"||g.negativeBefore?v==="mark"&&g.thousand!=="."?g[v]=".":g[v]=!1:g[v]="-";else if(v==="decimals"){if(!(S>=0&&S<8))throw new Error(v);g[v]=S}else if(v==="encoder"||v==="decoder"||v==="edit"||v==="undo"){if(typeof S!="function")throw new Error(v);g[v]=S}else{if(typeof S!="string")throw new Error(v);g[v]=S}return s(g,"mark","thousand"),s(g,"prefix","negative"),s(g,"prefix","negativeBefore"),g}function p(m,b,v){var S,g=[];for(S=0;S<n.length;S+=1)g.push(m[n[S]]);return g.push(v),b.apply("",g)}function d(m){if(!(this instanceof d))return new d(m);vd(m)==="object"&&(m=f(m),this.to=function(b){return p(m,c,b)},this.from=function(b){return p(m,u,b)})}return d}()});function Kr(e){return(Kr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}var m0=gd(function(e,t){e.exports=function(){var n="14.6.3";function r(y){return Kr(y)==="object"&&typeof y.to=="function"&&typeof y.from=="function"}function i(y){y.parentElement.removeChild(y)}function o(y){return y!=null}function s(y){y.preventDefault()}function a(y){return y.filter(function(h){return!this[h]&&(this[h]=!0)},{})}function l(y,h){return Math.round(y/h)*h}function c(y,h){var U=y.getBoundingClientRect(),Y=y.ownerDocument,Z=Y.documentElement,me=g(Y);return/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(me.x=0),h?U.top+me.y-Z.clientTop:U.left+me.x-Z.clientLeft}function u(y){return typeof y=="number"&&!isNaN(y)&&isFinite(y)}function f(y,h,U){U>0&&(b(y,h),setTimeout(function(){v(y,h)},U))}function p(y){return Math.max(Math.min(y,100),0)}function d(y){return Array.isArray(y)?y:[y]}function m(y){var h=(y=String(y)).split(".");return h.length>1?h[1].length:0}function b(y,h){y.classList&&!/\s/.test(h)?y.classList.add(h):y.className+=" "+h}function v(y,h){y.classList&&!/\s/.test(h)?y.classList.remove(h):y.className=y.className.replace(new RegExp("(^|\\b)"+h.split(" ").join("|")+"(\\b|$)","gi")," ")}function S(y,h){return y.classList?y.classList.contains(h):new RegExp("\\b"+h+"\\b").test(y.className)}function g(y){var h=window.pageXOffset!==void 0,U=(y.compatMode||"")==="CSS1Compat";return{x:h?window.pageXOffset:U?y.documentElement.scrollLeft:y.body.scrollLeft,y:h?window.pageYOffset:U?y.documentElement.scrollTop:y.body.scrollTop}}function O(){return window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"}}function E(){var y=!1;try{var h=Object.defineProperty({},"passive",{get:function(){y=!0}});window.addEventListener("test",null,h)}catch(U){}return y}function $(){return window.CSS&&CSS.supports&&CSS.supports("touch-action","none")}function R(y,h){return 100/(h-y)}function T(y,h,U){return 100*h/(y[U+1]-y[U])}function P(y,h){return T(y,y[0]<0?h+Math.abs(y[0]):h-y[0],0)}function N(y,h){return h*(y[1]-y[0])/100+y[0]}function j(y,h){for(var U=1;y>=h[U];)U+=1;return U}function V(y,h,U){if(U>=y.slice(-1)[0])return 100;var Y=j(U,y),Z=y[Y-1],me=y[Y],Oe=h[Y-1],Fe=h[Y];return Oe+P([Z,me],U)/R(Oe,Fe)}function F(y,h,U){if(U>=100)return y.slice(-1)[0];var Y=j(U,h),Z=y[Y-1],me=y[Y],Oe=h[Y-1];return N([Z,me],(U-Oe)*R(Oe,h[Y]))}function C(y,h,U,Y){if(Y===100)return Y;var Z=j(Y,y),me=y[Z-1],Oe=y[Z];return U?Y-me>(Oe-me)/2?Oe:me:h[Z-1]?y[Z-1]+l(Y-y[Z-1],h[Z-1]):Y}function w(y,h,U){var Y;if(typeof h=="number"&&(h=[h]),!Array.isArray(h))throw new Error("noUiSlider ("+n+"): 'range' contains invalid value.");if(!u(Y=y==="min"?0:y==="max"?100:parseFloat(y))||!u(h[0]))throw new Error("noUiSlider ("+n+"): 'range' value isn't numeric.");U.xPct.push(Y),U.xVal.push(h[0]),Y?U.xSteps.push(!isNaN(h[1])&&h[1]):isNaN(h[1])||(U.xSteps[0]=h[1]),U.xHighestCompleteStep.push(0)}function M(y,h,U){if(h)if(U.xVal[y]!==U.xVal[y+1]){U.xSteps[y]=T([U.xVal[y],U.xVal[y+1]],h,0)/R(U.xPct[y],U.xPct[y+1]);var Y=(U.xVal[y+1]-U.xVal[y])/U.xNumSteps[y],Z=Math.ceil(Number(Y.toFixed(3))-1),me=U.xVal[y]+U.xNumSteps[y]*Z;U.xHighestCompleteStep[y]=me}else U.xSteps[y]=U.xHighestCompleteStep[y]=U.xVal[y]}function L(y,h,U){var Y;this.xPct=[],this.xVal=[],this.xSteps=[U||!1],this.xNumSteps=[!1],this.xHighestCompleteStep=[],this.snap=h;var Z=[];for(Y in y)y.hasOwnProperty(Y)&&Z.push([y[Y],Y]);for(Z.length&&Kr(Z[0][0])==="object"?Z.sort(function(me,Oe){return me[0][0]-Oe[0][0]}):Z.sort(function(me,Oe){return me[0]-Oe[0]}),Y=0;Y<Z.length;Y++)w(Z[Y][1],Z[Y][0],this);for(this.xNumSteps=this.xSteps.slice(0),Y=0;Y<this.xNumSteps.length;Y++)M(Y,this.xNumSteps[Y],this)}L.prototype.getDistance=function(y){var h,U=[];for(h=0;h<this.xNumSteps.length-1;h++){var Y=this.xNumSteps[h];if(Y&&y/Y%1!=0)throw new Error("noUiSlider ("+n+"): 'limit', 'margin' and 'padding' of "+this.xPct[h]+"% range must be divisible by step.");U[h]=T(this.xVal,y,h)}return U},L.prototype.getAbsoluteDistance=function(y,h,U){var Y,Z=0;if(y<this.xPct[this.xPct.length-1])for(;y>this.xPct[Z+1];)Z++;else y===this.xPct[this.xPct.length-1]&&(Z=this.xPct.length-2);U||y!==this.xPct[Z+1]||Z++;var me=1,Oe=h[Z],Fe=0,Le=0,ge=0,te=0;for(Y=U?(y-this.xPct[Z])/(this.xPct[Z+1]-this.xPct[Z]):(this.xPct[Z+1]-y)/(this.xPct[Z+1]-this.xPct[Z]);Oe>0;)Fe=this.xPct[Z+1+te]-this.xPct[Z+te],h[Z+te]*me+100-100*Y>100?(Le=Fe*Y,me=(Oe-100*Y)/h[Z+te],Y=1):(Le=h[Z+te]*Fe/100*me,me=0),U?(ge-=Le,this.xPct.length+te>=1&&te--):(ge+=Le,this.xPct.length-te>=1&&te++),Oe=h[Z+te]*me;return y+ge},L.prototype.toStepping=function(y){return y=V(this.xVal,this.xPct,y)},L.prototype.fromStepping=function(y){return F(this.xVal,this.xPct,y)},L.prototype.getStep=function(y){return y=C(this.xPct,this.xSteps,this.snap,y)},L.prototype.getDefaultStep=function(y,h,U){var Y=j(y,this.xPct);return(y===100||h&&y===this.xPct[Y-1])&&(Y=Math.max(Y-1,1)),(this.xVal[Y]-this.xVal[Y-1])/U},L.prototype.getNearbySteps=function(y){var h=j(y,this.xPct);return{stepBefore:{startValue:this.xVal[h-2],step:this.xNumSteps[h-2],highestStep:this.xHighestCompleteStep[h-2]},thisStep:{startValue:this.xVal[h-1],step:this.xNumSteps[h-1],highestStep:this.xHighestCompleteStep[h-1]},stepAfter:{startValue:this.xVal[h],step:this.xNumSteps[h],highestStep:this.xHighestCompleteStep[h]}}},L.prototype.countStepDecimals=function(){var y=this.xNumSteps.map(m);return Math.max.apply(null,y)},L.prototype.convert=function(y){return this.getStep(this.toStepping(y))};var z={to:function(y){return y!==void 0&&y.toFixed(2)},from:Number},B={target:"target",base:"base",origin:"origin",handle:"handle",handleLower:"handle-lower",handleUpper:"handle-upper",touchArea:"touch-area",horizontal:"horizontal",vertical:"vertical",background:"background",connect:"connect",connects:"connects",ltr:"ltr",rtl:"rtl",textDirectionLtr:"txt-dir-ltr",textDirectionRtl:"txt-dir-rtl",draggable:"draggable",drag:"state-drag",tap:"state-tap",active:"active",tooltip:"tooltip",pips:"pips",pipsHorizontal:"pips-horizontal",pipsVertical:"pips-vertical",marker:"marker",markerHorizontal:"marker-horizontal",markerVertical:"marker-vertical",markerNormal:"marker-normal",markerLarge:"marker-large",markerSub:"marker-sub",value:"value",valueHorizontal:"value-horizontal",valueVertical:"value-vertical",valueNormal:"value-normal",valueLarge:"value-large",valueSub:"value-sub"},K={tooltips:".__tooltips",aria:".__aria"};function G(y){if(r(y))return!0;throw new Error("noUiSlider ("+n+"): 'format' requires 'to' and 'from' methods.")}function de(y,h){if(!u(h))throw new Error("noUiSlider ("+n+"): 'step' is not numeric.");y.singleStep=h}function ce(y,h){if(!u(h))throw new Error("noUiSlider ("+n+"): 'keyboardPageMultiplier' is not numeric.");y.keyboardPageMultiplier=h}function ve(y,h){if(!u(h))throw new Error("noUiSlider ("+n+"): 'keyboardDefaultStep' is not numeric.");y.keyboardDefaultStep=h}function Se(y,h){if(Kr(h)!=="object"||Array.isArray(h))throw new Error("noUiSlider ("+n+"): 'range' is not an object.");if(h.min===void 0||h.max===void 0)throw new Error("noUiSlider ("+n+"): Missing 'min' or 'max' in 'range'.");if(h.min===h.max)throw new Error("noUiSlider ("+n+"): 'range' 'min' and 'max' cannot be equal.");y.spectrum=new L(h,y.snap,y.singleStep)}function Re(y,h){if(h=d(h),!Array.isArray(h)||!h.length)throw new Error("noUiSlider ("+n+"): 'start' option is incorrect.");y.handles=h.length,y.start=h}function Je(y,h){if(y.snap=h,typeof h!="boolean")throw new Error("noUiSlider ("+n+"): 'snap' option must be a boolean.")}function Qe(y,h){if(y.animate=h,typeof h!="boolean")throw new Error("noUiSlider ("+n+"): 'animate' option must be a boolean.")}function ft(y,h){if(y.animationDuration=h,typeof h!="number")throw new Error("noUiSlider ("+n+"): 'animationDuration' option must be a number.")}function kt(y,h){var U,Y=[!1];if(h==="lower"?h=[!0,!1]:h==="upper"&&(h=[!1,!0]),h===!0||h===!1){for(U=1;U<y.handles;U++)Y.push(h);Y.push(!1)}else{if(!Array.isArray(h)||!h.length||h.length!==y.handles+1)throw new Error("noUiSlider ("+n+"): 'connect' option doesn't match handle count.");Y=h}y.connect=Y}function Ve(y,h){switch(h){case"horizontal":y.ort=0;break;case"vertical":y.ort=1;break;default:throw new Error("noUiSlider ("+n+"): 'orientation' option is invalid.")}}function ze(y,h){if(!u(h))throw new Error("noUiSlider ("+n+"): 'margin' option must be numeric.");h!==0&&(y.margin=y.spectrum.getDistance(h))}function vt(y,h){if(!u(h))throw new Error("noUiSlider ("+n+"): 'limit' option must be numeric.");if(y.limit=y.spectrum.getDistance(h),!y.limit||y.handles<2)throw new Error("noUiSlider ("+n+"): 'limit' option is only supported on linear sliders with 2 or more handles.")}function x(y,h){var U;if(!u(h)&&!Array.isArray(h))throw new Error("noUiSlider ("+n+"): 'padding' option must be numeric or array of exactly 2 numbers.");if(Array.isArray(h)&&h.length!==2&&!u(h[0])&&!u(h[1]))throw new Error("noUiSlider ("+n+"): 'padding' option must be numeric or array of exactly 2 numbers.");if(h!==0){for(Array.isArray(h)||(h=[h,h]),y.padding=[y.spectrum.getDistance(h[0]),y.spectrum.getDistance(h[1])],U=0;U<y.spectrum.xNumSteps.length-1;U++)if(y.padding[0][U]<0||y.padding[1][U]<0)throw new Error("noUiSlider ("+n+"): 'padding' option must be a positive number(s).");var Y=h[0]+h[1],Z=y.spectrum.xVal[0];if(Y/(y.spectrum.xVal[y.spectrum.xVal.length-1]-Z)>1)throw new Error("noUiSlider ("+n+"): 'padding' option must not exceed 100% of the range.")}}function I(y,h){switch(h){case"ltr":y.dir=0;break;case"rtl":y.dir=1;break;default:throw new Error("noUiSlider ("+n+"): 'direction' option was not recognized.")}}function k(y,h){if(typeof h!="string")throw new Error("noUiSlider ("+n+"): 'behaviour' must be a string containing options.");var U=h.indexOf("tap")>=0,Y=h.indexOf("drag")>=0,Z=h.indexOf("fixed")>=0,me=h.indexOf("snap")>=0,Oe=h.indexOf("hover")>=0,Fe=h.indexOf("unconstrained")>=0;if(Z){if(y.handles!==2)throw new Error("noUiSlider ("+n+"): 'fixed' behaviour must be used with 2 handles");ze(y,y.start[1]-y.start[0])}if(Fe&&(y.margin||y.limit))throw new Error("noUiSlider ("+n+"): 'unconstrained' behaviour cannot be used with margin or limit");y.events={tap:U||me,drag:Y,fixed:Z,snap:me,hover:Oe,unconstrained:Fe}}function X(y,h){if(h!==!1)if(h===!0){y.tooltips=[];for(var U=0;U<y.handles;U++)y.tooltips.push(!0)}else{if(y.tooltips=d(h),y.tooltips.length!==y.handles)throw new Error("noUiSlider ("+n+"): must pass a formatter for all handles.");y.tooltips.forEach(function(Y){if(typeof Y!="boolean"&&(Kr(Y)!=="object"||typeof Y.to!="function"))throw new Error("noUiSlider ("+n+"): 'tooltips' must be passed a formatter or 'false'.")})}}function W(y,h){y.ariaFormat=h,G(h)}function q(y,h){y.format=h,G(h)}function ne(y,h){if(y.keyboardSupport=h,typeof h!="boolean")throw new Error("noUiSlider ("+n+"): 'keyboardSupport' option must be a boolean.")}function _(y,h){y.documentElement=h}function ee(y,h){if(typeof h!="string"&&h!==!1)throw new Error("noUiSlider ("+n+"): 'cssPrefix' must be a string or `false`.");y.cssPrefix=h}function Q(y,h){if(Kr(h)!=="object")throw new Error("noUiSlider ("+n+"): 'cssClasses' must be an object.");if(typeof y.cssPrefix=="string")for(var U in y.cssClasses={},h)h.hasOwnProperty(U)&&(y.cssClasses[U]=y.cssPrefix+h[U]);else y.cssClasses=h}function fe(y){var h={margin:0,limit:0,padding:0,animate:!0,animationDuration:300,ariaFormat:z,format:z},U={step:{r:!1,t:de},keyboardPageMultiplier:{r:!1,t:ce},keyboardDefaultStep:{r:!1,t:ve},start:{r:!0,t:Re},connect:{r:!0,t:kt},direction:{r:!0,t:I},snap:{r:!1,t:Je},animate:{r:!1,t:Qe},animationDuration:{r:!1,t:ft},range:{r:!0,t:Se},orientation:{r:!1,t:Ve},margin:{r:!1,t:ze},limit:{r:!1,t:vt},padding:{r:!1,t:x},behaviour:{r:!0,t:k},ariaFormat:{r:!1,t:W},format:{r:!1,t:q},tooltips:{r:!1,t:X},keyboardSupport:{r:!0,t:ne},documentElement:{r:!1,t:_},cssPrefix:{r:!0,t:ee},cssClasses:{r:!0,t:Q}},Y={connect:!1,direction:"ltr",behaviour:"tap",orientation:"horizontal",keyboardSupport:!0,cssPrefix:"noUi-",cssClasses:B,keyboardPageMultiplier:5,keyboardDefaultStep:10};y.format&&!y.ariaFormat&&(y.ariaFormat=y.format),Object.keys(U).forEach(function(Le){if(!o(y[Le])&&Y[Le]===void 0){if(U[Le].r)throw new Error("noUiSlider ("+n+"): '"+Le+"' is required.");return!0}U[Le].t(h,o(y[Le])?y[Le]:Y[Le])}),h.pips=y.pips;var Z=document.createElement("div"),me=Z.style.msTransform!==void 0,Oe=Z.style.transform!==void 0;h.transformRule=Oe?"transform":me?"msTransform":"webkitTransform";var Fe=[["left","top"],["right","bottom"]];return h.style=Fe[h.dir][h.ort],h}function le(y,h,U){var Y,Z,me,Oe,Fe,Le,ge=O(),te=$()&&E(),oe=y,ae=h.spectrum,we=[],Pe=[],yt=[],qr=0,bt={},gr=y.ownerDocument,so=h.documentElement||gr.documentElement,ao=gr.body,uh=-1,lo=0,Bs=1,Hs=2,fh=gr.dir==="rtl"||h.ort===1?0:100;function an(A,D){var H=gr.createElement("div");return D&&b(H,D),A.appendChild(H),H}function ph(A,D){var H=an(A,h.cssClasses.origin),J=an(H,h.cssClasses.handle);return an(J,h.cssClasses.touchArea),J.setAttribute("data-handle",D),h.keyboardSupport&&(J.setAttribute("tabindex","0"),J.addEventListener("keydown",function(re){return xh(re,D)})),J.setAttribute("role","slider"),J.setAttribute("aria-orientation",h.ort?"vertical":"horizontal"),D===0?b(J,h.cssClasses.handleLower):D===h.handles-1&&b(J,h.cssClasses.handleUpper),H}function mc(A,D){return!!D&&an(A,h.cssClasses.connect)}function dh(A,D){var H=an(D,h.cssClasses.connects);Z=[],(me=[]).push(mc(H,A[0]));for(var J=0;J<h.handles;J++)Z.push(ph(D,J)),yt[J]=J,me.push(mc(H,A[J+1]))}function hh(A){return b(A,h.cssClasses.target),h.dir===0?b(A,h.cssClasses.ltr):b(A,h.cssClasses.rtl),h.ort===0?b(A,h.cssClasses.horizontal):b(A,h.cssClasses.vertical),b(A,getComputedStyle(A).direction==="rtl"?h.cssClasses.textDirectionRtl:h.cssClasses.textDirectionLtr),an(A,h.cssClasses.base)}function mh(A,D){return!!h.tooltips[D]&&an(A.firstChild,h.cssClasses.tooltip)}function gc(){return oe.hasAttribute("disabled")}function ks(A){return Z[A].hasAttribute("disabled")}function Us(){Fe&&(_r("update"+K.tooltips),Fe.forEach(function(A){A&&i(A)}),Fe=null)}function vc(){Us(),Fe=Z.map(mh),Gs("update"+K.tooltips,function(A,D,H){if(Fe[D]){var J=A[D];h.tooltips[D]!==!0&&(J=h.tooltips[D].to(H[D])),Fe[D].innerHTML=J}})}function gh(){_r("update"+K.aria),Gs("update"+K.aria,function(A,D,H,J,re){yt.forEach(function(ie){var se=Z[ie],$e=co(Pe,ie,0,!0,!0,!0),De=co(Pe,ie,100,!0,!0,!0),Ue=re[ie],Ae=h.ariaFormat.to(H[ie]);$e=ae.fromStepping($e).toFixed(1),De=ae.fromStepping(De).toFixed(1),Ue=ae.fromStepping(Ue).toFixed(1),se.children[0].setAttribute("aria-valuemin",$e),se.children[0].setAttribute("aria-valuemax",De),se.children[0].setAttribute("aria-valuenow",Ue),se.children[0].setAttribute("aria-valuetext",Ae)})})}function vh(A,D,H){if(A==="range"||A==="steps")return ae.xVal;if(A==="count"){if(D<2)throw new Error("noUiSlider ("+n+"): 'values' (>= 2) required for mode 'count'.");var J=D-1,re=100/J;for(D=[];J--;)D[J]=J*re;D.push(100),A="positions"}return A==="positions"?D.map(function(ie){return ae.fromStepping(H?ae.getStep(ie):ie)}):A==="values"?H?D.map(function(ie){return ae.fromStepping(ae.getStep(ae.toStepping(ie)))}):D:void 0}function yh(A,D,H){function J(Ae,Ke){return(Ae+Ke).toFixed(7)/1}var re={},ie=ae.xVal[0],se=ae.xVal[ae.xVal.length-1],$e=!1,De=!1,Ue=0;return(H=a(H.slice().sort(function(Ae,Ke){return Ae-Ke})))[0]!==ie&&(H.unshift(ie),$e=!0),H[H.length-1]!==se&&(H.push(se),De=!0),H.forEach(function(Ae,Ke){var rt,We,yr,ei,Ut,xc,Qs,Cc,Mc,Ac,fo=Ae,br=H[Ke+1],Nc=D==="steps";if(Nc&&(rt=ae.xNumSteps[Ke]),rt||(rt=br-fo),fo!==!1)for(br===void 0&&(br=fo),rt=Math.max(rt,1e-7),We=fo;We<=br;We=J(We,rt)){for(Cc=(Ut=(ei=ae.toStepping(We))-Ue)/A,Ac=Ut/(Mc=Math.round(Cc)),yr=1;yr<=Mc;yr+=1)re[(xc=Ue+yr*Ac).toFixed(5)]=[ae.fromStepping(xc),0];Qs=H.indexOf(We)>-1?Bs:Nc?Hs:lo,!Ke&&$e&&We!==br&&(Qs=0),We===br&&De||(re[ei.toFixed(5)]=[We,Qs]),Ue=ei}}),re}function bh(A,D,H){var J=gr.createElement("div"),re=[];re[lo]=h.cssClasses.valueNormal,re[Bs]=h.cssClasses.valueLarge,re[Hs]=h.cssClasses.valueSub;var ie=[];ie[lo]=h.cssClasses.markerNormal,ie[Bs]=h.cssClasses.markerLarge,ie[Hs]=h.cssClasses.markerSub;var se=[h.cssClasses.valueHorizontal,h.cssClasses.valueVertical],$e=[h.cssClasses.markerHorizontal,h.cssClasses.markerVertical];function De(Ae,Ke){var rt=Ke===h.cssClasses.value,We=rt?re:ie;return Ke+" "+(rt?se:$e)[h.ort]+" "+We[Ae]}function Ue(Ae,Ke,rt){if((rt=D?D(Ke,rt):rt)!==uh){var We=an(J,!1);We.className=De(rt,h.cssClasses.marker),We.style[h.style]=Ae+"%",rt>lo&&((We=an(J,!1)).className=De(rt,h.cssClasses.value),We.setAttribute("data-value",Ke),We.style[h.style]=Ae+"%",We.innerHTML=H.to(Ke))}}return b(J,h.cssClasses.pips),b(J,h.ort===0?h.cssClasses.pipsHorizontal:h.cssClasses.pipsVertical),Object.keys(A).forEach(function(Ae){Ue(Ae,A[Ae][0],A[Ae][1])}),J}function Ks(){Oe&&(i(Oe),Oe=null)}function Ws(A){Ks();var D=A.mode,H=A.density||1,J=A.filter||!1,re=yh(H,D,vh(D,A.values||!1,A.stepped||!1)),ie=A.format||{to:Math.round};return Oe=oe.appendChild(bh(re,J,ie))}function yc(){var A=Y.getBoundingClientRect(),D="offset"+["Width","Height"][h.ort];return h.ort===0?A.width||Y[D]:A.height||Y[D]}function kn(A,D,H,J){var re=function(se){return!!(se=Sh(se,J.pageOffset,J.target||D))&&!(gc()&&!J.doNotReject)&&!(S(oe,h.cssClasses.tap)&&!J.doNotReject)&&!(A===ge.start&&se.buttons!==void 0&&se.buttons>1)&&(!J.hover||!se.buttons)&&(te||se.preventDefault(),se.calcPoint=se.points[h.ort],void H(se,J))},ie=[];return A.split(" ").forEach(function(se){D.addEventListener(se,re,!!te&&{passive:!0}),ie.push([se,re])}),ie}function Sh(A,D,H){var J,re,ie=A.type.indexOf("touch")===0,se=A.type.indexOf("mouse")===0,$e=A.type.indexOf("pointer")===0;if(A.type.indexOf("MSPointer")===0&&($e=!0),A.type==="mousedown"&&!A.buttons&&!A.touches)return!1;if(ie){var De=function(Ke){return Ke.target===H||H.contains(Ke.target)||Ke.target.shadowRoot&&Ke.target.shadowRoot.contains(H)};if(A.type==="touchstart"){var Ue=Array.prototype.filter.call(A.touches,De);if(Ue.length>1)return!1;J=Ue[0].pageX,re=Ue[0].pageY}else{var Ae=Array.prototype.find.call(A.changedTouches,De);if(!Ae)return!1;J=Ae.pageX,re=Ae.pageY}}return D=D||g(gr),(se||$e)&&(J=A.clientX+D.x,re=A.clientY+D.y),A.pageOffset=D,A.points=[J,re],A.cursor=se||$e,A}function bc(A){var D=100*(A-c(Y,h.ort))/yc();return D=p(D),h.dir?100-D:D}function Eh(A){var D=100,H=!1;return Z.forEach(function(J,re){if(!ks(re)){var ie=Pe[re],se=Math.abs(ie-A);(se<D||se<=D&&A>ie||se===100&&D===100)&&(H=re,D=se)}}),H}function Oh(A,D){A.type==="mouseout"&&A.target.nodeName==="HTML"&&A.relatedTarget===null&&Ys(A,D)}function wh(A,D){if(navigator.appVersion.indexOf("MSIE 9")===-1&&A.buttons===0&&D.buttonsProperty!==0)return Ys(A,D);var H=(h.dir?-1:1)*(A.calcPoint-D.startCalcPoint);Sc(H>0,100*H/D.baseSize,D.locations,D.handleNumbers)}function Ys(A,D){D.handle&&(v(D.handle,h.cssClasses.active),qr-=1),D.listeners.forEach(function(H){so.removeEventListener(H[0],H[1])}),qr===0&&(v(oe,h.cssClasses.drag),Js(),A.cursor&&(ao.style.cursor="",ao.removeEventListener("selectstart",s))),D.handleNumbers.forEach(function(H){_e("change",H),_e("set",H),_e("end",H)})}function Xs(A,D){if(D.handleNumbers.some(ks))return!1;var H;D.handleNumbers.length===1&&(H=Z[D.handleNumbers[0]].children[0],qr+=1,b(H,h.cssClasses.active)),A.stopPropagation();var J=[],re=kn(ge.move,so,wh,{target:A.target,handle:H,listeners:J,startCalcPoint:A.calcPoint,baseSize:yc(),pageOffset:A.pageOffset,handleNumbers:D.handleNumbers,buttonsProperty:A.buttons,locations:Pe.slice()}),ie=kn(ge.end,so,Ys,{target:A.target,handle:H,listeners:J,doNotReject:!0,handleNumbers:D.handleNumbers}),se=kn("mouseout",so,Oh,{target:A.target,handle:H,listeners:J,doNotReject:!0,handleNumbers:D.handleNumbers});J.push.apply(J,re.concat(ie,se)),A.cursor&&(ao.style.cursor=getComputedStyle(A.target).cursor,Z.length>1&&b(oe,h.cssClasses.drag),ao.addEventListener("selectstart",s,!1)),D.handleNumbers.forEach(function($e){_e("start",$e)})}function Th(A){A.stopPropagation();var D=bc(A.calcPoint),H=Eh(D);if(H===!1)return!1;h.events.snap||f(oe,h.cssClasses.tap,h.animationDuration),vr(H,D,!0,!0),Js(),_e("slide",H,!0),_e("update",H,!0),_e("change",H,!0),_e("set",H,!0),h.events.snap&&Xs(A,{handleNumbers:[H]})}function Ph(A){var D=bc(A.calcPoint),H=ae.getStep(D),J=ae.fromStepping(H);Object.keys(bt).forEach(function(re){re.split(".")[0]==="hover"&&bt[re].forEach(function(ie){ie.call(Le,J)})})}function xh(A,D){if(gc()||ks(D))return!1;var H=["Left","Right"],J=["Down","Up"],re=["PageDown","PageUp"],ie=["Home","End"];h.dir&&!h.ort?H.reverse():h.ort&&!h.dir&&(J.reverse(),re.reverse());var se,$e=A.key.replace("Arrow",""),De=$e===re[0],Ue=$e===re[1],Ae=$e===J[0]||$e===H[0]||De,Ke=$e===J[1]||$e===H[1]||Ue,rt=$e===ie[0],We=$e===ie[1];if(!(Ae||Ke||rt||We))return!0;if(A.preventDefault(),Ke||Ae){var yr=h.keyboardPageMultiplier,ei=Ae?0:1,Ut=Pc(D)[ei];if(Ut===null)return!1;Ut===!1&&(Ut=ae.getDefaultStep(Pe[D],Ae,h.keyboardDefaultStep)),(Ue||De)&&(Ut*=yr),Ut=Math.max(Ut,1e-7),Ut*=Ae?-1:1,se=we[D]+Ut}else se=We?h.spectrum.xVal[h.spectrum.xVal.length-1]:h.spectrum.xVal[0];return vr(D,ae.toStepping(se),!0,!0),_e("slide",D),_e("update",D),_e("change",D),_e("set",D),!1}function Ch(A){A.fixed||Z.forEach(function(D,H){kn(ge.start,D.children[0],Xs,{handleNumbers:[H]})}),A.tap&&kn(ge.start,Y,Th,{}),A.hover&&kn(ge.move,Y,Ph,{hover:!0}),A.drag&&me.forEach(function(D,H){if(D!==!1&&H!==0&&H!==me.length-1){var J=Z[H-1],re=Z[H],ie=[D];b(D,h.cssClasses.draggable),A.fixed&&(ie.push(J.children[0]),ie.push(re.children[0])),ie.forEach(function(se){kn(ge.start,se,Xs,{handles:[J,re],handleNumbers:[H-1,H]})})}})}function Gs(A,D){bt[A]=bt[A]||[],bt[A].push(D),A.split(".")[0]==="update"&&Z.forEach(function(H,J){_e("update",J)})}function Mh(A){return A===K.aria||A===K.tooltips}function _r(A){var D=A&&A.split(".")[0],H=D?A.substring(D.length):A;Object.keys(bt).forEach(function(J){var re=J.split(".")[0],ie=J.substring(re.length);D&&D!==re||H&&H!==ie||Mh(ie)&&H!==ie||delete bt[J]})}function _e(A,D,H){Object.keys(bt).forEach(function(J){var re=J.split(".")[0];A===re&&bt[J].forEach(function(ie){ie.call(Le,we.map(h.format.to),D,we.slice(),H||!1,Pe.slice(),Le)})})}function co(A,D,H,J,re,ie){var se;return Z.length>1&&!h.events.unconstrained&&(J&&D>0&&(se=ae.getAbsoluteDistance(A[D-1],h.margin,0),H=Math.max(H,se)),re&&D<Z.length-1&&(se=ae.getAbsoluteDistance(A[D+1],h.margin,1),H=Math.min(H,se))),Z.length>1&&h.limit&&(J&&D>0&&(se=ae.getAbsoluteDistance(A[D-1],h.limit,0),H=Math.min(H,se)),re&&D<Z.length-1&&(se=ae.getAbsoluteDistance(A[D+1],h.limit,1),H=Math.max(H,se))),h.padding&&(D===0&&(se=ae.getAbsoluteDistance(0,h.padding[0],0),H=Math.max(H,se)),D===Z.length-1&&(se=ae.getAbsoluteDistance(100,h.padding[1],1),H=Math.min(H,se))),!((H=p(H=ae.getStep(H)))===A[D]&&!ie)&&H}function Zs(A,D){var H=h.ort;return(H?D:A)+", "+(H?A:D)}function Sc(A,D,H,J){var re=H.slice(),ie=[!A,A],se=[A,!A];J=J.slice(),A&&J.reverse(),J.length>1?J.forEach(function(De,Ue){var Ae=co(re,De,re[De]+D,ie[Ue],se[Ue],!1);Ae===!1?D=0:(D=Ae-re[De],re[De]=Ae)}):ie=se=[!0];var $e=!1;J.forEach(function(De,Ue){$e=vr(De,H[De]+D,ie[Ue],se[Ue])||$e}),$e&&J.forEach(function(De){_e("update",De),_e("slide",De)})}function Ec(A,D){return h.dir?100-A-D:A}function Ah(A,D){Pe[A]=D,we[A]=ae.fromStepping(D);var H="translate("+Zs(10*(Ec(D,0)-fh)+"%","0")+")";Z[A].style[h.transformRule]=H,Oc(A),Oc(A+1)}function Js(){yt.forEach(function(A){var D=Pe[A]>50?-1:1,H=3+(Z.length+D*A);Z[A].style.zIndex=H})}function vr(A,D,H,J,re){return re||(D=co(Pe,A,D,H,J,!1)),D!==!1&&(Ah(A,D),!0)}function Oc(A){if(me[A]){var D=0,H=100;A!==0&&(D=Pe[A-1]),A!==me.length-1&&(H=Pe[A]);var J=H-D,re="translate("+Zs(Ec(D,J)+"%","0")+")",ie="scale("+Zs(J/100,"1")+")";me[A].style[h.transformRule]=re+" "+ie}}function wc(A,D){return A===null||A===!1||A===void 0?Pe[D]:(typeof A=="number"&&(A=String(A)),A=h.format.from(A),(A=ae.toStepping(A))===!1||isNaN(A)?Pe[D]:A)}function uo(A,D,H){var J=d(A),re=Pe[0]===void 0;D=D===void 0||!!D,h.animate&&!re&&f(oe,h.cssClasses.tap,h.animationDuration),yt.forEach(function(se){vr(se,wc(J[se],se),!0,!1,H)});for(var ie=yt.length===1?0:1;ie<yt.length;++ie)yt.forEach(function(se){vr(se,Pe[se],!0,!0,H)});Js(),yt.forEach(function(se){_e("update",se),J[se]!==null&&D&&_e("set",se)})}function Nh(A){uo(h.start,A)}function Rh(A,D,H,J){if(!((A=Number(A))>=0&&A<yt.length))throw new Error("noUiSlider ("+n+"): invalid handle number, got: "+A);vr(A,wc(D,A),!0,!0,J),_e("update",A),H&&_e("set",A)}function Tc(){var A=we.map(h.format.to);return A.length===1?A[0]:A}function Ih(){for(var A in _r(K.aria),_r(K.tooltips),h.cssClasses)h.cssClasses.hasOwnProperty(A)&&v(oe,h.cssClasses[A]);for(;oe.firstChild;)oe.removeChild(oe.firstChild);delete oe.noUiSlider}function Pc(A){var D=Pe[A],H=ae.getNearbySteps(D),J=we[A],re=H.thisStep.step,ie=null;if(h.snap)return[J-H.stepBefore.startValue||null,H.stepAfter.startValue-J||null];re!==!1&&J+re>H.stepAfter.startValue&&(re=H.stepAfter.startValue-J),ie=J>H.thisStep.startValue?H.thisStep.step:H.stepBefore.step!==!1&&J-H.stepBefore.highestStep,D===100?re=null:D===0&&(ie=null);var se=ae.countStepDecimals();return re!==null&&re!==!1&&(re=Number(re.toFixed(se))),ie!==null&&ie!==!1&&(ie=Number(ie.toFixed(se))),[ie,re]}function $h(){return yt.map(Pc)}function Lh(A,D){var H=Tc(),J=["margin","limit","padding","range","animate","snap","step","format","pips","tooltips"];J.forEach(function(ie){A[ie]!==void 0&&(U[ie]=A[ie])});var re=fe(U);J.forEach(function(ie){A[ie]!==void 0&&(h[ie]=re[ie])}),ae=re.spectrum,h.margin=re.margin,h.limit=re.limit,h.padding=re.padding,h.pips?Ws(h.pips):Ks(),h.tooltips?vc():Us(),Pe=[],uo(A.start||H,D)}function Dh(){Y=hh(oe),dh(h.connect,Y),Ch(h.events),uo(h.start),h.pips&&Ws(h.pips),h.tooltips&&vc(),gh()}return Dh(),Le={destroy:Ih,steps:$h,on:Gs,off:_r,get:Tc,set:uo,setHandle:Rh,reset:Nh,__moveHandles:function(A,D,H){Sc(A,D,Pe,H)},options:U,updateOptions:Lh,target:oe,removePips:Ks,removeTooltips:Us,getTooltips:function(){return Fe},getOrigins:function(){return Z},pips:Ws}}function pe(y,h){if(!y||!y.nodeName)throw new Error("noUiSlider ("+n+"): create requires a single element, got: "+y);if(y.noUiSlider)throw new Error("noUiSlider ("+n+"): Slider was already initialized.");var U=le(y,fe(h),h);return y.noUiSlider=U,U}return{__spectrum:L,version:n,cssClasses:B,create:pe}}()}),bd={name:"Slider",emits:["input","update:modelValue","update","change"],props:{value:{validator:function(e){return t=>typeof t=="number"||t instanceof Array||t==null||t===!1},required:!1},modelValue:{validator:function(e){return t=>typeof t=="number"||t instanceof Array||t==null||t===!1},required:!1},id:{type:[String,Number],required:!1,default:"slider"},disabled:{type:Boolean,required:!1,default:!1},min:{type:Number,required:!1,default:0},max:{type:Number,required:!1,default:100},step:{type:Number,required:!1,default:1},orientation:{type:String,required:!1,default:"horizontal"},direction:{type:String,required:!1,default:"ltr"},tooltips:{type:Boolean,required:!1,default:!0},options:{type:Object,required:!1,default:()=>({})},merge:{type:Number,required:!1,default:-1},height:{type:String,required:!1,default:"300px"},format:{type:[Object,Function,Boolean],required:!1,default:null}},setup(e,t){const n=function(s,a,l){var c=ci(s),u=c.value,f=c.modelValue,p=a.expose!==void 0?f:u,d=Pn(p.value);if(Jl(p.value))throw new Error("Slider v-model must be a Number or Array");if(Array.isArray(p.value)&&p.value.length==0)throw new Error("Slider v-model must not be an empty array");return{value:p,initialValue:d}}(e,t),r=function(s,a,l){var c=ci(s),u=c.orientation,f=c.height;return{style:xn(function(){return u.value=="vertical"?{height:f.value}:[]})}}(e),i=function(s,a,l){var c=ci(s),u=c.format,f=c.step,p=l.value,d=xn(function(){return u&&u.value?typeof u.value=="function"?{to:u.value}:yd(Object.assign({},u.value)):yd({decimals:f.value>=0?0:2})});return{tooltipsFormat:xn(function(){return Array.isArray(p.value)?p.value.map(function(m){return d.value}):d.value}),tooltipsMerge:function(m,b,v){var S=getComputedStyle(m).direction==="rtl",g=m.noUiSlider.options.direction==="rtl",O=m.noUiSlider.options.orientation==="vertical",E=m.noUiSlider.getTooltips(),$=m.noUiSlider.getOrigins();E.forEach(function(R,T){R&&$[T].appendChild(R)}),m.noUiSlider.on("update",function(R,T,P,N,j){var V=[[]],F=[[]],C=[[]],w=0;E[0]&&(V[0][0]=0,F[0][0]=j[0],C[0][0]=d.value.to(parseFloat(R[0])));for(var M=1;M<j.length;M++)(!E[M]||j[M]-j[M-1]>b)&&(V[++w]=[],C[w]=[],F[w]=[]),E[M]&&(V[w].push(M),C[w].push(d.value.to(parseFloat(R[M]))),F[w].push(j[M]));V.forEach(function(L,z){for(var B=L.length,K=0;K<B;K++){var G=L[K];if(K===B-1){var de=0;F[z].forEach(function(Re){de+=1e3-10*Re});var ce=O?"bottom":"right",ve=g?0:B-1,Se=1e3-10*F[z][ve];de=(S&&!O?100:0)+de/B-Se,E[G].innerHTML=C[z].join(v),E[G].style.display="block",E[G].style[ce]=de+"%"}else E[G].style.display="none"}})})}}}(e,0,{value:n.value}),o=function(s,a,l){var c=ci(s),u=c.options,f=c.orientation,p=c.direction,d=c.tooltips,m=c.step,b=c.min,v=c.max,S=c.merge,g=c.format,O=c.id,E=c.disabled,$=l.value,R=l.initialValue,T=l.tooltipsFormat,P=l.tooltipsMerge,N=l.style,j=Pn(null),V=Pn(null),F=Pn(!1),C=xn(function(){var ce={cssPrefix:"slider-",orientation:f.value,direction:p.value,tooltips:!!d.value&&T.value,connect:"lower",start:Jl($.value)?b.value:$.value,range:{min:b.value,max:v.value}};return m.value>0&&(ce.step=m.value),Array.isArray($.value)&&(ce.connect=!0),ce}),w=xn(function(){var ce={id:O.value,style:N.value};return E.value&&(ce.disabled=!0),ce}),M=xn(function(){return Array.isArray($.value)}),L=function(){var ce=V.value.get();return Array.isArray(ce)?ce.map(function(ve){return parseFloat(ve)}):parseFloat(ce)},z=function(ce){var ve=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];V.value.set(ce,ve)},B=function(ce){a.emit("input",ce),a.emit("update:modelValue",ce),a.emit("update",ce)},K=function(){V.value=m0.create(j.value,Object.assign({},C.value,u.value)),d.value&&M.value&&S.value>=0&&P(j.value,S.value," - "),V.value.on("set",function(ce){a.emit("change",L())}),V.value.on("update",function(ce){F.value&&B(L())}),F.value=!0},G=function(){V.value.off(),V.value.destroy(),V.value=null},de=function(){F.value=!1,G(),K()};return Pr(K),vi(G),lt(M,de,{immediate:!1}),lt(b,de,{immediate:!1}),lt(v,de,{immediate:!1}),lt(m,de,{immediate:!1}),lt(f,de,{immediate:!1}),lt(p,de,{immediate:!1}),lt(d,de,{immediate:!1}),lt(g,de,{immediate:!1,deep:!0}),lt(S,de,{immediate:!1}),lt(u,de,{immediate:!1,deep:!0}),lt($,function(ce){var ve,Se,Re;Jl(ce)?z(b.value,!1):(M.value&&(ve=ce,Se=L(),Re=Se.slice().sort(),ve.length!==Se.length||!ve.slice().sort().every(function(Je,Qe){return Je===Re[Qe]}))||!M.value&&ce!=L())&&z(ce,!1)},{deep:!0}),{slider:j,slider$:V,isRange:M,sliderProps:w,init:K,destroy:G,refresh:de,update:z,reset:function(){B(R.value)}}}(e,t,{value:n.value,initialValue:n.initialValue,tooltipsFormat:i.tooltipsFormat,tooltipsMerge:i.tooltipsMerge,style:r.style});return po(po(po({},r),i),o)}};bd.render=function(e,t,n,r,i,o){return Ie(),ke("div",Ei(e.sliderProps,{ref:"slider"}),null,16)},bd.__file="src/Slider.vue";var Ql={d:(e,t)=>{for(var n in t)Ql.o(t,n)&&!Ql.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},Wr={};Ql.d(Wr,{vX:()=>dr,KV:()=>Sd,_b:()=>Yr,d2:()=>gt,ZP:()=>v0});class gt{static tokenize(t){var n=t.trim(),r=[],i=[[-2,/^([a-zA-Z_$][a-zA-Z_$1-9]*)\(\s*\)/],[-1,/^([a-zA-Z_$][a-zA-Z_$1-9]*)(\()/],[-11,/^([\<]{2}|[\>]{2,3}|[\*]{1,2}|[\?]{1,2}|[\&]{1,2}|[\|]{1,2}|[\=]{2,3}|[\!][\=]{1,2}|[\>\<][\=]|[\+\-\/\%\|\^\>\<\=\,\:\.])/],[-12,/^([\!\~])/],[-4,/^([-+]{0,1}(?:(?:[0-9]+[.][0-9]+)|(?:[0-9]+)))/,f=>parseFloat(f)],[-4,/^'((?:(\\')|[^'])*)'/],[-4,/^"((?:(\\")|[^"])*)"/],[-5,/^([a-zA-Z_$][a-zA-Z_$1-9]*)/],[-6,/^([\(\[\{])/],[-7,/^([\)\]\}])/]],o=0;e:for(;n!=""&&o<99;){n=n.trimLeft(),o++;for(var s=0;s<i.length;s++){let f=i[s],p=f[1];if(p.test(n)){var a=p.exec(n);if(a!=null){let d=a[0],m=a[1],b=d.length;a[2]&&(b-=a[2].length),n=n.substr(b),f[2]&&(m=f[2](m)),r.push([f[0],m]);continue e}}}}let l,c={NaN:[-4,NaN],undefined:[-4,void 0],void:[-12,"void"],typeof:[-12,"typeof"],null:[-4,null],true:[-4,!0],false:[-4,!1]};for(let f=0;f<r.length;f++)if(l=r[f],l[0]==-5&&c.hasOwnProperty(l[1])){let p=c[l[1]];p&&(l[0]=p[0],l[1]=p[1])}let u=[];for(let f=0;f<r.length;f++)l=r[f],l[0]==-6&&u.push(l[1]),l[0]==-7&&u.pop(),l[0]==-5&&u[u.length-1]=="{"&&(l[0]=-4);for(let f=0;f<r.length;f++){l=r[f];let p=f==0?null:r[f-1];l[0]!=-11||l[1]!="-"&&l[1]!="+"||p!=null&&!gt.isOperator(p)&&p[0]!=-6&&p[1]!=","||(l[0]=-12)}return r}static isInfix(t){return t[0]==-11}static isPrefix(t){return t[0]==-12}static isOperator(t){return t[0]==-11||t[0]==-12}static isFunctionCall(t){return t[0]==-1||t[0]==-2}static isOperatorOrFunctionCall(t){return gt.isOperator(t)||gt.isFunctionCall(t)}static isLiteral(t){return t[0]==-4}}const It=class{static getPrecedence(t){if(gt.isFunctionCall(t))return 100;if(gt.isOperator(t))return It.precendenceHash[t[1]]+1;if(gt.isLiteral(t)||t[0]==-5)return 100;throw new Error("Could not get precedence of token:"+JSON.stringify(t))}static isRightAssociative(t){return It.rightAssociative.indexOf(t[1])>-1}static createPrecendenceHash(t){It.precendenceHash===null&&(It.precendenceHash={},It.precendence.forEach(function(n,r){n.forEach?n.forEach(function(i){It.precendenceHash[i]=r}):It.precendenceHash[n]=r}))}static parse(t){It.createPrecendenceHash();let n,r=[],i=0;for(let o=0;o<t.length;o++)n=t[o],o==0||t[o-1],n[0]!=-12||n[1]!="-"&&n[1]!="+"||(n[1]=="+"?t.splice(o,1):n[1]="+/"+n[1]);for(let o=0;o<t.length;o++)if(n=t[o],n[0]==-6){let s=o==0?null:t[o-1],a=s!=null&&!gt.isOperator(s)&&s[0]!=-6&&s[1]!=",";n[1]=="["&&a&&n.push([-11,"."])}for(let o=0;o<t.length&&(i++,!(i>1e3));o++){let s=t[o];if(gt.isOperatorOrFunctionCall(s)){let a,l=It.getPrecedence(s),c=0,u=0;for(c=0;o+c<t.length-1;c++){if(a=t[o+c+1],a[0]==-7){if(u--,u<0)break;continue}if(a[0]==-6){u++;continue}if(u>0)continue;if(a==null){console.log("Warning: ran too long. This should not happen");break}let f=It.getPrecedence(a,t[o+c]);if(!(l<f)){if(l!=f){if(l>f)break;break}if(!It.isRightAssociative(a)||r.indexOf(a)>=0)break}}if(c>0){let f=t.splice(o,1);r.push(f[0]),t.splice(o+c,0,f[0]),o--}}}return t.filter(o=>!(o[1]=="("||o[1]==")"))}};let Yr=It;Sr(Yr,"precendence",[",",["?",":"],"??","||","&&","|","^","&",["==","!=","===","!=="],["<",">","<=",">="],["<<",">>",">>>"],["+","-"],["*","/","%"],"**",["!","~","+/-","+/+","typeof","void"],"."]),Sr(Yr,"rightAssociative",["?",":","**","!","~","+/-","+/+","typeof","void"]),Sr(Yr,"precendenceHash",null);class Ms extends Array{toArray(){return this.slice(0)}}class g0{constructor(t,n){this.a=t,this.b=n}}const Gt=class{static setGlobalContext(t,n="global"){Gt.contexts[n]=t}static getVariable(t,n,r=null){return n.hasOwnProperty(t)?n[t]:r!=null&&Gt.contexts.hasOwnProperty(r)&&Gt.contexts[r].hasOwnProperty(t)?Gt.contexts[r][t]:void 0}static evaluate(t,n={},r=null){let i,o,s=[];for(let a=0;a<t.length;a++){let l=t[a],c=l[0],u=l[1];if(c==-4)s.push(u);else if(gt.isInfix(l)){o=s.pop(),i=s.pop();let f=Gt.ops[u](i,o);s.push(f)}else if(gt.isPrefix(l))s.push(Gt.ops[u](s.pop()));else if(l[0]==-5){if(a<t.length-1&&t[a+1][1]=="."){s.push(l[1]);continue}let f=l[1];s.push(Gt.getVariable(f,n,r))}else if(c==-6)s.push(l);else if(c==-7){let f,p=[];if(i=s.pop(),i[0]==-6?f=i:(f=s.pop(),p=i instanceof Ms?i.toArray():[i]),u=="]"){if(f[1]!="[")throw Error("Bracket mismatch");if(f[2]){let d=f[2],m=d[1];gt.isInfix(d)&&s.push(Gt.ops[m](s.pop(),p[0]))}else s.push(p)}else if(u=="}"){if(f[1]!="{")throw Error("Curly bracket mismatch");let d={};p.forEach(m=>{d[m.a]=m.b}),s.push(d)}}else if(gt.isFunctionCall(l)){let f=l[1],p=Gt.getVariable(f,n,r);if(p==null)throw new Error("Function does not exist: "+f);if(l[0]==-2)s.push(p());else{let d=s.pop(),m=[];d instanceof Ms?m=d:m.push(d),s.push(p(...m))}}}return s[0]}};let dr=Gt;Sr(dr,"ops",{",":(t,n)=>t instanceof Ms?(t.push(n),t):new Ms(t,n),":":(t,n)=>new g0(t,n),"?":(t,n)=>t?n.a:n.b,"??":(t,n)=>t!=null?t:n,"||":(t,n)=>t||n,"&&":(t,n)=>t&&n,"|":(t,n)=>t|n,"^":(t,n)=>t^n,"&":(t,n)=>t&n,"==":(t,n)=>t==n,"!=":(t,n)=>t!=n,"===":(t,n)=>t===n,"!==":(t,n)=>t!==n,"<":(t,n)=>t<n,">":(t,n)=>t>n,"<=":(t,n)=>t<=n,">=":(t,n)=>t>=n,"<<":(t,n)=>t<<n,">>":(t,n)=>t>>n,">>>":(t,n)=>t>>>n,"+":(t,n)=>t+n,"-":(t,n)=>t-n,"*":(t,n)=>t*n,"/":(t,n)=>t/n,"%":(t,n)=>t%n,"**":(t,n)=>t**n,"!":t=>!t,"~":t=>~t,"+/-":t=>-t,"+/+":t=>t,typeof:t=>typeof t,".":(t,n)=>t[n],void:t=>{}}),Sr(dr,"contexts",{});class Sd{constructor(t=""){this.setExpression(t),this.extra={functions:{},variables:{}}}setExpression(t=""){this.expression=t,this.tokens=void 0,this.rpn=void 0}tokenize(){return this.tokens==null&&(this.tokens=gt.tokenize(this.expression)),this.tokens}parse(){return this.rpn==null&&(this.rpn=Yr.parse(this.tokenize())),this.rpn}setLocalContext(t){this.localContext=t}static setGlobalContext(t,n="global"){dr.setGlobalContext(t,n)}evaluate(t,n){return t!==void 0&&(typeof t=="string"?n=t:this.setLocalContext(t)),n==null&&dr.contexts.hasOwnProperty("global")&&(n="global"),dr.evaluate(this.parse(),this.localContext,n)}}const v0=Sd;Wr.vX;Wr.KV;Wr._b;Wr.d2;Wr.ZP;if(typeof Zi=="undefined")var Zi=window;var y0=Object.create,ql=Object.defineProperty,b0=Object.getPrototypeOf,S0=Object.prototype.hasOwnProperty,E0=Object.getOwnPropertyNames,O0=Object.getOwnPropertyDescriptor,w0=e=>ql(e,"__esModule",{value:!0}),Vt=(e,t)=>()=>(t||(t={exports:{}},e(t.exports,t)),t.exports),T0=(e,t,n)=>{if(w0(e),t&&typeof t=="object"||typeof t=="function")for(let r of E0(t))!S0.call(e,r)&&r!=="default"&&ql(e,r,{get:()=>t[r],enumerable:!(n=O0(t,r))||n.enumerable});return e},P0=e=>e&&e.__esModule?e:T0(ql(e!=null?y0(b0(e)):{},"default",{value:e,enumerable:!0}),e),Ed=Vt((e,t)=>{function n(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}t.exports=n}),x0=Vt((e,t)=>{var n=typeof Zi=="object"&&Zi&&Zi.Object===Object&&Zi;t.exports=n}),Od=Vt((e,t)=>{var n=x0(),r=typeof self=="object"&&self&&self.Object===Object&&self,i=n||r||Function("return this")();t.exports=i}),C0=Vt((e,t)=>{var n=Od(),r=function(){return n.Date.now()};t.exports=r}),wd=Vt((e,t)=>{var n=Od(),r=n.Symbol;t.exports=r}),M0=Vt((e,t)=>{var n=wd(),r=Object.prototype,i=r.hasOwnProperty,o=r.toString,s=n?n.toStringTag:void 0;function a(l){var c=i.call(l,s),u=l[s];try{l[s]=void 0;var f=!0}catch(d){}var p=o.call(l);return f&&(c?l[s]=u:delete l[s]),p}t.exports=a}),A0=Vt((e,t)=>{var n=Object.prototype,r=n.toString;function i(o){return r.call(o)}t.exports=i}),N0=Vt((e,t)=>{var n=wd(),r=M0(),i=A0(),o="[object Null]",s="[object Undefined]",a=n?n.toStringTag:void 0;function l(c){return c==null?c===void 0?s:o:a&&a in Object(c)?r(c):i(c)}t.exports=l}),R0=Vt((e,t)=>{function n(r){return r!=null&&typeof r=="object"}t.exports=n}),I0=Vt((e,t)=>{var n=N0(),r=R0(),i="[object Symbol]";function o(s){return typeof s=="symbol"||r(s)&&n(s)==i}t.exports=o}),$0=Vt((e,t)=>{var n=Ed(),r=I0(),i=0/0,o=/^\s+|\s+$/g,s=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;function u(f){if(typeof f=="number")return f;if(r(f))return i;if(n(f)){var p=typeof f.valueOf=="function"?f.valueOf():f;f=n(p)?p+"":p}if(typeof f!="string")return f===0?f:+f;f=f.replace(o,"");var d=a.test(f);return d||l.test(f)?c(f.slice(2),d?2:8):s.test(f)?i:+f}t.exports=u}),L0=Vt((e,t)=>{var n=Ed(),r=C0(),i=$0(),o="Expected a function",s=Math.max,a=Math.min;function l(c,u,f){var p,d,m,b,v,S,g=0,O=!1,E=!1,$=!0;if(typeof c!="function")throw new TypeError(o);u=i(u)||0,n(f)&&(O=!!f.leading,E="maxWait"in f,m=E?s(i(f.maxWait)||0,u):m,$="trailing"in f?!!f.trailing:$);function R(M){var L=p,z=d;return p=d=void 0,g=M,b=c.apply(z,L),b}function T(M){return g=M,v=setTimeout(j,u),O?R(M):b}function P(M){var L=M-S,z=M-g,B=u-L;return E?a(B,m-z):B}function N(M){var L=M-S,z=M-g;return S===void 0||L>=u||L<0||E&&z>=m}function j(){var M=r();if(N(M))return V(M);v=setTimeout(j,P(M))}function V(M){return v=void 0,$&&p?R(M):(p=d=void 0,b)}function F(){v!==void 0&&clearTimeout(v),g=0,p=S=d=v=void 0}function C(){return v===void 0?b:V(r())}function w(){var M=r(),L=N(M);if(p=arguments,d=this,S=M,L){if(v===void 0)return T(S);if(E)return clearTimeout(v),v=setTimeout(j,u),R(S)}return v===void 0&&(v=setTimeout(j,u)),b}return w.cancel=F,w.flush=C,w}t.exports=l}),D0=P0(L0()),F0=D0.default;function j0(){let e=[],t=[];function n(g,O){g.forEach(E=>{E.call(null,O)})}this.onSingleTap=function(g){typeof g=="function"&&!e.includes(g)&&e.push(g)},this.onDoubleTap=function(g){typeof g=="function"&&!t.includes(g)&&t.push(g)},this.attach=function(g){if(!(g instanceof Element)){console.error("TapDetector.attach: arg must be an Element");return}g.addEventListener("touchstart",c),g.addEventListener("touchmove",f),g.addEventListener("touchend",u),g.addEventListener("mousedown",p),g.addEventListener("mouseup",d),g.addEventListener("mousemove",m)},this.detach=function(g){g.removeEventListener("touchstart",c),g.removeEventListener("touchmove",f),g.removeEventListener("touchend",u),g.removeEventListener("mousedown",p),g.removeEventListener("mouseup",d),g.removeEventListener("mousemove",m)};let r=!1,i=0,o=0,s=0,a=0,l=0;function c(g){r=!0,g.touches.length===1&&b(g.touches[0].clientX,g.touches[0].clientY)}function u(g){g.touches.length===0&&v()}function f(g){g.touches.length===1&&S(g.touches[0].clientX,g.touches[0].clientY)}function p(g){r||b(g.clientX,g.clientY)}function d(g){r||v()}function m(g){r||g.button===0&&S(g.clientX,g.clientY)}function b(g,O){a=g,l=O,s=0}function v(){let g=Date.now();s<10&&(g-i<300?o+=1:o=1,i=Date.now(),n(e,{clientX:a,clientY:l}),o===2&&(n(t,{clientX:a,clientY:l}),o=0)),s=0}function S(g,O){let E=a-g,$=l-O;s+=Math.sqrt(E*E+$*$),a=g,l=O}}const V0={props:{minScale:{type:Number,default:1},maxScale:{type:Number,default:5},zoomed:{type:Boolean,default:!1},resetTrigger:{type:Number,default:1e5},aspectRatio:{type:Number,default:1},backgroundColor:{type:String,default:"transparent"},pivot:{type:String,default:"cursor"},zoomingElastic:{type:Boolean,default:!0},limitTranslation:{type:Boolean,default:!0},doubleClickToZoom:{type:Boolean,default:!0},mouseWheelToZoom:{type:Boolean,default:!0},lockPanOnNoScale:{type:Boolean,default:!0}},data(){return{containerWidth:1,containerHeight:1,containerLeft:0,containerTop:0,translateX:0,animTranslateX:0,translateY:0,animTranslateY:0,scale:1,animScale:1,lastFullWheelTime:0,lastWheelTime:0,lastWheelDirection:"y",isPointerDown:!1,pointerPosX:-1,pointerPosY:-1,twoFingerInitDist:0,panLocked:!0,raf:null,tapDetector:null}},computed:{wrapperStyle(){let e=this.containerWidth*this.animTranslateX,t=this.containerHeight*this.animTranslateY;return{transform:[`translate(${e}px, ${t}px)`,`scale(${this.animScale})`].join(" ")}}},watch:{scale(e){e!==1&&(this.$emit("update:zoomed",!0),this.panLocked=!1)},resetTrigger:"reset"},mounted(){this.tapDetector=new j0,this.tapDetector.attach(this.$refs.root),this.doubleClickToZoom&&this.tapDetector.onDoubleTap(this.onDoubleTap),window.addEventListener("resize",this.onWindowResize),this.onWindowResize(),this.refreshContainerPos(),this.loop()},beforeUnmount(){this.tapDetector.detach(this.$refs.root),window.removeEventListener("resize",this.onWindowResize),window.cancelAnimationFrame(this.raf)},methods:{reset(){this.scale=1,this.panLocked=!0,this.translateX=0,this.translateY=0},zoomIn(e=2){this.tryToScale(e),this.onInteractionEnd()},zoomOut(e=.5){this.tryToScale(e),this.onInteractionEnd()},tryToScale(e){let t=this.scale*e;if(this.zoomingElastic){if(t<this.minScale||t>this.maxScale){let n=Math.log2(e);n*=.2,e=Math.pow(2,n),t=this.scale*e}}else t<this.minScale?t=this.minScale:t>this.maxScale&&(t=this.maxScale);if(e=t/this.scale,this.scale=t,this.pivot!=="image-center"){let n=(this.pointerPosX-this.containerLeft)/this.containerWidth,r=(this.pointerPosY-this.containerTop)/this.containerHeight;this.translateX=(.5+this.translateX-n)*e+n-.5,this.translateY=(.5+this.translateY-r)*e+r-.5}},setPointerPosCenter(){this.pointerPosX=this.containerLeft+this.containerWidth/2,this.pointerPosY=this.containerTop+this.containerHeight/2},onPointerMove(e,t){if(this.isPointerDown){let n=e-this.pointerPosX,r=t-this.pointerPosY;(!this.lockPanOnNoScale||!this.panLocked)&&(this.translateX+=n/this.containerWidth,this.translateY+=r/this.containerHeight)}this.pointerPosX=e,this.pointerPosY=t},onInteractionEnd:F0(function(){this.limit(),this.panLocked=this.scale===1,this.$emit("update:zoomed",!this.panLocked)},100),limit(){if(this.scale<this.minScale?this.scale=this.minScale:this.scale>this.maxScale&&this.tryToScale(this.maxScale/this.scale),this.limitTranslation){let e=this.calcTranslateLimit();Math.abs(this.translateX)>e.x&&(this.translateX*=e.x/Math.abs(this.translateX)),Math.abs(this.translateY)>e.y&&(this.translateY*=e.y/Math.abs(this.translateY))}},calcTranslateLimit(){if(this.getMarginDirection()==="y"){let e=this.containerWidth/this.aspectRatio/this.containerHeight,t=(this.scale*e-1)/2;return t<0&&(t=0),{x:(this.scale-1)/2,y:t}}else{let e=this.containerHeight*this.aspectRatio/this.containerWidth,t=(this.scale*e-1)/2;return t<0&&(t=0),{x:t,y:(this.scale-1)/2}}},getMarginDirection(){return this.containerWidth/this.containerHeight>this.aspectRatio?"x":"y"},onDoubleTap(e){this.scale===1?(e.clientX>0&&(this.pointerPosX=e.clientX,this.pointerPosY=e.clientY),this.tryToScale(Math.min(3,this.maxScale))):this.reset(),this.onInteractionEnd()},onWindowResize(){let e=window.getComputedStyle(this.$refs.root);this.containerWidth=parseFloat(e.width),this.containerHeight=parseFloat(e.height),this.setPointerPosCenter(),this.limit()},refreshContainerPos(){let e=this.$refs.root.getBoundingClientRect();this.containerLeft=e.left,this.containerTop=e.top},loop(){this.animScale=this.gainOn(this.animScale,this.scale),this.animTranslateX=this.gainOn(this.animTranslateX,this.translateX),this.animTranslateY=this.gainOn(this.animTranslateY,this.translateY),this.raf=window.requestAnimationFrame(this.loop)},gainOn(e,t){let n=(t-e)*.3;return Math.abs(n)>1e-5?e+n:t},onMouseWheel(e){if(!this.mouseWheelToZoom)return;e.preventDefault(),e.detail&&(e.wheelDelta=e.detail*-10);let t=Date.now();Math.abs(e.wheelDelta)===120?t-this.lastFullWheelTime>50&&(this.onMouseWheelDo(e.wheelDelta),this.lastFullWheelTime=t):(t-this.lastWheelTime>50&&typeof e.deltaX=="number"&&(this.lastWheelDirection=e.detail==0&&Math.abs(e.deltaX)>Math.abs(e.deltaY)?"x":"y",this.lastWheelDirection==="x"&&this.$emit("swipe",e.deltaX>0?"left":"right")),this.lastWheelDirection==="y"&&this.onMouseWheelDo(e.wheelDelta)),this.lastWheelTime=t},onMouseWheelDo(e){let t=Math.pow(1.25,e/120);this.tryToScale(t),this.onInteractionEnd()},onMouseDown(e){this.refreshContainerPos(),this.isPointerDown=!0,this.pointerPosX=e.clientX,this.pointerPosY=e.clientY},onMouseUp(e){this.isPointerDown=!1,this.onInteractionEnd()},onMouseMove(e){this.onPointerMove(e.clientX,e.clientY)},onTouchStart(e){if(e.touches.length===1)this.refreshContainerPos(),this.pointerPosX=e.touches[0].clientX,this.pointerPosY=e.touches[0].clientY,this.isPointerDown=!0;else if(e.touches.length===2){this.isPointerDown=!0,this.pointerPosX=(e.touches[0].clientX+e.touches[1].clientX)/2,this.pointerPosY=(e.touches[0].clientY+e.touches[1].clientY)/2;let t=e.touches[0].clientX-e.touches[1].clientX,n=e.touches[0].clientY-e.touches[1].clientY;this.twoFingerInitDist=Math.sqrt(t*t+n*n)}},onTouchEnd(e){e.touches.length===0?(this.isPointerDown=!1,Math.abs(this.scale-1)<.1&&(this.scale=1),this.onInteractionEnd()):e.touches.length===1&&(this.pointerPosX=e.touches[0].clientX,this.pointerPosY=e.touches[0].clientY)},onTouchMove(e){if(e.touches.length===1)this.onPointerMove(e.touches[0].clientX,e.touches[0].clientY);else if(e.touches.length===2){let t=(e.touches[0].clientX+e.touches[1].clientX)/2,n=(e.touches[0].clientY+e.touches[1].clientY)/2;this.onPointerMove(t,n),this.pointerPosX=t,this.pointerPosY=n;let r=e.touches[0].clientX-e.touches[1].clientX,i=e.touches[0].clientY-e.touches[1].clientY,o=Math.sqrt(r*r+i*i);this.tryToScale(o/this.twoFingerInitDist),this.twoFingerInitDist=o}}}};function z0(e,t,n,r,i,o){return Ie(),Si("div",{ref:"root",class:"vue-zoomer",style:Zt({backgroundColor:n.backgroundColor}),onMousewheel:t[0]||(t[0]=(...s)=>o.onMouseWheel&&o.onMouseWheel(...s)),onDOMMouseScroll:t[1]||(t[1]=(...s)=>o.onMouseWheel&&o.onMouseWheel(...s)),onMousedown:t[2]||(t[2]=(...s)=>o.onMouseDown&&o.onMouseDown(...s)),onMouseup:t[3]||(t[3]=(...s)=>o.onMouseUp&&o.onMouseUp(...s)),onMousemove:t[4]||(t[4]=(...s)=>o.onMouseMove&&o.onMouseMove(...s)),onMouseout:t[5]||(t[5]=(...s)=>o.setPointerPosCenter&&o.setPointerPosCenter(...s)),onTouchstart:t[6]||(t[6]=(...s)=>o.onTouchStart&&o.onTouchStart(...s)),onTouchend:t[7]||(t[7]=(...s)=>o.onTouchEnd&&o.onTouchEnd(...s)),onTouchmove:t[8]||(t[8]=(...s)=>o.onTouchMove&&o.onTouchMove(...s))},[Ho("div",{class:"zoomer",style:Zt(o.wrapperStyle)},[qe(e.$slots,"default",{},void 0,!0)],4)],36)}var B0=dd(V0,[["render",z0],["__scopeId","data-v-3ce6d41b"]]);const H0=50,k0={props:{modelValue:{type:Number,required:!0},list:{type:Array,required:!0},backgroundColor:{type:String,default:"#333"},pivot:{type:String,default:"cursor"},zoomingElastic:{type:Boolean,default:!0},limitTranslation:{type:Boolean,default:!0},doubleClickToZoom:{type:Boolean,default:!0},mouseWheelToZoom:{type:Boolean,default:!0}},data(){return{zoomerRefs:[],containerWidth:1,containerHeight:1,selIndex:this.modelValue,animSelIndex:this.modelValue,currentZoomed:!1,autoSliding:!1,imageAspectRatios:[],isPointerDown:!1,lastPointerX:0,slideOffsetX:0}},computed:{middleStyle(){return{left:`${0+this.slideOffsetX}px`}},leftStyle(){return{left:`${-this.containerWidth+this.slideOffsetX}px`}},rightStyle(){return{left:`${this.containerWidth+this.slideOffsetX}px`}},slideThresh(){return Math.max(H0,this.containerWidth*.1)}},watch:{modelValue(e){e!==this.animSelIndex&&(this.selIndex=e,this.animSelIndex=e)},selIndex(){this.$nextTick(()=>{this.zoomerRefs.forEach(e=>{e.refreshContainerPos()})})}},mounted(){window.addEventListener("resize",this.onWindowResize),this.onWindowResize()},unmounted(){window.removeEventListener("resize",this.onWindowResize)},methods:{reset(){this.zoomerRefs.forEach(e=>{e.reset()})},zoomIn(e){this.zoomerRefs[1]&&this.zoomerRefs[1].zoomIn(e)},zoomOut(e){this.zoomerRefs[1]&&this.zoomerRefs[1].zoomOut(e)},onWindowResize(){let e=window.getComputedStyle(this.$refs.root);this.containerWidth=parseFloat(e.width),this.containerHeight=parseFloat(e.height)},onPointerMove(e){if(this.isPointerDown&&!this.currentZoomed){let t=this.selIndex===0&&e>0&&this.slideOffsetX+e>0||this.selIndex===this.list.length-1&&e<0&&this.slideOffsetX+e<0?.3:1;this.slideOffsetX+=e*t}},onPointerUp(){this.slideOffsetX<-this.slideThresh?this.paginate(1):this.slideOffsetX>this.slideThresh?this.paginate(-1):this.paginate(0)},onImageDragStart(e){return e.preventDefault(),!1},paginate(e){let t=this.selIndex+e;if(t<0||t>=this.list.length){this.slideOffsetX=0;return}this.slideOffsetX=this.containerWidth*-e,this.autoSliding=!0,this.$emit("update:modelValue",t),this.animSelIndex=t,setTimeout(()=>{this.selIndex=t,this.slideOffsetX=0,this.autoSliding=!1},400)},onMouseDown(e){this.isPointerDown=!0,this.lastPointerX=e.clientX},onMouseUp(e){this.isPointerDown=!1,this.onPointerUp()},onMouseMove(e){this.isPointerDown&&(this.onPointerMove(e.clientX-this.lastPointerX),this.lastPointerX=e.clientX)},onTouchStart(e){e.touches.length===1&&(this.isPointerDown=!0,this.lastPointerX=e.touches[0].clientX)},onTouchEnd(e){e.touches.length===0&&(this.isPointerDown=!1,this.onPointerUp())},onTouchMove(e){e.touches.length===1&&(this.onPointerMove(e.touches[0].clientX-this.lastPointerX),this.lastPointerX=e.touches[0].clientX)},onImageLoad(e,t){let n=t.target.naturalWidth/t.target.naturalHeight;this.imageAspectRatios[e]=n},onImageSwipe(e){this.paginate(e=="right"?-1:1)}}},U0=["src","onLoad"];function K0(e,t,n,r,i,o){const s=er("v-zoomer");return Ie(),Si("div",{ref:"root",class:vn([{anim:i.autoSliding&&!i.isPointerDown},"vue-zoomer-gallery"]),style:Zt({"background-color":n.backgroundColor}),onMousemove:t[2]||(t[2]=(...a)=>o.onMouseMove&&o.onMouseMove(...a)),onMousedown:t[3]||(t[3]=(...a)=>o.onMouseDown&&o.onMouseDown(...a)),onMouseout:t[4]||(t[4]=(...a)=>o.onMouseUp&&o.onMouseUp(...a)),onMouseup:t[5]||(t[5]=(...a)=>o.onMouseUp&&o.onMouseUp(...a)),onTouchstart:t[6]||(t[6]=(...a)=>o.onTouchStart&&o.onTouchStart(...a)),onTouchend:t[7]||(t[7]=(...a)=>o.onTouchEnd&&o.onTouchEnd(...a)),onTouchmove:t[8]||(t[8]=Xe((...a)=>o.onTouchMove&&o.onTouchMove(...a),["prevent"]))},[(Ie(),Si(Ye,null,ko(3,(a,l)=>he(s,{ref:c=>{i.zoomerRefs[l]=c},key:l+"-"+i.selIndex,class:vn([["left","middle","right"][l],"slide"]),style:Zt([o.leftStyle,o.middleStyle,o.rightStyle][l]),"max-scale":10,zoomed:i.currentZoomed,"onUpdate:zoomed":t[1]||(t[1]=c=>i.currentZoomed=c),"reset-trigger":l,"aspect-ratio":i.imageAspectRatios[i.selIndex+l-1]||1,pivot:n.pivot,"zooming-elastic":n.zoomingElastic,"limit-translation":n.limitTranslation,"double-click-to-zoom":n.doubleClickToZoom,"mouse-wheel-to-zoom":n.mouseWheelToZoom,onSwipe:o.onImageSwipe},{default:qt(()=>[i.selIndex+l-1>-1&&i.selIndex+l-1<n.list.length?(Ie(),Si("img",{key:0,src:n.list[i.selIndex+l-1],draggable:"false",style:{"object-fit":"contain",width:"100%",height:"100%"},onLoad:c=>o.onImageLoad(i.selIndex+l-1,c),onDragstart:t[0]||(t[0]=(...c)=>o.onImageDragStart&&o.onImageDragStart(...c))},null,40,U0)):Lt("",!0)]),_:2},1032,["class","style","zoomed","reset-trigger","aspect-ratio","pivot","zooming-elastic","limit-translation","double-click-to-zoom","mouse-wheel-to-zoom","onSwipe"])),64))],38)}var W0=dd(k0,[["render",K0],["__scopeId","data-v-1af1e362"]]),O1={install(e){e.component("VZoomer",B0),e.component("VZoomerGallery",W0)}},Nt="top",zt="bottom",Bt="right",Rt="left",_l="auto",Ji=[Nt,zt,Bt,Rt],Xr="start",Qi="end",Y0="clippingParents",Td="viewport",qi="popper",X0="reference",Pd=Ji.reduce(function(e,t){return e.concat([t+"-"+Xr,t+"-"+Qi])},[]),As=[].concat(Ji,[_l]).reduce(function(e,t){return e.concat([t,t+"-"+Xr,t+"-"+Qi])},[]),G0="beforeRead",Z0="read",J0="afterRead",Q0="beforeMain",q0="main",_0="afterMain",eS="beforeWrite",tS="write",nS="afterWrite",rS=[G0,Z0,J0,Q0,q0,_0,eS,tS,nS];function on(e){return e?(e.nodeName||"").toLowerCase():null}function Yt(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function _i(e){var t=Yt(e).Element;return e instanceof t||e instanceof Element}function Ht(e){var t=Yt(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function xd(e){if(typeof ShadowRoot=="undefined")return!1;var t=Yt(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function iS(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!Ht(o)||!on(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(s){var a=i[s];a===!1?o.removeAttribute(s):o.setAttribute(s,a===!0?"":a)}))})}function oS(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},s=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),a=s.reduce(function(l,c){return l[c]="",l},{});!Ht(i)||!on(i)||(Object.assign(i.style,a),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}var sS={name:"applyStyles",enabled:!0,phase:"write",fn:iS,effect:oS,requires:["computeStyles"]};function sn(e){return e.split("-")[0]}function Gr(e,t){var n=e.getBoundingClientRect(),r=1,i=1;return{width:n.width/r,height:n.height/i,top:n.top/i,right:n.right/r,bottom:n.bottom/i,left:n.left/r,x:n.left/r,y:n.top/i}}function ec(e){var t=Gr(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Cd(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&xd(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function gn(e){return Yt(e).getComputedStyle(e)}function aS(e){return["table","td","th"].indexOf(on(e))>=0}function Bn(e){return((_i(e)?e.ownerDocument:e.document)||window.document).documentElement}function Ns(e){return on(e)==="html"?e:e.assignedSlot||e.parentNode||(xd(e)?e.host:null)||Bn(e)}function Md(e){return!Ht(e)||gn(e).position==="fixed"?null:e.offsetParent}function lS(e){var t=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,n=navigator.userAgent.indexOf("Trident")!==-1;if(n&&Ht(e)){var r=gn(e);if(r.position==="fixed")return null}for(var i=Ns(e);Ht(i)&&["html","body"].indexOf(on(i))<0;){var o=gn(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function eo(e){for(var t=Yt(e),n=Md(e);n&&aS(n)&&gn(n).position==="static";)n=Md(n);return n&&(on(n)==="html"||on(n)==="body"&&gn(n).position==="static")?t:n||lS(e)||t}function tc(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}var Hn=Math.max,to=Math.min,Rs=Math.round;function Is(e,t,n){return Hn(e,to(t,n))}function Ad(){return{top:0,right:0,bottom:0,left:0}}function Nd(e){return Object.assign({},Ad(),e)}function Rd(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var cS=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,Nd(typeof t!="number"?t:Rd(t,Ji))};function uS(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,a=sn(n.placement),l=tc(a),c=[Rt,Bt].indexOf(a)>=0,u=c?"height":"width";if(!(!o||!s)){var f=cS(i.padding,n),p=ec(o),d=l==="y"?Nt:Rt,m=l==="y"?zt:Bt,b=n.rects.reference[u]+n.rects.reference[l]-s[l]-n.rects.popper[u],v=s[l]-n.rects.reference[l],S=eo(o),g=S?l==="y"?S.clientHeight||0:S.clientWidth||0:0,O=b/2-v/2,E=f[d],$=g-p[u]-f[m],R=g/2-p[u]/2+O,T=Is(E,R,$),P=l;n.modifiersData[r]=(t={},t[P]=T,t.centerOffset=T-R,t)}}function fS(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||!Cd(t.elements.popper,i)||(t.elements.arrow=i))}var pS={name:"arrow",enabled:!0,phase:"main",fn:uS,effect:fS,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Zr(e){return e.split("-")[1]}var dS={top:"auto",right:"auto",bottom:"auto",left:"auto"};function hS(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:Rs(Rs(t*i)/i)||0,y:Rs(Rs(n*i)/i)||0}}function Id(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,s=e.offsets,a=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,f=u===!0?hS(s):typeof u=="function"?u(s):s,p=f.x,d=p===void 0?0:p,m=f.y,b=m===void 0?0:m,v=s.hasOwnProperty("x"),S=s.hasOwnProperty("y"),g=Rt,O=Nt,E=window;if(c){var $=eo(n),R="clientHeight",T="clientWidth";$===Yt(n)&&($=Bn(n),gn($).position!=="static"&&a==="absolute"&&(R="scrollHeight",T="scrollWidth")),$=$,(i===Nt||(i===Rt||i===Bt)&&o===Qi)&&(O=zt,b-=$[R]-r.height,b*=l?1:-1),(i===Rt||(i===Nt||i===zt)&&o===Qi)&&(g=Bt,d-=$[T]-r.width,d*=l?1:-1)}var P=Object.assign({position:a},c&&dS);if(l){var N;return Object.assign({},P,(N={},N[O]=S?"0":"",N[g]=v?"0":"",N.transform=(E.devicePixelRatio||1)<=1?"translate("+d+"px, "+b+"px)":"translate3d("+d+"px, "+b+"px, 0)",N))}return Object.assign({},P,(t={},t[O]=S?b+"px":"",t[g]=v?d+"px":"",t.transform="",t))}function mS(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,s=o===void 0?!0:o,a=n.roundOffsets,l=a===void 0?!0:a,c={placement:sn(t.placement),variation:Zr(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Id(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Id(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var gS={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:mS,data:{}},$s={passive:!0};function vS(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,s=r.resize,a=s===void 0?!0:s,l=Yt(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(u){u.addEventListener("scroll",n.update,$s)}),a&&l.addEventListener("resize",n.update,$s),function(){o&&c.forEach(function(u){u.removeEventListener("scroll",n.update,$s)}),a&&l.removeEventListener("resize",n.update,$s)}}var yS={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:vS,data:{}},bS={left:"right",right:"left",bottom:"top",top:"bottom"};function Ls(e){return e.replace(/left|right|bottom|top/g,function(t){return bS[t]})}var SS={start:"end",end:"start"};function $d(e){return e.replace(/start|end/g,function(t){return SS[t]})}function nc(e){var t=Yt(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function rc(e){return Gr(Bn(e)).left+nc(e).scrollLeft}function ES(e){var t=Yt(e),n=Bn(e),r=t.visualViewport,i=n.clientWidth,o=n.clientHeight,s=0,a=0;return r&&(i=r.width,o=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(s=r.offsetLeft,a=r.offsetTop)),{width:i,height:o,x:s+rc(e),y:a}}function OS(e){var t,n=Bn(e),r=nc(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Hn(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=Hn(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+rc(e),l=-r.scrollTop;return gn(i||n).direction==="rtl"&&(a+=Hn(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}function ic(e){var t=gn(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function Ld(e){return["html","body","#document"].indexOf(on(e))>=0?e.ownerDocument.body:Ht(e)&&ic(e)?e:Ld(Ns(e))}function no(e,t){var n;t===void 0&&(t=[]);var r=Ld(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Yt(r),s=i?[o].concat(o.visualViewport||[],ic(r)?r:[]):r,a=t.concat(s);return i?a:a.concat(no(Ns(s)))}function oc(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function wS(e){var t=Gr(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}function Dd(e,t){return t===Td?oc(ES(e)):Ht(t)?wS(t):oc(OS(Bn(e)))}function TS(e){var t=no(Ns(e)),n=["absolute","fixed"].indexOf(gn(e).position)>=0,r=n&&Ht(e)?eo(e):e;return _i(r)?t.filter(function(i){return _i(i)&&Cd(i,r)&&on(i)!=="body"}):[]}function PS(e,t,n){var r=t==="clippingParents"?TS(e):[].concat(t),i=[].concat(r,[n]),o=i[0],s=i.reduce(function(a,l){var c=Dd(e,l);return a.top=Hn(c.top,a.top),a.right=to(c.right,a.right),a.bottom=to(c.bottom,a.bottom),a.left=Hn(c.left,a.left),a},Dd(e,o));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Fd(e){var t=e.reference,n=e.element,r=e.placement,i=r?sn(r):null,o=r?Zr(r):null,s=t.x+t.width/2-n.width/2,a=t.y+t.height/2-n.height/2,l;switch(i){case Nt:l={x:s,y:t.y-n.height};break;case zt:l={x:s,y:t.y+t.height};break;case Bt:l={x:t.x+t.width,y:a};break;case Rt:l={x:t.x-n.width,y:a};break;default:l={x:t.x,y:t.y}}var c=i?tc(i):null;if(c!=null){var u=c==="y"?"height":"width";switch(o){case Xr:l[c]=l[c]-(t[u]/2-n[u]/2);break;case Qi:l[c]=l[c]+(t[u]/2-n[u]/2);break}}return l}function ro(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.boundary,s=o===void 0?Y0:o,a=n.rootBoundary,l=a===void 0?Td:a,c=n.elementContext,u=c===void 0?qi:c,f=n.altBoundary,p=f===void 0?!1:f,d=n.padding,m=d===void 0?0:d,b=Nd(typeof m!="number"?m:Rd(m,Ji)),v=u===qi?X0:qi,S=e.rects.popper,g=e.elements[p?v:u],O=PS(_i(g)?g:g.contextElement||Bn(e.elements.popper),s,l),E=Gr(e.elements.reference),$=Fd({reference:E,element:S,strategy:"absolute",placement:i}),R=oc(Object.assign({},S,$)),T=u===qi?R:E,P={top:O.top-T.top+b.top,bottom:T.bottom-O.bottom+b.bottom,left:O.left-T.left+b.left,right:T.right-O.right+b.right},N=e.modifiersData.offset;if(u===qi&&N){var j=N[i];Object.keys(P).forEach(function(V){var F=[Bt,zt].indexOf(V)>=0?1:-1,C=[Nt,zt].indexOf(V)>=0?"y":"x";P[V]+=j[C]*F})}return P}function xS(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?As:l,u=Zr(r),f=u?a?Pd:Pd.filter(function(m){return Zr(m)===u}):Ji,p=f.filter(function(m){return c.indexOf(m)>=0});p.length===0&&(p=f);var d=p.reduce(function(m,b){return m[b]=ro(e,{placement:b,boundary:i,rootBoundary:o,padding:s})[sn(b)],m},{});return Object.keys(d).sort(function(m,b){return d[m]-d[b]})}function CS(e){if(sn(e)===_l)return[];var t=Ls(e);return[$d(e),t,$d(t)]}function MS(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,a=s===void 0?!0:s,l=n.fallbackPlacements,c=n.padding,u=n.boundary,f=n.rootBoundary,p=n.altBoundary,d=n.flipVariations,m=d===void 0?!0:d,b=n.allowedAutoPlacements,v=t.options.placement,S=sn(v),g=S===v,O=l||(g||!m?[Ls(v)]:CS(v)),E=[v].concat(O).reduce(function(Se,Re){return Se.concat(sn(Re)===_l?xS(t,{placement:Re,boundary:u,rootBoundary:f,padding:c,flipVariations:m,allowedAutoPlacements:b}):Re)},[]),$=t.rects.reference,R=t.rects.popper,T=new Map,P=!0,N=E[0],j=0;j<E.length;j++){var V=E[j],F=sn(V),C=Zr(V)===Xr,w=[Nt,zt].indexOf(F)>=0,M=w?"width":"height",L=ro(t,{placement:V,boundary:u,rootBoundary:f,altBoundary:p,padding:c}),z=w?C?Bt:Rt:C?zt:Nt;$[M]>R[M]&&(z=Ls(z));var B=Ls(z),K=[];if(o&&K.push(L[F]<=0),a&&K.push(L[z]<=0,L[B]<=0),K.every(function(Se){return Se})){N=V,P=!1;break}T.set(V,K)}if(P)for(var G=m?3:1,de=function(Re){var Je=E.find(function(Qe){var ft=T.get(Qe);if(ft)return ft.slice(0,Re).every(function(kt){return kt})});if(Je)return N=Je,"break"},ce=G;ce>0;ce--){var ve=de(ce);if(ve==="break")break}t.placement!==N&&(t.modifiersData[r]._skip=!0,t.placement=N,t.reset=!0)}}var AS={name:"flip",enabled:!0,phase:"main",fn:MS,requiresIfExists:["offset"],data:{_skip:!1}};function jd(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Vd(e){return[Nt,Bt,zt,Rt].some(function(t){return e[t]>=0})}function NS(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,s=ro(t,{elementContext:"reference"}),a=ro(t,{altBoundary:!0}),l=jd(s,r),c=jd(a,i,o),u=Vd(l),f=Vd(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":f})}var RS={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:NS};function IS(e,t,n){var r=sn(e),i=[Rt,Nt].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,s=o[0],a=o[1];return s=s||0,a=(a||0)*i,[Rt,Bt].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}function $S(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,s=As.reduce(function(u,f){return u[f]=IS(f,t.rects,o),u},{}),a=s[t.placement],l=a.x,c=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=s}var LS={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:$S};function DS(e){var t=e.state,n=e.name;t.modifiersData[n]=Fd({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var FS={name:"popperOffsets",enabled:!0,phase:"read",fn:DS,data:{}};function jS(e){return e==="x"?"y":"x"}function VS(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,a=s===void 0?!1:s,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,f=n.padding,p=n.tether,d=p===void 0?!0:p,m=n.tetherOffset,b=m===void 0?0:m,v=ro(t,{boundary:l,rootBoundary:c,padding:f,altBoundary:u}),S=sn(t.placement),g=Zr(t.placement),O=!g,E=tc(S),$=jS(E),R=t.modifiersData.popperOffsets,T=t.rects.reference,P=t.rects.popper,N=typeof b=="function"?b(Object.assign({},t.rects,{placement:t.placement})):b,j={x:0,y:0};if(!!R){if(o||a){var V=E==="y"?Nt:Rt,F=E==="y"?zt:Bt,C=E==="y"?"height":"width",w=R[E],M=R[E]+v[V],L=R[E]-v[F],z=d?-P[C]/2:0,B=g===Xr?T[C]:P[C],K=g===Xr?-P[C]:-T[C],G=t.elements.arrow,de=d&&G?ec(G):{width:0,height:0},ce=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Ad(),ve=ce[V],Se=ce[F],Re=Is(0,T[C],de[C]),Je=O?T[C]/2-z-Re-ve-N:B-Re-ve-N,Qe=O?-T[C]/2+z+Re+Se+N:K+Re+Se+N,ft=t.elements.arrow&&eo(t.elements.arrow),kt=ft?E==="y"?ft.clientTop||0:ft.clientLeft||0:0,Ve=t.modifiersData.offset?t.modifiersData.offset[t.placement][E]:0,ze=R[E]+Je-Ve-kt,vt=R[E]+Qe-Ve;if(o){var x=Is(d?to(M,ze):M,w,d?Hn(L,vt):L);R[E]=x,j[E]=x-w}if(a){var I=E==="x"?Nt:Rt,k=E==="x"?zt:Bt,X=R[$],W=X+v[I],q=X-v[k],ne=Is(d?to(W,ze):W,X,d?Hn(q,vt):q);R[$]=ne,j[$]=ne-X}}t.modifiersData[r]=j}}var zS={name:"preventOverflow",enabled:!0,phase:"main",fn:VS,requiresIfExists:["offset"]};function BS(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function HS(e){return e===Yt(e)||!Ht(e)?nc(e):BS(e)}function kS(e){var t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return n!==1||r!==1}function US(e,t,n){n===void 0&&(n=!1);var r=Ht(t);Ht(t)&&kS(t);var i=Bn(t),o=Gr(e),s={scrollLeft:0,scrollTop:0},a={x:0,y:0};return(r||!r&&!n)&&((on(t)!=="body"||ic(i))&&(s=HS(t)),Ht(t)?(a=Gr(t),a.x+=t.clientLeft,a.y+=t.clientTop):i&&(a.x=rc(i))),{x:o.left+s.scrollLeft-a.x,y:o.top+s.scrollTop-a.y,width:o.width,height:o.height}}function KS(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var s=[].concat(o.requires||[],o.requiresIfExists||[]);s.forEach(function(a){if(!n.has(a)){var l=t.get(a);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function WS(e){var t=KS(e);return rS.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function YS(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function XS(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var zd={placement:"bottom",modifiers:[],strategy:"absolute"};function Bd(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function GS(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,o=i===void 0?zd:i;return function(a,l,c){c===void 0&&(c=o);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},zd,o),modifiersData:{},elements:{reference:a,popper:l},attributes:{},styles:{}},f=[],p=!1,d={state:u,setOptions:function(S){var g=typeof S=="function"?S(u.options):S;b(),u.options=Object.assign({},o,u.options,g),u.scrollParents={reference:_i(a)?no(a):a.contextElement?no(a.contextElement):[],popper:no(l)};var O=WS(XS([].concat(r,u.options.modifiers)));return u.orderedModifiers=O.filter(function(E){return E.enabled}),m(),d.update()},forceUpdate:function(){if(!p){var S=u.elements,g=S.reference,O=S.popper;if(!!Bd(g,O)){u.rects={reference:US(g,eo(O),u.options.strategy==="fixed"),popper:ec(O)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(j){return u.modifiersData[j.name]=Object.assign({},j.data)});for(var E=0;E<u.orderedModifiers.length;E++){if(u.reset===!0){u.reset=!1,E=-1;continue}var $=u.orderedModifiers[E],R=$.fn,T=$.options,P=T===void 0?{}:T,N=$.name;typeof R=="function"&&(u=R({state:u,options:P,name:N,instance:d})||u)}}}},update:YS(function(){return new Promise(function(v){d.forceUpdate(),v(u)})}),destroy:function(){b(),p=!0}};if(!Bd(a,l))return d;d.setOptions(c).then(function(v){!p&&c.onFirstUpdate&&c.onFirstUpdate(v)});function m(){u.orderedModifiers.forEach(function(v){var S=v.name,g=v.options,O=g===void 0?{}:g,E=v.effect;if(typeof E=="function"){var $=E({state:u,name:S,instance:d,options:O}),R=function(){};f.push($||R)}})}function b(){f.forEach(function(v){return v()}),f=[]}return d}}var ZS=[yS,FS,gS,sS,LS,AS,zS,pS,RS],JS=GS({defaultModifiers:ZS});function QS(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);var n=e.indexOf("Trident/");if(n>0){var r=e.indexOf("rv:");return parseInt(e.substring(r+3,e.indexOf(".",r)),10)}var i=e.indexOf("Edge/");return i>0?parseInt(e.substring(i+5,e.indexOf(".",i)),10):-1}let Ds;function sc(){sc.init||(sc.init=!0,Ds=QS()!==-1)}var Fs={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){sc(),Xo(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const e=document.createElement("object");this._resizeObject=e,e.setAttribute("aria-hidden","true"),e.setAttribute("tabindex",-1),e.onload=this.addResizeHandlers,e.type="text/html",Ds&&this.$el.appendChild(e),e.data="about:blank",Ds||this.$el.appendChild(e)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit("notify",{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!Ds&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const qS=Su("data-v-b329ee4c");yu("data-v-b329ee4c");const _S={class:"resize-observer",tabindex:"-1"};bu();const e1=qS((e,t,n,r,i,o)=>(Ie(),ke("div",_S)));Fs.render=e1;Fs.__scopeId="data-v-b329ee4c";Fs.__file="src/components/ResizeObserver.vue";function io(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?io=function(t){return typeof t}:io=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},io(e)}function Hd(e,t,n,r,i,o,s){try{var a=e[o](s),l=a.value}catch(c){n(c);return}a.done?t(l):Promise.resolve(l).then(r,i)}function hr(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function s(l){Hd(o,r,i,s,a,"next",l)}function a(l){Hd(o,r,i,s,a,"throw",l)}s(void 0)})}}function t1(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Xt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?kd(Object(n),!0).forEach(function(r){t1(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kd(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ud(e){return n1(e)||r1(e)||Kd(e)||i1()}function n1(e){if(Array.isArray(e))return ac(e)}function r1(e){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(e))return Array.from(e)}function Kd(e,t){if(!!e){if(typeof e=="string")return ac(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ac(e,t)}}function ac(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function i1(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
15 |
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lc(e,t){var n;if(typeof Symbol=="undefined"||e[Symbol.iterator]==null){if(Array.isArray(e)||(n=Kd(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
16 |
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,s=!1,a;return{s:function(){n=e[Symbol.iterator]()},n:function(){var l=n.next();return o=l.done,l},e:function(l){s=!0,a=l},f:function(){try{!o&&n.return!=null&&n.return()}finally{if(s)throw a}}}}function Wd(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(io(t[n])==="object"&&e[n]?Wd(e[n],t[n]):e[n]=t[n])}var mr={disabled:!1,offset:[0,5],container:"body",boundary:void 0,instantMove:!1,disposeTimeout:5e3,popperTriggers:[],strategy:"absolute",modifiers:[],popperOptions:{},themes:{tooltip:{placement:"top",triggers:["hover","focus","touch"],hideTriggers:function(t){return[].concat(Ud(t),["click"])},delay:{show:200,hide:0},handleResize:!1,html:!1,loadingContent:"..."},dropdown:{placement:"bottom",triggers:["click"],delay:0,handleResize:!0,autoHide:!0},menu:{$extend:"dropdown",triggers:["hover","focus"],popperTriggers:["hover","focus"],delay:{show:0,hide:400}}}};function He(e,t){var n=mr.themes[e]||{},r;do r=n[t],typeof r=="undefined"?n.$extend?n=mr.themes[n.$extend]||{}:(n=null,r=mr[t]):n=null;while(n);return r}function o1(e){var t=[e],n=mr.themes[e]||{};do n.$extend&&!n.$resetCss?(t.push(n.$extend),n=mr.themes[n.$extend]||{}):n=null;while(n);return t.map(function(r){return"v-popper--theme-".concat(r)})}var js=!1;if(typeof window!="undefined"){js=!1;try{var s1=Object.defineProperty({},"passive",{get:function(){js=!0}});window.addEventListener("test",null,s1)}catch(e){}}var Yd=!1;typeof window!="undefined"&&typeof navigator!="undefined"&&(Yd=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream);function Vs(e,t,n){var r=e.find(function(i){return i.name===t});r||(r={name:t,options:{}},e.push(r)),Object.assign(r.options,n)}var Xd={hover:"mouseenter",focus:"focus",click:"click",touch:"touchstart"},Gd={hover:"mouseleave",focus:"blur",click:"click",touch:"touchend"};function a1(e,t){var n=e.indexOf(t);n!==-1&&e.splice(n,1)}var Jr=[],Qr=null,cc=function(){};typeof window!="undefined"&&(cc=window.Element);var Zd=function(){return{name:"VPopper",props:{theme:{type:String,required:!0},targetNodes:{type:Function,required:!0},referenceNode:{type:Function,required:!0},popperNode:{type:Function,required:!0},arrowNode:{type:Function,default:null},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:function(t){return He(t.theme,"disabled")}},placement:{type:String,default:function(t){return He(t.theme,"placement")},validator:function(t){return As.includes(t)}},delay:{type:[String,Number,Object],default:function(t){return He(t.theme,"delay")}},offset:{type:[Array,Function],default:function(t){return He(t.theme,"offset")}},triggers:{type:Array,default:function(t){return He(t.theme,"triggers")}},showTriggers:{type:[Array,Function],default:function(t){return He(t.theme,"showTriggers")}},hideTriggers:{type:[Array,Function],default:function(t){return He(t.theme,"hideTriggers")}},popperTriggers:{type:Array,default:function(t){return He(t.theme,"popperTriggers")}},popperShowTriggers:{type:[Array,Function],default:function(t){return He(t.theme,"popperShowTriggers")}},popperHideTriggers:{type:[Array,Function],default:function(t){return He(t.theme,"popperHideTriggers")}},container:{type:[String,Object,cc,Boolean],default:function(t){return He(t.theme,"container")}},boundary:{type:[String,cc],default:function(t){return He(t.theme,"boundary")}},strategy:{type:String,validator:function(t){return["absolute","fixed"].includes(t)},default:function(t){return He(t.theme,"strategy")}},modifiers:{type:Array,default:function(t){return He(t.theme,"modifiers")}},popperOptions:{type:Object,default:function(t){return He(t.theme,"popperOptions")}},autoHide:{type:Boolean,default:function(t){return He(t.theme,"autoHide")}},handleResize:{type:Boolean,default:function(t){return He(t.theme,"handleResize")}},instantMove:{type:Boolean,default:function(t){return He(t.theme,"instantMove")}},eagerMount:{type:Boolean,default:function(t){return He(t.theme,"eagerMount")}}},emits:["show","hide","update:shown","apply-show","apply-hide","close-group","close-directive","auto-hide","resize","dispose"],data:function(){return{isShown:!1,isMounted:!1,skipTransition:!1,classes:{showFrom:!1,showTo:!1,hideFrom:!1,hideTo:!0}}},computed:{popperId:function(){return this.ariaId!=null?this.ariaId:this.randomId},shouldMountContent:function(){return this.eagerMount||this.isMounted},slotData:function(){return{popperId:this.popperId,isShown:this.isShown,shouldMountContent:this.shouldMountContent,skipTransition:this.skipTransition,autoHide:this.autoHide,hide:this.hide,handleResize:this.handleResize,onResize:this.onResize,classes:Xt({},this.classes)}}},watch:{shown:"$_autoShowHide",disabled:function(t){t?this.dispose():this.init()},container:function(){var t=this;return hr(function*(){t.isShown&&t.popperInstance&&(t.$_ensureContainer(),yield t.popperInstance.update())})()},triggers:function(){this.$_removeEventListeners(),this.$_addEventListeners()},placement:"$_refreshPopperOptions",offset:"$_refreshPopperOptions",boundary:"$_refreshPopperOptions",strategy:"$_refreshPopperOptions",modifiers:"$_refreshPopperOptions",popperOptions:{handler:"$_refreshPopperOptions",deep:!0}},created:function(){this.randomId="popper_".concat([Math.random(),Date.now()].map(function(t){return t.toString(36).substr(2,10)}).join("_"))},mounted:function(){this.init()},activated:function(){this.$_autoShowHide()},deactivated:function(){this.hide()},beforeUnmount:function(){this.dispose()},methods:{show:function(){var t=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=n.event,i=n.skipDelay,o=i===void 0?!1:i,s=n.force,a=s===void 0?!1:s;(a||!this.disabled)&&(this.$_scheduleShow(r,o),this.$emit("show"),this.$_showFrameLocked=!0,requestAnimationFrame(function(){t.$_showFrameLocked=!1})),this.$emit("update:shown",!0)},hide:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.event,r=t.skipDelay,i=r===void 0?!1:r;this.$_scheduleHide(n,i),this.$emit("hide"),this.$emit("update:shown",!1)},init:function(){this.$_isDisposed=!1,this.isMounted=!1,this.$_events=[],this.$_preventShow=!1,this.$_targetNodes=this.targetNodes().filter(function(t){return t.nodeType===t.ELEMENT_NODE}),this.$_popperNode=this.popperNode(),this.$_swapTargetAttrs("title","data-original-title"),this.$_detachPopperNode(),this.triggers.length&&this.$_addEventListeners(),this.shown&&this.show()},dispose:function(){this.$_isDisposed=!0,this.$_removeEventListeners(),this.hide({skipDelay:!0}),this.popperInstance&&(this.popperInstance.destroy(),this.$_detachPopperNode()),this.isMounted=!1,this.popperInstance=null,this.isShown=!1,this.$_swapTargetAttrs("data-original-title","title"),this.$emit("dispose")},onResize:function(){var t=this;return hr(function*(){t.isShown&&t.popperInstance&&(yield t.popperInstance.update(),t.$emit("resize"))})()},$_getPopperOptions:function(){var t=this,n=Xt(Xt({},this.popperOptions),{},{placement:this.placement,strategy:this.strategy,modifiers:this.modifiers,onFirstUpdate:function(){var r=hr(function*(o){t.popperOptions.onFirstUpdate&&t.popperOptions.onFirstUpdate(o),yield t.$_applyShowEffect()});function i(o){return r.apply(this,arguments)}return i}()});return n.modifiers||(n.modifiers=[]),Vs(n.modifiers,"arrow",{element:this.arrowNode&&this.arrowNode()||"[data-popper-arrow]"}),this.offset&&Vs(n.modifiers,"offset",{offset:this.offset}),this.boundary&&Vs(n.modifiers,"preventOverflow",{boundary:this.boundary}),this.isShown||Vs(n.modifiers,"eventListeners",{enabled:!1}),n},$_refreshPopperOptions:function(){var t=this;return hr(function*(){t.popperInstance&&(yield t.popperInstance.setOptions(t.$_getPopperOptions()))})()},$_scheduleShow:function(){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.$_hideInProgress=!1,clearTimeout(this.$_scheduleTimer),Qr&&this.instantMove&&Qr.instantMove){Qr.$_applyHide(!0),this.$_applyShow(!0);return}t?this.$_applyShow():this.$_scheduleTimer=setTimeout(this.$_applyShow.bind(this),this.$_computeDelay("show"))},$_scheduleHide:function(){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;this.$_hideInProgress=!0,clearTimeout(this.$_scheduleTimer),this.isShown&&(Qr=this),t?this.$_applyHide():this.$_scheduleTimer=setTimeout(this.$_applyHide.bind(this),this.$_computeDelay("hide"))},$_computeDelay:function(t){var n=this.delay;return parseInt(n&&n[t]||n||0)},$_applyShow:function(){var t=arguments,n=this;return hr(function*(){var r=t.length>0&&t[0]!==void 0?t[0]:!1;clearTimeout(n.$_disposeTimer),clearTimeout(n.$_scheduleTimer),n.skipTransition=r,!n.isShown&&(n.isMounted||(n.$_ensureContainer(),n.isMounted=!0),n.popperInstance?(yield n.popperInstance.update(),yield n.$_refreshPopperOptions(),yield n.$_applyShowEffect()):n.popperInstance=JS(n.referenceNode(),n.$_popperNode,n.$_getPopperOptions()))})()},$_applyShowEffect:function(){var t=this;return hr(function*(){if(!t.$_hideInProgress){t.isShown=!0,t.$_applyAttrsToTarget({"aria-describedby":t.popperId,"data-popper-shown":""});var n=t.showGroup;if(n)for(var r,i=0;i<Jr.length;i++)r=Jr[i],r.showGroup!==n&&(r.hide(),r.$emit("close-group"));Jr.push(t),t.$emit("apply-show"),t.$_popperNode.setAttribute("data-popper-placement",t.popperInstance.state.placement),t.classes.showFrom=!0,t.classes.showTo=!1,t.classes.hideFrom=!1,t.classes.hideTo=!1,yield Qd(),t.classes.showFrom=!1,t.classes.showTo=!0}})()},$_applyHide:function(){var t=arguments,n=this;return hr(function*(){var r=t.length>0&&t[0]!==void 0?t[0]:!1;if(clearTimeout(n.$_scheduleTimer),!!n.isShown){n.skipTransition=r,a1(Jr,n),Qr===n&&(Qr=null),n.isShown=!1,n.popperInstance&&(yield n.$_refreshPopperOptions()),n.$_applyAttrsToTarget({"aria-describedby":void 0,"data-popper-shown":void 0}),clearTimeout(n.$_disposeTimer);var i=He(n.theme,"disposeTimeout");i!==null&&(n.$_disposeTimer=setTimeout(function(){n.$_popperNode&&(n.$_detachPopperNode(),n.isMounted=!1)},i)),n.$emit("apply-hide"),n.classes.showFrom=!1,n.classes.showTo=!1,n.classes.hideFrom=!0,n.classes.hideTo=!1,yield Qd(),n.classes.hideFrom=!1,n.classes.hideTo=!0}})()},$_autoShowHide:function(){this.shown?this.show():this.hide()},$_ensureContainer:function(){var t=this.container;if(typeof t=="string"?t=window.document.querySelector(t):t===!1&&(t=this.$_targetNodes[0].parentNode),!t)throw new Error("No container for popover: "+this.container);t.appendChild(this.$_popperNode)},$_addEventListeners:function(){var t=this,n=function(s,a,l,c,u){var f=l;c!=null&&(f=typeof c=="function"?c(f):c),f.forEach(function(p){var d=a[p];d&&(t.$_events.push({targetNodes:s,eventType:d,handler:u}),s.forEach(function(m){return m.addEventListener(d,u)}))})},r=function(s){t.isShown&&!t.$_hideInProgress||(s.usedByTooltip=!0,!t.$_preventShow&&t.show({event:s}))};n(this.$_targetNodes,Xd,this.triggers,this.showTriggers,r),n([this.$_popperNode],Xd,this.popperTriggers,this.popperShowTriggers,r);var i=function(s){s.usedByTooltip||t.hide({event:s})};n(this.$_targetNodes,Gd,this.triggers,this.hideTriggers,i),n([this.$_popperNode],Gd,this.popperTriggers,this.popperHideTriggers,i)},$_removeEventListeners:function(){this.$_events.forEach(function(t){var n=t.targetNodes,r=t.eventType,i=t.handler;n.forEach(function(o){return o.removeEventListener(r,i)})}),this.$_events=[]},$_handleGlobalClose:function(t){var n=this,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;this.$_showFrameLocked||(this.hide({event:t}),t.closePopover?this.$emit("close-directive"):this.$emit("auto-hide"),r&&(this.$_preventShow=!0,setTimeout(function(){n.$_preventShow=!1},300)))},$_detachPopperNode:function(){this.$_popperNode.parentNode&&this.$_popperNode.parentNode.removeChild(this.$_popperNode)},$_swapTargetAttrs:function(t,n){var r=lc(this.$_targetNodes),i;try{for(r.s();!(i=r.n()).done;){var o=i.value,s=o.getAttribute(t);s&&(o.removeAttribute(t),o.setAttribute(n,s))}}catch(a){r.e(a)}finally{r.f()}},$_applyAttrsToTarget:function(t){var n=lc(this.$_targetNodes),r;try{for(n.s();!(r=n.n()).done;){var i=r.value;for(var o in t){var s=t[o];s==null?i.removeAttribute(o):i.setAttribute(o,s)}}}catch(a){n.e(a)}finally{n.f()}}},render:function(){return this.$slots.default(this.slotData)}}};typeof document!="undefined"&&typeof window!="undefined"&&(Yd?document.addEventListener("touchend",c1,js?{passive:!0,capture:!0}:!0):window.addEventListener("click",l1,!0));function l1(e){Jd(e)}function c1(e){Jd(e,!0)}function Jd(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=function(o){var s=Jr[o],a=s.popperNode(),l=a.contains(e.target);requestAnimationFrame(function(){(e.closeAllPopover||e.closePopover&&l||s.autoHide&&!l)&&s.$_handleGlobalClose(e,t)})},r=0;r<Jr.length;r++)n(r)}function Qd(){return new Promise(function(e){return requestAnimationFrame(e)})}var qd={computed:{themeClass:function(){return o1(this.theme)}}},zs={name:"VPopperContent",components:{ResizeObserver:Fs},mixins:[qd],props:{popperId:String,theme:String,shown:Boolean,mounted:Boolean,skipTransition:Boolean,autoHide:Boolean,handleResize:Boolean,classes:Object},emits:["hide","resize"]},u1={class:"v-popper__wrapper"},f1={ref:"inner",class:"v-popper__inner"},p1={ref:"arrow",class:"v-popper__arrow-container"},d1=he("div",{class:"v-popper__arrow"},null,-1);function h1(e,t,n,r,i,o){var s=er("ResizeObserver");return Ie(),ke("div",{id:n.popperId,ref:"popover",class:["v-popper__popper",[e.themeClass,{"v-popper__popper--shown":n.shown,"v-popper__popper--hidden":!n.shown,"v-popper__popper--show-from":n.classes.showFrom,"v-popper__popper--show-to":n.classes.showTo,"v-popper__popper--hide-from":n.classes.hideFrom,"v-popper__popper--hide-to":n.classes.hideTo,"v-popper__popper--skip-transition":n.skipTransition}]],"aria-hidden":n.shown?"false":"true",tabindex:n.autoHide?0:void 0,onKeyup:t[2]||(t[2]=Dt(function(a){return n.autoHide&&e.$emit("hide")},["esc"]))},[he("div",u1,[he("div",f1,[n.mounted?(Ie(),ke(Ye,{key:0},[he("div",null,[qe(e.$slots,"default")]),n.handleResize?(Ie(),ke(s,{key:0,onNotify:t[1]||(t[1]=function(a){return e.$emit("resize",a)})})):Lt("v-if",!0)],64)):Lt("v-if",!0)],512),he("div",p1,[d1],512)])],42,["id","aria-hidden","tabindex"])}zs.render=h1;zs.__file="src/components/PopperContent.vue";var _d={methods:{show:function(){var t;return(t=this.$refs.popper).show.apply(t,arguments)},hide:function(){var t;return(t=this.$refs.popper).hide.apply(t,arguments)},dispose:function(){var t;return(t=this.$refs.popper).dispose.apply(t,arguments)},onResize:function(){var t;return(t=this.$refs.popper).onResize.apply(t,arguments)}}},oo={name:"VPopperWrapper",components:{Popper:Zd(),PopperContent:zs},mixins:[_d,qd],inheritAttrs:!1,props:{theme:{type:String,default:null}},computed:{finalTheme:function(){var t;return(t=this.theme)!==null&&t!==void 0?t:this.$options.vPopperTheme}},methods:{getTargetNodes:function(){var t=Ud(this.$refs.reference.children);return t.slice(0,t.length-1).filter(Boolean)}}};function m1(e,t,n,r,i,o){var s=er("PopperContent"),a=er("Popper");return Ie(),ke(a,Ei({ref:"popper"},e.$attrs,{theme:o.finalTheme,"target-nodes":o.getTargetNodes,"reference-node":function(){return e.$refs.reference},"popper-node":function(){return e.$refs.popperContent.$el},"arrow-node":function(){return e.$refs.popperContent.$refs.arrow}}),{default:qt(function(l){var c=l.popperId,u=l.isShown,f=l.shouldMountContent,p=l.skipTransition,d=l.autoHide,m=l.hide,b=l.handleResize,v=l.onResize,S=l.classes;return[he("div",{ref:"reference",class:["v-popper",[e.themeClass,{"v-popper--shown":u}]]},[qe(e.$slots,"default"),he(s,{ref:"popperContent","popper-id":c,theme:o.finalTheme,shown:u,mounted:f,"skip-transition":p,"auto-hide":d,"handle-resize":b,classes:S,onHide:m,onResize:v},{default:qt(function(){return[qe(e.$slots,"popper",{shown:u})]}),_:2},1032,["popper-id","theme","shown","mounted","skip-transition","auto-hide","handle-resize","classes","onHide","onResize"])],2)]}),_:3},16,["theme","target-nodes","reference-node","popper-node","arrow-node"])}oo.render=m1;oo.__file="src/components/PopperWrapper.vue";var uc=Xt(Xt({},oo),{},{name:"VDropdown",vPopperTheme:"dropdown"});uc.__file="src/components/Dropdown.vue";var fc=Xt(Xt({},oo),{},{name:"VMenu",vPopperTheme:"menu"});fc.__file="src/components/Menu.vue";var pc=Xt(Xt({},oo),{},{name:"VTooltip",vPopperTheme:"tooltip"});pc.__file="src/components/Tooltip.vue";var dc={name:"VTooltipDirective",components:{Popper:Zd(),PopperContent:zs},mixins:[_d],inheritAttrs:!1,props:{theme:{type:String,default:"tooltip"},html:{type:Boolean,default:function(t){return He(t.theme,"html")}},content:{type:[String,Number,Function],default:null},loadingContent:{type:String,default:function(t){return He(t.theme,"loadingContent")}}},data:function(){return{asyncContent:null}},computed:{isContentAsync:function(){return typeof this.content=="function"},loading:function(){return this.isContentAsync&&this.asyncContent==null},finalContent:function(){return this.isContentAsync?this.loading?this.loadingContent:this.asyncContent:this.content}},watch:{content:{handler:function(){this.fetchContent(!0)},immediate:!0},finalContent:function(t){var n=this;this.$nextTick(function(){n.$refs.popper.onResize()})}},created:function(){this.$_fetchId=0},methods:{fetchContent:function(t){var n=this;if(typeof this.content=="function"&&this.$_isShown&&(t||!this.$_loading&&this.asyncContent==null)){this.asyncContent=null,this.$_loading=!0;var r=++this.$_fetchId,i=this.content(this);i.then?i.then(function(o){return n.onResult(r,o)}):this.onResult(r,i)}},onResult:function(t,n){t===this.$_fetchId&&(this.$_loading=!1,this.asyncContent=n)},onShow:function(){this.$_isShown=!0,this.fetchContent()},onHide:function(){this.$_isShown=!1}}};function g1(e,t,n,r,i,o){var s=er("PopperContent"),a=er("Popper");return Ie(),ke(a,Ei({ref:"popper"},e.$attrs,{theme:n.theme,"popper-node":function(){return e.$refs.popperContent.$el},"arrow-node":function(){return e.$refs.popperContent.$refs.arrow},onApplyShow:o.onShow,onApplyHide:o.onHide}),{default:qt(function(l){var c=l.popperId,u=l.isShown,f=l.shouldMountContent,p=l.skipTransition,d=l.autoHide,m=l.hide,b=l.handleResize,v=l.onResize,S=l.classes;return[he(s,{ref:"popperContent",class:{"v-popper--tooltip-loading":o.loading},"popper-id":c,theme:n.theme,shown:u,mounted:f,"skip-transition":p,"auto-hide":d,"handle-resize":b,classes:S,onHide:m,onResize:v},{default:qt(function(){return[n.html?(Ie(),ke("div",{key:0,innerHTML:o.finalContent},null,8,["innerHTML"])):(Ie(),ke("div",{key:1,textContent:Jt(o.finalContent)},null,8,["textContent"]))]}),_:2},1032,["class","popper-id","theme","shown","mounted","skip-transition","auto-hide","handle-resize","classes","onHide","onResize"])]}),_:1},16,["theme","popper-node","arrow-node","onApplyShow","onApplyHide"])}dc.render=g1;dc.__file="src/components/TooltipDirective.vue";var eh="v-popper--has-tooltip";function v1(e,t){var n=e.placement;if(!n&&t){var r=lc(As),i;try{for(r.s();!(i=r.n()).done;){var o=i.value;t[o]&&(n=o)}}catch(s){r.e(s)}finally{r.f()}}return n||(n=He(e.theme||"tooltip","placement")),n}function th(e,t,n){var r,i=io(t);return i==="string"?r={content:t}:t&&i==="object"?r=t:r={content:!1},r.placement=v1(r,n),r.targetNodes=function(){return[e]},r.referenceNode=function(){return e},r}function y1(e,t,n){var r=th(e,t,n),i=e.$_popper=ip({name:"VTooltipDirective",data:function(){return{options:r}},render:function(){return tl(dc,Xt(Xt({},this.options),{},{ref:"tooltip"}))}}),o=document.createElement("div");return document.body.appendChild(o),i.mount(o),e.classList&&e.classList.add(eh),i}function nh(e){e.$_popper&&(e.$_popper.unmount(),delete e.$_popper,delete e.$_popperOldShown),e.classList&&e.classList.remove(eh)}function rh(e,t){var n=t.value,r=t.modifiers,i=th(e,n,r);if(!i.content||He(i.theme||"tooltip","disabled"))nh(e);else{var o;e.$_popper?(o=e.$_popper,o.options=i):o=y1(e,n,r),typeof n.shown!="undefined"&&n.shown!==e.$_popperOldShown&&(e.$_popperOldShown=n.shown,n.shown?o.$refs.tooltip.show():o.$refs.tooltip.hide())}}var b1={beforeMount:rh,updated:rh,beforeUnmount:function(t){nh(t)}};function ih(e){e.addEventListener("click",sh),e.addEventListener("touchstart",ah,js?{passive:!0}:!1)}function oh(e){e.removeEventListener("click",sh),e.removeEventListener("touchstart",ah),e.removeEventListener("touchend",lh),e.removeEventListener("touchcancel",ch)}function sh(e){var t=e.currentTarget;e.closePopover=!t.$_vclosepopover_touch,e.closeAllPopover=t.$_closePopoverModifiers&&!!t.$_closePopoverModifiers.all}function ah(e){if(e.changedTouches.length===1){var t=e.currentTarget;t.$_vclosepopover_touch=!0;var n=e.changedTouches[0];t.$_vclosepopover_touchPoint=n,t.addEventListener("touchend",lh),t.addEventListener("touchcancel",ch)}}function lh(e){var t=e.currentTarget;if(t.$_vclosepopover_touch=!1,e.changedTouches.length===1){var n=e.changedTouches[0],r=t.$_vclosepopover_touchPoint;e.closePopover=Math.abs(n.screenY-r.screenY)<20&&Math.abs(n.screenX-r.screenX)<20,e.closeAllPopover=t.$_closePopoverModifiers&&!!t.$_closePopoverModifiers.all}}function ch(e){var t=e.currentTarget;t.$_vclosepopover_touch=!1}var S1={beforeMount:function(t,n){var r=n.value,i=n.modifiers;t.$_closePopoverModifiers=i,(typeof r=="undefined"||r)&&ih(t)},updated:function(t,n){var r=n.value,i=n.oldValue,o=n.modifiers;t.$_closePopoverModifiers=o,r!==i&&(typeof r=="undefined"||r?ih(t):oh(t))},beforeUnmount:function(t){oh(t)}};function hc(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};hc.installed||(hc.installed=!0,Wd(mr,t),e.directive("tooltip",b1),e.directive("close-popper",S1),e.component("v-tooltip",pc),e.component("VTooltip",pc),e.component("v-dropdown",uc),e.component("VDropdown",uc),e.component("v-menu",fc),e.component("VMenu",fc))}var w1={version:"4.0.0-alpha.1",install:hc,options:mr};export{Ye as F,O1 as V,dd as _,jg as a,Ho as b,Si as c,Lt as d,Nn as e,bu as f,he as g,ko as h,ke as i,Zt as j,qe as k,xr as l,bd as m,vn as n,Ie as o,yu as p,ip as q,er as r,fy as s,Jt as t,w1 as u,sr as v,qt as w};
|
11 |
`)}Wy(e.hoists,t),o(),i("return ")}function Al(e,t,{helper:n,push:r,newline:i,isTS:o}){const s=n(t==="filter"?os:t==="component"?rs:is);for(let a=0;a<e.length;a++){let l=e[a];const c=l.endsWith("__self");c&&(l=l.slice(0,-6)),r(`const ${kr(l,t)} = ${s}(${JSON.stringify(l)}${c?", true":""})${o?"!":""}`),a<e.length-1&&i()}}function Wy(e,t){if(!e.length)return;t.pure=!0;const{push:n,newline:r,helper:i,scopeId:o,mode:s}=t;r();for(let a=0;a<e.length;a++){const l=e[a];l&&(n(`const _hoisted_${a+1} = `),ut(l,t),r())}t.pure=!1}function Nl(e,t){const n=e.length>3||!1;t.push("["),n&&t.indent(),Gi(e,t,n),n&&t.deindent(),t.push("]")}function Gi(e,t,n=!1,r=!0){const{push:i,newline:o}=t;for(let s=0;s<e.length;s++){const a=e[s];be(a)?i(a):ue(a)?Nl(a,t):ut(a,t),s<e.length-1&&(n?(r&&i(","),o()):r&&i(", "))}}function ut(e,t){if(be(e)){t.push(e);return}if(Wn(e)){t.push(t.helper(e));return}switch(e.type){case 1:case 9:case 11:ut(e.codegenNode,t);break;case 2:Yy(e,t);break;case 4:Fp(e,t);break;case 5:Xy(e,t);break;case 12:ut(e.codegenNode,t);break;case 8:jp(e,t);break;case 3:Zy(e,t);break;case 13:Jy(e,t);break;case 14:qy(e,t);break;case 15:_y(e,t);break;case 17:eb(e,t);break;case 18:tb(e,t);break;case 19:nb(e,t);break;case 20:rb(e,t);break;case 21:Gi(e.body,t,!0,!1);break}}function Yy(e,t){t.push(JSON.stringify(e.content),e)}function Fp(e,t){const{content:n,isStatic:r}=e;t.push(r?JSON.stringify(n):n,e)}function Xy(e,t){const{push:n,helper:r,pure:i}=t;i&&n(Ss),n(`${r(Di)}(`),ut(e.content,t),n(")")}function jp(e,t){for(let n=0;n<e.children.length;n++){const r=e.children[n];be(r)?t.push(r):ut(r,t)}}function Gy(e,t){const{push:n}=t;if(e.type===8)n("["),jp(e,t),n("]");else if(e.isStatic){const r=Vi(e.content)?e.content:JSON.stringify(e.content);n(r,e)}else n(`[${e.content}]`,e)}function Zy(e,t){const{push:n,helper:r,pure:i}=t;i&&n(Ss),n(`${r(Dr)}(${JSON.stringify(e.content)})`,e)}function Jy(e,t){const{push:n,helper:r,pure:i}=t,{tag:o,props:s,children:a,patchFlag:l,dynamicProps:c,directives:u,isBlock:f,disableTracking:p,isComponent:d}=e;u&&n(r(ss)+"("),f&&n(`(${r(Vn)}(${p?"true":""}), `),i&&n(Ss);const m=f?ur(t.inSSR,d):cr(t.inSSR,d);n(r(m)+"(",e),Gi(Qy([o,s,a,l,c]),t),n(")"),f&&n(")"),u&&(n(", "),ut(u,t),n(")"))}function Qy(e){let t=e.length;for(;t--&&e[t]==null;);return e.slice(0,t+1).map(n=>n||"null")}function qy(e,t){const{push:n,helper:r,pure:i}=t,o=be(e.callee)?e.callee:r(e.callee);i&&n(Ss),n(o+"(",e),Gi(e.arguments,t),n(")")}function _y(e,t){const{push:n,indent:r,deindent:i,newline:o}=t,{properties:s}=e;if(!s.length){n("{}",e);return}const a=s.length>1||!1;n(a?"{":"{ "),a&&r();for(let l=0;l<s.length;l++){const{key:c,value:u}=s[l];Gy(c,t),n(": "),ut(u,t),l<s.length-1&&(n(","),o())}a&&i(),n(a?"}":" }")}function eb(e,t){Nl(e.elements,t)}function tb(e,t){const{push:n,indent:r,deindent:i}=t,{params:o,returns:s,body:a,newline:l,isSlot:c}=e;c&&n(`_${mn[ds]}(`),n("(",e),ue(o)?Gi(o,t):o&&ut(o,t),n(") => "),(l||a)&&(n("{"),r()),s?(l&&n("return "),ue(s)?Nl(s,t):ut(s,t)):a&&ut(a,t),(l||a)&&(i(),n("}")),c&&(e.isNonScopedSlot&&n(", undefined, true"),n(")"))}function nb(e,t){const{test:n,consequent:r,alternate:i,newline:o}=e,{push:s,indent:a,deindent:l,newline:c}=t;if(n.type===4){const f=!Vi(n.content);f&&s("("),Fp(n,t),f&&s(")")}else s("("),ut(n,t),s(")");o&&a(),t.indentLevel++,o||s(" "),s("? "),ut(r,t),t.indentLevel--,o&&c(),o||s(" "),s(": ");const u=i.type===19;u||t.indentLevel++,ut(i,t),u||t.indentLevel--,o&&l(!0)}function rb(e,t){const{push:n,helper:r,indent:i,deindent:o,newline:s}=t;n(`_cache[${e.index}] || (`),e.isVNode&&(i(),n(`${r(ji)}(-1),`),s()),n(`_cache[${e.index}] = `),ut(e.value,t),e.isVNode&&(n(","),s(),n(`${r(ji)}(1),`),s(),n(`_cache[${e.index}]`),o()),n(")")}function ib(e,t,n=!1,r=[],i=Object.create(null)){}function ob(e,t,n){return!1}function sb(e,t){if(e&&(e.type==="ObjectProperty"||e.type==="ArrayPattern")){let n=t.length;for(;n--;){const r=t[n];if(r.type==="AssignmentExpression")return!0;if(r.type!=="ObjectProperty"&&!r.type.endsWith("Pattern"))break}}return!1}function ab(e,t){for(const n of e.params)for(const r of zn(n))t(r)}function lb(e,t){for(const n of e.body)if(n.type==="VariableDeclaration"){if(n.declare)continue;for(const r of n.declarations)for(const i of zn(r.id))t(i)}else if(n.type==="FunctionDeclaration"||n.type==="ClassDeclaration"){if(n.declare||!n.id)continue;t(n.id)}}function zn(e,t=[]){switch(e.type){case"Identifier":t.push(e);break;case"MemberExpression":let n=e;for(;n.type==="MemberExpression";)n=n.object;t.push(n);break;case"ObjectPattern":for(const r of e.properties)r.type==="RestElement"?zn(r.argument,t):zn(r.value,t);break;case"ArrayPattern":e.elements.forEach(r=>{r&&zn(r,t)});break;case"RestElement":zn(e.argument,t);break;case"AssignmentPattern":zn(e.left,t);break}return t}const cb=e=>/Function(?:Expression|Declaration)$|Method$/.test(e.type),Vp=e=>e&&(e.type==="ObjectProperty"||e.type==="ObjectMethod")&&!e.computed,ub=(e,t)=>Vp(t)&&t.key===e;new RegExp("\\b"+"do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,super,throw,while,yield,delete,export,import,return,switch,default,extends,finally,continue,debugger,function,arguments,typeof,void".split(",").join("\\b|\\b")+"\\b");const fb=(e,t)=>{if(e.type===5)e.content=Es(e.content,t);else if(e.type===1)for(let n=0;n<e.props.length;n++){const r=e.props[n];if(r.type===7&&r.name!=="for"){const i=r.exp,o=r.arg;i&&i.type===4&&!(r.name==="on"&&o)&&(r.exp=Es(i,t,r.name==="slot")),o&&o.type===4&&!o.isStatic&&(r.arg=Es(o,t))}}};function Es(e,t,n=!1,r=!1,i=Object.create(t.identifiers)){return e}const pb=Ml(/^(if|else|else-if)$/,(e,t,n)=>zp(e,t,n,(r,i,o)=>{const s=n.parent.children;let a=s.indexOf(r),l=0;for(;a-->=0;){const c=s[a];c&&c.type===9&&(l+=c.branches.length)}return()=>{if(o)r.codegenNode=Hp(i,l,n);else{const c=db(r.codegenNode);c.alternate=Hp(i,l+r.branches.length-1,n)}}}));function zp(e,t,n,r){if(t.name!=="else"&&(!t.exp||!t.exp.content.trim())){const i=t.exp?t.exp.loc:e.loc;n.onError(Be(28,t.loc)),t.exp=Ee("true",!1,i)}if(t.name==="if"){const i=Bp(e,t),o={type:9,loc:e.loc,branches:[i]};if(n.replaceNode(o),r)return r(o,i,!0)}else{const i=n.parent.children;let o=i.indexOf(e);for(;o-->=-1;){const s=i[o];if(s&&s.type===2&&!s.content.trim().length){n.removeNode(s);continue}if(s&&s.type===9){t.name==="else-if"&&s.branches[s.branches.length-1].condition===void 0&&n.onError(Be(30,e.loc)),n.removeNode();const a=Bp(e,t);s.branches.push(a);const l=r&&r(s,a,!1);Xi(a,n),l&&l(),n.currentNode=null}else n.onError(Be(30,e.loc));break}}}function Bp(e,t){return{type:10,loc:e.loc,condition:t.name==="else"?void 0:t.exp,children:e.tagType===3&&!Et(e,"for")?e.children:[e],userKey:Br(e,"key")}}function Hp(e,t,n){return e.condition?ms(e.condition,kp(e,t,n),Ze(n.helper(Dr),['""',"true"])):kp(e,t,n)}function kp(e,t,n){const{helper:r}=n,i=Ge("key",Ee(`${t}`,!1,tt,2)),{children:o}=e,s=o[0];if(o.length!==1||s.type!==1)if(o.length===1&&s.type===11){const l=s.codegenNode;return Ui(l,i,n),l}else{let l=64;return _s[64],Vr(n,r($r),Mt([i]),o,l+"",void 0,void 0,!0,!1,!1,e.loc)}else{const l=s.codegenNode,c=Op(l);return c.type===13&&vs(c,n),Ui(c,i,n),l}}function db(e){for(;;)if(e.type===19)if(e.alternate.type===19)e=e.alternate;else return e;else e.type===20&&(e=e.value)}const hb=Ml("for",(e,t,n)=>{const{helper:r,removeHelper:i}=n;return Up(e,t,n,o=>{const s=Ze(r(as),[o.source]),a=Et(e,"memo"),l=Br(e,"key"),c=l&&(l.type===6?Ee(l.value.content,!0):l.exp),u=l?Ge("key",c):null,f=o.source.type===4&&o.source.constType>0,p=f?64:l?128:256;return o.codegenNode=Vr(n,r($r),void 0,s,p+"",void 0,void 0,!0,!f,!1,e.loc),()=>{let d;const m=Hr(e),{children:b}=o,v=b.length!==1||b[0].type!==1,S=ki(e)?e:m&&e.children.length===1&&ki(e.children[0])?e.children[0]:null;if(S?(d=S.codegenNode,m&&u&&Ui(d,u,n)):v?d=Vr(n,r($r),u?Mt([u]):void 0,e.children,64+"",void 0,void 0,!0,void 0,!1):(d=b[0].codegenNode,m&&u&&Ui(d,u,n),d.isBlock!==!f&&(d.isBlock?(i(Vn),i(ur(n.inSSR,d.isComponent))):i(cr(n.inSSR,d.isComponent))),d.isBlock=!f,d.isBlock?(r(Vn),r(ur(n.inSSR,d.isComponent))):r(cr(n.inSSR,d.isComponent))),a){const g=ar(ws(o.parseResult,[Ee("_cached")]));g.body=yp([Kt(["const _memo = (",a.exp,")"]),Kt(["if (_cached",...c?[" && _cached.key === ",c]:[],` && ${n.helperString(yl)}(_cached, _memo)) return _cached`]),Kt(["const _item = ",d]),Ee("_item.memo = _memo"),Ee("return _item")]),s.arguments.push(g,Ee("_cache"),Ee(String(n.cached++)))}else s.arguments.push(ar(ws(o.parseResult),d,!0))}})});function Up(e,t,n,r){if(!t.exp){n.onError(Be(31,t.loc));return}const i=Rl(t.exp);if(!i){n.onError(Be(32,t.loc));return}const{addIdentifiers:o,removeIdentifiers:s,scopes:a}=n,{source:l,value:c,key:u,index:f}=i,p={type:11,loc:t.loc,source:l,valueAlias:c,keyAlias:u,objectIndexAlias:f,parseResult:i,children:Hr(e)?e.children:[e]};n.replaceNode(p),a.vFor++;const d=r&&r(p);return()=>{a.vFor--,d&&d()}}const mb=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,Kp=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,gb=/^\(|\)$/g;function Rl(e,t){const n=e.loc,r=e.content,i=r.match(mb);if(!i)return;const[,o,s]=i,a={source:Os(n,s.trim(),r.indexOf(s,o.length)),value:void 0,key:void 0,index:void 0};let l=o.trim().replace(gb,"").trim();const c=o.indexOf(l),u=l.match(Kp);if(u){l=l.replace(Kp,"").trim();const f=u[1].trim();let p;if(f&&(p=r.indexOf(f,c+l.length),a.key=Os(n,f,p)),u[2]){const d=u[2].trim();d&&(a.index=Os(n,d,r.indexOf(d,a.key?p+f.length:c+l.length)))}}return l&&(a.value=Os(n,l,c)),a}function Os(e,t,n){return Ee(t,!1,El(e,n,t.length))}function ws({value:e,key:t,index:n},r=[]){return vb([e,t,n,...r])}function vb(e){let t=e.length;for(;t--&&!e[t];);return e.slice(0,t+1).map((n,r)=>n||Ee("_".repeat(r+1),!1))}const Wp=Ee("undefined",!1),Yp=(e,t)=>{if(e.type===1&&(e.tagType===1||e.tagType===3)){const n=Et(e,"slot");if(n)return n.exp,t.scopes.vSlot++,()=>{t.scopes.vSlot--}}},yb=(e,t)=>{let n;if(Hr(e)&&e.props.some(Ol)&&(n=Et(e,"for"))){const r=n.parseResult=Rl(n.exp);if(r){const{value:i,key:o,index:s}=r,{addIdentifiers:a,removeIdentifiers:l}=t;return i&&a(i),o&&a(o),s&&a(s),()=>{i&&l(i),o&&l(o),s&&l(s)}}}},bb=(e,t,n)=>ar(e,t,!1,!0,t.length?t[0].loc:n);function Xp(e,t,n=bb){t.helper(ds);const{children:r,loc:i}=e,o=[],s=[];let a=t.scopes.vSlot>0||t.scopes.vFor>0;const l=Et(e,"slot",!0);if(l){const{arg:b,exp:v}=l;b&&!mt(b)&&(a=!0),o.push(Ge(b||Ee("default",!0),n(v,r,i)))}let c=!1,u=!1;const f=[],p=new Set;for(let b=0;b<r.length;b++){const v=r[b];let S;if(!Hr(v)||!(S=Et(v,"slot",!0))){v.type!==3&&f.push(v);continue}if(l){t.onError(Be(37,S.loc));break}c=!0;const{children:g,loc:O}=v,{arg:E=Ee("default",!0),exp:$,loc:R}=S;let T;mt(E)?T=E?E.content:"default":a=!0;const P=n($,g,O);let N,j,V;if(N=Et(v,"if"))a=!0,s.push(ms(N.exp,Ts(E,P),Wp));else if(j=Et(v,/^else(-if)?$/,!0)){let F=b,C;for(;F--&&(C=r[F],C.type===3););if(C&&Hr(C)&&Et(C,"if")){r.splice(b,1),b--;let w=s[s.length-1];for(;w.alternate.type===19;)w=w.alternate;w.alternate=j.exp?ms(j.exp,Ts(E,P),Wp):Ts(E,P)}else t.onError(Be(30,j.loc))}else if(V=Et(v,"for")){a=!0;const F=V.parseResult||Rl(V.exp);F?s.push(Ze(t.helper(as),[F.source,ar(ws(F),Ts(E,P),!0)])):t.onError(Be(32,V.loc))}else{if(T){if(p.has(T)){t.onError(Be(38,R));continue}p.add(T),T==="default"&&(u=!0)}o.push(Ge(E,P))}}if(!l){const b=(v,S)=>{const g=n(v,S,i);return t.compatConfig&&(g.isNonScopedSlot=!0),Ge("default",g)};c?f.length&&f.some(v=>Gp(v))&&(u?t.onError(Be(39,f[0].loc)):o.push(b(void 0,f))):o.push(b(void 0,r))}const d=a?2:Ps(e.children)?3:1;let m=Mt(o.concat(Ge("_",Ee(d+"",!1))),i);return s.length&&(m=Ze(t.helper(vl),[m,zr(s)])),{slots:m,hasDynamicSlots:a}}function Ts(e,t){return Mt([Ge("name",e),Ge("fn",t)])}function Ps(e){for(let t=0;t<e.length;t++){const n=e[t];switch(n.type){case 1:if(n.tagType===2||Ps(n.children))return!0;break;case 9:if(Ps(n.branches))return!0;break;case 10:case 11:if(Ps(n.children))return!0;break}}return!1}function Gp(e){return e.type!==2&&e.type!==12?!0:e.type===2?!!e.content.trim():Gp(e.content)}const Zp=new WeakMap,Jp=(e,t)=>function(){if(e=t.currentNode,!(e.type===1&&(e.tagType===0||e.tagType===1)))return;const{tag:r,props:i}=e,o=e.tagType===1;let s=o?Qp(e,t):`"${r}"`;const a=je(s)&&s.callee===Li;let l,c,u,f=0,p,d,m,b=a||s===Lr||s===_o||!o&&(r==="svg"||r==="foreignObject"||Br(e,"key",!0));if(i.length>0){const v=Il(e,t);l=v.props,f=v.patchFlag,d=v.dynamicPropNames;const S=v.directives;m=S&&S.length?zr(S.map(g=>Eb(g,t))):void 0}if(e.children.length>0)if(s===$i&&(b=!0,f|=1024),o&&s!==Lr&&s!==$i){const{slots:S,hasDynamicSlots:g}=Xp(e,t);c=S,g&&(f|=1024)}else if(e.children.length===1&&s!==Lr){const S=e.children[0],g=S.type,O=g===5||g===8;O&&jt(S,t)===0&&(f|=1),O||g===2?c=S:c=e.children}else c=e.children;f!==0&&(u=String(f),d&&d.length&&(p=Ob(d))),e.codegenNode=Vr(t,s,l,c,u,p,m,!!b,!1,o,e.loc)};function Qp(e,t,n=!1){let{tag:r}=e;const i=Ll(r),o=Br(e,"is");if(o)if(i||fr("COMPILER_IS_ON_ELEMENT",t)){const l=o.type===6?o.value&&Ee(o.value.content,!0):o.exp;if(l)return Ze(t.helper(Li),[l])}else o.type===6&&o.value.content.startsWith("vue:")&&(r=o.value.content.slice(4));const s=!i&&Et(e,"is");if(s&&s.exp)return Ze(t.helper(Li),[s.exp]);const a=bl(r)||t.isBuiltInComponent(r);return a?(n||t.helper(a),a):(t.helper(rs),t.components.add(r),kr(r,"component"))}function Il(e,t,n=e.props,r=!1){const{tag:i,loc:o}=e,s=e.tagType===1;let a=[];const l=[],c=[];let u=0,f=!1,p=!1,d=!1,m=!1,b=!1,v=!1;const S=[],g=({key:E,value:$})=>{if(mt(E)){const R=E.content,T=yn(R);if(!s&&T&&R.toLowerCase()!=="onclick"&&R!=="onUpdate:modelValue"&&!Sn(R)&&(m=!0),T&&Sn(R)&&(v=!0),$.type===20||($.type===4||$.type===8)&&jt($,t)>0)return;R==="ref"?f=!0:R==="class"?p=!0:R==="style"?d=!0:R!=="key"&&!S.includes(R)&&S.push(R),s&&(R==="class"||R==="style")&&!S.includes(R)&&S.push(R)}else b=!0};for(let E=0;E<n.length;E++){const $=n[E];if($.type===6){const{loc:R,name:T,value:P}=$;let N=Ee(P?P.content:"",!0,P?P.loc:R);if(T==="ref"&&(f=!0),T==="is"&&(Ll(i)||P&&P.content.startsWith("vue:")||fr("COMPILER_IS_ON_ELEMENT",t)))continue;a.push(Ge(Ee(T,!0,El(R,0,T.length)),N))}else{const{name:R,arg:T,exp:P,loc:N}=$,j=R==="bind",V=R==="on";if(R==="slot"){s||t.onError(Be(40,N));continue}if(R==="once"||R==="memo"||R==="is"||j&&Hi(T,"is")&&(Ll(i)||fr("COMPILER_IS_ON_ELEMENT",t))||V&&r)continue;if(!T&&(j||V)){if(b=!0,P)if(a.length&&(l.push(Mt($l(a),o)),a=[]),j){if(fr("COMPILER_V_BIND_OBJECT_ORDER",t)){l.unshift(P);continue}l.push(P)}else l.push({type:14,loc:N,callee:t.helper(us),arguments:[P]});else t.onError(Be(j?34:35,N));continue}const F=t.directiveTransforms[R];if(F){const{props:C,needRuntime:w}=F($,e,t);!r&&C.forEach(g),a.push(...C),w&&(c.push($),Wn(w)&&Zp.set($,w))}else c.push($)}$.type===6&&$.name==="ref"&&t.scopes.vFor>0&&pr("COMPILER_V_FOR_REF",t,$.loc)&&a.push(Ge(Ee("refInFor",!0),Ee("true",!1)))}let O;if(l.length?(a.length&&l.push(Mt($l(a),o)),l.length>1?O=Ze(t.helper(Fi),l,o):O=l[0]):a.length&&(O=Mt($l(a),o)),b?u|=16:(p&&!s&&(u|=2),d&&!s&&(u|=4),S.length&&(u|=8),m&&(u|=32)),(u===0||u===32)&&(f||v||c.length>0)&&(u|=512),!t.inSSR&&O)switch(O.type){case 15:let E=-1,$=-1,R=!1;for(let N=0;N<O.properties.length;N++){const j=O.properties[N].key;mt(j)?j.content==="class"?E=N:j.content==="style"&&($=N):j.isHandlerKey||(R=!0)}const T=O.properties[E],P=O.properties[$];R?O=Ze(t.helper(Fr),[O]):(T&&!mt(T.value)&&(T.value=Ze(t.helper(ls),[T.value])),P&&!mt(P.value)&&(d||P.value.type===17)&&(P.value=Ze(t.helper(cs),[P.value])));break;case 14:break;default:O=Ze(t.helper(Fr),[Ze(t.helper(jr),[O])]);break}return{props:O,directives:c,patchFlag:u,dynamicPropNames:S}}function $l(e){const t=new Map,n=[];for(let r=0;r<e.length;r++){const i=e[r];if(i.key.type===8||!i.key.isStatic){n.push(i);continue}const o=i.key.content,s=t.get(o);s?(o==="style"||o==="class"||yn(o))&&Sb(s,i):(t.set(o,i),n.push(i))}return n}function Sb(e,t){e.value.type===17?e.value.elements.push(t.value):e.value=zr([e.value,t.value],e.loc)}function Eb(e,t){const n=[],r=Zp.get(e);r?n.push(t.helperString(r)):(t.helper(is),t.directives.add(e.name),n.push(kr(e.name,"directive")));const{loc:i}=e;if(e.exp&&n.push(e.exp),e.arg&&(e.exp||n.push("void 0"),n.push(e.arg)),Object.keys(e.modifiers).length){e.arg||(e.exp||n.push("void 0"),n.push("void 0"));const o=Ee("true",!1,i);n.push(Mt(e.modifiers.map(s=>Ge(s,o)),i))}return zr(n,e.loc)}function Ob(e){let t="[";for(let n=0,r=e.length;n<r;n++)t+=JSON.stringify(e[n]),n<r-1&&(t+=", ");return t+"]"}function Ll(e){return e[0].toLowerCase()+e.slice(1)==="component"}const wb=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Tb=/-(\w)/g,qp=wb(e=>e.replace(Tb,(t,n)=>n?n.toUpperCase():"")),Pb=(e,t)=>{if(ki(e)){const{children:n,loc:r}=e,{slotName:i,slotProps:o}=_p(e,t),s=[t.prefixIdentifiers?"_ctx.$slots":"$slots",i,"{}","undefined","true"];let a=2;o&&(s[2]=o,a=3),n.length&&(s[3]=ar([],n,!1,!1,r),a=4),t.scopeId&&!t.slotted&&(a=5),s.splice(a),e.codegenNode=Ze(t.helper(gl),s,r)}};function _p(e,t){let n='"default"',r;const i=[];for(let o=0;o<e.props.length;o++){const s=e.props[o];s.type===6?s.value&&(s.name==="name"?n=JSON.stringify(s.value.content):(s.name=qp(s.name),i.push(s))):s.name==="bind"&&Hi(s.arg,"name")?s.exp&&(n=s.exp):(s.name==="bind"&&s.arg&&mt(s.arg)&&(s.arg.content=qp(s.arg.content)),i.push(s))}if(i.length>0){const{props:o,directives:s}=Il(e,t,i);r=o,s.length&&t.onError(Be(36,s[0].loc))}return{slotName:n,slotProps:r}}const xb=/^\s*([\w$_]+|(async\s*)?\([^)]*?\))\s*=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/,Dl=(e,t,n,r)=>{const{loc:i,modifiers:o,arg:s}=e;!e.exp&&!o.length&&n.onError(Be(35,i));let a;if(s.type===4)if(s.isStatic){const f=s.content;a=Ee(Yn(st(f)),!0,s.loc)}else a=Kt([`${n.helperString(ps)}(`,s,")"]);else a=s,a.children.unshift(`${n.helperString(ps)}(`),a.children.push(")");let l=e.exp;l&&!l.content.trim()&&(l=void 0);let c=n.cacheHandlers&&!l&&!n.inVOnce;if(l){const f=Sl(l.content),p=!(f||xb.test(l.content)),d=l.content.includes(";");(p||c&&f)&&(l=Kt([`${p?"$event":"(...args)"} => ${d?"{":"("}`,l,d?"}":")"]))}let u={props:[Ge(a,l||Ee("() => {}",!1,i))]};return r&&(u=r(u)),c&&(u.props[0].value=n.cache(u.props[0].value)),u.props.forEach(f=>f.key.isHandlerKey=!0),u},ed=(e,t,n)=>{const{exp:r,modifiers:i,loc:o}=e,s=e.arg;return s.type!==4?(s.children.unshift("("),s.children.push(') || ""')):s.isStatic||(s.content=`${s.content} || ""`),i.includes("camel")&&(s.type===4?s.isStatic?s.content=st(s.content):s.content=`${n.helperString(fs)}(${s.content})`:(s.children.unshift(`${n.helperString(fs)}(`),s.children.push(")"))),n.inSSR||(i.includes("prop")&&td(s,"."),i.includes("attr")&&td(s,"^")),!r||r.type===4&&!r.content.trim()?(n.onError(Be(34,o)),{props:[Ge(s,Ee("",!0,o))]}):{props:[Ge(s,r)]}},td=(e,t)=>{e.type===4?e.isStatic?e.content=t+e.content:e.content=`\`${t}\${${e.content}}\``:(e.children.unshift(`'${t}' + (`),e.children.push(")"))},Cb=(e,t)=>{if(e.type===0||e.type===1||e.type===11||e.type===10)return()=>{const n=e.children;let r,i=!1;for(let o=0;o<n.length;o++){const s=n[o];if(gs(s)){i=!0;for(let a=o+1;a<n.length;a++){const l=n[a];if(gs(l))r||(r=n[o]={type:8,loc:s.loc,children:[s]}),r.children.push(" + ",l),n.splice(a,1),a--;else{r=void 0;break}}}}if(!(!i||n.length===1&&(e.type===0||e.type===1&&e.tagType===0&&!e.props.find(o=>o.type===7&&!t.directiveTransforms[o.name])&&e.tag!=="template")))for(let o=0;o<n.length;o++){const s=n[o];if(gs(s)||s.type===8){const a=[];(s.type!==2||s.content!==" ")&&a.push(s),!t.ssr&&jt(s,t)===0&&a.push(1+""),n[o]={type:12,content:s,loc:s.loc,codegenNode:Ze(t.helper(ns),a)}}}}},nd=new WeakSet,Mb=(e,t)=>{if(e.type===1&&Et(e,"once",!0))return nd.has(e)||t.inVOnce?void 0:(nd.add(e),t.inVOnce=!0,t.helper(ji),()=>{t.inVOnce=!1;const n=t.currentNode;n.codegenNode&&(n.codegenNode=t.cache(n.codegenNode,!0))})},Fl=(e,t,n)=>{const{exp:r,arg:i}=e;if(!r)return n.onError(Be(41,e.loc)),jl();const o=r.loc.source,s=r.type===4?r.content:o;n.bindingMetadata[o];const a=!1;if(!s.trim()||!Sl(s)&&!a)return n.onError(Be(42,r.loc)),jl();const l=i||Ee("modelValue",!0),c=i?mt(i)?`onUpdate:${i.content}`:Kt(['"onUpdate:" + ',i]):"onUpdate:modelValue";let u;const f=n.isTS?"($event: any)":"$event";u=Kt([`${f} => ((`,r,") = $event)"]);const p=[Ge(l,e.exp),Ge(c,u)];if(e.modifiers.length&&t.tagType===1){const d=e.modifiers.map(b=>(Vi(b)?b:JSON.stringify(b))+": true").join(", "),m=i?mt(i)?`${i.content}Modifiers`:Kt([i,' + "Modifiers"']):"modelModifiers";p.push(Ge(m,Ee(`{ ${d} }`,!1,e.loc,2)))}return jl(p)};function jl(e=[]){return{props:e}}const Ab=/[\w).+\-_$\]]/,Nb=(e,t)=>{!fr("COMPILER_FILTER",t)||(e.type===5&&xs(e.content,t),e.type===1&&e.props.forEach(n=>{n.type===7&&n.name!=="for"&&n.exp&&xs(n.exp,t)}))};function xs(e,t){if(e.type===4)rd(e,t);else for(let n=0;n<e.children.length;n++){const r=e.children[n];typeof r=="object"&&(r.type===4?rd(r,t):r.type===8?xs(e,t):r.type===5&&xs(r.content,t))}}function rd(e,t){const n=e.content;let r=!1,i=!1,o=!1,s=!1,a=0,l=0,c=0,u=0,f,p,d,m,b=[];for(d=0;d<n.length;d++)if(p=f,f=n.charCodeAt(d),r)f===39&&p!==92&&(r=!1);else if(i)f===34&&p!==92&&(i=!1);else if(o)f===96&&p!==92&&(o=!1);else if(s)f===47&&p!==92&&(s=!1);else if(f===124&&n.charCodeAt(d+1)!==124&&n.charCodeAt(d-1)!==124&&!a&&!l&&!c)m===void 0?(u=d+1,m=n.slice(0,d).trim()):v();else{switch(f){case 34:i=!0;break;case 39:r=!0;break;case 96:o=!0;break;case 40:c++;break;case 41:c--;break;case 91:l++;break;case 93:l--;break;case 123:a++;break;case 125:a--;break}if(f===47){let S=d-1,g;for(;S>=0&&(g=n.charAt(S),g===" ");S--);(!g||!Ab.test(g))&&(s=!0)}}m===void 0?m=n.slice(0,d).trim():u!==0&&v();function v(){b.push(n.slice(u,d).trim()),u=d+1}if(b.length){for(d=0;d<b.length;d++)m=Rb(m,b[d],t);e.content=m}}function Rb(e,t,n){n.helper(os);const r=t.indexOf("(");if(r<0)return n.filters.add(t),`${kr(t,"filter")}(${e})`;{const i=t.slice(0,r),o=t.slice(r+1);return n.filters.add(i),`${kr(i,"filter")}(${e}${o!==")"?","+o:o}`}}const id=new WeakSet,Ib=(e,t)=>{if(e.type===1){const n=Et(e,"memo");return!n||id.has(e)?void 0:(id.add(e),()=>{const r=e.codegenNode||t.currentNode.codegenNode;r&&r.type===13&&(e.tagType!==1&&vs(r,t),e.codegenNode=Ze(t.helper(hs),[n.exp,ar(void 0,r),"_cache",String(t.cached++)]))})}};function od(e){return[[Mb,pb,Ib,hb,Nb,Pb,Jp,Yp,Cb],{on:Dl,bind:ed,model:Fl}]}function sd(e,t={}){const n=t.onError||fl,r=t.mode==="module";t.prefixIdentifiers===!0?n(Be(46)):r&&n(Be(47));const i=!1;t.cacheHandlers&&n(Be(48)),t.scopeId&&!r&&n(Be(49));const o=be(e)?Tl(e,t):e,[s,a]=od();return Lp(o,Me({},t,{prefixIdentifiers:i,nodeTransforms:[...s,...t.nodeTransforms||[]],directiveTransforms:Me({},a,t.directiveTransforms||{})})),Dp(o,Me({},t,{prefixIdentifiers:i}))}const ad=()=>({props:[]}),Vl=Symbol(""),zl=Symbol(""),Bl=Symbol(""),Hl=Symbol(""),Cs=Symbol(""),kl=Symbol(""),Ul=Symbol(""),Kl=Symbol(""),Wl=Symbol(""),Yl=Symbol("");mp({[Vl]:"vModelRadio",[zl]:"vModelCheckbox",[Bl]:"vModelText",[Hl]:"vModelSelect",[Cs]:"vModelDynamic",[kl]:"withModifiers",[Ul]:"withKeys",[Kl]:"vShow",[Wl]:"Transition",[Yl]:"TransitionGroup"});let Ur;function $b(e,t=!1){return Ur||(Ur=document.createElement("div")),t?(Ur.innerHTML=`<div foo="${e.replace(/"/g,""")}">`,Ur.children[0].getAttribute("foo")):(Ur.innerHTML=e,Ur.textContent)}const Lb=it("style,iframe,script,noscript",!0),Xl={isVoidTag:Hc,isNativeTag:e=>zc(e)||Bc(e),isPreTag:e=>e==="pre",decodeEntities:$b,isBuiltInComponent:e=>{if(lr(e,"Transition"))return Wl;if(lr(e,"TransitionGroup"))return Yl},getNamespace(e,t){let n=t?t.ns:0;if(t&&n===2)if(t.tag==="annotation-xml"){if(e==="svg")return 1;t.props.some(r=>r.type===6&&r.name==="encoding"&&r.value!=null&&(r.value.content==="text/html"||r.value.content==="application/xhtml+xml"))&&(n=0)}else/^m(?:[ions]|text)$/.test(t.tag)&&e!=="mglyph"&&e!=="malignmark"&&(n=0);else t&&n===1&&(t.tag==="foreignObject"||t.tag==="desc"||t.tag==="title")&&(n=0);if(n===0){if(e==="svg")return 1;if(e==="math")return 2}return n},getTextMode({tag:e,ns:t}){if(t===0){if(e==="textarea"||e==="title")return 1;if(Lb(e))return 2}return 0}},ld=e=>{e.type===1&&e.props.forEach((t,n)=>{t.type===6&&t.name==="style"&&t.value&&(e.props[n]={type:7,name:"bind",arg:Ee("style",!0,t.loc),exp:Db(t.value.content,t.loc),modifiers:[],loc:t.loc})})},Db=(e,t)=>{const n=na(e);return Ee(JSON.stringify(n),!1,t,3)};function rn(e,t){return Be(e,t)}const Fb=(e,t,n)=>{const{exp:r,loc:i}=e;return r||n.onError(rn(50,i)),t.children.length&&(n.onError(rn(51,i)),t.children.length=0),{props:[Ge(Ee("innerHTML",!0,i),r||Ee("",!0))]}},jb=(e,t,n)=>{const{exp:r,loc:i}=e;return r||n.onError(rn(52,i)),t.children.length&&(n.onError(rn(53,i)),t.children.length=0),{props:[Ge(Ee("textContent",!0),r?Ze(n.helperString(Di),[r],i):Ee("",!0))]}},Vb=(e,t,n)=>{const r=Fl(e,t,n);if(!r.props.length||t.tagType===1)return r;e.arg&&n.onError(rn(55,e.arg.loc));const{tag:i}=t,o=n.isCustomElement(i);if(i==="input"||i==="textarea"||i==="select"||o){let s=Bl,a=!1;if(i==="input"||o){const l=Br(t,"type");if(l){if(l.type===7)s=Cs;else if(l.value)switch(l.value.content){case"radio":s=Vl;break;case"checkbox":s=zl;break;case"file":a=!0,n.onError(rn(56,e.loc));break}}else Sp(t)&&(s=Cs)}else i==="select"&&(s=Hl);a||(r.needRuntime=n.helper(s))}else n.onError(rn(54,e.loc));return r.props=r.props.filter(s=>!(s.key.type===4&&s.key.content==="modelValue")),r},zb=it("passive,once,capture"),Bb=it("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),Hb=it("left,right"),cd=it("onkeyup,onkeydown,onkeypress",!0),kb=(e,t,n,r)=>{const i=[],o=[],s=[];for(let a=0;a<t.length;a++){const l=t[a];l==="native"&&pr("COMPILER_V_ON_NATIVE",n)||zb(l)?s.push(l):Hb(l)?mt(e)?cd(e.content)?i.push(l):o.push(l):(i.push(l),o.push(l)):Bb(l)?o.push(l):i.push(l)}return{keyModifiers:i,nonKeyModifiers:o,eventOptionModifiers:s}},ud=(e,t)=>mt(e)&&e.content.toLowerCase()==="onclick"?Ee(t,!0):e.type!==4?Kt(["(",e,`) === "onClick" ? "${t}" : (`,e,")"]):e,Ub=(e,t,n)=>Dl(e,t,n,r=>{const{modifiers:i}=e;if(!i.length)return r;let{key:o,value:s}=r.props[0];const{keyModifiers:a,nonKeyModifiers:l,eventOptionModifiers:c}=kb(o,i,n,e.loc);if(l.includes("right")&&(o=ud(o,"onContextmenu")),l.includes("middle")&&(o=ud(o,"onMouseup")),l.length&&(s=Ze(n.helper(kl),[s,JSON.stringify(l)])),a.length&&(!mt(o)||cd(o.content))&&(s=Ze(n.helper(Ul),[s,JSON.stringify(a)])),c.length){const u=c.map(En).join("");o=mt(o)?Ee(`${o.content}${u}`,!0):Kt(["(",o,`) + "${u}"`])}return{props:[Ge(o,s)]}}),Kb=(e,t,n)=>{const{exp:r,loc:i}=e;return r||n.onError(rn(58,i)),{props:[],needRuntime:n.helper(Kl)}},Wb=(e,t)=>{e.type===1&&e.tagType===0&&(e.tag==="script"||e.tag==="style")&&(t.onError(rn(60,e.loc)),t.removeNode())},fd=[ld],pd={cloak:ad,html:Fb,text:jb,model:Vb,on:Ub,show:Kb};function Yb(e,t={}){return sd(e,Me({},Xl,t,{nodeTransforms:[Wb,...fd,...t.nodeTransforms||[]],directiveTransforms:Me({},pd,t.directiveTransforms||{}),transformHoist:null}))}function Xb(e,t={}){return Tl(e,Me({},Xl,t))}var Gb=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",DOMDirectiveTransforms:pd,DOMNodeTransforms:fd,TRANSITION:Wl,TRANSITION_GROUP:Yl,V_MODEL_CHECKBOX:zl,V_MODEL_DYNAMIC:Cs,V_MODEL_RADIO:Vl,V_MODEL_SELECT:Hl,V_MODEL_TEXT:Bl,V_ON_WITH_KEYS:Ul,V_ON_WITH_MODIFIERS:kl,V_SHOW:Kl,compile:Yb,createDOMCompilerError:rn,parse:Xb,parserOptions:Xl,transformStyle:ld,generateCodeFrame:Lc,BASE_TRANSITION:pl,CAMELIZE:fs,CAPITALIZE:up,CREATE_BLOCK:dl,CREATE_COMMENT:Dr,CREATE_ELEMENT_BLOCK:hl,CREATE_ELEMENT_VNODE:ts,CREATE_SLOTS:vl,CREATE_STATIC:ml,CREATE_TEXT:ns,CREATE_VNODE:es,FRAGMENT:$r,GUARD_REACTIVE_PROPS:jr,IS_MEMO_SAME:yl,IS_REF:hp,KEEP_ALIVE:$i,MERGE_PROPS:Fi,NORMALIZE_CLASS:ls,NORMALIZE_PROPS:Fr,NORMALIZE_STYLE:cs,OPEN_BLOCK:Vn,POP_SCOPE_ID:pp,PUSH_SCOPE_ID:fp,RENDER_LIST:as,RENDER_SLOT:gl,RESOLVE_COMPONENT:rs,RESOLVE_DIRECTIVE:is,RESOLVE_DYNAMIC_COMPONENT:Li,RESOLVE_FILTER:os,SET_BLOCK_TRACKING:ji,SUSPENSE:_o,TELEPORT:Lr,TO_DISPLAY_STRING:Di,TO_HANDLERS:us,TO_HANDLER_KEY:ps,UNREF:dp,WITH_CTX:ds,WITH_DIRECTIVES:ss,WITH_MEMO:hs,advancePositionWithClone:zi,advancePositionWithMutation:Bi,assert:wy,baseCompile:sd,baseParse:Tl,buildProps:Il,buildSlots:Xp,checkCompatEnabled:pr,createArrayExpression:zr,createAssignmentExpression:my,createBlockStatement:yp,createCacheExpression:vp,createCallExpression:Ze,createCompilerError:Be,createCompoundExpression:Kt,createConditionalExpression:ms,createForLoopParams:ws,createFunctionExpression:ar,createIfStatement:hy,createInterpolation:py,createObjectExpression:Mt,createObjectProperty:Ge,createReturnStatement:vy,createRoot:gp,createSequenceExpression:gy,createSimpleExpression:Ee,createStructuralDirectiveTransform:Ml,createTemplateLiteral:dy,createTransformContext:$p,createVNodeCall:Vr,extractIdentifiers:zn,findDir:Et,findProp:Br,generate:Dp,getBaseTransformPreset:od,getInnerRange:El,getMemoedVNodeCall:Op,getVNodeBlockHelper:ur,getVNodeHelper:cr,hasDynamicKeyVBind:Sp,hasScopeRef:Wt,helperNameMap:mn,injectProp:Ui,isBindKey:Hi,isBuiltInType:lr,isCoreComponent:bl,isFunctionType:cb,isInDestructureAssignment:sb,isMemberExpression:Sl,isMemberExpressionBrowser:bp,isMemberExpressionNode:Oy,isReferencedIdentifier:ob,isSimpleIdentifier:Vi,isSlotOutlet:ki,isStaticExp:mt,isStaticProperty:Vp,isStaticPropertyKey:ub,isTemplateNode:Hr,isText:gs,isVSlot:Ol,locStub:tt,makeBlock:vs,noopDirectiveTransform:ad,processExpression:Es,processFor:Up,processIf:zp,processSlotOutlet:_p,registerRuntimeHelpers:mp,resolveComponentType:Qp,toValidAssetId:kr,trackSlotScopes:Yp,trackVForSlotScopes:yb,transform:Lp,transformBind:ed,transformElement:Jp,transformExpression:fb,transformModel:Fl,transformOn:Dl,traverseNode:Xi,walkBlockDeclarations:lb,walkFunctionParams:ab,walkIdentifiers:ib,warnDeprecation:xy}),Zb=ul(Gb),Jb=ul(uy),Qb=ul(cm);(function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=Zb,n=Jb,r=Qb;function i(l){if(l&&l.__esModule)return l;var c=Object.create(null);return l&&Object.keys(l).forEach(function(u){c[u]=l[u]}),c.default=l,Object.freeze(c)}var o=i(n);const s=Object.create(null);function a(l,c){if(!r.isString(l))if(l.nodeType)l=l.innerHTML;else return r.NOOP;const u=l,f=s[u];if(f)return f;if(l[0]==="#"){const m=document.querySelector(l);l=m?m.innerHTML:""}const{code:p}=t.compile(l,r.extend({hoistStatic:!0,onError:void 0,onWarn:r.NOOP},c)),d=new Function("Vue",p)(o);return d._rc=!0,s[u]=d}n.registerRuntimeCompiler(a),Object.keys(n).forEach(function(l){l!=="default"&&(e[l]=n[l])}),e.compile=a})(lp);ap.exports=lp;(function(e){e.exports=function(t){var n={};function r(i){if(n[i])return n[i].exports;var o=n[i]={i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=n,r.d=function(i,o,s){r.o(i,o)||Object.defineProperty(i,o,{enumerable:!0,get:s})},r.r=function(i){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})},r.t=function(i,o){if(o&1&&(i=r(i)),o&8||o&4&&typeof i=="object"&&i&&i.__esModule)return i;var s=Object.create(null);if(r.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:i}),o&2&&typeof i!="string")for(var a in i)r.d(s,a,function(l){return i[l]}.bind(null,a));return s},r.n=function(i){var o=i&&i.__esModule?function(){return i.default}:function(){return i};return r.d(o,"a",o),o},r.o=function(i,o){return Object.prototype.hasOwnProperty.call(i,o)},r.p="",r(r.s="fae3")}({"00ee":function(t,n,r){var i=r("b622"),o=i("toStringTag"),s={};s[o]="z",t.exports=String(s)==="[object z]"},"0366":function(t,n,r){var i=r("1c0b");t.exports=function(o,s,a){if(i(o),s===void 0)return o;switch(a){case 0:return function(){return o.call(s)};case 1:return function(l){return o.call(s,l)};case 2:return function(l,c){return o.call(s,l,c)};case 3:return function(l,c,u){return o.call(s,l,c,u)}}return function(){return o.apply(s,arguments)}}},"057f":function(t,n,r){var i=r("fc6a"),o=r("241c").f,s={}.toString,a=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],l=function(c){try{return o(c)}catch(u){return a.slice()}};t.exports.f=function(u){return a&&s.call(u)=="[object Window]"?l(u):o(i(u))}},"06cf":function(t,n,r){var i=r("83ab"),o=r("d1e7"),s=r("5c6c"),a=r("fc6a"),l=r("c04e"),c=r("5135"),u=r("0cfb"),f=Object.getOwnPropertyDescriptor;n.f=i?f:function(d,m){if(d=a(d),m=l(m,!0),u)try{return f(d,m)}catch(b){}if(c(d,m))return s(!o.f.call(d,m),d[m])}},"0cfb":function(t,n,r){var i=r("83ab"),o=r("d039"),s=r("cc12");t.exports=!i&&!o(function(){return Object.defineProperty(s("div"),"a",{get:function(){return 7}}).a!=7})},"159b":function(t,n,r){var i=r("da84"),o=r("fdbc"),s=r("17c2"),a=r("9112");for(var l in o){var c=i[l],u=c&&c.prototype;if(u&&u.forEach!==s)try{a(u,"forEach",s)}catch(f){u.forEach=s}}},"17c2":function(t,n,r){var i=r("b727").forEach,o=r("a640"),s=o("forEach");t.exports=s?[].forEach:function(l){return i(this,l,arguments.length>1?arguments[1]:void 0)}},"1be4":function(t,n,r){var i=r("d066");t.exports=i("document","documentElement")},"1c0b":function(t,n){t.exports=function(r){if(typeof r!="function")throw TypeError(String(r)+" is not a function");return r}},"1c7e":function(t,n,r){var i=r("b622"),o=i("iterator"),s=!1;try{var a=0,l={next:function(){return{done:!!a++}},return:function(){s=!0}};l[o]=function(){return this},Array.from(l,function(){throw 2})}catch(c){}t.exports=function(c,u){if(!u&&!s)return!1;var f=!1;try{var p={};p[o]=function(){return{next:function(){return{done:f=!0}}}},c(p)}catch(d){}return f}},"1d80":function(t,n){t.exports=function(r){if(r==null)throw TypeError("Can't call method on "+r);return r}},"1dde":function(t,n,r){var i=r("d039"),o=r("b622"),s=r("2d00"),a=o("species");t.exports=function(l){return s>=51||!i(function(){var c=[],u=c.constructor={};return u[a]=function(){return{foo:1}},c[l](Boolean).foo!==1})}},"23cb":function(t,n,r){var i=r("a691"),o=Math.max,s=Math.min;t.exports=function(a,l){var c=i(a);return c<0?o(c+l,0):s(c,l)}},"23e7":function(t,n,r){var i=r("da84"),o=r("06cf").f,s=r("9112"),a=r("6eeb"),l=r("ce4e"),c=r("e893"),u=r("94ca");t.exports=function(f,p){var d=f.target,m=f.global,b=f.stat,v,S,g,O,E,$;if(m?S=i:b?S=i[d]||l(d,{}):S=(i[d]||{}).prototype,S)for(g in p){if(E=p[g],f.noTargetGet?($=o(S,g),O=$&&$.value):O=S[g],v=u(m?g:d+(b?".":"#")+g,f.forced),!v&&O!==void 0){if(typeof E==typeof O)continue;c(E,O)}(f.sham||O&&O.sham)&&s(E,"sham",!0),a(S,g,E,f)}}},"241c":function(t,n,r){var i=r("ca84"),o=r("7839"),s=o.concat("length","prototype");n.f=Object.getOwnPropertyNames||function(l){return i(l,s)}},"2532":function(t,n,r){var i=r("23e7"),o=r("5a34"),s=r("1d80"),a=r("ab13");i({target:"String",proto:!0,forced:!a("includes")},{includes:function(c){return!!~String(s(this)).indexOf(o(c),arguments.length>1?arguments[1]:void 0)}})},"2a62":function(t,n,r){var i=r("825a");t.exports=function(o){var s=o.return;if(s!==void 0)return i(s.call(o)).value}},"2d00":function(t,n,r){var i=r("da84"),o=r("342f"),s=i.process,a=s&&s.versions,l=a&&a.v8,c,u;l?(c=l.split("."),u=c[0]<4?1:c[0]+c[1]):o&&(c=o.match(/Edge\/(\d+)/),(!c||c[1]>=74)&&(c=o.match(/Chrome\/(\d+)/),c&&(u=c[1]))),t.exports=u&&+u},"342f":function(t,n,r){var i=r("d066");t.exports=i("navigator","userAgent")||""},"35a1":function(t,n,r){var i=r("f5df"),o=r("3f8c"),s=r("b622"),a=s("iterator");t.exports=function(l){if(l!=null)return l[a]||l["@@iterator"]||o[i(l)]}},"37e8":function(t,n,r){var i=r("83ab"),o=r("9bf2"),s=r("825a"),a=r("df75");t.exports=i?Object.defineProperties:function(c,u){s(c);for(var f=a(u),p=f.length,d=0,m;p>d;)o.f(c,m=f[d++],u[m]);return c}},"3bbe":function(t,n,r){var i=r("861d");t.exports=function(o){if(!i(o)&&o!==null)throw TypeError("Can't set "+String(o)+" as a prototype");return o}},"3ca3":function(t,n,r){var i=r("6547").charAt,o=r("69f3"),s=r("7dd0"),a="String Iterator",l=o.set,c=o.getterFor(a);s(String,"String",function(u){l(this,{type:a,string:String(u),index:0})},function(){var f=c(this),p=f.string,d=f.index,m;return d>=p.length?{value:void 0,done:!0}:(m=i(p,d),f.index+=m.length,{value:m,done:!1})})},"3f8c":function(t,n){t.exports={}},"428f":function(t,n,r){var i=r("da84");t.exports=i},"44ad":function(t,n,r){var i=r("d039"),o=r("c6b6"),s="".split;t.exports=i(function(){return!Object("z").propertyIsEnumerable(0)})?function(a){return o(a)=="String"?s.call(a,""):Object(a)}:Object},"44d2":function(t,n,r){var i=r("b622"),o=r("7c73"),s=r("9bf2"),a=i("unscopables"),l=Array.prototype;l[a]==null&&s.f(l,a,{configurable:!0,value:o(null)}),t.exports=function(c){l[a][c]=!0}},"44e7":function(t,n,r){var i=r("861d"),o=r("c6b6"),s=r("b622"),a=s("match");t.exports=function(l){var c;return i(l)&&((c=l[a])!==void 0?!!c:o(l)=="RegExp")}},"4930":function(t,n,r){var i=r("2d00"),o=r("d039");t.exports=!!Object.getOwnPropertySymbols&&!o(function(){var s=Symbol();return!String(s)||!(Object(s)instanceof Symbol)||!Symbol.sham&&i&&i<41})},"4d64":function(t,n,r){var i=r("fc6a"),o=r("50c4"),s=r("23cb"),a=function(l){return function(c,u,f){var p=i(c),d=o(p.length),m=s(f,d),b;if(l&&u!=u){for(;d>m;)if(b=p[m++],b!=b)return!0}else for(;d>m;m++)if((l||m in p)&&p[m]===u)return l||m||0;return!l&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},"4de4":function(t,n,r){var i=r("23e7"),o=r("b727").filter,s=r("1dde"),a=s("filter");i({target:"Array",proto:!0,forced:!a},{filter:function(c){return o(this,c,arguments.length>1?arguments[1]:void 0)}})},"4df4":function(t,n,r){var i=r("0366"),o=r("7b0b"),s=r("9bdd"),a=r("e95a"),l=r("50c4"),c=r("8418"),u=r("35a1");t.exports=function(p){var d=o(p),m=typeof this=="function"?this:Array,b=arguments.length,v=b>1?arguments[1]:void 0,S=v!==void 0,g=u(d),O=0,E,$,R,T,P,N;if(S&&(v=i(v,b>2?arguments[2]:void 0,2)),g!=null&&!(m==Array&&a(g)))for(T=g.call(d),P=T.next,$=new m;!(R=P.call(T)).done;O++)N=S?s(T,v,[R.value,O],!0):R.value,c($,O,N);else for(E=l(d.length),$=new m(E);E>O;O++)N=S?v(d[O],O):d[O],c($,O,N);return $.length=O,$}},"4fad":function(t,n,r){var i=r("23e7"),o=r("6f53").entries;i({target:"Object",stat:!0},{entries:function(a){return o(a)}})},"50c4":function(t,n,r){var i=r("a691"),o=Math.min;t.exports=function(s){return s>0?o(i(s),9007199254740991):0}},"5135":function(t,n,r){var i=r("7b0b"),o={}.hasOwnProperty;t.exports=Object.hasOwn||function(a,l){return o.call(i(a),l)}},"5692":function(t,n,r){var i=r("c430"),o=r("c6cd");(t.exports=function(s,a){return o[s]||(o[s]=a!==void 0?a:{})})("versions",[]).push({version:"3.15.2",mode:i?"pure":"global",copyright:"\xA9 2021 Denis Pushkarev (zloirock.ru)"})},"56ef":function(t,n,r){var i=r("d066"),o=r("241c"),s=r("7418"),a=r("825a");t.exports=i("Reflect","ownKeys")||function(c){var u=o.f(a(c)),f=s.f;return f?u.concat(f(c)):u}},"5899":function(t,n){t.exports=`
|
12 |
\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`},"58a8":function(t,n,r){var i=r("1d80"),o=r("5899"),s="["+o+"]",a=RegExp("^"+s+s+"*"),l=RegExp(s+s+"*$"),c=function(u){return function(f){var p=String(i(f));return u&1&&(p=p.replace(a,"")),u&2&&(p=p.replace(l,"")),p}};t.exports={start:c(1),end:c(2),trim:c(3)}},"5a34":function(t,n,r){var i=r("44e7");t.exports=function(o){if(i(o))throw TypeError("The method doesn't accept regular expressions");return o}},"5c6c":function(t,n){t.exports=function(r,i){return{enumerable:!(r&1),configurable:!(r&2),writable:!(r&4),value:i}}},"6547":function(t,n,r){var i=r("a691"),o=r("1d80"),s=function(a){return function(l,c){var u=String(o(l)),f=i(c),p=u.length,d,m;return f<0||f>=p?a?"":void 0:(d=u.charCodeAt(f),d<55296||d>56319||f+1===p||(m=u.charCodeAt(f+1))<56320||m>57343?a?u.charAt(f):d:a?u.slice(f,f+2):(d-55296<<10)+(m-56320)+65536)}};t.exports={codeAt:s(!1),charAt:s(!0)}},"65f0":function(t,n,r){var i=r("861d"),o=r("e8b5"),s=r("b622"),a=s("species");t.exports=function(l,c){var u;return o(l)&&(u=l.constructor,typeof u=="function"&&(u===Array||o(u.prototype))?u=void 0:i(u)&&(u=u[a],u===null&&(u=void 0))),new(u===void 0?Array:u)(c===0?0:c)}},"69f3":function(t,n,r){var i=r("7f9a"),o=r("da84"),s=r("861d"),a=r("9112"),l=r("5135"),c=r("c6cd"),u=r("f772"),f=r("d012"),p="Object already initialized",d=o.WeakMap,m,b,v,S=function(P){return v(P)?b(P):m(P,{})},g=function(P){return function(N){var j;if(!s(N)||(j=b(N)).type!==P)throw TypeError("Incompatible receiver, "+P+" required");return j}};if(i||c.state){var O=c.state||(c.state=new d),E=O.get,$=O.has,R=O.set;m=function(P,N){if($.call(O,P))throw new TypeError(p);return N.facade=P,R.call(O,P,N),N},b=function(P){return E.call(O,P)||{}},v=function(P){return $.call(O,P)}}else{var T=u("state");f[T]=!0,m=function(P,N){if(l(P,T))throw new TypeError(p);return N.facade=P,a(P,T,N),N},b=function(P){return l(P,T)?P[T]:{}},v=function(P){return l(P,T)}}t.exports={set:m,get:b,has:v,enforce:S,getterFor:g}},"6eeb":function(t,n,r){var i=r("da84"),o=r("9112"),s=r("5135"),a=r("ce4e"),l=r("8925"),c=r("69f3"),u=c.get,f=c.enforce,p=String(String).split("String");(t.exports=function(d,m,b,v){var S=v?!!v.unsafe:!1,g=v?!!v.enumerable:!1,O=v?!!v.noTargetGet:!1,E;if(typeof b=="function"&&(typeof m=="string"&&!s(b,"name")&&o(b,"name",m),E=f(b),E.source||(E.source=p.join(typeof m=="string"?m:""))),d===i){g?d[m]=b:a(m,b);return}else S?!O&&d[m]&&(g=!0):delete d[m];g?d[m]=b:o(d,m,b)})(Function.prototype,"toString",function(){return typeof this=="function"&&u(this).source||l(this)})},"6f53":function(t,n,r){var i=r("83ab"),o=r("df75"),s=r("fc6a"),a=r("d1e7").f,l=function(c){return function(u){for(var f=s(u),p=o(f),d=p.length,m=0,b=[],v;d>m;)v=p[m++],(!i||a.call(f,v))&&b.push(c?[v,f[v]]:f[v]);return b}};t.exports={entries:l(!0),values:l(!1)}},"7156":function(t,n,r){var i=r("861d"),o=r("d2bb");t.exports=function(s,a,l){var c,u;return o&&typeof(c=a.constructor)=="function"&&c!==l&&i(u=c.prototype)&&u!==l.prototype&&o(s,u),s}},"7418":function(t,n){n.f=Object.getOwnPropertySymbols},"746f":function(t,n,r){var i=r("428f"),o=r("5135"),s=r("e538"),a=r("9bf2").f;t.exports=function(l){var c=i.Symbol||(i.Symbol={});o(c,l)||a(c,l,{value:s.f(l)})}},"7839":function(t,n){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"7b0b":function(t,n,r){var i=r("1d80");t.exports=function(o){return Object(i(o))}},"7c73":function(t,n,r){var i=r("825a"),o=r("37e8"),s=r("7839"),a=r("d012"),l=r("1be4"),c=r("cc12"),u=r("f772"),f=">",p="<",d="prototype",m="script",b=u("IE_PROTO"),v=function(){},S=function(R){return p+m+f+R+p+"/"+m+f},g=function(R){R.write(S("")),R.close();var T=R.parentWindow.Object;return R=null,T},O=function(){var R=c("iframe"),T="java"+m+":",P;return R.style.display="none",l.appendChild(R),R.src=String(T),P=R.contentWindow.document,P.open(),P.write(S("document.F=Object")),P.close(),P.F},E,$=function(){try{E=document.domain&&new ActiveXObject("htmlfile")}catch(T){}$=E?g(E):O();for(var R=s.length;R--;)delete $[d][s[R]];return $()};a[b]=!0,t.exports=Object.create||function(T,P){var N;return T!==null?(v[d]=i(T),N=new v,v[d]=null,N[b]=T):N=$(),P===void 0?N:o(N,P)}},"7db0":function(t,n,r){var i=r("23e7"),o=r("b727").find,s=r("44d2"),a="find",l=!0;a in[]&&Array(1)[a](function(){l=!1}),i({target:"Array",proto:!0,forced:l},{find:function(u){return o(this,u,arguments.length>1?arguments[1]:void 0)}}),s(a)},"7dd0":function(t,n,r){var i=r("23e7"),o=r("9ed3"),s=r("e163"),a=r("d2bb"),l=r("d44e"),c=r("9112"),u=r("6eeb"),f=r("b622"),p=r("c430"),d=r("3f8c"),m=r("ae93"),b=m.IteratorPrototype,v=m.BUGGY_SAFARI_ITERATORS,S=f("iterator"),g="keys",O="values",E="entries",$=function(){return this};t.exports=function(R,T,P,N,j,V,F){o(P,T,N);var C=function(ve){if(ve===j&&B)return B;if(!v&&ve in L)return L[ve];switch(ve){case g:return function(){return new P(this,ve)};case O:return function(){return new P(this,ve)};case E:return function(){return new P(this,ve)}}return function(){return new P(this)}},w=T+" Iterator",M=!1,L=R.prototype,z=L[S]||L["@@iterator"]||j&&L[j],B=!v&&z||C(j),K=T=="Array"&&L.entries||z,G,de,ce;if(K&&(G=s(K.call(new R)),b!==Object.prototype&&G.next&&(!p&&s(G)!==b&&(a?a(G,b):typeof G[S]!="function"&&c(G,S,$)),l(G,w,!0,!0),p&&(d[w]=$))),j==O&&z&&z.name!==O&&(M=!0,B=function(){return z.call(this)}),(!p||F)&&L[S]!==B&&c(L,S,B),d[T]=B,j)if(de={values:C(O),keys:V?B:C(g),entries:C(E)},F)for(ce in de)(v||M||!(ce in L))&&u(L,ce,de[ce]);else i({target:T,proto:!0,forced:v||M},de);return de}},"7f9a":function(t,n,r){var i=r("da84"),o=r("8925"),s=i.WeakMap;t.exports=typeof s=="function"&&/native code/.test(o(s))},"825a":function(t,n,r){var i=r("861d");t.exports=function(o){if(!i(o))throw TypeError(String(o)+" is not an object");return o}},"83ab":function(t,n,r){var i=r("d039");t.exports=!i(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},"8418":function(t,n,r){var i=r("c04e"),o=r("9bf2"),s=r("5c6c");t.exports=function(a,l,c){var u=i(l);u in a?o.f(a,u,s(0,c)):a[u]=c}},"861d":function(t,n){t.exports=function(r){return typeof r=="object"?r!==null:typeof r=="function"}},"8875":function(t,n,r){var i,o,s;(function(a,l){o=[],i=l,s=typeof i=="function"?i.apply(n,o):i,s!==void 0&&(t.exports=s)})(typeof self!="undefined"?self:this,function(){function a(){var l=Object.getOwnPropertyDescriptor(document,"currentScript");if(!l&&"currentScript"in document&&document.currentScript||l&&l.get!==a&&document.currentScript)return document.currentScript;try{throw new Error}catch(E){var c=/.*at [^(]*\((.*):(.+):(.+)\)$/ig,u=/@([^@]*):(\d+):(\d+)\s*$/ig,f=c.exec(E.stack)||u.exec(E.stack),p=f&&f[1]||!1,d=f&&f[2]||!1,m=document.location.href.replace(document.location.hash,""),b,v,S,g=document.getElementsByTagName("script");p===m&&(b=document.documentElement.outerHTML,v=new RegExp("(?:[^\\n]+?\\n){0,"+(d-2)+"}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),S=b.replace(v,"$1").trim());for(var O=0;O<g.length;O++)if(g[O].readyState==="interactive"||g[O].src===p||p===m&&g[O].innerHTML&&g[O].innerHTML.trim()===S)return g[O];return null}}return a})},"8925":function(t,n,r){var i=r("c6cd"),o=Function.toString;typeof i.inspectSource!="function"&&(i.inspectSource=function(s){return o.call(s)}),t.exports=i.inspectSource},"8bbf":function(t,n){t.exports=ap.exports},"90e3":function(t,n){var r=0,i=Math.random();t.exports=function(o){return"Symbol("+String(o===void 0?"":o)+")_"+(++r+i).toString(36)}},"9112":function(t,n,r){var i=r("83ab"),o=r("9bf2"),s=r("5c6c");t.exports=i?function(a,l,c){return o.f(a,l,s(1,c))}:function(a,l,c){return a[l]=c,a}},"94ca":function(t,n,r){var i=r("d039"),o=/#|\.prototype\./,s=function(f,p){var d=l[a(f)];return d==u?!0:d==c?!1:typeof p=="function"?i(p):!!p},a=s.normalize=function(f){return String(f).replace(o,".").toLowerCase()},l=s.data={},c=s.NATIVE="N",u=s.POLYFILL="P";t.exports=s},"9bdd":function(t,n,r){var i=r("825a"),o=r("2a62");t.exports=function(s,a,l,c){try{return c?a(i(l)[0],l[1]):a(l)}catch(u){throw o(s),u}}},"9bf2":function(t,n,r){var i=r("83ab"),o=r("0cfb"),s=r("825a"),a=r("c04e"),l=Object.defineProperty;n.f=i?l:function(u,f,p){if(s(u),f=a(f,!0),s(p),o)try{return l(u,f,p)}catch(d){}if("get"in p||"set"in p)throw TypeError("Accessors not supported");return"value"in p&&(u[f]=p.value),u}},"9ed3":function(t,n,r){var i=r("ae93").IteratorPrototype,o=r("7c73"),s=r("5c6c"),a=r("d44e"),l=r("3f8c"),c=function(){return this};t.exports=function(u,f,p){var d=f+" Iterator";return u.prototype=o(i,{next:s(1,p)}),a(u,d,!1,!0),l[d]=c,u}},a434:function(t,n,r){var i=r("23e7"),o=r("23cb"),s=r("a691"),a=r("50c4"),l=r("7b0b"),c=r("65f0"),u=r("8418"),f=r("1dde"),p=f("splice"),d=Math.max,m=Math.min,b=9007199254740991,v="Maximum allowed length exceeded";i({target:"Array",proto:!0,forced:!p},{splice:function(g,O){var E=l(this),$=a(E.length),R=o(g,$),T=arguments.length,P,N,j,V,F,C;if(T===0?P=N=0:T===1?(P=0,N=$-R):(P=T-2,N=m(d(s(O),0),$-R)),$+P-N>b)throw TypeError(v);for(j=c(E,N),V=0;V<N;V++)F=R+V,F in E&&u(j,V,E[F]);if(j.length=N,P<N){for(V=R;V<$-N;V++)F=V+N,C=V+P,F in E?E[C]=E[F]:delete E[C];for(V=$;V>$-N+P;V--)delete E[V-1]}else if(P>N)for(V=$-N;V>R;V--)F=V+N-1,C=V+P-1,F in E?E[C]=E[F]:delete E[C];for(V=0;V<P;V++)E[V+R]=arguments[V+2];return E.length=$-N+P,j}})},a4d3:function(t,n,r){var i=r("23e7"),o=r("da84"),s=r("d066"),a=r("c430"),l=r("83ab"),c=r("4930"),u=r("fdbf"),f=r("d039"),p=r("5135"),d=r("e8b5"),m=r("861d"),b=r("825a"),v=r("7b0b"),S=r("fc6a"),g=r("c04e"),O=r("5c6c"),E=r("7c73"),$=r("df75"),R=r("241c"),T=r("057f"),P=r("7418"),N=r("06cf"),j=r("9bf2"),V=r("d1e7"),F=r("9112"),C=r("6eeb"),w=r("5692"),M=r("f772"),L=r("d012"),z=r("90e3"),B=r("b622"),K=r("e538"),G=r("746f"),de=r("d44e"),ce=r("69f3"),ve=r("b727").forEach,Se=M("hidden"),Re="Symbol",Je="prototype",Qe=B("toPrimitive"),ft=ce.set,kt=ce.getterFor(Re),Ve=Object[Je],ze=o.Symbol,vt=s("JSON","stringify"),x=N.f,I=j.f,k=T.f,X=V.f,W=w("symbols"),q=w("op-symbols"),ne=w("string-to-symbol-registry"),_=w("symbol-to-string-registry"),ee=w("wks"),Q=o.QObject,fe=!Q||!Q[Je]||!Q[Je].findChild,le=l&&f(function(){return E(I({},"a",{get:function(){return I(this,"a",{value:7}).a}})).a!=7})?function(ge,te,oe){var ae=x(Ve,te);ae&&delete Ve[te],I(ge,te,oe),ae&&ge!==Ve&&I(Ve,te,ae)}:I,pe=function(ge,te){var oe=W[ge]=E(ze[Je]);return ft(oe,{type:Re,tag:ge,description:te}),l||(oe.description=te),oe},y=u?function(ge){return typeof ge=="symbol"}:function(ge){return Object(ge)instanceof ze},h=function(te,oe,ae){te===Ve&&h(q,oe,ae),b(te);var we=g(oe,!0);return b(ae),p(W,we)?(ae.enumerable?(p(te,Se)&&te[Se][we]&&(te[Se][we]=!1),ae=E(ae,{enumerable:O(0,!1)})):(p(te,Se)||I(te,Se,O(1,{})),te[Se][we]=!0),le(te,we,ae)):I(te,we,ae)},U=function(te,oe){b(te);var ae=S(oe),we=$(ae).concat(Fe(ae));return ve(we,function(Pe){(!l||Z.call(ae,Pe))&&h(te,Pe,ae[Pe])}),te},Y=function(te,oe){return oe===void 0?E(te):U(E(te),oe)},Z=function(te){var oe=g(te,!0),ae=X.call(this,oe);return this===Ve&&p(W,oe)&&!p(q,oe)?!1:ae||!p(this,oe)||!p(W,oe)||p(this,Se)&&this[Se][oe]?ae:!0},me=function(te,oe){var ae=S(te),we=g(oe,!0);if(!(ae===Ve&&p(W,we)&&!p(q,we))){var Pe=x(ae,we);return Pe&&p(W,we)&&!(p(ae,Se)&&ae[Se][we])&&(Pe.enumerable=!0),Pe}},Oe=function(te){var oe=k(S(te)),ae=[];return ve(oe,function(we){!p(W,we)&&!p(L,we)&&ae.push(we)}),ae},Fe=function(te){var oe=te===Ve,ae=k(oe?q:S(te)),we=[];return ve(ae,function(Pe){p(W,Pe)&&(!oe||p(Ve,Pe))&&we.push(W[Pe])}),we};if(c||(ze=function(){if(this instanceof ze)throw TypeError("Symbol is not a constructor");var te=!arguments.length||arguments[0]===void 0?void 0:String(arguments[0]),oe=z(te),ae=function(we){this===Ve&&ae.call(q,we),p(this,Se)&&p(this[Se],oe)&&(this[Se][oe]=!1),le(this,oe,O(1,we))};return l&&fe&&le(Ve,oe,{configurable:!0,set:ae}),pe(oe,te)},C(ze[Je],"toString",function(){return kt(this).tag}),C(ze,"withoutSetter",function(ge){return pe(z(ge),ge)}),V.f=Z,j.f=h,N.f=me,R.f=T.f=Oe,P.f=Fe,K.f=function(ge){return pe(B(ge),ge)},l&&(I(ze[Je],"description",{configurable:!0,get:function(){return kt(this).description}}),a||C(Ve,"propertyIsEnumerable",Z,{unsafe:!0}))),i({global:!0,wrap:!0,forced:!c,sham:!c},{Symbol:ze}),ve($(ee),function(ge){G(ge)}),i({target:Re,stat:!0,forced:!c},{for:function(ge){var te=String(ge);if(p(ne,te))return ne[te];var oe=ze(te);return ne[te]=oe,_[oe]=te,oe},keyFor:function(te){if(!y(te))throw TypeError(te+" is not a symbol");if(p(_,te))return _[te]},useSetter:function(){fe=!0},useSimple:function(){fe=!1}}),i({target:"Object",stat:!0,forced:!c,sham:!l},{create:Y,defineProperty:h,defineProperties:U,getOwnPropertyDescriptor:me}),i({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:Oe,getOwnPropertySymbols:Fe}),i({target:"Object",stat:!0,forced:f(function(){P.f(1)})},{getOwnPropertySymbols:function(te){return P.f(v(te))}}),vt){var Le=!c||f(function(){var ge=ze();return vt([ge])!="[null]"||vt({a:ge})!="{}"||vt(Object(ge))!="{}"});i({target:"JSON",stat:!0,forced:Le},{stringify:function(te,oe,ae){for(var we=[te],Pe=1,yt;arguments.length>Pe;)we.push(arguments[Pe++]);if(yt=oe,!(!m(oe)&&te===void 0||y(te)))return d(oe)||(oe=function(qr,bt){if(typeof yt=="function"&&(bt=yt.call(this,qr,bt)),!y(bt))return bt}),we[1]=oe,vt.apply(null,we)}})}ze[Je][Qe]||F(ze[Je],Qe,ze[Je].valueOf),de(ze,Re),L[Se]=!0},a630:function(t,n,r){var i=r("23e7"),o=r("4df4"),s=r("1c7e"),a=!s(function(l){Array.from(l)});i({target:"Array",stat:!0,forced:a},{from:o})},a640:function(t,n,r){var i=r("d039");t.exports=function(o,s){var a=[][o];return!!a&&i(function(){a.call(null,s||function(){throw 1},1)})}},a691:function(t,n){var r=Math.ceil,i=Math.floor;t.exports=function(o){return isNaN(o=+o)?0:(o>0?i:r)(o)}},a9e3:function(t,n,r){var i=r("83ab"),o=r("da84"),s=r("94ca"),a=r("6eeb"),l=r("5135"),c=r("c6b6"),u=r("7156"),f=r("c04e"),p=r("d039"),d=r("7c73"),m=r("241c").f,b=r("06cf").f,v=r("9bf2").f,S=r("58a8").trim,g="Number",O=o[g],E=O.prototype,$=c(d(E))==g,R=function(V){var F=f(V,!1),C,w,M,L,z,B,K,G;if(typeof F=="string"&&F.length>2){if(F=S(F),C=F.charCodeAt(0),C===43||C===45){if(w=F.charCodeAt(2),w===88||w===120)return NaN}else if(C===48){switch(F.charCodeAt(1)){case 66:case 98:M=2,L=49;break;case 79:case 111:M=8,L=55;break;default:return+F}for(z=F.slice(2),B=z.length,K=0;K<B;K++)if(G=z.charCodeAt(K),G<48||G>L)return NaN;return parseInt(z,M)}}return+F};if(s(g,!O(" 0o1")||!O("0b1")||O("+0x1"))){for(var T=function(F){var C=arguments.length<1?0:F,w=this;return w instanceof T&&($?p(function(){E.valueOf.call(w)}):c(w)!=g)?u(new O(R(C)),w,T):R(C)},P=i?m(O):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,fromString,range".split(","),N=0,j;P.length>N;N++)l(O,j=P[N])&&!l(T,j)&&v(T,j,b(O,j));T.prototype=E,E.constructor=T,a(o,g,T)}},ab13:function(t,n,r){var i=r("b622"),o=i("match");t.exports=function(s){var a=/./;try{"/./"[s](a)}catch(l){try{return a[o]=!1,"/./"[s](a)}catch(c){}}return!1}},ae93:function(t,n,r){var i=r("d039"),o=r("e163"),s=r("9112"),a=r("5135"),l=r("b622"),c=r("c430"),u=l("iterator"),f=!1,p=function(){return this},d,m,b;[].keys&&(b=[].keys(),"next"in b?(m=o(o(b)),m!==Object.prototype&&(d=m)):f=!0);var v=d==null||i(function(){var S={};return d[u].call(S)!==S});v&&(d={}),(!c||v)&&!a(d,u)&&s(d,u,p),t.exports={IteratorPrototype:d,BUGGY_SAFARI_ITERATORS:f}},b041:function(t,n,r){var i=r("00ee"),o=r("f5df");t.exports=i?{}.toString:function(){return"[object "+o(this)+"]"}},b0c0:function(t,n,r){var i=r("83ab"),o=r("9bf2").f,s=Function.prototype,a=s.toString,l=/^\s*function ([^ (]*)/,c="name";i&&!(c in s)&&o(s,c,{configurable:!0,get:function(){try{return a.call(this).match(l)[1]}catch(u){return""}}})},b622:function(t,n,r){var i=r("da84"),o=r("5692"),s=r("5135"),a=r("90e3"),l=r("4930"),c=r("fdbf"),u=o("wks"),f=i.Symbol,p=c?f:f&&f.withoutSetter||a;t.exports=function(d){return(!s(u,d)||!(l||typeof u[d]=="string"))&&(l&&s(f,d)?u[d]=f[d]:u[d]=p("Symbol."+d)),u[d]}},b64b:function(t,n,r){var i=r("23e7"),o=r("7b0b"),s=r("df75"),a=r("d039"),l=a(function(){s(1)});i({target:"Object",stat:!0,forced:l},{keys:function(u){return s(o(u))}})},b727:function(t,n,r){var i=r("0366"),o=r("44ad"),s=r("7b0b"),a=r("50c4"),l=r("65f0"),c=[].push,u=function(f){var p=f==1,d=f==2,m=f==3,b=f==4,v=f==6,S=f==7,g=f==5||v;return function(O,E,$,R){for(var T=s(O),P=o(T),N=i(E,$,3),j=a(P.length),V=0,F=R||l,C=p?F(O,j):d||S?F(O,0):void 0,w,M;j>V;V++)if((g||V in P)&&(w=P[V],M=N(w,V,T),f))if(p)C[V]=M;else if(M)switch(f){case 3:return!0;case 5:return w;case 6:return V;case 2:c.call(C,w)}else switch(f){case 4:return!1;case 7:c.call(C,w)}return v?-1:m||b?b:C}};t.exports={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6),filterOut:u(7)}},c04e:function(t,n,r){var i=r("861d");t.exports=function(o,s){if(!i(o))return o;var a,l;if(s&&typeof(a=o.toString)=="function"&&!i(l=a.call(o))||typeof(a=o.valueOf)=="function"&&!i(l=a.call(o))||!s&&typeof(a=o.toString)=="function"&&!i(l=a.call(o)))return l;throw TypeError("Can't convert object to primitive value")}},c14f:function(t,n,r){r("ce77")},c430:function(t,n){t.exports=!1},c6b6:function(t,n){var r={}.toString;t.exports=function(i){return r.call(i).slice(8,-1)}},c6cd:function(t,n,r){var i=r("da84"),o=r("ce4e"),s="__core-js_shared__",a=i[s]||o(s,{});t.exports=a},c740:function(t,n,r){var i=r("23e7"),o=r("b727").findIndex,s=r("44d2"),a="findIndex",l=!0;a in[]&&Array(1)[a](function(){l=!1}),i({target:"Array",proto:!0,forced:l},{findIndex:function(u){return o(this,u,arguments.length>1?arguments[1]:void 0)}}),s(a)},c8ba:function(t,n){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(i){typeof window=="object"&&(r=window)}t.exports=r},ca84:function(t,n,r){var i=r("5135"),o=r("fc6a"),s=r("4d64").indexOf,a=r("d012");t.exports=function(l,c){var u=o(l),f=0,p=[],d;for(d in u)!i(a,d)&&i(u,d)&&p.push(d);for(;c.length>f;)i(u,d=c[f++])&&(~s(p,d)||p.push(d));return p}},caad:function(t,n,r){var i=r("23e7"),o=r("4d64").includes,s=r("44d2");i({target:"Array",proto:!0},{includes:function(l){return o(this,l,arguments.length>1?arguments[1]:void 0)}}),s("includes")},cc12:function(t,n,r){var i=r("da84"),o=r("861d"),s=i.document,a=o(s)&&o(s.createElement);t.exports=function(l){return a?s.createElement(l):{}}},ce4e:function(t,n,r){var i=r("da84"),o=r("9112");t.exports=function(s,a){try{o(i,s,a)}catch(l){i[s]=a}return a}},ce77:function(t,n,r){},d012:function(t,n){t.exports={}},d039:function(t,n){t.exports=function(r){try{return!!r()}catch(i){return!0}}},d066:function(t,n,r){var i=r("428f"),o=r("da84"),s=function(a){return typeof a=="function"?a:void 0};t.exports=function(a,l){return arguments.length<2?s(i[a])||s(o[a]):i[a]&&i[a][l]||o[a]&&o[a][l]}},d1e7:function(t,n,r){var i={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,s=o&&!i.call({1:2},1);n.f=s?function(l){var c=o(this,l);return!!c&&c.enumerable}:i},d28b:function(t,n,r){var i=r("746f");i("iterator")},d2bb:function(t,n,r){var i=r("825a"),o=r("3bbe");t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var s=!1,a={},l;try{l=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,l.call(a,[]),s=a instanceof Array}catch(c){}return function(u,f){return i(u),o(f),s?l.call(u,f):u.__proto__=f,u}}():void 0)},d3b7:function(t,n,r){var i=r("00ee"),o=r("6eeb"),s=r("b041");i||o(Object.prototype,"toString",s,{unsafe:!0})},d44e:function(t,n,r){var i=r("9bf2").f,o=r("5135"),s=r("b622"),a=s("toStringTag");t.exports=function(l,c,u){l&&!o(l=u?l:l.prototype,a)&&i(l,a,{configurable:!0,value:c})}},d81d:function(t,n,r){var i=r("23e7"),o=r("b727").map,s=r("1dde"),a=s("map");i({target:"Array",proto:!0,forced:!a},{map:function(c){return o(this,c,arguments.length>1?arguments[1]:void 0)}})},da84:function(t,n,r){(function(i){var o=function(s){return s&&s.Math==Math&&s};t.exports=o(typeof globalThis=="object"&&globalThis)||o(typeof window=="object"&&window)||o(typeof self=="object"&&self)||o(typeof i=="object"&&i)||function(){return this}()||Function("return this")()}).call(this,r("c8ba"))},dbb4:function(t,n,r){var i=r("23e7"),o=r("83ab"),s=r("56ef"),a=r("fc6a"),l=r("06cf"),c=r("8418");i({target:"Object",stat:!0,sham:!o},{getOwnPropertyDescriptors:function(f){for(var p=a(f),d=l.f,m=s(p),b={},v=0,S,g;m.length>v;)g=d(p,S=m[v++]),g!==void 0&&c(b,S,g);return b}})},ddb0:function(t,n,r){var i=r("da84"),o=r("fdbc"),s=r("e260"),a=r("9112"),l=r("b622"),c=l("iterator"),u=l("toStringTag"),f=s.values;for(var p in o){var d=i[p],m=d&&d.prototype;if(m){if(m[c]!==f)try{a(m,c,f)}catch(v){m[c]=f}if(m[u]||a(m,u,p),o[p]){for(var b in s)if(m[b]!==s[b])try{a(m,b,s[b])}catch(v){m[b]=s[b]}}}}},df75:function(t,n,r){var i=r("ca84"),o=r("7839");t.exports=Object.keys||function(a){return i(a,o)}},e01a:function(t,n,r){var i=r("23e7"),o=r("83ab"),s=r("da84"),a=r("5135"),l=r("861d"),c=r("9bf2").f,u=r("e893"),f=s.Symbol;if(o&&typeof f=="function"&&(!("description"in f.prototype)||f().description!==void 0)){var p={},d=function(){var O=arguments.length<1||arguments[0]===void 0?void 0:String(arguments[0]),E=this instanceof d?new f(O):O===void 0?f():f(O);return O===""&&(p[E]=!0),E};u(d,f);var m=d.prototype=f.prototype;m.constructor=d;var b=m.toString,v=String(f("test"))=="Symbol(test)",S=/^Symbol\((.*)\)[^)]+$/;c(m,"description",{configurable:!0,get:function(){var O=l(this)?this.valueOf():this,E=b.call(O);if(a(p,O))return"";var $=v?E.slice(7,-1):E.replace(S,"$1");return $===""?void 0:$}}),i({global:!0,forced:!0},{Symbol:d})}},e163:function(t,n,r){var i=r("5135"),o=r("7b0b"),s=r("f772"),a=r("e177"),l=s("IE_PROTO"),c=Object.prototype;t.exports=a?Object.getPrototypeOf:function(u){return u=o(u),i(u,l)?u[l]:typeof u.constructor=="function"&&u instanceof u.constructor?u.constructor.prototype:u instanceof Object?c:null}},e177:function(t,n,r){var i=r("d039");t.exports=!i(function(){function o(){}return o.prototype.constructor=null,Object.getPrototypeOf(new o)!==o.prototype})},e260:function(t,n,r){var i=r("fc6a"),o=r("44d2"),s=r("3f8c"),a=r("69f3"),l=r("7dd0"),c="Array Iterator",u=a.set,f=a.getterFor(c);t.exports=l(Array,"Array",function(p,d){u(this,{type:c,target:i(p),index:0,kind:d})},function(){var p=f(this),d=p.target,m=p.kind,b=p.index++;return!d||b>=d.length?(p.target=void 0,{value:void 0,done:!0}):m=="keys"?{value:b,done:!1}:m=="values"?{value:d[b],done:!1}:{value:[b,d[b]],done:!1}},"values"),s.Arguments=s.Array,o("keys"),o("values"),o("entries")},e439:function(t,n,r){var i=r("23e7"),o=r("d039"),s=r("fc6a"),a=r("06cf").f,l=r("83ab"),c=o(function(){a(1)}),u=!l||c;i({target:"Object",stat:!0,forced:u,sham:!l},{getOwnPropertyDescriptor:function(p,d){return a(s(p),d)}})},e538:function(t,n,r){var i=r("b622");n.f=i},e893:function(t,n,r){var i=r("5135"),o=r("56ef"),s=r("06cf"),a=r("9bf2");t.exports=function(l,c){for(var u=o(c),f=a.f,p=s.f,d=0;d<u.length;d++){var m=u[d];i(l,m)||f(l,m,p(c,m))}}},e8b5:function(t,n,r){var i=r("c6b6");t.exports=Array.isArray||function(s){return i(s)=="Array"}},e95a:function(t,n,r){var i=r("b622"),o=r("3f8c"),s=i("iterator"),a=Array.prototype;t.exports=function(l){return l!==void 0&&(o.Array===l||a[s]===l)}},f5df:function(t,n,r){var i=r("00ee"),o=r("c6b6"),s=r("b622"),a=s("toStringTag"),l=o(function(){return arguments}())=="Arguments",c=function(u,f){try{return u[f]}catch(p){}};t.exports=i?o:function(u){var f,p,d;return u===void 0?"Undefined":u===null?"Null":typeof(p=c(f=Object(u),a))=="string"?p:l?o(f):(d=o(f))=="Object"&&typeof f.callee=="function"?"Arguments":d}},f772:function(t,n,r){var i=r("5692"),o=r("90e3"),s=i("keys");t.exports=function(a){return s[a]||(s[a]=o(a))}},fae3:function(t,n,r){if(r.r(n),r.d(n,"Splitpanes",function(){return N}),r.d(n,"Pane",function(){return F}),typeof window!="undefined"){var i=window.document.currentScript;{var o=r("8875");i=o(),"currentScript"in document||Object.defineProperty(document,"currentScript",{get:o})}var s=i&&i.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);s&&(r.p=s[1])}r("b64b"),r("a4d3"),r("4de4"),r("e439"),r("159b"),r("dbb4");function a(C,w,M){return w in C?Object.defineProperty(C,w,{value:M,enumerable:!0,configurable:!0,writable:!0}):C[w]=M,C}function l(C,w){var M=Object.keys(C);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(C);w&&(L=L.filter(function(z){return Object.getOwnPropertyDescriptor(C,z).enumerable})),M.push.apply(M,L)}return M}function c(C){for(var w=1;w<arguments.length;w++){var M=arguments[w]!=null?arguments[w]:{};w%2?l(Object(M),!0).forEach(function(L){a(C,L,M[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(C,Object.getOwnPropertyDescriptors(M)):l(Object(M)).forEach(function(L){Object.defineProperty(C,L,Object.getOwnPropertyDescriptor(M,L))})}return C}function u(C){if(Array.isArray(C))return C}r("e01a"),r("d3b7"),r("d28b"),r("e260"),r("3ca3"),r("ddb0");function f(C,w){var M=C==null?null:typeof Symbol!="undefined"&&C[Symbol.iterator]||C["@@iterator"];if(M!=null){var L=[],z=!0,B=!1,K,G;try{for(M=M.call(C);!(z=(K=M.next()).done)&&(L.push(K.value),!(w&&L.length===w));z=!0);}catch(de){B=!0,G=de}finally{try{!z&&M.return!=null&&M.return()}finally{if(B)throw G}}return L}}r("fb6a"),r("b0c0"),r("a630");function p(C,w){(w==null||w>C.length)&&(w=C.length);for(var M=0,L=new Array(w);M<w;M++)L[M]=C[M];return L}function d(C,w){if(!!C){if(typeof C=="string")return p(C,w);var M=Object.prototype.toString.call(C).slice(8,-1);if(M==="Object"&&C.constructor&&(M=C.constructor.name),M==="Map"||M==="Set")return Array.from(C);if(M==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(M))return p(C,w)}}function m(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
13 |
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function b(C,w){return u(C)||f(C,w)||d(C,w)||m()}function v(C,w){if(C==null)return{};var M={},L=Object.keys(C),z,B;for(B=0;B<L.length;B++)z=L[B],!(w.indexOf(z)>=0)&&(M[z]=C[z]);return M}function S(C,w){if(C==null)return{};var M=v(C,w),L,z;if(Object.getOwnPropertySymbols){var B=Object.getOwnPropertySymbols(C);for(z=0;z<B.length;z++)L=B[z],!(w.indexOf(L)>=0)&&(!Object.prototype.propertyIsEnumerable.call(C,L)||(M[L]=C[L]))}return M}function g(C){if(Array.isArray(C))return p(C)}function O(C){if(typeof Symbol!="undefined"&&C[Symbol.iterator]!=null||C["@@iterator"]!=null)return Array.from(C)}function E(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
14 |
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $(C){return g(C)||O(C)||d(C)||E()}r("d81d"),r("7db0"),r("caad"),r("2532"),r("4fad"),r("a434"),r("c740");var R=r("8bbf"),T=["target"],P={name:"splitpanes",emits:["ready","resize","resized","pane-click","pane-maximize","pane-add","pane-remove","splitter-click"],props:{horizontal:{type:Boolean},pushOtherPanes:{type:Boolean,default:!0},dblClickSplitter:{type:Boolean,default:!0},rtl:{type:Boolean,default:!1},firstSplitter:{type:Boolean}},provide:function(){return{requestUpdate:this.requestUpdate,onPaneAdd:this.onPaneAdd,onPaneRemove:this.onPaneRemove,onPaneClick:this.onPaneClick}},data:function(){return{container:null,ready:!1,panes:[],touch:{mouseDown:!1,dragging:!1,activeSplitter:null},splitterTaps:{splitter:null,timeoutId:null}}},computed:{panesCount:function(){return this.panes.length},indexedPanes:function(){return this.panes.reduce(function(w,M){return(w[M.id]=M)&&w},{})}},methods:{updatePaneComponents:function(){var w=this;this.panes.forEach(function(M){M.update&&M.update(a({},w.horizontal?"height":"width","".concat(w.indexedPanes[M.id].size,"%")))})},bindEvents:function(){document.addEventListener("mousemove",this.onMouseMove,{passive:!1}),document.addEventListener("mouseup",this.onMouseUp),"ontouchstart"in window&&(document.addEventListener("touchmove",this.onMouseMove,{passive:!1}),document.addEventListener("touchend",this.onMouseUp))},unbindEvents:function(){document.removeEventListener("mousemove",this.onMouseMove,{passive:!1}),document.removeEventListener("mouseup",this.onMouseUp),"ontouchstart"in window&&(document.removeEventListener("touchmove",this.onMouseMove,{passive:!1}),document.removeEventListener("touchend",this.onMouseUp))},onMouseDown:function(w,M){this.bindEvents(),this.touch.mouseDown=!0,this.touch.activeSplitter=M},onMouseMove:function(w){this.touch.mouseDown&&(w.preventDefault(),this.touch.dragging=!0,this.calculatePanesSize(this.getCurrentMouseDrag(w)),this.$emit("resize",this.panes.map(function(M){return{min:M.min,max:M.max,size:M.size}})))},onMouseUp:function(){var w=this;this.touch.dragging&&this.$emit("resized",this.panes.map(function(M){return{min:M.min,max:M.max,size:M.size}})),this.touch.mouseDown=!1,setTimeout(function(){w.touch.dragging=!1,w.unbindEvents()},100)},onSplitterClick:function(w,M){var L=this;"ontouchstart"in window&&(w.preventDefault(),this.dblClickSplitter&&(this.splitterTaps.splitter===M?(clearTimeout(this.splitterTaps.timeoutId),this.splitterTaps.timeoutId=null,this.onSplitterDblClick(w,M),this.splitterTaps.splitter=null):(this.splitterTaps.splitter=M,this.splitterTaps.timeoutId=setTimeout(function(){L.splitterTaps.splitter=null},500)))),this.touch.dragging||this.$emit("splitter-click",this.panes[M])},onSplitterDblClick:function(w,M){var L=0;this.panes=this.panes.map(function(z,B){return z.size=B===M?z.max:z.min,B!==M&&(L+=z.min),z}),this.panes[M].size-=L,this.$emit("pane-maximize",this.panes[M])},onPaneClick:function(w,M){this.$emit("pane-click",this.indexedPanes[M])},getCurrentMouseDrag:function(w){var M=this.container.getBoundingClientRect(),L="ontouchstart"in window&&w.touches?w.touches[0]:w,z=L.clientX,B=L.clientY;return{x:z-M.left,y:B-M.top}},getCurrentDragPercentage:function(w){w=w[this.horizontal?"y":"x"];var M=this.container[this.horizontal?"clientHeight":"clientWidth"];return this.rtl&&!this.horizontal&&(w=M-w),w*100/M},calculatePanesSize:function(w){var M=this.touch.activeSplitter,L={prevPanesSize:this.sumPrevPanesSize(M),nextPanesSize:this.sumNextPanesSize(M),prevReachedMinPanes:0,nextReachedMinPanes:0},z=0+(this.pushOtherPanes?0:L.prevPanesSize),B=100-(this.pushOtherPanes?0:L.nextPanesSize),K=Math.max(Math.min(this.getCurrentDragPercentage(w),B),z),G=[M,M+1],de=this.panes[G[0]]||null,ce=this.panes[G[1]]||null,ve=de.max<100&&K>=de.max+L.prevPanesSize,Se=ce.max<100&&K<=100-(ce.max+this.sumNextPanesSize(M+1));if(ve||Se){ve?(de.size=de.max,ce.size=Math.max(100-de.max-L.prevPanesSize-L.nextPanesSize,0)):(de.size=Math.max(100-ce.max-L.prevPanesSize-this.sumNextPanesSize(M+1),0),ce.size=ce.max);return}if(this.pushOtherPanes){var Re=this.doPushOtherPanes(L,K);if(!Re)return;L=Re.sums,G=Re.panesToResize,de=this.panes[G[0]]||null,ce=this.panes[G[1]]||null}de!==null&&(de.size=Math.min(Math.max(K-L.prevPanesSize-L.prevReachedMinPanes,de.min),de.max)),ce!==null&&(ce.size=Math.min(Math.max(100-K-L.nextPanesSize-L.nextReachedMinPanes,ce.min),ce.max))},doPushOtherPanes:function(w,M){var L=this,z=this.touch.activeSplitter,B=[z,z+1];return M<w.prevPanesSize+this.panes[B[0]].min&&(B[0]=this.findPrevExpandedPane(z).index,w.prevReachedMinPanes=0,B[0]<z&&this.panes.forEach(function(K,G){G>B[0]&&G<=z&&(K.size=K.min,w.prevReachedMinPanes+=K.min)}),w.prevPanesSize=this.sumPrevPanesSize(B[0]),B[0]===void 0)?(w.prevReachedMinPanes=0,this.panes[0].size=this.panes[0].min,this.panes.forEach(function(K,G){G>0&&G<=z&&(K.size=K.min,w.prevReachedMinPanes+=K.min)}),this.panes[B[1]].size=100-w.prevReachedMinPanes-this.panes[0].min-w.prevPanesSize-w.nextPanesSize,null):M>100-w.nextPanesSize-this.panes[B[1]].min&&(B[1]=this.findNextExpandedPane(z).index,w.nextReachedMinPanes=0,B[1]>z+1&&this.panes.forEach(function(K,G){G>z&&G<B[1]&&(K.size=K.min,w.nextReachedMinPanes+=K.min)}),w.nextPanesSize=this.sumNextPanesSize(B[1]-1),B[1]===void 0)?(w.nextReachedMinPanes=0,this.panes[this.panesCount-1].size=this.panes[this.panesCount-1].min,this.panes.forEach(function(K,G){G<L.panesCount-1&&G>=z+1&&(K.size=K.min,w.nextReachedMinPanes+=K.min)}),this.panes[B[0]].size=100-w.prevPanesSize-w.nextReachedMinPanes-this.panes[this.panesCount-1].min-w.nextPanesSize,null):{sums:w,panesToResize:B}},sumPrevPanesSize:function(w){return this.panes.reduce(function(M,L,z){return M+(z<w?L.size:0)},0)},sumNextPanesSize:function(w){return this.panes.reduce(function(M,L,z){return M+(z>w+1?L.size:0)},0)},findPrevExpandedPane:function(w){var M=$(this.panes).reverse().find(function(L){return L.index<w&&L.size>L.min});return M||{}},findNextExpandedPane:function(w){var M=this.panes.find(function(L){return L.index>w+1&&L.size>L.min});return M||{}},checkSplitpanesNodes:function(){var w=Array.from(this.container.children);w.forEach(function(M){var L=M.classList.contains("splitpanes__pane"),z=M.classList.contains("splitpanes__splitter");if(!L&&!z){M.parentNode.removeChild(M),console.warn("Splitpanes: Only <pane> elements are allowed at the root of <splitpanes>. One of your DOM nodes was removed.");return}})},addSplitter:function(w,M){var L=this,z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,B=w-1,K=document.createElement("div");K.classList.add("splitpanes__splitter"),z||(K.onmousedown=function(G){return L.onMouseDown(G,B)},typeof window!="undefined"&&"ontouchstart"in window&&(K.ontouchstart=function(G){return L.onMouseDown(G,B)}),K.onclick=function(G){return L.onSplitterClick(G,B+1)}),this.dblClickSplitter&&(K.ondblclick=function(G){return L.onSplitterDblClick(G,B+1)}),M.parentNode.insertBefore(K,M)},removeSplitter:function(w){w.onmousedown=void 0,w.onclick=void 0,w.ondblclick=void 0,w.parentNode.removeChild(w)},redoSplitters:function(){var w=this,M=Array.from(this.container.children);M.forEach(function(z){z.className.includes("splitpanes__splitter")&&w.removeSplitter(z)});var L=0;M.forEach(function(z){z.className.includes("splitpanes__pane")&&(!L&&w.firstSplitter?w.addSplitter(L,z,!0):L&&w.addSplitter(L,z),L++)})},requestUpdate:function(w){var M=w.target,L=S(w,T),z=this.indexedPanes[M._.uid];Object.entries(L).forEach(function(B){var K=b(B,2),G=K[0],de=K[1];return z[G]=de})},onPaneAdd:function(w){var M=this,L=-1;Array.from(w.$el.parentNode.children).some(function(K){return K.className.includes("splitpanes__pane")&&L++,K===w.$el});var z=parseFloat(w.minSize),B=parseFloat(w.maxSize);this.panes.splice(L,0,{id:w._.uid,index:L,min:isNaN(z)?0:z,max:isNaN(B)?100:B,size:w.size===null?null:parseFloat(w.size),givenSize:w.size,update:w.update}),this.panes.forEach(function(K,G){return K.index=G}),this.ready&&this.$nextTick(function(){M.redoSplitters(),M.resetPaneSizes({addedPane:M.panes[L]}),M.$emit("pane-add",{index:L,panes:M.panes.map(function(K){return{min:K.min,max:K.max,size:K.size}})})})},onPaneRemove:function(w){var M=this,L=this.panes.findIndex(function(B){return B.id===w._.uid}),z=this.panes.splice(L,1)[0];this.panes.forEach(function(B,K){return B.index=K}),this.$nextTick(function(){M.redoSplitters(),M.resetPaneSizes({removedPane:c(c({},z),{},{index:L})}),M.$emit("pane-remove",{removed:z,panes:M.panes.map(function(B){return{min:B.min,max:B.max,size:B.size}})})})},resetPaneSizes:function(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};!w.addedPane&&!w.removedPane?this.initialPanesSizing():this.panes.some(function(M){return M.givenSize!==null||M.min||M.max<100})?this.equalizeAfterAddOrRemove(w):this.equalize(),this.ready&&this.$emit("resized",this.panes.map(function(M){return{min:M.min,max:M.max,size:M.size}}))},equalize:function(){var w=100/this.panesCount,M=0,L=[],z=[];this.panes.forEach(function(B){B.size=Math.max(Math.min(w,B.max),B.min),M-=B.size,B.size>=B.max&&L.push(B.id),B.size<=B.min&&z.push(B.id)}),M>.1&&this.readjustSizes(M,L,z)},initialPanesSizing:function(){var w=this;100/this.panesCount;var M=100,L=[],z=[],B=0;this.panes.forEach(function(G){M-=G.size,G.size!==null&&B++,G.size>=G.max&&L.push(G.id),G.size<=G.min&&z.push(G.id)});var K=100;M>.1&&(this.panes.forEach(function(G){G.size===null&&(G.size=Math.max(Math.min(M/(w.panesCount-B),G.max),G.min)),K-=G.size}),K>.1&&this.readjustSizes(M,L,z))},equalizeAfterAddOrRemove:function(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},M=w.addedPane;w.removedPane;var L=100/this.panesCount,z=0,B=[],K=[];M&&M.givenSize!==null&&(L=(100-M.givenSize)/(this.panesCount-1)),this.panes.forEach(function(G){z-=G.size,G.size>=G.max&&B.push(G.id),G.size<=G.min&&K.push(G.id)}),!(Math.abs(z)<.1)&&(this.panes.forEach(function(G){M&&M.givenSize!==null&&M.id===G.id||(G.size=Math.max(Math.min(L,G.max),G.min)),z-=G.size,G.size>=G.max&&B.push(G.id),G.size<=G.min&&K.push(G.id)}),z>.1&&this.readjustSizes(z,B,K))},readjustSizes:function(w,M,L){var z=this,B;w>0?B=w/(this.panesCount-M.length):B=w/(this.panesCount-L.length),this.panes.forEach(function(K,G){if(w>0&&!M.includes(K.id)){var de=Math.max(Math.min(K.size+B,K.max),K.min),ce=de-K.size;w-=ce,K.size=de}else if(!L.includes(K.id)){var ve=Math.max(Math.min(K.size+B,K.max),K.min),Se=ve-K.size;w-=Se,K.size=ve}K.update(a({},z.horizontal?"height":"width","".concat(z.indexedPanes[K.id].size,"%")))}),Math.abs(w)>.1&&this.$nextTick(function(){z.ready&&console.warn("Splitpanes: Could not resize panes correctly due to their constraints.")})}},watch:{panes:{deep:!0,immediate:!1,handler:function(){this.updatePaneComponents()}},horizontal:function(){this.updatePaneComponents()},firstSplitter:function(){this.redoSplitters()},dblClickSplitter:function(w){var M=this,L=$(this.container.querySelectorAll(".splitpanes__splitter"));L.forEach(function(z,B){z.ondblclick=w?function(K){return M.onSplitterDblClick(K,B)}:void 0})}},beforeUnmount:function(){this.ready=!1},mounted:function(){this.container=this.$refs.container,this.checkSplitpanesNodes(),this.redoSplitters(),this.resetPaneSizes(),this.$emit("ready"),this.ready=!0},render:function(){return Object(R.h)("div",{ref:"container",class:["splitpanes","splitpanes--".concat(this.horizontal?"horizontal":"vertical"),{"splitpanes--dragging":this.touch.dragging}]},this.$slots.default())}};r("c14f");var N=P;function j(C,w,M,L,z,B){return Object(R.openBlock)(),Object(R.createBlock)("div",{class:"splitpanes__pane",onClick:w[1]||(w[1]=function(K){return B.onPaneClick(K,C._.uid)}),style:C.style},[Object(R.renderSlot)(C.$slots,"default")],4)}r("a9e3");var V={name:"pane",inject:["requestUpdate","onPaneAdd","onPaneRemove","onPaneClick"],props:{size:{type:[Number,String],default:null},minSize:{type:[Number,String],default:0},maxSize:{type:[Number,String],default:100}},data:function(){return{style:{}}},mounted:function(){this.onPaneAdd(this)},beforeUnmount:function(){this.onPaneRemove(this)},methods:{update:function(w){this.style=w}},computed:{sizeNumber:function(){return this.size||this.size===0?parseFloat(this.size):null},minSizeNumber:function(){return parseFloat(this.minSize)},maxSizeNumber:function(){return parseFloat(this.maxSize)}},watch:{sizeNumber:function(w){this.requestUpdate({target:this,size:w})},minSizeNumber:function(w){this.requestUpdate({target:this,min:w})},maxSizeNumber:function(w){this.requestUpdate({target:this,max:w})}}};V.render=j;var F=V},fb6a:function(t,n,r){var i=r("23e7"),o=r("861d"),s=r("e8b5"),a=r("23cb"),l=r("50c4"),c=r("fc6a"),u=r("8418"),f=r("b622"),p=r("1dde"),d=p("slice"),m=f("species"),b=[].slice,v=Math.max;i({target:"Array",proto:!0,forced:!d},{slice:function(g,O){var E=c(this),$=l(E.length),R=a(g,$),T=a(O===void 0?$:O,$),P,N,j;if(s(E)&&(P=E.constructor,typeof P=="function"&&(P===Array||s(P.prototype))?P=void 0:o(P)&&(P=P[m],P===null&&(P=void 0)),P===Array||P===void 0))return b.call(E,R,T);for(N=new(P===void 0?Array:P)(v(T-R,0)),j=0;R<T;R++,j++)R in E&&u(N,j,E[R]);return N.length=j,N}})},fc6a:function(t,n,r){var i=r("44ad"),o=r("1d80");t.exports=function(s){return i(o(s))}},fdbc:function(t,n){t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},fdbf:function(t,n,r){var i=r("4930");t.exports=i&&!Symbol.sham&&typeof Symbol.iterator=="symbol"}})})(fy);var dd=(e,t)=>{for(const[n,r]of t)e[n]=r;return e};if(typeof Zi=="undefined")var Zi=window;var qb=Object.create,Gl=Object.defineProperty,_b=Object.getPrototypeOf,e0=Object.prototype.hasOwnProperty,t0=Object.getOwnPropertyNames,n0=Object.getOwnPropertyDescriptor,r0=e=>Gl(e,"__esModule",{value:!0}),Vt=(e,t)=>()=>(t||(t={exports:{}},e(t.exports,t)),t.exports),i0=(e,t,n)=>{if(r0(e),t&&typeof t=="object"||typeof t=="function")for(let r of t0(t))!e0.call(e,r)&&r!=="default"&&Gl(e,r,{get:()=>t[r],enumerable:!(n=n0(t,r))||n.enumerable});return e},o0=e=>e&&e.__esModule?e:i0(Gl(e!=null?qb(_b(e)):{},"default",{value:e,enumerable:!0}),e),hd=Vt((e,t)=>{function n(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}t.exports=n}),s0=Vt((e,t)=>{var n=typeof Zi=="object"&&Zi&&Zi.Object===Object&&Zi;t.exports=n}),md=Vt((e,t)=>{var n=s0(),r=typeof self=="object"&&self&&self.Object===Object&&self,i=n||r||Function("return this")();t.exports=i}),a0=Vt((e,t)=>{var n=md(),r=function(){return n.Date.now()};t.exports=r}),gd=Vt((e,t)=>{var n=md(),r=n.Symbol;t.exports=r}),l0=Vt((e,t)=>{var n=gd(),r=Object.prototype,i=r.hasOwnProperty,o=r.toString,s=n?n.toStringTag:void 0;function a(l){var c=i.call(l,s),u=l[s];try{l[s]=void 0;var f=!0}catch(d){}var p=o.call(l);return f&&(c?l[s]=u:delete l[s]),p}t.exports=a}),c0=Vt((e,t)=>{var n=Object.prototype,r=n.toString;function i(o){return r.call(o)}t.exports=i}),u0=Vt((e,t)=>{var n=gd(),r=l0(),i=c0(),o="[object Null]",s="[object Undefined]",a=n?n.toStringTag:void 0;function l(c){return c==null?c===void 0?s:o:a&&a in Object(c)?r(c):i(c)}t.exports=l}),f0=Vt((e,t)=>{function n(r){return r!=null&&typeof r=="object"}t.exports=n}),p0=Vt((e,t)=>{var n=u0(),r=f0(),i="[object Symbol]";function o(s){return typeof s=="symbol"||r(s)&&n(s)==i}t.exports=o}),d0=Vt((e,t)=>{var n=hd(),r=p0(),i=0/0,o=/^\s+|\s+$/g,s=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;function u(f){if(typeof f=="number")return f;if(r(f))return i;if(n(f)){var p=typeof f.valueOf=="function"?f.valueOf():f;f=n(p)?p+"":p}if(typeof f!="string")return f===0?f:+f;f=f.replace(o,"");var d=a.test(f);return d||l.test(f)?c(f.slice(2),d?2:8):s.test(f)?i:+f}t.exports=u}),h0=Vt((e,t)=>{var n=hd(),r=a0(),i=d0(),o="Expected a function",s=Math.max,a=Math.min;function l(c,u,f){var p,d,m,b,v,S,g=0,O=!1,E=!1,$=!0;if(typeof c!="function")throw new TypeError(o);u=i(u)||0,n(f)&&(O=!!f.leading,E="maxWait"in f,m=E?s(i(f.maxWait)||0,u):m,$="trailing"in f?!!f.trailing:$);function R(M){var L=p,z=d;return p=d=void 0,g=M,b=c.apply(z,L),b}function T(M){return g=M,v=setTimeout(j,u),O?R(M):b}function P(M){var L=M-S,z=M-g,B=u-L;return E?a(B,m-z):B}function N(M){var L=M-S,z=M-g;return S===void 0||L>=u||L<0||E&&z>=m}function j(){var M=r();if(N(M))return V(M);v=setTimeout(j,P(M))}function V(M){return v=void 0,$&&p?R(M):(p=d=void 0,b)}function F(){v!==void 0&&clearTimeout(v),g=0,p=S=d=v=void 0}function C(){return v===void 0?b:V(r())}function w(){var M=r(),L=N(M);if(p=arguments,d=this,S=M,L){if(v===void 0)return T(S);if(E)return clearTimeout(v),v=setTimeout(j,u),R(S)}return v===void 0&&(v=setTimeout(j,u)),b}return w.cancel=F,w.flush=C,w}t.exports=l}),m0=o0(h0()),g0=m0.default;function v0(){let e=[],t=[];function n(g,O){g.forEach(E=>{E.call(null,O)})}this.onSingleTap=function(g){typeof g=="function"&&!e.includes(g)&&e.push(g)},this.onDoubleTap=function(g){typeof g=="function"&&!t.includes(g)&&t.push(g)},this.attach=function(g){if(!(g instanceof Element)){console.error("TapDetector.attach: arg must be an Element");return}g.addEventListener("touchstart",c),g.addEventListener("touchmove",f),g.addEventListener("touchend",u),g.addEventListener("mousedown",p),g.addEventListener("mouseup",d),g.addEventListener("mousemove",m)},this.detach=function(g){g.removeEventListener("touchstart",c),g.removeEventListener("touchmove",f),g.removeEventListener("touchend",u),g.removeEventListener("mousedown",p),g.removeEventListener("mouseup",d),g.removeEventListener("mousemove",m)};let r=!1,i=0,o=0,s=0,a=0,l=0;function c(g){r=!0,g.touches.length===1&&b(g.touches[0].clientX,g.touches[0].clientY)}function u(g){g.touches.length===0&&v()}function f(g){g.touches.length===1&&S(g.touches[0].clientX,g.touches[0].clientY)}function p(g){r||b(g.clientX,g.clientY)}function d(g){r||v()}function m(g){r||g.button===0&&S(g.clientX,g.clientY)}function b(g,O){a=g,l=O,s=0}function v(){let g=Date.now();s<10&&(g-i<300?o+=1:o=1,i=Date.now(),n(e,{clientX:a,clientY:l}),o===2&&(n(t,{clientX:a,clientY:l}),o=0)),s=0}function S(g,O){let E=a-g,$=l-O;s+=Math.sqrt(E*E+$*$),a=g,l=O}}const y0={props:{minScale:{type:Number,default:1},maxScale:{type:Number,default:5},zoomed:{type:Boolean,default:!1},resetTrigger:{type:Number,default:1e5},aspectRatio:{type:Number,default:1},backgroundColor:{type:String,default:"transparent"},pivot:{type:String,default:"cursor"},zoomingElastic:{type:Boolean,default:!0},limitTranslation:{type:Boolean,default:!0},doubleClickToZoom:{type:Boolean,default:!0},mouseWheelToZoom:{type:Boolean,default:!0},lockPanOnNoScale:{type:Boolean,default:!0}},data(){return{containerWidth:1,containerHeight:1,containerLeft:0,containerTop:0,translateX:0,animTranslateX:0,translateY:0,animTranslateY:0,scale:1,animScale:1,lastFullWheelTime:0,lastWheelTime:0,lastWheelDirection:"y",isPointerDown:!1,pointerPosX:-1,pointerPosY:-1,twoFingerInitDist:0,panLocked:!0,raf:null,tapDetector:null}},computed:{wrapperStyle(){let e=this.containerWidth*this.animTranslateX,t=this.containerHeight*this.animTranslateY;return{transform:[`translate(${e}px, ${t}px)`,`scale(${this.animScale})`].join(" ")}}},watch:{scale(e){e!==1&&(this.$emit("update:zoomed",!0),this.panLocked=!1)},resetTrigger:"reset"},mounted(){this.tapDetector=new v0,this.tapDetector.attach(this.$refs.root),this.doubleClickToZoom&&this.tapDetector.onDoubleTap(this.onDoubleTap),window.addEventListener("resize",this.onWindowResize),this.onWindowResize(),this.refreshContainerPos(),this.loop()},beforeUnmount(){this.tapDetector.detach(this.$refs.root),window.removeEventListener("resize",this.onWindowResize),window.cancelAnimationFrame(this.raf)},methods:{reset(){this.scale=1,this.panLocked=!0,this.translateX=0,this.translateY=0},zoomIn(e=2){this.tryToScale(e),this.onInteractionEnd()},zoomOut(e=.5){this.tryToScale(e),this.onInteractionEnd()},tryToScale(e){let t=this.scale*e;if(this.zoomingElastic){if(t<this.minScale||t>this.maxScale){let n=Math.log2(e);n*=.2,e=Math.pow(2,n),t=this.scale*e}}else t<this.minScale?t=this.minScale:t>this.maxScale&&(t=this.maxScale);if(e=t/this.scale,this.scale=t,this.pivot!=="image-center"){let n=(this.pointerPosX-this.containerLeft)/this.containerWidth,r=(this.pointerPosY-this.containerTop)/this.containerHeight;this.translateX=(.5+this.translateX-n)*e+n-.5,this.translateY=(.5+this.translateY-r)*e+r-.5}},setPointerPosCenter(){this.pointerPosX=this.containerLeft+this.containerWidth/2,this.pointerPosY=this.containerTop+this.containerHeight/2},onPointerMove(e,t){if(this.isPointerDown){let n=e-this.pointerPosX,r=t-this.pointerPosY;(!this.lockPanOnNoScale||!this.panLocked)&&(this.translateX+=n/this.containerWidth,this.translateY+=r/this.containerHeight)}this.pointerPosX=e,this.pointerPosY=t},onInteractionEnd:g0(function(){this.limit(),this.panLocked=this.scale===1,this.$emit("update:zoomed",!this.panLocked)},100),limit(){if(this.scale<this.minScale?this.scale=this.minScale:this.scale>this.maxScale&&this.tryToScale(this.maxScale/this.scale),this.limitTranslation){let e=this.calcTranslateLimit();Math.abs(this.translateX)>e.x&&(this.translateX*=e.x/Math.abs(this.translateX)),Math.abs(this.translateY)>e.y&&(this.translateY*=e.y/Math.abs(this.translateY))}},calcTranslateLimit(){if(this.getMarginDirection()==="y"){let e=this.containerWidth/this.aspectRatio/this.containerHeight,t=(this.scale*e-1)/2;return t<0&&(t=0),{x:(this.scale-1)/2,y:t}}else{let e=this.containerHeight*this.aspectRatio/this.containerWidth,t=(this.scale*e-1)/2;return t<0&&(t=0),{x:t,y:(this.scale-1)/2}}},getMarginDirection(){return this.containerWidth/this.containerHeight>this.aspectRatio?"x":"y"},onDoubleTap(e){this.scale===1?(e.clientX>0&&(this.pointerPosX=e.clientX,this.pointerPosY=e.clientY),this.tryToScale(Math.min(3,this.maxScale))):this.reset(),this.onInteractionEnd()},onWindowResize(){let e=window.getComputedStyle(this.$refs.root);this.containerWidth=parseFloat(e.width),this.containerHeight=parseFloat(e.height),this.setPointerPosCenter(),this.limit()},refreshContainerPos(){let e=this.$refs.root.getBoundingClientRect();this.containerLeft=e.left,this.containerTop=e.top},loop(){this.animScale=this.gainOn(this.animScale,this.scale),this.animTranslateX=this.gainOn(this.animTranslateX,this.translateX),this.animTranslateY=this.gainOn(this.animTranslateY,this.translateY),this.raf=window.requestAnimationFrame(this.loop)},gainOn(e,t){let n=(t-e)*.3;return Math.abs(n)>1e-5?e+n:t},onMouseWheel(e){if(!this.mouseWheelToZoom)return;e.preventDefault(),e.detail&&(e.wheelDelta=e.detail*-10);let t=Date.now();Math.abs(e.wheelDelta)===120?t-this.lastFullWheelTime>50&&(this.onMouseWheelDo(e.wheelDelta),this.lastFullWheelTime=t):(t-this.lastWheelTime>50&&typeof e.deltaX=="number"&&(this.lastWheelDirection=e.detail==0&&Math.abs(e.deltaX)>Math.abs(e.deltaY)?"x":"y",this.lastWheelDirection==="x"&&this.$emit("swipe",e.deltaX>0?"left":"right")),this.lastWheelDirection==="y"&&this.onMouseWheelDo(e.wheelDelta)),this.lastWheelTime=t},onMouseWheelDo(e){let t=Math.pow(1.25,e/120);this.tryToScale(t),this.onInteractionEnd()},onMouseDown(e){this.refreshContainerPos(),this.isPointerDown=!0,this.pointerPosX=e.clientX,this.pointerPosY=e.clientY},onMouseUp(e){this.isPointerDown=!1,this.onInteractionEnd()},onMouseMove(e){this.onPointerMove(e.clientX,e.clientY)},onTouchStart(e){if(e.touches.length===1)this.refreshContainerPos(),this.pointerPosX=e.touches[0].clientX,this.pointerPosY=e.touches[0].clientY,this.isPointerDown=!0;else if(e.touches.length===2){this.isPointerDown=!0,this.pointerPosX=(e.touches[0].clientX+e.touches[1].clientX)/2,this.pointerPosY=(e.touches[0].clientY+e.touches[1].clientY)/2;let t=e.touches[0].clientX-e.touches[1].clientX,n=e.touches[0].clientY-e.touches[1].clientY;this.twoFingerInitDist=Math.sqrt(t*t+n*n)}},onTouchEnd(e){e.touches.length===0?(this.isPointerDown=!1,Math.abs(this.scale-1)<.1&&(this.scale=1),this.onInteractionEnd()):e.touches.length===1&&(this.pointerPosX=e.touches[0].clientX,this.pointerPosY=e.touches[0].clientY)},onTouchMove(e){if(e.touches.length===1)this.onPointerMove(e.touches[0].clientX,e.touches[0].clientY);else if(e.touches.length===2){let t=(e.touches[0].clientX+e.touches[1].clientX)/2,n=(e.touches[0].clientY+e.touches[1].clientY)/2;this.onPointerMove(t,n),this.pointerPosX=t,this.pointerPosY=n;let r=e.touches[0].clientX-e.touches[1].clientX,i=e.touches[0].clientY-e.touches[1].clientY,o=Math.sqrt(r*r+i*i);this.tryToScale(o/this.twoFingerInitDist),this.twoFingerInitDist=o}}}};function b0(e,t,n,r,i,o){return Ie(),Si("div",{ref:"root",class:"vue-zoomer",style:Zt({backgroundColor:n.backgroundColor}),onMousewheel:t[0]||(t[0]=(...s)=>o.onMouseWheel&&o.onMouseWheel(...s)),onDOMMouseScroll:t[1]||(t[1]=(...s)=>o.onMouseWheel&&o.onMouseWheel(...s)),onMousedown:t[2]||(t[2]=(...s)=>o.onMouseDown&&o.onMouseDown(...s)),onMouseup:t[3]||(t[3]=(...s)=>o.onMouseUp&&o.onMouseUp(...s)),onMousemove:t[4]||(t[4]=(...s)=>o.onMouseMove&&o.onMouseMove(...s)),onMouseout:t[5]||(t[5]=(...s)=>o.setPointerPosCenter&&o.setPointerPosCenter(...s)),onTouchstart:t[6]||(t[6]=(...s)=>o.onTouchStart&&o.onTouchStart(...s)),onTouchend:t[7]||(t[7]=(...s)=>o.onTouchEnd&&o.onTouchEnd(...s)),onTouchmove:t[8]||(t[8]=(...s)=>o.onTouchMove&&o.onTouchMove(...s))},[Ho("div",{class:"zoomer",style:Zt(o.wrapperStyle)},[qe(e.$slots,"default",{},void 0,!0)],4)],36)}var S0=dd(y0,[["render",b0],["__scopeId","data-v-3ce6d41b"]]);const E0=50,O0={props:{modelValue:{type:Number,required:!0},list:{type:Array,required:!0},backgroundColor:{type:String,default:"#333"},pivot:{type:String,default:"cursor"},zoomingElastic:{type:Boolean,default:!0},limitTranslation:{type:Boolean,default:!0},doubleClickToZoom:{type:Boolean,default:!0},mouseWheelToZoom:{type:Boolean,default:!0}},data(){return{zoomerRefs:[],containerWidth:1,containerHeight:1,selIndex:this.modelValue,animSelIndex:this.modelValue,currentZoomed:!1,autoSliding:!1,imageAspectRatios:[],isPointerDown:!1,lastPointerX:0,slideOffsetX:0}},computed:{middleStyle(){return{left:`${0+this.slideOffsetX}px`}},leftStyle(){return{left:`${-this.containerWidth+this.slideOffsetX}px`}},rightStyle(){return{left:`${this.containerWidth+this.slideOffsetX}px`}},slideThresh(){return Math.max(E0,this.containerWidth*.1)}},watch:{modelValue(e){e!==this.animSelIndex&&(this.selIndex=e,this.animSelIndex=e)},selIndex(){this.$nextTick(()=>{this.zoomerRefs.forEach(e=>{e.refreshContainerPos()})})}},mounted(){window.addEventListener("resize",this.onWindowResize),this.onWindowResize()},unmounted(){window.removeEventListener("resize",this.onWindowResize)},methods:{reset(){this.zoomerRefs.forEach(e=>{e.reset()})},zoomIn(e){this.zoomerRefs[1]&&this.zoomerRefs[1].zoomIn(e)},zoomOut(e){this.zoomerRefs[1]&&this.zoomerRefs[1].zoomOut(e)},onWindowResize(){let e=window.getComputedStyle(this.$refs.root);this.containerWidth=parseFloat(e.width),this.containerHeight=parseFloat(e.height)},onPointerMove(e){if(this.isPointerDown&&!this.currentZoomed){let t=this.selIndex===0&&e>0&&this.slideOffsetX+e>0||this.selIndex===this.list.length-1&&e<0&&this.slideOffsetX+e<0?.3:1;this.slideOffsetX+=e*t}},onPointerUp(){this.slideOffsetX<-this.slideThresh?this.paginate(1):this.slideOffsetX>this.slideThresh?this.paginate(-1):this.paginate(0)},onImageDragStart(e){return e.preventDefault(),!1},paginate(e){let t=this.selIndex+e;if(t<0||t>=this.list.length){this.slideOffsetX=0;return}this.slideOffsetX=this.containerWidth*-e,this.autoSliding=!0,this.$emit("update:modelValue",t),this.animSelIndex=t,setTimeout(()=>{this.selIndex=t,this.slideOffsetX=0,this.autoSliding=!1},400)},onMouseDown(e){this.isPointerDown=!0,this.lastPointerX=e.clientX},onMouseUp(e){this.isPointerDown=!1,this.onPointerUp()},onMouseMove(e){this.isPointerDown&&(this.onPointerMove(e.clientX-this.lastPointerX),this.lastPointerX=e.clientX)},onTouchStart(e){e.touches.length===1&&(this.isPointerDown=!0,this.lastPointerX=e.touches[0].clientX)},onTouchEnd(e){e.touches.length===0&&(this.isPointerDown=!1,this.onPointerUp())},onTouchMove(e){e.touches.length===1&&(this.onPointerMove(e.touches[0].clientX-this.lastPointerX),this.lastPointerX=e.touches[0].clientX)},onImageLoad(e,t){let n=t.target.naturalWidth/t.target.naturalHeight;this.imageAspectRatios[e]=n},onImageSwipe(e){this.paginate(e=="right"?-1:1)}}},w0=["src","onLoad"];function T0(e,t,n,r,i,o){const s=er("v-zoomer");return Ie(),Si("div",{ref:"root",class:vn([{anim:i.autoSliding&&!i.isPointerDown},"vue-zoomer-gallery"]),style:Zt({"background-color":n.backgroundColor}),onMousemove:t[2]||(t[2]=(...a)=>o.onMouseMove&&o.onMouseMove(...a)),onMousedown:t[3]||(t[3]=(...a)=>o.onMouseDown&&o.onMouseDown(...a)),onMouseout:t[4]||(t[4]=(...a)=>o.onMouseUp&&o.onMouseUp(...a)),onMouseup:t[5]||(t[5]=(...a)=>o.onMouseUp&&o.onMouseUp(...a)),onTouchstart:t[6]||(t[6]=(...a)=>o.onTouchStart&&o.onTouchStart(...a)),onTouchend:t[7]||(t[7]=(...a)=>o.onTouchEnd&&o.onTouchEnd(...a)),onTouchmove:t[8]||(t[8]=Xe((...a)=>o.onTouchMove&&o.onTouchMove(...a),["prevent"]))},[(Ie(),Si(Ye,null,ko(3,(a,l)=>he(s,{ref:c=>{i.zoomerRefs[l]=c},key:l+"-"+i.selIndex,class:vn([["left","middle","right"][l],"slide"]),style:Zt([o.leftStyle,o.middleStyle,o.rightStyle][l]),"max-scale":10,zoomed:i.currentZoomed,"onUpdate:zoomed":t[1]||(t[1]=c=>i.currentZoomed=c),"reset-trigger":l,"aspect-ratio":i.imageAspectRatios[i.selIndex+l-1]||1,pivot:n.pivot,"zooming-elastic":n.zoomingElastic,"limit-translation":n.limitTranslation,"double-click-to-zoom":n.doubleClickToZoom,"mouse-wheel-to-zoom":n.mouseWheelToZoom,onSwipe:o.onImageSwipe},{default:qt(()=>[i.selIndex+l-1>-1&&i.selIndex+l-1<n.list.length?(Ie(),Si("img",{key:0,src:n.list[i.selIndex+l-1],draggable:"false",style:{"object-fit":"contain",width:"100%",height:"100%"},onLoad:c=>o.onImageLoad(i.selIndex+l-1,c),onDragstart:t[0]||(t[0]=(...c)=>o.onImageDragStart&&o.onImageDragStart(...c))},null,40,w0)):Lt("",!0)]),_:2},1032,["class","style","zoomed","reset-trigger","aspect-ratio","pivot","zooming-elastic","limit-translation","double-click-to-zoom","mouse-wheel-to-zoom","onSwipe"])),64))],38)}var P0=dd(O0,[["render",T0],["__scopeId","data-v-1af1e362"]]),O1={install(e){e.component("VZoomer",S0),e.component("VZoomerGallery",P0)}};function Zl(e){return[null,void 0,!1].indexOf(e)!==-1}function vd(e){var t={exports:{}};return e(t,t.exports),t.exports}function yd(e){return(yd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}var bd=vd(function(e,t){e.exports=function(){var n=["decimals","thousand","mark","prefix","suffix","encoder","decoder","negativeBefore","negative","edit","undo"];function r(m){return m.split("").reverse().join("")}function i(m,b){return m.substring(0,b.length)===b}function o(m,b){return m.slice(-1*b.length)===b}function s(m,b,v){if((m[b]||m[v])&&m[b]===m[v])throw new Error(b)}function a(m){return typeof m=="number"&&isFinite(m)}function l(m,b){return m=m.toString().split("e"),(+((m=(m=Math.round(+(m[0]+"e"+(m[1]?+m[1]+b:b)))).toString().split("e"))[0]+"e"+(m[1]?+m[1]-b:-b))).toFixed(b)}function c(m,b,v,S,g,O,E,$,R,T,P,N){var j,V,F,C=N,w="",M="";return O&&(N=O(N)),!!a(N)&&(m!==!1&&parseFloat(N.toFixed(m))===0&&(N=0),N<0&&(j=!0,N=Math.abs(N)),m!==!1&&(N=l(N,m)),(N=N.toString()).indexOf(".")!==-1?(F=(V=N.split("."))[0],v&&(w=v+V[1])):F=N,b&&(F=r(F).match(/.{1,3}/g),F=r(F.join(r(b)))),j&&$&&(M+=$),S&&(M+=S),j&&R&&(M+=R),M+=F,M+=w,g&&(M+=g),T&&(M=T(M,C)),M)}function u(m,b,v,S,g,O,E,$,R,T,P,N){var j,V="";return P&&(N=P(N)),!(!N||typeof N!="string")&&($&&i(N,$)&&(N=N.replace($,""),j=!0),S&&i(N,S)&&(N=N.replace(S,"")),R&&i(N,R)&&(N=N.replace(R,""),j=!0),g&&o(N,g)&&(N=N.slice(0,-1*g.length)),b&&(N=N.split(b).join("")),v&&(N=N.replace(v,".")),j&&(V+="-"),(V=(V+=N).replace(/[^0-9\.\-.]/g,""))!==""&&(V=Number(V),E&&(V=E(V)),!!a(V)&&V))}function f(m){var b,v,S,g={};for(m.suffix===void 0&&(m.suffix=m.postfix),b=0;b<n.length;b+=1)if((S=m[v=n[b]])===void 0)v!=="negative"||g.negativeBefore?v==="mark"&&g.thousand!=="."?g[v]=".":g[v]=!1:g[v]="-";else if(v==="decimals"){if(!(S>=0&&S<8))throw new Error(v);g[v]=S}else if(v==="encoder"||v==="decoder"||v==="edit"||v==="undo"){if(typeof S!="function")throw new Error(v);g[v]=S}else{if(typeof S!="string")throw new Error(v);g[v]=S}return s(g,"mark","thousand"),s(g,"prefix","negative"),s(g,"prefix","negativeBefore"),g}function p(m,b,v){var S,g=[];for(S=0;S<n.length;S+=1)g.push(m[n[S]]);return g.push(v),b.apply("",g)}function d(m){if(!(this instanceof d))return new d(m);yd(m)==="object"&&(m=f(m),this.to=function(b){return p(m,c,b)},this.from=function(b){return p(m,u,b)})}return d}()});function Kr(e){return(Kr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}var x0=vd(function(e,t){e.exports=function(){var n="14.6.3";function r(y){return Kr(y)==="object"&&typeof y.to=="function"&&typeof y.from=="function"}function i(y){y.parentElement.removeChild(y)}function o(y){return y!=null}function s(y){y.preventDefault()}function a(y){return y.filter(function(h){return!this[h]&&(this[h]=!0)},{})}function l(y,h){return Math.round(y/h)*h}function c(y,h){var U=y.getBoundingClientRect(),Y=y.ownerDocument,Z=Y.documentElement,me=g(Y);return/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(me.x=0),h?U.top+me.y-Z.clientTop:U.left+me.x-Z.clientLeft}function u(y){return typeof y=="number"&&!isNaN(y)&&isFinite(y)}function f(y,h,U){U>0&&(b(y,h),setTimeout(function(){v(y,h)},U))}function p(y){return Math.max(Math.min(y,100),0)}function d(y){return Array.isArray(y)?y:[y]}function m(y){var h=(y=String(y)).split(".");return h.length>1?h[1].length:0}function b(y,h){y.classList&&!/\s/.test(h)?y.classList.add(h):y.className+=" "+h}function v(y,h){y.classList&&!/\s/.test(h)?y.classList.remove(h):y.className=y.className.replace(new RegExp("(^|\\b)"+h.split(" ").join("|")+"(\\b|$)","gi")," ")}function S(y,h){return y.classList?y.classList.contains(h):new RegExp("\\b"+h+"\\b").test(y.className)}function g(y){var h=window.pageXOffset!==void 0,U=(y.compatMode||"")==="CSS1Compat";return{x:h?window.pageXOffset:U?y.documentElement.scrollLeft:y.body.scrollLeft,y:h?window.pageYOffset:U?y.documentElement.scrollTop:y.body.scrollTop}}function O(){return window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"}}function E(){var y=!1;try{var h=Object.defineProperty({},"passive",{get:function(){y=!0}});window.addEventListener("test",null,h)}catch(U){}return y}function $(){return window.CSS&&CSS.supports&&CSS.supports("touch-action","none")}function R(y,h){return 100/(h-y)}function T(y,h,U){return 100*h/(y[U+1]-y[U])}function P(y,h){return T(y,y[0]<0?h+Math.abs(y[0]):h-y[0],0)}function N(y,h){return h*(y[1]-y[0])/100+y[0]}function j(y,h){for(var U=1;y>=h[U];)U+=1;return U}function V(y,h,U){if(U>=y.slice(-1)[0])return 100;var Y=j(U,y),Z=y[Y-1],me=y[Y],Oe=h[Y-1],Fe=h[Y];return Oe+P([Z,me],U)/R(Oe,Fe)}function F(y,h,U){if(U>=100)return y.slice(-1)[0];var Y=j(U,h),Z=y[Y-1],me=y[Y],Oe=h[Y-1];return N([Z,me],(U-Oe)*R(Oe,h[Y]))}function C(y,h,U,Y){if(Y===100)return Y;var Z=j(Y,y),me=y[Z-1],Oe=y[Z];return U?Y-me>(Oe-me)/2?Oe:me:h[Z-1]?y[Z-1]+l(Y-y[Z-1],h[Z-1]):Y}function w(y,h,U){var Y;if(typeof h=="number"&&(h=[h]),!Array.isArray(h))throw new Error("noUiSlider ("+n+"): 'range' contains invalid value.");if(!u(Y=y==="min"?0:y==="max"?100:parseFloat(y))||!u(h[0]))throw new Error("noUiSlider ("+n+"): 'range' value isn't numeric.");U.xPct.push(Y),U.xVal.push(h[0]),Y?U.xSteps.push(!isNaN(h[1])&&h[1]):isNaN(h[1])||(U.xSteps[0]=h[1]),U.xHighestCompleteStep.push(0)}function M(y,h,U){if(h)if(U.xVal[y]!==U.xVal[y+1]){U.xSteps[y]=T([U.xVal[y],U.xVal[y+1]],h,0)/R(U.xPct[y],U.xPct[y+1]);var Y=(U.xVal[y+1]-U.xVal[y])/U.xNumSteps[y],Z=Math.ceil(Number(Y.toFixed(3))-1),me=U.xVal[y]+U.xNumSteps[y]*Z;U.xHighestCompleteStep[y]=me}else U.xSteps[y]=U.xHighestCompleteStep[y]=U.xVal[y]}function L(y,h,U){var Y;this.xPct=[],this.xVal=[],this.xSteps=[U||!1],this.xNumSteps=[!1],this.xHighestCompleteStep=[],this.snap=h;var Z=[];for(Y in y)y.hasOwnProperty(Y)&&Z.push([y[Y],Y]);for(Z.length&&Kr(Z[0][0])==="object"?Z.sort(function(me,Oe){return me[0][0]-Oe[0][0]}):Z.sort(function(me,Oe){return me[0]-Oe[0]}),Y=0;Y<Z.length;Y++)w(Z[Y][1],Z[Y][0],this);for(this.xNumSteps=this.xSteps.slice(0),Y=0;Y<this.xNumSteps.length;Y++)M(Y,this.xNumSteps[Y],this)}L.prototype.getDistance=function(y){var h,U=[];for(h=0;h<this.xNumSteps.length-1;h++){var Y=this.xNumSteps[h];if(Y&&y/Y%1!=0)throw new Error("noUiSlider ("+n+"): 'limit', 'margin' and 'padding' of "+this.xPct[h]+"% range must be divisible by step.");U[h]=T(this.xVal,y,h)}return U},L.prototype.getAbsoluteDistance=function(y,h,U){var Y,Z=0;if(y<this.xPct[this.xPct.length-1])for(;y>this.xPct[Z+1];)Z++;else y===this.xPct[this.xPct.length-1]&&(Z=this.xPct.length-2);U||y!==this.xPct[Z+1]||Z++;var me=1,Oe=h[Z],Fe=0,Le=0,ge=0,te=0;for(Y=U?(y-this.xPct[Z])/(this.xPct[Z+1]-this.xPct[Z]):(this.xPct[Z+1]-y)/(this.xPct[Z+1]-this.xPct[Z]);Oe>0;)Fe=this.xPct[Z+1+te]-this.xPct[Z+te],h[Z+te]*me+100-100*Y>100?(Le=Fe*Y,me=(Oe-100*Y)/h[Z+te],Y=1):(Le=h[Z+te]*Fe/100*me,me=0),U?(ge-=Le,this.xPct.length+te>=1&&te--):(ge+=Le,this.xPct.length-te>=1&&te++),Oe=h[Z+te]*me;return y+ge},L.prototype.toStepping=function(y){return y=V(this.xVal,this.xPct,y)},L.prototype.fromStepping=function(y){return F(this.xVal,this.xPct,y)},L.prototype.getStep=function(y){return y=C(this.xPct,this.xSteps,this.snap,y)},L.prototype.getDefaultStep=function(y,h,U){var Y=j(y,this.xPct);return(y===100||h&&y===this.xPct[Y-1])&&(Y=Math.max(Y-1,1)),(this.xVal[Y]-this.xVal[Y-1])/U},L.prototype.getNearbySteps=function(y){var h=j(y,this.xPct);return{stepBefore:{startValue:this.xVal[h-2],step:this.xNumSteps[h-2],highestStep:this.xHighestCompleteStep[h-2]},thisStep:{startValue:this.xVal[h-1],step:this.xNumSteps[h-1],highestStep:this.xHighestCompleteStep[h-1]},stepAfter:{startValue:this.xVal[h],step:this.xNumSteps[h],highestStep:this.xHighestCompleteStep[h]}}},L.prototype.countStepDecimals=function(){var y=this.xNumSteps.map(m);return Math.max.apply(null,y)},L.prototype.convert=function(y){return this.getStep(this.toStepping(y))};var z={to:function(y){return y!==void 0&&y.toFixed(2)},from:Number},B={target:"target",base:"base",origin:"origin",handle:"handle",handleLower:"handle-lower",handleUpper:"handle-upper",touchArea:"touch-area",horizontal:"horizontal",vertical:"vertical",background:"background",connect:"connect",connects:"connects",ltr:"ltr",rtl:"rtl",textDirectionLtr:"txt-dir-ltr",textDirectionRtl:"txt-dir-rtl",draggable:"draggable",drag:"state-drag",tap:"state-tap",active:"active",tooltip:"tooltip",pips:"pips",pipsHorizontal:"pips-horizontal",pipsVertical:"pips-vertical",marker:"marker",markerHorizontal:"marker-horizontal",markerVertical:"marker-vertical",markerNormal:"marker-normal",markerLarge:"marker-large",markerSub:"marker-sub",value:"value",valueHorizontal:"value-horizontal",valueVertical:"value-vertical",valueNormal:"value-normal",valueLarge:"value-large",valueSub:"value-sub"},K={tooltips:".__tooltips",aria:".__aria"};function G(y){if(r(y))return!0;throw new Error("noUiSlider ("+n+"): 'format' requires 'to' and 'from' methods.")}function de(y,h){if(!u(h))throw new Error("noUiSlider ("+n+"): 'step' is not numeric.");y.singleStep=h}function ce(y,h){if(!u(h))throw new Error("noUiSlider ("+n+"): 'keyboardPageMultiplier' is not numeric.");y.keyboardPageMultiplier=h}function ve(y,h){if(!u(h))throw new Error("noUiSlider ("+n+"): 'keyboardDefaultStep' is not numeric.");y.keyboardDefaultStep=h}function Se(y,h){if(Kr(h)!=="object"||Array.isArray(h))throw new Error("noUiSlider ("+n+"): 'range' is not an object.");if(h.min===void 0||h.max===void 0)throw new Error("noUiSlider ("+n+"): Missing 'min' or 'max' in 'range'.");if(h.min===h.max)throw new Error("noUiSlider ("+n+"): 'range' 'min' and 'max' cannot be equal.");y.spectrum=new L(h,y.snap,y.singleStep)}function Re(y,h){if(h=d(h),!Array.isArray(h)||!h.length)throw new Error("noUiSlider ("+n+"): 'start' option is incorrect.");y.handles=h.length,y.start=h}function Je(y,h){if(y.snap=h,typeof h!="boolean")throw new Error("noUiSlider ("+n+"): 'snap' option must be a boolean.")}function Qe(y,h){if(y.animate=h,typeof h!="boolean")throw new Error("noUiSlider ("+n+"): 'animate' option must be a boolean.")}function ft(y,h){if(y.animationDuration=h,typeof h!="number")throw new Error("noUiSlider ("+n+"): 'animationDuration' option must be a number.")}function kt(y,h){var U,Y=[!1];if(h==="lower"?h=[!0,!1]:h==="upper"&&(h=[!1,!0]),h===!0||h===!1){for(U=1;U<y.handles;U++)Y.push(h);Y.push(!1)}else{if(!Array.isArray(h)||!h.length||h.length!==y.handles+1)throw new Error("noUiSlider ("+n+"): 'connect' option doesn't match handle count.");Y=h}y.connect=Y}function Ve(y,h){switch(h){case"horizontal":y.ort=0;break;case"vertical":y.ort=1;break;default:throw new Error("noUiSlider ("+n+"): 'orientation' option is invalid.")}}function ze(y,h){if(!u(h))throw new Error("noUiSlider ("+n+"): 'margin' option must be numeric.");h!==0&&(y.margin=y.spectrum.getDistance(h))}function vt(y,h){if(!u(h))throw new Error("noUiSlider ("+n+"): 'limit' option must be numeric.");if(y.limit=y.spectrum.getDistance(h),!y.limit||y.handles<2)throw new Error("noUiSlider ("+n+"): 'limit' option is only supported on linear sliders with 2 or more handles.")}function x(y,h){var U;if(!u(h)&&!Array.isArray(h))throw new Error("noUiSlider ("+n+"): 'padding' option must be numeric or array of exactly 2 numbers.");if(Array.isArray(h)&&h.length!==2&&!u(h[0])&&!u(h[1]))throw new Error("noUiSlider ("+n+"): 'padding' option must be numeric or array of exactly 2 numbers.");if(h!==0){for(Array.isArray(h)||(h=[h,h]),y.padding=[y.spectrum.getDistance(h[0]),y.spectrum.getDistance(h[1])],U=0;U<y.spectrum.xNumSteps.length-1;U++)if(y.padding[0][U]<0||y.padding[1][U]<0)throw new Error("noUiSlider ("+n+"): 'padding' option must be a positive number(s).");var Y=h[0]+h[1],Z=y.spectrum.xVal[0];if(Y/(y.spectrum.xVal[y.spectrum.xVal.length-1]-Z)>1)throw new Error("noUiSlider ("+n+"): 'padding' option must not exceed 100% of the range.")}}function I(y,h){switch(h){case"ltr":y.dir=0;break;case"rtl":y.dir=1;break;default:throw new Error("noUiSlider ("+n+"): 'direction' option was not recognized.")}}function k(y,h){if(typeof h!="string")throw new Error("noUiSlider ("+n+"): 'behaviour' must be a string containing options.");var U=h.indexOf("tap")>=0,Y=h.indexOf("drag")>=0,Z=h.indexOf("fixed")>=0,me=h.indexOf("snap")>=0,Oe=h.indexOf("hover")>=0,Fe=h.indexOf("unconstrained")>=0;if(Z){if(y.handles!==2)throw new Error("noUiSlider ("+n+"): 'fixed' behaviour must be used with 2 handles");ze(y,y.start[1]-y.start[0])}if(Fe&&(y.margin||y.limit))throw new Error("noUiSlider ("+n+"): 'unconstrained' behaviour cannot be used with margin or limit");y.events={tap:U||me,drag:Y,fixed:Z,snap:me,hover:Oe,unconstrained:Fe}}function X(y,h){if(h!==!1)if(h===!0){y.tooltips=[];for(var U=0;U<y.handles;U++)y.tooltips.push(!0)}else{if(y.tooltips=d(h),y.tooltips.length!==y.handles)throw new Error("noUiSlider ("+n+"): must pass a formatter for all handles.");y.tooltips.forEach(function(Y){if(typeof Y!="boolean"&&(Kr(Y)!=="object"||typeof Y.to!="function"))throw new Error("noUiSlider ("+n+"): 'tooltips' must be passed a formatter or 'false'.")})}}function W(y,h){y.ariaFormat=h,G(h)}function q(y,h){y.format=h,G(h)}function ne(y,h){if(y.keyboardSupport=h,typeof h!="boolean")throw new Error("noUiSlider ("+n+"): 'keyboardSupport' option must be a boolean.")}function _(y,h){y.documentElement=h}function ee(y,h){if(typeof h!="string"&&h!==!1)throw new Error("noUiSlider ("+n+"): 'cssPrefix' must be a string or `false`.");y.cssPrefix=h}function Q(y,h){if(Kr(h)!=="object")throw new Error("noUiSlider ("+n+"): 'cssClasses' must be an object.");if(typeof y.cssPrefix=="string")for(var U in y.cssClasses={},h)h.hasOwnProperty(U)&&(y.cssClasses[U]=y.cssPrefix+h[U]);else y.cssClasses=h}function fe(y){var h={margin:0,limit:0,padding:0,animate:!0,animationDuration:300,ariaFormat:z,format:z},U={step:{r:!1,t:de},keyboardPageMultiplier:{r:!1,t:ce},keyboardDefaultStep:{r:!1,t:ve},start:{r:!0,t:Re},connect:{r:!0,t:kt},direction:{r:!0,t:I},snap:{r:!1,t:Je},animate:{r:!1,t:Qe},animationDuration:{r:!1,t:ft},range:{r:!0,t:Se},orientation:{r:!1,t:Ve},margin:{r:!1,t:ze},limit:{r:!1,t:vt},padding:{r:!1,t:x},behaviour:{r:!0,t:k},ariaFormat:{r:!1,t:W},format:{r:!1,t:q},tooltips:{r:!1,t:X},keyboardSupport:{r:!0,t:ne},documentElement:{r:!1,t:_},cssPrefix:{r:!0,t:ee},cssClasses:{r:!0,t:Q}},Y={connect:!1,direction:"ltr",behaviour:"tap",orientation:"horizontal",keyboardSupport:!0,cssPrefix:"noUi-",cssClasses:B,keyboardPageMultiplier:5,keyboardDefaultStep:10};y.format&&!y.ariaFormat&&(y.ariaFormat=y.format),Object.keys(U).forEach(function(Le){if(!o(y[Le])&&Y[Le]===void 0){if(U[Le].r)throw new Error("noUiSlider ("+n+"): '"+Le+"' is required.");return!0}U[Le].t(h,o(y[Le])?y[Le]:Y[Le])}),h.pips=y.pips;var Z=document.createElement("div"),me=Z.style.msTransform!==void 0,Oe=Z.style.transform!==void 0;h.transformRule=Oe?"transform":me?"msTransform":"webkitTransform";var Fe=[["left","top"],["right","bottom"]];return h.style=Fe[h.dir][h.ort],h}function le(y,h,U){var Y,Z,me,Oe,Fe,Le,ge=O(),te=$()&&E(),oe=y,ae=h.spectrum,we=[],Pe=[],yt=[],qr=0,bt={},gr=y.ownerDocument,so=h.documentElement||gr.documentElement,ao=gr.body,uh=-1,lo=0,Bs=1,Hs=2,fh=gr.dir==="rtl"||h.ort===1?0:100;function an(A,D){var H=gr.createElement("div");return D&&b(H,D),A.appendChild(H),H}function ph(A,D){var H=an(A,h.cssClasses.origin),J=an(H,h.cssClasses.handle);return an(J,h.cssClasses.touchArea),J.setAttribute("data-handle",D),h.keyboardSupport&&(J.setAttribute("tabindex","0"),J.addEventListener("keydown",function(re){return xh(re,D)})),J.setAttribute("role","slider"),J.setAttribute("aria-orientation",h.ort?"vertical":"horizontal"),D===0?b(J,h.cssClasses.handleLower):D===h.handles-1&&b(J,h.cssClasses.handleUpper),H}function mc(A,D){return!!D&&an(A,h.cssClasses.connect)}function dh(A,D){var H=an(D,h.cssClasses.connects);Z=[],(me=[]).push(mc(H,A[0]));for(var J=0;J<h.handles;J++)Z.push(ph(D,J)),yt[J]=J,me.push(mc(H,A[J+1]))}function hh(A){return b(A,h.cssClasses.target),h.dir===0?b(A,h.cssClasses.ltr):b(A,h.cssClasses.rtl),h.ort===0?b(A,h.cssClasses.horizontal):b(A,h.cssClasses.vertical),b(A,getComputedStyle(A).direction==="rtl"?h.cssClasses.textDirectionRtl:h.cssClasses.textDirectionLtr),an(A,h.cssClasses.base)}function mh(A,D){return!!h.tooltips[D]&&an(A.firstChild,h.cssClasses.tooltip)}function gc(){return oe.hasAttribute("disabled")}function ks(A){return Z[A].hasAttribute("disabled")}function Us(){Fe&&(_r("update"+K.tooltips),Fe.forEach(function(A){A&&i(A)}),Fe=null)}function vc(){Us(),Fe=Z.map(mh),Gs("update"+K.tooltips,function(A,D,H){if(Fe[D]){var J=A[D];h.tooltips[D]!==!0&&(J=h.tooltips[D].to(H[D])),Fe[D].innerHTML=J}})}function gh(){_r("update"+K.aria),Gs("update"+K.aria,function(A,D,H,J,re){yt.forEach(function(ie){var se=Z[ie],$e=co(Pe,ie,0,!0,!0,!0),De=co(Pe,ie,100,!0,!0,!0),Ue=re[ie],Ae=h.ariaFormat.to(H[ie]);$e=ae.fromStepping($e).toFixed(1),De=ae.fromStepping(De).toFixed(1),Ue=ae.fromStepping(Ue).toFixed(1),se.children[0].setAttribute("aria-valuemin",$e),se.children[0].setAttribute("aria-valuemax",De),se.children[0].setAttribute("aria-valuenow",Ue),se.children[0].setAttribute("aria-valuetext",Ae)})})}function vh(A,D,H){if(A==="range"||A==="steps")return ae.xVal;if(A==="count"){if(D<2)throw new Error("noUiSlider ("+n+"): 'values' (>= 2) required for mode 'count'.");var J=D-1,re=100/J;for(D=[];J--;)D[J]=J*re;D.push(100),A="positions"}return A==="positions"?D.map(function(ie){return ae.fromStepping(H?ae.getStep(ie):ie)}):A==="values"?H?D.map(function(ie){return ae.fromStepping(ae.getStep(ae.toStepping(ie)))}):D:void 0}function yh(A,D,H){function J(Ae,Ke){return(Ae+Ke).toFixed(7)/1}var re={},ie=ae.xVal[0],se=ae.xVal[ae.xVal.length-1],$e=!1,De=!1,Ue=0;return(H=a(H.slice().sort(function(Ae,Ke){return Ae-Ke})))[0]!==ie&&(H.unshift(ie),$e=!0),H[H.length-1]!==se&&(H.push(se),De=!0),H.forEach(function(Ae,Ke){var rt,We,yr,ei,Ut,xc,Qs,Cc,Mc,Ac,fo=Ae,br=H[Ke+1],Nc=D==="steps";if(Nc&&(rt=ae.xNumSteps[Ke]),rt||(rt=br-fo),fo!==!1)for(br===void 0&&(br=fo),rt=Math.max(rt,1e-7),We=fo;We<=br;We=J(We,rt)){for(Cc=(Ut=(ei=ae.toStepping(We))-Ue)/A,Ac=Ut/(Mc=Math.round(Cc)),yr=1;yr<=Mc;yr+=1)re[(xc=Ue+yr*Ac).toFixed(5)]=[ae.fromStepping(xc),0];Qs=H.indexOf(We)>-1?Bs:Nc?Hs:lo,!Ke&&$e&&We!==br&&(Qs=0),We===br&&De||(re[ei.toFixed(5)]=[We,Qs]),Ue=ei}}),re}function bh(A,D,H){var J=gr.createElement("div"),re=[];re[lo]=h.cssClasses.valueNormal,re[Bs]=h.cssClasses.valueLarge,re[Hs]=h.cssClasses.valueSub;var ie=[];ie[lo]=h.cssClasses.markerNormal,ie[Bs]=h.cssClasses.markerLarge,ie[Hs]=h.cssClasses.markerSub;var se=[h.cssClasses.valueHorizontal,h.cssClasses.valueVertical],$e=[h.cssClasses.markerHorizontal,h.cssClasses.markerVertical];function De(Ae,Ke){var rt=Ke===h.cssClasses.value,We=rt?re:ie;return Ke+" "+(rt?se:$e)[h.ort]+" "+We[Ae]}function Ue(Ae,Ke,rt){if((rt=D?D(Ke,rt):rt)!==uh){var We=an(J,!1);We.className=De(rt,h.cssClasses.marker),We.style[h.style]=Ae+"%",rt>lo&&((We=an(J,!1)).className=De(rt,h.cssClasses.value),We.setAttribute("data-value",Ke),We.style[h.style]=Ae+"%",We.innerHTML=H.to(Ke))}}return b(J,h.cssClasses.pips),b(J,h.ort===0?h.cssClasses.pipsHorizontal:h.cssClasses.pipsVertical),Object.keys(A).forEach(function(Ae){Ue(Ae,A[Ae][0],A[Ae][1])}),J}function Ks(){Oe&&(i(Oe),Oe=null)}function Ws(A){Ks();var D=A.mode,H=A.density||1,J=A.filter||!1,re=yh(H,D,vh(D,A.values||!1,A.stepped||!1)),ie=A.format||{to:Math.round};return Oe=oe.appendChild(bh(re,J,ie))}function yc(){var A=Y.getBoundingClientRect(),D="offset"+["Width","Height"][h.ort];return h.ort===0?A.width||Y[D]:A.height||Y[D]}function kn(A,D,H,J){var re=function(se){return!!(se=Sh(se,J.pageOffset,J.target||D))&&!(gc()&&!J.doNotReject)&&!(S(oe,h.cssClasses.tap)&&!J.doNotReject)&&!(A===ge.start&&se.buttons!==void 0&&se.buttons>1)&&(!J.hover||!se.buttons)&&(te||se.preventDefault(),se.calcPoint=se.points[h.ort],void H(se,J))},ie=[];return A.split(" ").forEach(function(se){D.addEventListener(se,re,!!te&&{passive:!0}),ie.push([se,re])}),ie}function Sh(A,D,H){var J,re,ie=A.type.indexOf("touch")===0,se=A.type.indexOf("mouse")===0,$e=A.type.indexOf("pointer")===0;if(A.type.indexOf("MSPointer")===0&&($e=!0),A.type==="mousedown"&&!A.buttons&&!A.touches)return!1;if(ie){var De=function(Ke){return Ke.target===H||H.contains(Ke.target)||Ke.target.shadowRoot&&Ke.target.shadowRoot.contains(H)};if(A.type==="touchstart"){var Ue=Array.prototype.filter.call(A.touches,De);if(Ue.length>1)return!1;J=Ue[0].pageX,re=Ue[0].pageY}else{var Ae=Array.prototype.find.call(A.changedTouches,De);if(!Ae)return!1;J=Ae.pageX,re=Ae.pageY}}return D=D||g(gr),(se||$e)&&(J=A.clientX+D.x,re=A.clientY+D.y),A.pageOffset=D,A.points=[J,re],A.cursor=se||$e,A}function bc(A){var D=100*(A-c(Y,h.ort))/yc();return D=p(D),h.dir?100-D:D}function Eh(A){var D=100,H=!1;return Z.forEach(function(J,re){if(!ks(re)){var ie=Pe[re],se=Math.abs(ie-A);(se<D||se<=D&&A>ie||se===100&&D===100)&&(H=re,D=se)}}),H}function Oh(A,D){A.type==="mouseout"&&A.target.nodeName==="HTML"&&A.relatedTarget===null&&Ys(A,D)}function wh(A,D){if(navigator.appVersion.indexOf("MSIE 9")===-1&&A.buttons===0&&D.buttonsProperty!==0)return Ys(A,D);var H=(h.dir?-1:1)*(A.calcPoint-D.startCalcPoint);Sc(H>0,100*H/D.baseSize,D.locations,D.handleNumbers)}function Ys(A,D){D.handle&&(v(D.handle,h.cssClasses.active),qr-=1),D.listeners.forEach(function(H){so.removeEventListener(H[0],H[1])}),qr===0&&(v(oe,h.cssClasses.drag),Js(),A.cursor&&(ao.style.cursor="",ao.removeEventListener("selectstart",s))),D.handleNumbers.forEach(function(H){_e("change",H),_e("set",H),_e("end",H)})}function Xs(A,D){if(D.handleNumbers.some(ks))return!1;var H;D.handleNumbers.length===1&&(H=Z[D.handleNumbers[0]].children[0],qr+=1,b(H,h.cssClasses.active)),A.stopPropagation();var J=[],re=kn(ge.move,so,wh,{target:A.target,handle:H,listeners:J,startCalcPoint:A.calcPoint,baseSize:yc(),pageOffset:A.pageOffset,handleNumbers:D.handleNumbers,buttonsProperty:A.buttons,locations:Pe.slice()}),ie=kn(ge.end,so,Ys,{target:A.target,handle:H,listeners:J,doNotReject:!0,handleNumbers:D.handleNumbers}),se=kn("mouseout",so,Oh,{target:A.target,handle:H,listeners:J,doNotReject:!0,handleNumbers:D.handleNumbers});J.push.apply(J,re.concat(ie,se)),A.cursor&&(ao.style.cursor=getComputedStyle(A.target).cursor,Z.length>1&&b(oe,h.cssClasses.drag),ao.addEventListener("selectstart",s,!1)),D.handleNumbers.forEach(function($e){_e("start",$e)})}function Th(A){A.stopPropagation();var D=bc(A.calcPoint),H=Eh(D);if(H===!1)return!1;h.events.snap||f(oe,h.cssClasses.tap,h.animationDuration),vr(H,D,!0,!0),Js(),_e("slide",H,!0),_e("update",H,!0),_e("change",H,!0),_e("set",H,!0),h.events.snap&&Xs(A,{handleNumbers:[H]})}function Ph(A){var D=bc(A.calcPoint),H=ae.getStep(D),J=ae.fromStepping(H);Object.keys(bt).forEach(function(re){re.split(".")[0]==="hover"&&bt[re].forEach(function(ie){ie.call(Le,J)})})}function xh(A,D){if(gc()||ks(D))return!1;var H=["Left","Right"],J=["Down","Up"],re=["PageDown","PageUp"],ie=["Home","End"];h.dir&&!h.ort?H.reverse():h.ort&&!h.dir&&(J.reverse(),re.reverse());var se,$e=A.key.replace("Arrow",""),De=$e===re[0],Ue=$e===re[1],Ae=$e===J[0]||$e===H[0]||De,Ke=$e===J[1]||$e===H[1]||Ue,rt=$e===ie[0],We=$e===ie[1];if(!(Ae||Ke||rt||We))return!0;if(A.preventDefault(),Ke||Ae){var yr=h.keyboardPageMultiplier,ei=Ae?0:1,Ut=Pc(D)[ei];if(Ut===null)return!1;Ut===!1&&(Ut=ae.getDefaultStep(Pe[D],Ae,h.keyboardDefaultStep)),(Ue||De)&&(Ut*=yr),Ut=Math.max(Ut,1e-7),Ut*=Ae?-1:1,se=we[D]+Ut}else se=We?h.spectrum.xVal[h.spectrum.xVal.length-1]:h.spectrum.xVal[0];return vr(D,ae.toStepping(se),!0,!0),_e("slide",D),_e("update",D),_e("change",D),_e("set",D),!1}function Ch(A){A.fixed||Z.forEach(function(D,H){kn(ge.start,D.children[0],Xs,{handleNumbers:[H]})}),A.tap&&kn(ge.start,Y,Th,{}),A.hover&&kn(ge.move,Y,Ph,{hover:!0}),A.drag&&me.forEach(function(D,H){if(D!==!1&&H!==0&&H!==me.length-1){var J=Z[H-1],re=Z[H],ie=[D];b(D,h.cssClasses.draggable),A.fixed&&(ie.push(J.children[0]),ie.push(re.children[0])),ie.forEach(function(se){kn(ge.start,se,Xs,{handles:[J,re],handleNumbers:[H-1,H]})})}})}function Gs(A,D){bt[A]=bt[A]||[],bt[A].push(D),A.split(".")[0]==="update"&&Z.forEach(function(H,J){_e("update",J)})}function Mh(A){return A===K.aria||A===K.tooltips}function _r(A){var D=A&&A.split(".")[0],H=D?A.substring(D.length):A;Object.keys(bt).forEach(function(J){var re=J.split(".")[0],ie=J.substring(re.length);D&&D!==re||H&&H!==ie||Mh(ie)&&H!==ie||delete bt[J]})}function _e(A,D,H){Object.keys(bt).forEach(function(J){var re=J.split(".")[0];A===re&&bt[J].forEach(function(ie){ie.call(Le,we.map(h.format.to),D,we.slice(),H||!1,Pe.slice(),Le)})})}function co(A,D,H,J,re,ie){var se;return Z.length>1&&!h.events.unconstrained&&(J&&D>0&&(se=ae.getAbsoluteDistance(A[D-1],h.margin,0),H=Math.max(H,se)),re&&D<Z.length-1&&(se=ae.getAbsoluteDistance(A[D+1],h.margin,1),H=Math.min(H,se))),Z.length>1&&h.limit&&(J&&D>0&&(se=ae.getAbsoluteDistance(A[D-1],h.limit,0),H=Math.min(H,se)),re&&D<Z.length-1&&(se=ae.getAbsoluteDistance(A[D+1],h.limit,1),H=Math.max(H,se))),h.padding&&(D===0&&(se=ae.getAbsoluteDistance(0,h.padding[0],0),H=Math.max(H,se)),D===Z.length-1&&(se=ae.getAbsoluteDistance(100,h.padding[1],1),H=Math.min(H,se))),!((H=p(H=ae.getStep(H)))===A[D]&&!ie)&&H}function Zs(A,D){var H=h.ort;return(H?D:A)+", "+(H?A:D)}function Sc(A,D,H,J){var re=H.slice(),ie=[!A,A],se=[A,!A];J=J.slice(),A&&J.reverse(),J.length>1?J.forEach(function(De,Ue){var Ae=co(re,De,re[De]+D,ie[Ue],se[Ue],!1);Ae===!1?D=0:(D=Ae-re[De],re[De]=Ae)}):ie=se=[!0];var $e=!1;J.forEach(function(De,Ue){$e=vr(De,H[De]+D,ie[Ue],se[Ue])||$e}),$e&&J.forEach(function(De){_e("update",De),_e("slide",De)})}function Ec(A,D){return h.dir?100-A-D:A}function Ah(A,D){Pe[A]=D,we[A]=ae.fromStepping(D);var H="translate("+Zs(10*(Ec(D,0)-fh)+"%","0")+")";Z[A].style[h.transformRule]=H,Oc(A),Oc(A+1)}function Js(){yt.forEach(function(A){var D=Pe[A]>50?-1:1,H=3+(Z.length+D*A);Z[A].style.zIndex=H})}function vr(A,D,H,J,re){return re||(D=co(Pe,A,D,H,J,!1)),D!==!1&&(Ah(A,D),!0)}function Oc(A){if(me[A]){var D=0,H=100;A!==0&&(D=Pe[A-1]),A!==me.length-1&&(H=Pe[A]);var J=H-D,re="translate("+Zs(Ec(D,J)+"%","0")+")",ie="scale("+Zs(J/100,"1")+")";me[A].style[h.transformRule]=re+" "+ie}}function wc(A,D){return A===null||A===!1||A===void 0?Pe[D]:(typeof A=="number"&&(A=String(A)),A=h.format.from(A),(A=ae.toStepping(A))===!1||isNaN(A)?Pe[D]:A)}function uo(A,D,H){var J=d(A),re=Pe[0]===void 0;D=D===void 0||!!D,h.animate&&!re&&f(oe,h.cssClasses.tap,h.animationDuration),yt.forEach(function(se){vr(se,wc(J[se],se),!0,!1,H)});for(var ie=yt.length===1?0:1;ie<yt.length;++ie)yt.forEach(function(se){vr(se,Pe[se],!0,!0,H)});Js(),yt.forEach(function(se){_e("update",se),J[se]!==null&&D&&_e("set",se)})}function Nh(A){uo(h.start,A)}function Rh(A,D,H,J){if(!((A=Number(A))>=0&&A<yt.length))throw new Error("noUiSlider ("+n+"): invalid handle number, got: "+A);vr(A,wc(D,A),!0,!0,J),_e("update",A),H&&_e("set",A)}function Tc(){var A=we.map(h.format.to);return A.length===1?A[0]:A}function Ih(){for(var A in _r(K.aria),_r(K.tooltips),h.cssClasses)h.cssClasses.hasOwnProperty(A)&&v(oe,h.cssClasses[A]);for(;oe.firstChild;)oe.removeChild(oe.firstChild);delete oe.noUiSlider}function Pc(A){var D=Pe[A],H=ae.getNearbySteps(D),J=we[A],re=H.thisStep.step,ie=null;if(h.snap)return[J-H.stepBefore.startValue||null,H.stepAfter.startValue-J||null];re!==!1&&J+re>H.stepAfter.startValue&&(re=H.stepAfter.startValue-J),ie=J>H.thisStep.startValue?H.thisStep.step:H.stepBefore.step!==!1&&J-H.stepBefore.highestStep,D===100?re=null:D===0&&(ie=null);var se=ae.countStepDecimals();return re!==null&&re!==!1&&(re=Number(re.toFixed(se))),ie!==null&&ie!==!1&&(ie=Number(ie.toFixed(se))),[ie,re]}function $h(){return yt.map(Pc)}function Lh(A,D){var H=Tc(),J=["margin","limit","padding","range","animate","snap","step","format","pips","tooltips"];J.forEach(function(ie){A[ie]!==void 0&&(U[ie]=A[ie])});var re=fe(U);J.forEach(function(ie){A[ie]!==void 0&&(h[ie]=re[ie])}),ae=re.spectrum,h.margin=re.margin,h.limit=re.limit,h.padding=re.padding,h.pips?Ws(h.pips):Ks(),h.tooltips?vc():Us(),Pe=[],uo(A.start||H,D)}function Dh(){Y=hh(oe),dh(h.connect,Y),Ch(h.events),uo(h.start),h.pips&&Ws(h.pips),h.tooltips&&vc(),gh()}return Dh(),Le={destroy:Ih,steps:$h,on:Gs,off:_r,get:Tc,set:uo,setHandle:Rh,reset:Nh,__moveHandles:function(A,D,H){Sc(A,D,Pe,H)},options:U,updateOptions:Lh,target:oe,removePips:Ks,removeTooltips:Us,getTooltips:function(){return Fe},getOrigins:function(){return Z},pips:Ws}}function pe(y,h){if(!y||!y.nodeName)throw new Error("noUiSlider ("+n+"): create requires a single element, got: "+y);if(y.noUiSlider)throw new Error("noUiSlider ("+n+"): Slider was already initialized.");var U=le(y,fe(h),h);return y.noUiSlider=U,U}return{__spectrum:L,version:n,cssClasses:B,create:pe}}()}),Sd={name:"Slider",emits:["input","update:modelValue","update","change"],props:{value:{validator:function(e){return t=>typeof t=="number"||t instanceof Array||t==null||t===!1},required:!1},modelValue:{validator:function(e){return t=>typeof t=="number"||t instanceof Array||t==null||t===!1},required:!1},id:{type:[String,Number],required:!1,default:"slider"},disabled:{type:Boolean,required:!1,default:!1},min:{type:Number,required:!1,default:0},max:{type:Number,required:!1,default:100},step:{type:Number,required:!1,default:1},orientation:{type:String,required:!1,default:"horizontal"},direction:{type:String,required:!1,default:"ltr"},tooltips:{type:Boolean,required:!1,default:!0},options:{type:Object,required:!1,default:()=>({})},merge:{type:Number,required:!1,default:-1},height:{type:String,required:!1,default:"300px"},format:{type:[Object,Function,Boolean],required:!1,default:null}},setup(e,t){const n=function(s,a,l){var c=ci(s),u=c.value,f=c.modelValue,p=a.expose!==void 0?f:u,d=Pn(p.value);if(Zl(p.value))throw new Error("Slider v-model must be a Number or Array");if(Array.isArray(p.value)&&p.value.length==0)throw new Error("Slider v-model must not be an empty array");return{value:p,initialValue:d}}(e,t),r=function(s,a,l){var c=ci(s),u=c.orientation,f=c.height;return{style:xn(function(){return u.value=="vertical"?{height:f.value}:[]})}}(e),i=function(s,a,l){var c=ci(s),u=c.format,f=c.step,p=l.value,d=xn(function(){return u&&u.value?typeof u.value=="function"?{to:u.value}:bd(Object.assign({},u.value)):bd({decimals:f.value>=0?0:2})});return{tooltipsFormat:xn(function(){return Array.isArray(p.value)?p.value.map(function(m){return d.value}):d.value}),tooltipsMerge:function(m,b,v){var S=getComputedStyle(m).direction==="rtl",g=m.noUiSlider.options.direction==="rtl",O=m.noUiSlider.options.orientation==="vertical",E=m.noUiSlider.getTooltips(),$=m.noUiSlider.getOrigins();E.forEach(function(R,T){R&&$[T].appendChild(R)}),m.noUiSlider.on("update",function(R,T,P,N,j){var V=[[]],F=[[]],C=[[]],w=0;E[0]&&(V[0][0]=0,F[0][0]=j[0],C[0][0]=d.value.to(parseFloat(R[0])));for(var M=1;M<j.length;M++)(!E[M]||j[M]-j[M-1]>b)&&(V[++w]=[],C[w]=[],F[w]=[]),E[M]&&(V[w].push(M),C[w].push(d.value.to(parseFloat(R[M]))),F[w].push(j[M]));V.forEach(function(L,z){for(var B=L.length,K=0;K<B;K++){var G=L[K];if(K===B-1){var de=0;F[z].forEach(function(Re){de+=1e3-10*Re});var ce=O?"bottom":"right",ve=g?0:B-1,Se=1e3-10*F[z][ve];de=(S&&!O?100:0)+de/B-Se,E[G].innerHTML=C[z].join(v),E[G].style.display="block",E[G].style[ce]=de+"%"}else E[G].style.display="none"}})})}}}(e,0,{value:n.value}),o=function(s,a,l){var c=ci(s),u=c.options,f=c.orientation,p=c.direction,d=c.tooltips,m=c.step,b=c.min,v=c.max,S=c.merge,g=c.format,O=c.id,E=c.disabled,$=l.value,R=l.initialValue,T=l.tooltipsFormat,P=l.tooltipsMerge,N=l.style,j=Pn(null),V=Pn(null),F=Pn(!1),C=xn(function(){var ce={cssPrefix:"slider-",orientation:f.value,direction:p.value,tooltips:!!d.value&&T.value,connect:"lower",start:Zl($.value)?b.value:$.value,range:{min:b.value,max:v.value}};return m.value>0&&(ce.step=m.value),Array.isArray($.value)&&(ce.connect=!0),ce}),w=xn(function(){var ce={id:O.value,style:N.value};return E.value&&(ce.disabled=!0),ce}),M=xn(function(){return Array.isArray($.value)}),L=function(){var ce=V.value.get();return Array.isArray(ce)?ce.map(function(ve){return parseFloat(ve)}):parseFloat(ce)},z=function(ce){var ve=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];V.value.set(ce,ve)},B=function(ce){a.emit("input",ce),a.emit("update:modelValue",ce),a.emit("update",ce)},K=function(){V.value=x0.create(j.value,Object.assign({},C.value,u.value)),d.value&&M.value&&S.value>=0&&P(j.value,S.value," - "),V.value.on("set",function(ce){a.emit("change",L())}),V.value.on("update",function(ce){F.value&&B(L())}),F.value=!0},G=function(){V.value.off(),V.value.destroy(),V.value=null},de=function(){F.value=!1,G(),K()};return Pr(K),vi(G),lt(M,de,{immediate:!1}),lt(b,de,{immediate:!1}),lt(v,de,{immediate:!1}),lt(m,de,{immediate:!1}),lt(f,de,{immediate:!1}),lt(p,de,{immediate:!1}),lt(d,de,{immediate:!1}),lt(g,de,{immediate:!1,deep:!0}),lt(S,de,{immediate:!1}),lt(u,de,{immediate:!1,deep:!0}),lt($,function(ce){var ve,Se,Re;Zl(ce)?z(b.value,!1):(M.value&&(ve=ce,Se=L(),Re=Se.slice().sort(),ve.length!==Se.length||!ve.slice().sort().every(function(Je,Qe){return Je===Re[Qe]}))||!M.value&&ce!=L())&&z(ce,!1)},{deep:!0}),{slider:j,slider$:V,isRange:M,sliderProps:w,init:K,destroy:G,refresh:de,update:z,reset:function(){B(R.value)}}}(e,t,{value:n.value,initialValue:n.initialValue,tooltipsFormat:i.tooltipsFormat,tooltipsMerge:i.tooltipsMerge,style:r.style});return po(po(po({},r),i),o)}};Sd.render=function(e,t,n,r,i,o){return Ie(),ke("div",Ei(e.sliderProps,{ref:"slider"}),null,16)},Sd.__file="src/Slider.vue";function Jl(e){return e===0?!1:Array.isArray(e)&&e.length===0?!0:!e}function C0(e){return(...t)=>!e(...t)}function M0(e,t){return e===void 0&&(e="undefined"),e===null&&(e="null"),e===!1&&(e="false"),e.toString().toLowerCase().indexOf(t.trim())!==-1}function Ed(e,t,n,r){return t?e.filter(i=>M0(r(i,n),t)).sort((i,o)=>r(i,n).length-r(o,n).length):e}function A0(e){return e.filter(t=>!t.$isLabel)}function Ql(e,t){return n=>n.reduce((r,i)=>i[e]&&i[e].length?(r.push({$groupLabel:i[t],$isLabel:!0}),r.concat(i[e])):r,[])}function N0(e,t,n,r,i){return o=>o.map(s=>{if(!s[n])return console.warn("Options passed to vue-multiselect do not contain groups, despite the config."),[];const a=Ed(s[n],e,t,i);return a.length?{[r]:s[r],[n]:a}:[]})}const Od=(...e)=>t=>e.reduce((n,r)=>r(n),t);var R0={data(){return{search:"",isOpen:!1,preferredOpenDirection:"below",optimizedHeight:this.maxHeight}},props:{internalSearch:{type:Boolean,default:!0},options:{type:Array,required:!0},multiple:{type:Boolean,default:!1},trackBy:{type:String},label:{type:String},searchable:{type:Boolean,default:!0},clearOnSelect:{type:Boolean,default:!0},hideSelected:{type:Boolean,default:!1},placeholder:{type:String,default:"Select option"},allowEmpty:{type:Boolean,default:!0},resetAfter:{type:Boolean,default:!1},closeOnSelect:{type:Boolean,default:!0},customLabel:{type:Function,default(e,t){return Jl(e)?"":t?e[t]:e}},taggable:{type:Boolean,default:!1},tagPlaceholder:{type:String,default:"Press enter to create a tag"},tagPosition:{type:String,default:"top"},max:{type:[Number,Boolean],default:!1},id:{default:null},optionsLimit:{type:Number,default:1e3},groupValues:{type:String},groupLabel:{type:String},groupSelect:{type:Boolean,default:!1},blockKeys:{type:Array,default(){return[]}},preserveSearch:{type:Boolean,default:!1},preselectFirst:{type:Boolean,default:!1}},mounted(){!this.multiple&&this.max&&console.warn("[Vue-Multiselect warn]: Max prop should not be used when prop Multiple equals false."),this.preselectFirst&&!this.internalValue.length&&this.options.length&&this.select(this.filteredOptions[0])},computed:{internalValue(){return this.modelValue||this.modelValue===0?Array.isArray(this.modelValue)?this.modelValue:[this.modelValue]:[]},filteredOptions(){const e=this.search||"",t=e.toLowerCase().trim();let n=this.options.concat();return this.internalSearch?n=this.groupValues?this.filterAndFlat(n,t,this.label):Ed(n,t,this.label,this.customLabel):n=this.groupValues?Ql(this.groupValues,this.groupLabel)(n):n,n=this.hideSelected?n.filter(C0(this.isSelected)):n,this.taggable&&t.length&&!this.isExistingOption(t)&&(this.tagPosition==="bottom"?n.push({isTag:!0,label:e}):n.unshift({isTag:!0,label:e})),n.slice(0,this.optionsLimit)},valueKeys(){return this.trackBy?this.internalValue.map(e=>e[this.trackBy]):this.internalValue},optionKeys(){return(this.groupValues?this.flatAndStrip(this.options):this.options).map(t=>this.customLabel(t,this.label).toString().toLowerCase())},currentOptionLabel(){return this.multiple?this.searchable?"":this.placeholder:this.internalValue.length?this.getOptionLabel(this.internalValue[0]):this.searchable?"":this.placeholder}},watch:{internalValue(){this.resetAfter&&this.internalValue.length&&(this.search="",this.$emit("update:modelValue",this.multiple?[]:null))},search(){this.$emit("search-change",this.search)}},emits:["open","search-change","close","select","update:modelValue","remove","tag"],methods:{getValue(){return this.multiple?this.internalValue:this.internalValue.length===0?null:this.internalValue[0]},filterAndFlat(e,t,n){return Od(N0(t,n,this.groupValues,this.groupLabel,this.customLabel),Ql(this.groupValues,this.groupLabel))(e)},flatAndStrip(e){return Od(Ql(this.groupValues,this.groupLabel),A0)(e)},updateSearch(e){this.search=e},isExistingOption(e){return this.options?this.optionKeys.indexOf(e)>-1:!1},isSelected(e){const t=this.trackBy?e[this.trackBy]:e;return this.valueKeys.indexOf(t)>-1},isOptionDisabled(e){return!!e.$isDisabled},getOptionLabel(e){if(Jl(e))return"";if(e.isTag)return e.label;if(e.$isLabel)return e.$groupLabel;const t=this.customLabel(e,this.label);return Jl(t)?"":t},select(e,t){if(e.$isLabel&&this.groupSelect){this.selectGroup(e);return}if(!(this.blockKeys.indexOf(t)!==-1||this.disabled||e.$isDisabled||e.$isLabel)&&!(this.max&&this.multiple&&this.internalValue.length===this.max)&&!(t==="Tab"&&!this.pointerDirty)){if(e.isTag)this.$emit("tag",e.label,this.id),this.search="",this.closeOnSelect&&!this.multiple&&this.deactivate();else{if(this.isSelected(e)){t!=="Tab"&&this.removeElement(e);return}this.$emit("select",e,this.id),this.multiple?this.$emit("update:modelValue",this.internalValue.concat([e])):this.$emit("update:modelValue",e),this.clearOnSelect&&(this.search="")}this.closeOnSelect&&this.deactivate()}},selectGroup(e){const t=this.options.find(n=>n[this.groupLabel]===e.$groupLabel);if(!!t){if(this.wholeGroupSelected(t)){this.$emit("remove",t[this.groupValues],this.id);const n=this.internalValue.filter(r=>t[this.groupValues].indexOf(r)===-1);this.$emit("update:modelValue",n)}else{const n=t[this.groupValues].filter(r=>!(this.isOptionDisabled(r)||this.isSelected(r)));this.$emit("select",n,this.id),this.$emit("update:modelValue",this.internalValue.concat(n))}this.closeOnSelect&&this.deactivate()}},wholeGroupSelected(e){return e[this.groupValues].every(t=>this.isSelected(t)||this.isOptionDisabled(t))},wholeGroupDisabled(e){return e[this.groupValues].every(this.isOptionDisabled)},removeElement(e,t=!0){if(this.disabled||e.$isDisabled)return;if(!this.allowEmpty&&this.internalValue.length<=1){this.deactivate();return}const n=typeof e=="object"?this.valueKeys.indexOf(e[this.trackBy]):this.valueKeys.indexOf(e);if(this.$emit("remove",e,this.id),this.multiple){const r=this.internalValue.slice(0,n).concat(this.internalValue.slice(n+1));this.$emit("update:modelValue",r)}else this.$emit("update:modelValue",null);this.closeOnSelect&&t&&this.deactivate()},removeLastElement(){this.blockKeys.indexOf("Delete")===-1&&this.search.length===0&&Array.isArray(this.internalValue)&&this.internalValue.length&&this.removeElement(this.internalValue[this.internalValue.length-1],!1)},activate(){this.isOpen||this.disabled||(this.adjustPosition(),this.groupValues&&this.pointer===0&&this.filteredOptions.length&&(this.pointer=1),this.isOpen=!0,this.searchable?(this.preserveSearch||(this.search=""),this.$nextTick(()=>this.$refs.search&&this.$refs.search.focus())):this.$el.focus(),this.$emit("open",this.id))},deactivate(){!this.isOpen||(this.isOpen=!1,this.searchable?this.$refs.search&&this.$refs.search.blur():this.$el.blur(),this.preserveSearch||(this.search=""),this.$emit("close",this.getValue(),this.id))},toggle(){this.isOpen?this.deactivate():this.activate()},adjustPosition(){if(typeof window=="undefined")return;const e=this.$el.getBoundingClientRect().top,t=window.innerHeight-this.$el.getBoundingClientRect().bottom;t>this.maxHeight||t>e||this.openDirection==="below"||this.openDirection==="bottom"?(this.preferredOpenDirection="below",this.optimizedHeight=Math.min(t-40,this.maxHeight)):(this.preferredOpenDirection="above",this.optimizedHeight=Math.min(e-40,this.maxHeight))}}},I0={data(){return{pointer:0,pointerDirty:!1}},props:{showPointer:{type:Boolean,default:!0},optionHeight:{type:Number,default:40}},computed:{pointerPosition(){return this.pointer*this.optionHeight},visibleElements(){return this.optimizedHeight/this.optionHeight}},watch:{filteredOptions(){this.pointerAdjust()},isOpen(){this.pointerDirty=!1},pointer(){this.$refs.search&&this.$refs.search.setAttribute("aria-activedescendant",this.id+"-"+this.pointer.toString())}},methods:{optionHighlight(e,t){return{"multiselect__option--highlight":e===this.pointer&&this.showPointer,"multiselect__option--selected":this.isSelected(t)}},groupHighlight(e,t){if(!this.groupSelect)return["multiselect__option--disabled",{"multiselect__option--group":t.$isLabel}];const n=this.options.find(r=>r[this.groupLabel]===t.$groupLabel);return n&&!this.wholeGroupDisabled(n)?["multiselect__option--group",{"multiselect__option--highlight":e===this.pointer&&this.showPointer},{"multiselect__option--group-selected":this.wholeGroupSelected(n)}]:"multiselect__option--disabled"},addPointerElement({key:e}="Enter"){this.filteredOptions.length>0&&this.select(this.filteredOptions[this.pointer],e),this.pointerReset()},pointerForward(){this.pointer<this.filteredOptions.length-1&&(this.pointer++,this.$refs.list.scrollTop<=this.pointerPosition-(this.visibleElements-1)*this.optionHeight&&(this.$refs.list.scrollTop=this.pointerPosition-(this.visibleElements-1)*this.optionHeight),this.filteredOptions[this.pointer]&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerForward()),this.pointerDirty=!0},pointerBackward(){this.pointer>0?(this.pointer--,this.$refs.list.scrollTop>=this.pointerPosition&&(this.$refs.list.scrollTop=this.pointerPosition),this.filteredOptions[this.pointer]&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerBackward()):this.filteredOptions[this.pointer]&&this.filteredOptions[0].$isLabel&&!this.groupSelect&&this.pointerForward(),this.pointerDirty=!0},pointerReset(){!this.closeOnSelect||(this.pointer=0,this.$refs.list&&(this.$refs.list.scrollTop=0))},pointerAdjust(){this.pointer>=this.filteredOptions.length-1&&(this.pointer=this.filteredOptions.length?this.filteredOptions.length-1:0),this.filteredOptions.length>0&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerForward()},pointerSet(e){this.pointer=e,this.pointerDirty=!0}}},$0={name:"vue-multiselect",mixins:[R0,I0],props:{name:{type:String,default:""},modelValue:{type:null,default(){return[]}},selectLabel:{type:String,default:"Press enter to select"},selectGroupLabel:{type:String,default:"Press enter to select group"},selectedLabel:{type:String,default:"Selected"},deselectLabel:{type:String,default:"Press enter to remove"},deselectGroupLabel:{type:String,default:"Press enter to deselect group"},showLabels:{type:Boolean,default:!0},limit:{type:Number,default:99999},maxHeight:{type:Number,default:300},limitText:{type:Function,default:e=>`and ${e} more`},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},openDirection:{type:String,default:""},showNoOptions:{type:Boolean,default:!0},showNoResults:{type:Boolean,default:!0},tabindex:{type:Number,default:0}},computed:{isSingleLabelVisible(){return(this.singleValue||this.singleValue===0)&&(!this.isOpen||!this.searchable)&&!this.visibleValues.length},isPlaceholderVisible(){return!this.internalValue.length&&(!this.searchable||!this.isOpen)},visibleValues(){return this.multiple?this.internalValue.slice(0,this.limit):[]},singleValue(){return this.internalValue[0]},deselectLabelText(){return this.showLabels?this.deselectLabel:""},deselectGroupLabelText(){return this.showLabels?this.deselectGroupLabel:""},selectLabelText(){return this.showLabels?this.selectLabel:""},selectGroupLabelText(){return this.showLabels?this.selectGroupLabel:""},selectedLabelText(){return this.showLabels?this.selectedLabel:""},inputStyle(){return this.searchable||this.multiple&&this.modelValue&&this.modelValue.length?this.isOpen?{width:"100%"}:{width:"0",position:"absolute",padding:"0"}:""},contentStyle(){return this.options.length?{display:"inline-block"}:{display:"block"}},isAbove(){return this.openDirection==="above"||this.openDirection==="top"?!0:this.openDirection==="below"||this.openDirection==="bottom"?!1:this.preferredOpenDirection==="above"},showSearchInput(){return this.searchable&&(this.hasSingleSelectedSlot&&(this.visibleSingleValue||this.visibleSingleValue===0)?this.isOpen:!0)}}};const L0={ref:"tags",class:"multiselect__tags"},D0={class:"multiselect__tags-wrap"},F0={class:"multiselect__spinner"},j0={key:0},V0={class:"multiselect__option"},z0={class:"multiselect__option"},B0=Nn("No elements found. Consider changing the search query."),H0={class:"multiselect__option"},k0=Nn("List is empty.");function U0(e,t,n,r,i,o){return Ie(),ke("div",{tabindex:e.searchable?-1:n.tabindex,class:[{"multiselect--active":e.isOpen,"multiselect--disabled":n.disabled,"multiselect--above":o.isAbove},"multiselect"],onFocus:t[14]||(t[14]=s=>e.activate()),onBlur:t[15]||(t[15]=s=>e.searchable?!1:e.deactivate()),onKeydown:[t[16]||(t[16]=Dt(Xe(s=>e.pointerForward(),["self","prevent"]),["down"])),t[17]||(t[17]=Dt(Xe(s=>e.pointerBackward(),["self","prevent"]),["up"]))],onKeypress:t[18]||(t[18]=Dt(Xe(s=>e.addPointerElement(s),["stop","self"]),["enter","tab"])),onKeyup:t[19]||(t[19]=Dt(s=>e.deactivate(),["esc"])),role:"combobox","aria-owns":"listbox-"+e.id},[qe(e.$slots,"caret",{toggle:e.toggle},()=>[he("div",{onMousedown:t[1]||(t[1]=Xe(s=>e.toggle(),["prevent","stop"])),class:"multiselect__select"},null,32)]),qe(e.$slots,"clear",{search:e.search}),he("div",L0,[qe(e.$slots,"selection",{search:e.search,remove:e.removeElement,values:o.visibleValues,isOpen:e.isOpen},()=>[xr(he("div",D0,[(Ie(!0),ke(Ye,null,ko(o.visibleValues,(s,a)=>qe(e.$slots,"tag",{option:s,search:e.search,remove:e.removeElement},()=>[(Ie(),ke("span",{class:"multiselect__tag",key:a},[he("span",{textContent:Jt(e.getOptionLabel(s))},null,8,["textContent"]),he("i",{tabindex:"1",onKeypress:Dt(Xe(l=>e.removeElement(s),["prevent"]),["enter"]),onMousedown:Xe(l=>e.removeElement(s),["prevent"]),class:"multiselect__tag-icon"},null,40,["onKeypress","onMousedown"])]))])),256))],512),[[sr,o.visibleValues.length>0]]),e.internalValue&&e.internalValue.length>n.limit?qe(e.$slots,"limit",{key:0},()=>[he("strong",{class:"multiselect__strong",textContent:Jt(n.limitText(e.internalValue.length-n.limit))},null,8,["textContent"])]):Lt("v-if",!0)]),he(Ni,{name:"multiselect__loading"},{default:qt(()=>[qe(e.$slots,"loading",{},()=>[xr(he("div",F0,null,512),[[sr,n.loading]])])]),_:3}),e.searchable?(Ie(),ke("input",{key:0,ref:"search",name:n.name,id:e.id,type:"text",autocomplete:"off",spellcheck:"false",placeholder:e.placeholder,style:o.inputStyle,value:e.search,disabled:n.disabled,tabindex:n.tabindex,onInput:t[2]||(t[2]=s=>e.updateSearch(s.target.value)),onFocus:t[3]||(t[3]=Xe(s=>e.activate(),["prevent"])),onBlur:t[4]||(t[4]=Xe(s=>e.deactivate(),["prevent"])),onKeyup:t[5]||(t[5]=Dt(s=>e.deactivate(),["esc"])),onKeydown:[t[6]||(t[6]=Dt(Xe(s=>e.pointerForward(),["prevent"]),["down"])),t[7]||(t[7]=Dt(Xe(s=>e.pointerBackward(),["prevent"]),["up"])),t[9]||(t[9]=Dt(Xe(s=>e.removeLastElement(),["stop"]),["delete"]))],onKeypress:t[8]||(t[8]=Dt(Xe(s=>e.addPointerElement(s),["prevent","stop","self"]),["enter"])),class:"multiselect__input","aria-controls":"listbox-"+e.id},null,44,["name","id","placeholder","value","disabled","tabindex","aria-controls"])):Lt("v-if",!0),o.isSingleLabelVisible?(Ie(),ke("span",{key:1,class:"multiselect__single",onMousedown:t[10]||(t[10]=Xe((...s)=>e.toggle&&e.toggle(...s),["prevent"]))},[qe(e.$slots,"singleLabel",{option:o.singleValue},()=>[Nn(Jt(e.currentOptionLabel),1)])],32)):Lt("v-if",!0),o.isPlaceholderVisible?(Ie(),ke("span",{key:2,class:"multiselect__placeholder",onMousedown:t[11]||(t[11]=Xe((...s)=>e.toggle&&e.toggle(...s),["prevent"]))},[qe(e.$slots,"placeholder",{},()=>[Nn(Jt(e.placeholder),1)])],32)):Lt("v-if",!0)],512),he(Ni,{name:"multiselect"},{default:qt(()=>[xr(he("div",{class:"multiselect__content-wrapper",onFocus:t[12]||(t[12]=(...s)=>e.activate&&e.activate(...s)),tabindex:"-1",onMousedown:t[13]||(t[13]=Xe(()=>{},["prevent"])),style:{maxHeight:e.optimizedHeight+"px"},ref:"list"},[he("ul",{class:"multiselect__content",style:o.contentStyle,role:"listbox",id:"listbox-"+e.id},[qe(e.$slots,"beforeList"),e.multiple&&e.max===e.internalValue.length?(Ie(),ke("li",j0,[he("span",V0,[qe(e.$slots,"maxElements",{},()=>[Nn("Maximum of "+Jt(e.max)+" options selected. First remove a selected option to select another.",1)])])])):Lt("v-if",!0),!e.max||e.internalValue.length<e.max?(Ie(!0),ke(Ye,{key:1},ko(e.filteredOptions,(s,a)=>(Ie(),ke("li",{class:"multiselect__element",key:a,id:e.id+"-"+a,role:s&&(s.$isLabel||s.$isDisabled)?null:"option"},[s&&(s.$isLabel||s.$isDisabled)?Lt("v-if",!0):(Ie(),ke("span",{key:0,class:[e.optionHighlight(a,s),"multiselect__option"],onClick:Xe(l=>e.select(s),["stop"]),onMouseenter:Xe(l=>e.pointerSet(a),["self"]),"data-select":s&&s.isTag?e.tagPlaceholder:o.selectLabelText,"data-selected":o.selectedLabelText,"data-deselect":o.deselectLabelText},[qe(e.$slots,"option",{option:s,search:e.search,index:a},()=>[he("span",null,Jt(e.getOptionLabel(s)),1)])],42,["onClick","onMouseenter","data-select","data-selected","data-deselect"])),s&&(s.$isLabel||s.$isDisabled)?(Ie(),ke("span",{key:1,"data-select":e.groupSelect&&o.selectGroupLabelText,"data-deselect":e.groupSelect&&o.deselectGroupLabelText,class:[e.groupHighlight(a,s),"multiselect__option"],onMouseenter:Xe(l=>e.groupSelect&&e.pointerSet(a),["self"]),onMousedown:Xe(l=>e.selectGroup(s),["prevent"])},[qe(e.$slots,"option",{option:s,search:e.search,index:a},()=>[he("span",null,Jt(e.getOptionLabel(s)),1)])],42,["data-select","data-deselect","onMouseenter","onMousedown"])):Lt("v-if",!0)],8,["id","role"]))),128)):Lt("v-if",!0),xr(he("li",null,[he("span",z0,[qe(e.$slots,"noResult",{search:e.search},()=>[B0])])],512),[[sr,n.showNoResults&&e.filteredOptions.length===0&&e.search&&!n.loading]]),xr(he("li",null,[he("span",H0,[qe(e.$slots,"noOptions",{},()=>[k0])])],512),[[sr,n.showNoOptions&&e.options.length===0&&!e.search&&!n.loading]]),qe(e.$slots,"afterList")],12,["id"])],36),[[sr,e.isOpen]])]),_:3})],42,["tabindex","aria-owns"])}$0.render=U0;var ql={d:(e,t)=>{for(var n in t)ql.o(t,n)&&!ql.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},Wr={};ql.d(Wr,{vX:()=>dr,KV:()=>wd,_b:()=>Yr,d2:()=>gt,ZP:()=>W0});class gt{static tokenize(t){var n=t.trim(),r=[],i=[[-2,/^([a-zA-Z_$][a-zA-Z_$1-9]*)\(\s*\)/],[-1,/^([a-zA-Z_$][a-zA-Z_$1-9]*)(\()/],[-11,/^([\<]{2}|[\>]{2,3}|[\*]{1,2}|[\?]{1,2}|[\&]{1,2}|[\|]{1,2}|[\=]{2,3}|[\!][\=]{1,2}|[\>\<][\=]|[\+\-\/\%\|\^\>\<\=\,\:\.])/],[-12,/^([\!\~])/],[-4,/^([-+]{0,1}(?:(?:[0-9]+[.][0-9]+)|(?:[0-9]+)))/,f=>parseFloat(f)],[-4,/^'((?:(\\')|[^'])*)'/],[-4,/^"((?:(\\")|[^"])*)"/],[-5,/^([a-zA-Z_$][a-zA-Z_$1-9]*)/],[-6,/^([\(\[\{])/],[-7,/^([\)\]\}])/]],o=0;e:for(;n!=""&&o<99;){n=n.trimLeft(),o++;for(var s=0;s<i.length;s++){let f=i[s],p=f[1];if(p.test(n)){var a=p.exec(n);if(a!=null){let d=a[0],m=a[1],b=d.length;a[2]&&(b-=a[2].length),n=n.substr(b),f[2]&&(m=f[2](m)),r.push([f[0],m]);continue e}}}}let l,c={NaN:[-4,NaN],undefined:[-4,void 0],void:[-12,"void"],typeof:[-12,"typeof"],null:[-4,null],true:[-4,!0],false:[-4,!1]};for(let f=0;f<r.length;f++)if(l=r[f],l[0]==-5&&c.hasOwnProperty(l[1])){let p=c[l[1]];p&&(l[0]=p[0],l[1]=p[1])}let u=[];for(let f=0;f<r.length;f++)l=r[f],l[0]==-6&&u.push(l[1]),l[0]==-7&&u.pop(),l[0]==-5&&u[u.length-1]=="{"&&(l[0]=-4);for(let f=0;f<r.length;f++){l=r[f];let p=f==0?null:r[f-1];l[0]!=-11||l[1]!="-"&&l[1]!="+"||p!=null&&!gt.isOperator(p)&&p[0]!=-6&&p[1]!=","||(l[0]=-12)}return r}static isInfix(t){return t[0]==-11}static isPrefix(t){return t[0]==-12}static isOperator(t){return t[0]==-11||t[0]==-12}static isFunctionCall(t){return t[0]==-1||t[0]==-2}static isOperatorOrFunctionCall(t){return gt.isOperator(t)||gt.isFunctionCall(t)}static isLiteral(t){return t[0]==-4}}const It=class{static getPrecedence(t){if(gt.isFunctionCall(t))return 100;if(gt.isOperator(t))return It.precendenceHash[t[1]]+1;if(gt.isLiteral(t)||t[0]==-5)return 100;throw new Error("Could not get precedence of token:"+JSON.stringify(t))}static isRightAssociative(t){return It.rightAssociative.indexOf(t[1])>-1}static createPrecendenceHash(t){It.precendenceHash===null&&(It.precendenceHash={},It.precendence.forEach(function(n,r){n.forEach?n.forEach(function(i){It.precendenceHash[i]=r}):It.precendenceHash[n]=r}))}static parse(t){It.createPrecendenceHash();let n,r=[],i=0;for(let o=0;o<t.length;o++)n=t[o],o==0||t[o-1],n[0]!=-12||n[1]!="-"&&n[1]!="+"||(n[1]=="+"?t.splice(o,1):n[1]="+/"+n[1]);for(let o=0;o<t.length;o++)if(n=t[o],n[0]==-6){let s=o==0?null:t[o-1],a=s!=null&&!gt.isOperator(s)&&s[0]!=-6&&s[1]!=",";n[1]=="["&&a&&n.push([-11,"."])}for(let o=0;o<t.length&&(i++,!(i>1e3));o++){let s=t[o];if(gt.isOperatorOrFunctionCall(s)){let a,l=It.getPrecedence(s),c=0,u=0;for(c=0;o+c<t.length-1;c++){if(a=t[o+c+1],a[0]==-7){if(u--,u<0)break;continue}if(a[0]==-6){u++;continue}if(u>0)continue;if(a==null){console.log("Warning: ran too long. This should not happen");break}let f=It.getPrecedence(a,t[o+c]);if(!(l<f)){if(l!=f){if(l>f)break;break}if(!It.isRightAssociative(a)||r.indexOf(a)>=0)break}}if(c>0){let f=t.splice(o,1);r.push(f[0]),t.splice(o+c,0,f[0]),o--}}}return t.filter(o=>!(o[1]=="("||o[1]==")"))}};let Yr=It;Sr(Yr,"precendence",[",",["?",":"],"??","||","&&","|","^","&",["==","!=","===","!=="],["<",">","<=",">="],["<<",">>",">>>"],["+","-"],["*","/","%"],"**",["!","~","+/-","+/+","typeof","void"],"."]),Sr(Yr,"rightAssociative",["?",":","**","!","~","+/-","+/+","typeof","void"]),Sr(Yr,"precendenceHash",null);class Ms extends Array{toArray(){return this.slice(0)}}class K0{constructor(t,n){this.a=t,this.b=n}}const Gt=class{static setGlobalContext(t,n="global"){Gt.contexts[n]=t}static getVariable(t,n,r=null){return n.hasOwnProperty(t)?n[t]:r!=null&&Gt.contexts.hasOwnProperty(r)&&Gt.contexts[r].hasOwnProperty(t)?Gt.contexts[r][t]:void 0}static evaluate(t,n={},r=null){let i,o,s=[];for(let a=0;a<t.length;a++){let l=t[a],c=l[0],u=l[1];if(c==-4)s.push(u);else if(gt.isInfix(l)){o=s.pop(),i=s.pop();let f=Gt.ops[u](i,o);s.push(f)}else if(gt.isPrefix(l))s.push(Gt.ops[u](s.pop()));else if(l[0]==-5){if(a<t.length-1&&t[a+1][1]=="."){s.push(l[1]);continue}let f=l[1];s.push(Gt.getVariable(f,n,r))}else if(c==-6)s.push(l);else if(c==-7){let f,p=[];if(i=s.pop(),i[0]==-6?f=i:(f=s.pop(),p=i instanceof Ms?i.toArray():[i]),u=="]"){if(f[1]!="[")throw Error("Bracket mismatch");if(f[2]){let d=f[2],m=d[1];gt.isInfix(d)&&s.push(Gt.ops[m](s.pop(),p[0]))}else s.push(p)}else if(u=="}"){if(f[1]!="{")throw Error("Curly bracket mismatch");let d={};p.forEach(m=>{d[m.a]=m.b}),s.push(d)}}else if(gt.isFunctionCall(l)){let f=l[1],p=Gt.getVariable(f,n,r);if(p==null)throw new Error("Function does not exist: "+f);if(l[0]==-2)s.push(p());else{let d=s.pop(),m=[];d instanceof Ms?m=d:m.push(d),s.push(p(...m))}}}return s[0]}};let dr=Gt;Sr(dr,"ops",{",":(t,n)=>t instanceof Ms?(t.push(n),t):new Ms(t,n),":":(t,n)=>new K0(t,n),"?":(t,n)=>t?n.a:n.b,"??":(t,n)=>t!=null?t:n,"||":(t,n)=>t||n,"&&":(t,n)=>t&&n,"|":(t,n)=>t|n,"^":(t,n)=>t^n,"&":(t,n)=>t&n,"==":(t,n)=>t==n,"!=":(t,n)=>t!=n,"===":(t,n)=>t===n,"!==":(t,n)=>t!==n,"<":(t,n)=>t<n,">":(t,n)=>t>n,"<=":(t,n)=>t<=n,">=":(t,n)=>t>=n,"<<":(t,n)=>t<<n,">>":(t,n)=>t>>n,">>>":(t,n)=>t>>>n,"+":(t,n)=>t+n,"-":(t,n)=>t-n,"*":(t,n)=>t*n,"/":(t,n)=>t/n,"%":(t,n)=>t%n,"**":(t,n)=>t**n,"!":t=>!t,"~":t=>~t,"+/-":t=>-t,"+/+":t=>t,typeof:t=>typeof t,".":(t,n)=>t[n],void:t=>{}}),Sr(dr,"contexts",{});class wd{constructor(t=""){this.setExpression(t),this.extra={functions:{},variables:{}}}setExpression(t=""){this.expression=t,this.tokens=void 0,this.rpn=void 0}tokenize(){return this.tokens==null&&(this.tokens=gt.tokenize(this.expression)),this.tokens}parse(){return this.rpn==null&&(this.rpn=Yr.parse(this.tokenize())),this.rpn}setLocalContext(t){this.localContext=t}static setGlobalContext(t,n="global"){dr.setGlobalContext(t,n)}evaluate(t,n){return t!==void 0&&(typeof t=="string"?n=t:this.setLocalContext(t)),n==null&&dr.contexts.hasOwnProperty("global")&&(n="global"),dr.evaluate(this.parse(),this.localContext,n)}}const W0=wd;Wr.vX;Wr.KV;Wr._b;Wr.d2;var w1=Wr.ZP,Nt="top",zt="bottom",Bt="right",Rt="left",_l="auto",Ji=[Nt,zt,Bt,Rt],Xr="start",Qi="end",Y0="clippingParents",Td="viewport",qi="popper",X0="reference",Pd=Ji.reduce(function(e,t){return e.concat([t+"-"+Xr,t+"-"+Qi])},[]),As=[].concat(Ji,[_l]).reduce(function(e,t){return e.concat([t,t+"-"+Xr,t+"-"+Qi])},[]),G0="beforeRead",Z0="read",J0="afterRead",Q0="beforeMain",q0="main",_0="afterMain",eS="beforeWrite",tS="write",nS="afterWrite",rS=[G0,Z0,J0,Q0,q0,_0,eS,tS,nS];function on(e){return e?(e.nodeName||"").toLowerCase():null}function Yt(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function _i(e){var t=Yt(e).Element;return e instanceof t||e instanceof Element}function Ht(e){var t=Yt(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function xd(e){if(typeof ShadowRoot=="undefined")return!1;var t=Yt(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function iS(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!Ht(o)||!on(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(s){var a=i[s];a===!1?o.removeAttribute(s):o.setAttribute(s,a===!0?"":a)}))})}function oS(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},s=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),a=s.reduce(function(l,c){return l[c]="",l},{});!Ht(i)||!on(i)||(Object.assign(i.style,a),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}var sS={name:"applyStyles",enabled:!0,phase:"write",fn:iS,effect:oS,requires:["computeStyles"]};function sn(e){return e.split("-")[0]}function Gr(e,t){var n=e.getBoundingClientRect(),r=1,i=1;return{width:n.width/r,height:n.height/i,top:n.top/i,right:n.right/r,bottom:n.bottom/i,left:n.left/r,x:n.left/r,y:n.top/i}}function ec(e){var t=Gr(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Cd(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&xd(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function gn(e){return Yt(e).getComputedStyle(e)}function aS(e){return["table","td","th"].indexOf(on(e))>=0}function Bn(e){return((_i(e)?e.ownerDocument:e.document)||window.document).documentElement}function Ns(e){return on(e)==="html"?e:e.assignedSlot||e.parentNode||(xd(e)?e.host:null)||Bn(e)}function Md(e){return!Ht(e)||gn(e).position==="fixed"?null:e.offsetParent}function lS(e){var t=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,n=navigator.userAgent.indexOf("Trident")!==-1;if(n&&Ht(e)){var r=gn(e);if(r.position==="fixed")return null}for(var i=Ns(e);Ht(i)&&["html","body"].indexOf(on(i))<0;){var o=gn(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function eo(e){for(var t=Yt(e),n=Md(e);n&&aS(n)&&gn(n).position==="static";)n=Md(n);return n&&(on(n)==="html"||on(n)==="body"&&gn(n).position==="static")?t:n||lS(e)||t}function tc(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}var Hn=Math.max,to=Math.min,Rs=Math.round;function Is(e,t,n){return Hn(e,to(t,n))}function Ad(){return{top:0,right:0,bottom:0,left:0}}function Nd(e){return Object.assign({},Ad(),e)}function Rd(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var cS=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,Nd(typeof t!="number"?t:Rd(t,Ji))};function uS(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,a=sn(n.placement),l=tc(a),c=[Rt,Bt].indexOf(a)>=0,u=c?"height":"width";if(!(!o||!s)){var f=cS(i.padding,n),p=ec(o),d=l==="y"?Nt:Rt,m=l==="y"?zt:Bt,b=n.rects.reference[u]+n.rects.reference[l]-s[l]-n.rects.popper[u],v=s[l]-n.rects.reference[l],S=eo(o),g=S?l==="y"?S.clientHeight||0:S.clientWidth||0:0,O=b/2-v/2,E=f[d],$=g-p[u]-f[m],R=g/2-p[u]/2+O,T=Is(E,R,$),P=l;n.modifiersData[r]=(t={},t[P]=T,t.centerOffset=T-R,t)}}function fS(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||!Cd(t.elements.popper,i)||(t.elements.arrow=i))}var pS={name:"arrow",enabled:!0,phase:"main",fn:uS,effect:fS,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Zr(e){return e.split("-")[1]}var dS={top:"auto",right:"auto",bottom:"auto",left:"auto"};function hS(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:Rs(Rs(t*i)/i)||0,y:Rs(Rs(n*i)/i)||0}}function Id(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,s=e.offsets,a=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,f=u===!0?hS(s):typeof u=="function"?u(s):s,p=f.x,d=p===void 0?0:p,m=f.y,b=m===void 0?0:m,v=s.hasOwnProperty("x"),S=s.hasOwnProperty("y"),g=Rt,O=Nt,E=window;if(c){var $=eo(n),R="clientHeight",T="clientWidth";$===Yt(n)&&($=Bn(n),gn($).position!=="static"&&a==="absolute"&&(R="scrollHeight",T="scrollWidth")),$=$,(i===Nt||(i===Rt||i===Bt)&&o===Qi)&&(O=zt,b-=$[R]-r.height,b*=l?1:-1),(i===Rt||(i===Nt||i===zt)&&o===Qi)&&(g=Bt,d-=$[T]-r.width,d*=l?1:-1)}var P=Object.assign({position:a},c&&dS);if(l){var N;return Object.assign({},P,(N={},N[O]=S?"0":"",N[g]=v?"0":"",N.transform=(E.devicePixelRatio||1)<=1?"translate("+d+"px, "+b+"px)":"translate3d("+d+"px, "+b+"px, 0)",N))}return Object.assign({},P,(t={},t[O]=S?b+"px":"",t[g]=v?d+"px":"",t.transform="",t))}function mS(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,s=o===void 0?!0:o,a=n.roundOffsets,l=a===void 0?!0:a,c={placement:sn(t.placement),variation:Zr(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Id(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Id(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var gS={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:mS,data:{}},$s={passive:!0};function vS(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,s=r.resize,a=s===void 0?!0:s,l=Yt(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(u){u.addEventListener("scroll",n.update,$s)}),a&&l.addEventListener("resize",n.update,$s),function(){o&&c.forEach(function(u){u.removeEventListener("scroll",n.update,$s)}),a&&l.removeEventListener("resize",n.update,$s)}}var yS={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:vS,data:{}},bS={left:"right",right:"left",bottom:"top",top:"bottom"};function Ls(e){return e.replace(/left|right|bottom|top/g,function(t){return bS[t]})}var SS={start:"end",end:"start"};function $d(e){return e.replace(/start|end/g,function(t){return SS[t]})}function nc(e){var t=Yt(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function rc(e){return Gr(Bn(e)).left+nc(e).scrollLeft}function ES(e){var t=Yt(e),n=Bn(e),r=t.visualViewport,i=n.clientWidth,o=n.clientHeight,s=0,a=0;return r&&(i=r.width,o=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(s=r.offsetLeft,a=r.offsetTop)),{width:i,height:o,x:s+rc(e),y:a}}function OS(e){var t,n=Bn(e),r=nc(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Hn(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=Hn(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+rc(e),l=-r.scrollTop;return gn(i||n).direction==="rtl"&&(a+=Hn(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}function ic(e){var t=gn(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function Ld(e){return["html","body","#document"].indexOf(on(e))>=0?e.ownerDocument.body:Ht(e)&&ic(e)?e:Ld(Ns(e))}function no(e,t){var n;t===void 0&&(t=[]);var r=Ld(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Yt(r),s=i?[o].concat(o.visualViewport||[],ic(r)?r:[]):r,a=t.concat(s);return i?a:a.concat(no(Ns(s)))}function oc(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function wS(e){var t=Gr(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}function Dd(e,t){return t===Td?oc(ES(e)):Ht(t)?wS(t):oc(OS(Bn(e)))}function TS(e){var t=no(Ns(e)),n=["absolute","fixed"].indexOf(gn(e).position)>=0,r=n&&Ht(e)?eo(e):e;return _i(r)?t.filter(function(i){return _i(i)&&Cd(i,r)&&on(i)!=="body"}):[]}function PS(e,t,n){var r=t==="clippingParents"?TS(e):[].concat(t),i=[].concat(r,[n]),o=i[0],s=i.reduce(function(a,l){var c=Dd(e,l);return a.top=Hn(c.top,a.top),a.right=to(c.right,a.right),a.bottom=to(c.bottom,a.bottom),a.left=Hn(c.left,a.left),a},Dd(e,o));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Fd(e){var t=e.reference,n=e.element,r=e.placement,i=r?sn(r):null,o=r?Zr(r):null,s=t.x+t.width/2-n.width/2,a=t.y+t.height/2-n.height/2,l;switch(i){case Nt:l={x:s,y:t.y-n.height};break;case zt:l={x:s,y:t.y+t.height};break;case Bt:l={x:t.x+t.width,y:a};break;case Rt:l={x:t.x-n.width,y:a};break;default:l={x:t.x,y:t.y}}var c=i?tc(i):null;if(c!=null){var u=c==="y"?"height":"width";switch(o){case Xr:l[c]=l[c]-(t[u]/2-n[u]/2);break;case Qi:l[c]=l[c]+(t[u]/2-n[u]/2);break}}return l}function ro(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.boundary,s=o===void 0?Y0:o,a=n.rootBoundary,l=a===void 0?Td:a,c=n.elementContext,u=c===void 0?qi:c,f=n.altBoundary,p=f===void 0?!1:f,d=n.padding,m=d===void 0?0:d,b=Nd(typeof m!="number"?m:Rd(m,Ji)),v=u===qi?X0:qi,S=e.rects.popper,g=e.elements[p?v:u],O=PS(_i(g)?g:g.contextElement||Bn(e.elements.popper),s,l),E=Gr(e.elements.reference),$=Fd({reference:E,element:S,strategy:"absolute",placement:i}),R=oc(Object.assign({},S,$)),T=u===qi?R:E,P={top:O.top-T.top+b.top,bottom:T.bottom-O.bottom+b.bottom,left:O.left-T.left+b.left,right:T.right-O.right+b.right},N=e.modifiersData.offset;if(u===qi&&N){var j=N[i];Object.keys(P).forEach(function(V){var F=[Bt,zt].indexOf(V)>=0?1:-1,C=[Nt,zt].indexOf(V)>=0?"y":"x";P[V]+=j[C]*F})}return P}function xS(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?As:l,u=Zr(r),f=u?a?Pd:Pd.filter(function(m){return Zr(m)===u}):Ji,p=f.filter(function(m){return c.indexOf(m)>=0});p.length===0&&(p=f);var d=p.reduce(function(m,b){return m[b]=ro(e,{placement:b,boundary:i,rootBoundary:o,padding:s})[sn(b)],m},{});return Object.keys(d).sort(function(m,b){return d[m]-d[b]})}function CS(e){if(sn(e)===_l)return[];var t=Ls(e);return[$d(e),t,$d(t)]}function MS(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,a=s===void 0?!0:s,l=n.fallbackPlacements,c=n.padding,u=n.boundary,f=n.rootBoundary,p=n.altBoundary,d=n.flipVariations,m=d===void 0?!0:d,b=n.allowedAutoPlacements,v=t.options.placement,S=sn(v),g=S===v,O=l||(g||!m?[Ls(v)]:CS(v)),E=[v].concat(O).reduce(function(Se,Re){return Se.concat(sn(Re)===_l?xS(t,{placement:Re,boundary:u,rootBoundary:f,padding:c,flipVariations:m,allowedAutoPlacements:b}):Re)},[]),$=t.rects.reference,R=t.rects.popper,T=new Map,P=!0,N=E[0],j=0;j<E.length;j++){var V=E[j],F=sn(V),C=Zr(V)===Xr,w=[Nt,zt].indexOf(F)>=0,M=w?"width":"height",L=ro(t,{placement:V,boundary:u,rootBoundary:f,altBoundary:p,padding:c}),z=w?C?Bt:Rt:C?zt:Nt;$[M]>R[M]&&(z=Ls(z));var B=Ls(z),K=[];if(o&&K.push(L[F]<=0),a&&K.push(L[z]<=0,L[B]<=0),K.every(function(Se){return Se})){N=V,P=!1;break}T.set(V,K)}if(P)for(var G=m?3:1,de=function(Re){var Je=E.find(function(Qe){var ft=T.get(Qe);if(ft)return ft.slice(0,Re).every(function(kt){return kt})});if(Je)return N=Je,"break"},ce=G;ce>0;ce--){var ve=de(ce);if(ve==="break")break}t.placement!==N&&(t.modifiersData[r]._skip=!0,t.placement=N,t.reset=!0)}}var AS={name:"flip",enabled:!0,phase:"main",fn:MS,requiresIfExists:["offset"],data:{_skip:!1}};function jd(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Vd(e){return[Nt,Bt,zt,Rt].some(function(t){return e[t]>=0})}function NS(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,s=ro(t,{elementContext:"reference"}),a=ro(t,{altBoundary:!0}),l=jd(s,r),c=jd(a,i,o),u=Vd(l),f=Vd(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":f})}var RS={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:NS};function IS(e,t,n){var r=sn(e),i=[Rt,Nt].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,s=o[0],a=o[1];return s=s||0,a=(a||0)*i,[Rt,Bt].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}function $S(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,s=As.reduce(function(u,f){return u[f]=IS(f,t.rects,o),u},{}),a=s[t.placement],l=a.x,c=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=s}var LS={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:$S};function DS(e){var t=e.state,n=e.name;t.modifiersData[n]=Fd({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var FS={name:"popperOffsets",enabled:!0,phase:"read",fn:DS,data:{}};function jS(e){return e==="x"?"y":"x"}function VS(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,a=s===void 0?!1:s,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,f=n.padding,p=n.tether,d=p===void 0?!0:p,m=n.tetherOffset,b=m===void 0?0:m,v=ro(t,{boundary:l,rootBoundary:c,padding:f,altBoundary:u}),S=sn(t.placement),g=Zr(t.placement),O=!g,E=tc(S),$=jS(E),R=t.modifiersData.popperOffsets,T=t.rects.reference,P=t.rects.popper,N=typeof b=="function"?b(Object.assign({},t.rects,{placement:t.placement})):b,j={x:0,y:0};if(!!R){if(o||a){var V=E==="y"?Nt:Rt,F=E==="y"?zt:Bt,C=E==="y"?"height":"width",w=R[E],M=R[E]+v[V],L=R[E]-v[F],z=d?-P[C]/2:0,B=g===Xr?T[C]:P[C],K=g===Xr?-P[C]:-T[C],G=t.elements.arrow,de=d&&G?ec(G):{width:0,height:0},ce=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Ad(),ve=ce[V],Se=ce[F],Re=Is(0,T[C],de[C]),Je=O?T[C]/2-z-Re-ve-N:B-Re-ve-N,Qe=O?-T[C]/2+z+Re+Se+N:K+Re+Se+N,ft=t.elements.arrow&&eo(t.elements.arrow),kt=ft?E==="y"?ft.clientTop||0:ft.clientLeft||0:0,Ve=t.modifiersData.offset?t.modifiersData.offset[t.placement][E]:0,ze=R[E]+Je-Ve-kt,vt=R[E]+Qe-Ve;if(o){var x=Is(d?to(M,ze):M,w,d?Hn(L,vt):L);R[E]=x,j[E]=x-w}if(a){var I=E==="x"?Nt:Rt,k=E==="x"?zt:Bt,X=R[$],W=X+v[I],q=X-v[k],ne=Is(d?to(W,ze):W,X,d?Hn(q,vt):q);R[$]=ne,j[$]=ne-X}}t.modifiersData[r]=j}}var zS={name:"preventOverflow",enabled:!0,phase:"main",fn:VS,requiresIfExists:["offset"]};function BS(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function HS(e){return e===Yt(e)||!Ht(e)?nc(e):BS(e)}function kS(e){var t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return n!==1||r!==1}function US(e,t,n){n===void 0&&(n=!1);var r=Ht(t);Ht(t)&&kS(t);var i=Bn(t),o=Gr(e),s={scrollLeft:0,scrollTop:0},a={x:0,y:0};return(r||!r&&!n)&&((on(t)!=="body"||ic(i))&&(s=HS(t)),Ht(t)?(a=Gr(t),a.x+=t.clientLeft,a.y+=t.clientTop):i&&(a.x=rc(i))),{x:o.left+s.scrollLeft-a.x,y:o.top+s.scrollTop-a.y,width:o.width,height:o.height}}function KS(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var s=[].concat(o.requires||[],o.requiresIfExists||[]);s.forEach(function(a){if(!n.has(a)){var l=t.get(a);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function WS(e){var t=KS(e);return rS.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function YS(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function XS(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var zd={placement:"bottom",modifiers:[],strategy:"absolute"};function Bd(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function GS(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,o=i===void 0?zd:i;return function(a,l,c){c===void 0&&(c=o);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},zd,o),modifiersData:{},elements:{reference:a,popper:l},attributes:{},styles:{}},f=[],p=!1,d={state:u,setOptions:function(S){var g=typeof S=="function"?S(u.options):S;b(),u.options=Object.assign({},o,u.options,g),u.scrollParents={reference:_i(a)?no(a):a.contextElement?no(a.contextElement):[],popper:no(l)};var O=WS(XS([].concat(r,u.options.modifiers)));return u.orderedModifiers=O.filter(function(E){return E.enabled}),m(),d.update()},forceUpdate:function(){if(!p){var S=u.elements,g=S.reference,O=S.popper;if(!!Bd(g,O)){u.rects={reference:US(g,eo(O),u.options.strategy==="fixed"),popper:ec(O)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(j){return u.modifiersData[j.name]=Object.assign({},j.data)});for(var E=0;E<u.orderedModifiers.length;E++){if(u.reset===!0){u.reset=!1,E=-1;continue}var $=u.orderedModifiers[E],R=$.fn,T=$.options,P=T===void 0?{}:T,N=$.name;typeof R=="function"&&(u=R({state:u,options:P,name:N,instance:d})||u)}}}},update:YS(function(){return new Promise(function(v){d.forceUpdate(),v(u)})}),destroy:function(){b(),p=!0}};if(!Bd(a,l))return d;d.setOptions(c).then(function(v){!p&&c.onFirstUpdate&&c.onFirstUpdate(v)});function m(){u.orderedModifiers.forEach(function(v){var S=v.name,g=v.options,O=g===void 0?{}:g,E=v.effect;if(typeof E=="function"){var $=E({state:u,name:S,instance:d,options:O}),R=function(){};f.push($||R)}})}function b(){f.forEach(function(v){return v()}),f=[]}return d}}var ZS=[yS,FS,gS,sS,LS,AS,zS,pS,RS],JS=GS({defaultModifiers:ZS});function QS(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);var n=e.indexOf("Trident/");if(n>0){var r=e.indexOf("rv:");return parseInt(e.substring(r+3,e.indexOf(".",r)),10)}var i=e.indexOf("Edge/");return i>0?parseInt(e.substring(i+5,e.indexOf(".",i)),10):-1}let Ds;function sc(){sc.init||(sc.init=!0,Ds=QS()!==-1)}var Fs={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){sc(),Xo(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const e=document.createElement("object");this._resizeObject=e,e.setAttribute("aria-hidden","true"),e.setAttribute("tabindex",-1),e.onload=this.addResizeHandlers,e.type="text/html",Ds&&this.$el.appendChild(e),e.data="about:blank",Ds||this.$el.appendChild(e)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit("notify",{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!Ds&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const qS=Su("data-v-b329ee4c");yu("data-v-b329ee4c");const _S={class:"resize-observer",tabindex:"-1"};bu();const e1=qS((e,t,n,r,i,o)=>(Ie(),ke("div",_S)));Fs.render=e1;Fs.__scopeId="data-v-b329ee4c";Fs.__file="src/components/ResizeObserver.vue";function io(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?io=function(t){return typeof t}:io=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},io(e)}function Hd(e,t,n,r,i,o,s){try{var a=e[o](s),l=a.value}catch(c){n(c);return}a.done?t(l):Promise.resolve(l).then(r,i)}function hr(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function s(l){Hd(o,r,i,s,a,"next",l)}function a(l){Hd(o,r,i,s,a,"throw",l)}s(void 0)})}}function t1(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Xt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?kd(Object(n),!0).forEach(function(r){t1(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kd(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ud(e){return n1(e)||r1(e)||Kd(e)||i1()}function n1(e){if(Array.isArray(e))return ac(e)}function r1(e){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(e))return Array.from(e)}function Kd(e,t){if(!!e){if(typeof e=="string")return ac(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ac(e,t)}}function ac(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function i1(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
15 |
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lc(e,t){var n;if(typeof Symbol=="undefined"||e[Symbol.iterator]==null){if(Array.isArray(e)||(n=Kd(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
16 |
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,s=!1,a;return{s:function(){n=e[Symbol.iterator]()},n:function(){var l=n.next();return o=l.done,l},e:function(l){s=!0,a=l},f:function(){try{!o&&n.return!=null&&n.return()}finally{if(s)throw a}}}}function Wd(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(io(t[n])==="object"&&e[n]?Wd(e[n],t[n]):e[n]=t[n])}var mr={disabled:!1,offset:[0,5],container:"body",boundary:void 0,instantMove:!1,disposeTimeout:5e3,popperTriggers:[],strategy:"absolute",modifiers:[],popperOptions:{},themes:{tooltip:{placement:"top",triggers:["hover","focus","touch"],hideTriggers:function(t){return[].concat(Ud(t),["click"])},delay:{show:200,hide:0},handleResize:!1,html:!1,loadingContent:"..."},dropdown:{placement:"bottom",triggers:["click"],delay:0,handleResize:!0,autoHide:!0},menu:{$extend:"dropdown",triggers:["hover","focus"],popperTriggers:["hover","focus"],delay:{show:0,hide:400}}}};function He(e,t){var n=mr.themes[e]||{},r;do r=n[t],typeof r=="undefined"?n.$extend?n=mr.themes[n.$extend]||{}:(n=null,r=mr[t]):n=null;while(n);return r}function o1(e){var t=[e],n=mr.themes[e]||{};do n.$extend&&!n.$resetCss?(t.push(n.$extend),n=mr.themes[n.$extend]||{}):n=null;while(n);return t.map(function(r){return"v-popper--theme-".concat(r)})}var js=!1;if(typeof window!="undefined"){js=!1;try{var s1=Object.defineProperty({},"passive",{get:function(){js=!0}});window.addEventListener("test",null,s1)}catch(e){}}var Yd=!1;typeof window!="undefined"&&typeof navigator!="undefined"&&(Yd=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream);function Vs(e,t,n){var r=e.find(function(i){return i.name===t});r||(r={name:t,options:{}},e.push(r)),Object.assign(r.options,n)}var Xd={hover:"mouseenter",focus:"focus",click:"click",touch:"touchstart"},Gd={hover:"mouseleave",focus:"blur",click:"click",touch:"touchend"};function a1(e,t){var n=e.indexOf(t);n!==-1&&e.splice(n,1)}var Jr=[],Qr=null,cc=function(){};typeof window!="undefined"&&(cc=window.Element);var Zd=function(){return{name:"VPopper",props:{theme:{type:String,required:!0},targetNodes:{type:Function,required:!0},referenceNode:{type:Function,required:!0},popperNode:{type:Function,required:!0},arrowNode:{type:Function,default:null},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:function(t){return He(t.theme,"disabled")}},placement:{type:String,default:function(t){return He(t.theme,"placement")},validator:function(t){return As.includes(t)}},delay:{type:[String,Number,Object],default:function(t){return He(t.theme,"delay")}},offset:{type:[Array,Function],default:function(t){return He(t.theme,"offset")}},triggers:{type:Array,default:function(t){return He(t.theme,"triggers")}},showTriggers:{type:[Array,Function],default:function(t){return He(t.theme,"showTriggers")}},hideTriggers:{type:[Array,Function],default:function(t){return He(t.theme,"hideTriggers")}},popperTriggers:{type:Array,default:function(t){return He(t.theme,"popperTriggers")}},popperShowTriggers:{type:[Array,Function],default:function(t){return He(t.theme,"popperShowTriggers")}},popperHideTriggers:{type:[Array,Function],default:function(t){return He(t.theme,"popperHideTriggers")}},container:{type:[String,Object,cc,Boolean],default:function(t){return He(t.theme,"container")}},boundary:{type:[String,cc],default:function(t){return He(t.theme,"boundary")}},strategy:{type:String,validator:function(t){return["absolute","fixed"].includes(t)},default:function(t){return He(t.theme,"strategy")}},modifiers:{type:Array,default:function(t){return He(t.theme,"modifiers")}},popperOptions:{type:Object,default:function(t){return He(t.theme,"popperOptions")}},autoHide:{type:Boolean,default:function(t){return He(t.theme,"autoHide")}},handleResize:{type:Boolean,default:function(t){return He(t.theme,"handleResize")}},instantMove:{type:Boolean,default:function(t){return He(t.theme,"instantMove")}},eagerMount:{type:Boolean,default:function(t){return He(t.theme,"eagerMount")}}},emits:["show","hide","update:shown","apply-show","apply-hide","close-group","close-directive","auto-hide","resize","dispose"],data:function(){return{isShown:!1,isMounted:!1,skipTransition:!1,classes:{showFrom:!1,showTo:!1,hideFrom:!1,hideTo:!0}}},computed:{popperId:function(){return this.ariaId!=null?this.ariaId:this.randomId},shouldMountContent:function(){return this.eagerMount||this.isMounted},slotData:function(){return{popperId:this.popperId,isShown:this.isShown,shouldMountContent:this.shouldMountContent,skipTransition:this.skipTransition,autoHide:this.autoHide,hide:this.hide,handleResize:this.handleResize,onResize:this.onResize,classes:Xt({},this.classes)}}},watch:{shown:"$_autoShowHide",disabled:function(t){t?this.dispose():this.init()},container:function(){var t=this;return hr(function*(){t.isShown&&t.popperInstance&&(t.$_ensureContainer(),yield t.popperInstance.update())})()},triggers:function(){this.$_removeEventListeners(),this.$_addEventListeners()},placement:"$_refreshPopperOptions",offset:"$_refreshPopperOptions",boundary:"$_refreshPopperOptions",strategy:"$_refreshPopperOptions",modifiers:"$_refreshPopperOptions",popperOptions:{handler:"$_refreshPopperOptions",deep:!0}},created:function(){this.randomId="popper_".concat([Math.random(),Date.now()].map(function(t){return t.toString(36).substr(2,10)}).join("_"))},mounted:function(){this.init()},activated:function(){this.$_autoShowHide()},deactivated:function(){this.hide()},beforeUnmount:function(){this.dispose()},methods:{show:function(){var t=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=n.event,i=n.skipDelay,o=i===void 0?!1:i,s=n.force,a=s===void 0?!1:s;(a||!this.disabled)&&(this.$_scheduleShow(r,o),this.$emit("show"),this.$_showFrameLocked=!0,requestAnimationFrame(function(){t.$_showFrameLocked=!1})),this.$emit("update:shown",!0)},hide:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.event,r=t.skipDelay,i=r===void 0?!1:r;this.$_scheduleHide(n,i),this.$emit("hide"),this.$emit("update:shown",!1)},init:function(){this.$_isDisposed=!1,this.isMounted=!1,this.$_events=[],this.$_preventShow=!1,this.$_targetNodes=this.targetNodes().filter(function(t){return t.nodeType===t.ELEMENT_NODE}),this.$_popperNode=this.popperNode(),this.$_swapTargetAttrs("title","data-original-title"),this.$_detachPopperNode(),this.triggers.length&&this.$_addEventListeners(),this.shown&&this.show()},dispose:function(){this.$_isDisposed=!0,this.$_removeEventListeners(),this.hide({skipDelay:!0}),this.popperInstance&&(this.popperInstance.destroy(),this.$_detachPopperNode()),this.isMounted=!1,this.popperInstance=null,this.isShown=!1,this.$_swapTargetAttrs("data-original-title","title"),this.$emit("dispose")},onResize:function(){var t=this;return hr(function*(){t.isShown&&t.popperInstance&&(yield t.popperInstance.update(),t.$emit("resize"))})()},$_getPopperOptions:function(){var t=this,n=Xt(Xt({},this.popperOptions),{},{placement:this.placement,strategy:this.strategy,modifiers:this.modifiers,onFirstUpdate:function(){var r=hr(function*(o){t.popperOptions.onFirstUpdate&&t.popperOptions.onFirstUpdate(o),yield t.$_applyShowEffect()});function i(o){return r.apply(this,arguments)}return i}()});return n.modifiers||(n.modifiers=[]),Vs(n.modifiers,"arrow",{element:this.arrowNode&&this.arrowNode()||"[data-popper-arrow]"}),this.offset&&Vs(n.modifiers,"offset",{offset:this.offset}),this.boundary&&Vs(n.modifiers,"preventOverflow",{boundary:this.boundary}),this.isShown||Vs(n.modifiers,"eventListeners",{enabled:!1}),n},$_refreshPopperOptions:function(){var t=this;return hr(function*(){t.popperInstance&&(yield t.popperInstance.setOptions(t.$_getPopperOptions()))})()},$_scheduleShow:function(){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.$_hideInProgress=!1,clearTimeout(this.$_scheduleTimer),Qr&&this.instantMove&&Qr.instantMove){Qr.$_applyHide(!0),this.$_applyShow(!0);return}t?this.$_applyShow():this.$_scheduleTimer=setTimeout(this.$_applyShow.bind(this),this.$_computeDelay("show"))},$_scheduleHide:function(){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;this.$_hideInProgress=!0,clearTimeout(this.$_scheduleTimer),this.isShown&&(Qr=this),t?this.$_applyHide():this.$_scheduleTimer=setTimeout(this.$_applyHide.bind(this),this.$_computeDelay("hide"))},$_computeDelay:function(t){var n=this.delay;return parseInt(n&&n[t]||n||0)},$_applyShow:function(){var t=arguments,n=this;return hr(function*(){var r=t.length>0&&t[0]!==void 0?t[0]:!1;clearTimeout(n.$_disposeTimer),clearTimeout(n.$_scheduleTimer),n.skipTransition=r,!n.isShown&&(n.isMounted||(n.$_ensureContainer(),n.isMounted=!0),n.popperInstance?(yield n.popperInstance.update(),yield n.$_refreshPopperOptions(),yield n.$_applyShowEffect()):n.popperInstance=JS(n.referenceNode(),n.$_popperNode,n.$_getPopperOptions()))})()},$_applyShowEffect:function(){var t=this;return hr(function*(){if(!t.$_hideInProgress){t.isShown=!0,t.$_applyAttrsToTarget({"aria-describedby":t.popperId,"data-popper-shown":""});var n=t.showGroup;if(n)for(var r,i=0;i<Jr.length;i++)r=Jr[i],r.showGroup!==n&&(r.hide(),r.$emit("close-group"));Jr.push(t),t.$emit("apply-show"),t.$_popperNode.setAttribute("data-popper-placement",t.popperInstance.state.placement),t.classes.showFrom=!0,t.classes.showTo=!1,t.classes.hideFrom=!1,t.classes.hideTo=!1,yield Qd(),t.classes.showFrom=!1,t.classes.showTo=!0}})()},$_applyHide:function(){var t=arguments,n=this;return hr(function*(){var r=t.length>0&&t[0]!==void 0?t[0]:!1;if(clearTimeout(n.$_scheduleTimer),!!n.isShown){n.skipTransition=r,a1(Jr,n),Qr===n&&(Qr=null),n.isShown=!1,n.popperInstance&&(yield n.$_refreshPopperOptions()),n.$_applyAttrsToTarget({"aria-describedby":void 0,"data-popper-shown":void 0}),clearTimeout(n.$_disposeTimer);var i=He(n.theme,"disposeTimeout");i!==null&&(n.$_disposeTimer=setTimeout(function(){n.$_popperNode&&(n.$_detachPopperNode(),n.isMounted=!1)},i)),n.$emit("apply-hide"),n.classes.showFrom=!1,n.classes.showTo=!1,n.classes.hideFrom=!0,n.classes.hideTo=!1,yield Qd(),n.classes.hideFrom=!1,n.classes.hideTo=!0}})()},$_autoShowHide:function(){this.shown?this.show():this.hide()},$_ensureContainer:function(){var t=this.container;if(typeof t=="string"?t=window.document.querySelector(t):t===!1&&(t=this.$_targetNodes[0].parentNode),!t)throw new Error("No container for popover: "+this.container);t.appendChild(this.$_popperNode)},$_addEventListeners:function(){var t=this,n=function(s,a,l,c,u){var f=l;c!=null&&(f=typeof c=="function"?c(f):c),f.forEach(function(p){var d=a[p];d&&(t.$_events.push({targetNodes:s,eventType:d,handler:u}),s.forEach(function(m){return m.addEventListener(d,u)}))})},r=function(s){t.isShown&&!t.$_hideInProgress||(s.usedByTooltip=!0,!t.$_preventShow&&t.show({event:s}))};n(this.$_targetNodes,Xd,this.triggers,this.showTriggers,r),n([this.$_popperNode],Xd,this.popperTriggers,this.popperShowTriggers,r);var i=function(s){s.usedByTooltip||t.hide({event:s})};n(this.$_targetNodes,Gd,this.triggers,this.hideTriggers,i),n([this.$_popperNode],Gd,this.popperTriggers,this.popperHideTriggers,i)},$_removeEventListeners:function(){this.$_events.forEach(function(t){var n=t.targetNodes,r=t.eventType,i=t.handler;n.forEach(function(o){return o.removeEventListener(r,i)})}),this.$_events=[]},$_handleGlobalClose:function(t){var n=this,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;this.$_showFrameLocked||(this.hide({event:t}),t.closePopover?this.$emit("close-directive"):this.$emit("auto-hide"),r&&(this.$_preventShow=!0,setTimeout(function(){n.$_preventShow=!1},300)))},$_detachPopperNode:function(){this.$_popperNode.parentNode&&this.$_popperNode.parentNode.removeChild(this.$_popperNode)},$_swapTargetAttrs:function(t,n){var r=lc(this.$_targetNodes),i;try{for(r.s();!(i=r.n()).done;){var o=i.value,s=o.getAttribute(t);s&&(o.removeAttribute(t),o.setAttribute(n,s))}}catch(a){r.e(a)}finally{r.f()}},$_applyAttrsToTarget:function(t){var n=lc(this.$_targetNodes),r;try{for(n.s();!(r=n.n()).done;){var i=r.value;for(var o in t){var s=t[o];s==null?i.removeAttribute(o):i.setAttribute(o,s)}}}catch(a){n.e(a)}finally{n.f()}}},render:function(){return this.$slots.default(this.slotData)}}};typeof document!="undefined"&&typeof window!="undefined"&&(Yd?document.addEventListener("touchend",c1,js?{passive:!0,capture:!0}:!0):window.addEventListener("click",l1,!0));function l1(e){Jd(e)}function c1(e){Jd(e,!0)}function Jd(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=function(o){var s=Jr[o],a=s.popperNode(),l=a.contains(e.target);requestAnimationFrame(function(){(e.closeAllPopover||e.closePopover&&l||s.autoHide&&!l)&&s.$_handleGlobalClose(e,t)})},r=0;r<Jr.length;r++)n(r)}function Qd(){return new Promise(function(e){return requestAnimationFrame(e)})}var qd={computed:{themeClass:function(){return o1(this.theme)}}},zs={name:"VPopperContent",components:{ResizeObserver:Fs},mixins:[qd],props:{popperId:String,theme:String,shown:Boolean,mounted:Boolean,skipTransition:Boolean,autoHide:Boolean,handleResize:Boolean,classes:Object},emits:["hide","resize"]},u1={class:"v-popper__wrapper"},f1={ref:"inner",class:"v-popper__inner"},p1={ref:"arrow",class:"v-popper__arrow-container"},d1=he("div",{class:"v-popper__arrow"},null,-1);function h1(e,t,n,r,i,o){var s=er("ResizeObserver");return Ie(),ke("div",{id:n.popperId,ref:"popover",class:["v-popper__popper",[e.themeClass,{"v-popper__popper--shown":n.shown,"v-popper__popper--hidden":!n.shown,"v-popper__popper--show-from":n.classes.showFrom,"v-popper__popper--show-to":n.classes.showTo,"v-popper__popper--hide-from":n.classes.hideFrom,"v-popper__popper--hide-to":n.classes.hideTo,"v-popper__popper--skip-transition":n.skipTransition}]],"aria-hidden":n.shown?"false":"true",tabindex:n.autoHide?0:void 0,onKeyup:t[2]||(t[2]=Dt(function(a){return n.autoHide&&e.$emit("hide")},["esc"]))},[he("div",u1,[he("div",f1,[n.mounted?(Ie(),ke(Ye,{key:0},[he("div",null,[qe(e.$slots,"default")]),n.handleResize?(Ie(),ke(s,{key:0,onNotify:t[1]||(t[1]=function(a){return e.$emit("resize",a)})})):Lt("v-if",!0)],64)):Lt("v-if",!0)],512),he("div",p1,[d1],512)])],42,["id","aria-hidden","tabindex"])}zs.render=h1;zs.__file="src/components/PopperContent.vue";var _d={methods:{show:function(){var t;return(t=this.$refs.popper).show.apply(t,arguments)},hide:function(){var t;return(t=this.$refs.popper).hide.apply(t,arguments)},dispose:function(){var t;return(t=this.$refs.popper).dispose.apply(t,arguments)},onResize:function(){var t;return(t=this.$refs.popper).onResize.apply(t,arguments)}}},oo={name:"VPopperWrapper",components:{Popper:Zd(),PopperContent:zs},mixins:[_d,qd],inheritAttrs:!1,props:{theme:{type:String,default:null}},computed:{finalTheme:function(){var t;return(t=this.theme)!==null&&t!==void 0?t:this.$options.vPopperTheme}},methods:{getTargetNodes:function(){var t=Ud(this.$refs.reference.children);return t.slice(0,t.length-1).filter(Boolean)}}};function m1(e,t,n,r,i,o){var s=er("PopperContent"),a=er("Popper");return Ie(),ke(a,Ei({ref:"popper"},e.$attrs,{theme:o.finalTheme,"target-nodes":o.getTargetNodes,"reference-node":function(){return e.$refs.reference},"popper-node":function(){return e.$refs.popperContent.$el},"arrow-node":function(){return e.$refs.popperContent.$refs.arrow}}),{default:qt(function(l){var c=l.popperId,u=l.isShown,f=l.shouldMountContent,p=l.skipTransition,d=l.autoHide,m=l.hide,b=l.handleResize,v=l.onResize,S=l.classes;return[he("div",{ref:"reference",class:["v-popper",[e.themeClass,{"v-popper--shown":u}]]},[qe(e.$slots,"default"),he(s,{ref:"popperContent","popper-id":c,theme:o.finalTheme,shown:u,mounted:f,"skip-transition":p,"auto-hide":d,"handle-resize":b,classes:S,onHide:m,onResize:v},{default:qt(function(){return[qe(e.$slots,"popper",{shown:u})]}),_:2},1032,["popper-id","theme","shown","mounted","skip-transition","auto-hide","handle-resize","classes","onHide","onResize"])],2)]}),_:3},16,["theme","target-nodes","reference-node","popper-node","arrow-node"])}oo.render=m1;oo.__file="src/components/PopperWrapper.vue";var uc=Xt(Xt({},oo),{},{name:"VDropdown",vPopperTheme:"dropdown"});uc.__file="src/components/Dropdown.vue";var fc=Xt(Xt({},oo),{},{name:"VMenu",vPopperTheme:"menu"});fc.__file="src/components/Menu.vue";var pc=Xt(Xt({},oo),{},{name:"VTooltip",vPopperTheme:"tooltip"});pc.__file="src/components/Tooltip.vue";var dc={name:"VTooltipDirective",components:{Popper:Zd(),PopperContent:zs},mixins:[_d],inheritAttrs:!1,props:{theme:{type:String,default:"tooltip"},html:{type:Boolean,default:function(t){return He(t.theme,"html")}},content:{type:[String,Number,Function],default:null},loadingContent:{type:String,default:function(t){return He(t.theme,"loadingContent")}}},data:function(){return{asyncContent:null}},computed:{isContentAsync:function(){return typeof this.content=="function"},loading:function(){return this.isContentAsync&&this.asyncContent==null},finalContent:function(){return this.isContentAsync?this.loading?this.loadingContent:this.asyncContent:this.content}},watch:{content:{handler:function(){this.fetchContent(!0)},immediate:!0},finalContent:function(t){var n=this;this.$nextTick(function(){n.$refs.popper.onResize()})}},created:function(){this.$_fetchId=0},methods:{fetchContent:function(t){var n=this;if(typeof this.content=="function"&&this.$_isShown&&(t||!this.$_loading&&this.asyncContent==null)){this.asyncContent=null,this.$_loading=!0;var r=++this.$_fetchId,i=this.content(this);i.then?i.then(function(o){return n.onResult(r,o)}):this.onResult(r,i)}},onResult:function(t,n){t===this.$_fetchId&&(this.$_loading=!1,this.asyncContent=n)},onShow:function(){this.$_isShown=!0,this.fetchContent()},onHide:function(){this.$_isShown=!1}}};function g1(e,t,n,r,i,o){var s=er("PopperContent"),a=er("Popper");return Ie(),ke(a,Ei({ref:"popper"},e.$attrs,{theme:n.theme,"popper-node":function(){return e.$refs.popperContent.$el},"arrow-node":function(){return e.$refs.popperContent.$refs.arrow},onApplyShow:o.onShow,onApplyHide:o.onHide}),{default:qt(function(l){var c=l.popperId,u=l.isShown,f=l.shouldMountContent,p=l.skipTransition,d=l.autoHide,m=l.hide,b=l.handleResize,v=l.onResize,S=l.classes;return[he(s,{ref:"popperContent",class:{"v-popper--tooltip-loading":o.loading},"popper-id":c,theme:n.theme,shown:u,mounted:f,"skip-transition":p,"auto-hide":d,"handle-resize":b,classes:S,onHide:m,onResize:v},{default:qt(function(){return[n.html?(Ie(),ke("div",{key:0,innerHTML:o.finalContent},null,8,["innerHTML"])):(Ie(),ke("div",{key:1,textContent:Jt(o.finalContent)},null,8,["textContent"]))]}),_:2},1032,["class","popper-id","theme","shown","mounted","skip-transition","auto-hide","handle-resize","classes","onHide","onResize"])]}),_:1},16,["theme","popper-node","arrow-node","onApplyShow","onApplyHide"])}dc.render=g1;dc.__file="src/components/TooltipDirective.vue";var eh="v-popper--has-tooltip";function v1(e,t){var n=e.placement;if(!n&&t){var r=lc(As),i;try{for(r.s();!(i=r.n()).done;){var o=i.value;t[o]&&(n=o)}}catch(s){r.e(s)}finally{r.f()}}return n||(n=He(e.theme||"tooltip","placement")),n}function th(e,t,n){var r,i=io(t);return i==="string"?r={content:t}:t&&i==="object"?r=t:r={content:!1},r.placement=v1(r,n),r.targetNodes=function(){return[e]},r.referenceNode=function(){return e},r}function y1(e,t,n){var r=th(e,t,n),i=e.$_popper=ip({name:"VTooltipDirective",data:function(){return{options:r}},render:function(){return tl(dc,Xt(Xt({},this.options),{},{ref:"tooltip"}))}}),o=document.createElement("div");return document.body.appendChild(o),i.mount(o),e.classList&&e.classList.add(eh),i}function nh(e){e.$_popper&&(e.$_popper.unmount(),delete e.$_popper,delete e.$_popperOldShown),e.classList&&e.classList.remove(eh)}function rh(e,t){var n=t.value,r=t.modifiers,i=th(e,n,r);if(!i.content||He(i.theme||"tooltip","disabled"))nh(e);else{var o;e.$_popper?(o=e.$_popper,o.options=i):o=y1(e,n,r),typeof n.shown!="undefined"&&n.shown!==e.$_popperOldShown&&(e.$_popperOldShown=n.shown,n.shown?o.$refs.tooltip.show():o.$refs.tooltip.hide())}}var b1={beforeMount:rh,updated:rh,beforeUnmount:function(t){nh(t)}};function ih(e){e.addEventListener("click",sh),e.addEventListener("touchstart",ah,js?{passive:!0}:!1)}function oh(e){e.removeEventListener("click",sh),e.removeEventListener("touchstart",ah),e.removeEventListener("touchend",lh),e.removeEventListener("touchcancel",ch)}function sh(e){var t=e.currentTarget;e.closePopover=!t.$_vclosepopover_touch,e.closeAllPopover=t.$_closePopoverModifiers&&!!t.$_closePopoverModifiers.all}function ah(e){if(e.changedTouches.length===1){var t=e.currentTarget;t.$_vclosepopover_touch=!0;var n=e.changedTouches[0];t.$_vclosepopover_touchPoint=n,t.addEventListener("touchend",lh),t.addEventListener("touchcancel",ch)}}function lh(e){var t=e.currentTarget;if(t.$_vclosepopover_touch=!1,e.changedTouches.length===1){var n=e.changedTouches[0],r=t.$_vclosepopover_touchPoint;e.closePopover=Math.abs(n.screenY-r.screenY)<20&&Math.abs(n.screenX-r.screenX)<20,e.closeAllPopover=t.$_closePopoverModifiers&&!!t.$_closePopoverModifiers.all}}function ch(e){var t=e.currentTarget;t.$_vclosepopover_touch=!1}var S1={beforeMount:function(t,n){var r=n.value,i=n.modifiers;t.$_closePopoverModifiers=i,(typeof r=="undefined"||r)&&ih(t)},updated:function(t,n){var r=n.value,i=n.oldValue,o=n.modifiers;t.$_closePopoverModifiers=o,r!==i&&(typeof r=="undefined"||r?ih(t):oh(t))},beforeUnmount:function(t){oh(t)}};function hc(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};hc.installed||(hc.installed=!0,Wd(mr,t),e.directive("tooltip",b1),e.directive("close-popper",S1),e.component("v-tooltip",pc),e.component("VTooltip",pc),e.component("v-dropdown",uc),e.component("VDropdown",uc),e.component("v-menu",fc),e.component("VMenu",fc))}var T1={version:"4.0.0-alpha.1",install:hc,options:mr};export{fy as A,ip as B,T1 as C,Ye as F,Ni as T,O1 as V,dd as _,jg as a,Ho as b,Si as c,Lt as d,Nn as e,bu as f,he as g,ko as h,ke as i,Zt as j,qe as k,Lg as l,Sd as m,vn as n,Ie as o,yu as p,xr as q,er as r,ny as s,Jt as t,$0 as u,sr as v,qt as w,Dt as x,Xe as y,w1 as z};
|
lib/wcfm/wcfm-options.js
CHANGED
@@ -4,26 +4,37 @@ window["wcfmoptions"] = {};
|
|
4 |
window["wcfmoptions"]['poster'] = function(action, options, successCallback, errorCallback) {
|
5 |
|
6 |
//console.log('wcfmoptions.poster called. Action: ' + action);
|
7 |
-
|
8 |
|
9 |
// Call the API
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
jQuery.ajax({
|
11 |
type: "POST",
|
12 |
url: ajaxurl,
|
13 |
-
data:
|
14 |
-
|
15 |
-
|
16 |
-
'command': action,
|
17 |
-
'args': options
|
18 |
-
},
|
19 |
-
dataType: 'text',
|
20 |
timeout: 30000,
|
21 |
error: function (jqXHR, status, errorThrown) {
|
22 |
console.log(errorThrown);
|
23 |
},
|
|
|
|
|
|
|
|
|
|
|
24 |
success: function(responseText) {
|
25 |
//console.log('ajax response', responseText);
|
26 |
//response = "[{name:'hello'}]";
|
|
|
|
|
27 |
try {
|
28 |
responseObj = JSON.parse(responseText);
|
29 |
} catch (e) {
|
4 |
window["wcfmoptions"]['poster'] = function(action, options, successCallback, errorCallback) {
|
5 |
|
6 |
//console.log('wcfmoptions.poster called. Action: ' + action);
|
7 |
+
console.log('wcfmoptions.poster called. Options: ' + JSON.stringify(options));
|
8 |
|
9 |
// Call the API
|
10 |
+
var data = {
|
11 |
+
'action': 'webpexpress-wcfm-api',
|
12 |
+
'nonce' : window.webpExpressWCFMNonce,
|
13 |
+
'command': action,
|
14 |
+
//'args': options
|
15 |
+
'args': JSON.stringify(options)
|
16 |
+
};
|
17 |
+
|
18 |
jQuery.ajax({
|
19 |
type: "POST",
|
20 |
url: ajaxurl,
|
21 |
+
data: data,
|
22 |
+
//contentType: "application/json; charset=utf-8",
|
23 |
+
dataType: 'text', // text or json?
|
|
|
|
|
|
|
|
|
24 |
timeout: 30000,
|
25 |
error: function (jqXHR, status, errorThrown) {
|
26 |
console.log(errorThrown);
|
27 |
},
|
28 |
+
/*success: function(responseObj) {
|
29 |
+
console.log('ajax response', responseObj);
|
30 |
+
successCallback(responseObj);
|
31 |
+
}*/
|
32 |
+
|
33 |
success: function(responseText) {
|
34 |
//console.log('ajax response', responseText);
|
35 |
//response = "[{name:'hello'}]";
|
36 |
+
//console.log('response:');
|
37 |
+
//console.log(responseText);
|
38 |
try {
|
39 |
responseObj = JSON.parse(responseText);
|
40 |
} catch (e) {
|
vendor/composer/installed.json
CHANGED
@@ -347,17 +347,17 @@
|
|
347 |
},
|
348 |
{
|
349 |
"name": "rosell-dk/image-mime-type-guesser",
|
350 |
-
"version": "0.
|
351 |
-
"version_normalized": "0.
|
352 |
"source": {
|
353 |
"type": "git",
|
354 |
"url": "https://github.com/rosell-dk/image-mime-type-guesser.git",
|
355 |
-
"reference": "
|
356 |
},
|
357 |
"dist": {
|
358 |
"type": "zip",
|
359 |
-
"url": "https://api.github.com/repos/rosell-dk/image-mime-type-guesser/zipball/
|
360 |
-
"reference": "
|
361 |
"shasum": ""
|
362 |
},
|
363 |
"require-dev": {
|
@@ -365,7 +365,7 @@
|
|
365 |
"phpunit/phpunit": "^9.3",
|
366 |
"squizlabs/php_codesniffer": "3.*"
|
367 |
},
|
368 |
-
"time": "2021-
|
369 |
"type": "library",
|
370 |
"extra": {
|
371 |
"scripts-descriptions": {
|
@@ -403,7 +403,7 @@
|
|
403 |
],
|
404 |
"support": {
|
405 |
"issues": "https://github.com/rosell-dk/image-mime-type-guesser/issues",
|
406 |
-
"source": "https://github.com/rosell-dk/image-mime-type-guesser/tree/0.
|
407 |
},
|
408 |
"funding": [
|
409 |
{
|
@@ -419,22 +419,22 @@
|
|
419 |
},
|
420 |
{
|
421 |
"name": "rosell-dk/webp-convert",
|
422 |
-
"version": "2.
|
423 |
-
"version_normalized": "2.
|
424 |
"source": {
|
425 |
"type": "git",
|
426 |
"url": "https://github.com/rosell-dk/webp-convert.git",
|
427 |
-
"reference": "
|
428 |
},
|
429 |
"dist": {
|
430 |
"type": "zip",
|
431 |
-
"url": "https://api.github.com/repos/rosell-dk/webp-convert/zipball/
|
432 |
-
"reference": "
|
433 |
"shasum": ""
|
434 |
},
|
435 |
"require": {
|
436 |
"php": "^5.6 | ^7.0 | ^8.0",
|
437 |
-
"rosell-dk/image-mime-type-guesser": "^0.
|
438 |
},
|
439 |
"require-dev": {
|
440 |
"friendsofphp/php-cs-fixer": "^2.11",
|
@@ -447,7 +447,7 @@
|
|
447 |
"ext-vips": "to use Vips extension for converting.",
|
448 |
"php-stan/php-stan": "Suggested for dev, in order to analyse code before committing"
|
449 |
},
|
450 |
-
"time": "2021-
|
451 |
"type": "library",
|
452 |
"extra": {
|
453 |
"scripts-descriptions": {
|
@@ -496,7 +496,7 @@
|
|
496 |
],
|
497 |
"support": {
|
498 |
"issues": "https://github.com/rosell-dk/webp-convert/issues",
|
499 |
-
"source": "https://github.com/rosell-dk/webp-convert/tree/2.
|
500 |
},
|
501 |
"funding": [
|
502 |
{
|
347 |
},
|
348 |
{
|
349 |
"name": "rosell-dk/image-mime-type-guesser",
|
350 |
+
"version": "0.4.0",
|
351 |
+
"version_normalized": "0.4.0.0",
|
352 |
"source": {
|
353 |
"type": "git",
|
354 |
"url": "https://github.com/rosell-dk/image-mime-type-guesser.git",
|
355 |
+
"reference": "5ff1c218faccb6ad7146b012e9544229271b30a9"
|
356 |
},
|
357 |
"dist": {
|
358 |
"type": "zip",
|
359 |
+
"url": "https://api.github.com/repos/rosell-dk/image-mime-type-guesser/zipball/5ff1c218faccb6ad7146b012e9544229271b30a9",
|
360 |
+
"reference": "5ff1c218faccb6ad7146b012e9544229271b30a9",
|
361 |
"shasum": ""
|
362 |
},
|
363 |
"require-dev": {
|
365 |
"phpunit/phpunit": "^9.3",
|
366 |
"squizlabs/php_codesniffer": "3.*"
|
367 |
},
|
368 |
+
"time": "2021-07-01T17:31:37+00:00",
|
369 |
"type": "library",
|
370 |
"extra": {
|
371 |
"scripts-descriptions": {
|
403 |
],
|
404 |
"support": {
|
405 |
"issues": "https://github.com/rosell-dk/image-mime-type-guesser/issues",
|
406 |
+
"source": "https://github.com/rosell-dk/image-mime-type-guesser/tree/0.4.0"
|
407 |
},
|
408 |
"funding": [
|
409 |
{
|
419 |
},
|
420 |
{
|
421 |
"name": "rosell-dk/webp-convert",
|
422 |
+
"version": "2.8.0",
|
423 |
+
"version_normalized": "2.8.0.0",
|
424 |
"source": {
|
425 |
"type": "git",
|
426 |
"url": "https://github.com/rosell-dk/webp-convert.git",
|
427 |
+
"reference": "d01977c3db60fe683e292b861c14f2611c3c1f27"
|
428 |
},
|
429 |
"dist": {
|
430 |
"type": "zip",
|
431 |
+
"url": "https://api.github.com/repos/rosell-dk/webp-convert/zipball/d01977c3db60fe683e292b861c14f2611c3c1f27",
|
432 |
+
"reference": "d01977c3db60fe683e292b861c14f2611c3c1f27",
|
433 |
"shasum": ""
|
434 |
},
|
435 |
"require": {
|
436 |
"php": "^5.6 | ^7.0 | ^8.0",
|
437 |
+
"rosell-dk/image-mime-type-guesser": "^0.4.0"
|
438 |
},
|
439 |
"require-dev": {
|
440 |
"friendsofphp/php-cs-fixer": "^2.11",
|
447 |
"ext-vips": "to use Vips extension for converting.",
|
448 |
"php-stan/php-stan": "Suggested for dev, in order to analyse code before committing"
|
449 |
},
|
450 |
+
"time": "2021-11-24T10:18:37+00:00",
|
451 |
"type": "library",
|
452 |
"extra": {
|
453 |
"scripts-descriptions": {
|
496 |
],
|
497 |
"support": {
|
498 |
"issues": "https://github.com/rosell-dk/webp-convert/issues",
|
499 |
+
"source": "https://github.com/rosell-dk/webp-convert/tree/2.8.0"
|
500 |
},
|
501 |
"funding": [
|
502 |
{
|
vendor/composer/installed.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
'type' => 'wordpress-plugin',
|
6 |
'install_path' => __DIR__ . '/../../',
|
7 |
'aliases' => array(),
|
8 |
-
'reference' => '
|
9 |
'name' => 'rosell-dk/webp-express',
|
10 |
'dev' => true,
|
11 |
),
|
@@ -47,21 +47,21 @@
|
|
47 |
'dev_requirement' => false,
|
48 |
),
|
49 |
'rosell-dk/image-mime-type-guesser' => array(
|
50 |
-
'pretty_version' => '0.
|
51 |
-
'version' => '0.
|
52 |
'type' => 'library',
|
53 |
'install_path' => __DIR__ . '/../rosell-dk/image-mime-type-guesser',
|
54 |
'aliases' => array(),
|
55 |
-
'reference' => '
|
56 |
'dev_requirement' => false,
|
57 |
),
|
58 |
'rosell-dk/webp-convert' => array(
|
59 |
-
'pretty_version' => '2.
|
60 |
-
'version' => '2.
|
61 |
'type' => 'library',
|
62 |
'install_path' => __DIR__ . '/../rosell-dk/webp-convert',
|
63 |
'aliases' => array(),
|
64 |
-
'reference' => '
|
65 |
'dev_requirement' => false,
|
66 |
),
|
67 |
'rosell-dk/webp-convert-cloud-service' => array(
|
@@ -79,7 +79,7 @@
|
|
79 |
'type' => 'wordpress-plugin',
|
80 |
'install_path' => __DIR__ . '/../../',
|
81 |
'aliases' => array(),
|
82 |
-
'reference' => '
|
83 |
'dev_requirement' => false,
|
84 |
),
|
85 |
'roundcube/plugin-installer' => array(
|
5 |
'type' => 'wordpress-plugin',
|
6 |
'install_path' => __DIR__ . '/../../',
|
7 |
'aliases' => array(),
|
8 |
+
'reference' => 'f490b77e4af0ab648b9b3f5ae1ebd7cfbfe26603',
|
9 |
'name' => 'rosell-dk/webp-express',
|
10 |
'dev' => true,
|
11 |
),
|
47 |
'dev_requirement' => false,
|
48 |
),
|
49 |
'rosell-dk/image-mime-type-guesser' => array(
|
50 |
+
'pretty_version' => '0.4.0',
|
51 |
+
'version' => '0.4.0.0',
|
52 |
'type' => 'library',
|
53 |
'install_path' => __DIR__ . '/../rosell-dk/image-mime-type-guesser',
|
54 |
'aliases' => array(),
|
55 |
+
'reference' => '5ff1c218faccb6ad7146b012e9544229271b30a9',
|
56 |
'dev_requirement' => false,
|
57 |
),
|
58 |
'rosell-dk/webp-convert' => array(
|
59 |
+
'pretty_version' => '2.8.0',
|
60 |
+
'version' => '2.8.0.0',
|
61 |
'type' => 'library',
|
62 |
'install_path' => __DIR__ . '/../rosell-dk/webp-convert',
|
63 |
'aliases' => array(),
|
64 |
+
'reference' => 'd01977c3db60fe683e292b861c14f2611c3c1f27',
|
65 |
'dev_requirement' => false,
|
66 |
),
|
67 |
'rosell-dk/webp-convert-cloud-service' => array(
|
79 |
'type' => 'wordpress-plugin',
|
80 |
'install_path' => __DIR__ . '/../../',
|
81 |
'aliases' => array(),
|
82 |
+
'reference' => 'f490b77e4af0ab648b9b3f5ae1ebd7cfbfe26603',
|
83 |
'dev_requirement' => false,
|
84 |
),
|
85 |
'roundcube/plugin-installer' => array(
|
vendor/rosell-dk/image-mime-type-guesser/README.md
CHANGED
@@ -19,88 +19,82 @@ Ok, actually the library cannot offer mime type detection for images which works
|
|
19 |
|
20 |
The stack of detect methods are currently (and in that order):
|
21 |
- [`finfo`](https://www.php.net/manual/en/class.finfo.php) *Requires fileinfo extension to be enabled. (PHP 5 >= 5.3.0, PHP 7, PHP 8, PECL fileinfo >= 0.1.0)*
|
22 |
-
- Our
|
23 |
- [`exif_imagetype`](https://www.php.net/manual/en/function.exif-imagetype.php) *Requires that PHP is compiled with exif (PHP 4 >= 4.3.0, PHP 5, PHP 7, PHP 8)*
|
24 |
- [`mime_content_type`](https://www.php.net/manual/en/function.mime-content-type.php) *Requires fileinfo. (PHP 4 >= 4.3.0, PHP 5, PHP 7, PHP 8)*
|
25 |
|
26 |
-
Note that these methods
|
27 |
|
|
|
28 |
|
29 |
## Installation
|
30 |
|
31 |
Install with composer
|
32 |
|
33 |
-
|
34 |
## Usage
|
35 |
|
36 |
-
|
37 |
|
38 |
Example:
|
39 |
```php
|
|
|
40 |
$result = ImageMimeTypeGuesser::detect($filePath);
|
41 |
if (is_null($result)) {
|
42 |
// the mime type could not be determined
|
43 |
} elseif ($result === false) {
|
44 |
// it is NOT an image (not a mime type that the server knows about anyway)
|
|
|
|
|
|
|
45 |
} else {
|
46 |
// it is an image, and we know its mime type!
|
47 |
$mimeType = $result;
|
48 |
}
|
49 |
```
|
50 |
|
51 |
-
|
52 |
|
53 |
-
|
|
|
|
|
|
|
|
|
54 |
|
55 |
-
|
|
|
|
|
56 |
|
57 |
*Warning*: Beware that guessing from file extension is unsuited when your aim is to protect the server from harmful uploads.
|
58 |
|
59 |
-
*Notice*: Only a limited set of image extensions is recognized by the extension to mimetype mapper - namely the following: { bmp, gif, ico, jpg, jpeg, png, tif, tiff, webp, svg }. If you need some other specifically, feel free to add a PR, or ask me to do it by creating an issue.
|
60 |
|
61 |
|
62 |
Example:
|
63 |
```php
|
64 |
$result = ImageMimeTypeGuesser::guess($filePath);
|
65 |
if ($result !== false) {
|
66 |
-
//
|
|
|
|
|
|
|
67 |
$mimeType = $result;
|
68 |
} else {
|
69 |
-
// not an image
|
70 |
}
|
71 |
```
|
72 |
|
73 |
-
|
74 |
-
|
75 |
-
Say for example that your server does not recognize the image/webp format, and you are examining a file "test.webp". In that case, a detection with *detect* will return false (provided that one of the detection methods are operational). The *guess* method will *also* return false, as it never gets to fall back to file extension mapping. However, *lenientGuess* will nail it, and return 'image/webp'.
|
76 |
-
|
77 |
-
For those who speaks code, the logic is perhaps best described with the code itself:
|
78 |
|
|
|
79 |
```php
|
80 |
-
|
81 |
-
|
82 |
-
$detectResult = self::detect($filePath);
|
83 |
-
if ($detectResult === false) {
|
84 |
-
// The server does not recognize this image type.
|
85 |
-
// - but perhaps it is because it does not know about this image type.
|
86 |
-
// - so we turn to mapping the file extension
|
87 |
-
return GuessFromExtension::guess($filePath);
|
88 |
-
} elseif (is_null($detectResult)) {
|
89 |
-
// the mime type could not be determined
|
90 |
-
// perhaps we also in this case want to turn to mapping the file extension
|
91 |
-
return GuessFromExtension::guess($filePath);
|
92 |
-
}
|
93 |
-
return $detectResult;
|
94 |
}
|
95 |
```
|
96 |
|
|
|
97 |
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
```php
|
103 |
-
if (ImageMimeTypeGuesser::guessIsIn($filePath, ['image/jpeg','image/png']) {
|
104 |
-
// Image is either a jpeg or a png (probably)
|
105 |
-
}
|
106 |
-
```
|
19 |
|
20 |
The stack of detect methods are currently (and in that order):
|
21 |
- [`finfo`](https://www.php.net/manual/en/class.finfo.php) *Requires fileinfo extension to be enabled. (PHP 5 >= 5.3.0, PHP 7, PHP 8, PECL fileinfo >= 0.1.0)*
|
22 |
+
- Our signature sniffer (based on [this code](http://phil.lavin.me.uk/2011/12/php-accurately-detecting-the-type-of-a-file/)) *Works on all platforms (PHP 4, PHP 5, PHP 7, PHP 8). Only detects png, gif, jpeg and webp*
|
23 |
- [`exif_imagetype`](https://www.php.net/manual/en/function.exif-imagetype.php) *Requires that PHP is compiled with exif (PHP 4 >= 4.3.0, PHP 5, PHP 7, PHP 8)*
|
24 |
- [`mime_content_type`](https://www.php.net/manual/en/function.mime-content-type.php) *Requires fileinfo. (PHP 4 >= 4.3.0, PHP 5, PHP 7, PHP 8)*
|
25 |
|
26 |
+
Note that all these methods except the signature sniffer relies on the mime type mapping on the server (the `mime.types` file in Apache). If the server doesn't know about a certain mime type, it will not be detected. This does however not mean that the methods relies on the file extension. A png file renamed to "png.jpeg" will be correctly identified as *image/png*.
|
27 |
|
28 |
+
Besides the detection methods, the library also comes with a method for mapping file extension to mime type. It is rather limited, though.
|
29 |
|
30 |
## Installation
|
31 |
|
32 |
Install with composer
|
33 |
|
|
|
34 |
## Usage
|
35 |
|
36 |
+
To detect the mime type of a file, use `ImageMimeTypeGuesser::detect($filePath)`. It returns the mime-type, if the file is recognized as an image. *false* is returned if it is not recognized as an image. *null* is returned if the mime type could not be determined (ie due to none of the methods being available).
|
37 |
|
38 |
Example:
|
39 |
```php
|
40 |
+
use ImageMimeTypeGuesser\ImageMimeTypeGuesser;
|
41 |
$result = ImageMimeTypeGuesser::detect($filePath);
|
42 |
if (is_null($result)) {
|
43 |
// the mime type could not be determined
|
44 |
} elseif ($result === false) {
|
45 |
// it is NOT an image (not a mime type that the server knows about anyway)
|
46 |
+
// This happens when:
|
47 |
+
// a) The mime type is identified as something that is not an image (ie text)
|
48 |
+
// b) The mime type isn't identified (ie if the image type is not known by the server)
|
49 |
} else {
|
50 |
// it is an image, and we know its mime type!
|
51 |
$mimeType = $result;
|
52 |
}
|
53 |
```
|
54 |
|
55 |
+
For convenience, you can use *detectIsIn* method to test if a detection is in a list of mimetypes.
|
56 |
|
57 |
+
```php
|
58 |
+
if (ImageMimeTypeGuesser::detectIsIn($filePath, ['image/jpeg','image/png'])) {
|
59 |
+
// The file is a jpeg or a png
|
60 |
+
}
|
61 |
+
```
|
62 |
|
63 |
+
The `detect` method does not resort to mapping from file extension. In most cases you do not want to do that. In some cases it can be insecure to do that. For example, if you want to prevent a user from uploading executable files, you probably do not want to allow her to upload executable files with innocent looking file extenions, such as "evil-exe.jpg".
|
64 |
+
|
65 |
+
In some cases, though, you simply want a best guess, and in that case, falling back to mapping from file extension makes sense. In that case, you can use the *guess* method instead of the *detect* method. Or you can use *lenientGuess*. Lenient guess is even more slacky and will turn to mapping not only when dectect return *null*, but even when it returns *false*.
|
66 |
|
67 |
*Warning*: Beware that guessing from file extension is unsuited when your aim is to protect the server from harmful uploads.
|
68 |
|
69 |
+
*Notice*: Only a limited set of image extensions is recognized by the extension to mimetype mapper - namely the following: { apng, avif, bmp, gif, ico, jpg, jpeg, png, tif, tiff, webp, svg }. If you need some other specifically, feel free to add a PR, or ask me to do it by creating an issue.
|
70 |
|
71 |
|
72 |
Example:
|
73 |
```php
|
74 |
$result = ImageMimeTypeGuesser::guess($filePath);
|
75 |
if ($result !== false) {
|
76 |
+
// It appears to be an image
|
77 |
+
// BEWARE: This is only a guess, as we resort to mapping from file extension,
|
78 |
+
// when the file cannot be properly detected.
|
79 |
+
// DO NOT USE THIS GUESS FOR PROTECTING YOUR SERVER
|
80 |
$mimeType = $result;
|
81 |
} else {
|
82 |
+
// It does not appear to be an image
|
83 |
}
|
84 |
```
|
85 |
|
86 |
+
The guess functions also have convenience methods for testing against a list of mime types. They are called `ImageMimeTypeGuesser::guessIsIn` and `ImageMimeTypeGuesser::lenientGuessIsIn`.
|
|
|
|
|
|
|
|
|
87 |
|
88 |
+
Example:
|
89 |
```php
|
90 |
+
if (ImageMimeTypeGuesser::guessIsIn($filePath, ['image/jpeg','image/png'])) {
|
91 |
+
// The file appears to be a jpeg or a png
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
}
|
93 |
```
|
94 |
|
95 |
+
## Alternatives
|
96 |
|
97 |
+
Other sniffers:
|
98 |
+
- https://github.com/Intervention/mimesniffer
|
99 |
+
- https://github.com/zjsxwc/mime-type-sniffer
|
100 |
+
- https://github.com/Tinram/File-Identifier
|
|
|
|
|
|
|
|
|
|
vendor/rosell-dk/image-mime-type-guesser/src/Detectors/GetImageSize.php
CHANGED
@@ -27,7 +27,7 @@ class GetImageSize extends AbstractDetector
|
|
27 |
$imageSize = getimagesize($filePath);
|
28 |
return (isset($imageSize['mime']) ? $imageSize['mime'] : false);
|
29 |
} catch (\Exception $e) {
|
30 |
-
// well well, don't let this stop us either
|
31 |
return null;
|
32 |
}
|
33 |
}
|
27 |
$imageSize = getimagesize($filePath);
|
28 |
return (isset($imageSize['mime']) ? $imageSize['mime'] : false);
|
29 |
} catch (\Exception $e) {
|
30 |
+
// well well, don't let this stop us either
|
31 |
return null;
|
32 |
}
|
33 |
}
|
vendor/rosell-dk/image-mime-type-guesser/src/Detectors/MimeContentType.php
CHANGED
@@ -38,7 +38,6 @@ class MimeContentType extends AbstractDetector
|
|
38 |
// TODO:
|
39 |
// We should probably throw... - we will do in version 1.0.0
|
40 |
//throw $e;
|
41 |
-
|
42 |
}
|
43 |
}
|
44 |
return null;
|
38 |
// TODO:
|
39 |
// We should probably throw... - we will do in version 1.0.0
|
40 |
//throw $e;
|
|
|
41 |
}
|
42 |
}
|
43 |
return null;
|
vendor/rosell-dk/image-mime-type-guesser/src/Detectors/SniffFirstFourBytes.php
CHANGED
@@ -10,8 +10,6 @@ class SniffFirstFourBytes extends AbstractDetector
|
|
10 |
/**
|
11 |
* Try to detect mime type by sniffing the first four bytes.
|
12 |
*
|
13 |
-
* Credits: Based on the code here: http://phil.lavin.me.uk/2011/12/php-accurately-detecting-the-type-of-a-file/
|
14 |
-
*
|
15 |
* Returns:
|
16 |
* - mime type (string) (if it is in fact an image, and type could be determined)
|
17 |
* - false (if it is not an image type that the server knowns about)
|
@@ -24,25 +22,123 @@ class SniffFirstFourBytes extends AbstractDetector
|
|
24 |
*/
|
25 |
protected function doDetect($filePath)
|
26 |
{
|
27 |
-
// PNG, GIF, JFIF JPEG, EXIF JPEF (respectively)
|
28 |
-
$known = [
|
29 |
-
'89504E47' => 'image/png',
|
30 |
-
'47494638' => 'image/gif',
|
31 |
-
'FFD8FFE0' => 'image/jpeg', // JFIF JPEG
|
32 |
-
'FFD8FFE1' => 'image/jpeg', // EXIF JPEG
|
33 |
-
];
|
34 |
-
|
35 |
$handle = @fopen($filePath, 'r');
|
36 |
if ($handle === false) {
|
37 |
return null;
|
38 |
}
|
39 |
-
|
40 |
-
|
|
|
|
|
41 |
return null;
|
42 |
}
|
43 |
-
$
|
44 |
-
|
45 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
}
|
48 |
}
|
10 |
/**
|
11 |
* Try to detect mime type by sniffing the first four bytes.
|
12 |
*
|
|
|
|
|
13 |
* Returns:
|
14 |
* - mime type (string) (if it is in fact an image, and type could be determined)
|
15 |
* - false (if it is not an image type that the server knowns about)
|
22 |
*/
|
23 |
protected function doDetect($filePath)
|
24 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
$handle = @fopen($filePath, 'r');
|
26 |
if ($handle === false) {
|
27 |
return null;
|
28 |
}
|
29 |
+
// 20 bytes is sufficient for all our sniffers, except image/svg+xml.
|
30 |
+
// The svg sniffer takes care of reading more
|
31 |
+
$sampleBin = @fread($handle, 20);
|
32 |
+
if ($sampleBin === false) {
|
33 |
return null;
|
34 |
}
|
35 |
+
$firstByte = $sampleBin[0];
|
36 |
+
$sampleHex = strtoupper(bin2hex($sampleBin));
|
37 |
+
|
38 |
+
$hexPatterns = [];
|
39 |
+
$binPatterns = [];
|
40 |
+
|
41 |
+
// https://www.rapidtables.com/convert/number/hex-to-ascii.html
|
42 |
+
switch ($firstByte) {
|
43 |
+
case "\x00":
|
44 |
+
$hexPatterns[] = ['image/x-icon', "/^00000(1?2)00/"];
|
45 |
+
|
46 |
+
if (preg_match("/^.{8}6A502020/", $sampleHex) === 1) {
|
47 |
+
// jpeg-2000 - a bit more complex, as block size may vary
|
48 |
+
// https://www.file-recovery.com/jp2-signature-format.htm
|
49 |
+
$block1Size = hexdec("0x" . substr($sampleHex, 0, 8));
|
50 |
+
|
51 |
+
$moreBytes = @fread($handle, $block1Size + 4 + 8);
|
52 |
+
if ($moreBytes !== false) {
|
53 |
+
$sampleBin .= $moreBytes;
|
54 |
+
}
|
55 |
+
if (substr($sampleBin, $block1Size + 4, 4) == 'ftyp') {
|
56 |
+
$subtyp = substr($sampleBin, $block1Size + 8, 4);
|
57 |
+
if ($subtyp == 'mjp2') {
|
58 |
+
return 'video/mj2';
|
59 |
+
} else {
|
60 |
+
return 'image/' . rtrim($subtyp);
|
61 |
+
}
|
62 |
+
}
|
63 |
+
}
|
64 |
+
|
65 |
+
break;
|
66 |
+
|
67 |
+
case "8":
|
68 |
+
$binPatterns[] = ['application/psd', "/^8BPS/"];
|
69 |
+
break;
|
70 |
+
|
71 |
+
case "B":
|
72 |
+
$binPatterns[] = ['image/bmp', "/^BM/"];
|
73 |
+
break;
|
74 |
+
|
75 |
+
case "G":
|
76 |
+
$binPatterns[] = ['image/gif', "/^GIF8(7|9)a/"];
|
77 |
+
break;
|
78 |
+
|
79 |
+
case "I":
|
80 |
+
$hexPatterns[] = ['image/tiff', "/^(49492A00|4D4D002A)/"];
|
81 |
+
break;
|
82 |
+
|
83 |
+
case "R":
|
84 |
+
// PS: Another library is more specific: /^RIFF.{4}WEBPVP/
|
85 |
+
// Is "VP" always there?
|
86 |
+
$binPatterns[] = ['image/webp', "/^RIFF.{4}WEBP/"];
|
87 |
+
break;
|
88 |
+
|
89 |
+
case "<":
|
90 |
+
// Another library looks for end bracket for svg.
|
91 |
+
// We do not, as it requires more bytes read.
|
92 |
+
// Note that <xml> tag might be big too... - so we read in 200 extra
|
93 |
+
$moreBytes = @fread($handle, 200);
|
94 |
+
if ($moreBytes !== false) {
|
95 |
+
$sampleBin .= $moreBytes;
|
96 |
+
}
|
97 |
+
$binPatterns[] = ['image/svg+xml', "/^(<\?xml[^>]*\?>.*)?<svg/is"];
|
98 |
+
break;
|
99 |
+
|
100 |
+
case "f":
|
101 |
+
//$hexPatterns[] = ['image/heic', "/667479706865(6963|6978|7663|696D|6973|766D|7673)/"];
|
102 |
+
//$hexPatterns[] = ['image/heif', "/667479706D(69|73)6631)/"];
|
103 |
+
$binPatterns[] = ['image/heic', "/ftyphe(ic|ix|vc|im|is|vm|vs)/"];
|
104 |
+
$binPatterns[] = ['image/heif', "/ftypm(i|s)f1/"];
|
105 |
+
break;
|
106 |
+
|
107 |
+
case "\x89":
|
108 |
+
$hexPatterns[] = ['image/png', "/^89504E470D0A1A0A/"];
|
109 |
+
break;
|
110 |
+
|
111 |
+
case "\xFF":
|
112 |
+
$hexPatterns[] = ['image/jpeg', "/^FFD8FF(DB|E0|EE|E1)/"];
|
113 |
+
break;
|
114 |
}
|
115 |
+
|
116 |
+
foreach ($hexPatterns as list($mime, $pattern)) {
|
117 |
+
if (preg_match($pattern, $sampleHex) === 1) {
|
118 |
+
return $mime;
|
119 |
+
}
|
120 |
+
}
|
121 |
+
foreach ($binPatterns as list($mime, $pattern)) {
|
122 |
+
if (preg_match($pattern, $sampleBin) === 1) {
|
123 |
+
return $mime;
|
124 |
+
}
|
125 |
+
}
|
126 |
+
return null;
|
127 |
+
|
128 |
+
/*
|
129 |
+
https://en.wikipedia.org/wiki/List_of_file_signatures
|
130 |
+
https://github.com/zjsxwc/mime-type-sniffer/blob/master/src/MimeTypeSniffer/MimeTypeSniffer.php
|
131 |
+
http://phil.lavin.me.uk/2011/12/php-accurately-detecting-the-type-of-a-file/
|
132 |
+
|
133 |
+
*/
|
134 |
+
// TODO: JPEG 2000
|
135 |
+
// mime types: image/jp2, image/jpf, image/jpx, image/jpm
|
136 |
+
// http://fileformats.archiveteam.org/wiki/JPEG_2000
|
137 |
+
// https://www.file-recovery.com/jp2-signature-format.htm
|
138 |
+
/*
|
139 |
+
From: https://github.com/Tinram/File-Identifier/blob/master/src/FileSignatures.php
|
140 |
+
'JPG 2000' => '00 00 00 0c 6a 50 20 20 0d 0a 87 0a',
|
141 |
+
https://filesignatures.net/index.php?page=search&search=JP2&mode=EXT
|
142 |
+
*/
|
143 |
}
|
144 |
}
|
vendor/rosell-dk/image-mime-type-guesser/src/GuessFromExtension.php
CHANGED
@@ -59,7 +59,7 @@ class GuessFromExtension
|
|
59 |
$fileExtension = $matches[1];
|
60 |
|
61 |
// Trivial image mime types
|
62 |
-
if (in_array($fileExtension, ['bmp', 'gif', 'jpeg', 'png', 'tiff', 'webp'])) {
|
63 |
return 'image/' . $fileExtension;
|
64 |
}
|
65 |
|
@@ -71,7 +71,8 @@ class GuessFromExtension
|
|
71 |
// Non-trivial image mime types
|
72 |
switch ($fileExtension) {
|
73 |
case 'ico':
|
74 |
-
|
|
|
75 |
|
76 |
case 'jpg':
|
77 |
return 'image/jpeg';
|
@@ -86,5 +87,4 @@ class GuessFromExtension
|
|
86 |
// We do not know this extension, return null
|
87 |
return null;
|
88 |
}
|
89 |
-
|
90 |
}
|
59 |
$fileExtension = $matches[1];
|
60 |
|
61 |
// Trivial image mime types
|
62 |
+
if (in_array($fileExtension, ['apng', 'avif', 'bmp', 'gif', 'jpeg', 'png', 'tiff', 'webp'])) {
|
63 |
return 'image/' . $fileExtension;
|
64 |
}
|
65 |
|
71 |
// Non-trivial image mime types
|
72 |
switch ($fileExtension) {
|
73 |
case 'ico':
|
74 |
+
case 'cur':
|
75 |
+
return 'image/x-icon'; // or perhaps 'vnd.microsoft.icon' ?
|
76 |
|
77 |
case 'jpg':
|
78 |
return 'image/jpeg';
|
87 |
// We do not know this extension, return null
|
88 |
return null;
|
89 |
}
|
|
|
90 |
}
|
vendor/rosell-dk/webp-convert/README.md
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
|
3 |
[![Latest Stable Version](https://img.shields.io/packagist/v/rosell-dk/webp-convert.svg?style=flat-square)](https://packagist.org/packages/rosell-dk/webp-convert)
|
4 |
[![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D%205.6-8892BF.svg?style=flat-square)](https://php.net)
|
5 |
-
[![Build Status](https://
|
6 |
-
[![Coverage Status](https://img.shields.io/
|
7 |
[![Quality Score](https://img.shields.io/scrutinizer/g/rosell-dk/webp-convert.svg?style=flat-square)](https://scrutinizer-ci.com/g/rosell-dk/webp-convert/)
|
8 |
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](https://github.com/rosell-dk/webp-convert/blob/master/LICENSE)
|
9 |
|
@@ -139,6 +139,12 @@ Bread on the table don't come for free, even though this library does, and alway
|
|
139 |
- Max Kreminsky ($65)
|
140 |
- Steven Sullivan ($51)
|
141 |
|
|
|
|
|
|
|
|
|
|
|
|
|
142 |
## New in 2.7.0:
|
143 |
- ImageMagick now supports the "near-lossless" option (provided Imagick >= 7.0.10-54) [#299](https://github.com/rosell-dk/webp-convert/issues/299)
|
144 |
- Added "try-common-system-paths" option for ImageMagick (default: true). So ImageMagick will now peek for "convert" in common system paths [#293](https://github.com/rosell-dk/webp-convert/issues/293)
|
2 |
|
3 |
[![Latest Stable Version](https://img.shields.io/packagist/v/rosell-dk/webp-convert.svg?style=flat-square)](https://packagist.org/packages/rosell-dk/webp-convert)
|
4 |
[![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D%205.6-8892BF.svg?style=flat-square)](https://php.net)
|
5 |
+
[![Build Status](https://img.shields.io/github/workflow/status/rosell-dk/webp-convert/PHP?logo=GitHub&style=flat-square)](https://github.com/rosell-dk/webp-convert/actions/workflows/php.yml)
|
6 |
+
[![Coverage Status](https://img.shields.io/scrutinizer/coverage/g/rosell-dk/webp-convert.svg?style=flat-square)](https://scrutinizer-ci.com/g/rosell-dk/webp-convert/code-structure/master)
|
7 |
[![Quality Score](https://img.shields.io/scrutinizer/g/rosell-dk/webp-convert.svg?style=flat-square)](https://scrutinizer-ci.com/g/rosell-dk/webp-convert/)
|
8 |
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](https://github.com/rosell-dk/webp-convert/blob/master/LICENSE)
|
9 |
|
139 |
- Max Kreminsky ($65)
|
140 |
- Steven Sullivan ($51)
|
141 |
|
142 |
+
## New in 2.8.0:
|
143 |
+
- Converter option definitions are now accessible along with suggested UI and helptexts. This allows one to auto-generate a frontend based on conversion options. The feature is already in use in the [webp-convert file manager](https://github.com/rosell-dk/webp-convert-filemanager), which is used in WebP Express. New method: `WebPConvert::getConverterOptionDefinitions()`
|
144 |
+
- The part of the log that displays the options are made more readable. It also now warns about deprecated options.
|
145 |
+
- Bumped image-mime-type guesser library to 0.4. This version is able to dectect more mime types by sniffing the first couple of bytes.
|
146 |
+
- And more (view closed issues [here](https://github.com/rosell-dk/webp-convert/milestone/23?closed=1)
|
147 |
+
|
148 |
## New in 2.7.0:
|
149 |
- ImageMagick now supports the "near-lossless" option (provided Imagick >= 7.0.10-54) [#299](https://github.com/rosell-dk/webp-convert/issues/299)
|
150 |
- Added "try-common-system-paths" option for ImageMagick (default: true). So ImageMagick will now peek for "convert" in common system paths [#293](https://github.com/rosell-dk/webp-convert/issues/293)
|
vendor/rosell-dk/webp-convert/composer.json
CHANGED
@@ -57,7 +57,7 @@
|
|
57 |
],
|
58 |
"require": {
|
59 |
"php": "^5.6 | ^7.0 | ^8.0",
|
60 |
-
"rosell-dk/image-mime-type-guesser": "^0.
|
61 |
},
|
62 |
"suggest": {
|
63 |
"ext-gd": "to use GD extension for converting. Note: Gd must be compiled with webp support",
|
57 |
],
|
58 |
"require": {
|
59 |
"php": "^5.6 | ^7.0 | ^8.0",
|
60 |
+
"rosell-dk/image-mime-type-guesser": "^0.4.0"
|
61 |
},
|
62 |
"suggest": {
|
63 |
"ext-gd": "to use GD extension for converting. Note: Gd must be compiled with webp support",
|
vendor/rosell-dk/webp-convert/docs/development.md
ADDED
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Development
|
2 |
+
|
3 |
+
## Setting up the environment.
|
4 |
+
|
5 |
+
First, clone the repository:
|
6 |
+
```
|
7 |
+
cd whatever/folder/you/want
|
8 |
+
git clone https://github.com/rosell-dk/webp-convert.git
|
9 |
+
```
|
10 |
+
|
11 |
+
Then install the dev tools with composer:
|
12 |
+
|
13 |
+
```
|
14 |
+
composer install
|
15 |
+
```
|
16 |
+
|
17 |
+
If you don't have composer yet:
|
18 |
+
- Get it ([download phar](https://getcomposer.org/composer.phar) and move it to /usr/local/bin/composer)
|
19 |
+
- PS: PHPUnit requires php-xml, php-mbstring and php-curl. To install: `sudo apt install php-xml php-mbstring curl php-curl`
|
20 |
+
|
21 |
+
|
22 |
+
## Unit Testing
|
23 |
+
To run all the unit tests do this:
|
24 |
+
```
|
25 |
+
composer test
|
26 |
+
```
|
27 |
+
This also runs tests on the builds.
|
28 |
+
|
29 |
+
|
30 |
+
Individual test files can be executed like this:
|
31 |
+
```
|
32 |
+
composer phpunit tests/Convert/Converters/WPCTest
|
33 |
+
composer phpunit tests/Serve/ServeConvertedTest
|
34 |
+
```
|
35 |
+
|
36 |
+
|
37 |
+
## Coding styles
|
38 |
+
WebPConvert complies with the [PSR-2](https://www.php-fig.org/psr/psr-2/) coding standard.
|
39 |
+
|
40 |
+
To validate coding style of all files, do this:
|
41 |
+
```
|
42 |
+
composer phpcs src
|
43 |
+
```
|
44 |
+
|
45 |
+
To automatically fix the coding style of all files, using [PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer), do this:
|
46 |
+
```
|
47 |
+
composer phpcbf src
|
48 |
+
```
|
49 |
+
|
50 |
+
Or, alternatively, you can fix with the use the [PHP-CS-FIXER](https://github.com/FriendsOfPHP/PHP-CS-Fixer) library instead:
|
51 |
+
```
|
52 |
+
composer cs-fix
|
53 |
+
```
|
54 |
+
|
55 |
+
## Running all tests in one command
|
56 |
+
The following script runs the unit tests, checks the coding styles, validates `composer.json` and runs the builds.
|
57 |
+
Run this before pushing anything to github. "ci" btw stands for *continuous integration*.
|
58 |
+
```
|
59 |
+
composer ci
|
60 |
+
```
|
61 |
+
|
62 |
+
## Generating api docs
|
63 |
+
Install phpdox and run it in the project root:
|
64 |
+
```
|
65 |
+
phpdox
|
66 |
+
```
|
67 |
+
|
68 |
+
## Committing
|
69 |
+
Before committing, first make sure to:
|
70 |
+
- run `composer ci`
|
71 |
+
|
72 |
+
## Releasing
|
73 |
+
Before releasing:
|
74 |
+
- Update the version number in `Converters/AbstractConverter.php` (search for "WebP Convert")
|
75 |
+
- Make sure that travis build is successful
|
76 |
+
|
77 |
+
When releasing:
|
78 |
+
- update the [webp-convert-concat](https://github.com/rosell-dk/webp-convert-concat) library
|
79 |
+
- consider updating the require in the composer file in libraries that uses webp-convert (ie `webp-convert-cloud-service` and `webp-express`)
|
vendor/rosell-dk/webp-convert/docs/v1.3/converting/convert-options.md
ADDED
@@ -0,0 +1,322 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# The webp converters
|
2 |
+
|
3 |
+
## The converters at a glance
|
4 |
+
When it comes to webp conversion, there is actually only one library in town: *libwebp* from Google. All conversion methods below ultimately uses that very same library for conversion. This means that it does not matter much, which conversion method you use. Whatever works. There is however one thing to take note of, if you set *quality* to *auto*, and your system cannot determine the quality of the source (this requires imagick or gmagick), and you do not have access to install those, then the only way to get quality-detection is to connect to a *wpc* cloud converter. However, with *cwebp*, you can specify the desired reduction (the *size-in-percentage* option) - at the cost of doubling the conversion time. Read more about those considerations in the API.
|
5 |
+
|
6 |
+
Speed-wise, there is too little difference for it to matter, considering that images usually needs to be converted just once. Anyway, here are the results: *cweb* is the fastest (with method=3). *gd* is right behind, merely 3% slower than *cwebp*. *gmagick* are third place, ~8% slower than *cwebp*. *imagick* comes in ~22% slower than *cwebp*. *ewww* depends on connection speed. On my *digital ocean* account, it takes ~2 seconds to upload, convert, and download a tiny image (10 times longer than the local *cwebp*). A 1MB image however only takes ~4.5 seconds to upload, convert and download (1.5 seconds longer). A 2 MB image takes ~5 seconds to convert (only 16% longer than my *cwebp*). The *ewww* thus converts at a very decent speeds. Probably faster than your average shared host. If multiple big images needs to be converted at the same time, *ewww* will probably perform much better than the local converters.
|
7 |
+
|
8 |
+
[`cwebp`](#cwebp) works by executing the *cwebp* binary from Google, which is build upon the *libwebp* (also from Google). That library is actually the only library in town for generating webp images, which means that the other conversion methods ultimately uses that very same library. Which again means that the results using the different methods are very similar. However, with *cwebp*, we have more parameters to tweak than with the rest. We for example have the *method* option, which controls the trade off between encoding speed and the compressed file size and quality. Setting this to max, we can squeeze the images a few percent extra - without loosing quality (the converter is still pretty fast, so in most cases it is probably worth it).
|
9 |
+
|
10 |
+
Of course, as we here have to call a binary directly, *cwebp* requires the *exec* function to be enabled, and that the webserver user is allowed to execute the `cwebp` binary (either at known system locations, or one of the precompiled binaries, that comes with this library).
|
11 |
+
|
12 |
+
[`vips`](#vips) (**new in 2.0**) works by using the vips extension, if available. Vips is great! It offers many webp options, it is fast and installation is easier than imagick and gd, as it does not need to be configured for webp support.
|
13 |
+
|
14 |
+
[`imagick`](#imagick) does not support any special webp options, but is at least able to strip all metadata, if metadata is set to none. Imagick has a very nice feature - that it is able to detect the quality of a jpeg file. This enables it to automatically use same quality for destination as for source, which eliminates the risk of setting quality higher for the destination than for source (the result of that is that the file size gets higher, but the quality remains the same). As the other converters lends this capability from Imagick, this is however no reason for using Imagick rather than the other converters. Requirements: Imagick PHP extension compiled with WebP support
|
15 |
+
|
16 |
+
[`gmagick`](#gmagick) uses the *gmagick* extension. It is very similar to *imagick*. Requirements: Gmagick PHP extension compiled with WebP support.
|
17 |
+
|
18 |
+
[`gd`](#gd) uses the *Gd* extension to do the conversion. The *Gd* extension is pretty common, so the main feature of this converter is that it may work out of the box. It does not support any webp options, and does not support stripping metadata. Requirements: GD PHP extension compiled with WebP support.
|
19 |
+
|
20 |
+
[`wpc`](#wpc) is an open source cloud service for converting images to webp. To use it, you must either install [webp-convert-cloud-service](https://github.com/rosell-dk/webp-convert-cloud-service) directly on a remote server, or install the Wordpress plugin, [WebP Express](https://github.com/rosell-dk/webp-express) in Wordpress. Btw: Beware that upload limits will prevent conversion of big images. The converter checks your *php.ini* settings and abandons upload right away, if an image is larger than your *upload_max_filesize* or your *post_max_size* setting. Requirements: Access to a running service. The service can be installed [directly](https://github.com/rosell-dk/webp-convert-cloud-service) or by using [this Wordpress plugin](https://wordpress.org/plugins/webp-express/)
|
21 |
+
|
22 |
+
[`ewww`](#ewww) is also a cloud service. Not free, but cheap enough to be considered *practically* free. It supports lossless encoding, but this cannot be controlled. *Ewww* always uses lossy encoding for jpeg and lossless for png. For jpegs this is usually a good choice, however, many pngs are compressed better using lossy encoding. As lossless cannot be controlled, the "lossless:auto" option cannot be used for automatically trying both lossy and lossless and picking the smallest file. Also, unfortunately, *ewww* does not support quality=auto, like *wpc*, and it does not support *size-in-percentage* like *cwebp*, either. I have requested such features, and he is considering... As with *wpc*, beware of upload limits. Requirements: A key to the *EWWW Image Optimizer* cloud service. Can be purchaced [here](https://ewww.io/plans/)
|
23 |
+
|
24 |
+
[`stack`](#stack) takes a stack of converters and tries it from the top, until success. The main convert method actually calls this converter. Stacks within stacks are supported (not really needed, though).
|
25 |
+
|
26 |
+
|
27 |
+
**Summary:**
|
28 |
+
|
29 |
+
| | cwebp | vips | imagick / gmagick | imagickbinary | gd | ewww |
|
30 |
+
| ------------------------------------------ | --------- | ------ | ----------------- | ------------- | --------- | ------ |
|
31 |
+
| supports lossless encoding ? | yes | yes | no | no | no | yes |
|
32 |
+
| supports lossless auto ? | yes | yes | no | no | no | no |
|
33 |
+
| supports near-lossless ? | yes | yes | no | no | no | ? |
|
34 |
+
| supports metadata stripping / preserving | yes | yes | yes | no | no | ? |
|
35 |
+
| supports setting alpha quality | no | yes | no | no | no | no |
|
36 |
+
| supports fixed quality (for lossy) | yes | yes | yes | yes | yes | yes |
|
37 |
+
| supports auto quality without help | no | no | yes | yes | no | no |
|
38 |
+
|
39 |
+
|
40 |
+
|
41 |
+
*WebPConvert* currently supports the following converters:
|
42 |
+
|
43 |
+
| Converter | Method | Requirements |
|
44 |
+
| ------------------------------------ | ------------------------------------------------ | -------------------------------------------------- |
|
45 |
+
| [`cwebp`](#cwebp) | Calls `cwebp` binary directly | `exec()` function *and* that the webserver user has permission to run `cwebp` binary |
|
46 |
+
| [`vips`](#vips) (new in 2.0) | Vips extension | Vips extension |
|
47 |
+
| [`imagick`](#imagick) | Imagick extension (`ImageMagick` wrapper) | Imagick PHP extension compiled with WebP support |
|
48 |
+
| [`gmagick`](#gmagick) | Gmagick extension (`ImageMagick` wrapper) | Gmagick PHP extension compiled with WebP support |
|
49 |
+
| [`gd`](#gd) | GD Graphics (Draw) extension (`LibGD` wrapper) | GD PHP extension compiled with WebP support |
|
50 |
+
| [`imagickbinary`](#imagickbinary) | Calls imagick binary directly | exec() and imagick installed and compiled with WebP support |
|
51 |
+
| [`wpc`](#wpc) | Connects to an open source cloud service | Access to a running service. The service can be installed [directly](https://github.com/rosell-dk/webp-convert-cloud-service) or by using [this Wordpress plugin](https://wordpress.org/plugins/webp-express/).
|
52 |
+
| [`ewww`](#ewww) | Connects to *EWWW Image Optimizer* cloud service | Purchasing a key |
|
53 |
+
|
54 |
+
## Installation
|
55 |
+
Instructions regarding getting the individual converters to work are [on the wiki](https://github.com/rosell-dk/webp-convert/wiki)
|
56 |
+
|
57 |
+
## cwebp
|
58 |
+
<table>
|
59 |
+
<tr><th>Requirements</th><td><code>exec()</code> function and that the webserver has permission to run `cwebp` binary (either found in system path, or a precompiled version supplied with this library)</td></tr>
|
60 |
+
<tr><th>Performance</th><td>~40-120ms to convert a 40kb image (depending on *method* option)</td></tr>
|
61 |
+
<tr><th>Reliability</th><td>No problems detected so far!</td></tr>
|
62 |
+
<tr><th>Availability</th><td>According to ewww docs, requirements are met on surprisingly many webhosts. Look <a href="https://docs.ewww.io/article/43-supported-web-hosts">here</a> for a list</td></tr>
|
63 |
+
<tr><th>General options supported</th><td>All (`quality`, `metadata`, `lossless`)</td></tr>
|
64 |
+
<tr><th>Extra options</th><td>`method` (0-6)<br>`use-nice` (boolean)<br>`try-common-system-paths` (boolean)<br> `try-supplied-binary-for-os` (boolean)<br>`autofilter` (boolean)<br>`size-in-percentage` (number / null)<br>`command-line-options` (string)<br>`low-memory` (boolean)</td></tr>
|
65 |
+
</table>
|
66 |
+
|
67 |
+
[cwebp](https://developers.google.com/speed/webp/docs/cwebp) is a WebP conversion command line converter released by Google. Our implementation ships with precompiled binaries for Linux, FreeBSD, WinNT, Darwin and SunOS. If however a cwebp binary is found in a usual location, that binary will be preferred. It is executed with [exec()](http://php.net/manual/en/function.exec.php).
|
68 |
+
|
69 |
+
In more detail, the implementation does this:
|
70 |
+
- It is tested whether cwebp is available in a common system path (eg `/usr/bin/cwebp`, ..)
|
71 |
+
- If not, then supplied binary is selected from `Converters/Binaries` (according to OS) - after validating checksum
|
72 |
+
- Command-line options are generated from the options
|
73 |
+
- If [`nice`]( https://en.wikipedia.org/wiki/Nice_(Unix)) command is found on host, binary is executed with low priority in order to save system resources
|
74 |
+
- Permissions of the generated file are set to be the same as parent folder
|
75 |
+
|
76 |
+
### Cwebp options
|
77 |
+
|
78 |
+
The following options are supported, besides the general options (such as quality, lossless etc):
|
79 |
+
|
80 |
+
| Option | Type | Default |
|
81 |
+
| -------------------------- | ------------------------- | -------------------------- |
|
82 |
+
| autofilter | boolean | false |
|
83 |
+
| command-line-options | string | '' |
|
84 |
+
| low-memory | boolean | false |
|
85 |
+
| method | integer (0-6) | 6 |
|
86 |
+
| near-lossless | integer (0-100) | 60 |
|
87 |
+
| size-in-percentage | integer (0-100) (or null) | null |
|
88 |
+
| rel-path-to-precompiled-binaries | string | './Binaries' |
|
89 |
+
| size-in-percentage | number (or null) | is_null |
|
90 |
+
| try-common-system-paths | boolean | true |
|
91 |
+
| try-supplied-binary-for-os | boolean | true |
|
92 |
+
| use-nice | boolean | false |
|
93 |
+
|
94 |
+
Descriptions (only of some of the options):
|
95 |
+
|
96 |
+
#### the `autofilter` option
|
97 |
+
Turns auto-filter on. This algorithm will spend additional time optimizing the filtering strength to reach a well-balanced quality. Unfortunately, it is extremely expensive in terms of computation. It takes about 5-10 times longer to do a conversion. A 1MB picture which perhaps typically takes about 2 seconds to convert, will takes about 15 seconds to convert with auto-filter. So in most cases, you will want to leave this at its default, which is off.
|
98 |
+
|
99 |
+
#### the `command-line-options` option
|
100 |
+
This allows you to set any parameter available for cwebp in the same way as you would do when executing *cwebp*. You could ie set it to "-sharpness 5 -mt -crop 10 10 40 40". Read more about all the available parameters in [the docs](https://developers.google.com/speed/webp/docs/cwebp)
|
101 |
+
|
102 |
+
#### the `low-memory` option
|
103 |
+
Reduce memory usage of lossy encoding at the cost of ~30% longer encoding time and marginally larger output size. Default: `false`. Read more in [the docs](https://developers.google.com/speed/webp/docs/cwebp). Default: *false*
|
104 |
+
|
105 |
+
#### The `method` option
|
106 |
+
This parameter controls the trade off between encoding speed and the compressed file size and quality. Possible values range from 0 to 6. 0 is fastest. 6 results in best quality.
|
107 |
+
|
108 |
+
#### the `near-lossless` option
|
109 |
+
Specify the level of near-lossless image preprocessing. This option adjusts pixel values to help compressibility, but has minimal impact on the visual quality. It triggers lossless compression mode automatically. The range is 0 (maximum preprocessing) to 100 (no preprocessing). The typical value is around 60. Read more [here](https://groups.google.com/a/webmproject.org/forum/#!topic/webp-discuss/0GmxDmlexek). Default: 60
|
110 |
+
|
111 |
+
#### The `size-in-percentage` option
|
112 |
+
This option sets the file size, *cwebp* should aim for, in percentage of the original. If you for example set it to *45*, and the source file is 100 kb, *cwebp* will try to create a file with size 45 kb (we use the `-size` option). This is an excellent alternative to the "quality:auto" option. If the quality detection isn't working on your system (and you do not have the rights to install imagick or gmagick), you should consider using this options instead. *Cwebp* is generally able to create webp files with the same quality at about 45% the size. So *45* would be a good choice. The option overrides the quality option. And note that it slows down the conversion - it takes about 2.5 times longer to do a conversion this way, than when quality is specified. Default is *off* (null)
|
113 |
+
|
114 |
+
|
115 |
+
#### final words on cwebp
|
116 |
+
The implementation is based on the work of Shane Bishop for his plugin, [EWWW Image Optimizer](https://ewww.io). Thanks for letting us do that!
|
117 |
+
|
118 |
+
See [the wiki](https://github.com/rosell-dk/webp-convert/wiki/Installing-cwebp---using-official-precompilations) for instructions regarding installing cwebp or using official precompilations.
|
119 |
+
|
120 |
+
## vips
|
121 |
+
<table>
|
122 |
+
<tr><th>Requirements</th><td>Vips extension</td></tr>
|
123 |
+
<tr><th>Performance</th><td>Great</td></tr>
|
124 |
+
<tr><th>Reliability</th><td>No problems detected so far!</td></tr>
|
125 |
+
<tr><th>Availability</th><td>Not that widespread yet, but gaining popularity</td></tr>
|
126 |
+
<tr><th>General options supported</th><td>All (`quality`, `metadata`, `lossless`)</td></tr>
|
127 |
+
<tr><th>Extra options</th><td>`smart-subsample`(boolean)<br>`alpha-quality`(0-100)<br>`near-lossless` (0-100)<br> `preset` (0-6)</td></tr>
|
128 |
+
</table>
|
129 |
+
|
130 |
+
For installation instructions, go [here](https://github.com/libvips/php-vips-ext).
|
131 |
+
|
132 |
+
The options are described [here](https://jcupitt.github.io/libvips/API/current/VipsForeignSave.html#vips-webpsave)
|
133 |
+
|
134 |
+
*near-lossless* is however an integer (0-100), in order to have the option behave like in cwebp.
|
135 |
+
|
136 |
+
|
137 |
+
|
138 |
+
## wpc
|
139 |
+
*WebPConvert Cloud Service*
|
140 |
+
|
141 |
+
<table>
|
142 |
+
<tr><th>Requirements</th><td>Access to a server with [webp-convert-cloud-service](https://github.com/rosell-dk/webp-convert-cloud-service) installed, <code>cURL</code> and PHP >= 5.5.0</td></tr>
|
143 |
+
<tr><th>Performance</th><td>Depends on the server where [webp-convert-cloud-service](https://github.com/rosell-dk/webp-convert-cloud-service) is set up, and the speed of internet connections. But perhaps ~1000ms to convert a 40kb image</td></tr>
|
144 |
+
<tr><th>Reliability</th><td>Great (depends on the reliability on the server where it is set up)</td></tr>
|
145 |
+
<tr><th>Availability</th><td>Should work on <em>almost</em> any webhost</td></tr>
|
146 |
+
<tr><th>General options supported</th><td>All (`quality`, `metadata`, `lossless`)</td></tr>
|
147 |
+
<tr><th>Extra options (old api)</th><td>`url`, `secret`</td></tr>
|
148 |
+
<tr><th>Extra options (new api)</th><td>`url`, `api-version`, `api-key`, `crypt-api-key-in-transfer`</td></tr>
|
149 |
+
</table>
|
150 |
+
|
151 |
+
[wpc](https://github.com/rosell-dk/webp-convert-cloud-service) is an open source cloud service. You do not buy a key, you set it up on a server, or you set up [the Wordpress plugin](https://wordpress.org/plugins/webp-express/). As WebPConvert Cloud Service itself is based on WebPConvert, all options are supported.
|
152 |
+
|
153 |
+
To use it, you need to set the `converter-options` (to add url etc).
|
154 |
+
|
155 |
+
#### Example, where api-key is not crypted, on new API:
|
156 |
+
|
157 |
+
```php
|
158 |
+
WebPConvert::convert($source, $destination, [
|
159 |
+
'max-quality' => 80,
|
160 |
+
'converters' => ['cwebp', 'wpc'],
|
161 |
+
'converter-options' => [
|
162 |
+
'wpc' => [
|
163 |
+
'api-version' => 1, /* from wpc release 1.0.0 */
|
164 |
+
'url' => 'http://example.com/wpc.php',
|
165 |
+
'api-key' => 'my dog is white',
|
166 |
+
'crypt-api-key-in-transfer' => false
|
167 |
+
]
|
168 |
+
]
|
169 |
+
));
|
170 |
+
```
|
171 |
+
|
172 |
+
#### Example, where api-key is crypted:
|
173 |
+
|
174 |
+
```php
|
175 |
+
|
176 |
+
WebPConvert::convert($source, $destination, [
|
177 |
+
'max-quality' => 80,
|
178 |
+
'converters' => ['cwebp', 'wpc'],
|
179 |
+
'converter-options' => [
|
180 |
+
'wpc' => [
|
181 |
+
'api-version' => 1,
|
182 |
+
'url' => 'https://example.com/wpc.php',
|
183 |
+
'api-key' => 'my dog is white',
|
184 |
+
'crypt-api-key-in-transfer' => true
|
185 |
+
],
|
186 |
+
]
|
187 |
+
));
|
188 |
+
```
|
189 |
+
|
190 |
+
In 2.0, you can alternatively set the api key and urls through through the *WPC_API_KEY* and *WPC_API_URL* environment variables. This is a safer place to store it.
|
191 |
+
|
192 |
+
To set an environment variable in Apache, you can use the `SetEnv` directory. Ie, place something like the following in your virtual host / or .htaccess file (replace the key with the one you purchased!)
|
193 |
+
|
194 |
+
```
|
195 |
+
SetEnv WPC_API_KEY my-dog-is-dashed
|
196 |
+
SetEnv WPC_API_URL https://wpc.example.com/wpc.php
|
197 |
+
```
|
198 |
+
|
199 |
+
|
200 |
+
#### Example, old API:
|
201 |
+
|
202 |
+
```php
|
203 |
+
WebPConvert::convert($source, $destination, [
|
204 |
+
'max-quality' => 80,
|
205 |
+
'converters' => ['cwebp', 'wpc'],
|
206 |
+
'converter-options' => [
|
207 |
+
'wpc' => [
|
208 |
+
'url' => 'https://example.com/wpc.php',
|
209 |
+
'secret' => 'my dog is white',
|
210 |
+
],
|
211 |
+
]
|
212 |
+
));
|
213 |
+
```
|
214 |
+
|
215 |
+
|
216 |
+
## ewww
|
217 |
+
|
218 |
+
<table>
|
219 |
+
<tr><th>Requirements</th><td>Valid EWWW Image Optimizer <a href="https://ewww.io/plans/">API key</a>, <code>cURL</code> and PHP >= 5.5.0</td></tr>
|
220 |
+
<tr><th>Performance</th><td>~1300ms to convert a 40kb image</td></tr>
|
221 |
+
<tr><th>Reliability</th><td>Great (but, as with any cloud service, there is a risk of downtime)</td></tr>
|
222 |
+
<tr><th>Availability</th><td>Should work on <em>almost</em> any webhost</td></tr>
|
223 |
+
<tr><th>General options supported</th><td>`quality`, `metadata` (partly)</td></tr>
|
224 |
+
<tr><th>Extra options</th><td>`key`</td></tr>
|
225 |
+
</table>
|
226 |
+
|
227 |
+
EWWW Image Optimizer is a very cheap cloud service for optimizing images. After purchasing an API key, add the converter in the `extra-converters` option, with `key` set to the key. Be aware that the `key` should be stored safely to avoid exploitation - preferably in the environment, ie with [dotenv](https://github.com/vlucas/phpdotenv).
|
228 |
+
|
229 |
+
The EWWW api doesn't support the `lossless` option, but it does automatically convert PNG's losslessly. Metadata is either all or none. If you have set it to something else than one of these, all metadata will be preserved.
|
230 |
+
|
231 |
+
In more detail, the implementation does this:
|
232 |
+
- Validates that there is a key, and that `curl` extension is working
|
233 |
+
- Validates the key, using the [/verify/ endpoint](https://ewww.io/api/) (in order to [protect the EWWW service from unnecessary file uploads, when key has expired](https://github.com/rosell-dk/webp-convert/issues/38))
|
234 |
+
- Converts, using the [/ endpoint](https://ewww.io/api/).
|
235 |
+
|
236 |
+
<details>
|
237 |
+
<summary><strong>Roadmap</strong> 👁</summary>
|
238 |
+
|
239 |
+
The converter could be improved by using `fsockopen` when `cURL` is not available - which is extremely rare. PHP >= 5.5.0 is also widely available (PHP 5.4.0 reached end of life [more than two years ago!](http://php.net/supported-versions.php)).
|
240 |
+
</details>
|
241 |
+
|
242 |
+
#### Example:
|
243 |
+
|
244 |
+
```php
|
245 |
+
WebPConvert::convert($source, $destination, [
|
246 |
+
'max-quality' => 80,
|
247 |
+
'converters' => ['gd', 'ewww'],
|
248 |
+
'converter-options' => [
|
249 |
+
'ewww' => [
|
250 |
+
'key' => 'your-api-key-here'
|
251 |
+
],
|
252 |
+
]
|
253 |
+
));
|
254 |
+
```
|
255 |
+
In 2.0, you can alternatively set the api key by through the *EWWW_API_KEY* environment variable. This is a safer place to store it.
|
256 |
+
|
257 |
+
To set an environment variable in Apache, you can use the `SetEnv` directory. Ie, place something like the following in your virtual host / or .htaccess file (replace the key with the one you purchased!)
|
258 |
+
|
259 |
+
```
|
260 |
+
SetEnv EWWW_API_KEY sP3LyPpsKWZy8CVBTYegzEGN6VsKKKKA
|
261 |
+
```
|
262 |
+
|
263 |
+
## gd
|
264 |
+
|
265 |
+
<table>
|
266 |
+
<tr><th>Requirements</th><td>GD PHP extension and PHP >= 5.5.0 (compiled with WebP support)</td></tr>
|
267 |
+
<tr><th>Performance</th><td>~30ms to convert a 40kb image</td></tr>
|
268 |
+
<tr><th>Reliability</th><td>Not sure - I have experienced corrupted images, but cannot reproduce</td></tr>
|
269 |
+
<tr><th>Availability</th><td>Unfortunately, according to <a href="https://stackoverflow.com/questions/25248382/how-to-create-a-webp-image-in-php">this link</a>, WebP support on shared hosts is rare.</td></tr>
|
270 |
+
<tr><th>General options supported</th><td>`quality`</td></tr>
|
271 |
+
<tr><th>Extra options</th><td>`skip-pngs`</td></tr>
|
272 |
+
</table>
|
273 |
+
|
274 |
+
[imagewebp](http://php.net/manual/en/function.imagewebp.php) is a function that comes with PHP (>5.5.0), *provided* that PHP has been compiled with WebP support.
|
275 |
+
|
276 |
+
`gd` neither supports copying metadata nor exposes any WebP options. Lacking the option to set lossless encoding results in poor encoding of PNGs - the filesize is generally much larger than the original. For this reason, PNG conversion is *disabled* by default, but it can be enabled my setting `skip-pngs` option to `false`.
|
277 |
+
|
278 |
+
Installaition instructions are [available in the wiki](https://github.com/rosell-dk/webp-convert/wiki/Installing-Gd-extension).
|
279 |
+
|
280 |
+
<details>
|
281 |
+
<summary><strong>Known bugs</strong> 👁</summary>
|
282 |
+
Due to a [bug](https://bugs.php.net/bug.php?id=66590), some versions sometimes created corrupted images. That bug can however easily be fixed in PHP (fix was released [here](https://stackoverflow.com/questions/30078090/imagewebp-php-creates-corrupted-webp-files)). However, I have experienced corrupted images *anyway* (but cannot reproduce that bug). So use this converter with caution. The corrupted images look completely transparent in Google Chrome, but have the correct size.
|
283 |
+
</details>
|
284 |
+
|
285 |
+
## imagick
|
286 |
+
|
287 |
+
<table>
|
288 |
+
<tr><th>Requirements</th><td>Imagick PHP extension (compiled with WebP support)</td></tr>
|
289 |
+
<tr><th>Quality</th><td>Poor. [See this issue]( https://github.com/rosell-dk/webp-convert/issues/43)</td></tr>
|
290 |
+
<tr><th>General options supported</th><td>`quality`</td></tr>
|
291 |
+
<tr><th>Extra options</th><td>None</td></tr>
|
292 |
+
<tr><th>Performance</th><td>~20-320ms to convert a 40kb image</td></tr>
|
293 |
+
<tr><th>Reliability</th><td>No problems detected so far</td></tr>
|
294 |
+
<tr><th>Availability</th><td>Probably only available on few shared hosts (if any)</td></tr>
|
295 |
+
</table>
|
296 |
+
|
297 |
+
WebP conversion with `imagick` is fast and [exposes many WebP options](http://www.imagemagick.org/script/webp.php). Unfortunately, WebP support for the `imagick` extension is pretty uncommon. At least not on the systems I have tried (Ubuntu 16.04 and Ubuntu 17.04). But if installed, it works great and has several WebP options.
|
298 |
+
|
299 |
+
See [this page](https://github.com/rosell-dk/webp-convert/wiki/Installing-Imagick-extension) in the Wiki for instructions on installing the extension.
|
300 |
+
|
301 |
+
## imagickbinary
|
302 |
+
<table>
|
303 |
+
<tr><th>Requirements</th><td><code>exec()</code> function and that imagick is installed on webserver, compiled with webp support</td></tr>
|
304 |
+
<tr><th>Performance</th><td>just fine</td></tr>
|
305 |
+
<tr><th>Reliability</th><td>No problems detected so far!</td></tr>
|
306 |
+
<tr><th>Availability</th><td>Not sure</td></tr>
|
307 |
+
<tr><th>General options supported</th><td>`quality`</td></tr>
|
308 |
+
<tr><th>Extra options</th><td>`use-nice` (boolean)</td></tr>
|
309 |
+
</table>
|
310 |
+
|
311 |
+
This converter tryes to execute `convert source.jpg webp:destination.jpg.webp`.
|
312 |
+
|
313 |
+
## stack
|
314 |
+
|
315 |
+
<table>
|
316 |
+
<tr><th>General options supported</th><td>all (passed to the converters in the stack )</td></tr>
|
317 |
+
<tr><th>Extra options</th><td>`converters` (array) and `converter-options` (array)</td></tr>
|
318 |
+
</table>
|
319 |
+
|
320 |
+
Stack implements the functionality you know from `WebPConvert::convert`. In fact, all `WebPConvert::convert` does is to call `Stack::convert($source, $destination, $options, $logger);`
|
321 |
+
|
322 |
+
It has two special options: `converters` and `converter-options`. You can read about those in `docs/api/convert.md`
|
vendor/rosell-dk/webp-convert/docs/v1.3/converting/convert.md
ADDED
@@ -0,0 +1,96 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# API: The convert() method
|
2 |
+
|
3 |
+
**WebPConvert::convert($source, $destination, $options, $logger)**
|
4 |
+
|
5 |
+
| Parameter | Type | Description |
|
6 |
+
| ---------------- | ------- | ------------------------------------------------------------------------------------------ |
|
7 |
+
| `$source` | String | Absolute path to source image (only forward slashes allowed) |
|
8 |
+
| `$destination` | String | Absolute path to converted image (only forward slashes allowed) |
|
9 |
+
| `$options` (optional) | Array | Array of conversion (option) options |
|
10 |
+
| `$logger` (optional) | Baselogger | Information about the conversion process will be passed to this object. Read more below |
|
11 |
+
|
12 |
+
Returns true if success or false if no converters are *operational*. If any converter seems to have its requirements met (are *operational*), but fails anyway, and no other converters in the stack could convert the image, an the exception from that converter is rethrown (either *ConverterFailedException* or *ConversionDeclinedException*). Exceptions are also thrown if something is wrong entirely (*InvalidFileExtensionException*, *TargetNotFoundException*, *ConverterNotFoundException*, *CreateDestinationFileException*, *CreateDestinationFolderException*, or any unanticipated exceptions thrown by the converters).
|
13 |
+
|
14 |
+
### Available options for all converters
|
15 |
+
|
16 |
+
Many options correspond to options of *cwebp*. These are documented [here](https://developers.google.com/speed/webp/docs/cwebp)
|
17 |
+
|
18 |
+
|
19 |
+
| Option | Type | Default | Description |
|
20 |
+
| ----------------- | ------- | -------------------------- | -------------------------------------------------------------------- |
|
21 |
+
| quality | An integer between 0-100, or "auto" | "auto" | Lossy quality of converted image (JPEG only - PNGs are always losless).<br><br> If set to "auto", *WebPConvert* will try to determine the quality of the JPEG (this is only possible, if Imagick or GraphicsMagic is installed). If successfully determined, the quality of the webp will be set to the same as that of the JPEG. however not to more than specified in the new `max-quality` option. If quality cannot be determined, quality will be set to what is specified in the new `default-quality` option (however, if you use the *wpc* converter, it will also get a shot at detecting the quality) |
|
22 |
+
| max-quality | An integer between 0-100 | 85 | See the `quality` option. Only relevant, when quality is set to "auto".
|
23 |
+
| default-quality | An integer between 0-100 | 75 | See the `quality` option. Only relevant, when quality is set to "auto".
|
24 |
+
| metadata | String | 'none' | Valid values: all, none, exif, icc, xmp. Note: Only *cwebp* supports all values. *gd* will always remove all metadata. *ewww*, *imagick* and *gmagick* can either strip all, or keep all (they will keep all, unless metadata is set to *none*) |
|
25 |
+
| lossless | Boolean | false ("auto" for pngs in 2.0) | Encode the image without any loss. The option is ignored for PNG's (forced true). In 2.0, it can also be "auto", and it is not forced to anything - rather it deafaults to false for Jpegs and "auto" for PNGs |
|
26 |
+
| converters | Array | ['cwebp', 'gd', 'imagick'] | Specify conversion methods to use, and their order. Also optionally set converter options (see below) |
|
27 |
+
| converter-options | Array | [] | Set options of the individual converters (see below) |
|
28 |
+
| jpeg | Array | null | These options will be merged into the other options when source is jpeg |
|
29 |
+
| png | Array | null | These options will be merged into the other options when source is jpeg |
|
30 |
+
| skip (new in 2.0) | Boolean | false | If true, conversion will be skipped (ie for skipping png conversion for some converters) |
|
31 |
+
| skip-png (removed in 2.0) | Boolean | false | If true, conversion will be skipped for png (ie for skipping png conversion for some converters) |
|
32 |
+
|
33 |
+
#### More on quality=auto
|
34 |
+
Unfortunately, *libwebp* does not provide a way to use the same quality for the converted image, as for source. This feature is implemented by *imagick* and *gmagick*. No matter which conversion method you choose, if you set *quality* to *auto*, our library will try to detect the quality of the source file using one of these libraries. If this isn't available, it will revert to the value set in the *default-quality* option (75 per default). *However*, with the *wpc* converter you have a second chance: If quality cannot be detected locally, it will send quality="auto" to *wpc*.
|
35 |
+
|
36 |
+
The bottom line is: If you do not have imagick or gmagick installed on your host (and have no way to install it), your best option quality-wise is to install *wpc* on a server that you do have access to, and connect to that. However,... read on:
|
37 |
+
|
38 |
+
**How much does it matter?**
|
39 |
+
The effect of not having quality detection is that jpeg images with medium quality (say 50) will be converted with higher quality (say 75). Converting a q=50 to a q=50 would typically result in a ~60% reduction. But converting it to q=75 will only result in a ~45% reduction. When converting low quality jpeg images, it gets worse. Converting q=30 to q=75 only achieves ~25% reduction.
|
40 |
+
|
41 |
+
I guess it is a rare case having jpeg images in low quality. Even having middle quality is rare, as there seems to have been a tendency to choose higher quality than actually needed for web. So, in many cases, the impact of not having quality detection is minor. If you set the *default-quality* a bit low, ie 65, you will further minimize the effect.
|
42 |
+
|
43 |
+
To determine if *webp-convert* is able to autodetect quality on your system, run a conversion with the *$logger* parameter set to `new EchoLogger()` (see api).
|
44 |
+
|
45 |
+
#### More on the `converter-options` option
|
46 |
+
You use this option to set options for the individual converters. Example:
|
47 |
+
|
48 |
+
```
|
49 |
+
'converter-options' => [
|
50 |
+
'ewww' => [
|
51 |
+
'key' => 'your-api-key-here'
|
52 |
+
],
|
53 |
+
'wpc' => [
|
54 |
+
'url' => 'https://example.com/wpc.php',
|
55 |
+
'secret' => 'my dog is white'
|
56 |
+
]
|
57 |
+
]
|
58 |
+
```
|
59 |
+
Besides options that are special to a converter, you can also override general options. For example, you may generally want the `max-quality` to be 85, but for a single converter, you would like it to be 100 (sorry, it is hard to come up with a useful example).
|
60 |
+
|
61 |
+
#### More on the `converters` option
|
62 |
+
The *converters* option specifies the conversion methods to use and their order. But it can also be used as an alternative way of setting converter options. Usually, you probably want to use the *converter-options* for that, but there may be cases where it is more convenient to specify them here. Also, specifying here allows you to put the same converter method to the stack multiple times, with different options (this could for example be used to have an extra *ewww* converter as a fallback).
|
63 |
+
|
64 |
+
Example:
|
65 |
+
```
|
66 |
+
WebPConvert::convert($source, $destination, [
|
67 |
+
'converters' => [
|
68 |
+
'cwebp',
|
69 |
+
'imagick',
|
70 |
+
[
|
71 |
+
'converter' => 'ewww',
|
72 |
+
'options' => [
|
73 |
+
'key' => 'your api key here',
|
74 |
+
],
|
75 |
+
],
|
76 |
+
];
|
77 |
+
)
|
78 |
+
```
|
79 |
+
In 2.0, it will be possible to use your own custom converter. Instead of the "converter id" (ie "ewww"), specify the full class name of your custom converter. Ie '\\MyProject\\BraveConverter'. The converter must extend `\WebPConvert\Convert\Converters\AbstractConverters\AbstractConverter` and you must implement `doConvert()` and the define the extra options it takes (check out how it is done in the build-in converters).
|
80 |
+
|
81 |
+
### More on the `$logger` parameter
|
82 |
+
WebPConvert and the individual converters can provide information regarding the conversion process. Per default (when the parameter isn't provided), they write this to `\WebPConvert\Loggers\VoidLogger`, which does nothing with it.
|
83 |
+
In order to get this information echoed out, you can use `\WebPConvert\Loggers\EchoLogger` - like this:
|
84 |
+
|
85 |
+
```php
|
86 |
+
use WebPConvert\Loggers\EchoLogger;
|
87 |
+
|
88 |
+
WebPConvert::convert($source, $destination, $options, new EchoLogger());
|
89 |
+
```
|
90 |
+
|
91 |
+
In order to do something else with the information (perhaps write it to a log file?), you can extend `\WebPConvert\Loggers\BaseLogger`.
|
92 |
+
|
93 |
+
## Converters
|
94 |
+
In the most basic design, a converter consists of a static convert function which takes the same arguments as `WebPConvert::convert`. Its job is then to convert `$source` to WebP and save it at `$destination`, preferably taking the options specified in $options into account.
|
95 |
+
|
96 |
+
The converters may be called directly. But you probably don't want to do that, as it really doesn't hurt having other converters ready to take over, in case your preferred converter should fail.
|
vendor/rosell-dk/webp-convert/docs/v1.3/converting/converters.md
ADDED
@@ -0,0 +1,322 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# The webp converters
|
2 |
+
|
3 |
+
## The converters at a glance
|
4 |
+
When it comes to webp conversion, there is actually only one library in town: *libwebp* from Google. All conversion methods below ultimately uses that very same library for conversion. This means that it does not matter much, which conversion method you use. Whatever works. There is however one thing to take note of, if you set *quality* to *auto*, and your system cannot determine the quality of the source (this requires imagick or gmagick), and you do not have access to install those, then the only way to get quality-detection is to connect to a *wpc* cloud converter. However, with *cwebp*, you can specify the desired reduction (the *size-in-percentage* option) - at the cost of doubling the conversion time. Read more about those considerations in the API.
|
5 |
+
|
6 |
+
Speed-wise, there is too little difference for it to matter, considering that images usually needs to be converted just once. Anyway, here are the results: *cweb* is the fastest (with method=3). *gd* is right behind, merely 3% slower than *cwebp*. *gmagick* are third place, ~8% slower than *cwebp*. *imagick* comes in ~22% slower than *cwebp*. *ewww* depends on connection speed. On my *digital ocean* account, it takes ~2 seconds to upload, convert, and download a tiny image (10 times longer than the local *cwebp*). A 1MB image however only takes ~4.5 seconds to upload, convert and download (1.5 seconds longer). A 2 MB image takes ~5 seconds to convert (only 16% longer than my *cwebp*). The *ewww* thus converts at a very decent speeds. Probably faster than your average shared host. If multiple big images needs to be converted at the same time, *ewww* will probably perform much better than the local converters.
|
7 |
+
|
8 |
+
[`cwebp`](#cwebp) works by executing the *cwebp* binary from Google, which is build upon the *libwebp* (also from Google). That library is actually the only library in town for generating webp images, which means that the other conversion methods ultimately uses that very same library. Which again means that the results using the different methods are very similar. However, with *cwebp*, we have more parameters to tweak than with the rest. We for example have the *method* option, which controls the trade off between encoding speed and the compressed file size and quality. Setting this to max, we can squeeze the images a few percent extra - without loosing quality (the converter is still pretty fast, so in most cases it is probably worth it).
|
9 |
+
|
10 |
+
Of course, as we here have to call a binary directly, *cwebp* requires the *exec* function to be enabled, and that the webserver user is allowed to execute the `cwebp` binary (either at known system locations, or one of the precompiled binaries, that comes with this library).
|
11 |
+
|
12 |
+
[`vips`](#vips) (**new in 2.0**) works by using the vips extension, if available. Vips is great! It offers many webp options, it is fast and installation is easier than imagick and gd, as it does not need to be configured for webp support.
|
13 |
+
|
14 |
+
[`imagick`](#imagick) does not support any special webp options, but is at least able to strip all metadata, if metadata is set to none. Imagick has a very nice feature - that it is able to detect the quality of a jpeg file. This enables it to automatically use same quality for destination as for source, which eliminates the risk of setting quality higher for the destination than for source (the result of that is that the file size gets higher, but the quality remains the same). As the other converters lends this capability from Imagick, this is however no reason for using Imagick rather than the other converters. Requirements: Imagick PHP extension compiled with WebP support
|
15 |
+
|
16 |
+
[`gmagick`](#gmagick) uses the *gmagick* extension. It is very similar to *imagick*. Requirements: Gmagick PHP extension compiled with WebP support.
|
17 |
+
|
18 |
+
[`gd`](#gd) uses the *Gd* extension to do the conversion. The *Gd* extension is pretty common, so the main feature of this converter is that it may work out of the box. It does not support any webp options, and does not support stripping metadata. Requirements: GD PHP extension compiled with WebP support.
|
19 |
+
|
20 |
+
[`wpc`](#wpc) is an open source cloud service for converting images to webp. To use it, you must either install [webp-convert-cloud-service](https://github.com/rosell-dk/webp-convert-cloud-service) directly on a remote server, or install the Wordpress plugin, [WebP Express](https://github.com/rosell-dk/webp-express) in Wordpress. Btw: Beware that upload limits will prevent conversion of big images. The converter checks your *php.ini* settings and abandons upload right away, if an image is larger than your *upload_max_filesize* or your *post_max_size* setting. Requirements: Access to a running service. The service can be installed [directly](https://github.com/rosell-dk/webp-convert-cloud-service) or by using [this Wordpress plugin](https://wordpress.org/plugins/webp-express/)
|
21 |
+
|
22 |
+
[`ewww`](#ewww) is also a cloud service. Not free, but cheap enough to be considered *practically* free. It supports lossless encoding, but this cannot be controlled. *Ewww* always uses lossy encoding for jpeg and lossless for png. For jpegs this is usually a good choice, however, many pngs are compressed better using lossy encoding. As lossless cannot be controlled, the "lossless:auto" option cannot be used for automatically trying both lossy and lossless and picking the smallest file. Also, unfortunately, *ewww* does not support quality=auto, like *wpc*, and it does not support *size-in-percentage* like *cwebp*, either. I have requested such features, and he is considering... As with *wpc*, beware of upload limits. Requirements: A key to the *EWWW Image Optimizer* cloud service. Can be purchaced [here](https://ewww.io/plans/)
|
23 |
+
|
24 |
+
[`stack`](#stack) takes a stack of converters and tries it from the top, until success. The main convert method actually calls this converter. Stacks within stacks are supported (not really needed, though).
|
25 |
+
|
26 |
+
|
27 |
+
**Summary:**
|
28 |
+
|
29 |
+
| | cwebp | vips | imagickbinary | imagick / gmagick | gd | ewww |
|
30 |
+
| ------------------------------------------ | --------- | ------ | -------------- | ----------------- | --------- | ------ |
|
31 |
+
| supports lossless encoding ? | yes | yes | yes | no | no | yes |
|
32 |
+
| supports lossless auto ? | yes | yes | yes | no | no | no |
|
33 |
+
| supports near-lossless ? | yes | yes | no | no | no | ? |
|
34 |
+
| supports metadata stripping / preserving | yes | yes | yes | yes | no | ? |
|
35 |
+
| supports setting alpha quality | yes | yes | yes | no | no | no |
|
36 |
+
| supports fixed quality (for lossy) | yes | yes | yes | yes | yes | yes |
|
37 |
+
| supports auto quality without help | no | no | yes | yes | no | no |
|
38 |
+
|
39 |
+
|
40 |
+
|
41 |
+
*WebPConvert* currently supports the following converters:
|
42 |
+
|
43 |
+
| Converter | Method | Requirements |
|
44 |
+
| ------------------------------------ | ------------------------------------------------ | -------------------------------------------------- |
|
45 |
+
| [`cwebp`](#cwebp) | Calls `cwebp` binary directly | `exec()` function *and* that the webserver user has permission to run `cwebp` binary |
|
46 |
+
| [`vips`](#vips) (new in 2.0) | Vips extension | Vips extension |
|
47 |
+
| [`imagick`](#imagick) | Imagick extension (`ImageMagick` wrapper) | Imagick PHP extension compiled with WebP support |
|
48 |
+
| [`gmagick`](#gmagick) | Gmagick extension (`ImageMagick` wrapper) | Gmagick PHP extension compiled with WebP support |
|
49 |
+
| [`gd`](#gd) | GD Graphics (Draw) extension (`LibGD` wrapper) | GD PHP extension compiled with WebP support |
|
50 |
+
| [`imagickbinary`](#imagickbinary) | Calls imagick binary directly | exec() and imagick installed and compiled with WebP support |
|
51 |
+
| [`wpc`](#wpc) | Connects to an open source cloud service | Access to a running service. The service can be installed [directly](https://github.com/rosell-dk/webp-convert-cloud-service) or by using [this Wordpress plugin](https://wordpress.org/plugins/webp-express/).
|
52 |
+
| [`ewww`](#ewww) | Connects to *EWWW Image Optimizer* cloud service | Purchasing a key |
|
53 |
+
|
54 |
+
## Installation
|
55 |
+
Instructions regarding getting the individual converters to work are [on the wiki](https://github.com/rosell-dk/webp-convert/wiki)
|
56 |
+
|
57 |
+
## cwebp
|
58 |
+
<table>
|
59 |
+
<tr><th>Requirements</th><td><code>exec()</code> function and that the webserver has permission to run `cwebp` binary (either found in system path, or a precompiled version supplied with this library)</td></tr>
|
60 |
+
<tr><th>Performance</th><td>~40-120ms to convert a 40kb image (depending on *method* option)</td></tr>
|
61 |
+
<tr><th>Reliability</th><td>No problems detected so far!</td></tr>
|
62 |
+
<tr><th>Availability</th><td>According to ewww docs, requirements are met on surprisingly many webhosts. Look <a href="https://docs.ewww.io/article/43-supported-web-hosts">here</a> for a list</td></tr>
|
63 |
+
<tr><th>General options supported</th><td>All (`quality`, `metadata`, `lossless`)</td></tr>
|
64 |
+
<tr><th>Extra options</th><td>`method` (0-6)<br>`use-nice` (boolean)<br>`try-common-system-paths` (boolean)<br> `try-supplied-binary-for-os` (boolean)<br>`autofilter` (boolean)<br>`size-in-percentage` (number / null)<br>`command-line-options` (string)<br>`low-memory` (boolean)</td></tr>
|
65 |
+
</table>
|
66 |
+
|
67 |
+
[cwebp](https://developers.google.com/speed/webp/docs/cwebp) is a WebP conversion command line converter released by Google. Our implementation ships with precompiled binaries for Linux, FreeBSD, WinNT, Darwin and SunOS. If however a cwebp binary is found in a usual location, that binary will be preferred. It is executed with [exec()](http://php.net/manual/en/function.exec.php).
|
68 |
+
|
69 |
+
In more detail, the implementation does this:
|
70 |
+
- It is tested whether cwebp is available in a common system path (eg `/usr/bin/cwebp`, ..)
|
71 |
+
- If not, then supplied binary is selected from `Converters/Binaries` (according to OS) - after validating checksum
|
72 |
+
- Command-line options are generated from the options
|
73 |
+
- If [`nice`]( https://en.wikipedia.org/wiki/Nice_(Unix)) command is found on host, binary is executed with low priority in order to save system resources
|
74 |
+
- Permissions of the generated file are set to be the same as parent folder
|
75 |
+
|
76 |
+
### Cwebp options
|
77 |
+
|
78 |
+
The following options are supported, besides the general options (such as quality, lossless etc):
|
79 |
+
|
80 |
+
| Option | Type | Default |
|
81 |
+
| -------------------------- | ------------------------- | -------------------------- |
|
82 |
+
| autofilter | boolean | false |
|
83 |
+
| command-line-options | string | '' |
|
84 |
+
| low-memory | boolean | false |
|
85 |
+
| method | integer (0-6) | 6 |
|
86 |
+
| near-lossless | integer (0-100) | 60 |
|
87 |
+
| size-in-percentage | integer (0-100) (or null) | null |
|
88 |
+
| rel-path-to-precompiled-binaries | string | './Binaries' |
|
89 |
+
| size-in-percentage | number (or null) | is_null |
|
90 |
+
| try-common-system-paths | boolean | true |
|
91 |
+
| try-supplied-binary-for-os | boolean | true |
|
92 |
+
| use-nice | boolean | false |
|
93 |
+
|
94 |
+
Descriptions (only of some of the options):
|
95 |
+
|
96 |
+
#### the `autofilter` option
|
97 |
+
Turns auto-filter on. This algorithm will spend additional time optimizing the filtering strength to reach a well-balanced quality. Unfortunately, it is extremely expensive in terms of computation. It takes about 5-10 times longer to do a conversion. A 1MB picture which perhaps typically takes about 2 seconds to convert, will takes about 15 seconds to convert with auto-filter. So in most cases, you will want to leave this at its default, which is off.
|
98 |
+
|
99 |
+
#### the `command-line-options` option
|
100 |
+
This allows you to set any parameter available for cwebp in the same way as you would do when executing *cwebp*. You could ie set it to "-sharpness 5 -mt -crop 10 10 40 40". Read more about all the available parameters in [the docs](https://developers.google.com/speed/webp/docs/cwebp)
|
101 |
+
|
102 |
+
#### the `low-memory` option
|
103 |
+
Reduce memory usage of lossy encoding at the cost of ~30% longer encoding time and marginally larger output size. Default: `false`. Read more in [the docs](https://developers.google.com/speed/webp/docs/cwebp). Default: *false*
|
104 |
+
|
105 |
+
#### The `method` option
|
106 |
+
This parameter controls the trade off between encoding speed and the compressed file size and quality. Possible values range from 0 to 6. 0 is fastest. 6 results in best quality.
|
107 |
+
|
108 |
+
#### the `near-lossless` option
|
109 |
+
Specify the level of near-lossless image preprocessing. This option adjusts pixel values to help compressibility, but has minimal impact on the visual quality. It triggers lossless compression mode automatically. The range is 0 (maximum preprocessing) to 100 (no preprocessing). The typical value is around 60. Read more [here](https://groups.google.com/a/webmproject.org/forum/#!topic/webp-discuss/0GmxDmlexek). Default: 60
|
110 |
+
|
111 |
+
#### The `size-in-percentage` option
|
112 |
+
This option sets the file size, *cwebp* should aim for, in percentage of the original. If you for example set it to *45*, and the source file is 100 kb, *cwebp* will try to create a file with size 45 kb (we use the `-size` option). This is an excellent alternative to the "quality:auto" option. If the quality detection isn't working on your system (and you do not have the rights to install imagick or gmagick), you should consider using this options instead. *Cwebp* is generally able to create webp files with the same quality at about 45% the size. So *45* would be a good choice. The option overrides the quality option. And note that it slows down the conversion - it takes about 2.5 times longer to do a conversion this way, than when quality is specified. Default is *off* (null)
|
113 |
+
|
114 |
+
|
115 |
+
#### final words on cwebp
|
116 |
+
The implementation is based on the work of Shane Bishop for his plugin, [EWWW Image Optimizer](https://ewww.io). Thanks for letting us do that!
|
117 |
+
|
118 |
+
See [the wiki](https://github.com/rosell-dk/webp-convert/wiki/Installing-cwebp---using-official-precompilations) for instructions regarding installing cwebp or using official precompilations.
|
119 |
+
|
120 |
+
## vips
|
121 |
+
<table>
|
122 |
+
<tr><th>Requirements</th><td>Vips extension</td></tr>
|
123 |
+
<tr><th>Performance</th><td>Great</td></tr>
|
124 |
+
<tr><th>Reliability</th><td>No problems detected so far!</td></tr>
|
125 |
+
<tr><th>Availability</th><td>Not that widespread yet, but gaining popularity</td></tr>
|
126 |
+
<tr><th>General options supported</th><td>All (`quality`, `metadata`, `lossless`)</td></tr>
|
127 |
+
<tr><th>Extra options</th><td>`smart-subsample`(boolean)<br>`alpha-quality`(0-100)<br>`near-lossless` (0-100)<br> `preset` (0-6)</td></tr>
|
128 |
+
</table>
|
129 |
+
|
130 |
+
For installation instructions, go [here](https://github.com/libvips/php-vips-ext).
|
131 |
+
|
132 |
+
The options are described [here](https://jcupitt.github.io/libvips/API/current/VipsForeignSave.html#vips-webpsave)
|
133 |
+
|
134 |
+
*near-lossless* is however an integer (0-100), in order to have the option behave like in cwebp.
|
135 |
+
|
136 |
+
|
137 |
+
|
138 |
+
## wpc
|
139 |
+
*WebPConvert Cloud Service*
|
140 |
+
|
141 |
+
<table>
|
142 |
+
<tr><th>Requirements</th><td>Access to a server with [webp-convert-cloud-service](https://github.com/rosell-dk/webp-convert-cloud-service) installed, <code>cURL</code> and PHP >= 5.5.0</td></tr>
|
143 |
+
<tr><th>Performance</th><td>Depends on the server where [webp-convert-cloud-service](https://github.com/rosell-dk/webp-convert-cloud-service) is set up, and the speed of internet connections. But perhaps ~1000ms to convert a 40kb image</td></tr>
|
144 |
+
<tr><th>Reliability</th><td>Great (depends on the reliability on the server where it is set up)</td></tr>
|
145 |
+
<tr><th>Availability</th><td>Should work on <em>almost</em> any webhost</td></tr>
|
146 |
+
<tr><th>General options supported</th><td>All (`quality`, `metadata`, `lossless`)</td></tr>
|
147 |
+
<tr><th>Extra options (old api)</th><td>`url`, `secret`</td></tr>
|
148 |
+
<tr><th>Extra options (new api)</th><td>`url`, `api-version`, `api-key`, `crypt-api-key-in-transfer`</td></tr>
|
149 |
+
</table>
|
150 |
+
|
151 |
+
[wpc](https://github.com/rosell-dk/webp-convert-cloud-service) is an open source cloud service. You do not buy a key, you set it up on a server, or you set up [the Wordpress plugin](https://wordpress.org/plugins/webp-express/). As WebPConvert Cloud Service itself is based on WebPConvert, all options are supported.
|
152 |
+
|
153 |
+
To use it, you need to set the `converter-options` (to add url etc).
|
154 |
+
|
155 |
+
#### Example, where api-key is not crypted, on new API:
|
156 |
+
|
157 |
+
```php
|
158 |
+
WebPConvert::convert($source, $destination, [
|
159 |
+
'max-quality' => 80,
|
160 |
+
'converters' => ['cwebp', 'wpc'],
|
161 |
+
'converter-options' => [
|
162 |
+
'wpc' => [
|
163 |
+
'api-version' => 1, /* from wpc release 1.0.0 */
|
164 |
+
'url' => 'http://example.com/wpc.php',
|
165 |
+
'api-key' => 'my dog is white',
|
166 |
+
'crypt-api-key-in-transfer' => false
|
167 |
+
]
|
168 |
+
]
|
169 |
+
));
|
170 |
+
```
|
171 |
+
|
172 |
+
#### Example, where api-key is crypted:
|
173 |
+
|
174 |
+
```php
|
175 |
+
|
176 |
+
WebPConvert::convert($source, $destination, [
|
177 |
+
'max-quality' => 80,
|
178 |
+
'converters' => ['cwebp', 'wpc'],
|
179 |
+
'converter-options' => [
|
180 |
+
'wpc' => [
|
181 |
+
'api-version' => 1,
|
182 |
+
'url' => 'https://example.com/wpc.php',
|
183 |
+
'api-key' => 'my dog is white',
|
184 |
+
'crypt-api-key-in-transfer' => true
|
185 |
+
],
|
186 |
+
]
|
187 |
+
));
|
188 |
+
```
|
189 |
+
|
190 |
+
In 2.0, you can alternatively set the api key and urls through through the *WPC_API_KEY* and *WPC_API_URL* environment variables. This is a safer place to store it.
|
191 |
+
|
192 |
+
To set an environment variable in Apache, you can use the `SetEnv` directory. Ie, place something like the following in your virtual host / or .htaccess file (replace the key with the one you purchased!)
|
193 |
+
|
194 |
+
```
|
195 |
+
SetEnv WPC_API_KEY my-dog-is-dashed
|
196 |
+
SetEnv WPC_API_URL https://wpc.example.com/wpc.php
|
197 |
+
```
|
198 |
+
|
199 |
+
|
200 |
+
#### Example, old API:
|
201 |
+
|
202 |
+
```php
|
203 |
+
WebPConvert::convert($source, $destination, [
|
204 |
+
'max-quality' => 80,
|
205 |
+
'converters' => ['cwebp', 'wpc'],
|
206 |
+
'converter-options' => [
|
207 |
+
'wpc' => [
|
208 |
+
'url' => 'https://example.com/wpc.php',
|
209 |
+
'secret' => 'my dog is white',
|
210 |
+
],
|
211 |
+
]
|
212 |
+
));
|
213 |
+
```
|
214 |
+
|
215 |
+
|
216 |
+
## ewww
|
217 |
+
|
218 |
+
<table>
|
219 |
+
<tr><th>Requirements</th><td>Valid EWWW Image Optimizer <a href="https://ewww.io/plans/">API key</a>, <code>cURL</code> and PHP >= 5.5.0</td></tr>
|
220 |
+
<tr><th>Performance</th><td>~1300ms to convert a 40kb image</td></tr>
|
221 |
+
<tr><th>Reliability</th><td>Great (but, as with any cloud service, there is a risk of downtime)</td></tr>
|
222 |
+
<tr><th>Availability</th><td>Should work on <em>almost</em> any webhost</td></tr>
|
223 |
+
<tr><th>General options supported</th><td>`quality`, `metadata` (partly)</td></tr>
|
224 |
+
<tr><th>Extra options</th><td>`key`</td></tr>
|
225 |
+
</table>
|
226 |
+
|
227 |
+
EWWW Image Optimizer is a very cheap cloud service for optimizing images. After purchasing an API key, add the converter in the `extra-converters` option, with `key` set to the key. Be aware that the `key` should be stored safely to avoid exploitation - preferably in the environment, ie with [dotenv](https://github.com/vlucas/phpdotenv).
|
228 |
+
|
229 |
+
The EWWW api doesn't support the `lossless` option, but it does automatically convert PNG's losslessly. Metadata is either all or none. If you have set it to something else than one of these, all metadata will be preserved.
|
230 |
+
|
231 |
+
In more detail, the implementation does this:
|
232 |
+
- Validates that there is a key, and that `curl` extension is working
|
233 |
+
- Validates the key, using the [/verify/ endpoint](https://ewww.io/api/) (in order to [protect the EWWW service from unnecessary file uploads, when key has expired](https://github.com/rosell-dk/webp-convert/issues/38))
|
234 |
+
- Converts, using the [/ endpoint](https://ewww.io/api/).
|
235 |
+
|
236 |
+
<details>
|
237 |
+
<summary><strong>Roadmap</strong> 👁</summary>
|
238 |
+
|
239 |
+
The converter could be improved by using `fsockopen` when `cURL` is not available - which is extremely rare. PHP >= 5.5.0 is also widely available (PHP 5.4.0 reached end of life [more than two years ago!](http://php.net/supported-versions.php)).
|
240 |
+
</details>
|
241 |
+
|
242 |
+
#### Example:
|
243 |
+
|
244 |
+
```php
|
245 |
+
WebPConvert::convert($source, $destination, [
|
246 |
+
'max-quality' => 80,
|
247 |
+
'converters' => ['gd', 'ewww'],
|
248 |
+
'converter-options' => [
|
249 |
+
'ewww' => [
|
250 |
+
'key' => 'your-api-key-here'
|
251 |
+
],
|
252 |
+
]
|
253 |
+
));
|
254 |
+
```
|
255 |
+
In 2.0, you can alternatively set the api key by through the *EWWW_API_KEY* environment variable. This is a safer place to store it.
|
256 |
+
|
257 |
+
To set an environment variable in Apache, you can use the `SetEnv` directory. Ie, place something like the following in your virtual host / or .htaccess file (replace the key with the one you purchased!)
|
258 |
+
|
259 |
+
```
|
260 |
+
SetEnv EWWW_API_KEY sP3LyPpsKWZy8CVBTYegzEGN6VsKKKKA
|
261 |
+
```
|
262 |
+
|
263 |
+
## gd
|
264 |
+
|
265 |
+
<table>
|
266 |
+
<tr><th>Requirements</th><td>GD PHP extension and PHP >= 5.5.0 (compiled with WebP support)</td></tr>
|
267 |
+
<tr><th>Performance</th><td>~30ms to convert a 40kb image</td></tr>
|
268 |
+
<tr><th>Reliability</th><td>Not sure - I have experienced corrupted images, but cannot reproduce</td></tr>
|
269 |
+
<tr><th>Availability</th><td>Unfortunately, according to <a href="https://stackoverflow.com/questions/25248382/how-to-create-a-webp-image-in-php">this link</a>, WebP support on shared hosts is rare.</td></tr>
|
270 |
+
<tr><th>General options supported</th><td>`quality`</td></tr>
|
271 |
+
<tr><th>Extra options</th><td>`skip-pngs`</td></tr>
|
272 |
+
</table>
|
273 |
+
|
274 |
+
[imagewebp](http://php.net/manual/en/function.imagewebp.php) is a function that comes with PHP (>5.5.0), *provided* that PHP has been compiled with WebP support.
|
275 |
+
|
276 |
+
`gd` neither supports copying metadata nor exposes any WebP options. Lacking the option to set lossless encoding results in poor encoding of PNGs - the filesize is generally much larger than the original. For this reason, PNG conversion is *disabled* by default, but it can be enabled my setting `skip-pngs` option to `false`.
|
277 |
+
|
278 |
+
Installaition instructions are [available in the wiki](https://github.com/rosell-dk/webp-convert/wiki/Installing-Gd-extension).
|
279 |
+
|
280 |
+
<details>
|
281 |
+
<summary><strong>Known bugs</strong> 👁</summary>
|
282 |
+
Due to a [bug](https://bugs.php.net/bug.php?id=66590), some versions sometimes created corrupted images. That bug can however easily be fixed in PHP (fix was released [here](https://stackoverflow.com/questions/30078090/imagewebp-php-creates-corrupted-webp-files)). However, I have experienced corrupted images *anyway* (but cannot reproduce that bug). So use this converter with caution. The corrupted images look completely transparent in Google Chrome, but have the correct size.
|
283 |
+
</details>
|
284 |
+
|
285 |
+
## imagick
|
286 |
+
|
287 |
+
<table>
|
288 |
+
<tr><th>Requirements</th><td>Imagick PHP extension (compiled with WebP support)</td></tr>
|
289 |
+
<tr><th>Quality</th><td>Poor. [See this issue]( https://github.com/rosell-dk/webp-convert/issues/43)</td></tr>
|
290 |
+
<tr><th>General options supported</th><td>`quality`</td></tr>
|
291 |
+
<tr><th>Extra options</th><td>None</td></tr>
|
292 |
+
<tr><th>Performance</th><td>~20-320ms to convert a 40kb image</td></tr>
|
293 |
+
<tr><th>Reliability</th><td>No problems detected so far</td></tr>
|
294 |
+
<tr><th>Availability</th><td>Probably only available on few shared hosts (if any)</td></tr>
|
295 |
+
</table>
|
296 |
+
|
297 |
+
WebP conversion with `imagick` is fast and [exposes many WebP options](http://www.imagemagick.org/script/webp.php). Unfortunately, WebP support for the `imagick` extension is pretty uncommon. At least not on the systems I have tried (Ubuntu 16.04 and Ubuntu 17.04). But if installed, it works great and has several WebP options.
|
298 |
+
|
299 |
+
See [this page](https://github.com/rosell-dk/webp-convert/wiki/Installing-Imagick-extension) in the Wiki for instructions on installing the extension.
|
300 |
+
|
301 |
+
## imagickbinary
|
302 |
+
<table>
|
303 |
+
<tr><th>Requirements</th><td><code>exec()</code> function and that imagick is installed on webserver, compiled with webp support</td></tr>
|
304 |
+
<tr><th>Performance</th><td>just fine</td></tr>
|
305 |
+
<tr><th>Reliability</th><td>No problems detected so far!</td></tr>
|
306 |
+
<tr><th>Availability</th><td>Not sure</td></tr>
|
307 |
+
<tr><th>General options supported</th><td>`quality`</td></tr>
|
308 |
+
<tr><th>Extra options</th><td>`use-nice` (boolean)</td></tr>
|
309 |
+
</table>
|
310 |
+
|
311 |
+
This converter tryes to execute `convert source.jpg webp:destination.jpg.webp`.
|
312 |
+
|
313 |
+
## stack
|
314 |
+
|
315 |
+
<table>
|
316 |
+
<tr><th>General options supported</th><td>all (passed to the converters in the stack )</td></tr>
|
317 |
+
<tr><th>Extra options</th><td>`converters` (array) and `converter-options` (array)</td></tr>
|
318 |
+
</table>
|
319 |
+
|
320 |
+
Stack implements the functionality you know from `WebPConvert::convert`. In fact, all `WebPConvert::convert` does is to call `Stack::convert($source, $destination, $options, $logger);`
|
321 |
+
|
322 |
+
It has two special options: `converters` and `converter-options`. You can read about those in `docs/api/convert.md`
|
vendor/rosell-dk/webp-convert/docs/v1.3/serving/convert-and-serve.md
ADDED
@@ -0,0 +1,167 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# API: The WebPConvert::convertAndServe() method
|
2 |
+
|
3 |
+
*NOTE:* In 2.0, the method is renamed to *serveConverted* ("convertAndServe" was implying that a conversion was always made, but the method simply serves destination if it exists and is smaller and newer than source)
|
4 |
+
|
5 |
+
The method tries to serve a converted image. If destination already exists, the already converted image will be served. Unless the original is newer or smaller. If the method fails, it will serve original image, a 404, or whatever the 'fail' option is set to.
|
6 |
+
|
7 |
+
**WebPConvert::convertAndServe($source, $destination, $options)**
|
8 |
+
|
9 |
+
| Parameter | Type | Description |
|
10 |
+
| ---------------- | ------- | ------------------------------------------------------------------- |
|
11 |
+
| `$source` | String | Absolute path to source image (only forward slashes allowed) |
|
12 |
+
| `$destination` | String | Absolute path to converted image (only forward slashes allowed) |
|
13 |
+
| `$options` | Array | Array of options (see below) |
|
14 |
+
|
15 |
+
## The *$options* argument
|
16 |
+
The options argument is a named array. Besides the options described below, you can also use any options that the *convert* method takes (if a fresh convertion needs to be created, this method will call the *convert* method and hand over the options argument)
|
17 |
+
|
18 |
+
### *convert*
|
19 |
+
Conversion options, handed over to the convert method, in case a conversion needs to be made. The convert options are documented [here](https://github.com/rosell-dk/webp-convert/blob/master/docs/v2.0/converting/options.md).
|
20 |
+
|
21 |
+
### *fail*
|
22 |
+
Indicate what to do, in case of normal conversion failure.
|
23 |
+
Default value: *"original"*
|
24 |
+
|
25 |
+
| Possible values | Meaning |
|
26 |
+
| ----------------- | ----------------------------------------------- |
|
27 |
+
| "serve-original" | Serve the original image. |
|
28 |
+
| "404" | Serve 404 status (not found) |
|
29 |
+
| "report-as-image" | Serve an image with text explaining the problem |
|
30 |
+
| "report" | Serve a textual report explaining the problem |
|
31 |
+
|
32 |
+
### *fail-when-original-unavailable*
|
33 |
+
Possible values: Same as above, except that "original" is not an option.
|
34 |
+
Default value: *"404"*
|
35 |
+
|
36 |
+
### *show-report*
|
37 |
+
Produce a report rather than serve an image.
|
38 |
+
Default value: *false*
|
39 |
+
|
40 |
+
### *reconvert*
|
41 |
+
Force a conversion, discarding existing converted image (if any).
|
42 |
+
Default value: *false*
|
43 |
+
|
44 |
+
### *serve-original*
|
45 |
+
Forces serving original image. This will skip conversion.
|
46 |
+
Default value: *false*
|
47 |
+
|
48 |
+
### *add-x-header-status*
|
49 |
+
When set to *true*, a *X-WebP-Convert-Status* header will be added describing how things went.
|
50 |
+
Default value: *true*
|
51 |
+
|
52 |
+
Depending on how things goes, the header will be set to one of the following:
|
53 |
+
- "Failed (missing source argument)"
|
54 |
+
- "Failed (source not found)""
|
55 |
+
- "Failed (missing destination argument)"
|
56 |
+
- "Reporting..."
|
57 |
+
- "Serving original image (was explicitly told to)"
|
58 |
+
- "Serving original image - because it is smaller than the converted!"
|
59 |
+
- "Serving freshly converted image (the original had changed)"
|
60 |
+
- "Serving existing converted image"
|
61 |
+
- "Converting image (handed over to WebPConvertAndServe)"
|
62 |
+
- "Serving freshly converted image"
|
63 |
+
- "Failed (could not convert image)"
|
64 |
+
|
65 |
+
### *add-vary-header*
|
66 |
+
Add a "Vary: Accept" header when an image is served. Experimental.
|
67 |
+
Default value: *true*
|
68 |
+
|
69 |
+
### *add-content-type-header*
|
70 |
+
Add a "Content-Type" header
|
71 |
+
Default value: *true*
|
72 |
+
If set, a *Content-Type* header will be added. It will be set to "image/webp" if a converted image is served, "image/jpeg" or "image/png", if the original is served or "image/gif", if an error message is served (as image). You can set it to false when debugging (to check if any errors are being outputted)
|
73 |
+
|
74 |
+
### *add-last-modified-header*
|
75 |
+
Add a "Last-Modified" header
|
76 |
+
Default value: *true*
|
77 |
+
If set, a *Last-Modified* header will be added. When a cached image is served, it will be set to the modified time of the converted file. When a fresh image is served, it is set to current time.
|
78 |
+
|
79 |
+
### *cache-control-header*
|
80 |
+
Specify a cache control header, which will be served when caching is appropriate.
|
81 |
+
Default value: "public, max-age=86400" (1 day)
|
82 |
+
Caching is "deemed appropriate", when destination is served, source is served, because it is lighter or a fresh conversion is made, due to there not being any converted image at the destination yet. Caching is not deemed appropriate when something fails, a report is requested, or the *reconvert* option have been set. Note: in version 1.3.2 and below, the *serve-original* option also prevented caching, but it no longer does. previous In those cases, standard headers will be used for preventing caching.
|
83 |
+
For your convenience, here is a little table:
|
84 |
+
|
85 |
+
| duration | max-age |
|
86 |
+
| -------- | ---------------- |
|
87 |
+
| 1 second | max-age=1 |
|
88 |
+
| 1 minute | max-age=60 |
|
89 |
+
| 1 hour | max-age=3600 |
|
90 |
+
| 1 day | max-age=86400 |
|
91 |
+
| 1 week | max-age=604800 |
|
92 |
+
| 1 month | max-age=2592000 |
|
93 |
+
| 1 year | max-age=31536000 |
|
94 |
+
|
95 |
+
To learn about the options for the Cache-Control header, go [here](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control)
|
96 |
+
|
97 |
+
### *error-reporting*
|
98 |
+
Set error reporting
|
99 |
+
Allowed values: *"auto"*, *"dont-mess"*, *true*, *false*
|
100 |
+
Default value: *"auto"*
|
101 |
+
|
102 |
+
If set to true, error reporting will be turned on, like this:
|
103 |
+
```
|
104 |
+
error_reporting(E_ALL);
|
105 |
+
ini_set('display_errors', 'On');
|
106 |
+
```
|
107 |
+
|
108 |
+
If set to false, error reporting will be turned off, like this:
|
109 |
+
```
|
110 |
+
error_reporting(0);
|
111 |
+
ini_set('display_errors', 'Off');
|
112 |
+
```
|
113 |
+
If set to "auto", errors will be turned off, unless the `show-report` option is set, in which case errors will be turned off.
|
114 |
+
If set to "dont-mess", error reporting will not be touched.
|
115 |
+
|
116 |
+
### *aboutToServeImageCallBack*
|
117 |
+
This callback is called right before response headers and image is served. This is a great chance to adding headers. You can stop the image and the headers from being served by returning *false*.
|
118 |
+
|
119 |
+
**Arguments:**
|
120 |
+
The first argument to the callback contains a string that tells what is about to be served. It can be 'fresh-conversion', 'destination' or 'source'.
|
121 |
+
|
122 |
+
The second argument tells you why that is served. It can be one of the following:
|
123 |
+
for 'source':
|
124 |
+
- "explicitly-told-to" (when the "serve-original" option is set)
|
125 |
+
- "source-lighter" (when original image is actually smaller than the converted)
|
126 |
+
|
127 |
+
for 'fresh-conversion':
|
128 |
+
- "explicitly-told-to" (when the "reconvert" option is set)
|
129 |
+
- "source-modified" (when source is newer than existing)
|
130 |
+
- "no-existing" (when there is no existing at the destination)
|
131 |
+
|
132 |
+
for 'destination':
|
133 |
+
- "no-reason-not-to" (it is lighter than source, its not older, and we were not told to do otherwise)
|
134 |
+
|
135 |
+
Example of callback:
|
136 |
+
```
|
137 |
+
function aboutToServeImageCallBack($servingWhat, $whyServingThis, $obj)
|
138 |
+
{
|
139 |
+
echo 'about to serve: ' . $servingWhat . '<br>';
|
140 |
+
echo 'Why? - because: ' . $whyServingThis;
|
141 |
+
return false; // Do not serve! (this also prevents any response headers from being added)
|
142 |
+
}
|
143 |
+
```
|
144 |
+
|
145 |
+
### *aboutToPerformFailActionCallback*
|
146 |
+
This callback is called right before doing the action specified in the `fail` option, or the `fail-when-original-unavailable` option. You can stop the fail action from being executod by returning *false*.
|
147 |
+
|
148 |
+
Documentation by example:
|
149 |
+
```
|
150 |
+
function aboutToPerformFailActionCallback($errorTitle, $errorDescription, $actionAboutToBeTaken, $serveConvertedObj)
|
151 |
+
{
|
152 |
+
echo '<h1>' . $errorTitle . '</h1>';
|
153 |
+
echo $errorDescription;
|
154 |
+
if (actionAboutToBeTaken == '404') {
|
155 |
+
// handle 404 differently than webp-convert would
|
156 |
+
$protocol = isset($_SERVER["SERVER_PROTOCOL"]) ? $_SERVER["SERVER_PROTOCOL"] : 'HTTP/1.0';
|
157 |
+
$serveConvertedObj->header($protocol . " 404 Not Found. We take this very seriously. Heads will roll.");
|
158 |
+
|
159 |
+
return false; // stop webp-convert from doing what it would do
|
160 |
+
}
|
161 |
+
|
162 |
+
}
|
163 |
+
```
|
164 |
+
|
165 |
+
### *require-for-conversion*
|
166 |
+
If set, makes the library 'require in' a file just before doing an actual conversion with `ConvertAndServe::convertAndServe()`. This is not needed for composer projects, as composer takes care of autoloading classes when needed.
|
167 |
+
Default value: *null*
|
vendor/rosell-dk/webp-convert/docs/v1.3/webp-on-demand/tweaks.md
ADDED
@@ -0,0 +1,167 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Tweaks
|
2 |
+
|
3 |
+
## Store converted images in separate folder
|
4 |
+
|
5 |
+
In most cases, you probably want the cache of converted images to be stored in their own folder rather than have them mingled with the source files.
|
6 |
+
|
7 |
+
To have have the cache folder contain a file structure mirroring the structure of the original files, you can do this:
|
8 |
+
|
9 |
+
```php
|
10 |
+
$applicationRoot = $_SERVER["DOCUMENT_ROOT"]; // If your application is not in document root, you can change accordingly.
|
11 |
+
$imageRoot = $applicationRoot . '/webp-images'; // Change to where you want the webp images to be saved
|
12 |
+
$sourceRel = substr($source, strlen($applicationRoot));
|
13 |
+
$destination = $imageRoot . $sourceRel . '.webp';
|
14 |
+
```
|
15 |
+
|
16 |
+
If your images are stored outside document root (a rare case), you can simply use the complete absolute path:
|
17 |
+
```php
|
18 |
+
$destination = $imageRoot . $source . '.webp'; // pst: $source is an absolute path, and starts with '/'
|
19 |
+
```
|
20 |
+
This will ie store a converted image in */var/www/example.com/public_html/app/webp-images/var/www/example.com/images/logo.jpg.webp*
|
21 |
+
|
22 |
+
If your application can be configured to store outside document root, but rarely is, you can go for this structure:
|
23 |
+
|
24 |
+
```php
|
25 |
+
$docRoot = $_SERVER["DOCUMENT_ROOT"];
|
26 |
+
$imageRoot = $contentDirAbs . '/webp-images';
|
27 |
+
|
28 |
+
if (substr($source, 0, strlen($docRoot)) === $docRoot) {
|
29 |
+
// Source file is residing inside document root.
|
30 |
+
// We can store relative to that.
|
31 |
+
$sourceRel = substr($source, strlen($docRoot));
|
32 |
+
$destination = $imageRoot . '/doc-root' . $sourceRel . '.webp';
|
33 |
+
} else {
|
34 |
+
// Source file is residing outside document root.
|
35 |
+
// we must add complete path to structure
|
36 |
+
$destination = $imageRoot . '/abs' . $source . '.webp';
|
37 |
+
}
|
38 |
+
```
|
39 |
+
|
40 |
+
If you do not know the application root beforehand, and thus do not know the appropriate root for the converted images, see next tweak.
|
41 |
+
|
42 |
+
|
43 |
+
## Get the application root automatically
|
44 |
+
When you want destination files to be put in their own folder, you need to know the root of the application (the folder in which the .htaccess rules resides). In most applications, you know the root. In many cases, it is simply the document root. However, if you are writing an extension, plugin or module to a framework that can be installed in a subfolder, you may have trouble finding it. Many applications have a *index.php* in the root, which can get it with `__DIR__`. However, you do not want to run an entire bootstrap each time you serve an image. Obviously, to get around this, you can place *webp-on-demand.php* in the webroot. However, some frameworks, such as Wordpress, will not allow a plugin to put a file in the root. Now, how could we determine the application root from a file inside some subdir? Here are three suggestions:
|
45 |
+
|
46 |
+
1. You could traverse parent folders until you find a file you expect to be in application root (ie a .htaccess containing the string "webp-on-demand.php"). This should work.
|
47 |
+
2. If the rules in the *.htaccess* file are generated by your application, you probably have access to the path at generation time. You can then simply put the path in the *.htaccess*, as an extra parameter to the script (or better: the relative path from document root to the application).
|
48 |
+
3. You can use the following hack:
|
49 |
+
|
50 |
+
### The hack
|
51 |
+
The idea is to grab the URL path of the image in the *.htaccess* and pass it to the script. Assuming that the URL paths always matches the file paths, we can get the application root by subtracting that relative path to source from the absolute path to source.
|
52 |
+
|
53 |
+
In *.htaccess*, we grab the url-path by appending "&url-path=$1.$2" to the rewrite rule:
|
54 |
+
```
|
55 |
+
RewriteRule ^(.*)\.(jpe?g|png)$ webp-on-demand.php?source=%{SCRIPT_FILENAME}&url-path=$1.$2 [NC,L]
|
56 |
+
```
|
57 |
+
|
58 |
+
In the script, we can then calculate the application root like this:
|
59 |
+
|
60 |
+
```php
|
61 |
+
$applicationRoot = substr($_GET['source'], 0, -strlen($_GET['url-path']));
|
62 |
+
```
|
63 |
+
|
64 |
+
## CDN
|
65 |
+
To work properly with a CDN, a "Vary Accept" header should be added when serving images. This is a declaration that the response varies with the *Accept* header (recall that we inspect *Accept* header in the .htaccess to determine if the browsers supports webp images). If this header is missing, the CDN will see no reason to cache separate images depending on the Accept header.
|
66 |
+
|
67 |
+
Add this snippet to the *.htaccess* to make webp-on-demand work with CDN's:
|
68 |
+
|
69 |
+
```
|
70 |
+
<IfModule mod_headers.c>
|
71 |
+
SetEnvIf Request_URI "\.(jpe?g|png)" ADDVARY
|
72 |
+
|
73 |
+
# Declare that the response varies depending on the accept header.
|
74 |
+
# The purpose is to make CDN cache both original images and converted images.
|
75 |
+
Header append "Vary" "Accept" env=ADDVARY
|
76 |
+
</IfModule>
|
77 |
+
```
|
78 |
+
|
79 |
+
***Note:*** When configuring the CDN, you must make sure to set it up to forward the the "Accept" header to your origin server.
|
80 |
+
|
81 |
+
|
82 |
+
|
83 |
+
## Make .htaccess route directly to existing images
|
84 |
+
|
85 |
+
There may be a performance benefit of using the *.htaccess* file to route to already converted images, instead of letting the PHP script serve it. Note however:
|
86 |
+
- If you do the routing in .htaccess, the solution will not be able to discard converted images when original images are updated.
|
87 |
+
- Performance benefit may be insignificant (*WebPConvertAndServe* class is not autoloaded when serving existing images)
|
88 |
+
|
89 |
+
Add the following to the *.htaccess* to make it route to existing converted images. Place it above the # Redirect images to webp-on-demand.php" comment. Take care of replacing [[your-base-path]] with the directory your *.htaccess* lives in (relative to document root, and [[your-destination-root]] with the directory the converted images resides.
|
90 |
+
```
|
91 |
+
# Redirect to existing converted image (under appropriate circumstances)
|
92 |
+
RewriteCond %{HTTP_ACCEPT} image/webp
|
93 |
+
RewriteCond %{DOCUMENT_ROOT}/[[your-base-path]]/[[your-destination-root]]/$1.$2.webp -f
|
94 |
+
RewriteRule ^\/?(.*)\.(jpe?g|png)$ /[[your-base-path]]/[[your-destination-root]]/$1.$2.webp [NC,T=image/webp,L]
|
95 |
+
```
|
96 |
+
*edit:* Removed the QSD flag from the RewriteRule because it is not supported in Apache < 2.4 (and it [triggers error](https://github.com/rosell-dk/webp-express/issues/155))
|
97 |
+
|
98 |
+
### Redirect with CDN support
|
99 |
+
If you are using a CDN, and want to redirect to existing images with the .htaccess, it is a good idea to add a "Vary Accept" header. This instructs the CDN that the response varies with the *Accept* header (we do not need to do that when routing to webp-on-demand.php, because the script takes care of adding this header, when appropriate.)
|
100 |
+
|
101 |
+
You can achieve redirect with CDN support with the following rules:
|
102 |
+
```
|
103 |
+
<IfModule mod_rewrite.c>
|
104 |
+
|
105 |
+
RewriteEngine On
|
106 |
+
|
107 |
+
# Redirect to existing converted image (under appropriate circumstances)
|
108 |
+
RewriteCond %{HTTP_ACCEPT} image/webp
|
109 |
+
RewriteCond %{DOCUMENT_ROOT}/[[your-base-path]]/[[your-destination-root]]/$1.$2.webp -f
|
110 |
+
RewriteRule ^\/?(.*)\.(jpe?g|png)$ /[[your-base-path]]/[[your-destination-root]]/$1.$2.webp [NC,T=image/webp,QSD,E=WEBPACCEPT:1,L]
|
111 |
+
|
112 |
+
# Redirect images to webp-on-demand.php (if browser supports webp)
|
113 |
+
RewriteCond %{HTTP_ACCEPT} image/webp
|
114 |
+
RewriteRule ^(.*)\.(jpe?g|png)$ webp-on-demand.php?source=%{SCRIPT_FILENAME}&url-path=$1.$2 [NC,L]
|
115 |
+
|
116 |
+
</IfModule>
|
117 |
+
|
118 |
+
<IfModule mod_headers.c>
|
119 |
+
# Apache appends "REDIRECT_" in front of the environment variables, but LiteSpeed does not.
|
120 |
+
# These next line is for Apache, in order to set environment variables without "REDIRECT_"
|
121 |
+
SetEnvIf REDIRECT_WEBPACCEPT 1 WEBPACCEPT=1
|
122 |
+
|
123 |
+
# Make CDN caching possible.
|
124 |
+
# The effect is that the CDN will cache both the webp image and the jpeg/png image and return the proper
|
125 |
+
# image to the proper clients (for this to work, make sure to set up CDN to forward the "Accept" header)
|
126 |
+
Header append Vary Accept env=WEBPACCEPT
|
127 |
+
</IfModule>
|
128 |
+
|
129 |
+
AddType image/webp .webp
|
130 |
+
```
|
131 |
+
|
132 |
+
## Forward the querystring
|
133 |
+
By forwarding the query string, you can allow control directly from the URL. You could for example make it possible to add "?debug" to an image URL, and thereby getting a conversion report. Or make "?reconvert" force reconversion.
|
134 |
+
|
135 |
+
In order to forward the query string, you need to add this condition before the RewriteRule that redirects to *webp-on-demand.php*:
|
136 |
+
```
|
137 |
+
RewriteCond %{QUERY_STRING} (.*)
|
138 |
+
```
|
139 |
+
That condition will always be met. The side effect is that it stores the match (the complete querystring). That match will be available as %1 in the RewriteRule. So, in the RewriteRule, we will have to add "&%1" after the last argument. Here is a complete solution:
|
140 |
+
```
|
141 |
+
<IfModule mod_rewrite.c>
|
142 |
+
RewriteEngine On
|
143 |
+
|
144 |
+
# Redirect images to webp-on-demand.php (if browser supports webp)
|
145 |
+
RewriteCond %{HTTP_ACCEPT} image/webp
|
146 |
+
RewriteCond %{QUERY_STRING} (.*)
|
147 |
+
RewriteRule ^(.*)\.(jpe?g|png)$ webp-on-demand.php?source=%{SCRIPT_FILENAME}&%1 [NC,L]
|
148 |
+
</IfModule>
|
149 |
+
|
150 |
+
AddType image/webp .webp
|
151 |
+
```
|
152 |
+
|
153 |
+
Of course, in order to *do* something with that querystring, you must use them in your *webp-on-demand.php* script. You could for example use them directly in the options array sent to the *convertAndServe()* method. To achieve the mentioned "debug" and "reconvert" features, do this:
|
154 |
+
```php
|
155 |
+
$options = [
|
156 |
+
'show-report' => isset($_GET['debug']),
|
157 |
+
'reconvert' => isset($_GET['reconvert']),
|
158 |
+
'serve-original' => isset($_GET['original']),
|
159 |
+
];
|
160 |
+
```
|
161 |
+
|
162 |
+
*EDIT:*
|
163 |
+
I have just discovered a simpler way to achieve the querystring forward: The [QSA flag](https://httpd.apache.org/docs/trunk/rewrite/flags.html).
|
164 |
+
So, simply set the QSA flag in the RewriteRule, and nothing more:
|
165 |
+
```
|
166 |
+
RewriteRule ^(.*)\.(jpe?g|png)$ webp-on-demand.php?source=%{SCRIPT_FILENAME} [NC,QSA,L]
|
167 |
+
```
|
vendor/rosell-dk/webp-convert/docs/v1.3/webp-on-demand/webp-on-demand.md
ADDED
@@ -0,0 +1,133 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# WebP on demand
|
2 |
+
|
3 |
+
This is a solution for automatically serving WebP images instead of jpeg/pngs [for browsers that supports WebP](https://caniuse.com/#feat=webp) (At the time of writing, 78% of all mobile users and 72% of all desktop users uses browsers supporting webp)
|
4 |
+
|
5 |
+
Once set up, it will automatically convert images, no matter how they are referenced. It for example also works on images referenced in CSS. As the solution does not require any change in the HTML, it can easily be integrated into any website / framework
|
6 |
+
|
7 |
+
## Overview
|
8 |
+
|
9 |
+
A setup consists of a PHP script that serves converted images and some *redirect rules* that redirects JPG/PNG images to the script.
|
10 |
+
|
11 |
+
|
12 |
+
## Requirements
|
13 |
+
|
14 |
+
* *Apache* or *LiteSpeed* web server. Can be made to work with *NGINX* as well. Documentation is on the roadmap.
|
15 |
+
* *mod_rewrite* module for Apache
|
16 |
+
* PHP >= 5.6 (we are only testing down to 5.6. It should however work in 5.5 as well)
|
17 |
+
* That one of the *webp-convert* converters are working (these have different requirements)
|
18 |
+
|
19 |
+
## Installation
|
20 |
+
|
21 |
+
Here we assume you are using Composer. [Not using composer? - Follow me!](https://github.com/rosell-dk/webp-convert/blob/master/docs/v1.3/webp-on-demand/without-composer.md)
|
22 |
+
|
23 |
+
### 1. Require the webp-convert library with composer
|
24 |
+
```
|
25 |
+
composer require rosell-dk/webp-convert
|
26 |
+
```
|
27 |
+
|
28 |
+
|
29 |
+
### 2. Create the script
|
30 |
+
|
31 |
+
Create a file *webp-on-demand.php*, and place it in webroot, or where-ever you like in you web-application.
|
32 |
+
|
33 |
+
Here is a minimal example to get started with:
|
34 |
+
|
35 |
+
```php
|
36 |
+
<?php
|
37 |
+
require 'vendor/autoload.php'; // Make sure to point this correctly
|
38 |
+
|
39 |
+
use WebPConvert\WebPConvert;
|
40 |
+
|
41 |
+
$source = $_GET['source']; // Absolute file path to source file. Comes from the .htaccess
|
42 |
+
$destination = $source . '.webp'; // Store the converted images besides the original images (other options are available!)
|
43 |
+
|
44 |
+
$options = [
|
45 |
+
|
46 |
+
// UNCOMMENT NEXT LINE, WHEN YOU ARE UP AND RUNNING!
|
47 |
+
'show-report' => true // Show a conversion report instead of serving the converted image.
|
48 |
+
|
49 |
+
// More options available!
|
50 |
+
];
|
51 |
+
WebPConvert::convertAndServe($source, $destination, $options);
|
52 |
+
```
|
53 |
+
|
54 |
+
### 3. Add redirect rules
|
55 |
+
Place the following rewrite rules in a *.htaccess* file in the directory where you want the solution to take effect:
|
56 |
+
|
57 |
+
```
|
58 |
+
<IfModule mod_rewrite.c>
|
59 |
+
RewriteEngine On
|
60 |
+
|
61 |
+
# Redirect images to webp-on-demand.php (if browser supports webp)
|
62 |
+
RewriteCond %{HTTP_ACCEPT} image/webp
|
63 |
+
RewriteCond %{REQUEST_FILENAME} -f
|
64 |
+
RewriteRule ^(.*)\.(jpe?g|png)$ webp-on-demand.php?source=%{SCRIPT_FILENAME} [NC,L]
|
65 |
+
</IfModule>
|
66 |
+
|
67 |
+
AddType image/webp .webp
|
68 |
+
```
|
69 |
+
If you have placed *webp-on-demand.php* in a subfolder, you will need to change the rewrite rule accordingly.
|
70 |
+
|
71 |
+
The `RewriteCond %{REQUEST_FILENAME} -f` is not strictly necessary, but there to be sure that we got an existing file, and it could perhaps also prevent some undiscovered way of misuse.
|
72 |
+
|
73 |
+
### 4. Validate that it works
|
74 |
+
|
75 |
+
Browse to a JPEG image. Instead of an image, you should see a conversion report. Hopefully, you get a success. Otherwise, you need to hook up to a cloud converter or try to meet the requirements for cwebp, gd or imagick.
|
76 |
+
|
77 |
+
Once you get a successful conversion, you can uncomment the "show-report" option in the script.
|
78 |
+
|
79 |
+
It should work now, but to be absolute sure:
|
80 |
+
|
81 |
+
- Visit a page on your site with an image on it, using *Google Chrome*.
|
82 |
+
- Right-click the page and choose "Inspect"
|
83 |
+
- Click the "Network" tab
|
84 |
+
- Reload the page
|
85 |
+
- Find a jpeg or png image in the list. In the "type" column, it should say "webp". There should also be a *X-WebP-Convert-Status* header on the image that provides some insights on how things went.
|
86 |
+
|
87 |
+
|
88 |
+
### 5. Try this improvement and see if it works
|
89 |
+
|
90 |
+
It seems that it is not necessary to pass the filename in the query string.
|
91 |
+
|
92 |
+
Try replacing `$source = $_GET['source'];` in the script with the following:
|
93 |
+
|
94 |
+
```php
|
95 |
+
$docRoot = rtrim($_SERVER["DOCUMENT_ROOT"], '/');
|
96 |
+
$requestUriNoQS = explode('?', $_SERVER['REQUEST_URI'])[0];
|
97 |
+
$source = $docRoot . urldecode($requestUriNoQS);
|
98 |
+
```
|
99 |
+
|
100 |
+
And you can then remove `?source=%{SCRIPT_FILENAME}` from the `.htaccess` file.
|
101 |
+
|
102 |
+
There are some benefits of not passing in query string:
|
103 |
+
1. Passing a path in the query string may be blocked by a firewall, as it looks suspicious.
|
104 |
+
2. The script called to convert arbitrary files
|
105 |
+
3. One person experienced problems with spaces in filenames passed in the query string. See [this issue](https://github.com/rosell-dk/webp-convert/issues/95)
|
106 |
+
|
107 |
+
|
108 |
+
### 6. Customizing and tweaking
|
109 |
+
|
110 |
+
Basic customizing is done by setting options in the `$options` array. Check out the [docs on convert()](https://github.com/rosell-dk/webp-convert/blob/master/docs/v1.3/converting/convert.md) and the [docs on convertAndServe()](https://github.com/rosell-dk/webp-convert/blob/master/docs/v1.3/serving/convert-and-serve.md)
|
111 |
+
|
112 |
+
Other tweaking is described in *docs/webp-on-demand/tweaks.md*:
|
113 |
+
- [Store converted images in separate folder](https://github.com/rosell-dk/webp-convert/blob/master/docs/v1.3/webp-on-demand/tweaks.md#store-converted-images-in-separate-folder)
|
114 |
+
- [CDN](https://github.com/rosell-dk/webp-convert/blob/master/docs/v1.3/webp-on-demand/tweaks.md#cdn)
|
115 |
+
- [Make .htaccess route directly to existing images](https://github.com/rosell-dk/webp-convert/blob/master/docs/v1.3/webp-on-demand/tweaks.md#make-htaccess-route-directly-to-existing-images)
|
116 |
+
- [Forward the query string](https://github.com/rosell-dk/webp-convert/blob/master/docs/v1.3/webp-on-demand/tweaks.md#forward-the-querystring)
|
117 |
+
|
118 |
+
|
119 |
+
## Troubleshooting
|
120 |
+
|
121 |
+
### The redirect rule doesn't seem to be working
|
122 |
+
If images are neither routed to the converter or a 404, it means that the redirect rule isn't taking effect. Common reasons for this includes:
|
123 |
+
|
124 |
+
- Perhaps there are other rules in your *.htaccess* that interfere with the rules?
|
125 |
+
- Perhaps your site is on *Apache*, but it has been configured to use *Nginx* to serve image files. To find out which server that is handling the images, browse to an image and eximine the "Server" response header. In case *NGINX* are serving images, see if you can reconfigure your server setup. Alternatively, you can create *NGINX* rewrite rules. There are some [here](https://github.com/S1SYPHOS/kirby-webp#nginx) and [there](https://github.com/uhop/grunt-tight-sprite/wiki/Recipe:-serve-WebP-with-nginx-conditionally).
|
126 |
+
- Perhaps the server isn't configured to allow *.htaccess* files? Try inserting rubbish in the top of the *.htaccess* file and refresh. You should now see an *Internal Server Error* error page. If you don't, your *.htaccess* file is ignored. Probably you will need to set *AllowOverride All* in your Virtual Host. [Look here for more help](
|
127 |
+
https://docs.bolt.cm/3.4/howto/making-sure-htaccess-works#test-if-htaccess-is-working)
|
128 |
+
- Perhaps the Apache *mod_rewrite* extension isn't enabled? Try removing both `<IfModule mod_rewrite.c>` and `</IfModule>` lines: if you get an *Internal Server Error* error page after this change, it's probably that it's indeed not enabled.
|
129 |
+
|
130 |
+
|
131 |
+
## Related
|
132 |
+
* https://www.maxcdn.com/blog/how-to-reduce-image-size-with-webp-automagically/
|
133 |
+
* https://www.digitalocean.com/community/tutorials/how-to-create-and-serve-webp-images-to-speed-up-your-website
|
vendor/rosell-dk/webp-convert/docs/v1.3/webp-on-demand/without-composer.md
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# WebP On Demand without composer
|
2 |
+
|
3 |
+
For your convenience, the library has been cooked down to two files: *webp-on-demand-1.inc* and *webp-on-demand-2.inc*. The second one is loaded when the first one decides it needs to do a conversion (and not simply serve existing image).
|
4 |
+
|
5 |
+
## Installing
|
6 |
+
|
7 |
+
### 1. Copy the latest build files into your website
|
8 |
+
Copy *webp-on-demand-1.inc* and *webp-on-demand-2.inc* from the *build* folder into your website (in 2.0, they are located in "src-build"). They can be located wherever you like.
|
9 |
+
|
10 |
+
### 2. Create a *webp-on-demand.php*
|
11 |
+
|
12 |
+
Create a file *webp-on-demand.php*, and place it in webroot, or where-ever you like in you web-application.
|
13 |
+
|
14 |
+
Here is a minimal example to get started with. Note that this example only works in version 1.x. In 2.0, the `require-for-conversion` option has been removed, so the [procedure is different](https://github.com/rosell-dk/webp-convert/blob/master/docs/v2.0/webp-on-demand/without-composer.md).
|
15 |
+
|
16 |
+
```php
|
17 |
+
<?php
|
18 |
+
// To start with, lets display any errors.
|
19 |
+
// You can later comment these out
|
20 |
+
error_reporting(E_ALL);
|
21 |
+
ini_set("display_errors", 1);
|
22 |
+
|
23 |
+
require 'webp-on-demand-1.inc';
|
24 |
+
|
25 |
+
use WebPConvert\WebPConvert;
|
26 |
+
|
27 |
+
$source = $_GET['source']; // Absolute file path to source file. Comes from the .htaccess
|
28 |
+
$destination = $source . '.webp'; // Store the converted images besides the original images (other options are available!)
|
29 |
+
|
30 |
+
$options = [
|
31 |
+
|
32 |
+
// Tell where to find the webp-convert-and-serve library, which will
|
33 |
+
// be dynamically loaded, if need be.
|
34 |
+
'require-for-conversion' => 'webp-on-demand-2.inc',
|
35 |
+
|
36 |
+
// UNCOMMENT NEXT LINE, WHEN YOU ARE UP AND RUNNING!
|
37 |
+
'show-report' => true // Show a conversion report instead of serving the converted image.
|
38 |
+
|
39 |
+
// More options available!
|
40 |
+
];
|
41 |
+
WebPConvert::convertAndServe($source, $destination, $options);
|
42 |
+
```
|
43 |
+
|
44 |
+
### 3. Continue the main install instructions from step 3
|
45 |
+
[Click here to continue...](https://github.com/rosell-dk/webp-on-demand#3-add-redirect-rules)
|
vendor/rosell-dk/webp-convert/docs/v2.0/converting/architecture-q50-w600.jpg
ADDED
Binary file
|
vendor/rosell-dk/webp-convert/docs/v2.0/converting/converters/stack.md
ADDED
@@ -0,0 +1,248 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Stack converter
|
2 |
+
|
3 |
+
The stack converter is a mechanism for trying all available converters until success. Well, the default is to try all converters, but this can be configured.
|
4 |
+
|
5 |
+
When calling `WebPConvert::convert($source, $destination, $options);`, you are actually invoking the stack converter.
|
6 |
+
|
7 |
+
## Passing options down to the individual converters
|
8 |
+
|
9 |
+
Any option that you pass to the Stack converter will be passed on to the individual converters. For example, setting options to the following will set the metadata option on all converters:
|
10 |
+
|
11 |
+
```php
|
12 |
+
$options = [
|
13 |
+
'metadata' => 'all',
|
14 |
+
];
|
15 |
+
```
|
16 |
+
|
17 |
+
If you need the option to be different for a single converter there are several ways to do it:
|
18 |
+
|
19 |
+
#### 1. Prefixing
|
20 |
+
|
21 |
+
Options prefixed with a converter id are only effective for that converter, and overrides the non-prefixed option.
|
22 |
+
|
23 |
+
Ie, the following will set "metadata" to "all" for all converters, except *cwebp*, where "metadata" is set to "exif"
|
24 |
+
|
25 |
+
```php
|
26 |
+
$options = [
|
27 |
+
'metadata' => 'all',
|
28 |
+
'cwebp-metadata' => 'exif'
|
29 |
+
];
|
30 |
+
```
|
31 |
+
|
32 |
+
Prefixing is by the way a general feature in the way options are handled and thus not confined to the stack converter. (though it admittedly only finds its use in the context of a stack converter).
|
33 |
+
|
34 |
+
|
35 |
+
#### 2. Using the `converter-options` option
|
36 |
+
The *converter-options* option is convenient for setting a whole bunch of converter-specific options in one go.
|
37 |
+
|
38 |
+
Example:
|
39 |
+
```php
|
40 |
+
$options = [
|
41 |
+
'converter-options' => [
|
42 |
+
'wpc' => [
|
43 |
+
'crypt-api-key-in-transfer' => true
|
44 |
+
'api-key' => 'my dog is white',
|
45 |
+
'api-url' => 'https://example.com/wpc.php',
|
46 |
+
'api-version' => 1,
|
47 |
+
],
|
48 |
+
],
|
49 |
+
]
|
50 |
+
```
|
51 |
+
|
52 |
+
#### 3. As part of the `converters` option
|
53 |
+
This option is explained further down this document.
|
54 |
+
|
55 |
+
|
56 |
+
## Modifying the stack
|
57 |
+
|
58 |
+
The default stack consists of the following converters:
|
59 |
+
- cwebp
|
60 |
+
- vips
|
61 |
+
- imagick
|
62 |
+
- gmagick
|
63 |
+
- imagemagick
|
64 |
+
- graphicsmagick
|
65 |
+
- wpc
|
66 |
+
- ewww
|
67 |
+
- gd
|
68 |
+
|
69 |
+
The order has carefully been chosen based on the capabilities of the converters. It is a rank, if you will.
|
70 |
+
|
71 |
+
Now, say that on your system, you only have *gd* working. With the default stack, this means that eight converters will be tested for operationality before getting to *gd* – each time a conversion is made. You might be tempted to optimizing the flow by putting *gd* on the top. *I would generally advise against this* for the following reasons:
|
72 |
+
|
73 |
+
1. It might be that one of the other (and better) converters starts working without you noticing. You will then miss out.
|
74 |
+
2. All converters have all been designed to exit very quickly when they are not operational. It only takes a few milliseconds for the library to detect that a converter is not operational - literally. For example, if no api key is provided for ewww, it will exit immediately.
|
75 |
+
|
76 |
+
However, there are valid reasons to modify the stack. For example, you may prefer *vips* over *cwebp*, or you may wish to remove a converter completely due to problems with that converter on your platform.
|
77 |
+
|
78 |
+
### Changing the order of the converters
|
79 |
+
To change the order, you can use the `preferred-converters` option. With this option you move selected converters to the top of the stack.
|
80 |
+
|
81 |
+
So, if you want the stack to start with *vips* and then *ewww*, but keep the rest of the order, you can set the following:
|
82 |
+
|
83 |
+
```php
|
84 |
+
$options[
|
85 |
+
'preferred-converters' => ['vips', 'ewww'];
|
86 |
+
];
|
87 |
+
```
|
88 |
+
|
89 |
+
### Removing converters from the stack
|
90 |
+
To remove converters, you can use the `skip` option and prefixing. For example, to remove *cwebp* and *gd*:
|
91 |
+
|
92 |
+
```php
|
93 |
+
$options = [
|
94 |
+
'ewww-skip' => true,
|
95 |
+
'cwebp-skip' => true,
|
96 |
+
];
|
97 |
+
```
|
98 |
+
|
99 |
+
### Adding converters to the stack
|
100 |
+
If you are using a custom converter, you can add it to the stack like this:
|
101 |
+
|
102 |
+
```php
|
103 |
+
$options = [
|
104 |
+
'extra-converters' => [
|
105 |
+
'\\MyNameSpace\\WonderConverter'
|
106 |
+
],
|
107 |
+
];
|
108 |
+
```
|
109 |
+
|
110 |
+
It will be added to the bottom of the stack. To place it differently, use the `preferred-converters` option and set it to ie `'preferred-converters' => ['vips','\\MyNameSpace\\WonderConverter']`
|
111 |
+
|
112 |
+
|
113 |
+
Here is an example which adds an extra ewww converter. This way you can have a backup api-key in case the quota of the first has been exceeded.
|
114 |
+
|
115 |
+
```
|
116 |
+
$options = [
|
117 |
+
'extra-converters' => [
|
118 |
+
[
|
119 |
+
'converter' => 'ewww',
|
120 |
+
'options' => [
|
121 |
+
'api-key' => 'provide-backup-key-here',
|
122 |
+
]
|
123 |
+
]
|
124 |
+
]
|
125 |
+
];
|
126 |
+
```
|
127 |
+
Note however that you will not be able to reorder that new ewww converter using `preferred-converters`, as there are now two converters with id=ewww, and that option has not been designed for that. Instead, you can add a sub-stack of ewww converters - see the "Stacking" section below.
|
128 |
+
|
129 |
+
|
130 |
+
### Setting the converter array explicitly
|
131 |
+
Using the `converters` option, you can set the converter array explicitly. What differentiates this from the `preferred-converters` option (besides that it completely redefines the converter ordering) is that it allows you to set both the converters *and* options for each converter in one go and that it allows a complex structure - such as a stack within a stack. Also, this structure can simplify things in some cases, such as when the options is generated by a GUI, as it is in WebP Express.
|
132 |
+
|
133 |
+
The array specifies the converters to try and their order. Each item can be:
|
134 |
+
|
135 |
+
- An id (ie "cwebp")
|
136 |
+
- A fully qualified class name (in case you have programmed your own custom converter)
|
137 |
+
- An array with two keys: "converter" and "options".
|
138 |
+
|
139 |
+
Example:
|
140 |
+
|
141 |
+
```php
|
142 |
+
$options = [
|
143 |
+
'quality' => 71,
|
144 |
+
'converters' => [
|
145 |
+
'cwebp',
|
146 |
+
[
|
147 |
+
'converter' => 'vips',
|
148 |
+
'options' => [
|
149 |
+
'quality' => 72
|
150 |
+
]
|
151 |
+
],
|
152 |
+
[
|
153 |
+
'converter' => 'ewww',
|
154 |
+
'options' => [
|
155 |
+
'quality' => 73
|
156 |
+
]
|
157 |
+
],
|
158 |
+
'wpc',
|
159 |
+
'imagemagick',
|
160 |
+
'\\MyNameSpace\\WonderConverter'
|
161 |
+
],
|
162 |
+
];
|
163 |
+
```
|
164 |
+
|
165 |
+
### Stacking
|
166 |
+
Stack converters behave just like regular converters. They ARE in fact "regular", as they extend the same base class as all converters. This means that you can have a stack within a stack. You can for example utilize this for supplying a backup api key for the ewww converter. Like this:
|
167 |
+
|
168 |
+
```php
|
169 |
+
$options = [
|
170 |
+
'ewww-skip' => true, // skip the default ewww converter (we use stack of ewww converters instead)
|
171 |
+
'extra-converters' => [
|
172 |
+
[
|
173 |
+
// stack of ewww converters
|
174 |
+
'converter' => 'stack',
|
175 |
+
'options' => [
|
176 |
+
'ewww-skip' => false, // do not skip ewww from here on
|
177 |
+
'converters' => [
|
178 |
+
[
|
179 |
+
'converter' => 'ewww',
|
180 |
+
'options' => [
|
181 |
+
'api-key' => 'provide-preferred-key-here',
|
182 |
+
]
|
183 |
+
],
|
184 |
+
[
|
185 |
+
'converter' => 'ewww',
|
186 |
+
'options' => [
|
187 |
+
'api-key' => 'provide-backup-key-here',
|
188 |
+
]
|
189 |
+
]
|
190 |
+
],
|
191 |
+
]
|
192 |
+
]
|
193 |
+
],
|
194 |
+
'preferred-converters' => ['cwebp', 'vips', 'stack'], // set our stack of ewww converters third in queue
|
195 |
+
];
|
196 |
+
```
|
197 |
+
Note that we set `ewww-skip` in order to disable the *ewww* converter which is part of the defaults. As options are inherited, we have to reset this option again. These steps are not necessary when using the `converters` option.
|
198 |
+
|
199 |
+
Also note that the options for modifying the converters (`converters`, `extra-converters`, `converter-options`) does not get passed down.
|
200 |
+
|
201 |
+
Also note that if you want to add two stacks with `extra-converters`, the `preferred-converters` option will not work, as there are two converters called "stack". One workaround is to add those two stacks to their own stack, so you have three levels. Or you can of course simply use the `converters` option to get complete control.
|
202 |
+
|
203 |
+
|
204 |
+
### Shuffling
|
205 |
+
|
206 |
+
The stack can be configured to shuffling, meaning that the the order will be random. This can for example be used to balance load between several wpc instances in a sub stack.
|
207 |
+
|
208 |
+
Shuffling is enabled with the `shuffle` option.
|
209 |
+
|
210 |
+
Here is an example of balancing load between several *wpc* instances:
|
211 |
+
|
212 |
+
```php
|
213 |
+
$options = [
|
214 |
+
'wpc-skip' => true, // skip the default wpc converter (we use stack of wpc converters instead)
|
215 |
+
'extra-converters' => [
|
216 |
+
[
|
217 |
+
// stack of wpc converters
|
218 |
+
'converter' => 'stack',
|
219 |
+
'options' => [
|
220 |
+
'wpc-skip' => false, // do not skip wpc from here on
|
221 |
+
'shuffle' => true,
|
222 |
+
|
223 |
+
'converters' => [
|
224 |
+
[
|
225 |
+
'converter' => 'wpc',
|
226 |
+
'options' => [
|
227 |
+
'api-key' => 'my-dog',
|
228 |
+
'api-url' => 'my-wpc.com/wpc.php',
|
229 |
+
'api-version' => 1,
|
230 |
+
'crypt-api-key-in-transfer' => true,
|
231 |
+
]
|
232 |
+
],
|
233 |
+
[
|
234 |
+
'converter' => 'wpc',
|
235 |
+
'options' => [
|
236 |
+
'api-key' => 'my-other-dog',
|
237 |
+
'api-url' => 'my-other-wpc.com/wpc.php',
|
238 |
+
'api-version' => 1,
|
239 |
+
'crypt-api-key-in-transfer' => true,
|
240 |
+
]
|
241 |
+
]
|
242 |
+
],
|
243 |
+
]
|
244 |
+
]
|
245 |
+
],
|
246 |
+
'preferred-converters' => ['cwebp', 'vips', 'stack'], // set our stack of wpc converters third in queue
|
247 |
+
];
|
248 |
+
```
|
vendor/rosell-dk/webp-convert/docs/v2.0/converting/dice.png
ADDED
Binary file
|
vendor/rosell-dk/webp-convert/docs/v2.0/converting/introduction-for-converting.md
ADDED
@@ -0,0 +1,251 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Introduction to converting with WebPConvert
|
2 |
+
|
3 |
+
The library is able to convert images to webp using a variety of methods (*gd*, *imagick*, *vips* etc.), which we call "converters". A converter is called like this:
|
4 |
+
|
5 |
+
```php
|
6 |
+
use WebPConvert\Convert\Converters\Gd;
|
7 |
+
|
8 |
+
Gd::convert($source, $destination, $options=[], $logger=null);
|
9 |
+
```
|
10 |
+
|
11 |
+
All converters comes with requirements. For example, the *Gd* converter requires that Gd is installed and compiled with webp support. The cloud converters requires an api key. In case the conversion fails, an exception is thrown.
|
12 |
+
|
13 |
+
## Insights to the process
|
14 |
+
If *$logger* is supplied, the converter will log the details of how the conversion process went to that logger. You can for example use the supplied *EchoLogger* to print directly to screen or the *BufferLogger* to collect the log entries. Here is a simple example which prints the process to screen:
|
15 |
+
|
16 |
+
```php
|
17 |
+
use WebPConvert\Convert\Converters\Gd;
|
18 |
+
use WebPConvert\Loggers\EchoLogger;
|
19 |
+
|
20 |
+
Gd::convert($source, $destination, $options=[], new EchoLogger());
|
21 |
+
```
|
22 |
+
|
23 |
+
It will output something like this:
|
24 |
+
|
25 |
+
```text
|
26 |
+
GD Version: 2.2.5
|
27 |
+
image is true color
|
28 |
+
Quality set to same as source: 61
|
29 |
+
|
30 |
+
Converted image in 20 ms, reducing file size with 34% (went from 12 kb to 8 kb)
|
31 |
+
```
|
32 |
+
|
33 |
+
## The stack converter
|
34 |
+
When your software is going to be installed on a variety of systems which you do not control, you can try the converters one at the time until success. The converters has been designed to exit quickly when system requirements are not met. To make this task easy, a *Stack* converter has been created.
|
35 |
+
|
36 |
+
The stack converter has two special options:
|
37 |
+
|
38 |
+
| option | description |
|
39 |
+
| ------------------------- | ----------- |
|
40 |
+
| converters (array) | Converters to try (ids or class names, in case you have your own custom converter) |
|
41 |
+
| converter-options (array) | Extra options for specific converters. |
|
42 |
+
|
43 |
+
Alternatively to the converter-options array, you can simply prefix options with the converter id.
|
44 |
+
|
45 |
+
I recommend leave the converters array at the default unless you have strong reasons not to. Otherwise you might miss out when new converters are added.
|
46 |
+
|
47 |
+
### Example:
|
48 |
+
|
49 |
+
```php
|
50 |
+
use WebPConvert\Convert\Converters\Stack;
|
51 |
+
|
52 |
+
Stack::convert($source, $destination, $options = [
|
53 |
+
|
54 |
+
// PS: only set converters if you have strong reasons to do so
|
55 |
+
'converters' => [
|
56 |
+
'cwebp', 'vips', 'imagick', 'gmagick', 'imagemagick', 'graphicsmagick', 'wpc', 'ewww', 'gd'
|
57 |
+
],
|
58 |
+
|
59 |
+
// Any available options can be set here, they dribble down to all converters.
|
60 |
+
'metadata' => 'all',
|
61 |
+
|
62 |
+
// To override for specific converter, you can prefix with converter id:
|
63 |
+
'cwebp-metadata' => 'exif',
|
64 |
+
|
65 |
+
// This can for example be used for setting ewww api key:
|
66 |
+
'ewww-api-key' => 'your-ewww-api-key-here',
|
67 |
+
|
68 |
+
// As an alternative to prefixing, you can use "converter-options" to set a whole bunch of overrides in one go:
|
69 |
+
'converter-options' => [
|
70 |
+
'wpc' => [
|
71 |
+
'crypt-api-key-in-transfer' => true
|
72 |
+
'api-key' => 'my dog is white',
|
73 |
+
'api-url' => 'https://example.com/wpc.php',
|
74 |
+
'api-version' => 1,
|
75 |
+
],
|
76 |
+
],
|
77 |
+
], $logger=null);
|
78 |
+
```
|
79 |
+
|
80 |
+
Note: As an alternative to setting the third party credentials in the options, you can set them through constants or environment variables ("WEBPCONVERT_EWWW_API_KEY", "WEBPCONVERT_WPC_API_KEY", "WEBPCONVERT_WPC_API_URL"). Paths to binaries can also be set like that (it is rarely needed to do this): "WEBPCONVERT_CWEBP_PATH", "WEBPCONVERT_GRAPHICSMAGICK_PATH" and WEBPCONVERT_IMAGEMAGICK_PATH"
|
81 |
+
|
82 |
+
To set an environment variable in Apache, you can add a line like this in your `.htaccess` or vhost configuration:
|
83 |
+
```
|
84 |
+
# Set ewww api key for WebP Convert
|
85 |
+
SetEnv WEBPCONVERT_EWWW_API_KEY yourVerySecretApiKeyGoesHere
|
86 |
+
|
87 |
+
# Set custom path to imagick for WebP Convert
|
88 |
+
SetEnv WEBPCONVERT_IMAGEMAGICK_PATH /usr/local/bin/magick
|
89 |
+
```
|
90 |
+
To set a constant:
|
91 |
+
```php
|
92 |
+
define('WEBPCONVERT_IMAGEMAGICK_PATH', '/usr/local/bin/magick');
|
93 |
+
```
|
94 |
+
|
95 |
+
|
96 |
+
## Configuring the options
|
97 |
+
|
98 |
+
### Preventing unnecessarily high quality setting for low quality jpegs
|
99 |
+
**Q:** What do you get if you convert a low quality jpeg (ie q=50) into a high quality webp (ie q=90) ?\
|
100 |
+
**A:** You maintain the low quality, but you get a large file`
|
101 |
+
|
102 |
+
What should we have done instead? We should have converted with a quality around 50. Of course, quality is still low - we cannot fix that - but it will not be less, *and the converted file will be much smaller*.
|
103 |
+
|
104 |
+
As unnecessary large conversions are rarely desirable, this library per default limits the quality setting so it does not exceed that of the source. This functionality requires that either *imagemagick*, *graphicsmagick* or *imagick* is installed (not necessarily compiled with webp support). When they are, all converters will have the "auto-limit" functionality. Otherwise, only *wpc* will support it (provided that one of these libraries is installed on the server of the cloud service).
|
105 |
+
|
106 |
+
How much can be gained? A lot!
|
107 |
+
The following low quality (q=50) jpeg weighs 54 kb. If this is converted to webp with quality=80, the size of the converted file is 52kb - almost no reduction! With auto-limit, the quality of the webp will be set to 50, and the size will be 34kb. Visually, the results are indistinguable.
|
108 |
+
|
109 |
+
![A low quality jpeg](https://raw.githubusercontent.com/rosell-dk/webp-convert/master/docs/v2.0/converting/architecture-q50-w600.jpg)
|
110 |
+
|
111 |
+
### Auto selecting between lossless/lossy encoding
|
112 |
+
WebP files can be encoded using either *lossless* or *lossy* encoding. The JPEG format is lossy and the PNG is lossless. However, this does not mean that you necessarily get the best conversion by always encoding JPEG to lossy and PNG to lossless. With JPEGs it is often the case, as they are usually pictures and pictures usually best encoded as lossy. With PNG it is however a different story, as you often can get a better compression using lossy encoding, also when using high quality level of say 85, which should be enough for the web.
|
113 |
+
|
114 |
+
As unnecessary large conversions are rarely desirable, this library per default tries to convert images using both lossy and lossless encoding and automatically selects the smallest. This is controlled using the *encoding* option, which per default is "auto", but can also be set to "lossy" or "lossless".
|
115 |
+
|
116 |
+
As an example, the following PNG (231 kb) will be compressed to 156 kb when converting to *lossless* webp. But when converting to *lossy* (quality: 85), it is compressed to merely 68 kb - less than half. (in case you are confused about the combination of lossy and transparency: Yes, you can have both at the same time with webp).
|
117 |
+
|
118 |
+
![Dice](https://raw.githubusercontent.com/rosell-dk/webp-convert/master/docs/v2.0/converting/dice.png)
|
119 |
+
|
120 |
+
Unless you changed the `near-lossless` option described below, the choice is actually between lossy and *near-lossless*.
|
121 |
+
|
122 |
+
Note that *gd* and *ewww* does not support this feature. *gd* can only produce lossy, and will simply do that. *ewww* can not be configured to use a certain encoding, but automatically chooses *lossless* encoding for PNGs and lossy for JPEGs.
|
123 |
+
|
124 |
+
### Near-lossless
|
125 |
+
*cwebp* and *vips* supports "near-lossless" mode. Near lossless produces a webp with lossless encoding but adjusts pixel values to help compressibility. The result is a smaller file. The price is described as a minimal impact on the visual quality.
|
126 |
+
|
127 |
+
As unnecessary large conversions are rarely desirable, this library per default sets *near-lossless* to 60. To disable near-lossless, set it to 100.
|
128 |
+
|
129 |
+
When compressing the image above (231 kb) to lossless, it compressed to 156 kb when near-lossless is set to 100. Setting near-lossless to 60 gets the size down to 110 kb while still looking great.
|
130 |
+
|
131 |
+
You can read more about the near-lossless mode [here](https://groups.google.com/a/webmproject.org/forum/#!topic/webp-discuss/0GmxDmlexek)
|
132 |
+
|
133 |
+
### Alpha-quality
|
134 |
+
All converters, except *gd* and *ewww* supports "alpha-quality" option. This allows lossy compressing of the alpha channel.
|
135 |
+
|
136 |
+
As unnecessary large conversions are rarely desirable, this library per default sets *alpha-quality* to 85. Set it to 100 to achieve lossless compression of alhpa.
|
137 |
+
|
138 |
+
Btw, the image above gets compressed to 68 kb with alpha quality set to 100. Surprisingly, it gets slightly larger (70 kb) with alpha quality set to 85. Setting alpha quality to 50 gets it down to merely 35 kb - about half - while still looking great.
|
139 |
+
|
140 |
+
You can read more about the alpha-quality option [here](https://developers.google.com/speed/webp/docs/cwebp) and [here](https://www.smashingmagazine.com/2018/07/converting-images-to-webp/)
|
141 |
+
|
142 |
+
### Sharp YUV
|
143 |
+
libwebp has an overlooked option which improves accuracy for RGB to YUV mapping at the price for longer conversion time. You can control it with the new 'sharp-yuv' option (introduced in webp-convert 2.6.0). Read an appraisal of the option [here](https://www.ctrl.blog/entry/webp-sharp-yuv.html).
|
144 |
+
|
145 |
+
### Tip: don't set quality too high...
|
146 |
+
**Q:** What do you get if you convert an excessively high quality jpeg into an excessively high quality webp?\
|
147 |
+
**A:** An excessively big file
|
148 |
+
|
149 |
+
The size of a webp file grows enormously with the quality setting. For the web however, a quality above 75 is rarely needed. For this reason the library has a per default sets the quality to 75 for jpegs.
|
150 |
+
|
151 |
+
So, how much can be gained? A lot!
|
152 |
+
The following excessively high quality jpeg (q=100) weighs 146 kb. Converting it to webp with quality=100 results in a 99kb image. Converting it to quality=85 results in a 40kb image.
|
153 |
+
|
154 |
+
![A (too) high quality jpeg](https://raw.githubusercontent.com/rosell-dk/webp-convert/master/docs/v2.0/converting/mouse-q100.jpg)
|
155 |
+
|
156 |
+
### PNG og JPEG-specific options.
|
157 |
+
|
158 |
+
To have options depending on the image type of the source, you can use the `png` and `jpeg` keys.
|
159 |
+
|
160 |
+
The following options mimics the default behaviour (version 2.0 - 2.5):
|
161 |
+
|
162 |
+
```php
|
163 |
+
$options = [
|
164 |
+
'png' => [
|
165 |
+
'encoding' => 'auto', /* Try both lossy and lossless and pick smallest */
|
166 |
+
'near-lossless' => 60, /* The level of near-lossless image preprocessing (when trying lossless) */
|
167 |
+
'quality' => 85, /* Quality when trying lossy. It is set high because pngs is often selected to ensure high quality */
|
168 |
+
'sharp-yuv' => true,
|
169 |
+
],
|
170 |
+
'jpeg' => [
|
171 |
+
'encoding' => 'auto', /* If you are worried about the longer conversion time, you could set it to "lossy" instead (lossy will often be smaller than lossless for jpegs) */
|
172 |
+
'quality' => 'auto', /* Set to same as jpeg (requires imagick or gmagick extension, not necessarily compiled with webp) */
|
173 |
+
'max-quality' => 80, /* Only relevant if quality is set to "auto" */
|
174 |
+
'default-quality' => 75, /* Fallback quality if quality detection isnt working */
|
175 |
+
'sharp-yuv' => true,
|
176 |
+
]
|
177 |
+
];
|
178 |
+
```
|
179 |
+
PS: From version 2.6 on, you should use the new "auto-limit" option instead of setting quality to "auto".
|
180 |
+
|
181 |
+
The following options mimics the default behaviour (version 2.6 and forth):
|
182 |
+
|
183 |
+
```php
|
184 |
+
$options = [
|
185 |
+
'png' => [
|
186 |
+
'encoding' => 'auto', /* Try both lossy and lossless and pick smallest */
|
187 |
+
'near-lossless' => 60, /* The level of near-lossless image preprocessing (when trying lossless) */
|
188 |
+
'quality' => 85, /* Quality when trying lossy. It is set high because pngs is often selected to ensure high quality */
|
189 |
+
'sharp-yuv' => true,
|
190 |
+
],
|
191 |
+
'jpeg' => [
|
192 |
+
'encoding' => 'auto', /* If you are worried about the longer conversion time, you could set it to "lossy" instead (lossy will often be smaller than lossless for jpegs) */
|
193 |
+
'quality' => 75, /* Quality when trying lossy. It is set a bit lower for jpeg than png */
|
194 |
+
'auto-limit' => true, /* Prevents using a higher quality than that of the source (requires imagick or gmagick extension, not necessarily compiled with webp) */
|
195 |
+
'sharp-yuv' => true,
|
196 |
+
]
|
197 |
+
];
|
198 |
+
```
|
199 |
+
|
200 |
+
The *png* and *jpeg* options can hold any other option - also the converter specific options.
|
201 |
+
A use case could for example be to use different converters for png and jpeg:
|
202 |
+
|
203 |
+
```php
|
204 |
+
$options = [
|
205 |
+
'png' => [
|
206 |
+
'converters' => ['ewww'],
|
207 |
+
],
|
208 |
+
'jpeg' => [
|
209 |
+
'converters' => ['gd'],
|
210 |
+
]
|
211 |
+
];
|
212 |
+
```
|
213 |
+
|
214 |
+
## Available options
|
215 |
+
|
216 |
+
**All** available options are documented [here](https://github.com/rosell-dk/webp-convert/blob/master/docs/v2.0/converting/options.md).
|
217 |
+
|
218 |
+
Here is a quick overview of the few ones discussed here.
|
219 |
+
|
220 |
+
### Version 2.0 - 2.5
|
221 |
+
|
222 |
+
| Option | Default (jpeg) | Default (png) | Description |
|
223 |
+
| ----------------- | ------------------ | ------------------- | ---------------------------------------------------------------------------------- |
|
224 |
+
| quality | "auto" | 85 | See the "Auto quality" section above. |
|
225 |
+
| max-quality | 85 | 85 | Only relevant for jpegs and when quality is set to "auto". |
|
226 |
+
| default-quality | 75 | 85 | |
|
227 |
+
| metadata | "none" | "none" | Valid values: "all", "none", "exif", "icc", "xmp".<br><br>Note: Currently only *cwebp* supports all values. *gd* will always remove all metadata. *ewww*, *imagick* and *gmagick* can either strip all, or keep all (they will keep all, unless metadata is set to *none*) |
|
228 |
+
| encoding | "auto" | "auto" | See the "Auto selecting between lossless/lossy encoding" section above |
|
229 |
+
| jpeg | - | - | Array of options which will be merged into the other options when source is a JPEG |
|
230 |
+
| png | - | - | Array of options which will be merged into the other options when source is a PNG |
|
231 |
+
| skip | false | false | If true, conversion will be skipped (ie for skipping png conversion for some converters) |
|
232 |
+
|
233 |
+
### Version > 2.6
|
234 |
+
|
235 |
+
| Option | Default (jpeg) | Default (png) | Description |
|
236 |
+
| ----------------- | ------------------ | ------------------- | ---------------------------------------------------------------------------------- |
|
237 |
+
| quality | 75 | 85 | Quality for lossy encoding |
|
238 |
+
| auto-limit | true | true | Only relevant for jpegs and lossy encoding |
|
239 |
+
| metadata | "none" | "none" | Valid values: "all", "none", "exif", "icc", "xmp".<br><br>Note: Currently only *cwebp* supports all values. *gd* will always remove all metadata. *ewww*, *imagick* and *gmagick* can either strip all, or keep all (they will keep all, unless metadata is set to *none*) |
|
240 |
+
| encoding | "auto" | "auto" | See the "Auto selecting between lossless/lossy encoding" section above |
|
241 |
+
| jpeg | - | - | Array of options which will be merged into the other options when source is a JPEG |
|
242 |
+
| png | - | - | Array of options which will be merged into the other options when source is a PNG |
|
243 |
+
| skip | false | false | If true, conversion will be skipped (ie for skipping png conversion for some converters) |
|
244 |
+
|
245 |
+
|
246 |
+
## More info
|
247 |
+
|
248 |
+
- The complete api is available [here](https://www.bitwise-it.dk/webp-convert/api/2.0/html/index.xhtml)
|
249 |
+
- The converters are described in more detail here (for 1.3.9): [docs/v1.3/converting/converters.md](https://github.com/rosell-dk/webp-convert/blob/master/docs/v1.3/converting/converters.md).
|
250 |
+
- On the github wiki you can find installation instructions for imagick with webp, gd with webp, etc.
|
251 |
+
- This document is a newly written introduction to the convert api, which has been created as part of the 2.0 release. The old introduction, which was made for 1.3 is available here: [docs/converting/v1.3/convert.md](https://github.com/rosell-dk/webp-convert/blob/master/docs/v1.3/converting/convert.md).
|
vendor/rosell-dk/webp-convert/docs/v2.0/converting/mouse-q100.jpg
ADDED
Binary file
|
vendor/rosell-dk/webp-convert/docs/v2.0/converting/options.md
ADDED
@@ -0,0 +1,402 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Options
|
2 |
+
|
3 |
+
This is a list of all options available for converting.
|
4 |
+
|
5 |
+
Note that as the *stack* and *wpc* converters delegates the options to their containing converters, the options that they supports depend upon the converters they have been configured to use (and which of them that are operational)<br><br>
|
6 |
+
|
7 |
+
## General options
|
8 |
+
|
9 |
+
### `alpha-quality`
|
10 |
+
```
|
11 |
+
Type: integer (0-100)
|
12 |
+
Default: 85
|
13 |
+
Supported by: cwebp, vips, imagick, gmagick, imagemagick and graphicsmagick
|
14 |
+
```
|
15 |
+
Quality of alpha channel. Often, there is no need for high quality transparency layer and in some cases you can tweak this all the way down to 10 and save a lot in file size. The option only has effect with lossy encoding, and of course only on images with transparency (so it is irrelevant when converting jpegs). Read more about tweaking the option [here](https://github.com/rosell-dk/webp-convert/blob/master/docs/v2.0/converting/introduction-for-converting.md#alpha-quality)<br><br>
|
16 |
+
|
17 |
+
### `auto-filter`
|
18 |
+
```
|
19 |
+
Type: boolean
|
20 |
+
Default: false
|
21 |
+
Supported by: cwebp, vips, imagick, gmagick, imagemagick and graphicsmagick
|
22 |
+
```
|
23 |
+
Turns auto-filter on. This algorithm will spend additional time optimizing the filtering strength to reach a well-balanced quality. Unfortunately, it is extremely expensive in terms of computation. It takes about 5-10 times longer to do a conversion. A 1MB picture which perhaps typically takes about 2 seconds to convert, will takes about 15 seconds to convert with auto-filter. So in most cases, you will want to leave this at its default, which is off.<br><br>
|
24 |
+
|
25 |
+
### `auto-limit`
|
26 |
+
```
|
27 |
+
Type: boolean
|
28 |
+
Default: true
|
29 |
+
Supported by: all
|
30 |
+
```
|
31 |
+
Limits the quality to be no more than that of the jpeg. The option is only relevant when converting jpegs to lossy webp. To be functional, webp-convert needs to be able to detect the quality of the jpeg, which requires ImageMagick or GraphicsMagick. Read about the option in the [introduction](https://github.com/rosell-dk/webp-convert/blob/master/docs/v2.0/converting/introduction-for-converting.md#auto-quality). In 2.7.0, it will become possible to adjust the limit with a new option. I'm currently debating with myself how this should work. Your comments and opinions would be appreciated - [here](https://github.com/rosell-dk/webp-convert/issues/289)
|
32 |
+
|
33 |
+
### `converter` (new in 2.8.0)
|
34 |
+
```
|
35 |
+
Type: string
|
36 |
+
Default: null
|
37 |
+
Supported by: WebPConvert::convert method
|
38 |
+
```
|
39 |
+
Simplifies using a specific converter. Before this option, you would either need to call the converter class (ie `Ewww::convert`) (not very flexible), or set the stack to contain just one converter (unnecessary overhead). If you do not use this option, `WebPConvert::convert` works as normal (it calls `Stack::convert`), if you do use it, it hands over the converting to the converter specified (specified by id, ie. "cwebp").
|
40 |
+
|
41 |
+
### `default-quality` (DEPRECATED)
|
42 |
+
```
|
43 |
+
Type: integer (0-100)
|
44 |
+
Default: 75 for jpegs and 85 for pngs
|
45 |
+
Supported by: all (cwebp, ewww, gd, ffmpeg, gmagick, graphicsmagick, imagick, imagemagick, vips)
|
46 |
+
```
|
47 |
+
This option has been deprecated. See why [here](https://github.com/rosell-dk/webp-convert/issues/281). It was used to determine the quality in case auto limiting was not available.<br><br>
|
48 |
+
|
49 |
+
### `encoding`
|
50 |
+
```
|
51 |
+
Type: string ("lossy" | "lossless" | "auto")
|
52 |
+
Default: "auto"
|
53 |
+
Supported by: cwebp, vips, ffmpeg, imagick, gmagick, imagemagick and graphicsmagick (gd always uses lossy encoding, ewww uses lossless for pngs and lossy for jpegs)
|
54 |
+
```
|
55 |
+
Set encoding for the webp. If you choose "auto", webp-convert will convert to both lossy and lossless and pick the smallest result. Read more about this option in the ["lossy/lossless" section in the introduction](https://github.com/rosell-dk/webp-convert/blob/master/docs/v2.0/converting/introduction-for-converting.md#auto-selecting-between-losslesslossy-encoding).<br><br>
|
56 |
+
|
57 |
+
### `ewww-api-key`
|
58 |
+
```
|
59 |
+
Type: string
|
60 |
+
Default: ''
|
61 |
+
Supported by: ewww
|
62 |
+
```
|
63 |
+
Api key for the ewww converter. The option is actually called *api-key*, however, any option can be prefixed with a converter id to only apply to that converter. As this option is only for the ewww converter, it is natural to use the "ewww-" prefix.
|
64 |
+
|
65 |
+
Note: This option can alternatively be set through the *EWWW_API_KEY* environment variable.<br><br>
|
66 |
+
|
67 |
+
### `ewww-check-key-status-before-converting`
|
68 |
+
```
|
69 |
+
Type: boolean
|
70 |
+
Default: true
|
71 |
+
Supported by: ewww
|
72 |
+
```
|
73 |
+
Decides whether or not the ewww service should be invoked in order to check if the api key is valid. Doing this for every conversion is not optimal. However, it would be worse if the service was contacted repeatedly to do conversions with an invalid api key - as conversion requests carries a big upload with them. As this library cannot prevent such repeated failures (it is stateless), it per default does the additional check. However, your application can prevent it from happening by picking up invalid / exceeded api keys discovered during conversion. Such failures are stored in `Ewww::$nonFunctionalApiKeysDiscoveredDuringConversion` (this is also set even though a converter later in the stack succeeds. Do not only read this value off in a catch clauses).
|
74 |
+
|
75 |
+
You should only set this option to *false* if you handle when the converter discovers invalid api keys during conversion.
|
76 |
+
|
77 |
+
### `jpeg`
|
78 |
+
```
|
79 |
+
Type: array
|
80 |
+
Default: []
|
81 |
+
Supported by: all
|
82 |
+
```
|
83 |
+
Override selected options when the source is a jpeg. The options provided here are simply merged into the other options when the source is a jpeg.
|
84 |
+
Read about this option in the [introduction](https://github.com/rosell-dk/webp-convert/blob/master/docs/v2.0/converting/introduction-for-converting.md#png-og-jpeg-specific-options).<br><br>
|
85 |
+
|
86 |
+
### `log-call-arguments`
|
87 |
+
```
|
88 |
+
Type: boolean
|
89 |
+
Default: false
|
90 |
+
Supported by: all
|
91 |
+
```
|
92 |
+
Enabling this simply puts some more in the log - namely the arguments that was supplied to the call. Sensitive information is starred out.
|
93 |
+
|
94 |
+
### `low-memory`
|
95 |
+
```
|
96 |
+
Type: boolean
|
97 |
+
Default: false
|
98 |
+
Supported by: cwebp, imagick, imagemagick and graphicsmagick
|
99 |
+
```
|
100 |
+
Reduce memory usage of lossy encoding at the cost of ~30% longer encoding time and marginally larger output size. Only effective when the *method* option is 3 or more. Read more in [the docs](https://developers.google.com/speed/webp/docs/cwebp).<br><br>
|
101 |
+
|
102 |
+
### `max-quality` (DEPRECATED)
|
103 |
+
```
|
104 |
+
Type: integer (0-100)
|
105 |
+
Default: 85
|
106 |
+
Supported by: all (cwebp, ewww, ffmpeg, gd, gmagick, graphicsmagick, imagick, imagemagick, vips)
|
107 |
+
```
|
108 |
+
This option has been deprecated. See why [here](https://github.com/rosell-dk/webp-convert/issues/281)<br><br>
|
109 |
+
|
110 |
+
### `metadata`
|
111 |
+
```
|
112 |
+
Type: string ("all" | "none" | "exif" | "icc" | "xmp" | "exif,icc" | "exif,xmp" | "icc,xmp")
|
113 |
+
Default: 'none'
|
114 |
+
Supported by: Only *cwebp* supports "exif", "icc" and "xmp". *gd* cannot copy metadata. *ffmpeg* always copies metadata. The rest supports "all" and "none" (ewww, gmagick, graphicsmagick, imagick, imagemagick, vips)
|
115 |
+
```
|
116 |
+
Determines which metadata that should be copied over to the webp. Setting it to "all" preserves all metadata, setting it to "none" strips all metadata. *cwebp* can take a comma-separated list of which kinds of metadata that should be copied (ie "exif,icc"). *gd* will always remove all metadata and *ffmpeg* will always keep all metadata. The rest can either strip all or keep all (they will keep all, unless the option is set to *none*).<br><br>
|
117 |
+
|
118 |
+
### `method`
|
119 |
+
```
|
120 |
+
Type: integer (0-6)
|
121 |
+
Default: 6
|
122 |
+
Supported by: cwebp, vips, imagick, gmagick, imagemagick, graphicsmagick and ffmpeg
|
123 |
+
```
|
124 |
+
This parameter controls the trade off between encoding speed and the compressed file size and quality. Possible values range from 0 to 6. 0 is fastest. 6 results in best quality. PS: "method" is not a very descriptive name, but this is what its called in libwebp, which is why we also choose it for webpconvert. In ffmpeg, they renamed it "compression_level", in vips, they call it "reduction_effort". Both better names, but as said, use "method" with webpconvert<br><br>
|
125 |
+
|
126 |
+
### `near-lossless`
|
127 |
+
```
|
128 |
+
Type: integer (0-100)
|
129 |
+
Default: 60
|
130 |
+
Supported by: cwebp, vips
|
131 |
+
```
|
132 |
+
This option allows you to get impressively better compression for lossless encoding, with minimal impact on visual quality. The result is still lossless (lossless encoding). What libwebp does is that it preprocesses the image before encoding it, in order to make it better suited for compression. The range is 0 (maximum preprocessing) to 100 (no preprocessing). A good compromise would be around 60. The option is ignored when encoding is set to lossy. Read more [here](https://github.com/rosell-dk/webp-convert/blob/master/docs/v2.0/converting/introduction-for-converting.md#near-lossless).<br><br>
|
133 |
+
|
134 |
+
### `png`
|
135 |
+
```
|
136 |
+
Type: array
|
137 |
+
Default: []
|
138 |
+
Supported by: all
|
139 |
+
```
|
140 |
+
Override selected options when the source is a png. The options provided here are simply merged into the other options when the source is a png.
|
141 |
+
Read about this option in the [introduction](https://github.com/rosell-dk/webp-convert/blob/master/docs/v2.0/converting/introduction-for-converting.md#png-og-jpeg-specific-options).<br><br>
|
142 |
+
|
143 |
+
### `preset`
|
144 |
+
```
|
145 |
+
Type: string ('none', 'default', 'photo', 'picture', 'drawing', 'icon' or 'text')
|
146 |
+
Default: "none"
|
147 |
+
Supported by: cwebp, vips, gmagick, graphicsmagick, imagick, imagemagick, ffmpeg
|
148 |
+
```
|
149 |
+
Using a preset will set many of the other options to suit a particular type of source material. It even overrides them. It does however not override the quality option. "none" means that no preset will be set. PS: The imagemagick family only partly supports this setting, as they have grouped three of the options ("drawing", "icon" and "text") into "graph". So if you for example set "preset" to "icon" with the imagemagick converter, imagemagick will be executed like this: "-define webp:image-hint='graph'".<br><br>
|
150 |
+
|
151 |
+
### `quality`
|
152 |
+
```
|
153 |
+
Type: integer (0-100) | "auto" ("auto" is now deprecated - use the "auto-limit" option instead)
|
154 |
+
Default: 75 for jpegs and 85 for pngs
|
155 |
+
Supported by: all (cwebp, ewww, gd, gmagick, graphicsmagick, imagick, imagemagick, vips, ffmpeg)
|
156 |
+
```
|
157 |
+
Quality for lossy encoding.<br><br>
|
158 |
+
|
159 |
+
### `sharp-yuv`
|
160 |
+
```
|
161 |
+
Type: boolean
|
162 |
+
Default: true
|
163 |
+
Supported by: cwebp, vips, gmagick, graphicsmagick, imagick, imagemagick
|
164 |
+
```
|
165 |
+
Better RGB->YUV color conversion (sharper and more accurate) at the expense of a little extra conversion time. Read more [here](https://www.ctrl.blog/entry/webp-sharp-yuv.html).
|
166 |
+
|
167 |
+
### `size-in-percentage`
|
168 |
+
```
|
169 |
+
Type: integer (0-100) | null
|
170 |
+
Default: null
|
171 |
+
Supported by: cwebp
|
172 |
+
```
|
173 |
+
This option sets the file size, *cwebp* should aim for, in percentage of the original. If you for example set it to *45*, and the source file is 100 kb, *cwebp* will try to create a file with size 45 kb (we use the `-size` option). This is an excellent alternative to the "quality:auto" option. If the quality detection isn't working on your system (and you do not have the rights to install imagick or gmagick), you should consider using this options instead. *Cwebp* is generally able to create webp files with the same quality at about 45% the size. So *45* would be a good choice. The option overrides the quality option. And note that it slows down the conversion - it takes about 2.5 times longer to do a conversion this way, than when quality is specified. Default is *off* (null).<br><br>
|
174 |
+
|
175 |
+
### `skip`
|
176 |
+
```
|
177 |
+
Type: boolean
|
178 |
+
Default: false
|
179 |
+
Supported by: all
|
180 |
+
```
|
181 |
+
Simply skips conversion. For example this can be used to skip png conversion for a specific converter like this:
|
182 |
+
```php
|
183 |
+
$options = [
|
184 |
+
'png' => [
|
185 |
+
'gd-skip' => true,
|
186 |
+
]
|
187 |
+
];
|
188 |
+
```
|
189 |
+
|
190 |
+
Or it can be used to skip unwanted converters from the default stack, like this:
|
191 |
+
```php
|
192 |
+
$options = [
|
193 |
+
'ewww-skip' => true,
|
194 |
+
'wpc-skip' => true,
|
195 |
+
'gd-skip' => true,
|
196 |
+
'imagick-skip' => true,
|
197 |
+
'gmagick-skip' => true,
|
198 |
+
];
|
199 |
+
```
|
200 |
+
<br>
|
201 |
+
|
202 |
+
### `use-nice`
|
203 |
+
```
|
204 |
+
Type: boolean
|
205 |
+
Default: false
|
206 |
+
Supported by: cwebp, graphicsmagick, imagemagick, ffmpeg
|
207 |
+
```
|
208 |
+
This option only applies to converters which are using exec() to execute a binary directly on the host. If *use-nice* is set, it will be examined if the [`nice`]( https://en.wikipedia.org/wiki/Nice_(Unix)) command is available on the host. If it is, the binary is executed using *nice*. This assigns low priority to the process and will save system resources - but result in slower conversion.<br><br>
|
209 |
+
|
210 |
+
|
211 |
+
# Options unique for individual converters
|
212 |
+
|
213 |
+
## cwebp options
|
214 |
+
Options unique to the "cwebp" converter
|
215 |
+
|
216 |
+
### `command-line-options`
|
217 |
+
```
|
218 |
+
Type: string
|
219 |
+
Default: ''
|
220 |
+
Supported by: cwebp
|
221 |
+
```
|
222 |
+
This allows you to set any parameter available for cwebp in the same way as you would do when executing *cwebp*. You could ie set it to "-sharpness 5 -mt -crop 10 10 40 40". Read more about all the available parameters in [the docs](https://developers.google.com/speed/webp/docs/cwebp).<br><br>
|
223 |
+
|
224 |
+
### `rel-path-to-precompiled-binaries`
|
225 |
+
```
|
226 |
+
Type: string
|
227 |
+
Default: './Binaries'
|
228 |
+
Supported by: cwebp
|
229 |
+
```
|
230 |
+
Allows you to change where to look for the precompiled binaries. While this may look as a risk, it is completely safe, as the binaries are hash-checked before being executed. The option is needed when you are using two-file version of webp-on-demand.
|
231 |
+
|
232 |
+
### `try-cwebp`
|
233 |
+
```
|
234 |
+
Type: boolean
|
235 |
+
Default: true
|
236 |
+
Supported by: cwebp
|
237 |
+
```
|
238 |
+
If set, the converter will try executing "cwebp -version". In case it succeeds, and the version is higher than those working cwebp's found using other methods, the conversion will be done by executing this cwebp.
|
239 |
+
|
240 |
+
### `try-common-system-paths`
|
241 |
+
```
|
242 |
+
Type: boolean
|
243 |
+
Default: true
|
244 |
+
Supported by: cwebp
|
245 |
+
```
|
246 |
+
If set, the converter will look for a cwebp binaries residing in common system locations such as `/usr/bin/cwebp`. If such exist, it is assumed that they are valid cwebp binaries. A version check will be run on the binaries found (they are executed with the "-version" flag. The cwebp with the highest version found using this method and the other enabled methods will be used for the actual conversion.
|
247 |
+
|
248 |
+
This method might find a cwebp binary something that isn't found using `try-discovering-cwebp` if these common paths are not within PATH or neither `which` or `whereis` are available.
|
249 |
+
|
250 |
+
Note: All methods for discovering cwebp binaries are per default enabled. You can save a few microseconds by disabling all, but the one that discovers the cwebp binary with the highest version (check the conversion log to find out). However, it is probably not worth it, as your setup will then become less resilient to system changes.
|
251 |
+
|
252 |
+
### `try-discovering-cwebp`
|
253 |
+
```
|
254 |
+
Type: boolean
|
255 |
+
Default: true
|
256 |
+
Supported by: cwebp
|
257 |
+
```
|
258 |
+
If set, the converter will try to discover installed cwebp binaries using the `which -a cwebp` command, or in case that fails, the `whereis -b cwebp` command. These commands will find cwebp binaries residing in PATH
|
259 |
+
|
260 |
+
### `try-supplied-binary-for-os`
|
261 |
+
```
|
262 |
+
Type: boolean
|
263 |
+
Default: true
|
264 |
+
Supported by: cwebp
|
265 |
+
```
|
266 |
+
If set, the converter will try use a precompiled cwebp binary that comes with webp-convert. But only if it has a higher version that those found by other methods. As the library knows the versions of its cwebps, no additional time is spent executing them with the "-version" parameter. The binaries are hash-checked before executed. The library btw. comes with several versions of precompiled cwebps because they have different dependencies - some works on some systems and others on others.
|
267 |
+
|
268 |
+
### `skip-these-precompiled-binaries`
|
269 |
+
```
|
270 |
+
Type: string
|
271 |
+
Default: ''
|
272 |
+
Supported by: cwebp
|
273 |
+
```
|
274 |
+
The precompiled binaries from google have dependencies, and they are different. This means that some of them works on some systems, others on others. For this reason, several precompiled binaries are shipped with the library - we want it to simply work on as many systems as possible. Of course, the binary with the highest version number is tried first. But if it doesn't work, time has been wasted running an executable that doesn't work, and validating the hash before running it. To avoid this, use this option to bypass precompiled binaries that you know doesn't work on your current system. You pass in the filenames (comma separated), ie "cwebp-120-linux-x86-64,cwebp-110-linux-x86-64". In order to see if time is wasted on a supplied binary, that doesn't work, check the conversion log. You can also get info about the filenames of the binaries in the conversion log. Instructions on viewing the conversion log are available [here](https://github.com/rosell-dk/webp-convert/blob/master/docs/v2.0/converting/introduction-for-converting.md#insights-to-the-process).
|
275 |
+
Btw: If minimizing the overhead is a priority, there are alternatives to this option that speeds up conversion time more. It is the hash-check that is costly. Hash-checking is only done on the cwebps shipped with the library.
|
276 |
+
|
277 |
+
Alternative 1: Disabling the "cwebp-try-supplied-binary-for-os" option thus avoids the rather expensive job of hash-checking the binary each time it is run. The cost of this is that you don't get the newest cwebp available (the ones shipped with the library will only be used when you don't have a newer one available).
|
278 |
+
|
279 |
+
Alternative 2: If you set an environment variable called "WEBPCONVERT_CWEBP_PATH" (or define a "WEBPCONVERT_CWEBP_PATH" variable in PHP), cwebp will simply execute the binary found at that path and not examine other alternatives. Also, there will be no hash check either. Doing so however makes your system a little bit less secure - exactly because it bypasses the hash-checking. If some security whole allows an attacker to upload a binary, replacing the one set like this, an attacker would then have a way to have that binary executed. Here is how you define the variable in PHP: `define("WEBPCONVERT_CWEBP_PATH", "/path/to/working/cwebp/for/example/one/in/src/Convert/Converters/Binaries/dir");`. Also beware that by doing this, you will need to update your code in order to take advantage of future cwebp releases.
|
280 |
+
|
281 |
+
## stack options
|
282 |
+
Options unique to the "stack" converter
|
283 |
+
|
284 |
+
### `stack-converters`
|
285 |
+
```
|
286 |
+
Type: array
|
287 |
+
Default: ['cwebp', 'vips', 'imagick', 'gmagick', 'imagemagick', 'graphicsmagick', 'wpc', 'ewww', 'gd']
|
288 |
+
Supported by: stack
|
289 |
+
```
|
290 |
+
|
291 |
+
Specify the converters to try and their order.
|
292 |
+
|
293 |
+
Beware that if you use this option, you will miss out when more converters are added in future updates. If the purpose of setting this option is to remove converters that you do not want to use, you can use the *skip* option instead. Ie, to skip ewww, set *ewww-skip* to true. On the other hand, if what you actually want is to change the order, you can use the *stack-preferred-converters* option, ie setting *stack-preferred-converters* to `['vips', 'wpc']` will move vips and wpc in front of the others. Should they start to fail, you will still have the others as backup.
|
294 |
+
|
295 |
+
The array specifies the converters to try and their order. Each item can be:
|
296 |
+
|
297 |
+
- An id (ie "cwebp")
|
298 |
+
- A fully qualified class name (in case you have programmed your own custom converter)
|
299 |
+
- An array with two keys: "converter" and "options".
|
300 |
+
|
301 |
+
`
|
302 |
+
Alternatively, converter options can be set using the *converter-options* option.
|
303 |
+
|
304 |
+
Read more about the stack converter in the [introduction](https://github.com/rosell-dk/webp-convert/blob/master/docs/v2.0/converting/introduction-for-converting.md#the-stack-converter).<br><br>
|
305 |
+
|
306 |
+
### `stack-converter-options`
|
307 |
+
```
|
308 |
+
Type: array
|
309 |
+
Default: []
|
310 |
+
Supported by: stack
|
311 |
+
```
|
312 |
+
Extra options for specific converters. Example:
|
313 |
+
|
314 |
+
```php
|
315 |
+
$options = [
|
316 |
+
'converter-options' => [
|
317 |
+
'vips' => [
|
318 |
+
'quality' => 72
|
319 |
+
],
|
320 |
+
]
|
321 |
+
]
|
322 |
+
```
|
323 |
+
<br>
|
324 |
+
|
325 |
+
### `stack-extra-converters`
|
326 |
+
```
|
327 |
+
Type: array
|
328 |
+
Default: []
|
329 |
+
Supported by: stack
|
330 |
+
```
|
331 |
+
Add extra converters to the bottom of the stack. The items are similar to those in the `stack-converters` option.<br><br>
|
332 |
+
|
333 |
+
### `stack-preferred-converters`
|
334 |
+
```
|
335 |
+
Type: array
|
336 |
+
Default: []
|
337 |
+
Supported by: stack
|
338 |
+
```
|
339 |
+
With this option you can move specified converters to the top of the stack. The converters are specified by id. For example, setting this option to ['vips', 'wpc'] ensures that *vips* will be tried first and - in case that fails - *wpc* will be tried. The rest of the converters keeps their relative order.<br><br>
|
340 |
+
|
341 |
+
### `stack-shuffle`
|
342 |
+
```
|
343 |
+
Type: boolean
|
344 |
+
Default: false
|
345 |
+
Supported by: stack
|
346 |
+
```
|
347 |
+
Shuffle the converters in the stack. This can for example be used to balance load between several wpc instances in a substack, as illustrated [here](https://github.com/rosell-dk/webp-convert/blob/master/docs/v2.0/converting/converters/stack.md)<br><br>
|
348 |
+
|
349 |
+
## vips options
|
350 |
+
|
351 |
+
### `vips-smart-subsample` (DEPRECATED)
|
352 |
+
```
|
353 |
+
Type: boolean
|
354 |
+
Default: false
|
355 |
+
Supported by: vips
|
356 |
+
```
|
357 |
+
This feature seemed not to be part of *libwebp* but intrinsic to vips. However, we were wrong - the feature is the same as 'sharp-yuv'. Use that instead.<br><br>
|
358 |
+
|
359 |
+
|
360 |
+
## wcp options
|
361 |
+
|
362 |
+
### `wpc-api-key`
|
363 |
+
```
|
364 |
+
Type: string
|
365 |
+
Default: ''
|
366 |
+
Supported by: wpc
|
367 |
+
```
|
368 |
+
Api key for the wpc converter. The option is actually called *api-key*, however, any option can be prefixed with a converter id to only apply to that converter. As this option is only for the wpc converter, it is natural to use the "wpc-" prefix. Same goes for the other "wpc-" options.
|
369 |
+
|
370 |
+
Note: You can alternatively set the api key through the *WPC_API_KEY* environment variable.<br><br>
|
371 |
+
|
372 |
+
### `wpc-api-url`
|
373 |
+
```
|
374 |
+
Type: string
|
375 |
+
Default: ''
|
376 |
+
Supported by: wpc
|
377 |
+
```
|
378 |
+
Note: You can alternatively set the api url through the *WPC_API_URL* environment variable.<br><br>
|
379 |
+
|
380 |
+
### `wpc-api-version`
|
381 |
+
```
|
382 |
+
Type: integer (0 - 1 - 2)
|
383 |
+
Default: 2
|
384 |
+
Supported by: wpc
|
385 |
+
```
|
386 |
+
<br>
|
387 |
+
|
388 |
+
### `wpc-crypt-api-key-in-transfer`
|
389 |
+
```
|
390 |
+
Type: boolean
|
391 |
+
Default: false
|
392 |
+
Supported by: wpc
|
393 |
+
```
|
394 |
+
<br>
|
395 |
+
|
396 |
+
### `wpc-secret`
|
397 |
+
```
|
398 |
+
Type: string
|
399 |
+
Default: ''
|
400 |
+
Supported by: wpc
|
401 |
+
```
|
402 |
+
Note: This option is only relevant for api version 0.
|
vendor/rosell-dk/webp-convert/docs/v2.0/migrating-to-2.0.md
ADDED
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
convert# Migrating to 2.0
|
2 |
+
|
3 |
+
## Converting
|
4 |
+
|
5 |
+
### Changes in conversion api
|
6 |
+
While the code have been refactored quite extensively, if you have stuck to `WebPConvert::convert()` and/or `WebPConvert::convertAndServe()`, there is only a few things you need to know.
|
7 |
+
|
8 |
+
First and foremost: *`WebPConvert::convert` no longer returns a boolean indicating the result*. So, if conversion fails, an exception is thrown, no matter what the reason is. When migrating, you will probably need to remove some lines of code where you test the result.
|
9 |
+
|
10 |
+
Also, a few options has been renamed and a few option defaults has been changed.
|
11 |
+
|
12 |
+
#### The options that has been renamed are the following:
|
13 |
+
|
14 |
+
- Two converters have changed IDs and class names: The ids that are changed are: *imagickbinary* => *imagemagick* and *gmagickbinary* => *graphicsmagick*
|
15 |
+
- In *ewww*, the `key` option has been renamed to `api-key` (or [`ewww-api-key`](https://github.com/rosell-dk/webp-convert/blob/master/docs/v2.0/converting/options.md#ewww-api-key))
|
16 |
+
- In *wpc*, the `url` option has been renamed to `api-url` (or [`wpc-api-url`](https://github.com/rosell-dk/webp-convert/blob/master/docs/v2.0/converting/options.md#wpc-api-url))
|
17 |
+
* In *cwebp*, the [`lossless`] option is now replaced with the new `encoding` option (which is not boolean, but "lossy", "lossless" or ["auto"](https://github.com/rosell-dk/webp-convert/blob/master/docs/v2.0/converting/introduction-for-converting.md#auto-selecting-between-losslesslossy-encoding))
|
18 |
+
* In *cwebp*, the [`autofilter`] option has been renamed to "auto-filter"
|
19 |
+
- In *gd*, the `skip-pngs` option has been removed and replaced with the general `skip` option and prefixing. So `gd-skip` amounts to the same thing, but notice that Gd no longer skips per default.
|
20 |
+
|
21 |
+
#### The option defaults that has been changed are the following:
|
22 |
+
- the `converters` default now includes the cloud converters (*ewww* and *wpc*) and also two new converters, *vips* and *graphicsmagick*. So it is not necessary to add *ewww* or *wpc* explicitly. Also, when you set options with `converter-options` and point to a converter that isn't in the stack, in 1.3.9, this resulted in the converter automatically being added. This behavior has been removed.
|
23 |
+
- *gd* no longer skips pngs per default. To make it skip pngs, set `gd-skip` to *true*
|
24 |
+
- Default quality is now 75 for jpegs and 85 for pngs (it was 75 for both)
|
25 |
+
- For *cwebp*, the `lossless` has been removed. Use the new `encoding` option instead.
|
26 |
+
- For *wpc*, default `secret` and `api-key` are now "" (they were "my dog is white")
|
27 |
+
|
28 |
+
### New convert options
|
29 |
+
You might also be interested in the new options available in 2.0:
|
30 |
+
|
31 |
+
- Added a syntax for conveniently targeting specific converters. If you for example prefix the "quality" option with "gd-", it will override the "quality" option, but only for gd.
|
32 |
+
- Certain options can now be set with environment variables too ("EWWW_API_KEY", "WPC_API_KEY" and "WPC_API_URL")
|
33 |
+
- Added new *vips* converter.
|
34 |
+
- Added new *graphicsmagick* converter.
|
35 |
+
- Added new *stack* converter (the stack functionality has been moved into a converter)
|
36 |
+
- Added [`jpeg`](https://github.com/rosell-dk/webp-convert/blob/master/docs/v2.0/converting/options.md#jpeg) and [`png`](https://github.com/rosell-dk/webp-convert/blob/master/docs/v2.0/converting/options.md#png) options
|
37 |
+
- Added [`alpha-quality`](https://github.com/rosell-dk/webp-convert/blob/master/docs/v2.0/converting/options.md#alpha-quality) option for *cwebp*, *vips*, *imagick*, *imagemagick* and *graphicsmagick*.
|
38 |
+
- Added [`auto-filter`](https://github.com/rosell-dk/webp-convert/blob/master/docs/v2.0/converting/options.md#autofilter) option for *cwebp*, *imagick*, *imagemagick* and the new *vips* converter.
|
39 |
+
- Added [`encoding`](https://github.com/rosell-dk/webp-convert/blob/master/docs/v2.0/converting/options.md#encoding) option (lossy | lossless | auto). lossless and auto is supported for *cwebp*, *imagick*, *imagemagick*, *graphicsmagick* and the new *vips* converter.
|
40 |
+
- Added [`near-lossless`](https://github.com/rosell-dk/webp-convert/blob/master/docs/v2.0/converting/options.md#near-lossless) option for *cwebp* and *imagemagick*.
|
41 |
+
- Added [`preset`](https://github.com/rosell-dk/webp-convert/blob/master/docs/v2.0/converting/options.md#preset) option for *cwebp* and the new *vips* converter.
|
42 |
+
- Added [`skip`](https://github.com/rosell-dk/webp-convert/blob/master/docs/v2.0/converting/options.md#skip) option (its general and works for all converters)
|
43 |
+
- Besides the ones mentioned above, *imagemagick* now also supports [`low-memory`](https://github.com/rosell-dk/webp-convert/blob/master/docs/v2.0/converting/options.md#low-memory), [`metadata`](https://github.com/rosell-dk/webp-convert/blob/master/docs/v2.0/converting/options.md#metadata) ("all" or "none") and [`method`](https://github.com/rosell-dk/webp-convert/blob/master/docs/v2.0/converting/options.md#method). *imagemagick* has become very potent!
|
44 |
+
|
45 |
+
## Serving
|
46 |
+
The classes for serving has also been refactored quite extensively, but again, if you have stuck to `WebPConvert::convertAndServe`, there is only a few things you need to know.
|
47 |
+
|
48 |
+
First and foremost, *`WebPConvert::convertAndServe` has been renamed to `WebPConvert::serveConverted()`*. The reason for this change is that it more accurately describes what is happening: A converted file is served. The old name implied that a conversion was always going on, which is not the case (if the file at destination already exists, which is not bigger or older than the source, that file is served directly).
|
49 |
+
|
50 |
+
Besides this, there is the following changes in options:
|
51 |
+
|
52 |
+
- A new option `convert` has been created for supplying the conversion options. So the conversion options are no longer "mingled" with the serving options, but has its own option.
|
53 |
+
- Options regarding serving the image are now organized into its own `serve-image` setting, which again has been reorganized.
|
54 |
+
- A new option `serve-image > headers > cache-control` controls whether to set cache control header (default: false).
|
55 |
+
- The `fail` option no longer support the "report-as-image" value. It however supports a new value: "throw".
|
56 |
+
- The `fail-when-original-unavailable` option has been renamed to `fail-when-fail-fails`. In 2.0, the original not being available is no longer the only thing that can cause the fail action to fail – the library now checks the mime type of the source file and only serves it if it is either png or jpeg.
|
57 |
+
- The `error-reporting` option has been removed. The reason for it being removed is that it is considered bad practice for a library to mess with error handling. However, *this pushes the responsibility to you*. You should make sure that no warnings ends up in the output, as this will corrupt the image being served. You can for example ensure that by calling `ini_set('display_errors', '0');` or `error_reporting(0);` (or both), or by creating your own error handler.
|
58 |
+
- The `aboutToServeImageCallBack` option has been removed. You can instead extend the `ServeConvertedWebP` class and override `serveOriginal` and `serveDestination`. You can call the serve method of your extended class, but then you will not have the error handling (the `fail` and `fail-if-fail-fails` options). Too add this, you can call `ServeConvertedWebPWithErrorHandling::serve` and make sure to override the default of the last argument.
|
59 |
+
- The `aboutToPerformFailAction` option has been removed. You can instead set `fail` to `throw` and handle the exception in a *catch* clause. Or you can extend the `ServeConvertedWebPWithErrorHandling` class and override the `performFailAction` method.
|
60 |
+
- The `add-x-header-status` and `add-x-header-options` options have been removed.
|
61 |
+
- The `require-for-conversion` option has been removed. You must either use with composer or create a simple autoloader (see next section)
|
62 |
+
|
63 |
+
## WebP On demand
|
64 |
+
If you are using the "non-composer" version of webp demand (the one where you only upload two files - `webp-on-demand-1.inc` and `webp-on-demand-2.inc`), you were probably using the `require-for-conversion` option. This option is no longer supported. But you never really needed it in the first place, because the you create and register an autoloader instead:
|
65 |
+
|
66 |
+
```php
|
67 |
+
function autoloader($class) {
|
68 |
+
if (strpos($class, 'WebPConvert\\') === 0) {
|
69 |
+
require_once __DIR__ . '/webp-on-demand-2.inc';
|
70 |
+
}
|
71 |
+
}
|
72 |
+
spl_autoload_register('autoloader', true, true);
|
73 |
+
```
|
vendor/rosell-dk/webp-convert/docs/v2.0/serving/introduction-for-serving.md
ADDED
@@ -0,0 +1,157 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Introduction to serving converted WebP files with WebPConvert
|
2 |
+
|
3 |
+
**NOTE: This document only applies to the upcoming 2.0 version**
|
4 |
+
|
5 |
+
The classes for serving first and foremost helps you handle the cached files intelligently (not serving them if they are larger or older than the original). It also provides a convenient way to deal with conversion failures and setting headers.
|
6 |
+
|
7 |
+
|
8 |
+
In the following example, all available *serve* options are explicitly set to their default values.
|
9 |
+
|
10 |
+
```php
|
11 |
+
use WebPConvert\WebPConvert;
|
12 |
+
|
13 |
+
WebPConvert::serveConverted($source, $destination, [
|
14 |
+
|
15 |
+
// failure handling
|
16 |
+
'fail' => 'original', // ('original' | 404' | 'throw' | 'report')
|
17 |
+
'fail-when-fail-fails' => 'throw', // ('original' | 404' | 'throw' | 'report')
|
18 |
+
|
19 |
+
// options influencing the decision process of what to be served
|
20 |
+
'reconvert' => false, // if true, existing (cached) image will be discarded
|
21 |
+
'serve-original' => false, // if true, the original image will be served rather than the converted
|
22 |
+
'show-report' => false, // if true, a report will be output rather than the raw image
|
23 |
+
|
24 |
+
// warning handling
|
25 |
+
'suppress-warnings' => true, // if you set to false, make sure that warnings are not echoed out!
|
26 |
+
|
27 |
+
// options when serving an image (be it the webp or the original, if the original is smaller than the webp)
|
28 |
+
'serve-image' => [
|
29 |
+
'headers' => [
|
30 |
+
'cache-control' => true,
|
31 |
+
'content-length' => true,
|
32 |
+
'content-type' => true,
|
33 |
+
'expires' => false,
|
34 |
+
'last-modified' => true,
|
35 |
+
'vary-accept' => false
|
36 |
+
],
|
37 |
+
'cache-control-header' => 'public, max-age=31536000',
|
38 |
+
],
|
39 |
+
|
40 |
+
// redirect tweak
|
41 |
+
'redirect-to-self-instead-of-serving' => false, // if true, a redirect will be issues rather than serving
|
42 |
+
|
43 |
+
'convert' => [
|
44 |
+
// options for converting goes here
|
45 |
+
'quality' => 'auto',
|
46 |
+
]
|
47 |
+
]);
|
48 |
+
```
|
49 |
+
|
50 |
+
## Failure handling
|
51 |
+
The `fail` option gives you an easy way to handle errors. Setting it to 'original' tells it to handle errors by serving the original file instead (*$source*). This could be a good choice on production servers. On development servers, 'throw' might be a good option. It simply rethrows the exception that was thrown by *WebPConvert::convert()*. '404' could also be an option, but it has the weakness that it will probably only be discovered by real persons seeing a missing image.
|
52 |
+
|
53 |
+
The fail action might fail too. For example, if it is set to 'original' and the failure is that the original file doesn't exist. Or, more delicately, it may have a wrong mime type - our serve method will not let itself be tricked into serving *exe* files as the 'original'. Anyway, you can control what to do when fail fails using the *fail-when-fail-fails* option. If that fails too, the original exception is thrown. The fun stops there, there is no "fail-when-fail-when-fail-fails" option to customize this.
|
54 |
+
|
55 |
+
The failure handling is implemented as an extra layer. You can bypass it by calling `WebPConvert\Serve\ServeConvertedWebP::serve()` directly. Doing that will give the same result as if you set `fail` to 'throw'.
|
56 |
+
|
57 |
+
## Options influencing the decision process
|
58 |
+
The default process is like this:
|
59 |
+
|
60 |
+
1. Is there a file at the destination? If not, trigger conversion
|
61 |
+
2. Is the destination older than the source? If yes, delete destination and trigger conversion
|
62 |
+
3. Serve the smallest file (destination or source)
|
63 |
+
|
64 |
+
You can influence the process with the following options:
|
65 |
+
|
66 |
+
*reconvert*
|
67 |
+
If you set *reconvert* to true, the destination and conversion is triggered (between step 1 and 2)
|
68 |
+
|
69 |
+
*serve-original*
|
70 |
+
If you set *serve-original* to true, process will take its cause from (1) to (2) and then end with source being served.
|
71 |
+
|
72 |
+
*show-report*
|
73 |
+
If you set `show-report`, the process is skipped entirely, and instead a report is generated of how a fresh conversion using the supplied options goes.
|
74 |
+
|
75 |
+
## Headers
|
76 |
+
Leaving errors and reports out of account for a moment, the *WebPConvert::serveConverted()* ultimately has two possible outcomes: Either a converted image is served or - if smaller - the source image. If the source is to be served, its mime type will be detected in order to make sure it is an image and to be able to set the content type header. Either way, the actual serving is passed to `Serve\ServeFile::serve`. The main purpose of this class is to add/set headers.
|
77 |
+
|
78 |
+
#### *Cache-Control* and *Expires* headers
|
79 |
+
Default behavior is to neither set the *Cache-Control* nor the *Expires* header. Once you are on production, you will probably want to turn these on. The default is btw one year (31536000 seconds). I recommend the following for production:
|
80 |
+
|
81 |
+
```
|
82 |
+
'serve-image' => [
|
83 |
+
'headers' => [
|
84 |
+
'cache-control' => true,
|
85 |
+
'expires' => false,
|
86 |
+
],
|
87 |
+
'cache-control-header' => 'public, max-age=31536000',
|
88 |
+
],
|
89 |
+
```
|
90 |
+
|
91 |
+
The value for the *Expires* header is calculated from "max-age" found in the *cache-control-header* option and the time of the request. The result is an absolute time, ie "Expires: Thu, 07 May 2020 07:02:37 GMT". As most browsers now supports the *Cache-Control* header, *from a performance perspective*, there is no need to also add the expires header. However, some tools complains if you don't (gtmetrix allegedly), and there is no harm in adding both headers. More on this discussion [[here]](https://github.com/rosell-dk/webp-convert/issues/126).
|
92 |
+
|
93 |
+
#### *Vary: Accept* header
|
94 |
+
This library can be used as part of a solution that serves webp files to browsers that supports it, while serving the original file to browsers that does not *on the same URL*. Such a solution typically inspects the *Accept* request header in order to determine if the client supports webp or not. Thus, the response will *vary* along with the "Accept" header and the world (and proxies) should be informed about this, so they don't end up serving cached webps to browsers that does not support it. To add the "Vary: Accept" header, simply set the *serve-image > headers > vary-accept* option to true.
|
95 |
+
|
96 |
+
#### *Last-Modified* header
|
97 |
+
The Last-Modified header is also used for caching purposes. You should leave that setting on, unless you set it by other means. You control it with the *serve-image > headers > last-modified* option.
|
98 |
+
|
99 |
+
#### *Content-Type* header
|
100 |
+
The *Content-Type* header tells browsers what they are receiving. This is important information and you should leave the *serve-image > headers > content-type* option at its default (true), unless you set it by other means.
|
101 |
+
|
102 |
+
When the outcome is to serve a webp, the header will be set to: "Content-Type: image/webp". When the original is to be served, the library will try to detect the mime type of the file and set the content type accordingly. The [image-mime-type-guesser](https://github.com/rosell-dk/image-mime-type-guesser) library is used for that.
|
103 |
+
|
104 |
+
#### *Content-Length* header
|
105 |
+
The *Content-Length* header tells browsers the length of the content. According to [the specs](https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13), it should be set unless it is prohibited by rules in [section 4.4](https://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.4). In that section we learn that it should not be set when the *Transfer-Encoding* header is set (which it often is, to "chunked"). However, no harm done, because it also says that clients should ignore the header in case *Transfer-Encoding* is set. From this I concluded that it makes sense to default the *serve-image > headers > content-length* to true. I might however change this in case I should learn that the header could be problematic in some way. So if you decided you want it, do not rely on the default, but set it to *true*. See discussion on this subject [here](https://stackoverflow.com/questions/3854842/content-length-header-with-head-requests/3854983#3854983).
|
106 |
+
|
107 |
+
#### *X-WebP-Convert-Log* headers
|
108 |
+
The serve method adds *X-WebP-Convert-Log* headers in order to let you know what went on.
|
109 |
+
For example, if there is no converted image and conversion was successful, the following headers will be sent:
|
110 |
+
|
111 |
+
```
|
112 |
+
X-WebP-Convert-Log: Converting (there were no file at destination)
|
113 |
+
X-WebP-Convert-Log: Serving converted file
|
114 |
+
```
|
115 |
+
|
116 |
+
On the next call (presuming the webp has not been deleted), no conversion is needed and you should simply see:
|
117 |
+
```
|
118 |
+
X-WebP-Convert-Log: Serving converted file
|
119 |
+
```
|
120 |
+
|
121 |
+
But say that the first conversion actually failed. In case you have permission problems, the output could be:
|
122 |
+
```
|
123 |
+
X-WebP-Convert-Log: Converting (there were no file at destination)
|
124 |
+
X-WebP-Convert-Log: Failed creating folder. Check the permissions!
|
125 |
+
X-WebP-Convert-Log: Performing fail action: original
|
126 |
+
```
|
127 |
+
|
128 |
+
In case the problem is that the conversion failed, you could see the following:
|
129 |
+
```
|
130 |
+
X-WebP-Convert-Log: Converting (there were no file at destination)
|
131 |
+
X-WebP-Convert-Log: None of the converters in the stack are operational
|
132 |
+
X-WebP-Convert-Log: Performing fail action: original
|
133 |
+
```
|
134 |
+
|
135 |
+
If you need more info about the conversion process in order to learn why the converters aren't working, enable the *show-report* option.
|
136 |
+
|
137 |
+
As a last example, say you have supplied a non-existing file as source and `fail` is set to "original" (which will also fail). Result:
|
138 |
+
```
|
139 |
+
X-WebP-Convert-Log: Source file was not found
|
140 |
+
X-WebP-Convert-Log: Performing fail action: original
|
141 |
+
X-WebP-Convert-Log: Performing fail action: throw
|
142 |
+
```
|
143 |
+
|
144 |
+
## The redirect tweak (will be available in 2.3.0)
|
145 |
+
There are cases where serving the image directly with PHP isn't optimal.
|
146 |
+
|
147 |
+
One case is WP Engine. Even though webp-convert adds a Vary:Accept header, the header is not present in the response on WP Engine. It is somehow overwritten by the caching machinery and set to Vary:Accept-Encoding, Cookie.
|
148 |
+
|
149 |
+
If however rules have been set up to redirect images directly to existing webps, one can overcome the problem by redirecting the image request back to itself rather than serving the webp directly.
|
150 |
+
|
151 |
+
You can achieve this by setting the *redirect-to-self-instead-of-serving* option to true.
|
152 |
+
|
153 |
+
Beware of risk of an endless redirect loop. Such loop will happen if the redirection to existing webp rules aren't set up correctly. To prevent this, it is recommended that you only set the option to true after checking that the destination file does not exist. But note that this check does not completely prevent such loops occurring when redirection to existing rules are missing - as the 302 redirect could get cached (it does that on WP Engine). So bottom line: Only use this feature when you have server rules set up for redirecting images to their corresponding webp images (for client that supports webp) - *and you are certain that these rules works*.
|
154 |
+
|
155 |
+
## More info
|
156 |
+
|
157 |
+
- The complete api is available [here](https://www.bitwise-it.dk/webp-convert/api/2.0/html/index.xhtml)
|
vendor/rosell-dk/webp-convert/docs/v2.0/serving/laravel-nginx-serving.md
ADDED
@@ -0,0 +1,116 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Serving WebP from a Laravel Nginx site
|
2 |
+
|
3 |
+
**NOTE: This document only applies to the upcoming 2.0 version**
|
4 |
+
|
5 |
+
This should work with most php sites although I'm basing the Nginx configuration around what's commonly seen with Laravel installations.
|
6 |
+
|
7 |
+
Create webp converter script in ```project_root/public/webp-on-demand.php```
|
8 |
+
|
9 |
+
```
|
10 |
+
<?php
|
11 |
+
|
12 |
+
require '../vendor/autoload.php';
|
13 |
+
|
14 |
+
use WebPConvert\WebPConvert;
|
15 |
+
|
16 |
+
$source = __DIR__ . $_GET['source'];
|
17 |
+
$destination = $source . '.webp';
|
18 |
+
|
19 |
+
WebPConvert::serveConverted($source, $destination, [
|
20 |
+
'fail' => 'original', // If failure, serve the original image (source). Other options include 'throw', '404' and 'report'
|
21 |
+
// 'show-report' => true, // Generates a report instead of serving an image
|
22 |
+
|
23 |
+
'serve-image' => [
|
24 |
+
'headers' => [
|
25 |
+
'cache-control' => true,
|
26 |
+
'vary-accept' => true,
|
27 |
+
// other headers can be toggled...
|
28 |
+
],
|
29 |
+
'cache-control-header' => 'max-age=2',
|
30 |
+
],
|
31 |
+
|
32 |
+
'convert' => [
|
33 |
+
// all convert option can be entered here (ie "quality")
|
34 |
+
],
|
35 |
+
]);
|
36 |
+
|
37 |
+
```
|
38 |
+
|
39 |
+
|
40 |
+
### Configure Nginx
|
41 |
+
|
42 |
+
We just need to add the following block to our site in ```/etc/sites-enabled/```
|
43 |
+
|
44 |
+
```
|
45 |
+
location ~* ^/.*\.(png|jpe?g)$ {
|
46 |
+
add_header Vary Accept;
|
47 |
+
expires 365d;
|
48 |
+
if ($http_accept !~* "webp"){
|
49 |
+
break;
|
50 |
+
}
|
51 |
+
try_files
|
52 |
+
$uri.webp
|
53 |
+
/webp-on-demand.php?source=$uri
|
54 |
+
;
|
55 |
+
}
|
56 |
+
```
|
57 |
+
|
58 |
+
Then reload Nginx ```sudo systemctl restart nginx```
|
59 |
+
|
60 |
+
The full Nginx block should look like
|
61 |
+
|
62 |
+
```
|
63 |
+
server {
|
64 |
+
server_name webp-testing.com;
|
65 |
+
root /home/forge/webp-testing.com/public;
|
66 |
+
|
67 |
+
index index.html index.htm index.php;
|
68 |
+
|
69 |
+
charset utf-8;
|
70 |
+
|
71 |
+
location / {
|
72 |
+
try_files $uri $uri/ /index.php?$query_string;
|
73 |
+
}
|
74 |
+
|
75 |
+
location ~* ^/.*\.(png|jpe?g)$ {
|
76 |
+
add_header Vary Accept;
|
77 |
+
expires 365d;
|
78 |
+
if ($http_accept !~* "webp"){
|
79 |
+
break;
|
80 |
+
}
|
81 |
+
try_files
|
82 |
+
$uri.webp
|
83 |
+
/webp-on-demand.php?source=$uri
|
84 |
+
;
|
85 |
+
}
|
86 |
+
|
87 |
+
location = /favicon.ico { access_log off; log_not_found off; }
|
88 |
+
location = /robots.txt { access_log off; log_not_found off; }
|
89 |
+
|
90 |
+
access_log off;
|
91 |
+
error_log /var/log/nginx/webp-testing.com-error.log error;
|
92 |
+
|
93 |
+
error_page 404 /index.php;
|
94 |
+
|
95 |
+
location ~ \.php$ {
|
96 |
+
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
97 |
+
fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
|
98 |
+
fastcgi_index index.php;
|
99 |
+
include fastcgi_params;
|
100 |
+
}
|
101 |
+
|
102 |
+
location ~ /\.(?!well-known).* {
|
103 |
+
deny all;
|
104 |
+
}
|
105 |
+
|
106 |
+
# cache static assets
|
107 |
+
location ~* \.(gif|ico|css|pdf|svg)$ {
|
108 |
+
expires 365d;
|
109 |
+
}
|
110 |
+
|
111 |
+
location ~* \.(js)$ {
|
112 |
+
add_header Cache-Control no-cache;
|
113 |
+
}
|
114 |
+
|
115 |
+
}
|
116 |
+
```
|
vendor/rosell-dk/webp-convert/docs/v2.0/webp-on-demand/tweaks.md
ADDED
@@ -0,0 +1,181 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Tweaks
|
2 |
+
|
3 |
+
## Store converted images in separate folder
|
4 |
+
|
5 |
+
In most cases, you probably want the cache of converted images to be stored in their own folder rather than have them mingled with the source files.
|
6 |
+
|
7 |
+
To have have the cache folder contain a file structure mirroring the structure of the original files, you can do this:
|
8 |
+
|
9 |
+
```php
|
10 |
+
$applicationRoot = $_SERVER["DOCUMENT_ROOT"]; // If your application is not in document root, you can change accordingly.
|
11 |
+
$imageRoot = $applicationRoot . '/webp-images'; // Change to where you want the webp images to be saved
|
12 |
+
$sourceRel = substr($source, strlen($applicationRoot));
|
13 |
+
$destination = $imageRoot . $sourceRel . '.webp';
|
14 |
+
```
|
15 |
+
|
16 |
+
If your images are stored outside document root (a rare case), you can simply use the complete absolute path:
|
17 |
+
```php
|
18 |
+
$destination = $imageRoot . $source . '.webp'; // pst: $source is an absolute path, and starts with '/'
|
19 |
+
```
|
20 |
+
This will ie store a converted image in */var/www/example.com/public_html/app/webp-images/var/www/example.com/images/logo.jpg.webp*
|
21 |
+
|
22 |
+
If your application can be configured to store outside document root, but rarely is, you can go for this structure:
|
23 |
+
|
24 |
+
```php
|
25 |
+
$docRoot = $_SERVER["DOCUMENT_ROOT"];
|
26 |
+
$imageRoot = $contentDirAbs . '/webp-images';
|
27 |
+
|
28 |
+
if (substr($source, 0, strlen($docRoot)) === $docRoot) {
|
29 |
+
// Source file is residing inside document root.
|
30 |
+
// We can store relative to that.
|
31 |
+
$sourceRel = substr($source, strlen($docRoot));
|
32 |
+
$destination = $imageRoot . '/doc-root' . $sourceRel . '.webp';
|
33 |
+
} else {
|
34 |
+
// Source file is residing outside document root.
|
35 |
+
// we must add complete path to structure
|
36 |
+
$destination = $imageRoot . '/abs' . $source . '.webp';
|
37 |
+
}
|
38 |
+
```
|
39 |
+
|
40 |
+
If you do not know the application root beforehand, and thus do not know the appropriate root for the converted images, see next tweak.
|
41 |
+
|
42 |
+
|
43 |
+
## Get the application root automatically
|
44 |
+
When you want destination files to be put in their own folder, you need to know the root of the application (the folder in which the .htaccess rules resides). In most applications, you know the root. In many cases, it is simply the document root. However, if you are writing an extension, plugin or module to a framework that can be installed in a subfolder, you may have trouble finding it. Many applications have a *index.php* in the root, which can get it with `__DIR__`. However, you do not want to run an entire bootstrap each time you serve an image. Obviously, to get around this, you can place *webp-on-demand.php* in the webroot. However, some frameworks, such as Wordpress, will not allow a plugin to put a file in the root. Now, how could we determine the application root from a file inside some subdir? Here are three suggestions:
|
45 |
+
|
46 |
+
1. You could traverse parent folders until you find a file you expect to be in application root (ie a .htaccess containing the string "webp-on-demand.php"). This should work.
|
47 |
+
2. If the rules in the *.htaccess* file are generated by your application, you probably have access to the path at generation time. You can then simply put the path in the *.htaccess*, as an extra parameter to the script (or better: the relative path from document root to the application).
|
48 |
+
3. You can use the following hack:
|
49 |
+
|
50 |
+
### The hack
|
51 |
+
The idea is to grab the URL path of the image in the *.htaccess* and pass it to the script. Assuming that the URL paths always matches the file paths, we can get the application root by subtracting that relative path to source from the absolute path to source.
|
52 |
+
|
53 |
+
In *.htaccess*, we grab the url-path by appending "&url-path=$1.$2" to the rewrite rule:
|
54 |
+
```
|
55 |
+
RewriteRule ^(.*)\.(jpe?g|png)$ webp-on-demand.php?source=%{SCRIPT_FILENAME}&url-path=$1.$2 [NC,L]
|
56 |
+
```
|
57 |
+
|
58 |
+
In the script, we can then calculate the application root like this:
|
59 |
+
|
60 |
+
```php
|
61 |
+
$applicationRoot = substr($_GET['source'], 0, -strlen($_GET['url-path']));
|
62 |
+
```
|
63 |
+
|
64 |
+
## CDN
|
65 |
+
To work properly with a CDN, a "Vary Accept" header should be added when serving images. This is a declaration that the response varies with the *Accept* header (recall that we inspect *Accept* header in the .htaccess to determine if the browsers supports webp images). If this header is missing, the CDN will see no reason to cache separate images depending on the Accept header.
|
66 |
+
|
67 |
+
Add this snippet to the *.htaccess* to make webp-on-demand work with CDN's:
|
68 |
+
|
69 |
+
```
|
70 |
+
<IfModule mod_headers.c>
|
71 |
+
SetEnvIf Request_URI "\.(jpe?g|png)" ADDVARY
|
72 |
+
|
73 |
+
# Declare that the response varies depending on the accept header.
|
74 |
+
# The purpose is to make CDN cache both original images and converted images.
|
75 |
+
Header append "Vary" "Accept" env=ADDVARY
|
76 |
+
</IfModule>
|
77 |
+
```
|
78 |
+
|
79 |
+
***Note:*** When configuring the CDN, you must make sure to set it up to forward the the "Accept" header to your origin server.
|
80 |
+
|
81 |
+
|
82 |
+
|
83 |
+
## Make .htaccess route directly to existing images
|
84 |
+
|
85 |
+
There may be a performance benefit of using the *.htaccess* file to route to already converted images, instead of letting the PHP script serve it. Note however:
|
86 |
+
- If you do the routing in .htaccess, the solution will not be able to discard converted images when original images are updated.
|
87 |
+
- Performance benefit may be insignificant (*WebPConvertAndServe* class is not autoloaded when serving existing images)
|
88 |
+
|
89 |
+
Add the following to the *.htaccess* to make it route to existing converted images. Place it above the # Redirect images to webp-on-demand.php" comment. Take care of replacing [[your-base-path]] with the directory your *.htaccess* lives in (relative to document root, and [[your-destination-root]] with the directory the converted images resides.
|
90 |
+
```
|
91 |
+
# Redirect to existing converted image (under appropriate circumstances)
|
92 |
+
RewriteCond %{HTTP_ACCEPT} image/webp
|
93 |
+
RewriteCond %{DOCUMENT_ROOT}/[[your-base-path]]/[[your-destination-root]]/$1.$2.webp -f
|
94 |
+
RewriteRule ^\/?(.*)\.(jpe?g|png)$ /[[your-base-path]]/[[your-destination-root]]/$1.$2.webp [NC,T=image/webp,L]
|
95 |
+
```
|
96 |
+
*edit:* Removed the QSD flag from the RewriteRule because it is not supported in Apache < 2.4 (and it [triggers error](https://github.com/rosell-dk/webp-express/issues/155))
|
97 |
+
|
98 |
+
Note however that DOCUMENT_ROOT can be unreliable.
|
99 |
+
|
100 |
+
If you store the webp images in the same folder as the originals and append ".webp" (rather than replace the file extension), you can do this instead:
|
101 |
+
|
102 |
+
```
|
103 |
+
# Redirect to existing converted image (under appropriate circumstances)
|
104 |
+
RewriteCond %{HTTP_ACCEPT} image/webp
|
105 |
+
RewriteCond %{REQUEST_FILENAME}.webp -f
|
106 |
+
RewriteRule ^/?(.+)\.(jpe?g|png)$ $1.$2.webp [T=image/webp,L]
|
107 |
+
```
|
108 |
+
|
109 |
+
|
110 |
+
RewriteCond %{REQUEST_FILENAME}.webp -f
|
111 |
+
|
112 |
+
### Redirect with CDN support
|
113 |
+
If you are using a CDN, and want to redirect to existing images with the .htaccess, it is a good idea to add a "Vary Accept" header. This instructs the CDN that the response varies with the *Accept* header (we do not need to do that when routing to webp-on-demand.php, because the script takes care of adding this header, when appropriate.)
|
114 |
+
|
115 |
+
You can achieve redirect with CDN support with the following rules:
|
116 |
+
```
|
117 |
+
<IfModule mod_rewrite.c>
|
118 |
+
|
119 |
+
RewriteEngine On
|
120 |
+
|
121 |
+
# Redirect to existing converted image (under appropriate circumstances)
|
122 |
+
RewriteCond %{HTTP_ACCEPT} image/webp
|
123 |
+
RewriteCond %{DOCUMENT_ROOT}/[[your-base-path]]/[[your-destination-root]]/$1.$2.webp -f
|
124 |
+
RewriteRule ^\/?(.*)\.(jpe?g|png)$ /[[your-base-path]]/[[your-destination-root]]/$1.$2.webp [NC,T=image/webp,QSD,E=WEBPACCEPT:1,L]
|
125 |
+
|
126 |
+
# Redirect images to webp-on-demand.php (if browser supports webp)
|
127 |
+
RewriteCond %{HTTP_ACCEPT} image/webp
|
128 |
+
RewriteRule ^(.*)\.(jpe?g|png)$ webp-on-demand.php?source=%{SCRIPT_FILENAME}&url-path=$1.$2 [NC,L]
|
129 |
+
|
130 |
+
</IfModule>
|
131 |
+
|
132 |
+
<IfModule mod_headers.c>
|
133 |
+
# Apache appends "REDIRECT_" in front of the environment variables, but LiteSpeed does not.
|
134 |
+
# These next line is for Apache, in order to set environment variables without "REDIRECT_"
|
135 |
+
SetEnvIf REDIRECT_WEBPACCEPT 1 WEBPACCEPT=1
|
136 |
+
|
137 |
+
# Make CDN caching possible.
|
138 |
+
# The effect is that the CDN will cache both the webp image and the jpeg/png image and return the proper
|
139 |
+
# image to the proper clients (for this to work, make sure to set up CDN to forward the "Accept" header)
|
140 |
+
Header append Vary Accept env=WEBPACCEPT
|
141 |
+
</IfModule>
|
142 |
+
|
143 |
+
AddType image/webp .webp
|
144 |
+
```
|
145 |
+
|
146 |
+
## Forward the querystring
|
147 |
+
By forwarding the query string, you can allow control directly from the URL. You could for example make it possible to add "?debug" to an image URL, and thereby getting a conversion report. Or make "?reconvert" force reconversion.
|
148 |
+
|
149 |
+
In order to forward the query string, you need to add this condition before the RewriteRule that redirects to *webp-on-demand.php*:
|
150 |
+
```
|
151 |
+
RewriteCond %{QUERY_STRING} (.*)
|
152 |
+
```
|
153 |
+
That condition will always be met. The side effect is that it stores the match (the complete querystring). That match will be available as %1 in the RewriteRule. So, in the RewriteRule, we will have to add "&%1" after the last argument. Here is a complete solution:
|
154 |
+
```
|
155 |
+
<IfModule mod_rewrite.c>
|
156 |
+
RewriteEngine On
|
157 |
+
|
158 |
+
# Redirect images to webp-on-demand.php (if browser supports webp)
|
159 |
+
RewriteCond %{HTTP_ACCEPT} image/webp
|
160 |
+
RewriteCond %{QUERY_STRING} (.*)
|
161 |
+
RewriteRule ^(.*)\.(jpe?g|png)$ webp-on-demand.php?source=%{SCRIPT_FILENAME}&%1 [NC,L]
|
162 |
+
</IfModule>
|
163 |
+
|
164 |
+
AddType image/webp .webp
|
165 |
+
```
|
166 |
+
|
167 |
+
Of course, in order to *do* something with that querystring, you must use them in your *webp-on-demand.php* script. You could for example use them directly in the options array sent to the *convertAndServe()* method. To achieve the mentioned "debug" and "reconvert" features, do this:
|
168 |
+
```php
|
169 |
+
$options = [
|
170 |
+
'show-report' => isset($_GET['debug']),
|
171 |
+
'reconvert' => isset($_GET['reconvert']),
|
172 |
+
'serve-original' => isset($_GET['original']),
|
173 |
+
];
|
174 |
+
```
|
175 |
+
|
176 |
+
*EDIT:*
|
177 |
+
I have just discovered a simpler way to achieve the querystring forward: The [QSA flag](https://httpd.apache.org/docs/trunk/rewrite/flags.html).
|
178 |
+
So, simply set the QSA flag in the RewriteRule, and nothing more:
|
179 |
+
```
|
180 |
+
RewriteRule ^(.*)\.(jpe?g|png)$ webp-on-demand.php?source=%{SCRIPT_FILENAME} [NC,QSA,L]
|
181 |
+
```
|
vendor/rosell-dk/webp-convert/docs/v2.0/webp-on-demand/webp-on-demand.md
ADDED
@@ -0,0 +1,145 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# WebP on demand
|
2 |
+
|
3 |
+
This is a solution for automatically serving WebP images instead of jpeg/pngs [for browsers that supports WebP](https://caniuse.com/#feat=webp) (At the time of writing, 78% of all mobile users and 72% of all desktop users uses browsers supporting webp)
|
4 |
+
|
5 |
+
Once set up, it will automatically convert images, no matter how they are referenced. It for example also works on images referenced in CSS. As the solution does not require any change in the HTML, it can easily be integrated into any website / framework
|
6 |
+
|
7 |
+
## Overview
|
8 |
+
|
9 |
+
A setup consists of a PHP script that serves converted images and some *redirect rules* that redirects JPG/PNG images to the script.
|
10 |
+
|
11 |
+
|
12 |
+
## Requirements
|
13 |
+
|
14 |
+
* *Apache* or *LiteSpeed* web server. Can be made to work with *NGINX* as well. Documentation is on the roadmap.
|
15 |
+
* *mod_rewrite* module for Apache
|
16 |
+
* PHP >= 5.6 (we are only testing down to 5.6. It should however work in 5.5 as well)
|
17 |
+
* That one of the *webp-convert* converters are working (these have different requirements)
|
18 |
+
|
19 |
+
## Installation
|
20 |
+
|
21 |
+
Here we assume you are using Composer. [Not using composer? - Follow me!](https://github.com/rosell-dk/webp-convert/blob/master/docs/v2.0/webp-on-demand/without-composer.md)
|
22 |
+
|
23 |
+
### 1. Require the webp-convert library with composer
|
24 |
+
```
|
25 |
+
composer require rosell-dk/webp-convert
|
26 |
+
```
|
27 |
+
|
28 |
+
### 2. Create the script
|
29 |
+
|
30 |
+
Create a file *webp-on-demand.php*, and place it in webroot, or where-ever you like in you web-application.
|
31 |
+
|
32 |
+
Here is a minimal example to get started with:
|
33 |
+
|
34 |
+
```php
|
35 |
+
<?php
|
36 |
+
// To start with, lets display any errors.
|
37 |
+
// - this will reveal if you entered wrong paths
|
38 |
+
error_reporting(E_ALL);
|
39 |
+
ini_set("display_errors", 1);
|
40 |
+
|
41 |
+
// Once you got it working, make sure that PHP warnings are not send to the output
|
42 |
+
// - this will corrupt the image
|
43 |
+
// For example, you can do it by commenting out the lines below:
|
44 |
+
// error_reporting(0);
|
45 |
+
// ini_set("display_errors", 0);
|
46 |
+
|
47 |
+
require 'vendor/autoload.php'; // Make sure to point this correctly
|
48 |
+
|
49 |
+
use WebPConvert\WebPConvert;
|
50 |
+
|
51 |
+
$source = $_GET['source']; // Absolute file path to source file. Comes from the .htaccess
|
52 |
+
$destination = $source . '.webp'; // Store the converted images besides the original images (other options are available!)
|
53 |
+
|
54 |
+
$options = [
|
55 |
+
|
56 |
+
// UNCOMMENT NEXT LINE, WHEN YOU ARE UP AND RUNNING!
|
57 |
+
'show-report' => true // Show a conversion report instead of serving the converted image.
|
58 |
+
|
59 |
+
// More options available!
|
60 |
+
// https://github.com/rosell-dk/webp-convert/blob/master/docs/v2.0/converting/introduction-for-converting.md
|
61 |
+
// https://github.com/rosell-dk/webp-convert/blob/master/docs/v2.0/serving/introduction-for-serving.md
|
62 |
+
];
|
63 |
+
WebPConvert::serveConverted($source, $destination, $options);
|
64 |
+
```
|
65 |
+
|
66 |
+
### 3. Add redirect rules
|
67 |
+
Place the following rewrite rules in a *.htaccess* file in the directory where you want the solution to take effect:
|
68 |
+
|
69 |
+
```
|
70 |
+
<IfModule mod_rewrite.c>
|
71 |
+
RewriteEngine On
|
72 |
+
|
73 |
+
# Redirect images to webp-on-demand.php (if browser supports webp)
|
74 |
+
RewriteCond %{HTTP_ACCEPT} image/webp
|
75 |
+
RewriteCond %{REQUEST_FILENAME} -f
|
76 |
+
RewriteRule ^(.*)\.(jpe?g|png)$ webp-on-demand.php?source=%{SCRIPT_FILENAME} [NC,L]
|
77 |
+
</IfModule>
|
78 |
+
|
79 |
+
AddType image/webp .webp
|
80 |
+
```
|
81 |
+
If you have placed *webp-on-demand.php* in a subfolder, you will need to change the rewrite rule accordingly.
|
82 |
+
|
83 |
+
The `RewriteCond %{REQUEST_FILENAME} -f` is not strictly necessary, but there to be sure that we got an existing file, and it could perhaps also prevent some undiscovered way of misuse.
|
84 |
+
|
85 |
+
### 4. Validate that it works
|
86 |
+
|
87 |
+
Browse to a JPEG image. Instead of an image, you should see a conversion report. Hopefully, you get a success. Otherwise, you need to hook up to a cloud converter or try to meet the requirements for cwebp, gd or imagick.
|
88 |
+
|
89 |
+
Once you get a successful conversion, you can uncomment the "show-report" option in the script.
|
90 |
+
|
91 |
+
It should work now, but to be absolute sure:
|
92 |
+
|
93 |
+
- Visit a page on your site with an image on it, using *Google Chrome*.
|
94 |
+
- Right-click the page and choose "Inspect"
|
95 |
+
- Click the "Network" tab
|
96 |
+
- Reload the page
|
97 |
+
- Find a jpeg or png image in the list. In the "type" column, it should say "webp". There should also be a *X-WebP-Convert-Status* header on the image that provides some insights on how things went.
|
98 |
+
|
99 |
+
|
100 |
+
### 5. Try this improvement and see if it works
|
101 |
+
|
102 |
+
It seems that it is not necessary to pass the filename in the query string.
|
103 |
+
|
104 |
+
Try replacing `$source = $_GET['source'];` in the script with the following:
|
105 |
+
|
106 |
+
```php
|
107 |
+
$docRoot = rtrim($_SERVER["DOCUMENT_ROOT"], '/');
|
108 |
+
$requestUriNoQS = explode('?', $_SERVER['REQUEST_URI'])[0];
|
109 |
+
$source = $docRoot . urldecode($requestUriNoQS);
|
110 |
+
```
|
111 |
+
|
112 |
+
And you can then remove `?source=%{SCRIPT_FILENAME}` from the `.htaccess` file.
|
113 |
+
|
114 |
+
There are some benefits of not passing in query string:
|
115 |
+
1. Passing a path in the query string may be blocked by a firewall, as it looks suspicious.
|
116 |
+
2. The script called to convert arbitrary files
|
117 |
+
3. One person experienced problems with spaces in filenames passed in the query string. See [this issue](https://github.com/rosell-dk/webp-convert/issues/95)
|
118 |
+
|
119 |
+
|
120 |
+
### 6. Customizing and tweaking
|
121 |
+
|
122 |
+
Basic customizing is done by setting options in the `$options` array. Check out the [docs on convert()](https://github.com/rosell-dk/webp-convert/blob/master/docs/v2.0/converting/convert.md) and the [docs on convertAndServe()](https://github.com/rosell-dk/webp-convert/blob/master/docs/v2.0/serving/convert-and-serve.md)
|
123 |
+
|
124 |
+
Other tweaking is described in *docs/webp-on-demand/tweaks.md*:
|
125 |
+
- [Store converted images in separate folder](https://github.com/rosell-dk/webp-convert/blob/master/docs/v2.0/webp-on-demand/tweaks.md#store-converted-images-in-separate-folder)
|
126 |
+
- [CDN](https://github.com/rosell-dk/webp-convert/blob/master/docs/v2.0/webp-on-demand/tweaks.md#cdn)
|
127 |
+
- [Make .htaccess route directly to existing images](https://github.com/rosell-dk/webp-convert/blob/master/docs/v2.0/webp-on-demand/tweaks.md#make-htaccess-route-directly-to-existing-images)
|
128 |
+
- [Forward the query string](https://github.com/rosell-dk/webp-convert/blob/master/docs/v2.0/webp-on-demand/tweaks.md#forward-the-querystring)
|
129 |
+
|
130 |
+
|
131 |
+
## Troubleshooting
|
132 |
+
|
133 |
+
### The redirect rule doesn't seem to be working
|
134 |
+
If images are neither routed to the converter or a 404, it means that the redirect rule isn't taking effect. Common reasons for this includes:
|
135 |
+
|
136 |
+
- Perhaps there are other rules in your *.htaccess* that interfere with the rules?
|
137 |
+
- Perhaps your site is on *Apache*, but it has been configured to use *Nginx* to serve image files. To find out which server that is handling the images, browse to an image and eximine the "Server" response header. In case *NGINX* are serving images, see if you can reconfigure your server setup. Alternatively, you can create *NGINX* rewrite rules. There are some [here](https://github.com/S1SYPHOS/kirby-webp#nginx) and [there](https://github.com/uhop/grunt-tight-sprite/wiki/Recipe:-serve-WebP-with-nginx-conditionally).
|
138 |
+
- Perhaps the server isn't configured to allow *.htaccess* files? Try inserting rubbish in the top of the *.htaccess* file and refresh. You should now see an *Internal Server Error* error page. If you don't, your *.htaccess* file is ignored. Probably you will need to set *AllowOverride All* in your Virtual Host. [Look here for more help](
|
139 |
+
https://docs.bolt.cm/3.4/howto/making-sure-htaccess-works#test-if-htaccess-is-working)
|
140 |
+
- Perhaps the Apache *mod_rewrite* extension isn't enabled? Try removing both `<IfModule mod_rewrite.c>` and `</IfModule>` lines: if you get an *Internal Server Error* error page after this change, it's probably that it's indeed not enabled.
|
141 |
+
|
142 |
+
|
143 |
+
## Related
|
144 |
+
* https://www.maxcdn.com/blog/how-to-reduce-image-size-with-webp-automagically/
|
145 |
+
* https://www.digitalocean.com/community/tutorials/how-to-create-and-serve-webp-images-to-speed-up-your-website
|
vendor/rosell-dk/webp-convert/docs/v2.0/webp-on-demand/without-composer.md
ADDED
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# WebP On Demand without composer
|
2 |
+
|
3 |
+
For your convenience, the library has been cooked down to two files: *webp-on-demand-1.inc* and *webp-on-demand-2.inc*. The second one is loaded when the first one decides it needs to do a conversion (and not simply serve existing image).
|
4 |
+
|
5 |
+
## Installing
|
6 |
+
|
7 |
+
### 1. Copy the latest build files into your website
|
8 |
+
The build files are distributed [here](https://github.com/rosell-dk/webp-convert-concat/tree/master/build). Open the "latest" folder and copy *webp-on-demand-1.inc* and *webp-on-demand-2.inc* into your website. They can be located wherever you like.
|
9 |
+
|
10 |
+
### 2. Create a *webp-on-demand.php*
|
11 |
+
|
12 |
+
Create a file *webp-on-demand.php*, and place it in webroot, or where-ever you like in you web-application.
|
13 |
+
|
14 |
+
Here is a minimal example to get started with:
|
15 |
+
|
16 |
+
```php
|
17 |
+
<?php
|
18 |
+
// To start with, lets display any errors.
|
19 |
+
// - this will reveal if you entered wrong paths
|
20 |
+
error_reporting(E_ALL);
|
21 |
+
ini_set("display_errors", 1);
|
22 |
+
|
23 |
+
// Once you got it working, make sure that PHP warnings are not send to the output
|
24 |
+
// - this will corrupt the image
|
25 |
+
// For example, you can do it by commenting out the lines below:
|
26 |
+
// error_reporting(0);
|
27 |
+
// ini_set("display_errors", 0);
|
28 |
+
|
29 |
+
use WebPConvert\WebPConvert;
|
30 |
+
|
31 |
+
require 'webp-on-demand-1.inc';
|
32 |
+
|
33 |
+
function webpconvert_autoloader($class) {
|
34 |
+
if (strpos($class, 'WebPConvert\\') === 0) {
|
35 |
+
require_once __DIR__ . '/webp-on-demand-2.inc';
|
36 |
+
}
|
37 |
+
}
|
38 |
+
spl_autoload_register('webpconvert_autoloader', true, true);
|
39 |
+
|
40 |
+
$source = $_GET['source']; // Absolute file path to source file. Comes from the .htaccess
|
41 |
+
$destination = $source . '.webp'; // Store the converted images besides the original images (other options are available!)
|
42 |
+
|
43 |
+
$options = [
|
44 |
+
|
45 |
+
// UNCOMMENT NEXT LINE, WHEN YOU ARE UP AND RUNNING!
|
46 |
+
'show-report' => true // Show a conversion report instead of serving the converted image.
|
47 |
+
|
48 |
+
// More options available!
|
49 |
+
// https://github.com/rosell-dk/webp-convert/blob/master/docs/v2.0/converting/introduction-for-converting.md
|
50 |
+
// https://github.com/rosell-dk/webp-convert/blob/master/docs/v2.0/serving/introduction-for-serving.md
|
51 |
+
];
|
52 |
+
WebPConvert::serveConverted($source, $destination, $options);
|
53 |
+
```
|
54 |
+
|
55 |
+
Note that the procedure has changed in 2.0. In 1.x, the library supported a `require-for-conversion` option, but this option has been removed in 2.0. It was not really needed, as the example above illustrates.
|
56 |
+
|
57 |
+
### 3. Continue the regular install instructions from step 3
|
58 |
+
[Click here to continue...](https://github.com/rosell-dk/webp-on-demand#3-add-redirect-rules)
|
vendor/rosell-dk/webp-convert/src/Convert/Converters/AbstractConverter.php
CHANGED
@@ -120,14 +120,19 @@ abstract class AbstractConverter
|
|
120 |
$this->setProvidedOptions($options);
|
121 |
|
122 |
if (!isset($this->options['_skip_input_check'])) {
|
123 |
-
$this->
|
124 |
-
$this->logLn('
|
125 |
-
$this->logLn('- PHP version: ' . phpversion());
|
126 |
if (isset($_SERVER['SERVER_SOFTWARE'])) {
|
127 |
-
$this->logLn('
|
128 |
}
|
129 |
$this->logLn('');
|
130 |
-
$this->
|
|
|
|
|
|
|
|
|
|
|
|
|
131 |
}
|
132 |
}
|
133 |
|
120 |
$this->setProvidedOptions($options);
|
121 |
|
122 |
if (!isset($this->options['_skip_input_check'])) {
|
123 |
+
$this->logLn('WebP Convert 2.8.0 ignited', 'bold');
|
124 |
+
$this->logLn('PHP version: ' . phpversion());
|
|
|
125 |
if (isset($_SERVER['SERVER_SOFTWARE'])) {
|
126 |
+
$this->logLn('Server software: ' . $_SERVER['SERVER_SOFTWARE']);
|
127 |
}
|
128 |
$this->logLn('');
|
129 |
+
if (isset($this->options['log-call-arguments']) && $this->options['log-call-arguments']) {
|
130 |
+
$this->logLn('source: ' . $this->source);
|
131 |
+
$this->logLn('destination: ' . $this->destination);
|
132 |
+
$this->logLn('');
|
133 |
+
}
|
134 |
+
|
135 |
+
$this->logLn(self::getConverterDisplayName() . ' converter ignited', 'bold');
|
136 |
}
|
137 |
}
|
138 |
|
vendor/rosell-dk/webp-convert/src/Convert/Converters/BaseTraits/OptionsTrait.php
CHANGED
@@ -77,7 +77,9 @@ trait OptionsTrait
|
|
77 |
]],
|
78 |
['quality', 'int', [
|
79 |
'title' => 'Quality (Lossy)',
|
80 |
-
'description' =>
|
|
|
|
|
81 |
'default' => ($isPng ? 85 : 75),
|
82 |
'default-png' => 85,
|
83 |
'default-jpeg' => 75,
|
@@ -89,14 +91,23 @@ trait OptionsTrait
|
|
89 |
],
|
90 |
'ui' => [
|
91 |
'component' => 'slider',
|
92 |
-
'display' => "option
|
93 |
]
|
94 |
]],
|
95 |
['auto-limit', 'boolean', [
|
96 |
'title' => 'Auto-limit',
|
97 |
'description' =>
|
98 |
'Enable this option to prevent an unnecessarily high quality setting for low ' .
|
99 |
-
'quality jpegs.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
'default' => true,
|
101 |
'ui' => [
|
102 |
'component' => 'checkbox',
|
@@ -107,7 +118,7 @@ trait OptionsTrait
|
|
107 |
$introMd . '#preventing-unnecessarily-high-quality-setting-for-low-quality-jpegs'
|
108 |
]
|
109 |
],
|
110 |
-
'display' => "option
|
111 |
]
|
112 |
]],
|
113 |
['alpha-quality', 'int', [
|
@@ -123,7 +134,7 @@ trait OptionsTrait
|
|
123 |
'ui' => [
|
124 |
'component' => 'slider',
|
125 |
'links' => [['Guide', $introMd . '#alpha-quality']],
|
126 |
-
'display' => "(option
|
127 |
]
|
128 |
]],
|
129 |
['near-lossless', 'int', [
|
@@ -138,7 +149,7 @@ trait OptionsTrait
|
|
138 |
'ui' => [
|
139 |
'component' => 'slider',
|
140 |
'links' => [['Guide', $introMd . '#near-lossless']],
|
141 |
-
'display' => "option
|
142 |
]
|
143 |
]],
|
144 |
['metadata', 'string', [
|
@@ -195,8 +206,8 @@ trait OptionsTrait
|
|
195 |
'2 seconds to convert, will takes about 15 seconds to convert with auto-filter. ',
|
196 |
'default' => false,
|
197 |
'ui' => [
|
198 |
-
|
199 |
-
|
200 |
]
|
201 |
]],
|
202 |
['low-memory', 'boolean', [
|
@@ -209,7 +220,7 @@ trait OptionsTrait
|
|
209 |
'ui' => [
|
210 |
'component' => 'checkbox',
|
211 |
'advanced' => true,
|
212 |
-
'display' => "(option
|
213 |
]
|
214 |
]],
|
215 |
['preset', 'string', [
|
@@ -219,17 +230,17 @@ trait OptionsTrait
|
|
219 |
'source material. It even overrides them. It does however not override the quality option. ' .
|
220 |
'"none" means that no preset will be set',
|
221 |
'default' => 'none',
|
222 |
-
'enum' => ['none', 'default', 'photo', 'picture', 'drawing', 'icon', 'text']
|
223 |
'ui' => [
|
224 |
'component' => 'select',
|
225 |
'advanced' => true,
|
226 |
]
|
227 |
-
],
|
228 |
['size-in-percentage', 'int', ['default' => null, 'minimum' => 0, 'maximum' => 100, 'allow-null' => true]],
|
229 |
['skip', 'boolean', ['default' => false]],
|
230 |
['log-call-arguments', 'boolean', ['default' => false]],
|
231 |
// TODO: use-nice should not be a "general" option
|
232 |
-
['use-nice', 'boolean', ['default' => false]],
|
233 |
['jpeg', 'array', ['default' => []]],
|
234 |
['png', 'array', ['default' => []]],
|
235 |
|
@@ -244,43 +255,6 @@ trait OptionsTrait
|
|
244 |
]);
|
245 |
}
|
246 |
|
247 |
-
/**
|
248 |
-
* Get ui definitions for the general options.
|
249 |
-
*
|
250 |
-
* You can automatically build a gui with these (suggested) components
|
251 |
-
*
|
252 |
-
* @param string $imageType (png | jpeg) The image type - determines the defaults
|
253 |
-
*
|
254 |
-
* @return array Hash of ui definitions indexed by option id
|
255 |
-
*/
|
256 |
-
public function getUIForGeneralOptions($imageType)
|
257 |
-
{
|
258 |
-
return [
|
259 |
-
/*
|
260 |
-
['preset', 'string', [
|
261 |
-
'default' => 'none',
|
262 |
-
'enum' => ['none', 'default', 'photo', 'picture', 'drawing', 'icon', 'text']]
|
263 |
-
],
|
264 |
-
*/
|
265 |
-
/* {
|
266 |
-
"id": "metadata",
|
267 |
-
"type": "string",
|
268 |
-
"default": 'exif',
|
269 |
-
"ui": {
|
270 |
-
"component": "multi-select",
|
271 |
-
"label": "Metadata",
|
272 |
-
"options": ['all', 'none', 'exif', 'icc', 'xmp'],
|
273 |
-
"optionLabels": {
|
274 |
-
'all': 'All',
|
275 |
-
'none': 'None',
|
276 |
-
'exif': 'Exif',
|
277 |
-
'icc': 'ICC',
|
278 |
-
'xmp': 'XMP'
|
279 |
-
}
|
280 |
-
},*/
|
281 |
-
];
|
282 |
-
}
|
283 |
-
|
284 |
/**
|
285 |
* Get the unique options for a converter
|
286 |
*
|
@@ -349,6 +323,7 @@ trait OptionsTrait
|
|
349 |
foreach ($this->providedOptions as $optionKey => $optionValue) {
|
350 |
if (substr($optionKey, 0, $strLen + 1) == ($converterId . '-')) {
|
351 |
$this->providedOptions[substr($optionKey, $strLen + 1)] = $optionValue;
|
|
|
352 |
}
|
353 |
}
|
354 |
|
@@ -427,74 +402,73 @@ trait OptionsTrait
|
|
427 |
$this->logLn('');
|
428 |
$this->logLn('Options:');
|
429 |
$this->logLn('------------');
|
430 |
-
$this->logLn(
|
431 |
-
'The following options have been set explicitly. ' .
|
432 |
-
'Note: it is the resulting options after merging down the "jpeg" and "png" options and any ' .
|
433 |
-
'converter-prefixed options.'
|
434 |
-
);
|
435 |
-
$this->logLn('- source: ' . $this->source);
|
436 |
-
$this->logLn('- destination: ' . $this->destination);
|
437 |
|
438 |
$unsupported = $this->getUnsupportedDefaultOptions();
|
439 |
-
|
440 |
-
$
|
441 |
-
$implicit = [];
|
442 |
foreach ($this->options2->getOptionsMap() as $id => $option) {
|
443 |
-
if (($id
|
|
|
|
|
444 |
continue;
|
445 |
}
|
446 |
if ($option->isValueExplicitlySet()) {
|
|
|
|
|
447 |
if (($option instanceof GhostOption) || in_array($id, $unsupported)) {
|
448 |
-
//$
|
449 |
-
if (($id != '_skip_input_check') && ($id != '_suppress_success_message')) {
|
450 |
-
$ignored[] = $option;
|
451 |
-
}
|
452 |
} else {
|
453 |
-
|
454 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
455 |
$this->logLn('');
|
|
|
456 |
}
|
457 |
-
|
458 |
-
if (
|
459 |
-
|
460 |
-
$implicit[] = $option;
|
461 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
462 |
}
|
|
|
|
|
|
|
|
|
|
|
463 |
}
|
464 |
|
465 |
-
if (count($
|
466 |
$this->logLn('');
|
|
|
|
|
467 |
$this->logLn(
|
468 |
-
'The following options
|
469 |
);
|
470 |
-
foreach ($
|
471 |
$this->log('- ' . $option->getId() . ': ');
|
472 |
$this->log($option->getValueForPrint());
|
|
|
|
|
|
|
473 |
$this->logLn('');
|
474 |
}
|
475 |
}
|
476 |
-
if (count($ignored) > 0) {
|
477 |
-
$this->logLn('');
|
478 |
-
if ($this instanceof Stack) {
|
479 |
-
$this->logLn(
|
480 |
-
'The following options were supplied and are passed on to the converters in the stack:'
|
481 |
-
);
|
482 |
-
foreach ($ignored as $option) {
|
483 |
-
$this->log('- ' . $option->getId() . ': ');
|
484 |
-
$this->log($option->getValueForPrint());
|
485 |
-
$this->logLn('');
|
486 |
-
}
|
487 |
-
} else {
|
488 |
-
$this->logLn(
|
489 |
-
'The following options were supplied but are ignored because they are not supported by this ' .
|
490 |
-
'converter:'
|
491 |
-
);
|
492 |
-
foreach ($ignored as $option) {
|
493 |
-
$this->logLn('- ' . $option->getId());
|
494 |
-
}
|
495 |
-
}
|
496 |
-
}
|
497 |
-
$this->logLn('------------');
|
498 |
}
|
499 |
|
500 |
// to be overridden by converters
|
@@ -509,40 +483,60 @@ trait OptionsTrait
|
|
509 |
}
|
510 |
|
511 |
/**
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
|
|
523 |
{
|
524 |
$uniqueOptions = new Options();
|
525 |
-
|
526 |
-
|
527 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
528 |
}
|
529 |
|
530 |
/**
|
531 |
-
*
|
532 |
*
|
533 |
-
*
|
534 |
-
*
|
535 |
*
|
536 |
-
*
|
|
|
537 |
*
|
538 |
-
*
|
539 |
*/
|
540 |
-
public function getGeneralOptionDefinitions($imageType = '
|
541 |
{
|
542 |
$generalOptions = new Options();
|
543 |
$generalOptions->addOptions(... $this->getGeneralOptions($imageType));
|
544 |
//$generalOptions->setUI($this->getUIForGeneralOptions($imageType));
|
545 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
546 |
}
|
547 |
|
548 |
public function getSupportedGeneralOptions($imageType = 'png')
|
@@ -584,40 +578,4 @@ trait OptionsTrait
|
|
584 |
}
|
585 |
return $supportedGeneralIds;
|
586 |
}
|
587 |
-
|
588 |
-
/**
|
589 |
-
* Get option definitions.
|
590 |
-
*
|
591 |
-
* Added in order to give GUI's a way to automatically adjust their setting screens.
|
592 |
-
*
|
593 |
-
* @param string $imageType (png | jpeg) The image type - determines the defaults
|
594 |
-
* @param bool $returnGeneral Whether the general setting definitions should be returned
|
595 |
-
* @param bool $returnGeneralSupport Whether the ids of supported/unsupported general options
|
596 |
-
* should be returned
|
597 |
-
*
|
598 |
-
* @return array Array of options definitions - ready to be json encoded, or whatever
|
599 |
-
*/
|
600 |
-
public function getOptionDefinitions($imageType = 'png', $returnGeneral = true, $returnGeneralSupport = true)
|
601 |
-
{
|
602 |
-
$result = [
|
603 |
-
'unique' => $this->getUniqueOptionDefinitions($imageType),
|
604 |
-
];
|
605 |
-
if ($returnGeneral) {
|
606 |
-
$result['general'] = $this->getSupportedGeneralOptionDefinitions($imageType);
|
607 |
-
}
|
608 |
-
if ($returnGeneralSupport) {
|
609 |
-
$result['supported-general'] = $this->getSupportedGeneralOptionIds();
|
610 |
-
$result['unsupported-general'] = $this->getUnsupportedDefaultOptions();
|
611 |
-
}
|
612 |
-
return $result;
|
613 |
-
}
|
614 |
-
/*
|
615 |
-
public static function getUniqueOptions($imageType = 'png')
|
616 |
-
{
|
617 |
-
$options = new Options();
|
618 |
-
// $options->addOptions(... self::getGeneralOptions($imageType));
|
619 |
-
// $options->addOptions(... self::getUniqueOptions($imageType));
|
620 |
-
|
621 |
-
return $options->getDefinitions();
|
622 |
-
}*/
|
623 |
}
|
77 |
]],
|
78 |
['quality', 'int', [
|
79 |
'title' => 'Quality (Lossy)',
|
80 |
+
'description' =>
|
81 |
+
'Quality for lossy encoding. ' .
|
82 |
+
'In case you enable "auto-limit", you can consider this property a maximum quality.',
|
83 |
'default' => ($isPng ? 85 : 75),
|
84 |
'default-png' => 85,
|
85 |
'default-jpeg' => 75,
|
91 |
],
|
92 |
'ui' => [
|
93 |
'component' => 'slider',
|
94 |
+
'display' => "option('encoding') != 'lossless'"
|
95 |
]
|
96 |
]],
|
97 |
['auto-limit', 'boolean', [
|
98 |
'title' => 'Auto-limit',
|
99 |
'description' =>
|
100 |
'Enable this option to prevent an unnecessarily high quality setting for low ' .
|
101 |
+
'quality jpegs. It works by adjusting quality setting down to the quality of the jpeg. ' .
|
102 |
+
'Converting ie a jpeg with quality:50 to ie quality:80 does not get you better quality ' .
|
103 |
+
'than converting it to quality:80, but it does get you a much bigger file - so you ' .
|
104 |
+
'really should enable this option.' . "\n\n" .
|
105 |
+
'The option is ignored for PNG and never adjusts quality up. ' . "\n\n" .
|
106 |
+
'The feature requires Imagick, ImageMagick or Gmagick in order to detect the quality of ' .
|
107 |
+
'the jpeg. ' . "\n\n" .
|
108 |
+
'PS: The "auto-limit" option is relative new. However, before this option, you could achieve ' .
|
109 |
+
'the same by setting quality to "auto" and specifying a "max-quality" and a "default-quality". ' .
|
110 |
+
'These are deprecated now, but still works.',
|
111 |
'default' => true,
|
112 |
'ui' => [
|
113 |
'component' => 'checkbox',
|
118 |
$introMd . '#preventing-unnecessarily-high-quality-setting-for-low-quality-jpegs'
|
119 |
]
|
120 |
],
|
121 |
+
'display' => "option('encoding') != 'lossless'"
|
122 |
]
|
123 |
]],
|
124 |
['alpha-quality', 'int', [
|
134 |
'ui' => [
|
135 |
'component' => 'slider',
|
136 |
'links' => [['Guide', $introMd . '#alpha-quality']],
|
137 |
+
'display' => "(option('encoding') != 'lossless') && (imageType!='jpeg')"
|
138 |
]
|
139 |
]],
|
140 |
['near-lossless', 'int', [
|
149 |
'ui' => [
|
150 |
'component' => 'slider',
|
151 |
'links' => [['Guide', $introMd . '#near-lossless']],
|
152 |
+
'display' => "option('encoding') != 'lossy'"
|
153 |
]
|
154 |
]],
|
155 |
['metadata', 'string', [
|
206 |
'2 seconds to convert, will takes about 15 seconds to convert with auto-filter. ',
|
207 |
'default' => false,
|
208 |
'ui' => [
|
209 |
+
'component' => 'checkbox',
|
210 |
+
'advanced' => true,
|
211 |
]
|
212 |
]],
|
213 |
['low-memory', 'boolean', [
|
220 |
'ui' => [
|
221 |
'component' => 'checkbox',
|
222 |
'advanced' => true,
|
223 |
+
'display' => "(option('encoding') != 'lossless') && (option('method')>2)"
|
224 |
]
|
225 |
]],
|
226 |
['preset', 'string', [
|
230 |
'source material. It even overrides them. It does however not override the quality option. ' .
|
231 |
'"none" means that no preset will be set',
|
232 |
'default' => 'none',
|
233 |
+
'enum' => ['none', 'default', 'photo', 'picture', 'drawing', 'icon', 'text'],
|
234 |
'ui' => [
|
235 |
'component' => 'select',
|
236 |
'advanced' => true,
|
237 |
]
|
238 |
+
]],
|
239 |
['size-in-percentage', 'int', ['default' => null, 'minimum' => 0, 'maximum' => 100, 'allow-null' => true]],
|
240 |
['skip', 'boolean', ['default' => false]],
|
241 |
['log-call-arguments', 'boolean', ['default' => false]],
|
242 |
// TODO: use-nice should not be a "general" option
|
243 |
+
//['use-nice', 'boolean', ['default' => false]],
|
244 |
['jpeg', 'array', ['default' => []]],
|
245 |
['png', 'array', ['default' => []]],
|
246 |
|
255 |
]);
|
256 |
}
|
257 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
258 |
/**
|
259 |
* Get the unique options for a converter
|
260 |
*
|
323 |
foreach ($this->providedOptions as $optionKey => $optionValue) {
|
324 |
if (substr($optionKey, 0, $strLen + 1) == ($converterId . '-')) {
|
325 |
$this->providedOptions[substr($optionKey, $strLen + 1)] = $optionValue;
|
326 |
+
unset($this->providedOptions[$optionKey]);
|
327 |
}
|
328 |
}
|
329 |
|
402 |
$this->logLn('');
|
403 |
$this->logLn('Options:');
|
404 |
$this->logLn('------------');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
405 |
|
406 |
$unsupported = $this->getUnsupportedDefaultOptions();
|
407 |
+
$received = [];
|
408 |
+
$implicitlySet = [];
|
|
|
409 |
foreach ($this->options2->getOptionsMap() as $id => $option) {
|
410 |
+
if (in_array($id, [
|
411 |
+
'png', 'jpeg', '_skip_input_check', '_suppress_success_message', 'skip', 'log_call_arguments'
|
412 |
+
])) {
|
413 |
continue;
|
414 |
}
|
415 |
if ($option->isValueExplicitlySet()) {
|
416 |
+
$received[] = $option;
|
417 |
+
} else {
|
418 |
if (($option instanceof GhostOption) || in_array($id, $unsupported)) {
|
419 |
+
//$received[] = $option;
|
|
|
|
|
|
|
420 |
} else {
|
421 |
+
if (!$option->isDeprecated()) {
|
422 |
+
$implicitlySet[] = $option;
|
423 |
+
}
|
424 |
+
}
|
425 |
+
}
|
426 |
+
}
|
427 |
+
|
428 |
+
if (count($received) > 0) {
|
429 |
+
foreach ($received as $option) {
|
430 |
+
$this->log('- ' . $option->getId() . ': ');
|
431 |
+
if ($option instanceof GhostOption) {
|
432 |
+
$this->log(' (unknown to ' . $this->getConverterId() . ')', 'bold');
|
433 |
$this->logLn('');
|
434 |
+
continue;
|
435 |
}
|
436 |
+
$this->log($option->getValueForPrint());
|
437 |
+
if ($option->isDeprecated()) {
|
438 |
+
$this->log(' (deprecated)', 'bold');
|
|
|
439 |
}
|
440 |
+
if (in_array($option->getId(), $unsupported)) {
|
441 |
+
if ($this instanceof Stack) {
|
442 |
+
//$this->log(' *(passed on)*');
|
443 |
+
} else {
|
444 |
+
$this->log(' (unsupported by ' . $this->getConverterId() . ')', 'bold');
|
445 |
+
}
|
446 |
+
}
|
447 |
+
$this->logLn('');
|
448 |
}
|
449 |
+
$this->logLn('');
|
450 |
+
$this->logLn(
|
451 |
+
'Note that these are the resulting options after merging down the "jpeg" and "png" options and any ' .
|
452 |
+
'converter-prefixed options'
|
453 |
+
);
|
454 |
}
|
455 |
|
456 |
+
if (count($implicitlySet) > 0) {
|
457 |
$this->logLn('');
|
458 |
+
$this->logLn('Defaults:');
|
459 |
+
$this->logLn('------------');
|
460 |
$this->logLn(
|
461 |
+
'The following options was not set, so using the following defaults:'
|
462 |
);
|
463 |
+
foreach ($implicitlySet as $option) {
|
464 |
$this->log('- ' . $option->getId() . ': ');
|
465 |
$this->log($option->getValueForPrint());
|
466 |
+
/*if ($option instanceof GhostOption) {
|
467 |
+
$this->log(' **(ghost)**');
|
468 |
+
}*/
|
469 |
$this->logLn('');
|
470 |
}
|
471 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
472 |
}
|
473 |
|
474 |
// to be overridden by converters
|
483 |
}
|
484 |
|
485 |
/**
|
486 |
+
* Get unique option definitions.
|
487 |
+
*
|
488 |
+
* Gets definitions of the converters "unique" options (that is, those options that
|
489 |
+
* are not general). It was added in order to give GUI's a way to automatically adjust
|
490 |
+
* their setting screens.
|
491 |
+
*
|
492 |
+
* @param bool $filterOutOptionsWithoutUI If options without UI defined should be filtered out
|
493 |
+
* @param string $imageType (png | jpeg) The image type - determines the defaults
|
494 |
+
*
|
495 |
+
* @return array Array of options definitions - ready to be json encoded, or whatever
|
496 |
+
*/
|
497 |
+
public function getUniqueOptionDefinitions($filterOutOptionsWithoutUI = true, $imageType = 'jpeg')
|
498 |
{
|
499 |
$uniqueOptions = new Options();
|
500 |
+
//$uniqueOptions->addOptions(... $this->getUniqueOptions($imageType));
|
501 |
+
foreach ($this->getUniqueOptions($imageType) as $uoption) {
|
502 |
+
$uoption->setId(self::getConverterId() . '-' . $uoption->getId());
|
503 |
+
$uniqueOptions->addOption($uoption);
|
504 |
+
}
|
505 |
+
|
506 |
+
$optionDefinitions = $uniqueOptions->getDefinitions();
|
507 |
+
if ($filterOutOptionsWithoutUI) {
|
508 |
+
$optionDefinitions = array_filter($optionDefinitions, function ($value) {
|
509 |
+
return !is_null($value['ui']);
|
510 |
+
});
|
511 |
+
$optionDefinitions = array_values($optionDefinitions); // re-index
|
512 |
+
}
|
513 |
+
return $optionDefinitions;
|
514 |
}
|
515 |
|
516 |
/**
|
517 |
+
* Get general option definitions.
|
518 |
*
|
519 |
+
* Gets definitions of all general options (not just the ones supported by current converter)
|
520 |
+
* For UI's, as a way to automatically adjust their setting screens.
|
521 |
*
|
522 |
+
* @param bool $filterOutOptionsWithoutUI If options without UI defined should be filtered out
|
523 |
+
* @param string $imageType (png | jpeg) The image type - determines the defaults
|
524 |
*
|
525 |
+
* @return array Array of options definitions - ready to be json encoded, or whatever
|
526 |
*/
|
527 |
+
public function getGeneralOptionDefinitions($filterOutOptionsWithoutUI = true, $imageType = 'jpeg')
|
528 |
{
|
529 |
$generalOptions = new Options();
|
530 |
$generalOptions->addOptions(... $this->getGeneralOptions($imageType));
|
531 |
//$generalOptions->setUI($this->getUIForGeneralOptions($imageType));
|
532 |
+
$optionDefinitions = $generalOptions->getDefinitions();
|
533 |
+
if ($filterOutOptionsWithoutUI) {
|
534 |
+
$optionDefinitions = array_filter($optionDefinitions, function ($value) {
|
535 |
+
return !is_null($value['ui']);
|
536 |
+
});
|
537 |
+
$optionDefinitions = array_values($optionDefinitions); // re-index
|
538 |
+
}
|
539 |
+
return $optionDefinitions;
|
540 |
}
|
541 |
|
542 |
public function getSupportedGeneralOptions($imageType = 'png')
|
578 |
}
|
579 |
return $supportedGeneralIds;
|
580 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
581 |
}
|
vendor/rosell-dk/webp-convert/src/Convert/Converters/ConverterTraits/ExecTrait.php
CHANGED
@@ -16,6 +16,7 @@ trait ExecTrait
|
|
16 |
|
17 |
abstract protected function logLn($msg, $style = '');
|
18 |
|
|
|
19 |
/**
|
20 |
* Helper function for examining if "nice" command is available
|
21 |
*
|
@@ -40,6 +41,35 @@ trait ExecTrait
|
|
40 |
return false; // to satisfy phpstan
|
41 |
}
|
42 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
/**
|
44 |
* Logs output from the exec call.
|
45 |
*
|
16 |
|
17 |
abstract protected function logLn($msg, $style = '');
|
18 |
|
19 |
+
|
20 |
/**
|
21 |
* Helper function for examining if "nice" command is available
|
22 |
*
|
41 |
return false; // to satisfy phpstan
|
42 |
}
|
43 |
|
44 |
+
protected function checkNiceSupport()
|
45 |
+
{
|
46 |
+
$ok = self::hasNiceSupport();
|
47 |
+
if ($ok) {
|
48 |
+
$this->logLn('Tested "nice" command - it works :)');
|
49 |
+
} else {
|
50 |
+
$this->logLn(
|
51 |
+
'**No "nice" support. To save a few ms, you can disable the "use-nice" option.**'
|
52 |
+
);
|
53 |
+
}
|
54 |
+
return $ok;
|
55 |
+
}
|
56 |
+
|
57 |
+
protected static function niceOption()
|
58 |
+
{
|
59 |
+
return ['use-nice', 'boolean', [
|
60 |
+
'title' => 'Use nice',
|
61 |
+
'description' =>
|
62 |
+
'If *use-nice* is set, it will be examined if the *nice* command is available. ' .
|
63 |
+
'If it is, the binary is executed using *nice*. This assigns low priority to the process and ' .
|
64 |
+
'will save system resources - but result in slower conversion.',
|
65 |
+
'default' => true,
|
66 |
+
'ui' => [
|
67 |
+
'component' => 'checkbox',
|
68 |
+
'advanced' => true
|
69 |
+
]
|
70 |
+
]];
|
71 |
+
}
|
72 |
+
|
73 |
/**
|
74 |
* Logs output from the exec call.
|
75 |
*
|
vendor/rosell-dk/webp-convert/src/Convert/Converters/Cwebp.php
CHANGED
@@ -45,6 +45,7 @@ class Cwebp extends AbstractConverter
|
|
45 |
}
|
46 |
|
47 |
return OptionFactory::createOptions([
|
|
|
48 |
['try-cwebp', 'boolean', [
|
49 |
'title' => 'Try plain cwebp command',
|
50 |
'description' =>
|
@@ -110,7 +111,7 @@ class Cwebp extends AbstractConverter
|
|
110 |
'component' => 'multi-select',
|
111 |
'advanced' => true,
|
112 |
'options' => $binariesForOS,
|
113 |
-
'display' => "
|
114 |
]
|
115 |
|
116 |
]],
|
@@ -122,7 +123,7 @@ class Cwebp extends AbstractConverter
|
|
122 |
'ui' => [
|
123 |
'component' => '',
|
124 |
'advanced' => true,
|
125 |
-
'display' => "option
|
126 |
],
|
127 |
'sensitive' => true
|
128 |
]],
|
@@ -938,7 +939,8 @@ class Cwebp extends AbstractConverter
|
|
938 |
'Starting conversion, using the first of these. If that should fail, ' .
|
939 |
'the next will be tried and so on.'
|
940 |
);
|
941 |
-
$useNice = (
|
|
|
942 |
$success = false;
|
943 |
foreach ($binaryVersions as $binary => $version) {
|
944 |
if (isset($suppliedBinariesHash[$binary])) {
|
45 |
}
|
46 |
|
47 |
return OptionFactory::createOptions([
|
48 |
+
self::niceOption(),
|
49 |
['try-cwebp', 'boolean', [
|
50 |
'title' => 'Try plain cwebp command',
|
51 |
'description' =>
|
111 |
'component' => 'multi-select',
|
112 |
'advanced' => true,
|
113 |
'options' => $binariesForOS,
|
114 |
+
'display' => "option('cwebp-try-supplied-binary-for-os') == true"
|
115 |
]
|
116 |
|
117 |
]],
|
123 |
'ui' => [
|
124 |
'component' => '',
|
125 |
'advanced' => true,
|
126 |
+
'display' => "option('cwebp-try-supplied-binary-for-os') == true"
|
127 |
],
|
128 |
'sensitive' => true
|
129 |
]],
|
939 |
'Starting conversion, using the first of these. If that should fail, ' .
|
940 |
'the next will be tried and so on.'
|
941 |
);
|
942 |
+
$useNice = ($this->options['use-nice'] && $this->checkNiceSupport());
|
943 |
+
|
944 |
$success = false;
|
945 |
foreach ($binaryVersions as $binary => $version) {
|
946 |
if (isset($suppliedBinariesHash[$binary])) {
|
vendor/rosell-dk/webp-convert/src/Convert/Converters/Ewww.php
CHANGED
@@ -39,7 +39,7 @@ class Ewww extends AbstractConverter
|
|
39 |
'default' => '',
|
40 |
'sensitive' => true,
|
41 |
'ui' => [
|
42 |
-
'component' => '
|
43 |
]
|
44 |
]],
|
45 |
['check-key-status-before-converting', 'boolean', [
|
@@ -70,7 +70,6 @@ class Ewww extends AbstractConverter
|
|
70 |
'preset',
|
71 |
'sharp-yuv',
|
72 |
'size-in-percentage',
|
73 |
-
'use-nice'
|
74 |
];
|
75 |
}
|
76 |
|
39 |
'default' => '',
|
40 |
'sensitive' => true,
|
41 |
'ui' => [
|
42 |
+
'component' => 'password',
|
43 |
]
|
44 |
]],
|
45 |
['check-key-status-before-converting', 'boolean', [
|
70 |
'preset',
|
71 |
'sharp-yuv',
|
72 |
'size-in-percentage',
|
|
|
73 |
];
|
74 |
}
|
75 |
|
vendor/rosell-dk/webp-convert/src/Convert/Converters/FFMpeg.php
CHANGED
@@ -7,6 +7,7 @@ use WebPConvert\Convert\Converters\ConverterTraits\ExecTrait;
|
|
7 |
use WebPConvert\Convert\Converters\ConverterTraits\EncodingAutoTrait;
|
8 |
use WebPConvert\Convert\Exceptions\ConversionFailed\ConverterNotOperational\SystemRequirementsNotMetException;
|
9 |
use WebPConvert\Convert\Exceptions\ConversionFailedException;
|
|
|
10 |
|
11 |
//use WebPConvert\Convert\Exceptions\ConversionFailed\InvalidInput\TargetNotFoundException;
|
12 |
|
@@ -27,17 +28,26 @@ class FFMpeg extends AbstractConverter
|
|
27 |
return [
|
28 |
'alpha-quality',
|
29 |
'auto-filter',
|
30 |
-
'encoding',
|
31 |
'low-memory',
|
32 |
'metadata',
|
33 |
'near-lossless',
|
34 |
-
'preset',
|
35 |
'sharp-yuv',
|
36 |
'size-in-percentage',
|
37 |
-
'use-nice'
|
38 |
];
|
39 |
}
|
40 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
private function getPath()
|
42 |
{
|
43 |
if (defined('WEBPCONVERT_FFMPEG_PATH')) {
|
@@ -143,9 +153,8 @@ class FFMpeg extends AbstractConverter
|
|
143 |
|
144 |
$command = $this->getPath() . ' ' . $this->createCommandLineOptions() . ' 2>&1';
|
145 |
|
146 |
-
$useNice = (
|
147 |
if ($useNice) {
|
148 |
-
$this->logLn('using nice');
|
149 |
$command = 'nice ' . $command;
|
150 |
}
|
151 |
$this->logLn('Executing command: ' . $command);
|
7 |
use WebPConvert\Convert\Converters\ConverterTraits\EncodingAutoTrait;
|
8 |
use WebPConvert\Convert\Exceptions\ConversionFailed\ConverterNotOperational\SystemRequirementsNotMetException;
|
9 |
use WebPConvert\Convert\Exceptions\ConversionFailedException;
|
10 |
+
use WebPConvert\Options\OptionFactory;
|
11 |
|
12 |
//use WebPConvert\Convert\Exceptions\ConversionFailed\InvalidInput\TargetNotFoundException;
|
13 |
|
28 |
return [
|
29 |
'alpha-quality',
|
30 |
'auto-filter',
|
|
|
31 |
'low-memory',
|
32 |
'metadata',
|
33 |
'near-lossless',
|
|
|
34 |
'sharp-yuv',
|
35 |
'size-in-percentage',
|
|
|
36 |
];
|
37 |
}
|
38 |
|
39 |
+
/**
|
40 |
+
* Get the options unique for this converter
|
41 |
+
*
|
42 |
+
* @return array Array of options
|
43 |
+
*/
|
44 |
+
public function getUniqueOptions($imageType)
|
45 |
+
{
|
46 |
+
return OptionFactory::createOptions([
|
47 |
+
self::niceOption()
|
48 |
+
]);
|
49 |
+
}
|
50 |
+
|
51 |
private function getPath()
|
52 |
{
|
53 |
if (defined('WEBPCONVERT_FFMPEG_PATH')) {
|
153 |
|
154 |
$command = $this->getPath() . ' ' . $this->createCommandLineOptions() . ' 2>&1';
|
155 |
|
156 |
+
$useNice = ($this->options['use-nice'] && $this->checkNiceSupport());
|
157 |
if ($useNice) {
|
|
|
158 |
$command = 'nice ' . $command;
|
159 |
}
|
160 |
$this->logLn('Executing command: ' . $command);
|
vendor/rosell-dk/webp-convert/src/Convert/Converters/Gd.php
CHANGED
@@ -34,7 +34,6 @@ class Gd extends AbstractConverter
|
|
34 |
'preset',
|
35 |
'sharp-yuv',
|
36 |
'size-in-percentage',
|
37 |
-
'use-nice'
|
38 |
];
|
39 |
}
|
40 |
|
34 |
'preset',
|
35 |
'sharp-yuv',
|
36 |
'size-in-percentage',
|
|
|
37 |
];
|
38 |
}
|
39 |
|
vendor/rosell-dk/webp-convert/src/Convert/Converters/Gmagick.php
CHANGED
@@ -25,7 +25,6 @@ class Gmagick extends AbstractConverter
|
|
25 |
return [
|
26 |
'near-lossless',
|
27 |
'size-in-percentage',
|
28 |
-
'use-nice'
|
29 |
];
|
30 |
}
|
31 |
|
25 |
return [
|
26 |
'near-lossless',
|
27 |
'size-in-percentage',
|
|
|
28 |
];
|
29 |
}
|
30 |
|
vendor/rosell-dk/webp-convert/src/Convert/Converters/GraphicsMagick.php
CHANGED
@@ -5,9 +5,9 @@ namespace WebPConvert\Convert\Converters;
|
|
5 |
use WebPConvert\Convert\Converters\AbstractConverter;
|
6 |
use WebPConvert\Convert\Converters\ConverterTraits\EncodingAutoTrait;
|
7 |
use WebPConvert\Convert\Converters\ConverterTraits\ExecTrait;
|
8 |
-
|
9 |
use WebPConvert\Convert\Exceptions\ConversionFailed\ConverterNotOperational\SystemRequirementsNotMetException;
|
10 |
use WebPConvert\Convert\Exceptions\ConversionFailedException;
|
|
|
11 |
|
12 |
//use WebPConvert\Convert\Exceptions\ConversionFailed\InvalidInput\TargetNotFoundException;
|
13 |
|
@@ -31,6 +31,18 @@ class GraphicsMagick extends AbstractConverter
|
|
31 |
];
|
32 |
}
|
33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
private function getPath()
|
35 |
{
|
36 |
if (defined('WEBPCONVERT_GRAPHICSMAGICK_PATH')) {
|
@@ -180,9 +192,8 @@ class GraphicsMagick extends AbstractConverter
|
|
180 |
|
181 |
$command = $this->getPath() . ' convert ' . $this->createCommandLineOptions() . ' 2>&1';
|
182 |
|
183 |
-
$useNice = (
|
184 |
if ($useNice) {
|
185 |
-
$this->logLn('using nice');
|
186 |
$command = 'nice ' . $command;
|
187 |
}
|
188 |
$this->logLn('Executing command: ' . $command);
|
5 |
use WebPConvert\Convert\Converters\AbstractConverter;
|
6 |
use WebPConvert\Convert\Converters\ConverterTraits\EncodingAutoTrait;
|
7 |
use WebPConvert\Convert\Converters\ConverterTraits\ExecTrait;
|
|
|
8 |
use WebPConvert\Convert\Exceptions\ConversionFailed\ConverterNotOperational\SystemRequirementsNotMetException;
|
9 |
use WebPConvert\Convert\Exceptions\ConversionFailedException;
|
10 |
+
use WebPConvert\Options\OptionFactory;
|
11 |
|
12 |
//use WebPConvert\Convert\Exceptions\ConversionFailed\InvalidInput\TargetNotFoundException;
|
13 |
|
31 |
];
|
32 |
}
|
33 |
|
34 |
+
/**
|
35 |
+
* Get the options unique for this converter
|
36 |
+
*
|
37 |
+
* @return array Array of options
|
38 |
+
*/
|
39 |
+
public function getUniqueOptions($imageType)
|
40 |
+
{
|
41 |
+
return OptionFactory::createOptions([
|
42 |
+
self::niceOption()
|
43 |
+
]);
|
44 |
+
}
|
45 |
+
|
46 |
private function getPath()
|
47 |
{
|
48 |
if (defined('WEBPCONVERT_GRAPHICSMAGICK_PATH')) {
|
192 |
|
193 |
$command = $this->getPath() . ' convert ' . $this->createCommandLineOptions() . ' 2>&1';
|
194 |
|
195 |
+
$useNice = ($this->options['use-nice'] && $this->checkNiceSupport());
|
196 |
if ($useNice) {
|
|
|
197 |
$command = 'nice ' . $command;
|
198 |
}
|
199 |
$this->logLn('Executing command: ' . $command);
|
vendor/rosell-dk/webp-convert/src/Convert/Converters/ImageMagick.php
CHANGED
@@ -39,6 +39,7 @@ class ImageMagick extends AbstractConverter
|
|
39 |
public function getUniqueOptions($imageType)
|
40 |
{
|
41 |
return OptionFactory::createOptions([
|
|
|
42 |
['try-common-system-paths', 'boolean', [
|
43 |
'title' => 'Try locating ImageMagick in common system paths',
|
44 |
'description' =>
|
@@ -248,9 +249,8 @@ class ImageMagick extends AbstractConverter
|
|
248 |
|
249 |
$command = $this->getPath() . ' ' . $this->createCommandLineOptions($versionNumber) . ' 2>&1';
|
250 |
|
251 |
-
$useNice = (
|
252 |
if ($useNice) {
|
253 |
-
$this->logLn('using nice');
|
254 |
$command = 'nice ' . $command;
|
255 |
}
|
256 |
$this->logLn('Executing command: ' . $command);
|
39 |
public function getUniqueOptions($imageType)
|
40 |
{
|
41 |
return OptionFactory::createOptions([
|
42 |
+
self::niceOption(),
|
43 |
['try-common-system-paths', 'boolean', [
|
44 |
'title' => 'Try locating ImageMagick in common system paths',
|
45 |
'description' =>
|
249 |
|
250 |
$command = $this->getPath() . ' ' . $this->createCommandLineOptions($versionNumber) . ' 2>&1';
|
251 |
|
252 |
+
$useNice = ($this->options['use-nice'] && $this->checkNiceSupport());
|
253 |
if ($useNice) {
|
|
|
254 |
$command = 'nice ' . $command;
|
255 |
}
|
256 |
$this->logLn('Executing command: ' . $command);
|
vendor/rosell-dk/webp-convert/src/Convert/Converters/Imagick.php
CHANGED
@@ -25,7 +25,6 @@ class Imagick extends AbstractConverter
|
|
25 |
{
|
26 |
return [
|
27 |
'size-in-percentage',
|
28 |
-
'use-nice'
|
29 |
];
|
30 |
}
|
31 |
|
25 |
{
|
26 |
return [
|
27 |
'size-in-percentage',
|
|
|
28 |
];
|
29 |
}
|
30 |
|
vendor/rosell-dk/webp-convert/src/Convert/Converters/Stack.php
CHANGED
@@ -12,6 +12,7 @@ use WebPConvert\Options\BooleanOption;
|
|
12 |
use WebPConvert\Options\ArrayOption;
|
13 |
use WebPConvert\Options\GhostOption;
|
14 |
use WebPConvert\Options\SensitiveArrayOption;
|
|
|
15 |
|
16 |
//use WebPConvert\Convert\Exceptions\ConversionFailed\InvalidInput\TargetNotFoundException;
|
17 |
|
@@ -38,7 +39,6 @@ class Stack extends AbstractConverter
|
|
38 |
'preset',
|
39 |
'sharp-yuv',
|
40 |
'size-in-percentage',
|
41 |
-
'use-nice',
|
42 |
'skip',
|
43 |
'default-quality',
|
44 |
'quality',
|
@@ -48,13 +48,64 @@ class Stack extends AbstractConverter
|
|
48 |
|
49 |
public function getUniqueOptions($imageType)
|
50 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
return [
|
52 |
new SensitiveArrayOption('converters', self::getAvailableConverters()),
|
53 |
new SensitiveArrayOption('converter-options', []),
|
54 |
new BooleanOption('shuffle', false),
|
55 |
new ArrayOption('preferred-converters', []),
|
56 |
new SensitiveArrayOption('extra-converters', [])
|
57 |
-
]
|
58 |
}
|
59 |
|
60 |
/**
|
@@ -183,7 +234,7 @@ class Stack extends AbstractConverter
|
|
183 |
$beginTime = microtime(true);
|
184 |
|
185 |
$this->ln();
|
186 |
-
$this->logLn(
|
187 |
|
188 |
$converter = ConverterFactory::makeConverter(
|
189 |
$converterId,
|
12 |
use WebPConvert\Options\ArrayOption;
|
13 |
use WebPConvert\Options\GhostOption;
|
14 |
use WebPConvert\Options\SensitiveArrayOption;
|
15 |
+
use WebPConvert\Options\OptionFactory;
|
16 |
|
17 |
//use WebPConvert\Convert\Exceptions\ConversionFailed\InvalidInput\TargetNotFoundException;
|
18 |
|
39 |
'preset',
|
40 |
'sharp-yuv',
|
41 |
'size-in-percentage',
|
|
|
42 |
'skip',
|
43 |
'default-quality',
|
44 |
'quality',
|
48 |
|
49 |
public function getUniqueOptions($imageType)
|
50 |
{
|
51 |
+
return OptionFactory::createOptions([
|
52 |
+
['converters', 'array', [
|
53 |
+
'title' => 'Converters',
|
54 |
+
'description' => 'Converters to try, ordered by priority.',
|
55 |
+
'default' => self::getAvailableConverters(),
|
56 |
+
'sensitive' => true,
|
57 |
+
'ui' => [
|
58 |
+
'component' => 'multi-select',
|
59 |
+
'options' => self::getAvailableConverters(),
|
60 |
+
'advanced' => true
|
61 |
+
]
|
62 |
+
]],
|
63 |
+
['converter-options', 'array', [
|
64 |
+
'title' => 'Converter options',
|
65 |
+
'description' =>
|
66 |
+
'Extra options for specific converters.',
|
67 |
+
'default' => [],
|
68 |
+
'sensitive' => true,
|
69 |
+
'ui' => null
|
70 |
+
]],
|
71 |
+
['preferred-converters', 'array', [
|
72 |
+
'title' => 'Preferred converters',
|
73 |
+
'description' =>
|
74 |
+
'With this option you can move specified converters to the top of the stack. ' .
|
75 |
+
'The converters are specified by id.',
|
76 |
+
'default' => [],
|
77 |
+
'ui' => null
|
78 |
+
]],
|
79 |
+
['extra-converters', 'array', [
|
80 |
+
'title' => 'Extra converters',
|
81 |
+
'description' =>
|
82 |
+
'Add extra converters to the bottom of the stack',
|
83 |
+
'default' => [],
|
84 |
+
'sensitive' => true,
|
85 |
+
'ui' => null
|
86 |
+
]],
|
87 |
+
['shuffle', 'boolean', [
|
88 |
+
'title' => 'Shuffle',
|
89 |
+
'description' =>
|
90 |
+
'Shuffles the converter order on each conversion. ' .
|
91 |
+
'Can for example be used to spread out requests on multiple cloud converters',
|
92 |
+
'default' => false,
|
93 |
+
'ui' => [
|
94 |
+
'component' => 'checkbox',
|
95 |
+
'advanced' => true
|
96 |
+
]
|
97 |
+
]],
|
98 |
+
]);
|
99 |
+
|
100 |
+
|
101 |
+
/*
|
102 |
return [
|
103 |
new SensitiveArrayOption('converters', self::getAvailableConverters()),
|
104 |
new SensitiveArrayOption('converter-options', []),
|
105 |
new BooleanOption('shuffle', false),
|
106 |
new ArrayOption('preferred-converters', []),
|
107 |
new SensitiveArrayOption('extra-converters', [])
|
108 |
+
];*/
|
109 |
}
|
110 |
|
111 |
/**
|
234 |
$beginTime = microtime(true);
|
235 |
|
236 |
$this->ln();
|
237 |
+
$this->logLn($converterId . ' converter ignited', 'bold');
|
238 |
|
239 |
$converter = ConverterFactory::makeConverter(
|
240 |
$converterId,
|
vendor/rosell-dk/webp-convert/src/Convert/Converters/Vips.php
CHANGED
@@ -27,7 +27,6 @@ class Vips extends AbstractConverter
|
|
27 |
return [
|
28 |
'auto-filter',
|
29 |
'size-in-percentage',
|
30 |
-
'use-nice'
|
31 |
];
|
32 |
}
|
33 |
|
@@ -246,7 +245,8 @@ class Vips extends AbstractConverter
|
|
246 |
}
|
247 |
|
248 |
if ($nameOfPropertyNotFound != '') {
|
249 |
-
$msg = 'Your version of vipslib does not support the "' .
|
|
|
250 |
|
251 |
switch ($nameOfPropertyNotFound) {
|
252 |
case 'alpha_q':
|
@@ -268,7 +268,7 @@ class Vips extends AbstractConverter
|
|
268 |
$msg .= '. The option is ignored.';
|
269 |
|
270 |
|
271 |
-
$this->logLn($msg);
|
272 |
|
273 |
unset($options[$nameOfPropertyNotFound]);
|
274 |
$this->webpsave($im, $options);
|
27 |
return [
|
28 |
'auto-filter',
|
29 |
'size-in-percentage',
|
|
|
30 |
];
|
31 |
}
|
32 |
|
245 |
}
|
246 |
|
247 |
if ($nameOfPropertyNotFound != '') {
|
248 |
+
$msg = 'Note: Your version of vipslib does not support the "' .
|
249 |
+
$nameOfPropertyNotFound . '" property';
|
250 |
|
251 |
switch ($nameOfPropertyNotFound) {
|
252 |
case 'alpha_q':
|
268 |
$msg .= '. The option is ignored.';
|
269 |
|
270 |
|
271 |
+
$this->logLn($msg, 'bold');
|
272 |
|
273 |
unset($options[$nameOfPropertyNotFound]);
|
274 |
$this->webpsave($im, $options);
|
vendor/rosell-dk/webp-convert/src/Convert/Converters/Wpc.php
CHANGED
@@ -13,6 +13,7 @@ use WebPConvert\Convert\Exceptions\ConversionFailed\ConverterNotOperational\Inva
|
|
13 |
use WebPConvert\Options\BooleanOption;
|
14 |
use WebPConvert\Options\IntegerOption;
|
15 |
use WebPConvert\Options\SensitiveStringOption;
|
|
|
16 |
|
17 |
/**
|
18 |
* Convert images to webp using Wpc (a cloud converter based on WebP Convert).
|
@@ -34,14 +35,71 @@ class Wpc extends AbstractConverter
|
|
34 |
|
35 |
public function getUniqueOptions($imageType)
|
36 |
{
|
37 |
-
return [
|
38 |
-
|
39 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
new SensitiveStringOption('api-url', ''),
|
41 |
-
new SensitiveStringOption('url', ''),
|
42 |
new IntegerOption('api-version', 2, 0, 2),
|
43 |
-
new BooleanOption('crypt-api-key-in-transfer', false)
|
44 |
-
]
|
45 |
}
|
46 |
|
47 |
public function supportsLossless()
|
13 |
use WebPConvert\Options\BooleanOption;
|
14 |
use WebPConvert\Options\IntegerOption;
|
15 |
use WebPConvert\Options\SensitiveStringOption;
|
16 |
+
use WebPConvert\Options\OptionFactory;
|
17 |
|
18 |
/**
|
19 |
* Convert images to webp using Wpc (a cloud converter based on WebP Convert).
|
35 |
|
36 |
public function getUniqueOptions($imageType)
|
37 |
{
|
38 |
+
return OptionFactory::createOptions([
|
39 |
+
['api-key', 'string', [
|
40 |
+
'title' => 'API key',
|
41 |
+
'description' => '',
|
42 |
+
'default' => '',
|
43 |
+
'sensitive' => true,
|
44 |
+
'ui' => [
|
45 |
+
'component' => 'password',
|
46 |
+
'advanced' => false,
|
47 |
+
'display' => "option('wpc-api-version') != 0"
|
48 |
+
]
|
49 |
+
]],
|
50 |
+
['secret', 'string', [
|
51 |
+
'title' => 'Secret',
|
52 |
+
'description' => '',
|
53 |
+
'default' => '',
|
54 |
+
'sensitive' => true,
|
55 |
+
'ui' => [
|
56 |
+
'component' => 'password',
|
57 |
+
'advanced' => false,
|
58 |
+
'display' => "option('wpc-api-version') == 0"
|
59 |
+
]
|
60 |
+
]],
|
61 |
+
['api-url', 'string', [
|
62 |
+
'title' => 'API url',
|
63 |
+
'description' => 'URL to connect to',
|
64 |
+
'default' => '',
|
65 |
+
'sensitive' => true,
|
66 |
+
'ui' => [
|
67 |
+
'component' => 'password',
|
68 |
+
'advanced' => false,
|
69 |
+
]
|
70 |
+
]],
|
71 |
+
['api-version', 'int', [
|
72 |
+
'title' => 'API version',
|
73 |
+
'description' => '',
|
74 |
+
'default' => 2,
|
75 |
+
'minimum' => 0,
|
76 |
+
'maximum' => 2,
|
77 |
+
'ui' => [
|
78 |
+
'component' => 'select',
|
79 |
+
'advanced' => false,
|
80 |
+
'options' => ['0', '1', '2'],
|
81 |
+
]
|
82 |
+
]],
|
83 |
+
['crypt-api-key-in-transfer', 'boolean', [
|
84 |
+
'title' => 'Crypt API key in transfer',
|
85 |
+
'description' => '',
|
86 |
+
'default' => false,
|
87 |
+
'ui' => [
|
88 |
+
'component' => 'checkbox',
|
89 |
+
'advanced' => true,
|
90 |
+
'display' => "option('wpc-api-version') >= 1"
|
91 |
+
]
|
92 |
+
]],
|
93 |
+
]);
|
94 |
+
|
95 |
+
/*return [
|
96 |
+
new SensitiveStringOption('api-key', ''),
|
97 |
+
new SensitiveStringOption('secret', ''),
|
98 |
new SensitiveStringOption('api-url', ''),
|
99 |
+
new SensitiveStringOption('url', ''), // DO NOT USE. Only here to keep the protection
|
100 |
new IntegerOption('api-version', 2, 0, 2),
|
101 |
+
new BooleanOption('crypt-api-key-in-transfer', false) // new in api v.1
|
102 |
+
];*/
|
103 |
}
|
104 |
|
105 |
public function supportsLossless()
|
vendor/rosell-dk/webp-convert/src/Helpers/SanityCheck.txt
ADDED
@@ -0,0 +1,255 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WebPConvert\Helpers;
|
4 |
+
|
5 |
+
use WebPConvert\Helpers\Sanitize;
|
6 |
+
use WebPConvert\Exceptions\SanityException;
|
7 |
+
|
8 |
+
class SanityCheck
|
9 |
+
{
|
10 |
+
|
11 |
+
/**
|
12 |
+
*
|
13 |
+
* @param string $input string to test for NUL char
|
14 |
+
*/
|
15 |
+
public static function mustBeString($input, $errorMsg = 'String expected')
|
16 |
+
{
|
17 |
+
if (gettype($input) !== 'string') {
|
18 |
+
throw new SanityException($errorMsg);
|
19 |
+
}
|
20 |
+
return $input;
|
21 |
+
}
|
22 |
+
|
23 |
+
/**
|
24 |
+
* The NUL character is a demon, because it can be used to bypass other tests
|
25 |
+
* See https://st-g.de/2011/04/doing-filename-checks-securely-in-PHP.
|
26 |
+
*
|
27 |
+
* @param string $input string to test for NUL char
|
28 |
+
*/
|
29 |
+
public static function noNUL($input, $errorMsg = 'NUL character is not allowed')
|
30 |
+
{
|
31 |
+
self::mustBeString($input);
|
32 |
+
if (strpos($input, chr(0)) !== false) {
|
33 |
+
throw new SanityException($errorMsg);
|
34 |
+
}
|
35 |
+
return $input;
|
36 |
+
}
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Prevent control chararters (#00 - #20).
|
40 |
+
*
|
41 |
+
* This prevents line feed, new line, tab, charater return, tab, ets.
|
42 |
+
* https://www.rapidtables.com/code/text/ascii-table.html
|
43 |
+
*
|
44 |
+
* @param string $input string to test for control characters
|
45 |
+
*/
|
46 |
+
public static function noControlChars($input)
|
47 |
+
{
|
48 |
+
self::mustBeString($input);
|
49 |
+
self::noNUL($input);
|
50 |
+
if (preg_match('#[\x{0}-\x{1f}]#', $input)) {
|
51 |
+
throw new SanityException('Control characters are not allowed');
|
52 |
+
}
|
53 |
+
return $input;
|
54 |
+
}
|
55 |
+
|
56 |
+
|
57 |
+
/**
|
58 |
+
*
|
59 |
+
* @param mixed $input something that may not be empty
|
60 |
+
*/
|
61 |
+
public static function notEmpty($input, $errorMsg = 'Must be non-empty')
|
62 |
+
{
|
63 |
+
if (empty($input)) {
|
64 |
+
throw new SanityException($input);
|
65 |
+
}
|
66 |
+
return $input;
|
67 |
+
}
|
68 |
+
|
69 |
+
|
70 |
+
|
71 |
+
public static function noDirectoryTraversal($input, $errorMsg = 'Directory traversal is not allowed')
|
72 |
+
{
|
73 |
+
self::mustBeString($input);
|
74 |
+
self::noControlChars($input);
|
75 |
+
if (preg_match('#\.\.\/#', $input)) {
|
76 |
+
throw new SanityException($errorMsg);
|
77 |
+
}
|
78 |
+
return $input;
|
79 |
+
}
|
80 |
+
|
81 |
+
public static function noStreamWrappers($input, $errorMsg = 'Stream wrappers are not allowed')
|
82 |
+
{
|
83 |
+
self::mustBeString($input);
|
84 |
+
self::noControlChars($input);
|
85 |
+
|
86 |
+
// Prevent stream wrappers ("phar://", "php://" and the like)
|
87 |
+
// https://www.php.net/manual/en/wrappers.phar.php
|
88 |
+
if (preg_match('#^\\w+://#', Sanitize::removeNUL($input))) {
|
89 |
+
throw new SanityException($errorMsg);
|
90 |
+
}
|
91 |
+
return $input;
|
92 |
+
}
|
93 |
+
|
94 |
+
public static function path($input)
|
95 |
+
{
|
96 |
+
self::notEmpty($input);
|
97 |
+
self::mustBeString($input);
|
98 |
+
self::noControlChars($input);
|
99 |
+
self::noDirectoryTraversal($input);
|
100 |
+
self::noStreamWrappers($input);
|
101 |
+
return $input;
|
102 |
+
}
|
103 |
+
|
104 |
+
public static function pathWithoutDirectoryTraversal($input)
|
105 |
+
{
|
106 |
+
return self::path($input);
|
107 |
+
}
|
108 |
+
|
109 |
+
public static function absPathMicrosoftStyle($input, $errorMsg = 'Not an fully qualified Windows path')
|
110 |
+
{
|
111 |
+
// On microsoft we allow [drive letter]:\
|
112 |
+
if (!preg_match("#^[A-Z]:\\\\|/#", $input)) {
|
113 |
+
throw new SanityException($errorMsg . ':' . $input);
|
114 |
+
}
|
115 |
+
return $input;
|
116 |
+
}
|
117 |
+
|
118 |
+
public static function absPath($input, $errorMsg = 'Not an absolute path')
|
119 |
+
{
|
120 |
+
if ((strpos($input, '/') !== 0)) {
|
121 |
+
|
122 |
+
// Check if we are on Microsoft
|
123 |
+
$onMicrosoft = false;
|
124 |
+
if (isset($_SERVER['SERVER_SOFTWARE'])) {
|
125 |
+
if (strpos(strtolower($_SERVER['SERVER_SOFTWARE']), 'microsoft') !== false) {
|
126 |
+
$onMicrosoft = true;
|
127 |
+
}
|
128 |
+
}
|
129 |
+
switch (PHP_OS) {
|
130 |
+
case "WINNT":
|
131 |
+
case "WIN32":
|
132 |
+
case "INTERIX":
|
133 |
+
case "UWIN":
|
134 |
+
case "UWIN-W7":
|
135 |
+
$onMicrosoft = true;
|
136 |
+
break;
|
137 |
+
}
|
138 |
+
|
139 |
+
if (!$onMicrosoft) {
|
140 |
+
throw new SanityException($errorMsg . ':' . $input);
|
141 |
+
}
|
142 |
+
self::absPathMicrosoftStyle($input);
|
143 |
+
|
144 |
+
}
|
145 |
+
return self::path($input);
|
146 |
+
}
|
147 |
+
|
148 |
+
public static function pathBeginsWith($input, $beginsWith, $errorMsg = 'Path is outside allowed path')
|
149 |
+
{
|
150 |
+
self::path($input);
|
151 |
+
if (!(strpos($input, $beginsWith) === 0)) {
|
152 |
+
throw new SanityException($errorMsg);
|
153 |
+
}
|
154 |
+
return $input;
|
155 |
+
}
|
156 |
+
|
157 |
+
public static function findClosestExistingFolderSymLinksExpanded($input) {
|
158 |
+
$levelsUp = 1;
|
159 |
+
//echo 'input:' . $input;
|
160 |
+
while (true) {
|
161 |
+
$dir = dirname($input, $levelsUp);
|
162 |
+
//echo 'dir:' . $dir . '<br>';
|
163 |
+
$realPathResult = realpath($dir);
|
164 |
+
if ($realPathResult !== false) {
|
165 |
+
return $realPathResult;
|
166 |
+
}
|
167 |
+
if (($dir == '/') || (strlen($dir) < 4)) {
|
168 |
+
return $dir;
|
169 |
+
}
|
170 |
+
$levelsUp++;
|
171 |
+
}
|
172 |
+
return '/';
|
173 |
+
}
|
174 |
+
|
175 |
+
public static function pathBeginsWithSymLinksExpanded($input, $beginsWith, $errorMsg = 'Path is outside allowed path') {
|
176 |
+
$closestExistingFolder = self::findClosestExistingFolderSymLinksExpanded($input);
|
177 |
+
//throw new SanityException('hm.' . $input . ' : <br>' . $closestExistingFolder);
|
178 |
+
self::pathBeginsWith($closestExistingFolder, $beginsWith, $errorMsg);
|
179 |
+
}
|
180 |
+
|
181 |
+
|
182 |
+
|
183 |
+
public static function absPathExists($input, $errorMsg = 'Path does not exist')
|
184 |
+
{
|
185 |
+
self::absPath($input);
|
186 |
+
if (@!file_exists($input)) {
|
187 |
+
throw new SanityException($errorMsg);
|
188 |
+
}
|
189 |
+
return $input;
|
190 |
+
}
|
191 |
+
|
192 |
+
public static function absPathExistsAndIsDir(
|
193 |
+
$input,
|
194 |
+
$errorMsg = 'Path points to a file (it should point to a directory)'
|
195 |
+
) {
|
196 |
+
self::absPathExists($input);
|
197 |
+
if (!is_dir($input)) {
|
198 |
+
throw new SanityException($errorMsg);
|
199 |
+
}
|
200 |
+
return $input;
|
201 |
+
}
|
202 |
+
|
203 |
+
public static function absPathExistsAndIsFile(
|
204 |
+
$input,
|
205 |
+
$errorMsg = 'Path points to a directory (it should not do that)'
|
206 |
+
) {
|
207 |
+
self::absPathExists($input, 'File does not exist');
|
208 |
+
if (@is_dir($input)) {
|
209 |
+
throw new SanityException($errorMsg);
|
210 |
+
}
|
211 |
+
return $input;
|
212 |
+
}
|
213 |
+
|
214 |
+
public static function absPathExistsAndIsNotDir(
|
215 |
+
$input,
|
216 |
+
$errorMsg = 'Path points to a directory (it should point to a file)'
|
217 |
+
) {
|
218 |
+
self::absPathExistsAndIsFile($input, $errorMsg);
|
219 |
+
return $input;
|
220 |
+
}
|
221 |
+
|
222 |
+
|
223 |
+
public static function pregMatch($pattern, $input, $errorMsg = 'Does not match expected pattern')
|
224 |
+
{
|
225 |
+
self::noNUL($input);
|
226 |
+
self::mustBeString($input);
|
227 |
+
if (!preg_match($pattern, $input)) {
|
228 |
+
throw new SanityException($errorMsg);
|
229 |
+
}
|
230 |
+
return $input;
|
231 |
+
}
|
232 |
+
|
233 |
+
public static function isJSONArray($input, $errorMsg = 'Not a JSON array')
|
234 |
+
{
|
235 |
+
self::noNUL($input);
|
236 |
+
self::mustBeString($input);
|
237 |
+
self::notEmpty($input);
|
238 |
+
if ((strpos($input, '[') !== 0) || (!is_array(json_decode($input)))) {
|
239 |
+
throw new SanityException($errorMsg);
|
240 |
+
}
|
241 |
+
return $input;
|
242 |
+
}
|
243 |
+
|
244 |
+
public static function isJSONObject($input, $errorMsg = 'Not a JSON object')
|
245 |
+
{
|
246 |
+
self::noNUL($input);
|
247 |
+
self::mustBeString($input);
|
248 |
+
self::notEmpty($input);
|
249 |
+
if ((strpos($input, '{') !== 0) || (!is_object(json_decode($input)))) {
|
250 |
+
throw new SanityException($errorMsg);
|
251 |
+
}
|
252 |
+
return $input;
|
253 |
+
}
|
254 |
+
|
255 |
+
}
|
vendor/rosell-dk/webp-convert/src/Options/Option.php
CHANGED
@@ -76,6 +76,16 @@ class Option
|
|
76 |
return $this->id;
|
77 |
}
|
78 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
/**
|
80 |
* Get default value.
|
81 |
*
|
76 |
return $this->id;
|
77 |
}
|
78 |
|
79 |
+
/**
|
80 |
+
* Get Id.
|
81 |
+
*
|
82 |
+
* @param string $id The id of the option
|
83 |
+
*/
|
84 |
+
public function setId($id)
|
85 |
+
{
|
86 |
+
$this->id = $id;
|
87 |
+
}
|
88 |
+
|
89 |
/**
|
90 |
* Get default value.
|
91 |
*
|
vendor/rosell-dk/webp-convert/src/Options/OptionFactory.php
CHANGED
@@ -60,7 +60,11 @@ class OptionFactory
|
|
60 |
break;
|
61 |
|
62 |
case 'array':
|
63 |
-
$
|
|
|
|
|
|
|
|
|
64 |
break;
|
65 |
}
|
66 |
unset($def['default']);
|
60 |
break;
|
61 |
|
62 |
case 'array':
|
63 |
+
if (isset($def['sensitive']) && ($def['sensitive'] == true)) {
|
64 |
+
$option = new SensitiveArrayOption($optionName, $def['default']);
|
65 |
+
} else {
|
66 |
+
$option = new ArrayOption($optionName, $def['default']);
|
67 |
+
}
|
68 |
break;
|
69 |
}
|
70 |
unset($def['default']);
|
vendor/rosell-dk/webp-convert/src/WebPConvert.php
CHANGED
@@ -41,7 +41,14 @@ class WebPConvert
|
|
41 |
*/
|
42 |
public static function convert($source, $destination, $options = [], $logger = null)
|
43 |
{
|
44 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
}
|
46 |
|
47 |
/**
|
@@ -90,53 +97,39 @@ class WebPConvert
|
|
90 |
}
|
91 |
|
92 |
/**
|
93 |
-
*
|
94 |
*
|
95 |
-
*
|
96 |
*
|
97 |
-
*
|
98 |
-
* @param bool $returnGeneral Whether the general setting definitions should be returned
|
99 |
-
* @param bool $returnGeneralSupport Whether the ids of supported/unsupported general options
|
100 |
-
* should be returned
|
101 |
*
|
102 |
-
*
|
|
|
103 |
*/
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
public static function getConverterOptionDefinitions(
|
109 |
-
$imageType = 'png',
|
110 |
-
$returnGeneral = true,
|
111 |
-
$returnGeneralSupport = true
|
112 |
-
) {
|
113 |
-
|
114 |
-
// TODO: Return converter too - even though it is no a "real" option
|
115 |
-
|
116 |
$converterIds = self::getConverterIds();
|
117 |
$result = [];
|
118 |
|
119 |
$ewww = ConverterFactory::makeConverter('ewww', '', '');
|
|
|
120 |
|
121 |
-
//$result['general'] = $ewww->getGeneralOptionDefinitions();
|
122 |
-
$result['general'] = $ewww->getGeneralOptionDefinitions();
|
123 |
$generalOptionHash = [];
|
124 |
$generalOptionIds = [];
|
125 |
foreach ($result['general'] as &$option) {
|
126 |
$generalOptionIds[] = $option['id'];
|
127 |
-
//$option['supportedBy'] = $converterIds; // we will remove the unsupported below
|
128 |
$option['unsupportedBy'] = [];
|
129 |
$generalOptionHash[$option['id']] = &$option;
|
130 |
}
|
131 |
//$result['general'] = $generalOptionIds;
|
132 |
array_unshift($result['general'], OptionFactory::createOption('converter', 'string', [
|
133 |
'title' => 'Converter',
|
134 |
-
'description' => 'Conversion method'
|
135 |
-
|
136 |
'the *magick are nearly as good, but only recent versions supports near-lossless. ' .
|
137 |
'gd is poor, as it does not support any webp options. ' .
|
138 |
'For full discussion, check the guide',
|
139 |
-
'default' => '
|
140 |
'enum' => $converterIds,
|
141 |
'ui' => [
|
142 |
'component' => 'select',
|
@@ -149,28 +142,18 @@ class WebPConvert
|
|
149 |
]
|
150 |
])->getDefinition());
|
151 |
|
152 |
-
|
153 |
-
//getUIForGeneralOptions
|
154 |
-
//$generalOption->addOptions(... $this->getGeneralOptions($imageType));
|
155 |
-
|
156 |
$supportedBy = [];
|
|
|
157 |
|
158 |
foreach ($converterIds as $converterId) {
|
159 |
$c = ConverterFactory::makeConverter($converterId, '', '');
|
160 |
-
|
161 |
-
//$supports = $generalOptionIds;
|
162 |
foreach ($c->getUnsupportedGeneralOptions() as $optionId) {
|
163 |
-
//$result['general']
|
164 |
-
//if ()$support[]
|
165 |
-
//unsupportedBy
|
166 |
$generalOptionHash[$optionId]['unsupportedBy'][] = $converterId;
|
167 |
}
|
168 |
-
|
169 |
-
|
170 |
-
//$optionDefinitions = $c->getOptionDefinitions($imageType, $returnGeneral, $returnGeneralSupport);
|
171 |
-
$optionDefinitions = $c->getUniqueOptionDefinitions($imageType);
|
172 |
-
$result[$converterId] = $optionDefinitions;
|
173 |
}
|
|
|
174 |
return $result;
|
175 |
-
}
|
176 |
}
|
41 |
*/
|
42 |
public static function convert($source, $destination, $options = [], $logger = null)
|
43 |
{
|
44 |
+
if (isset($options['converter'])) {
|
45 |
+
$converter = $options['converter'];
|
46 |
+
unset($options['converter']);
|
47 |
+
$c = ConverterFactory::makeConverter($converter, $source, $destination, $options, $logger);
|
48 |
+
$c->doConvert();
|
49 |
+
} else {
|
50 |
+
Stack::convert($source, $destination, $options, $logger);
|
51 |
+
}
|
52 |
}
|
53 |
|
54 |
/**
|
97 |
}
|
98 |
|
99 |
/**
|
100 |
+
* Get option definitions for all converters
|
101 |
*
|
102 |
+
* Added in order to give GUI's a way to automatically adjust their setting screens.
|
103 |
*
|
104 |
+
* @param bool $filterOutOptionsWithoutUI If options without UI defined should be filtered out
|
|
|
|
|
|
|
105 |
*
|
106 |
+
* @return array Array of options definitions - ready to be json encoded, or whatever
|
107 |
+
* @since 2.8.0
|
108 |
*/
|
109 |
+
public static function getConverterOptionDefinitions($filterOutOptionsWithoutUI = true)
|
110 |
+
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
$converterIds = self::getConverterIds();
|
112 |
$result = [];
|
113 |
|
114 |
$ewww = ConverterFactory::makeConverter('ewww', '', '');
|
115 |
+
$result['general'] = $ewww->getGeneralOptionDefinitions($filterOutOptionsWithoutUI);
|
116 |
|
|
|
|
|
117 |
$generalOptionHash = [];
|
118 |
$generalOptionIds = [];
|
119 |
foreach ($result['general'] as &$option) {
|
120 |
$generalOptionIds[] = $option['id'];
|
|
|
121 |
$option['unsupportedBy'] = [];
|
122 |
$generalOptionHash[$option['id']] = &$option;
|
123 |
}
|
124 |
//$result['general'] = $generalOptionIds;
|
125 |
array_unshift($result['general'], OptionFactory::createOption('converter', 'string', [
|
126 |
'title' => 'Converter',
|
127 |
+
'description' => 'Conversion method. ' .
|
128 |
+
"Cwebp and vips are best. " .
|
129 |
'the *magick are nearly as good, but only recent versions supports near-lossless. ' .
|
130 |
'gd is poor, as it does not support any webp options. ' .
|
131 |
'For full discussion, check the guide',
|
132 |
+
'default' => 'stack',
|
133 |
'enum' => $converterIds,
|
134 |
'ui' => [
|
135 |
'component' => 'select',
|
142 |
]
|
143 |
])->getDefinition());
|
144 |
|
|
|
|
|
|
|
|
|
145 |
$supportedBy = [];
|
146 |
+
$uniqueOptions = [];
|
147 |
|
148 |
foreach ($converterIds as $converterId) {
|
149 |
$c = ConverterFactory::makeConverter($converterId, '', '');
|
|
|
|
|
150 |
foreach ($c->getUnsupportedGeneralOptions() as $optionId) {
|
|
|
|
|
|
|
151 |
$generalOptionHash[$optionId]['unsupportedBy'][] = $converterId;
|
152 |
}
|
153 |
+
$optionDefinitions = $c->getUniqueOptionDefinitions($filterOutOptionsWithoutUI);
|
154 |
+
$uniqueOptions[$converterId] = $optionDefinitions;
|
|
|
|
|
|
|
155 |
}
|
156 |
+
$result['unique'] = $uniqueOptions;
|
157 |
return $result;
|
158 |
+
}
|
159 |
}
|
webp-express.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: WebP Express
|
4 |
* Plugin URI: https://github.com/rosell-dk/webp-express
|
5 |
* Description: Serve autogenerated WebP images instead of jpeg/png to browsers that supports WebP. Works on anything (media library images, galleries, theme images etc).
|
6 |
-
* Version: 0.
|
7 |
* Author: Bjørn Rosell
|
8 |
* Author URI: https://www.bitwise-it.dk
|
9 |
* License: GPL2
|
3 |
* Plugin Name: WebP Express
|
4 |
* Plugin URI: https://github.com/rosell-dk/webp-express
|
5 |
* Description: Serve autogenerated WebP images instead of jpeg/png to browsers that supports WebP. Works on anything (media library images, galleries, theme images etc).
|
6 |
+
* Version: 0.24.1
|
7 |
* Author: Bjørn Rosell
|
8 |
* Author URI: https://www.bitwise-it.dk
|
9 |
* License: GPL2
|