diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 07edf1c..52fa484 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,7 +15,6 @@ jobs: env: tools: composer ini-values: default_charset='UTF-8' - key: cache-1633608016315 name: Release on PHP ${{ matrix.php-versions }} ${{ matrix.operating-system }} steps: - name: Checkout @@ -58,20 +57,12 @@ jobs: mkdir importing/{parse-users,parse-albums,no-parse} mv .package .. ls -la ../.package - - name: Archive lite - uses: thedoctor0/zip-release@master - with: - directory: "." - type: "zip" - filename: "${{ github.ref_name}}-lite.zip" - exclusions: "/*app/vendor/*" - name: Archive release uses: thedoctor0/zip-release@master with: directory: "." type: "zip" filename: "${{ github.ref_name}}.zip" - exclusions: "${{ github.ref_name}}-lite.zip" - name: Upload artifacts uses: ncipollo/release-action@v1 with: @@ -80,6 +71,5 @@ jobs: bodyFile: "../.package/${{ github.ref_name}}.txt" artifacts: > ../.package/${{ github.ref_name}}.txt, - ${{ github.ref_name}}.zip, - ${{ github.ref_name}}-lite.zip + ${{ github.ref_name}}.zip token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.package/4.0.12.txt b/.package/4.0.12.txt deleted file mode 100644 index 1108a05..0000000 --- a/.package/4.0.12.txt +++ /dev/null @@ -1,14 +0,0 @@ -Chevereto 4.0.12 (2024-03-12) - -- ✅ Added cipher (encryption) to album password -- ✅ Added hidden (click to show) album password -- 🐞 Fixed bug in `entrypoints/index.php` -- 🐞 Fixed bug in API route -- 🐞 Fixed bug in Dashboard route -- 🐞 Fixed bug in Settings route -- 🐞 Fixed bug in Signup route -- 🐞 Fixed bug in G\Handler -- 🐞 Fixed bug in `app/upgrading.php` -- 🐞 Fixed bug in empty search string -- 💅 Improved license key handling (mobile) at Dashboard -- 🆙 Updated dependencies diff --git a/.package/4.1.0.txt b/.package/4.1.0.txt new file mode 100644 index 0000000..9e4bf0a --- /dev/null +++ b/.package/4.1.0.txt @@ -0,0 +1,30 @@ +Chevereto 4.1.0 (2024-04-20) + +- 🎥 Added support for video files +- 🎥 Added frame image size for video uploads +- 🎥 Added oEmbed support for video +- 🎥 Added video support for anywhere uploader +- 🎥 Added video support for embed codes +- 🎥 Added Video to Discovery (Explore) +- ✅ Added display_title media property +- ✅ Added enabled file type options for External Storage +- ✅ Improved support for PUP.js for SMF 2.1+ +- ✅ Unified embed codes display +- 💅 Added display_title to full screen listing viewer +- 💅 Added edition name at installation details +- 💅 Added one-click theme font configuration +- 💅 Added over effect to display_title on listings +- 💅 Added video duration on listing items +- 💅 Changed "image" references to "file" +- 💅 Changed Trending icon +- 💅 Improved listing icons for like and share +- 💅 Improved password display helper when using Safari +- 💅 Improved uploader size limit display +- 💅 Stop preventing list-item-desc link behavior +- ⏲️ Added button to manually run CRON +- 💬 Added link to Chevereto discord at Dashboard +- 🤚 Added welcome message on new installation +- 🐞 Fixed bug in homepage delete cover action +- 🐞 Fixed bug on upload route +- 🐞 Fixed bug with password protected albums +- 🐞 Fixed unwanted scroll hide top-bar in Safari diff --git a/.package/README.txt b/.package/README.txt index cf50934..65b7aa0 100755 --- a/.package/README.txt +++ b/.package/README.txt @@ -15,6 +15,8 @@ trusting our work. This software exists thanks to your ongoing support. ~ + Rodolfo Berrios A. + https://rodolfoberrios.com/ - GRACIAS + GRACIAS! (Thank you!) diff --git a/README.md b/README.md index 66d774d..147a265 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,8 @@ Chevereto is so **feature-rich**, mature and robust that we need three layers of - [User manual](https://v4-user.chevereto.com/) - [Admin manual](https://v4-admin.chevereto.com/) +## Compare features + **Note:** This is the repository for Chevereto free edition. This software is intended for **personal usage** as it doesn't contain [all the features](https://chevereto.com/features) of commercial editions. This is a short, not exhaustive, list of features available on Chevereto editions. Feel free to request a free demo of the pro edition at [chevereto.com](https://chevereto.com) to see all the features in action. | Feature | Free | Pro | diff --git a/app/composer.json b/app/composer.json index 4444acb..ccccaaf 100644 --- a/app/composer.json +++ b/app/composer.json @@ -44,7 +44,8 @@ "chillerlan/php-qrcode": "^4.3", "firebase/php-jwt": "^6.3", "lychee-org/php-exif": "^0.7.14", - "php-ds/php-ds": "^1.4" + "php-ds/php-ds": "^1.4", + "php-ffmpeg/php-ffmpeg": "^1.2" }, "autoload": { "files": [ diff --git a/app/composer.lock b/app/composer.lock index 235c81c..15ad497 100644 --- a/app/composer.lock +++ b/app/composer.lock @@ -4,20 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "64b1e901d23988eeee99248e4f08a229", + "content-hash": "0bbc3dd1b9244ce1f02d783e5b5ff001", "packages": [ { "name": "amphp/amp", - "version": "v2.6.2", + "version": "v2.6.4", "source": { "type": "git", "url": "https://github.com/amphp/amp.git", - "reference": "9d5100cebffa729aaffecd3ad25dc5aeea4f13bb" + "reference": "ded3d9be08f526089eb7ee8d9f16a9768f9dec2d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/amp/zipball/9d5100cebffa729aaffecd3ad25dc5aeea4f13bb", - "reference": "9d5100cebffa729aaffecd3ad25dc5aeea4f13bb", + "url": "https://api.github.com/repos/amphp/amp/zipball/ded3d9be08f526089eb7ee8d9f16a9768f9dec2d", + "reference": "ded3d9be08f526089eb7ee8d9f16a9768f9dec2d", "shasum": "" }, "require": { @@ -29,8 +29,8 @@ "ext-json": "*", "jetbrains/phpstorm-stubs": "^2019.3", "phpunit/phpunit": "^7 | ^8 | ^9", - "psalm/phar": "^3.11@dev", - "react/promise": "^2" + "react/promise": "^2", + "vimeo/psalm": "^3.12" }, "type": "library", "extra": { @@ -85,7 +85,7 @@ "support": { "irc": "irc://irc.freenode.org/amphp", "issues": "https://github.com/amphp/amp/issues", - "source": "https://github.com/amphp/amp/tree/v2.6.2" + "source": "https://github.com/amphp/amp/tree/v2.6.4" }, "funding": [ { @@ -93,20 +93,20 @@ "type": "github" } ], - "time": "2022-02-20T17:52:18+00:00" + "time": "2024-03-21T18:52:26+00:00" }, { "name": "amphp/byte-stream", - "version": "v1.8.1", + "version": "v1.8.2", "source": { "type": "git", "url": "https://github.com/amphp/byte-stream.git", - "reference": "acbd8002b3536485c997c4e019206b3f10ca15bd" + "reference": "4f0e968ba3798a423730f567b1b50d3441c16ddc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/byte-stream/zipball/acbd8002b3536485c997c4e019206b3f10ca15bd", - "reference": "acbd8002b3536485c997c4e019206b3f10ca15bd", + "url": "https://api.github.com/repos/amphp/byte-stream/zipball/4f0e968ba3798a423730f567b1b50d3441c16ddc", + "reference": "4f0e968ba3798a423730f567b1b50d3441c16ddc", "shasum": "" }, "require": { @@ -122,11 +122,6 @@ "psalm/phar": "^3.11.4" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, "autoload": { "files": [ "lib/functions.php" @@ -150,7 +145,7 @@ } ], "description": "A stream abstraction to make working with non-blocking I/O simple.", - "homepage": "http://amphp.org/byte-stream", + "homepage": "https://amphp.org/byte-stream", "keywords": [ "amp", "amphp", @@ -160,9 +155,8 @@ "stream" ], "support": { - "irc": "irc://irc.freenode.org/amphp", "issues": "https://github.com/amphp/byte-stream/issues", - "source": "https://github.com/amphp/byte-stream/tree/v1.8.1" + "source": "https://github.com/amphp/byte-stream/tree/v1.8.2" }, "funding": [ { @@ -170,7 +164,7 @@ "type": "github" } ], - "time": "2021-03-30T17:13:30+00:00" + "time": "2024-04-13T18:00:56+00:00" }, { "name": "amphp/parallel", @@ -248,16 +242,16 @@ }, { "name": "amphp/parser", - "version": "v1.1.0", + "version": "v1.1.1", "source": { "type": "git", "url": "https://github.com/amphp/parser.git", - "reference": "ff1de4144726c5dad5fab97f66692ebe8de3e151" + "reference": "3cf1f8b32a0171d4b1bed93d25617637a77cded7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/parser/zipball/ff1de4144726c5dad5fab97f66692ebe8de3e151", - "reference": "ff1de4144726c5dad5fab97f66692ebe8de3e151", + "url": "https://api.github.com/repos/amphp/parser/zipball/3cf1f8b32a0171d4b1bed93d25617637a77cded7", + "reference": "3cf1f8b32a0171d4b1bed93d25617637a77cded7", "shasum": "" }, "require": { @@ -298,7 +292,7 @@ ], "support": { "issues": "https://github.com/amphp/parser/issues", - "source": "https://github.com/amphp/parser/tree/v1.1.0" + "source": "https://github.com/amphp/parser/tree/v1.1.1" }, "funding": [ { @@ -306,26 +300,26 @@ "type": "github" } ], - "time": "2022-12-30T18:08:47+00:00" + "time": "2024-03-21T19:16:53+00:00" }, { "name": "amphp/process", - "version": "v1.1.5", + "version": "v1.1.7", "source": { "type": "git", "url": "https://github.com/amphp/process.git", - "reference": "04b4517bbfe436ab822b853d511165dafbfe115a" + "reference": "1949d85b6d71af2818ff68144304a98495628f19" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/process/zipball/04b4517bbfe436ab822b853d511165dafbfe115a", - "reference": "04b4517bbfe436ab822b853d511165dafbfe115a", + "url": "https://api.github.com/repos/amphp/process/zipball/1949d85b6d71af2818ff68144304a98495628f19", + "reference": "1949d85b6d71af2818ff68144304a98495628f19", "shasum": "" }, "require": { "amphp/amp": "^2", "amphp/byte-stream": "^1.4", - "php": ">=7" + "php": ">=7.1" }, "require-dev": { "amphp/php-cs-fixer-config": "dev-master", @@ -363,7 +357,7 @@ "homepage": "https://github.com/amphp/process", "support": { "issues": "https://github.com/amphp/process/issues", - "source": "https://github.com/amphp/process/tree/v1.1.5" + "source": "https://github.com/amphp/process/tree/v1.1.7" }, "funding": [ { @@ -371,7 +365,7 @@ "type": "github" } ], - "time": "2024-02-24T21:06:11+00:00" + "time": "2024-04-19T03:00:28+00:00" }, { "name": "amphp/serialization", @@ -1155,28 +1149,28 @@ }, { "name": "composer/ca-bundle", - "version": "1.4.1", + "version": "1.5.0", "source": { "type": "git", "url": "https://github.com/composer/ca-bundle.git", - "reference": "3ce240142f6d59b808dd65c1f52f7a1c252e6cfd" + "reference": "0c5ccfcfea312b5c5a190a21ac5cef93f74baf99" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/ca-bundle/zipball/3ce240142f6d59b808dd65c1f52f7a1c252e6cfd", - "reference": "3ce240142f6d59b808dd65c1f52f7a1c252e6cfd", + "url": "https://api.github.com/repos/composer/ca-bundle/zipball/0c5ccfcfea312b5c5a190a21ac5cef93f74baf99", + "reference": "0c5ccfcfea312b5c5a190a21ac5cef93f74baf99", "shasum": "" }, "require": { "ext-openssl": "*", "ext-pcre": "*", - "php": "^5.3.2 || ^7.0 || ^8.0" + "php": "^7.2 || ^8.0" }, "require-dev": { - "phpstan/phpstan": "^0.12.55", + "phpstan/phpstan": "^1.10", "psr/log": "^1.0", "symfony/phpunit-bridge": "^4.2 || ^5", - "symfony/process": "^2.5 || ^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0" + "symfony/process": "^4.0 || ^5.0 || ^6.0 || ^7.0" }, "type": "library", "extra": { @@ -1211,7 +1205,7 @@ "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/ca-bundle/issues", - "source": "https://github.com/composer/ca-bundle/tree/1.4.1" + "source": "https://github.com/composer/ca-bundle/tree/1.5.0" }, "funding": [ { @@ -1227,7 +1221,7 @@ "type": "tidelift" } ], - "time": "2024-02-23T10:16:52+00:00" + "time": "2024-03-15T14:00:32+00:00" }, { "name": "evenement/evenement", @@ -3595,16 +3589,16 @@ }, { "name": "react/http", - "version": "v1.9.0", + "version": "v1.10.0", "source": { "type": "git", "url": "https://github.com/reactphp/http.git", - "reference": "bb3154dbaf2dfe3f0467f956a05f614a69d5f1d0" + "reference": "8111281ee57f22b7194f5dba225e609ba7ce4d20" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/http/zipball/bb3154dbaf2dfe3f0467f956a05f614a69d5f1d0", - "reference": "bb3154dbaf2dfe3f0467f956a05f614a69d5f1d0", + "url": "https://api.github.com/repos/reactphp/http/zipball/8111281ee57f22b7194f5dba225e609ba7ce4d20", + "reference": "8111281ee57f22b7194f5dba225e609ba7ce4d20", "shasum": "" }, "require": { @@ -3615,14 +3609,13 @@ "react/event-loop": "^1.2", "react/promise": "^3 || ^2.3 || ^1.2.1", "react/socket": "^1.12", - "react/stream": "^1.2", - "ringcentral/psr7": "^1.2" + "react/stream": "^1.2" }, "require-dev": { "clue/http-proxy-react": "^1.8", "clue/reactphp-ssh-proxy": "^1.4", "clue/socks-react": "^1.4", - "phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.35", + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36", "react/async": "^4 || ^3 || ^2", "react/promise-stream": "^1.4", "react/promise-timer": "^1.9" @@ -3675,7 +3668,7 @@ ], "support": { "issues": "https://github.com/reactphp/http/issues", - "source": "https://github.com/reactphp/http/tree/v1.9.0" + "source": "https://github.com/reactphp/http/tree/v1.10.0" }, "funding": [ { @@ -3683,7 +3676,7 @@ "type": "open_collective" } ], - "time": "2023-04-26T10:29:24+00:00" + "time": "2024-03-27T17:20:46+00:00" }, { "name": "react/promise", @@ -3916,67 +3909,6 @@ ], "time": "2023-06-16T10:52:11+00:00" }, - { - "name": "ringcentral/psr7", - "version": "1.3.0", - "source": { - "type": "git", - "url": "https://github.com/ringcentral/psr7.git", - "reference": "360faaec4b563958b673fb52bbe94e37f14bc686" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ringcentral/psr7/zipball/360faaec4b563958b673fb52bbe94e37f14bc686", - "reference": "360faaec4b563958b673fb52bbe94e37f14bc686", - "shasum": "" - }, - "require": { - "php": ">=5.3", - "psr/http-message": "~1.0" - }, - "provide": { - "psr/http-message-implementation": "1.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "files": [ - "src/functions_include.php" - ], - "psr-4": { - "RingCentral\\Psr7\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "PSR-7 message implementation", - "keywords": [ - "http", - "message", - "stream", - "uri" - ], - "support": { - "source": "https://github.com/ringcentral/psr7/tree/master" - }, - "time": "2018-05-29T20:21:04+00:00" - }, { "name": "rodber/php-sse-react", "version": "0.1.0", @@ -4151,16 +4083,16 @@ }, { "name": "symfony/cache", - "version": "v5.4.36", + "version": "v5.4.38", "source": { "type": "git", "url": "https://github.com/symfony/cache.git", - "reference": "a30f316214d908cf5874f700f3f3fb29ceee91ba" + "reference": "223c3afac82e003a76931b71d77db408636a0de8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/cache/zipball/a30f316214d908cf5874f700f3f3fb29ceee91ba", - "reference": "a30f316214d908cf5874f700f3f3fb29ceee91ba", + "url": "https://api.github.com/repos/symfony/cache/zipball/223c3afac82e003a76931b71d77db408636a0de8", + "reference": "223c3afac82e003a76931b71d77db408636a0de8", "shasum": "" }, "require": { @@ -4228,7 +4160,7 @@ "psr6" ], "support": { - "source": "https://github.com/symfony/cache/tree/v5.4.36" + "source": "https://github.com/symfony/cache/tree/v5.4.38" }, "funding": [ { @@ -4244,20 +4176,20 @@ "type": "tidelift" } ], - "time": "2024-02-19T13:08:14+00:00" + "time": "2024-03-19T09:55:32+00:00" }, { "name": "symfony/cache-contracts", - "version": "v2.5.2", + "version": "v2.5.3", "source": { "type": "git", "url": "https://github.com/symfony/cache-contracts.git", - "reference": "64be4a7acb83b6f2bf6de9a02cee6dad41277ebc" + "reference": "fee6db04d913094e2fb55ff8e7db5685a8134463" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/cache-contracts/zipball/64be4a7acb83b6f2bf6de9a02cee6dad41277ebc", - "reference": "64be4a7acb83b6f2bf6de9a02cee6dad41277ebc", + "url": "https://api.github.com/repos/symfony/cache-contracts/zipball/fee6db04d913094e2fb55ff8e7db5685a8134463", + "reference": "fee6db04d913094e2fb55ff8e7db5685a8134463", "shasum": "" }, "require": { @@ -4307,7 +4239,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/cache-contracts/tree/v2.5.2" + "source": "https://github.com/symfony/cache-contracts/tree/v2.5.3" }, "funding": [ { @@ -4323,7 +4255,7 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:53:40+00:00" + "time": "2024-01-23T13:51:25+00:00" }, { "name": "symfony/deprecation-contracts", @@ -5211,21 +5143,21 @@ }, { "name": "nikic/php-parser", - "version": "v4.18.0", + "version": "v4.19.1", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "1bcbb2179f97633e98bbbc87044ee2611c7d7999" + "reference": "4e1b88d21c69391150ace211e9eaf05810858d0b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/1bcbb2179f97633e98bbbc87044ee2611c7d7999", - "reference": "1bcbb2179f97633e98bbbc87044ee2611c7d7999", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/4e1b88d21c69391150ace211e9eaf05810858d0b", + "reference": "4e1b88d21c69391150ace211e9eaf05810858d0b", "shasum": "" }, "require": { "ext-tokenizer": "*", - "php": ">=7.0" + "php": ">=7.1" }, "require-dev": { "ircmaxell/php-yacc": "^0.0.7", @@ -5261,9 +5193,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.18.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.19.1" }, - "time": "2023-12-10T21:03:43+00:00" + "time": "2024-03-17T08:10:35+00:00" }, { "name": "phar-io/manifest", @@ -5385,16 +5317,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.10.60", + "version": "1.10.67", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "95dcea7d6c628a3f2f56d091d8a0219485a86bbe" + "reference": "16ddbe776f10da6a95ebd25de7c1dbed397dc493" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/95dcea7d6c628a3f2f56d091d8a0219485a86bbe", - "reference": "95dcea7d6c628a3f2f56d091d8a0219485a86bbe", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/16ddbe776f10da6a95ebd25de7c1dbed397dc493", + "reference": "16ddbe776f10da6a95ebd25de7c1dbed397dc493", "shasum": "" }, "require": { @@ -5437,13 +5369,9 @@ { "url": "https://github.com/phpstan", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", - "type": "tidelift" } ], - "time": "2024-03-07T13:30:19+00:00" + "time": "2024-04-16T07:22:02+00:00" }, { "name": "phpunit/php-code-coverage", @@ -5766,16 +5694,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.6.17", + "version": "9.6.19", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "1a156980d78a6666721b7e8e8502fe210b587fcd" + "reference": "a1a54a473501ef4cdeaae4e06891674114d79db8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/1a156980d78a6666721b7e8e8502fe210b587fcd", - "reference": "1a156980d78a6666721b7e8e8502fe210b587fcd", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a1a54a473501ef4cdeaae4e06891674114d79db8", + "reference": "a1a54a473501ef4cdeaae4e06891674114d79db8", "shasum": "" }, "require": { @@ -5849,7 +5777,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.17" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.19" }, "funding": [ { @@ -5865,7 +5793,7 @@ "type": "tidelift" } ], - "time": "2024-02-23T13:14:51+00:00" + "time": "2024-04-05T04:35:58+00:00" }, { "name": "psy/psysh", @@ -6809,16 +6737,16 @@ }, { "name": "sebastian/resource-operations", - "version": "3.0.3", + "version": "3.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" + "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/05d5692a7993ecccd56a03e40cd7e5b09b1d404e", + "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e", "shasum": "" }, "require": { @@ -6830,7 +6758,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -6851,8 +6779,7 @@ "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", "support": { - "issues": "https://github.com/sebastianbergmann/resource-operations/issues", - "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.4" }, "funding": [ { @@ -6860,7 +6787,7 @@ "type": "github" } ], - "time": "2020-09-28T06:45:17+00:00" + "time": "2024-03-14T16:00:52+00:00" }, { "name": "sebastian/type", diff --git a/app/legacy/install/installer.php b/app/legacy/install/installer.php index 5c3fddc..506d58b 100644 --- a/app/legacy/install/installer.php +++ b/app/legacy/install/installer.php @@ -480,7 +480,7 @@ $settings_updates = [ ], '3.13.5' => null, '3.14.0' => [ - 'upload_enabled_image_formats' => 'jpg,png,bmp,gif,webp', + // 'upload_enabled_image_formats' => 'jpg,png,bmp,gif,webp', ], '3.14.1' => null, '3.15.0' => [ @@ -596,6 +596,11 @@ $settings_updates = [ ], '4.0.11' => null, '4.0.12' => null, + '4.1.0' => [ + 'twitter_account' => '', + 'theme_font' => '0', + 'upload_enabled_image_formats' => 'jpg,png,bmp,gif,webp,mp4,webm', + ], ]; $cheveretoFreeMap = [ '1.0.0' => '3.8.3', @@ -1827,6 +1832,42 @@ ALTER TABLE `%table_prefix%users` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8m ], ] ], + '4.1.0' => [ + 'storages' => [ + 'storage_type_chain' => [ + 'op' => 'ADD', + 'type' => 'tinyint(3) UNSIGNED NOT NULL', + 'prop' => 'DEFAULT "1"', + ] + ], + 'images' => [ + 'image_size' => [ + 'op' => 'MODIFY', + 'type' => 'bigint(11)', + 'prop' => "UNSIGNED NOT NULL", + ], + 'image_frame_size' => [ + 'op' => 'ADD', + 'type' => 'int(11)', + 'prop' => "NOT NULL DEFAULT '0'", + ], + 'image_duration' => [ + 'op' => 'ADD', + 'type' => 'int(11)', + 'prop' => "NOT NULL DEFAULT '0'", + ], + 'image_type' => [ + 'op' => 'ADD', + 'type' => 'tinyint(3) UNSIGNED', + 'prop' => "as (case + when `image_extension` in ('pdf', 'doc', 'md') then 4 + when `image_extension` in ('mp3', 'm4a', 'wav') then 3 + when `image_extension` in ('mp4', 'webm') then 2 + when `image_extension` in ('jpg', 'jpeg', 'gif', 'png', 'webp') then 1 + else 0 end) stored" + ], + ] + ], ]; $sql_update = []; if (!$maintenance) { diff --git a/app/legacy/install/template/finished.php b/app/legacy/install/template/finished.php index ec02992..f4a98f8 100644 --- a/app/legacy/install/template/finished.php +++ b/app/legacy/install/template/finished.php @@ -7,9 +7,9 @@ if (!defined('ACCESS') || !ACCESS) { die('This file cannot be directly accessed.'); } ?>
admin dashboard and configure your website.', ['%s' => get_chevereto_version(true), '%u' => get_base_url('dashboard')]); ?>
+admin dashboard and configure your website.', ['%s' => get_chevereto_version(true), '%u' => get_base_url('dashboard/?welcome')]); ?>
diff --git a/app/legacy/install/template/ready.php b/app/legacy/install/template/ready.php index 6cdf326..335eeab 100644 --- a/app/legacy/install/template/ready.php +++ b/app/legacy/install/template/ready.php @@ -25,7 +25,7 @@ if (!defined('ACCESS') || !ACCESS) {"+PF.fn._s("There is a new Chevereto version available with the following release notes.")+" "+PF.fn._s("Check %s for a complete changelog since you last upgrade.",''+CHV.obj.system_info.version+'')+'
"+PF.fn._s("Check the %s for alternative update methods.",''+PF.fn._s("documentation")+"")+'
",html:!0}):PF.fn.growl.call(PF.fn._s("This website is running latest %s version",CHEVERETO.edition))}else PF.fn.growl.call(PF.fn._s("An error occurred. Please try again later."))})}),void 0!==PF.fn.get_url_var("checkUpdates")&&$("[data-action=check-for-updates]").trigger("click"),void 0!==PF.fn.get_url_var("upgrade")&&$("[data-action=upgrade]").trigger("click"),void 0!==PF.fn.get_url_var("license")&&$("[data-action='license']").trigger("click"),void 0!==PF.fn.get_url_var("installed")&&PF.fn.modal.simple({title:' '+PF.fn._s("Chevereto v%s installed",CHV.obj.system_info.version),message:""+PF.fn._s('Usage of Chevereto Software must be in compliance with the software license terms known as "The Chevereto License".')+'
",html:!0}),$(document).on("click","[data-action=system-update]",function(e){if(!$("input#system-update").prop("checked"))return PF.fn.growl.call(PF.fn._s("Please review the system requirements before proceeding")),void e.preventDefault()}),$(document).on("click","[data-action=toggle-storage-https]",function(){CHV.fn.storage.toggleHttps($(this).closest("[data-content=storage]").data("storage-id"))}),$(document).on("click","[data-action=toggle-storage-active]",function(){CHV.fn.storage.toggleActive($(this).closest("[data-content=storage]").data("storage-id"))}),$(CHV.fn.uploader.selectors.root).exists()&&(CHV.fn.uploader.$pasteCatcher=$("",{contenteditable:"true",id:CHV.fn.uploader.selectors.paste.replace(/#/,"")}),$("body").append(CHV.fn.uploader.$pasteCatcher),$(document).on("keydown",function(e){!e.ctrlKey&&!e.metaKey||"KeyV"!=e.originalEvent.code||$(e.target).is(":input")||(PF.fn.keyFeedback.spawn(e),CHV.fn.uploader.$pasteCatcher.focus(e))}),document.addEventListener("dragover",function(e){e.preventDefault()}),document.addEventListener("drop",function(e){if(CHV.obj.config.upload.url){e.preventDefault();var t,a=e.dataTransfer.getData("text/html"),o=/src="?([^"\s]+)"?\s*/;t=o.exec(a),t&&(CHV.fn.uploader.toggle({show:!0}),CHV.fn.uploader.add({},t[1]))}}),window.addEventListener("paste",CHV.fn.uploader.pasteImageHandler)),$(document).on("click","[data-action=like]",function(){if(PF.fn.is_user_logged()){var e=$(this);if(!e.data("XHR")){e.data("XHR",!0);var t=$(this).is("[data-liked]")?$(this):$(this).closest("[data-liked]"),a=!t.closest("[data-list], .viewer").exists()&&void 0!==CHV.obj.resource,o=t.is("[data-liked=1]"),i=o?"dislike":"like",n={id:a?CHV.obj.resource.id:$(this).closest("[data-id]").attr("data-id"),type:a?CHV.obj.resource.type:$(this).closest("[data-type]").attr("data-type")},s=a?e:$("[data-type="+n.type+"][data-id="+n.id+"]"),r={type:"POST",data:{action:i},cache:!1};r.data[i]={object:n.type,id:n.id},$.ajax(r).complete(function(t){var i=t.responseJSON;e.data("XHR",!1),200===i.status_code?(a&&void 0!==i.content&&$("[data-text=likes-count]").html(i.content.likes),s.closest("[data-liked]").attr("data-liked",o?0:1)):PF.fn.growl.expirable(PF.fn._s("An error occurred. Please try again later."))})}}else window.location.href=CHV.obj.vars.urls.login}),$(document).on("click","[data-action=album-cover]",function(){var e=$(this);if(!e.data("XHR")){e.data("XHR",!0);var t=$(this).is("[data-cover]")?$(this):$(this).closest("[data-cover]"),a=t.is("[data-cover=1]"),o=a?"album-cover-unset":"album-cover-set",i=(CHV.obj.resource.id,e.closest("[data-cover]")),n={type:"POST",data:{action:o},cache:!1};n.data[o]={album_id:i.data("album-id"),image_id:i.data("id")},$.ajax(n).complete(function(t){var o=t.responseJSON;e.data("XHR",!1),200===o.status_code?i.attr("data-cover",a?0:1):PF.fn.growl.expirable(PF.fn._s("An error occurred. Please try again later."))})}}),$(document).on("click","[data-action=follow]",function(){if(PF.fn.is_user_logged()){var e=$(this);if(!e.data("XHR")){e.data("XHR",!0);var t=$(this).is("[data-followed]")?$(this):$(this).closest("[data-followed]"),a=void 0!==CHV.obj.resource,o=t.is("[data-followed=1]"),i=o?"unfollow":"follow",n={id:a?CHV.obj.resource.id:$(this).closest("[data-id]").data("id"),type:a?CHV.obj.resource.type:$(this).closest("[data-type]").data("type")},s={type:"POST",data:{action:i},cache:!1};s.data[i]={object:n.type,id:n.id},$.ajax(s).complete(function(i){var n=i.responseJSON;if(e.data("XHR",!1),200===n.status_code){if(a&&void 0!==n.user_followed){var s=$("[data-text=followers-label]"),r={single:s.data("label-single"),plural:s.data("label-plural")};$("[data-text=followers-count]").html(n.user_followed.followers),s.html(PF.fn._n(r.single,r.plural,n.user_followed.followers))}t.attr("data-followed",o?0:1)}else PF.fn.growl.expirable(PF.fn._s("An error occurred. Please try again later."))})}}else PF.fn.modal.call({type:"login"})}),$(document).on("click","[data-action=user_ban],[data-action=user_unban]",function(){var e=$(this);if(!e.data("XHR")){e.data("XHR",!0);var t=$(this).closest("[data-banned]"),a=!0,o=t.is("[data-banned=1]"),i=e.attr("data-action"),n={id:a?CHV.obj.resource.id:$(this).closest("[data-id]").data("id"),type:a?CHV.obj.resource.type:$(this).closest("[data-type]").data("type")},s={type:"POST",data:{action:i},cache:!1};s.data[i]={user_id:n.id},$.ajax(s).complete(function(a){var i=a.responseJSON;e.data("XHR",!1),200===i.status_code?t.attr("data-banned",o?0:1):PF.fn.growl.expirable(PF.fn._s("An error occurred. Please try again later."))})}}),$(document).on("click","[data-action=top-bar-notifications]",function(e){var a=this,o=$(this),i=$(".top-bar-notifications-container",o),n=$(".top-bar-notifications-list",o),s=$("ul",n),r=$(".loading",i);o.data("XHR")||(r.removeClass("hidden"),PF.fn.loading.inline(r,{size:"small",message:PF.fn._s("loading")}),$.ajax({type:"POST",data:{action:"notifications"},cache:!1}).complete(function(e){var l=e.responseJSON;if(200!==l.status_code)return PF.fn.growl.expirable(PF.fn._s("An error occurred. Please try again later.")),o.data("XHR",!1),void r.addClass("hidden").html("");if(o.data("XHR",!0),r.remove(),l.html){n.removeClass("hidden"),s.html(l.html),t();var d=$("li.new",s);d.addClass("transition"),setTimeout(function(){d.removeClass("new"),$("[data-content=notifications-counter]",a).removeClass("on").html("0"),setTimeout(function(){d.removeClass("transition")},150)},1500)}else $(".empty",i).removeClass("hidden")}))}),$("#g-recaptcha").is(":empty")&&CHV.obj.config.captcha.enabled&&CHV.obj.config.captcha.sitekey&&("3"!=CHV.obj.config.captcha.version&&CHV.obj.config.captcha.isNeeded||$('label[for="recaptcha_response_field"]').remove()),$(document).on("click",PF.obj.listing.selectors.list_item+" a.image-container",function(e){var t=$(this).closest(PF.obj.listing.selectors.list_item),o=t.find("[data-action=load-image]");o.length>0&&(a(o),e.preventDefault())}),$(document).on("click",PF.obj.listing.selectors.list_item+" [data-action=load-image]",function(e){a($(this)),e.preventDefault(),e.stopPropagation()}),$(document).on("click","#album [data-tab=tab-embeds]",function(e){e.preventDefault,CHV.fn.album.showEmbedCodes()}),$("body").is("#upload")&&CHV.fn.uploader.toggle({show:!0}),$(document).on("keyup",function(e){if(!($(e.target).is(":input")||e.ctrlKey||e.metaKey||e.altKey)){var t=$("#fullscreen-modal:visible").exists(),a=$(".viewer"),o=$(".list-selection:visible"),i=o.find("[data-content=pop-selection]:visible:not(.disabled)"),n=$("body").hasClass("--viewer-shown"),s=$(CHV.fn.uploader.selectors.root+CHV.fn.uploader.selectors.show).exists(),r=e.originalEvent.code;if("Escape"===e.originalEvent.code){if(t)return;s&&CHV.fn.uploader.toggle({reset:!1})}if(a.exists()&&n){if(r in CHV.fn.listingViewer.keys){var l=["KeyW","Escape","ArrowLeft","ArrowRight"],d=CHV.fn.listingViewer.keys[r];-1==l.indexOf(r)?$("[data-action="+d+"]",CHV.fn.listingViewer.selectors.root).click():d in CHV.fn.listingViewer&&CHV.fn.listingViewer[d](),PF.fn.keyFeedback.spawn(e)}}else{var c,u={Period:"list-select-all",KeyK:"get-embed-codes",KeyZ:"clear",KeyA:"create-album",KeyM:"move",KeyO:"approve",Delete:"delete",KeyC:"assign-category",KeyV:"flag-safe",KeyF:"flag-unsafe",KeyH:"album-cover"},m={KeyE:"edit",KeyL:"like",KeyS:"share",KeyJ:"sub-album",KeyP:"upload-to-album"};d=u[r]||m[r];void 0!==d&&(o.exists()&&(n||t||parseInt($("[data-text=selection-count]:visible",i).text())>0&&(c=$("[data-action="+d+"]",o.closest(".list-selection")))),void 0===c&&(c=$("[data-action="+d+"]:visible").not("#content-listing-tabs *")),c instanceof jQuery&&c.length>0&&(c.first().trigger("click"),PF.fn.keyFeedback.spawn(e)))}}}),$(document).on("click",CHV.fn.listingViewer.selectors.root+" [data-action^=viewer-]",function(){var e=$(this).data("action").substring("viewer-".length);e in CHV.fn.listingViewer&&CHV.fn.listingViewer[e]()}),$(document).on("click","a[data-href]:not([rel=popup-link]):not(.popup-link)",function(){var e=$(this).attr("data-href"),t=$(this).attr("href");(e||t)&&(location.href=t||e)});var b,v=PF.obj.listing.selectors.list_item+", .image-container";($(document).on("contextmenu click",v,function(e){$(".list-selection:visible").exists()&&!$(this).closest(CHV.fn.listingViewer.selectors.root).exists()&&("click"!=e.type||e.ctrlKey||e.metaKey)&&o(this,e)}),navigator.userAgent.match(/(iPad|iPhone|iPod)/i))&&$(document).on("mouseup mousemove",v,function(e){return clearTimeout(b),!1}).on("mousedown",v,function(e){var t=this,a=e;return b=window.setTimeout(function(){$(".list-selection:visible").exists()&&!$(t).closest(CHV.fn.listingViewer.selectors.root).exists()&&o(t,a)},500),!1});void 0!==CHV.obj.config&&CHV.obj.config.listing.viewer&&$(document).on("click",PF.obj.listing.selectors.list_item+"[data-type=image] .image-container",function(e){if(e.preventDefault(),e.stopPropagation(),0!==e.clientX||0!==e.clientY){var t=$(this).closest(PF.obj.listing.selectors.list_item);t.exists()&&(e.ctrlKey||e.metaKey||CHV.fn.listingViewer.open(t))}else PF.fn.keyFeedback.spawn(e)}),$(document).on("contextmenu",CHV.fn.listingViewer.selectors.root,function(e){return e.preventDefault(),CHV.fn.listingViewer.zoom(),PF.fn.keyFeedback.spawn(e),!1});var _,w=PF.fn.deparam(window.location.search);if(w&&"viewer"in w){var C=$(PF.obj.listing.selectors.content_listing_visible);if("images"==C.data("list")){var P=$(PF.obj.listing.selectors.list_item,C)["next"==w.viewer?"first":"last"]();CHV.fn.listingViewer.open(P)}}$(window).on("DOMContentLoaded load resize scroll",function(){clearTimeout(_),_=setTimeout(function(){$(PF.obj.listing.selectors.list_item+":visible").each(function(){var e=$(this).find('[data-action="load-image"]').first(),t=PF.fn.deparam($(PF.obj.listing.selectors.list_item+"[data-id="+$(this).attr("data-id")+"]").closest(".content-listing").data("params-hidden")),o=t&&"is_animated"in t?t.is_animated:$(this).data("size")<=CHV.obj.config.image.load_max_filesize.getBytes();e.exists()&&o&&$(this).is_within_viewport(50)&&a(e)})},1e3)}),$(document).on("click","[data-action=logout]",function(){let e=$("form#form-logout");e.submit()}),Boolean(window.navigator.vibrate)&&$(document).on("click","button, .btn, .pop-btn, .top-btn-el, [data-action], .content-tabs a, .top-bar-logo a, .login-provider-button, .panel-share-networks li a, #image-viewer-loader",function(e){$(this).is("[data-action=top-bar-menu-full]")||(window.navigator.vibrate(0),window.navigator.vibrate(15))}),$(document).on("change keyup",CHV.fn.ctaForm.selectors.rows+" input[name^='cta-']",function(){CHV.fn.ctaForm.update($(this))}),$(document).on("click",CHV.fn.ctaForm.selectors.rows+" [data-action=cta-add]",function(){CHV.fn.ctaForm.insert($(this))}),$(document).on("click",CHV.fn.ctaForm.selectors.rows+" [data-action=cta-remove]",function(){CHV.fn.ctaForm.remove($(this)),0==CHV.fn.ctaForm.array.length&&$(CHV.fn.ctaForm.selectors.root+" "+CHV.fn.ctaForm.selectors.enable).prop("checked",!1).trigger("change")}),$(document).on("change",CHV.fn.ctaForm.selectors.root+" "+CHV.fn.ctaForm.selectors.enable,function(){let e=$(CHV.fn.ctaForm.selectors.combo,CHV.fn.ctaForm.selectors.root),t=$(this).is(":checked");e.toggleClass("soft-hidden",!t),t&&(0==CHV.fn.ctaForm.array.length&&CHV.fn.ctaForm.add(),CHV.fn.ctaForm.render()),CHV.fn.ctaForm.setEnable(t?1:0)}),$(document).on("change keyup",CHV.fn.ctaForm.selectors.root+" input[name^='cta-icon_']",function(){let e=CHV.fn.ctaForm.getRow($(this)),t=e.find("label[for^='cta-icon_'] [data-content=icon]");t.removeClass();let a=CHV.fn.ctaForm.getIconClass($(this).val());t.addClass(a)}),$(document).on("click","[href^='https://chevereto.com/']",function(e){let t=$(this).find(".badge--paid").exists();if(!t)return;let a=$(this).attr("href"),o=PF.fn._s("Get a license from %s to unlock all features and support.",'chevereto.com'),i=PF.fn._s("You can enter your license key in the dashboard panel.");e.preventDefault(),e.stopPropagation(),PF.fn.modal.simple({html:!0,title:' Upgrade Chevereto',message:""+o+" "+i+'
"})}),$(document).on("focus","input[name='form-album-password']",function(){$(this).get(0).type="text"}),$(document).on("blur","input[name='form-album-password']",function(){$(this).get(0).type="password"})}),"undefined"==typeof CHV&&(CHV={obj:{},fn:{},str:{}}),window.opener&&(CHV.obj.opener={uploadPlugin:{}}),CHV.fn.ctaButtons={selectors:{container:"[data-contains=cta-album]"},render:function(e=""){$(this.selectors.container).each(function(){$(this).html(e)})}},CHV.fn.ctaForm={enable:0,array:[],selectors:{root:"#cta-form",rows:"#cta-rows",enable:"#cta-enable",template:"#cta-row-template",combo:"#cta-combo",row:".cta-row"},update:function(e){let t=this.getPos(e),a=e.attr("name").match(/cta-(.*)?_\d+/)[1];this.array[t-1][a]=e.val()},add:function(e="",t="",a=""){this.array.push(this.getRowObject(e,t,a)),this.render()},insert:function(e){let t=this.getPos(e);this.array.splice(t,0,this.getRowObject()),this.render()},remove:function(e){let t=this.getPos(e);this.array.splice(t-1,1),this.render()},getRowObject:function(e="",t="",a=""){return{label:e,icon:t,href:a}},getIconClass:function(e){return/\s/g.test(e)?e:"fa-solid fa-"+e},getRow:function(e){return e.closest(this.selectors.row)},getPos:function(e){return this.getRow(e).data("pos")},getTemplateHtml:function(){return $(this.selectors.template).html()},getRowHtml:function(e,t){return this.getTemplateHtml().replaceAll(/%pos%/g,e).replaceAll(/%label%/g,t.label).replaceAll(/%href%/g,t.href).replaceAll(/%icon%/g,t.icon).replaceAll(/%iconClass%/g,this.getIconClass(t.icon))},render:function(){let e=$(this.selectors.root),t=e.find(this.selectors.rows),a=this;this.destroy(),$.each(this.array,function(e,o){t.append(a.getRowHtml(e+1,o))}),this.setEnable(this.enable),t.sortable({cursor:"grabbing",axis:"y",update:function(){let e=[];$(this).find(a.selectors.row).each(function(){let t=a.getPos($(this));e.push(a.array[t-1])}),a.array=e,a.render()}})},setEnable:function(e){let t=$(this.selectors.rows,this.selectors.root);this.enable=e;let a=1===this.enable;$("input[data-required]",t).each(function(){$(this).attr("required",a)})},destroy:function(){let e=$(this.selectors.root),t=e.find(this.selectors.rows);try{t.sortable("destroy")}catch(e){}t.empty()}},CHV.fn.album={showEmbedCodes:function(){var e=$(".content-listing-loading","#tab-embeds");if(e.exists()){var t=$("#embed-codes");$.ajax({url:PF.obj.config.json_api,type:"POST",dataType:"json",data:{action:"get-album-contents",albumid:CHV.obj.resource.id,auth_token:PF.obj.config.auth_token},cache:!1}).always(function(a){PF.fn.loading.destroy(e),200==a.status_code&&(CHV.fn.fillEmbedCodes(a.contents,"#tab-embeds"),$("#tab-embeds").addClass("visible"),t.removeClass("soft-hidden"))})}}},CHV.fn.modal={getTemplateWithPreview:function(e,t){var a=$(e).html(),o=$(""),i="",n=t.find(".image-container img").attr("src");return void 0!==n&&(i+='0){var v="";for(l=0;l "+PF.fn._s("There is a new Chevereto version available with the following release notes.")+" "+PF.fn._s("Check %s for a complete changelog since you last upgrade.",''+CHV.obj.system_info.version+'')+' "+PF.fn._s("Check the %s for alternative update methods.",''+PF.fn._s("documentation")+"")+' "+PF.fn._s('Usage of Chevereto Software must be in compliance with the software license terms known as "The Chevereto License".')+' "+o+" "+i+'"+v+"
"})}else CHV.fn.uploader.focus();CHV.fn.uploader.boxSizer()}},$.extend({},C,{orientation:a.exif?a.exif.get("Orientation"):1})),setTimeout(function(){o(e+1)},25)}))}else PF.fn.loading.destroy("fullscreen")}var i;if(!this.canAdd){e=e.originalEvent;return e.preventDefault(),e.stopPropagation(),!1}$fileinput=$(this.selectors.file),$fileinput.replaceWith($fileinput=$fileinput.clone(!0));var n=$(this.selectors.upload_item_template).html();let s=[],r=[];if(void 0===t){e=e.originalEvent;e.preventDefault(),e.stopPropagation();var l=e.dataTransfer||e.target;if("items"in l)for(var d=l.items,c=0;c
"})}if(0==s.length)return}else{if(t=t.replace(/(<([^>]+)>)/g,"").replace(/(\[([^\]]+)\])/g,""),s=t.match_urls(),!s)return;s=s.array_unique(),s=$.map(s,function(e,t){return{uid:t,name:e,url:e}})}if($.isEmptyObject(this.files))for(c=0;c").attr("src",a).on("load error",function(){$(this).remove(),e.css("background-image","url("+a+")").addClass("animate-in").removeAttr("data-src"),setTimeout(function(){$(".home-cover-img:not(:last)","#home-cover-slideshow").removeClass("animate-end animate-in--alt")},2e3),l()})}}r?$("
").attr("src",r).on("load error",function(){$(this).remove(),s()}):s()}var c,u=CHV.fn.uploader.selectors.root,m=CHV.fn.uploader.selectors.queue,f=$(u),p=$(m);if($(document).on("click","[data-action=top-bar-upload]",function(e){$("body").is("#upload")||"js"!==$(this).data("link")||CHV.fn.uploader.toggle({reset:!1}),"page"!==$(this).data("link")&&(e.preventDefault(),e.stopPropagation())}),$(document).on("click mouseover mouseout","[data-action=palette]",function(e){clearTimeout(c),e.preventDefault();var t=$(this).data("palette");switch(e.type){case"mouseover":c=setTimeout(function(){CHV.fn.Palettes.preview(t)},1e3);break;case"mouseout":t=$("html").attr("data-palette")||"",CHV.fn.Palettes.set(t);break;case"click":e.stopPropagation(),$("[data-action=palette]","[data-content=palettes]").removeClass("current"),$(this).addClass("current"),CHV.fn.Palettes.set(t),CHV.fn.Palettes.save()}}),$(document).on("change","#palettes",function(e){CHV.fn.Palettes.set(this.value),CHV.fn.Palettes.save()}),$("[data-action=close-upload]",f).click(function(){f.is(":animated")||$("[data-action=top-bar-upload]","#top-bar").trigger("click")}),$("[data-action=reset-upload]",f).click(function(){CHV.fn.uploader.isUploading&&$("[data-action=cancel-upload-remaining], [data-action=cancel-upload]",f).trigger("click"),CHV.fn.uploader.reset()}),$("[data-action=cancel-upload-remaining], [data-action=cancel-upload]",f).click(function(){CHV.fn.uploader.isUploading=!1,$("[data-action=cancel]",p).click(),Object.size(CHV.fn.uploader.results.success)>0?CHV.fn.uploader.displayResults():CHV.fn.uploader.reset()}),$(document).on("click","[data-action=upload-privacy]:not(disabled)",function(e){e.isDefaultPrevented()||(current_privacy=$(this).data("privacy"),target_privacy="public"==current_privacy?"private":"public",this_lock=$(".icon",this).data("lock"),this_unlock=$(".icon",this).data("unlock"),$(".icon",this).removeClass(this_lock+" "+this_unlock).addClass("public"==current_privacy?this_lock:this_unlock),$(this).data("privacy",target_privacy),$("[data-action=upload-privacy-copy]").html($("[data-action=upload-privacy]").html()),$upload_button=$("[data-action=upload]",f),$upload_button.text($upload_button.data(target_privacy)),$(this).tipTip("hide"))}),$(CHV.fn.uploader.selectors.file+", "+CHV.fn.uploader.selectors.camera).on("change",function(e){$(CHV.fn.uploader.selectors.root).data("shown")?CHV.fn.uploader.add(e):CHV.fn.uploader.toggle({callback:function(e){CHV.fn.uploader.add(e)}},e)}).on("click",function(e){!$(this).data("login-needed")||PF.fn.is_user_logged()}),$(CHV.fn.uploader.selectors.root).exists()&&($("body").on({dragenter:function(t){if(t.preventDefault(),!e(t))return!1;$(CHV.fn.uploader.selectors.dropzone).exists()||$("body").append($('').css({width:"100%",height:"100%",position:"fixed",zIndex:1e3,left:0,top:0}))}}),$(document).on({dragover:function(t){if(t.preventDefault(),!e(t))return!1;$(CHV.fn.uploader.selectors.root).data("shown")||CHV.fn.uploader.toggle({reset:!1})},dragleave:function(e){$(CHV.fn.uploader.selectors.dropzone).remove(),$.isEmptyObject(CHV.fn.uploader.files)&&CHV.fn.uploader.toggle()},drop:function(e){e.preventDefault(),CHV.fn.uploader.add(e),$(CHV.fn.uploader.selectors.dropzone).remove()}},CHV.fn.uploader.selectors.dropzone)),$(document).on("keyup change","[data-action=resize-combo-input]",function(e){var t=$(this).closest("[data-action=resize-combo-input]"),a=$("[name=form-width]",t),o=$("[name=form-height]",t),i=a.data("initial")/o.data("initial"),n={width:Math.round(a.prop("value")/i),height:Math.round(o.prop("value")*i)};$(e.target).is(a)?o.prop("value",Math.round(n.width)):a.prop("value",Math.round(n.height))}),$(document).on("click",m+" [data-action=edit]",function(){var e=$(this).closest("li"),t=(e.closest("ul"),e.data("id")),a=CHV.fn.uploader.files[t];media=a.type.substring(0,a.type.indexOf("/"));for(var o=PF.obj.modal.selectors.root,i=$.extend({},a.formValues||a.parsedMeta),n=["album_id","category_id","nsfw"],r=0;r
");r.attr("src",n.url).imagesLoaded(function(){i.addClass("hidden").empty(),o.css("background-image","url("+n.url+")").hide().fadeIn(),$("[data-content=user-change-background]",a).removeClass("hidden"),$(a).removeClass("no-background"),$(".top-user").removeClass("no-background"),$("[data-content=user-upload-background]").hide(),$("[data-content=user-change-background]").show(),PF.fn.growl.expirable(PF.fn._s("Profile background image updated.")),r.remove()})}else i.addClass("hidden").empty(),PF.fn.growl.expirable(PF.fn._s("An error occurred. Please try again later."));t.data("uploading",!1)}}}else PF.fn.growl.call(PF.fn._s("Please select a valid image file type."))}),CHV.fn.user_background={delete:{submit:function(){return PF.obj.modal.form_data={action:"delete",delete:"background",owner:CHV.obj.resource.user.id},!0},deferred:{success:{before:function(e){$("[data-content=user-background-cover-src]").css("background-image","none"),$("[data-content=user-background-cover], .top-user").addClass("no-background"),$("[data-content=user-background-cover]").height(""),$("[data-content=user-upload-background]").removeClass("hidden").show(),$("[data-content=user-change-background]").hide()},done:function(e){PF.fn.modal.close(function(){PF.fn.growl.expirable(PF.fn._s("Profile background image deleted."))})}},error:function(e){PF.fn.growl.expirable(PF.fn._s("Error deleting profile background image."))}}}},CHV.fn.user_api={delete:{submit:function(){return PF.obj.modal.form_data={action:"delete",delete:"api_key",owner:CHV.obj.resource.user.id},!0},deferred:{success:{before:function(e){},done:function(e){PF.fn.modal.close(function(){location.reload()})}},error:function(e){PF.fn.growl.expirable(e.responseJSON.error.message)}}}},CHV.fn.user_two_factor={delete:{submit:function(){return PF.obj.modal.form_data={action:"delete",delete:"two_factor",owner:CHV.obj.resource.user.id},!0},deferred:{success:{before:function(e){},done:function(e){PF.fn.modal.close(function(){location.reload()})}},error:function(e){PF.fn.growl.expirable(e.responseJSON.error.message)}}}},CHV.str.mainform="[data-content=main-form]",CHV.obj.timezone={selector:"[data-content=timezone]",input:"#timezone-region"},$(document).on("keyup change",CHV.str.mainform+" :input",function(){$(this).is("[name=username]")&&$("[data-text=username]").text($(this).val())}),$(document).on("change",CHV.obj.timezone.input,function(){var e=$(this).val(),t=$("#timezone-combo-"+e);t.find("option:first").prop("selected",!0),$(CHV.obj.timezone.selector).val(t.val()).change()}),$(document).on("change","[id^=timezone-combo-]",function(){var e=$(this).val();$(CHV.obj.timezone.selector).val(e).change()}),$(document).on("keyup change blur","[name^=new-password]",function(){var e=$("[name=new-password]"),t=$("[name=new-password-confirm]"),a=e.val()==t.val(),o=t.closest(".input-password").find(".input-warning");0==o.exists()&&(o=$("[data-message=new-password-confirm]")),$(this).is(t)&&t.data("touched",!0),t.data("touched")&&o.text(a?"":o.data("text"))[a?"addClass":"removeClass"]("hidden-visibility")}),$(document).on("submit",CHV.obj.mainform,function(){switch($(this).data("type")){case"password":var e=$("[name=new-password]",this),t=$("[name=new-password-confirm]",this);if((""!==e.val()||""!==t.val())&&e.val()!==t.val())return e.highlight(),t.highlight(),PF.fn.growl.expirable(PF.fn._s("Passwords don't match")),!1}}),$(document).on("click","[data-action=check-for-updates]",function(){PF.fn.loading.fullscreen(),CHV.fn.system.checkUpdates(function(e){if(PF.fn.loading.destroy("fullscreen"),200===e.status){var t=e.responseJSON.software;-1==PF.fn.versionCompare(CHV.obj.system_info.version,t.current_version)?PF.fn.modal.simple({title:' '+PF.fn._s("Chevereto v%s available",t.current_version),message:"
';var e=$(this).find(".image-container img");e.exists()?n+='':(n+='',n+=''),n+="",r++}),i.html(o).find(".image-preview").html(n),i.html()}},CHV.fn.listingViewer={selectors:{bodyShown:".--viewer-shown",content:".viewer-content",template:"#viewer-template",root:".viewer",rootShow:".viewer--show",rootHide:".viewer--hide",rootZero:".viewer--zero",rootNavPrev:".viewer--nav-prev",rootNavNext:".viewer--nav-next",src:".viewer-src",tools:".viewer-tools",loader:".viewer-loader",owner:".viewer-owner",ownerGuest:".viewer-owner--guest",ownerUser:".viewer-owner--user",inputMap:".viewer-kb-input"},keys:{ArrowLeft:"prev",ArrowRight:"next",Delete:"delete",Escape:"close",KeyA:"create-album",KeyE:"edit",KeyF:"flag",KeyL:"like",KeyM:"move",KeyO:"approve",KeyS:"share",KeyW:"zoom",Period:"select"},keymap:{"create-album":["A",PF.fn._s("Create album")],approve:["O",PF.fn._s("Approve")],close:["Esc",PF.fn._s("Close")],delete:["Del",PF.fn._s("Delete")],edit:["E",PF.fn._s("Edit")],flag:["F",PF.fn._s("Toggle flag")],like:["L",PF.fn._s("Like")],move:["M",PF.fn._n("Move")],next:["►",PF.fn._s("Next")],prev:["◄",PF.fn._s("Previous")],select:[".",PF.fn._s("Toggle select")],share:["S",PF.fn._s("Share")],zoom:["W",PF.fn._s("Zoom")]},loading:null,idleTimer:0,$item:null,show:function(){PF.fn.deparam(this.$item.closest(PF.obj.listing.selectors.content_listing_visible).data("params-hidden"));this.getEl("root").removeClass(this.selectors.rootHide.substring(1)).addClass(this.selectors.rootShow.substring(1)),$("body").addClass(this.selectors.bodyShown.substring(1));var e=new Hammer($(CHV.fn.listingViewer.selectors.root).get(0),{direction:Hammer.DIRECTION_VERTICAL});e.on("swipeleft swiperight",function(e){var t="left"==e.type.substring("swipe".length)?"next":"prev";CHV.fn.listingViewer[t]()}),this.getEl("root")[(PF.fn.isDevice(["phone","phablet"])?"add":"remove")+"Class"]("--over")},getItem:function(){return this.$item},getEl:function(e){var t=!e.startsWith("template")&&!e.startsWith("root")&&this.selectors.root;return t?$(this.selectors[e],t):$(this.selectors[e])},getObject:function(e){if(e||void 0===this.object){var t=decodeURIComponent(this.getItem().attr("data-object"));this.object=JSON&&JSON.parse(t)||$.parseJSON(t)}return this.object},placeholderSizing:function(){if(this.getEl("root").exists()){var e=Math.max(document.documentElement.clientWidth,window.innerWidth||0),t=Math.max(document.documentElement.clientHeight,window.innerHeight||0),a=e/t,o=this.getEl("src")[0],i=o.getAttribute("width"),n=o.getAttribute("height"),r=i/n,s=a
"+o+"
"})}else CHV.fn.uploader.focus();CHV.fn.uploader.boxSizer()}}if($(CHV.fn.uploader.selectors.queue_item+":not([data-id]) .preview:empty",CHV.fn.uploader.selectors.queue).first().closest("li").attr("data-id",t.uid),void 0!==t.type&&t.type.startsWith("video/")){var u=i(t.uid),m=r(t),p=URL.createObjectURL(t);l(p,function(e,a){++C,"error"===e.type?f.push({uid:t.uid,name:t.name.truncate_middle(),error:e.error}):(CHV.fn.uploader.files[t.uid].parsedMeta={title:m,width:e.videoWidth,height:e.videoHeight,mimetype:t.type},d(u,a)),c(C,s,f)})}else loadImage(t.url?t.url:t,function(e){++C;var o=i(t.uid);if("error"===e.type)f.push({uid:t.uid,name:t.name.truncate_middle(),error:"MEDIA_ERR_SRC_FORMAT"});else{n();var l="image/jpeg";if(void 0!==a.buffer){for(var u=new Uint8Array(a.buffer).subarray(0,4),m="",p=0;p
"})}if(0==s.length)return}else{if(t=t.replace(/(<([^>]+)>)/g,"").replace(/(\[([^\]]+)\])/g,""),s=t.match_urls(),!s)return;s=s.array_unique(),s=$.map(s,function(e,t){return{uid:t,name:e,url:e}})}if($.isEmptyObject(this.files))for(u=0;ua",i=u.getElementsByTagName("*")||[],n=u.getElementsByTagName("a")[0],!n||!n.style||!i.length)return e;o=Q.createElement("select"),a=o.appendChild(Q.createElement("option")),s=u.getElementsByTagName("input")[0],n.style.cssText="top:1px;float:left;opacity:.5",e.getSetAttribute="t"!==u.className,e.leadingWhitespace=3===u.firstChild.nodeType,e.tbody=!u.getElementsByTagName("tbody").length,e.htmlSerialize=!!u.getElementsByTagName("link").length,e.style=/top/.test(n.getAttribute("style")),e.hrefNormalized="/a"===n.getAttribute("href"),e.opacity=/^0.5/.test(n.style.opacity),e.cssFloat=!!n.style.cssFloat,e.checkOn=!!s.value,e.optSelected=a.selected,e.enctype=!!Q.createElement("form").enctype,e.html5Clone="<:nav>"!==Q.createElement("nav").cloneNode(!0).outerHTML,e.inlineBlockNeedsLayout=!1,e.shrinkWrapBlocks=!1,e.pixelPosition=!1,e.deleteExpando=!0,e.noCloneEvent=!0,e.reliableMarginRight=!0,e.boxSizingReliable=!0,s.checked=!0,e.noCloneChecked=s.cloneNode(!0).checked,o.disabled=!0,e.optDisabled=!a.disabled;try{delete u.test}catch(t){e.deleteExpando=!1}for(h in s=Q.createElement("input"),s.setAttribute("value",""),e.input=""===s.getAttribute("value"),s.value="t",s.setAttribute("type","radio"),e.radioValue="t"===s.value,s.setAttribute("checked","t"),s.setAttribute("name","t"),r=Q.createDocumentFragment(),r.appendChild(s),e.appendChecked=s.checked,e.checkClone=r.cloneNode(!0).cloneNode(!0).lastChild.checked,u.attachEvent&&(u.attachEvent("onclick",function(){e.noCloneEvent=!1}),u.cloneNode(!0).click()),{submit:!0,change:!0,focusin:!0})u.setAttribute(l="on"+h,"t"),e[h+"Bubbles"]=l in t||!1===u.attributes[l].expando;for(h in u.style.backgroundClip="content-box",u.cloneNode(!0).style.backgroundClip="",e.clearCloneStyle="content-box"===u.style.backgroundClip,ht(e))break;return e.ownLast="0"!==h,ht(function(){var i,n,s,o="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",r=Q.getElementsByTagName("body")[0];r&&(i=Q.createElement("div"),i.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",r.appendChild(i).appendChild(u),u.innerHTML="
",s=u.getElementsByTagName("td"),s[0].style.cssText="padding:0;margin:0;border:0;display:none",c=0===s[0].offsetHeight,s[0].style.display="",s[1].style.display="none",e.reliableHiddenOffsets=c&&0===s[0].offsetHeight,u.innerHTML="",u.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",ht.swap(r,null!=r.style.zoom?{zoom:1}:{},function(){e.boxSizing=4===u.offsetWidth}),t.getComputedStyle&&(e.pixelPosition="1%"!==(t.getComputedStyle(u,null)||{}).top,e.boxSizingReliable="4px"===(t.getComputedStyle(u,null)||{width:"4px"}).width,n=u.appendChild(Q.createElement("div")),n.style.cssText=u.style.cssText=o,n.style.marginRight=n.style.width="0",u.style.width="1px",e.reliableMarginRight=!parseFloat((t.getComputedStyle(n,null)||{}).marginRight)),typeof u.style.zoom!==V&&(u.innerHTML="",u.style.cssText=o+"width:1px;padding:1px;display:inline;zoom:1",e.inlineBlockNeedsLayout=3===u.offsetWidth,u.style.display="block",u.innerHTML="",u.firstChild.style.width="5px",e.shrinkWrapBlocks=3!==u.offsetWidth,e.inlineBlockNeedsLayout&&(r.style.zoom=1)),r.removeChild(i),i=u=s=n=null)}),i=o=r=a=n=s=null,e}({});var Et=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,Pt=/([A-Z])/g;ht.extend({cache:{},noData:{applet:!0,embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(t){return t=t.nodeType?ht.cache[t[ht.expando]]:t[ht.expando],!!t&&!a(t)},data:function(t,e,i){return s(t,e,i)},removeData:function(t,e){return o(t,e)},_data:function(t,e,i){return s(t,e,i,!0)},_removeData:function(t,e){return o(t,e,!0)},acceptData:function(t){if(t.nodeType&&1!==t.nodeType&&9!==t.nodeType)return!1;var e=t.nodeName&&ht.noData[t.nodeName.toLowerCase()];return!e||!0!==e&&t.getAttribute("classid")===e}}),ht.fn.extend({data:function(t,i){var n,s,o=null,a=0,l=this[0];if(t===e){if(this.length&&(o=ht.data(l),1===l.nodeType&&!ht._data(l,"parsedAttrs"))){for(n=l.attributes;n.length>a;a++)s=n[a].name,0===s.indexOf("data-")&&(s=ht.camelCase(s.slice(5)),r(l,s,o[s]));ht._data(l,"parsedAttrs",!0)}return o}return"object"==typeof t?this.each(function(){ht.data(this,t)}):arguments.length>1?this.each(function(){ht.data(this,t,i)}):l?r(l,t,ht.data(l,t)):null},removeData:function(t){return this.each(function(){ht.removeData(this,t)})}}),ht.extend({queue:function(t,i,n){var s;return t?(i=(i||"fx")+"queue",s=ht._data(t,i),n&&(!s||ht.isArray(n)?s=ht._data(t,i,ht.makeArray(n)):s.push(n)),s||[]):e},dequeue:function(t,e){e=e||"fx";var i=ht.queue(t,e),n=i.length,s=i.shift(),o=ht._queueHooks(t,e),r=function(){ht.dequeue(t,e)};"inprogress"===s&&(s=i.shift(),n--),s&&("fx"===e&&i.unshift("inprogress"),delete o.stop,s.call(t,r,o)),!n&&o&&o.empty.fire()},_queueHooks:function(t,e){var i=e+"queueHooks";return ht._data(t,i)||ht._data(t,i,{empty:ht.Callbacks("once memory").add(function(){ht._removeData(t,e+"queue"),ht._removeData(t,i)})})}}),ht.fn.extend({queue:function(t,i){var n=2;return"string"!=typeof t&&(i=t,t="fx",n--),n>arguments.length?ht.queue(this[0],t):i===e?this:this.each(function(){var e=ht.queue(this,t,i);ht._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&ht.dequeue(this,t)})},dequeue:function(t){return this.each(function(){ht.dequeue(this,t)})},delay:function(t,e){return t=ht.fx&&ht.fx.speeds[t]||t,e=e||"fx",this.queue(e,function(e,i){var n=setTimeout(e,t);i.stop=function(){clearTimeout(n)}})},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,i){var n,s=1,o=ht.Deferred(),r=this,a=this.length,l=function(){--s||o.resolveWith(r,[r])};for("string"!=typeof t&&(i=t,t=e),t=t||"fx";a--;)n=ht._data(r[a],t+"queueHooks"),n&&n.empty&&(s++,n.empty.add(l));return l(),o.promise(i)}});var Nt,kt,Ht=/[\t\r\n\f]/g,Dt=/\r/g,It=/^(?:input|select|textarea|button|object)$/i,zt=/^(?:a|area)$/i,At=/^(?:checked|selected)$/i,Wt=ht.support.getSetAttribute,Mt=ht.support.input;ht.fn.extend({attr:function(t,e){return ht.access(this,ht.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each(function(){ht.removeAttr(this,t)})},prop:function(t,e){return ht.access(this,ht.prop,t,e,arguments.length>1)},removeProp:function(t){return t=ht.propFix[t]||t,this.each(function(){try{this[t]=e,delete this[t]}catch(t){}})},addClass:function(t){var e,i,n,s,o,r=0,a=this.length,l="string"==typeof t&&t;if(ht.isFunction(t))return this.each(function(e){ht(this).addClass(t.call(this,e,this.className))});if(l)for(e=(t||"").match(pt)||[];a>r;r++)if(i=this[r],n=1===i.nodeType&&(i.className?(" "+i.className+" ").replace(Ht," "):" ")){for(o=0;s=e[o++];)0>n.indexOf(" "+s+" ")&&(n+=s+" ");i.className=ht.trim(n)}return this},removeClass:function(t){var e,i,n,s,o,r=0,a=this.length,l=0===arguments.length||"string"==typeof t&&t;if(ht.isFunction(t))return this.each(function(e){ht(this).removeClass(t.call(this,e,this.className))});if(l)for(e=(t||"").match(pt)||[];a>r;r++)if(i=this[r],n=1===i.nodeType&&(i.className?(" "+i.className+" ").replace(Ht," "):"")){for(o=0;s=e[o++];)for(;n.indexOf(" "+s+" ")>=0;)n=n.replace(" "+s+" "," ");i.className=t?ht.trim(n):""}return this},toggleClass:function(t,e){var i=typeof t;return"boolean"==typeof e&&"string"===i?e?this.addClass(t):this.removeClass(t):ht.isFunction(t)?this.each(function(i){ht(this).toggleClass(t.call(this,i,this.className,e),e)}):this.each(function(){if("string"===i)for(var e,n=0,s=ht(this),o=t.match(pt)||[];e=o[n++];)s.hasClass(e)?s.removeClass(e):s.addClass(e);else(i===V||"boolean"===i)&&(this.className&&ht._data(this,"__className__",this.className),this.className=this.className||!1===t?"":ht._data(this,"__className__")||"")})},hasClass:function(t){for(var e=" "+t+" ",i=0,n=this.length;n>i;i++)if(1===this[i].nodeType&&(" "+this[i].className+" ").replace(Ht," ").indexOf(e)>=0)return!0;return!1},val:function(t){var i,n,s,o=this[0];return arguments.length?(s=ht.isFunction(t),this.each(function(i){var o;1===this.nodeType&&(o=s?t.call(this,i,ht(this).val()):t,null==o?o="":"number"==typeof o?o+="":ht.isArray(o)&&(o=ht.map(o,function(t){return null==t?"":t+""})),n=ht.valHooks[this.type]||ht.valHooks[this.nodeName.toLowerCase()],
-n&&"set"in n&&n.set(this,o,"value")!==e||(this.value=o))})):o?(n=ht.valHooks[o.type]||ht.valHooks[o.nodeName.toLowerCase()],n&&"get"in n&&(i=n.get(o,"value"))!==e?i:(i=o.value,"string"==typeof i?i.replace(Dt,""):null==i?"":i)):void 0}}),ht.extend({valHooks:{option:{get:function(t){var e=ht.find.attr(t,"value");return null!=e?e:t.text}},select:{get:function(t){for(var e,i,n=t.options,s=t.selectedIndex,o="select-one"===t.type||0>s,r=o?null:[],a=o?s+1:n.length,l=0>s?a:o?s:0;a>l;l++)if(i=n[l],!(!i.selected&&l!==s||(ht.support.optDisabled?i.disabled:null!==i.getAttribute("disabled"))||i.parentNode.disabled&&ht.nodeName(i.parentNode,"optgroup"))){if(e=ht(i).val(),o)return e;r.push(e)}return r},set:function(t,e){for(var i,n,s=t.options,o=ht.makeArray(e),r=s.length;r--;)n=s[r],(n.selected=ht.inArray(ht(n).val(),o)>=0)&&(i=!0);return i||(t.selectedIndex=-1),o}}},attr:function(t,i,n){var s,o,r=t.nodeType;if(t&&3!==r&&8!==r&&2!==r)return typeof t.getAttribute===V?ht.prop(t,i,n):(1===r&&ht.isXMLDoc(t)||(i=i.toLowerCase(),s=ht.attrHooks[i]||(ht.expr.match.bool.test(i)?kt:Nt)),n===e?s&&"get"in s&&null!==(o=s.get(t,i))?o:(o=ht.find.attr(t,i),null==o?e:o):null!==n?s&&"set"in s&&(o=s.set(t,n,i))!==e?o:(t.setAttribute(i,n+""),n):(ht.removeAttr(t,i),e))},removeAttr:function(t,e){var i,n,s=0,o=e&&e.match(pt);if(o&&1===t.nodeType)for(;i=o[s++];)n=ht.propFix[i]||i,ht.expr.match.bool.test(i)?Mt&&Wt||!At.test(i)?t[n]=!1:t[ht.camelCase("default-"+i)]=t[n]=!1:ht.attr(t,i,""),t.removeAttribute(Wt?i:n)},attrHooks:{type:{set:function(t,e){if(!ht.support.radioValue&&"radio"===e&&ht.nodeName(t,"input")){var i=t.value;return t.setAttribute("type",e),i&&(t.value=i),e}}}},propFix:{for:"htmlFor",class:"className"},prop:function(t,i,n){var s,o,r,a=t.nodeType;if(t&&3!==a&&8!==a&&2!==a)return r=1!==a||!ht.isXMLDoc(t),r&&(i=ht.propFix[i]||i,o=ht.propHooks[i]),n!==e?o&&"set"in o&&(s=o.set(t,n,i))!==e?s:t[i]=n:o&&"get"in o&&null!==(s=o.get(t,i))?s:t[i]},propHooks:{tabIndex:{get:function(t){var e=ht.find.attr(t,"tabindex");return e?parseInt(e,10):It.test(t.nodeName)||zt.test(t.nodeName)&&t.href?0:-1}}}}),kt={set:function(t,e,i){return!1===e?ht.removeAttr(t,i):Mt&&Wt||!At.test(i)?t.setAttribute(!Wt&&ht.propFix[i]||i,i):t[ht.camelCase("default-"+i)]=t[i]=!0,i}},ht.each(ht.expr.match.bool.source.match(/\w+/g),function(t,i){var n=ht.expr.attrHandle[i]||ht.find.attr;ht.expr.attrHandle[i]=Mt&&Wt||!At.test(i)?function(t,i,s){var o=ht.expr.attrHandle[i],r=s?e:(ht.expr.attrHandle[i]=e)!=n(t,i,s)?i.toLowerCase():null;return ht.expr.attrHandle[i]=o,r}:function(t,i,n){return n?e:t[ht.camelCase("default-"+i)]?i.toLowerCase():null}}),Mt&&Wt||(ht.attrHooks.value={set:function(t,i,n){return ht.nodeName(t,"input")?(t.defaultValue=i,e):Nt&&Nt.set(t,i,n)}}),Wt||(Nt={set:function(t,i,n){var s=t.getAttributeNode(n);return s||t.setAttributeNode(s=t.ownerDocument.createAttribute(n)),s.value=i+="","value"===n||i===t.getAttribute(n)?i:e}},ht.expr.attrHandle.id=ht.expr.attrHandle.name=ht.expr.attrHandle.coords=function(t,i,n){var s;return n?e:(s=t.getAttributeNode(i))&&""!==s.value?s.value:null},ht.valHooks.button={get:function(t,i){var n=t.getAttributeNode(i);return n&&n.specified?n.value:e},set:Nt.set},ht.attrHooks.contenteditable={set:function(t,e,i){Nt.set(t,""!==e&&e,i)}},ht.each(["width","height"],function(t,i){ht.attrHooks[i]={set:function(t,n){return""===n?(t.setAttribute(i,"auto"),n):e}}})),ht.support.hrefNormalized||ht.each(["href","src"],function(t,e){ht.propHooks[e]={get:function(t){return t.getAttribute(e,4)}}}),ht.support.style||(ht.attrHooks.style={get:function(t){return t.style.cssText||e},set:function(t,e){return t.style.cssText=e+""}}),ht.support.optSelected||(ht.propHooks.selected={get:function(t){var e=t.parentNode;return e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex),null}}),ht.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){ht.propFix[this.toLowerCase()]=this}),ht.support.enctype||(ht.propFix.enctype="encoding"),ht.each(["radio","checkbox"],function(){ht.valHooks[this]={set:function(t,i){return ht.isArray(i)?t.checked=ht.inArray(ht(t).val(),i)>=0:e}},ht.support.checkOn||(ht.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})});var Lt=/^(?:input|select|textarea)$/i,Ot=/^key/,jt=/^(?:mouse|contextmenu)|click/,Rt=/^(?:focusinfocus|focusoutblur)$/,Ft=/^([^.]*)(?:\.(.+)|)$/;ht.event={global:{},add:function(t,i,n,s,o){var r,a,l,c,h,u,p,f,d,g,m,v=ht._data(t);if(v){for(n.handler&&(c=n,n=c.handler,o=c.selector),n.guid||(n.guid=ht.guid++),(a=v.events)||(a=v.events={}),(u=v.handle)||(u=v.handle=function(t){return typeof ht===V||t&&ht.event.triggered===t.type?e:ht.event.dispatch.apply(u.elem,arguments)},u.elem=t),i=(i||"").match(pt)||[""],l=i.length;l--;)r=Ft.exec(i[l])||[],d=m=r[1],g=(r[2]||"").split(".").sort(),d&&(h=ht.event.special[d]||{},d=(o?h.delegateType:h.bindType)||d,h=ht.event.special[d]||{},p=ht.extend({type:d,origType:m,data:s,handler:n,guid:n.guid,selector:o,needsContext:o&&ht.expr.match.needsContext.test(o),namespace:g.join(".")},c),(f=a[d])||(f=a[d]=[],f.delegateCount=0,h.setup&&!1!==h.setup.call(t,s,g,u)||(t.addEventListener?t.addEventListener(d,u,!1):t.attachEvent&&t.attachEvent("on"+d,u))),h.add&&(h.add.call(t,p),p.handler.guid||(p.handler.guid=n.guid)),o?f.splice(f.delegateCount++,0,p):f.push(p),ht.event.global[d]=!0);t=null}},remove:function(t,e,i,n,s){var o,r,a,l,c,h,u,p,f,d,g,m=ht.hasData(t)&&ht._data(t);if(m&&(h=m.events)){for(e=(e||"").match(pt)||[""],c=e.length;c--;)if(a=Ft.exec(e[c])||[],f=g=a[1],d=(a[2]||"").split(".").sort(),f){for(u=ht.event.special[f]||{},f=(n?u.delegateType:u.bindType)||f,p=h[f]||[],a=a[2]&&RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=p.length;o--;)r=p[o],!s&&g!==r.origType||i&&i.guid!==r.guid||a&&!a.test(r.namespace)||n&&n!==r.selector&&("**"!==n||!r.selector)||(p.splice(o,1),r.selector&&p.delegateCount--,u.remove&&u.remove.call(t,r));l&&!p.length&&(u.teardown&&!1!==u.teardown.call(t,d,m.handle)||ht.removeEvent(t,f,m.handle),delete h[f])}else for(f in h)ht.event.remove(t,f+e[c],i,n,!0);ht.isEmptyObject(h)&&(delete m.handle,ht._removeData(t,"events"))}},trigger:function(i,n,s,o){var r,a,l,c,h,u,p,f=[s||Q],d=lt.call(i,"type")?i.type:i,g=lt.call(i,"namespace")?i.namespace.split("."):[];if(l=u=s=s||Q,3!==s.nodeType&&8!==s.nodeType&&!Rt.test(d+ht.event.triggered)&&(d.indexOf(".")>=0&&(g=d.split("."),d=g.shift(),g.sort()),a=0>d.indexOf(":")&&"on"+d,i=i[ht.expando]?i:new ht.Event(d,"object"==typeof i&&i),i.isTrigger=o?2:3,i.namespace=g.join("."),i.namespace_re=i.namespace?RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,i.result=e,i.target||(i.target=s),n=null==n?[i]:ht.makeArray(n,[i]),h=ht.event.special[d]||{},o||!h.trigger||!1!==h.trigger.apply(s,n))){if(!o&&!h.noBubble&&!ht.isWindow(s)){for(c=h.delegateType||d,Rt.test(c+d)||(l=l.parentNode);l;l=l.parentNode)f.push(l),u=l;u===(s.ownerDocument||Q)&&f.push(u.defaultView||u.parentWindow||t)}for(p=0;(l=f[p++])&&!i.isPropagationStopped();)i.type=p>1?c:h.bindType||d,r=(ht._data(l,"events")||{})[i.type]&&ht._data(l,"handle"),r&&r.apply(l,n),r=a&&l[a],r&&ht.acceptData(l)&&r.apply&&!1===r.apply(l,n)&&i.preventDefault();if(i.type=d,!o&&!i.isDefaultPrevented()&&(!h._default||!1===h._default.apply(f.pop(),n))&&ht.acceptData(s)&&a&&s[d]&&!ht.isWindow(s)){u=s[a],u&&(s[a]=null),ht.event.triggered=d;try{s[d]()}catch(t){}ht.event.triggered=e,u&&(s[a]=u)}return i.result}},dispatch:function(t){t=ht.event.fix(t);var i,n,s,o,r,a=[],l=ot.call(arguments),c=(ht._data(this,"events")||{})[t.type]||[],h=ht.event.special[t.type]||{};if(l[0]=t,t.delegateTarget=this,!h.preDispatch||!1!==h.preDispatch.call(this,t)){for(a=ht.event.handlers.call(this,t,c),i=0;(o=a[i++])&&!t.isPropagationStopped();)for(t.currentTarget=o.elem,r=0;(s=o.handlers[r++])&&!t.isImmediatePropagationStopped();)(!t.namespace_re||t.namespace_re.test(s.namespace))&&(t.handleObj=s,t.data=s.data,n=((ht.event.special[s.origType]||{}).handle||s.handler).apply(o.elem,l),n!==e&&!1===(t.result=n)&&(t.preventDefault(),t.stopPropagation()));return h.postDispatch&&h.postDispatch.call(this,t),t.result}},handlers:function(t,i){var n,s,o,r,a=[],l=i.delegateCount,c=t.target;if(l&&c.nodeType&&(!t.button||"click"!==t.type))for(;c!=this;c=c.parentNode||this)if(1===c.nodeType&&(!0!==c.disabled||"click"!==t.type)){for(o=[],r=0;l>r;r++)s=i[r],n=s.selector+" ",o[n]===e&&(o[n]=s.needsContext?ht(n,this).index(c)>=0:ht.find(n,this,null,[c]).length),o[n]&&o.push(s);o.length&&a.push({elem:c,handlers:o})}return i.length>l&&a.push({elem:this,handlers:i.slice(l)}),a},fix:function(t){if(t[ht.expando])return t;var e,i,n,s=t.type,o=t,r=this.fixHooks[s];for(r||(this.fixHooks[s]=r=jt.test(s)?this.mouseHooks:Ot.test(s)?this.keyHooks:{}),n=r.props?this.props.concat(r.props):this.props,t=new ht.Event(o),e=n.length;e--;)i=n[e],t[i]=o[i];return t.target||(t.target=o.srcElement||Q),3===t.target.nodeType&&(t.target=t.target.parentNode),t.metaKey=!!t.metaKey,r.filter?r.filter(t,o):t},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(t,e){return null==t.which&&(t.which=null!=e.charCode?e.charCode:e.keyCode),t}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(t,i){var n,s,o,r=i.button,a=i.fromElement;return null==t.pageX&&null!=i.clientX&&(s=t.target.ownerDocument||Q,o=s.documentElement,n=s.body,t.pageX=i.clientX+(o&&o.scrollLeft||n&&n.scrollLeft||0)-(o&&o.clientLeft||n&&n.clientLeft||0),t.pageY=i.clientY+(o&&o.scrollTop||n&&n.scrollTop||0)-(o&&o.clientTop||n&&n.clientTop||0)),!t.relatedTarget&&a&&(t.relatedTarget=a===t.target?i.toElement:a),t.which||r===e||(t.which=1&r?1:2&r?3:4&r?2:0),t}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==h()&&this.focus)try{return this.focus(),!1}catch(t){}},delegateType:"focusin"},blur:{trigger:function(){return this===h()&&this.blur?(this.blur(),!1):e},delegateType:"focusout"},click:{trigger:function(){return ht.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):e},_default:function(t){return ht.nodeName(t.target,"a")}},beforeunload:{postDispatch:function(t){t.result!==e&&(t.originalEvent.returnValue=t.result)}}},simulate:function(t,e,i,n){var s=ht.extend(new ht.Event,i,{type:t,isSimulated:!0,originalEvent:{}});n?ht.event.trigger(s,null,e):ht.event.dispatch.call(e,s),s.isDefaultPrevented()&&i.preventDefault()}},ht.removeEvent=Q.removeEventListener?function(t,e,i){t.removeEventListener&&t.removeEventListener(e,i,!1)}:function(t,e,i){var n="on"+e;t.detachEvent&&(typeof t[n]===V&&(t[n]=null),t.detachEvent(n,i))},ht.Event=function(t,i){return this instanceof ht.Event?(t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||!1===t.returnValue||t.getPreventDefault&&t.getPreventDefault()?l:c):this.type=t,i&&ht.extend(this,i),this.timeStamp=t&&t.timeStamp||ht.now(),this[ht.expando]=!0,e):new ht.Event(t,i)},ht.Event.prototype={isDefaultPrevented:c,isPropagationStopped:c,isImmediatePropagationStopped:c,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=l,t&&(t.preventDefault?t.preventDefault():t.returnValue=!1)},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=l,t&&(t.stopPropagation&&t.stopPropagation(),t.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=l,this.stopPropagation()}},ht.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(t,e){ht.event.special[t]={delegateType:e,bindType:e,handle:function(t){var i,n=this,s=t.relatedTarget,o=t.handleObj;return(!s||s!==n&&!ht.contains(n,s))&&(t.type=o.origType,i=o.handler.apply(this,arguments),t.type=e),i}}}),ht.support.submitBubbles||(ht.event.special.submit={setup:function(){return!ht.nodeName(this,"form")&&(ht.event.add(this,"click._submit keypress._submit",function(t){var i=t.target,n=ht.nodeName(i,"input")||ht.nodeName(i,"button")?i.form:e;n&&!ht._data(n,"submitBubbles")&&(ht.event.add(n,"submit._submit",function(t){t._submit_bubble=!0}),ht._data(n,"submitBubbles",!0))}),e)},postDispatch:function(t){t._submit_bubble&&(delete t._submit_bubble,this.parentNode&&!t.isTrigger&&ht.event.simulate("submit",this.parentNode,t,!0))},teardown:function(){return!ht.nodeName(this,"form")&&(ht.event.remove(this,"._submit"),e)}}),ht.support.changeBubbles||(ht.event.special.change={setup:function(){return Lt.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(ht.event.add(this,"propertychange._change",function(t){"checked"===t.originalEvent.propertyName&&(this._just_changed=!0)}),ht.event.add(this,"click._change",function(t){this._just_changed&&!t.isTrigger&&(this._just_changed=!1),ht.event.simulate("change",this,t,!0)})),!1):(ht.event.add(this,"beforeactivate._change",function(t){var e=t.target;Lt.test(e.nodeName)&&!ht._data(e,"changeBubbles")&&(ht.event.add(e,"change._change",function(t){!this.parentNode||t.isSimulated||t.isTrigger||ht.event.simulate("change",this.parentNode,t,!0)}),ht._data(e,"changeBubbles",!0))}),e)},handle:function(t){var i=t.target;return this!==i||t.isSimulated||t.isTrigger||"radio"!==i.type&&"checkbox"!==i.type?t.handleObj.handler.apply(this,arguments):e},teardown:function(){return ht.event.remove(this,"._change"),!Lt.test(this.nodeName)}}),ht.support.focusinBubbles||ht.each({focus:"focusin",blur:"focusout"},function(t,e){var i=0,n=function(t){ht.event.simulate(e,t.target,ht.event.fix(t),!0)};ht.event.special[e]={setup:function(){0==i++&&Q.addEventListener(t,n,!0)},teardown:function(){0==--i&&Q.removeEventListener(t,n,!0)}}}),ht.fn.extend({on:function(t,i,n,s,o){var r,a;if("object"==typeof t){for(r in"string"!=typeof i&&(n=n||i,i=e),t)this.on(r,i,n,t[r],o);return this}if(null==n&&null==s?(s=i,n=i=e):null==s&&("string"==typeof i?(s=n,n=e):(s=n,n=i,i=e)),!1===s)s=c;else if(!s)return this;return 1===o&&(a=s,s=function(t){return ht().off(t),a.apply(this,arguments)},s.guid=a.guid||(a.guid=ht.guid++)),this.each(function(){ht.event.add(this,t,s,n,i)})},one:function(t,e,i,n){return this.on(t,e,i,n,1)},off:function(t,i,n){var s,o;if(t&&t.preventDefault&&t.handleObj)return s=t.handleObj,ht(t.delegateTarget).off(s.namespace?s.origType+"."+s.namespace:s.origType,s.selector,s.handler),this;if("object"==typeof t){for(o in t)this.off(o,i,t[o]);return this}return(!1===i||"function"==typeof i)&&(n=i,i=e),!1===n&&(n=c),this.each(function(){ht.event.remove(this,t,n,i)})},trigger:function(t,e){return this.each(function(){ht.event.trigger(t,e,this)})},triggerHandler:function(t,i){var n=this[0];return n?ht.event.trigger(t,i,n,!0):e}});var Bt=/^.[^:#\[\.,]*$/,qt=/^(?:parents|prev(?:Until|All))/,$t=ht.expr.match.needsContext,Xt={children:!0,contents:!0,next:!0,prev:!0};ht.fn.extend({find:function(t){var e,i=[],n=this,s=n.length;if("string"!=typeof t)return this.pushStack(ht(t).filter(function(){for(e=0;s>e;e++)if(ht.contains(n[e],this))return!0}));for(e=0;s>e;e++)ht.find(t,n[e],i);return i=this.pushStack(s>1?ht.unique(i):i),i.selector=this.selector?this.selector+" "+t:t,i},has:function(t){var e,i=ht(t,this),n=i.length;return this.filter(function(){for(e=0;n>e;e++)if(ht.contains(this,i[e]))return!0})},not:function(t){return this.pushStack(p(this,t||[],!0))},filter:function(t){return this.pushStack(p(this,t||[],!1))},is:function(t){return!!p(this,"string"==typeof t&&$t.test(t)?ht(t):t||[],!1).length},closest:function(t,e){for(var i,n=0,s=this.length,o=[],r=$t.test(t)||"string"!=typeof t?ht(t,e||this.context):0;s>n;n++)for(i=this[n];i&&i!==e;i=i.parentNode)if(11>i.nodeType&&(r?r.index(i)>-1:1===i.nodeType&&ht.find.matchesSelector(i,t))){i=o.push(i);break}return this.pushStack(o.length>1?ht.unique(o):o)},index:function(t){return t?"string"==typeof t?ht.inArray(this[0],ht(t)):ht.inArray(t.jquery?t[0]:t,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){var i="string"==typeof t?ht(t,e):ht.makeArray(t&&t.nodeType?[t]:t),n=ht.merge(this.get(),i);return this.pushStack(ht.unique(n))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),ht.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return ht.dir(t,"parentNode")},parentsUntil:function(t,e,i){return ht.dir(t,"parentNode",i)},next:function(t){return u(t,"nextSibling")},prev:function(t){return u(t,"previousSibling")},nextAll:function(t){return ht.dir(t,"nextSibling")},prevAll:function(t){return ht.dir(t,"previousSibling")},nextUntil:function(t,e,i){return ht.dir(t,"nextSibling",i)},prevUntil:function(t,e,i){return ht.dir(t,"previousSibling",i)},siblings:function(t){return ht.sibling((t.parentNode||{}).firstChild,t)},children:function(t){return ht.sibling(t.firstChild)},contents:function(t){return ht.nodeName(t,"iframe")?t.contentDocument||t.contentWindow.document:ht.merge([],t.childNodes)}},function(t,e){ht.fn[t]=function(i,n){var s=ht.map(this,e,i);return"Until"!==t.slice(-5)&&(n=i),n&&"string"==typeof n&&(s=ht.filter(n,s)),this.length>1&&(Xt[t]||(s=ht.unique(s)),qt.test(t)&&(s=s.reverse())),this.pushStack(s)}}),ht.extend({filter:function(t,e,i){var n=e[0];return i&&(t=":not("+t+")"),1===e.length&&1===n.nodeType?ht.find.matchesSelector(n,t)?[n]:[]:ht.find.matches(t,ht.grep(e,function(t){return 1===t.nodeType}))},dir:function(t,i,n){for(var s=[],o=t[i];o&&9!==o.nodeType&&(n===e||1!==o.nodeType||!ht(o).is(n));)1===o.nodeType&&s.push(o),o=o[i];return s},sibling:function(t,e){for(var i=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&i.push(t);return i}});var Yt="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",Ut=/ jQuery\d+="(?:null|\d+)"/g,Vt=RegExp("<(?:"+Yt+")[\\s/>]","i"),Gt=/^\s+/,Qt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Kt=/<([\w:]+)/,Jt=/\s*$/g,re={option:[1,""],legend:[1,""],area:[1,""],param:[1,""],thead:[1,"t ","
"],tr:[2,"","
"],col:[2,"
"],td:[3,"
"],_default:ht.support.htmlSerialize?[0,"",""]:[1,"X","